-/* $OpenBSD: in_pcb.c,v 1.277 2023/06/24 20:54:46 bluhm Exp $ */
+/* $OpenBSD: in_pcb.c,v 1.278 2023/11/12 23:19:14 bluhm Exp $ */
/* $NetBSD: in_pcb.c,v 1.25 1996/02/13 23:41:53 christos Exp $ */
/*
const struct in_addr zeroin_addr;
-union {
+const union {
struct in_addr za_in;
struct in6_addr za_in6;
} zeroin46_addr;
struct socket *so = inp->inp_socket;
u_int16_t lport = 0;
int wild = 0;
- void *laddr = &zeroin46_addr;
+ const void *laddr = &zeroin46_addr;
int error;
if (inp->inp_lport)
}
int
-in_pcbpickport(u_int16_t *lport, void *laddr, int wild, struct inpcb *inp,
- struct proc *p)
+in_pcbpickport(u_int16_t *lport, const void *laddr, int wild,
+ const struct inpcb *inp, struct proc *p)
{
struct socket *so = inp->inp_socket;
struct inpcbtable *table = inp->inp_table;
}
struct inpcb *
-in_pcblookup_local(struct inpcbtable *table, void *laddrp, u_int lport_arg,
- int flags, u_int rtable)
+in_pcblookup_local(struct inpcbtable *table, const void *laddrp,
+ u_int lport_arg, int flags, u_int rtable)
{
struct inpcb *inp, *match = NULL;
int matchwild = 3, wildcard;
u_int16_t lport = lport_arg;
- struct in_addr laddr = *(struct in_addr *)laddrp;
+ const struct in_addr laddr = *(const struct in_addr *)laddrp;
#ifdef INET6
- struct in6_addr *laddr6 = (struct in6_addr *)laddrp;
+ const struct in6_addr *laddr6 = (const struct in6_addr *)laddrp;
#endif
struct inpcbhead *head;
uint64_t lhash;
-/* $OpenBSD: in_pcb.h,v 1.136 2023/06/24 20:54:46 bluhm Exp $ */
+/* $OpenBSD: in_pcb.h,v 1.137 2023/11/12 23:19:15 bluhm Exp $ */
/* $NetBSD: in_pcb.h,v 1.14 1996/02/13 23:42:00 christos Exp $ */
/*
#endif /* INET6 */
void in_pcbinit(struct inpcbtable *, int);
struct inpcb *
- in_pcblookup_local(struct inpcbtable *, void *, u_int, int, u_int);
+ in_pcblookup_local(struct inpcbtable *, const void *, u_int, int,
+ u_int);
void in_pcbnotifyall(struct inpcbtable *, struct sockaddr *,
u_int, int, void (*)(struct inpcb *, int));
void in_pcbrehash(struct inpcb *);
u_int, const struct sockaddr_in6 *, u_int, u_int, int, void *,
void (*)(struct inpcb *, int));
int in6_selecthlim(struct inpcb *);
-int in_pcbpickport(u_int16_t *, void *, int, struct inpcb *, struct proc *);
+int in_pcbpickport(u_int16_t *, const void *, int, const struct inpcb *,
+ struct proc *);
#endif /* _KERNEL */
#endif /* _NETINET_IN_PCB_H_ */