-/* $OpenBSD: in_pcb.c,v 1.286 2024/01/19 02:24:07 bluhm Exp $ */
+/* $OpenBSD: in_pcb.c,v 1.287 2024/01/28 20:34:25 bluhm Exp $ */
/* $NetBSD: in_pcb.c,v 1.25 1996/02/13 23:41:53 christos Exp $ */
/*
* any errors for each matching socket.
*/
void
-in_pcbnotifyall(struct inpcbtable *table, struct sockaddr *dst, u_int rtable,
- int errno, void (*notify)(struct inpcb *, int))
+in_pcbnotifyall(struct inpcbtable *table, const struct sockaddr_in *dst,
+ u_int rtable, int errno, void (*notify)(struct inpcb *, int))
{
SIMPLEQ_HEAD(, inpcb) inpcblist;
struct inpcb *inp;
- struct in_addr faddr;
u_int rdomain;
- if (dst->sa_family != AF_INET)
- return;
- faddr = satosin(dst)->sin_addr;
- if (faddr.s_addr == INADDR_ANY)
+ if (dst->sin_addr.s_addr == INADDR_ANY)
return;
if (notify == NULL)
return;
if (ISSET(inp->inp_flags, INP_IPV6))
continue;
#endif
- if (inp->inp_faddr.s_addr != faddr.s_addr ||
+ if (inp->inp_faddr.s_addr != dst->sin_addr.s_addr ||
rtable_l2(inp->inp_rtableid) != rdomain) {
continue;
}
-/* $OpenBSD: in_pcb.h,v 1.148 2024/01/09 19:57:00 bluhm Exp $ */
+/* $OpenBSD: in_pcb.h,v 1.149 2024/01/28 20:34:25 bluhm Exp $ */
/* $NetBSD: in_pcb.h,v 1.14 1996/02/13 23:42:00 christos Exp $ */
/*
struct inpcb *
in_pcblookup_local_lock(struct inpcbtable *, const void *, u_int, int,
u_int, int);
-void in_pcbnotifyall(struct inpcbtable *, struct sockaddr *,
+void in_pcbnotifyall(struct inpcbtable *, const struct sockaddr_in *,
u_int, int, void (*)(struct inpcb *, int));
void in_pcbrehash(struct inpcb *);
void in_rtchange(struct inpcb *, int);
in_pcbrtentry(struct inpcb *);
/* INET6 stuff */
-void in6_pcbnotify(struct inpcbtable *, struct sockaddr_in6 *,
+void in6_pcbnotify(struct inpcbtable *, const struct sockaddr_in6 *,
u_int, const struct sockaddr_in6 *, u_int, u_int, int, void *,
void (*)(struct inpcb *, int));
int in6_selecthlim(const struct inpcb *);
-/* $OpenBSD: tcp_subr.c,v 1.196 2024/01/27 21:13:46 bluhm Exp $ */
+/* $OpenBSD: tcp_subr.c,v 1.197 2024/01/28 20:34:25 bluhm Exp $ */
/* $NetBSD: tcp_subr.c,v 1.22 1996/02/13 23:44:00 christos Exp $ */
/*
}
in_pcbunref(inp);
} else
- in_pcbnotifyall(&tcbtable, sa, rdomain, errno, notify);
+ in_pcbnotifyall(&tcbtable, satosin(sa), rdomain, errno, notify);
}
-/* $OpenBSD: tcp_timer.c,v 1.75 2024/01/27 21:35:13 bluhm Exp $ */
+/* $OpenBSD: tcp_timer.c,v 1.76 2024/01/28 20:34:25 bluhm Exp $ */
/* $NetBSD: tcp_timer.c,v 1.14 1996/02/13 23:44:09 christos Exp $ */
/*
sin.sin_len = sizeof(sin);
sin.sin_family = AF_INET;
sin.sin_addr = inp->inp_faddr;
- in_pcbnotifyall(&tcbtable, sintosa(&sin), inp->inp_rtableid,
- EMSGSIZE, tcp_mtudisc);
+ in_pcbnotifyall(&tcbtable, &sin, inp->inp_rtableid, EMSGSIZE,
+ tcp_mtudisc);
goto out;
}
-/* $OpenBSD: udp_usrreq.c,v 1.315 2024/01/21 01:17:20 bluhm Exp $ */
+/* $OpenBSD: udp_usrreq.c,v 1.316 2024/01/28 20:34:25 bluhm Exp $ */
/* $NetBSD: udp_usrreq.c,v 1.28 1996/03/16 23:54:03 christos Exp $ */
/*
notify(inp, errno);
in_pcbunref(inp);
} else
- in_pcbnotifyall(&udbtable, sa, rdomain, errno, notify);
+ in_pcbnotifyall(&udbtable, satosin(sa), rdomain, errno, notify);
}
int
-/* $OpenBSD: in6_pcb.c,v 1.132 2024/01/09 19:57:01 bluhm Exp $ */
+/* $OpenBSD: in6_pcb.c,v 1.133 2024/01/28 20:34:25 bluhm Exp $ */
/*
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
* once PCB to be notified has been located.
*/
void
-in6_pcbnotify(struct inpcbtable *table, struct sockaddr_in6 *dst,
+in6_pcbnotify(struct inpcbtable *table, const struct sockaddr_in6 *dst,
uint fport_arg, const struct sockaddr_in6 *src, uint lport_arg,
u_int rtable, int cmd, void *cmdarg, void (*notify)(struct inpcb *, int))
{