-/* $OpenBSD: in_pcb.c,v 1.283 2024/01/01 22:16:51 bluhm Exp $ */
+/* $OpenBSD: in_pcb.c,v 1.284 2024/01/09 19:57:00 bluhm Exp $ */
/* $NetBSD: in_pcb.c,v 1.25 1996/02/13 23:41:53 christos Exp $ */
/*
struct inpcb *in_pcblookup_lock(struct inpcbtable *, struct in_addr, u_int,
struct in_addr, u_int, u_int, int);
-int in_pcbaddrisavail_lock(struct inpcb *, struct sockaddr_in *, int,
+int in_pcbaddrisavail_lock(const struct inpcb *, struct sockaddr_in *, int,
struct proc *, int);
int in_pcbpickport(u_int16_t *, const void *, int, const struct inpcb *,
struct proc *);
}
int
-in_pcbaddrisavail_lock(struct inpcb *inp, struct sockaddr_in *sin, int wild,
- struct proc *p, int lock)
+in_pcbaddrisavail_lock(const struct inpcb *inp, struct sockaddr_in *sin,
+ int wild, struct proc *p, int lock)
{
struct socket *so = inp->inp_socket;
struct inpcbtable *table = inp->inp_table;
}
int
-in_pcbaddrisavail(struct inpcb *inp, struct sockaddr_in *sin, int wild,
- struct proc *p)
+in_pcbaddrisavail(const struct inpcb *inp, struct sockaddr_in *sin,
+ int wild, struct proc *p)
{
return in_pcbaddrisavail_lock(inp, sin, wild, p, IN_PCBLOCK_GRAB);
}
{
struct ip_moptions *mopts = inp->inp_moptions;
struct route *ro = &inp->inp_route;
- struct in_addr *laddr = &inp->inp_laddr;
+ const struct in_addr *laddr = &inp->inp_laddr;
u_int rtableid = inp->inp_rtableid;
struct sockaddr *ip4_source = NULL;
-/* $OpenBSD: in_pcb.h,v 1.147 2024/01/03 11:07:04 bluhm Exp $ */
+/* $OpenBSD: in_pcb.h,v 1.148 2024/01/09 19:57:00 bluhm Exp $ */
/* $NetBSD: in_pcb.h,v 1.14 1996/02/13 23:42:00 christos Exp $ */
/*
int in_pcballoc(struct socket *, struct inpcbtable *, int);
int in_pcbbind_locked(struct inpcb *, struct mbuf *, struct proc *);
int in_pcbbind(struct inpcb *, struct mbuf *, struct proc *);
-int in_pcbaddrisavail(struct inpcb *, struct sockaddr_in *, int,
+int in_pcbaddrisavail(const struct inpcb *, struct sockaddr_in *, int,
struct proc *);
int in_pcbconnect(struct inpcb *, struct mbuf *);
void in_pcbdetach(struct inpcb *);
struct inpcb *
in6_pcblookup_listen(struct inpcbtable *, struct in6_addr *, u_int,
struct mbuf *, u_int);
-int in6_pcbaddrisavail_lock(struct inpcb *, struct sockaddr_in6 *, int,
- struct proc *, int);
-int in6_pcbaddrisavail(struct inpcb *, struct sockaddr_in6 *, int,
+int in6_pcbaddrisavail_lock(const struct inpcb *, struct sockaddr_in6 *,
+ int, struct proc *, int);
+int in6_pcbaddrisavail(const struct inpcb *, struct sockaddr_in6 *, int,
struct proc *);
int in6_pcbconnect(struct inpcb *, struct mbuf *);
void in6_setsockaddr(struct inpcb *, struct mbuf *);
void in6_pcbnotify(struct inpcbtable *, struct sockaddr_in6 *,
u_int, const struct sockaddr_in6 *, u_int, u_int, int, void *,
void (*)(struct inpcb *, int));
-int in6_selecthlim(struct inpcb *);
+int in6_selecthlim(const struct inpcb *);
int in_pcbset_rtableid(struct inpcb *, u_int);
void in_pcbset_laddr(struct inpcb *, const struct sockaddr *, u_int);
void in_pcbunset_faddr(struct inpcb *);
-/* $OpenBSD: in6_pcb.c,v 1.131 2023/12/07 16:08:30 bluhm Exp $ */
+/* $OpenBSD: in6_pcb.c,v 1.132 2024/01/09 19:57:01 bluhm Exp $ */
/*
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
}
int
-in6_pcbaddrisavail_lock(struct inpcb *inp, struct sockaddr_in6 *sin6, int wild,
- struct proc *p, int lock)
+in6_pcbaddrisavail_lock(const struct inpcb *inp, struct sockaddr_in6 *sin6,
+ int wild, struct proc *p, int lock)
{
struct socket *so = inp->inp_socket;
struct inpcbtable *table = inp->inp_table;
}
int
-in6_pcbaddrisavail(struct inpcb *inp, struct sockaddr_in6 *sin6, int wild,
- struct proc *p)
+in6_pcbaddrisavail(const struct inpcb *inp, struct sockaddr_in6 *sin6,
+ int wild, struct proc *p)
{
return in6_pcbaddrisavail_lock(inp, sin6, wild, p, IN_PCBLOCK_GRAB);
}
-/* $OpenBSD: in6_src.c,v 1.90 2023/12/15 00:24:56 bluhm Exp $ */
+/* $OpenBSD: in6_src.c,v 1.91 2024/01/09 19:57:01 bluhm Exp $ */
/* $KAME: in6_src.c,v 1.36 2001/02/06 04:08:17 itojun Exp $ */
/*
}
int
-in6_selecthlim(struct inpcb *inp)
+in6_selecthlim(const struct inpcb *inp)
{
if (inp && inp->inp_hops >= 0)
return (inp->inp_hops);