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