1 /* $NetBSD: altq_localq.c,v 1.4 2001/11/12 23:14:22 lukem Exp $ */
2 /* $KAME: altq_localq.c,v 1.4 2001/08/16 11:28:25 kjc Exp $ */
3 /*
4 * a skeleton file for implementing a new queueing discipline.
5 * this file is in the public domain.
6 */
7
8 #include <sys/cdefs.h>
9 __KERNEL_RCSID(0, "$NetBSD: altq_localq.c,v 1.4 2001/11/12 23:14:22 lukem Exp $");
10
11 #if defined(__FreeBSD__) || defined(__NetBSD__)
12 #include "opt_altq.h"
13 #endif /* __FreeBSD__ || __NetBSD__ */
14 #ifdef ALTQ_LOCALQ /* localq is enabled by ALTQ_LOCALQ option in opt_altq.h */
15
16 #include <sys/param.h>
17 #include <sys/mbuf.h>
18 #include <sys/socket.h>
19 #include <sys/sockio.h>
20
21 #include <net/if.h>
22 #include <netinet/in.h>
23
24 #include <altq/altq.h>
25 #include <altq/altq_conf.h>
26
27 /*
28 * localq device interface
29 */
30 altqdev_decl(localq);
31
32 int
33 localqopen(dev, flag, fmt, p)
34 dev_t dev;
35 int flag, fmt;
36 struct proc *p;
37 {
38 /* everything will be done when the queueing scheme is attached. */
39 return 0;
40 }
41
42 int
43 localqclose(dev, flag, fmt, p)
44 dev_t dev;
45 int flag, fmt;
46 struct proc *p;
47 {
48 int error = 0;
49
50 return error;
51 }
52
53 int
54 localqioctl(dev, cmd, addr, flag, p)
55 dev_t dev;
56 ioctlcmd_t cmd;
57 caddr_t addr;
58 int flag;
59 struct proc *p;
60 {
61 int error = 0;
62
63 return error;
64 }
65
66 #ifdef KLD_MODULE
67
68 static struct altqsw localq_sw =
69 {"localq", localqopen, localqclose, localqioctl};
70
71 ALTQ_MODULE(altq_localq, ALTQT_LOCALQ, &localq_sw);
72
73 #endif /* KLD_MODULE */
74
75 #endif /* ALTQ_LOCALQ */
Cache object: 9221167b8b6ea33ff19ac866b371c7ec
|