summaryrefslogtreecommitdiff
path: root/sys/netnatm
diff options
context:
space:
mode:
authorchuck <chuck@cvs.openbsd.org>1996-11-09 03:29:02 +0000
committerchuck <chuck@cvs.openbsd.org>1996-11-09 03:29:02 +0000
commitfbcb0b0850404098117cec4efee4bdc8e4d213ea (patch)
treef720fd0f1099296b3bfc614fd8396ad40cee97df /sys/netnatm
parent4f55d0d1d06df4d203fe33779d7363dc28f61dd0 (diff)
netbsd pr#2918 (jukka.partanen@research.nokia.com):
- fix up netnatm so that it compiles with new warning flags (and install headers) - sync in some minor changes from netbsd (Matthias Drochner)
Diffstat (limited to 'sys/netnatm')
-rw-r--r--sys/netnatm/natm.c8
-rw-r--r--sys/netnatm/natm_pcb.c6
-rw-r--r--sys/netnatm/natm_proto.c10
3 files changed, 17 insertions, 7 deletions
diff --git a/sys/netnatm/natm.c b/sys/netnatm/natm.c
index 289aeab3017..2a2cdb9b5b7 100644
--- a/sys/netnatm/natm.c
+++ b/sys/netnatm/natm.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: natm.c,v 1.2 1996/07/03 17:24:29 chuck Exp $ */
+/* $OpenBSD: natm.c,v 1.3 1996/11/09 03:28:59 chuck Exp $ */
/*
*
@@ -274,7 +274,7 @@ struct proc *p;
bcopy(npcb->npcb_ifp->if_xname, snatm->snatm_if, sizeof(snatm->snatm_if));
#elif defined(__FreeBSD__)
sprintf(snatm->snatm_if, "%s%d", npcb->npcb_ifp->if_name,
- npcb->npcb_ifp->if_unit);
+ npcb->npcb_ifp->if_unit);
#endif
snatm->snatm_vci = npcb->npcb_vci;
snatm->snatm_vpi = npcb->npcb_vpi;
@@ -361,7 +361,7 @@ next:
#ifdef DIAGNOSTIC
if ((m->m_flags & M_PKTHDR) == 0)
- panic("ipintr no HDR");
+ panic("natmintr no HDR");
#endif
npcb = (struct natmpcb *) m->m_pkthdr.rcvif; /* XXX: overloaded */
@@ -397,7 +397,7 @@ m->m_pkthdr.rcvif = NULL; /* null it out to be safe */
natm_sookcnt++;
natm_sookbytes += m->m_pkthdr.len;
#endif
- sbappend(&so->so_rcv, m);
+ sbappendrecord(&so->so_rcv, m);
sorwakeup(so);
} else {
#ifdef NATM_STAT
diff --git a/sys/netnatm/natm_pcb.c b/sys/netnatm/natm_pcb.c
index 68c5ebc6776..74c06708f89 100644
--- a/sys/netnatm/natm_pcb.c
+++ b/sys/netnatm/natm_pcb.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: natm_pcb.c,v 1.2 1996/07/03 17:24:29 chuck Exp $ */
+/* $OpenBSD: natm_pcb.c,v 1.3 1996/11/09 03:29:00 chuck Exp $ */
/*
*
@@ -172,6 +172,8 @@ done:
#ifdef DDB
+int npcb_dump __P((void));
+
int npcb_dump()
{
@@ -180,7 +182,7 @@ int npcb_dump()
printf("npcb dump:\n");
for (cpcb = natm_pcbs.lh_first ; cpcb != NULL ;
cpcb = cpcb->pcblist.le_next) {
- printf("if=%s, vci=%d, vpi=%d, IP=0x%x, sock=0x%x, flags=0x%x, inq=%d\n",
+ printf("if=%s, vci=%d, vpi=%d, IP=0x%x, sock=%p, flags=0x%x, inq=%d\n",
cpcb->npcb_ifp->if_xname, cpcb->npcb_vci, cpcb->npcb_vpi,
cpcb->ipaddr.s_addr, cpcb->npcb_socket,
cpcb->npcb_flags, cpcb->npcb_inq);
diff --git a/sys/netnatm/natm_proto.c b/sys/netnatm/natm_proto.c
index dbb3fe9eaad..08b06ea35d3 100644
--- a/sys/netnatm/natm_proto.c
+++ b/sys/netnatm/natm_proto.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: natm_proto.c,v 1.2 1996/07/03 17:24:29 chuck Exp $ */
+/* $OpenBSD: natm_proto.c,v 1.3 1996/11/09 03:29:01 chuck Exp $ */
/*
*
@@ -66,6 +66,14 @@ struct protosw natmsw[] = {
natm5_sysctl
#endif
},
+{ SOCK_DGRAM, &natmdomain, PROTO_NATMAAL5, PR_CONNREQUIRED | PR_ATOMIC,
+ 0, 0, 0, 0,
+ natm_usrreq,
+ 0, 0, 0, 0,
+#if defined(__NetBSD__) || defined(__OpenBSD__)
+ natm5_sysctl
+#endif
+},
{ SOCK_STREAM, &natmdomain, PROTO_NATMAAL0, PR_CONNREQUIRED,
0, 0, 0, 0,
natm_usrreq,