summaryrefslogtreecommitdiff
path: root/sys/altq/altq_localq.c
diff options
context:
space:
mode:
authorKenjiro Cho <kjc@cvs.openbsd.org>2001-06-27 05:28:37 +0000
committerKenjiro Cho <kjc@cvs.openbsd.org>2001-06-27 05:28:37 +0000
commite13e0cc15f99577acddb2317a916f349405ee961 (patch)
tree6b866f8e79c8e6b96a779aa877dd9b6559059ba3 /sys/altq/altq_localq.c
parentc00082e97a3137a461a24364470c06ac571b833e (diff)
import ALTQ, alternate queueing support, from KAME.
ALTQ allows to switch various queueing disciplines on output network interfaces.
Diffstat (limited to 'sys/altq/altq_localq.c')
-rw-r--r--sys/altq/altq_localq.c69
1 files changed, 69 insertions, 0 deletions
diff --git a/sys/altq/altq_localq.c b/sys/altq/altq_localq.c
new file mode 100644
index 00000000000..b8d70956dea
--- /dev/null
+++ b/sys/altq/altq_localq.c
@@ -0,0 +1,69 @@
+/* $OpenBSD: altq_localq.c,v 1.1 2001/06/27 05:28:35 kjc Exp $ */
+/* $KAME: altq_localq.c,v 1.3 2000/10/18 09:15:23 kjc Exp $ */
+
+
+#if defined(__FreeBSD__) || defined(__NetBSD__)
+#include "opt_altq.h"
+#endif /* __FreeBSD__ || __NetBSD__ */
+#ifdef ALTQ_LOCALQ /* localq is enabled by ALTQ_LOCALQ option in opt_altq.h */
+
+#include <sys/param.h>
+#include <sys/mbuf.h>
+#include <sys/socket.h>
+#include <sys/sockio.h>
+
+#include <net/if.h>
+#include <netinet/in.h>
+
+#include <altq/altq.h>
+#include <altq/altq_conf.h>
+
+/*
+ * localq device interface
+ */
+altqdev_decl(localq);
+
+int
+localqopen(dev, flag, fmt, p)
+ dev_t dev;
+ int flag, fmt;
+ struct proc *p;
+{
+ /* everything will be done when the queueing scheme is attached. */
+ return 0;
+}
+
+int
+localqclose(dev, flag, fmt, p)
+ dev_t dev;
+ int flag, fmt;
+ struct proc *p;
+{
+ int error = 0;
+
+ return error;
+}
+
+int
+localqioctl(dev, cmd, addr, flag, p)
+ dev_t dev;
+ ioctlcmd_t cmd;
+ caddr_t addr;
+ int flag;
+ struct proc *p;
+{
+ int error = 0;
+
+ return error;
+}
+
+#ifdef KLD_MODULE
+
+static struct altqsw localq_sw =
+ {"localq", localqopen, localqclose, localqioctl};
+
+ALTQ_MODULE(altq_localq, ALTQT_LOCALQ, &localq_sw);
+
+#endif /* KLD_MODULE */
+
+#endif /* ALTQ_LOCALQ */