aboutsummaryrefslogtreecommitdiff
path: root/sys/netns/ns_pcb.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/netns/ns_pcb.c')
-rw-r--r--sys/netns/ns_pcb.c17
1 files changed, 14 insertions, 3 deletions
diff --git a/sys/netns/ns_pcb.c b/sys/netns/ns_pcb.c
index 9f1ec92e4a70..12e4f2603ca9 100644
--- a/sys/netns/ns_pcb.c
+++ b/sys/netns/ns_pcb.c
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* from: @(#)ns_pcb.c 7.11 (Berkeley) 6/27/91
- * $Id: ns_pcb.c,v 1.2 1993/10/16 19:54:28 rgrimes Exp $
+ * $Id: ns_pcb.c,v 1.5 1993/12/19 00:54:00 wollman Exp $
*/
#include "param.h"
@@ -50,7 +50,9 @@
#include "ns_pcb.h"
struct ns_addr zerons_addr;
+struct nspcb nspcb;
+int
ns_pcballoc(so, head)
struct socket *so;
struct nspcb *head;
@@ -68,6 +70,7 @@ ns_pcballoc(so, head)
return (0);
}
+int
ns_pcbbind(nsp, nam)
register struct nspcb *nsp;
struct mbuf *nam;
@@ -118,6 +121,7 @@ noname:
* If don't have a local address for this socket yet,
* then pick one.
*/
+int
ns_pcbconnect(nsp, nam)
struct nspcb *nsp;
struct mbuf *nam;
@@ -217,6 +221,7 @@ ns_pcbconnect(nsp, nam)
return (0);
}
+void
ns_pcbdisconnect(nsp)
struct nspcb *nsp;
{
@@ -226,6 +231,7 @@ ns_pcbdisconnect(nsp)
ns_pcbdetach(nsp);
}
+void
ns_pcbdetach(nsp)
struct nspcb *nsp;
{
@@ -239,6 +245,7 @@ ns_pcbdetach(nsp)
(void) m_free(dtom(nsp));
}
+void
ns_setsockaddr(nsp, nam)
register struct nspcb *nsp;
struct mbuf *nam;
@@ -253,6 +260,7 @@ ns_setsockaddr(nsp, nam)
sns->sns_addr = nsp->nsp_laddr;
}
+void
ns_setpeeraddr(nsp, nam)
register struct nspcb *nsp;
struct mbuf *nam;
@@ -274,10 +282,12 @@ ns_setpeeraddr(nsp, nam)
* Also pass an extra paramter via the nspcb. (which may in fact
* be a parameter list!)
*/
+void
ns_pcbnotify(dst, errno, notify, param)
register struct ns_addr *dst;
+ int errno;
+ ns_notify_func_t notify;
long param;
- int errno, (*notify)();
{
register struct nspcb *nsp, *oinp;
int s = splimp();
@@ -295,7 +305,7 @@ ns_pcbnotify(dst, errno, notify, param)
oinp = nsp;
nsp = nsp->nsp_next;
oinp->nsp_notify_param = param;
- (*notify)(oinp);
+ (*notify)(oinp, errno);
}
splx(s);
}
@@ -324,6 +334,7 @@ struct nspcb *
ns_pcblookup(faddr, lport, wildp)
struct ns_addr *faddr;
u_short lport;
+ int wildp;
{
register struct nspcb *nsp, *match = 0;
int matchwild = 3, wildcard;