summaryrefslogtreecommitdiffstats
path: root/sys/netnatm/natm_proto.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/netnatm/natm_proto.c')
-rw-r--r--sys/netnatm/natm_proto.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/sys/netnatm/natm_proto.c b/sys/netnatm/natm_proto.c
index 145fb58..d97809b 100644
--- a/sys/netnatm/natm_proto.c
+++ b/sys/netnatm/natm_proto.c
@@ -88,8 +88,14 @@ static struct domain natmdomain = {
.dom_protoswNPROTOSW = &natmsw[sizeof(natmsw)/sizeof(natmsw[0])],
};
-static int natmqmaxlen = 1000 /* IFQ_MAXLEN */; /* max # of packets on queue */
-static struct ifqueue natmintrq;
+static struct netisr_handler natm_nh = {
+ .nh_name = "natm",
+ .nh_handler = natmintr,
+ .nh_proto = NETISR_NATM,
+ .nh_qlimit = 1000,
+ .nh_policy = NETISR_POLICY_SOURCE,
+};
+
#ifdef NATM_STAT
u_int natm_sodropcnt; /* # mbufs dropped due to full sb */
u_int natm_sodropbytes; /* # of bytes dropped */
@@ -101,11 +107,8 @@ static void
natm_init(void)
{
LIST_INIT(&natm_pcbs);
- bzero(&natmintrq, sizeof(natmintrq));
- natmintrq.ifq_maxlen = natmqmaxlen;
NATM_LOCK_INIT();
- mtx_init(&natmintrq.ifq_mtx, "natm_inq", NULL, MTX_DEF);
- netisr_register(NETISR_NATM, natmintr, &natmintrq, 0);
+ netisr_register(&natm_nh);
}
DOMAIN_SET(natm);
OpenPOWER on IntegriCloud