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