summaryrefslogtreecommitdiff
path: root/sys/netinet
diff options
context:
space:
mode:
authorAlexander Bluhm <bluhm@cvs.openbsd.org>2024-01-09 19:57:02 +0000
committerAlexander Bluhm <bluhm@cvs.openbsd.org>2024-01-09 19:57:02 +0000
commit333d11d91a0e9097fecc7fb5a3ecfb05d4d494be (patch)
treefa28633ed5eaf6544f15b1ba1b7f101e29e42711 /sys/netinet
parent953cfb08251588786a3fea82fb50bf2ec40e7c39 (diff)
Convert some struct inpcb parameter to const pointer.
OK millert@
Diffstat (limited to 'sys/netinet')
-rw-r--r--sys/netinet/in_pcb.c14
-rw-r--r--sys/netinet/in_pcb.h12
2 files changed, 13 insertions, 13 deletions
diff --git a/sys/netinet/in_pcb.c b/sys/netinet/in_pcb.c
index 1d40a0c2d3e..5ac1e8d0a89 100644
--- a/sys/netinet/in_pcb.c
+++ b/sys/netinet/in_pcb.c
@@ -1,4 +1,4 @@
-/* $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 $ */
/*
@@ -133,7 +133,7 @@ uint64_t in_pcblhash(struct inpcbtable *, u_int, u_short);
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 *);
@@ -365,8 +365,8 @@ in_pcbbind(struct inpcb *inp, struct mbuf *nam, struct proc *p)
}
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;
@@ -436,8 +436,8 @@ in_pcbaddrisavail_lock(struct inpcb *inp, struct sockaddr_in *sin, int wild,
}
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);
}
@@ -962,7 +962,7 @@ in_pcbselsrc(struct in_addr *insrc, struct sockaddr_in *sin,
{
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;
diff --git a/sys/netinet/in_pcb.h b/sys/netinet/in_pcb.h
index 7f976d76eef..a98de28ed01 100644
--- a/sys/netinet/in_pcb.h
+++ b/sys/netinet/in_pcb.h
@@ -1,4 +1,4 @@
-/* $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 $ */
/*
@@ -315,7 +315,7 @@ void in_losing(struct inpcb *);
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 *);
@@ -338,9 +338,9 @@ 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 *);
@@ -370,7 +370,7 @@ struct rtentry *
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 *);