summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorMarkus Friedl <markus@cvs.openbsd.org>2004-08-10 20:12:16 +0000
committerMarkus Friedl <markus@cvs.openbsd.org>2004-08-10 20:12:16 +0000
commit461ae51bb4119c9b12e16906e5d46e049eb86d2a (patch)
tree41b65d434befcf92fd5d3104745d98847cf53f64 /sys
parent6e39ce35a862b30c6fe9b5b6996dd727ba1439ec (diff)
remove in_pcbnotify, it is no longer used.
Diffstat (limited to 'sys')
-rw-r--r--sys/netinet/in_pcb.c62
-rw-r--r--sys/netinet/in_pcb.h4
2 files changed, 5 insertions, 61 deletions
diff --git a/sys/netinet/in_pcb.c b/sys/netinet/in_pcb.c
index 3e4b02c6480..54d931dc2c3 100644
--- a/sys/netinet/in_pcb.c
+++ b/sys/netinet/in_pcb.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: in_pcb.c,v 1.79 2004/08/04 20:45:09 markus Exp $ */
+/* $OpenBSD: in_pcb.c,v 1.80 2004/08/10 20:12:15 markus Exp $ */
/* $NetBSD: in_pcb.c,v 1.25 1996/02/13 23:41:53 christos Exp $ */
/*
@@ -568,8 +568,7 @@ in_setpeeraddr(inp, nam)
/*
* Pass some notification to all connections of a protocol
- * associated with address dst. The local address and/or port numbers
- * may be specified to limit the search. The "usual action" will be
+ * associated with address dst. The "usual action" will be
* taken, depending on the ctlinput cmd. The caller must filter any
* cmds that are uninteresting (e.g., no error in the map).
* Call the protocol specific routine (if any) to report
@@ -577,61 +576,6 @@ in_setpeeraddr(inp, nam)
*
* Must be called at splsoftnet.
*/
-int
-in_pcbnotify(table, dst, fport_arg, laddr, lport_arg, errno, notify)
- struct inpcbtable *table;
- struct sockaddr *dst;
- u_int fport_arg, lport_arg;
- struct in_addr laddr;
- int errno;
- void (*notify)(struct inpcb *, int);
-{
- struct inpcb *inp, *oinp;
- struct in_addr faddr;
- u_int16_t fport = fport_arg, lport = lport_arg;
- int nmatch = 0;
-
- splassert(IPL_SOFTNET);
-
-#ifdef INET6
- /*
- * See in6_pcbnotify() for IPv6 codepath. By the time this
- * gets called, the addresses passed are either definitely IPv4 or
- * IPv6; *_pcbnotify() never gets called with v4-mapped v6 addresses.
- */
-#endif /* INET6 */
-
- if (dst->sa_family != AF_INET)
- return (0);
- faddr = satosin(dst)->sin_addr;
- if (faddr.s_addr == INADDR_ANY)
- return (0);
-
- for (inp = CIRCLEQ_FIRST(&table->inpt_queue);
- inp != CIRCLEQ_END(&table->inpt_queue);) {
-#ifdef INET6
- if (inp->inp_flags & INP_IPV6) {
- inp = CIRCLEQ_NEXT(inp, inp_queue);
- continue;
- }
-#endif
- if (inp->inp_faddr.s_addr != faddr.s_addr ||
- inp->inp_socket == 0 ||
- inp->inp_fport != fport ||
- inp->inp_lport != lport ||
- inp->inp_laddr.s_addr != laddr.s_addr) {
- inp = CIRCLEQ_NEXT(inp, inp_queue);
- continue;
- }
- oinp = inp;
- inp = CIRCLEQ_NEXT(inp, inp_queue);
- nmatch++;
- if (notify)
- (*notify)(oinp, errno);
- }
- return (nmatch);
-}
-
void
in_pcbnotifyall(table, dst, errno, notify)
struct inpcbtable *table;
@@ -642,6 +586,8 @@ in_pcbnotifyall(table, dst, errno, notify)
struct inpcb *inp, *oinp;
struct in_addr faddr;
+ splassert(IPL_SOFTNET);
+
#ifdef INET6
/*
* See in6_pcbnotify() for IPv6 codepath. By the time this
diff --git a/sys/netinet/in_pcb.h b/sys/netinet/in_pcb.h
index dbe155885b8..eda8ddba5aa 100644
--- a/sys/netinet/in_pcb.h
+++ b/sys/netinet/in_pcb.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: in_pcb.h,v 1.50 2004/06/12 04:36:13 itojun Exp $ */
+/* $OpenBSD: in_pcb.h,v 1.51 2004/08/10 20:12:15 markus Exp $ */
/* $NetBSD: in_pcb.h,v 1.14 1996/02/13 23:42:00 christos Exp $ */
/*
@@ -259,8 +259,6 @@ void in_pcbinit(struct inpcbtable *, int);
struct inpcb *
in_pcblookup(struct inpcbtable *, void *, u_int, void *,
u_int, int);
-int in_pcbnotify(struct inpcbtable *, struct sockaddr *,
- u_int, struct in_addr, u_int, int, void (*)(struct inpcb *, int));
void in_pcbnotifyall(struct inpcbtable *, struct sockaddr *,
int, void (*)(struct inpcb *, int));
void in_pcbrehash(struct inpcb *);