Home | History | Annotate | Line # | Download | only in altq
altq_localq.c revision 1.9
      1  1.9  christos /*	$NetBSD: altq_localq.c,v 1.9 2006/11/16 01:32:37 christos Exp $	*/
      2  1.8     peter /*	$KAME: altq_localq.c,v 1.7 2003/07/10 12:07:48 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.4     lukem 
      8  1.4     lukem #include <sys/cdefs.h>
      9  1.9  christos __KERNEL_RCSID(0, "$NetBSD: altq_localq.c,v 1.9 2006/11/16 01:32:37 christos Exp $");
     10  1.1   thorpej 
     11  1.8     peter #ifdef _KERNEL_OPT
     12  1.1   thorpej #include "opt_altq.h"
     13  1.8     peter #endif
     14  1.8     peter 
     15  1.1   thorpej #ifdef ALTQ_LOCALQ  /* localq is enabled by ALTQ_LOCALQ option in opt_altq.h */
     16  1.1   thorpej 
     17  1.1   thorpej #include <sys/param.h>
     18  1.1   thorpej #include <sys/mbuf.h>
     19  1.1   thorpej #include <sys/socket.h>
     20  1.1   thorpej #include <sys/sockio.h>
     21  1.1   thorpej 
     22  1.1   thorpej #include <net/if.h>
     23  1.1   thorpej #include <netinet/in.h>
     24  1.1   thorpej 
     25  1.1   thorpej #include <altq/altq.h>
     26  1.1   thorpej #include <altq/altq_conf.h>
     27  1.1   thorpej 
     28  1.8     peter #ifdef ALTQ3_COMPAT
     29  1.1   thorpej /*
     30  1.1   thorpej  * localq device interface
     31  1.1   thorpej  */
     32  1.1   thorpej altqdev_decl(localq);
     33  1.1   thorpej 
     34  1.1   thorpej int
     35  1.9  christos localqopen(dev_t dev, int flag, int fmt,
     36  1.9  christos     struct lwp *l)
     37  1.1   thorpej {
     38  1.1   thorpej 	/* everything will be done when the queueing scheme is attached. */
     39  1.1   thorpej 	return 0;
     40  1.1   thorpej }
     41  1.1   thorpej 
     42  1.1   thorpej int
     43  1.9  christos localqclose(dev_t dev, int flag, int fmt,
     44  1.9  christos     struct lwp *l)
     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.9  christos localqioctl(dev_t dev, ioctlcmd_t cmd, caddr_t addr,
     53  1.9  christos     int flag, struct lwp *l)
     54  1.1   thorpej {
     55  1.1   thorpej 	int error = 0;
     56  1.5     perry 
     57  1.1   thorpej 	return error;
     58  1.1   thorpej }
     59  1.1   thorpej 
     60  1.1   thorpej #ifdef KLD_MODULE
     61  1.1   thorpej 
     62  1.1   thorpej static struct altqsw localq_sw =
     63  1.1   thorpej 	{"localq", localqopen, localqclose, localqioctl};
     64  1.1   thorpej 
     65  1.1   thorpej ALTQ_MODULE(altq_localq, ALTQT_LOCALQ, &localq_sw);
     66  1.1   thorpej 
     67  1.1   thorpej #endif /* KLD_MODULE */
     68  1.1   thorpej 
     69  1.8     peter #endif /* ALTQ3_COMPAT */
     70  1.1   thorpej #endif /* ALTQ_LOCALQ */
     71