NetBSD/sys/altq/altq_localq.c

76 lines
1.4 KiB
C
Raw Normal View History

2005-12-11 15:16:03 +03:00
/* $NetBSD: altq_localq.c,v 1.6 2005/12/11 12:16:03 christos Exp $ */
/* $KAME: altq_localq.c,v 1.4 2001/08/16 11:28:25 kjc Exp $ */
/*
* a skeleton file for implementing a new queueing discipline.
* this file is in the public domain.
*/
2000-12-14 11:42:28 +03:00
2001-11-13 02:08:56 +03:00
#include <sys/cdefs.h>
2005-12-11 15:16:03 +03:00
__KERNEL_RCSID(0, "$NetBSD: altq_localq.c,v 1.6 2005/12/11 12:16:03 christos Exp $");
2001-11-13 02:08:56 +03:00
2000-12-14 11:42:28 +03:00
#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
2005-12-11 15:16:03 +03:00
localqopen(dev, flag, fmt, l)
2000-12-14 11:42:28 +03:00
dev_t dev;
int flag, fmt;
2005-12-11 15:16:03 +03:00
struct lwp *l;
2000-12-14 11:42:28 +03:00
{
/* everything will be done when the queueing scheme is attached. */
return 0;
}
int
2005-12-11 15:16:03 +03:00
localqclose(dev, flag, fmt, l)
2000-12-14 11:42:28 +03:00
dev_t dev;
int flag, fmt;
2005-12-11 15:16:03 +03:00
struct lwp *l;
2000-12-14 11:42:28 +03:00
{
int error = 0;
return error;
}
int
2005-12-11 15:16:03 +03:00
localqioctl(dev, cmd, addr, flag, l)
2000-12-14 11:42:28 +03:00
dev_t dev;
ioctlcmd_t cmd;
caddr_t addr;
int flag;
2005-12-11 15:16:03 +03:00
struct lwp *l;
2000-12-14 11:42:28 +03:00
{
int error = 0;
2005-02-27 01:58:54 +03:00
2000-12-14 11:42:28 +03:00
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 */