Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/netinet6 inpcb: rename functions to in6pcb_*



details:   https://anonhg.NetBSD.org/src/rev/a9114c9e5748
branches:  trunk
changeset: 372252:a9114c9e5748
user:      ozaki-r <ozaki-r%NetBSD.org@localhost>
date:      Fri Nov 04 09:01:53 2022 +0000

description:
inpcb: rename functions to in6pcb_*

diffstat:

 sys/dist/pf/net/pf.c        |   8 ++--
 sys/netinet/dccp_usrreq.c   |  18 ++++++------
 sys/netinet/in_pcb.c        |  10 +++---
 sys/netinet/in_pcb.h        |  42 ++++++++++++++--------------
 sys/netinet/portalgo.c      |  10 +++---
 sys/netinet/sctp_output.c   |   6 ++--
 sys/netinet/tcp_input.c     |  12 ++++----
 sys/netinet/tcp_output.c    |   8 ++--
 sys/netinet/tcp_subr.c      |  34 +++++++++++-----------
 sys/netinet/tcp_syncache.c  |   8 ++--
 sys/netinet/tcp_usrreq.c    |  26 ++++++++--------
 sys/netinet6/dccp6_usrreq.c |  18 ++++++------
 sys/netinet6/in6_pcb.c      |  66 ++++++++++++++++++++++----------------------
 sys/netinet6/in6_src.c      |  18 ++++++------
 sys/netinet6/raw_ip6.c      |  28 +++++++++---------
 sys/netinet6/sctp6_usrreq.c |   6 ++--
 sys/netinet6/udp6_usrreq.c  |  46 +++++++++++++++---------------
 17 files changed, 182 insertions(+), 182 deletions(-)

diffs (truncated from 1412 to 300 lines):

diff -r 8f00a996d175 -r a9114c9e5748 sys/dist/pf/net/pf.c
--- a/sys/dist/pf/net/pf.c      Fri Nov 04 09:00:58 2022 +0000
+++ b/sys/dist/pf/net/pf.c      Fri Nov 04 09:01:53 2022 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pf.c,v 1.86 2022/11/04 09:00:58 ozaki-r Exp $  */
+/*     $NetBSD: pf.c,v 1.87 2022/11/04 09:01:53 ozaki-r Exp $  */
 /*     $OpenBSD: pf.c,v 1.552.2.1 2007/11/27 16:37:57 henning Exp $ */
 
 /*
@@ -37,7 +37,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pf.c,v 1.86 2022/11/04 09:00:58 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pf.c,v 1.87 2022/11/04 09:01:53 ozaki-r Exp $");
 
 #include "pflog.h"
 
@@ -2802,11 +2802,11 @@
 #define in_pcbhashlookup(tbl, saddr, sport, daddr, dport) \
     inpcb_lookup(tbl, saddr, sport, daddr, dport, NULL)
 #define in6_pcbhashlookup(tbl, saddr, sport, daddr, dport) \
-    in6_pcblookup_connect(tbl, saddr, sport, daddr, dport, 0, NULL)
+    in6pcb_lookup(tbl, saddr, sport, daddr, dport, 0, NULL)
 #define in_pcblookup_listen(tbl, addr, port, zero) \
     inpcb_lookup_bound(tbl, addr, port)
 #define in6_pcblookup_listen(tbl, addr, port, zero) \
-    in6_pcblookup_bind(tbl, addr, port, zero)
+    in6pcb_lookup_bound(tbl, addr, port, zero)
 #endif
        
 #ifdef INET
diff -r 8f00a996d175 -r a9114c9e5748 sys/netinet/dccp_usrreq.c
--- a/sys/netinet/dccp_usrreq.c Fri Nov 04 09:00:58 2022 +0000
+++ b/sys/netinet/dccp_usrreq.c Fri Nov 04 09:01:53 2022 +0000
@@ -1,5 +1,5 @@
 /*     $KAME: dccp_usrreq.c,v 1.67 2005/11/03 16:05:04 nishida Exp $   */
-/*     $NetBSD: dccp_usrreq.c,v 1.25 2022/11/04 09:00:58 ozaki-r Exp $ */
+/*     $NetBSD: dccp_usrreq.c,v 1.26 2022/11/04 09:01:53 ozaki-r Exp $ */
 
 /*
  * Copyright (c) 2003 Joacim Häggmark, Magnus Erixzon, Nils-Erik Mattsson 
@@ -67,7 +67,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: dccp_usrreq.c,v 1.25 2022/11/04 09:00:58 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: dccp_usrreq.c,v 1.26 2022/11/04 09:01:53 ozaki-r Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -337,11 +337,11 @@
         */
 #ifdef INET6
        if (isipv6) {
-               inp = in6_pcblookup_connect(&dccpbtable, &ip6->ip6_src,
+               inp = in6pcb_lookup(&dccpbtable, &ip6->ip6_src,
                    dh->dh_sport, &ip6->ip6_dst, dh->dh_dport, 0, 0);
                if (inp == NULL) {
                        /* XXX stats increment? */
-                       inp = in6_pcblookup_bind(&dccpbtable, &ip6->ip6_dst,
+                       inp = in6pcb_lookup_bound(&dccpbtable, &ip6->ip6_dst,
                            dh->dh_dport, 0);
                }
        } else
@@ -1779,8 +1779,8 @@
        if (inp->inp_lport == 0) {
 #ifdef INET6
                if (isipv6) {
-                       DCCP_DEBUG((LOG_INFO, "Running in6_pcbbind!\n"));
-                       error = in6_pcbbind(inp, NULL, l);
+                       DCCP_DEBUG((LOG_INFO, "Running in6pcb_bind!\n"));
+                       error = in6pcb_bind(inp, NULL, l);
                } else
 #endif /* INET6 */
                {
@@ -1794,8 +1794,8 @@
 
 #ifdef INET6
        if (isipv6) {
-               error = in6_pcbconnect(inp, (struct sockaddr_in6 *)nam, l);
-               DCCP_DEBUG((LOG_INFO, "in6_pcbconnect=%d\n",error));
+               error = in6pcb_connect(inp, (struct sockaddr_in6 *)nam, l);
+               DCCP_DEBUG((LOG_INFO, "in6pcb_connect=%d\n",error));
        } else
 #endif
                error = inpcb_connect(inp, (struct sockaddr_in *)nam, l);
@@ -2133,7 +2133,7 @@
                in4p_ip(inp).ip_ttl = ip_defttl;
                break;
        case PF_INET6:
-               in6p_ip6(inp).ip6_hlim = in6_selecthlim_rt(inp);
+               in6p_ip6(inp).ip6_hlim = in6pcb_selecthlim_rt(inp);
                break;
        }
        
diff -r 8f00a996d175 -r a9114c9e5748 sys/netinet/in_pcb.c
--- a/sys/netinet/in_pcb.c      Fri Nov 04 09:00:58 2022 +0000
+++ b/sys/netinet/in_pcb.c      Fri Nov 04 09:01:53 2022 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: in_pcb.c,v 1.195 2022/11/04 09:00:58 ozaki-r Exp $     */
+/*     $NetBSD: in_pcb.c,v 1.196 2022/11/04 09:01:53 ozaki-r Exp $     */
 
 /*
  * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -93,7 +93,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: in_pcb.c,v 1.195 2022/11/04 09:00:58 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: in_pcb.c,v 1.196 2022/11/04 09:01:53 ozaki-r Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -405,7 +405,7 @@
 
 #ifdef INET6
                in6_in_2_v4mapin6(&sin->sin_addr, &mapped);
-               t6 = in6_pcblookup_port(table, &mapped, sin->sin_port, wild, &vestige);
+               t6 = in6pcb_lookup_local(table, &mapped, sin->sin_port, wild, &vestige);
                if (t6 && (reuseport & t6->inp_socket->so_options) == 0)
                        return (EADDRINUSE);
                if (!t6 && vestige.valid) {
@@ -1119,7 +1119,7 @@
 
 #ifdef INET6
        if (inp->inp_af == AF_INET6) {
-               in6_pcbstate(inp, state);
+               in6pcb_set_state(inp, state);
                return;
        }
 #else
@@ -1158,7 +1158,7 @@
 
 #ifdef INET6
        if (inp->inp_af == AF_INET6)
-               return in6_pcbrtentry(inp);
+               return in6pcb_rtentry(inp);
 #endif
        if (inp->inp_af != AF_INET)
                return (NULL);
diff -r 8f00a996d175 -r a9114c9e5748 sys/netinet/in_pcb.h
--- a/sys/netinet/in_pcb.h      Fri Nov 04 09:00:58 2022 +0000
+++ b/sys/netinet/in_pcb.h      Fri Nov 04 09:01:53 2022 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: in_pcb.h,v 1.74 2022/11/04 09:00:58 ozaki-r Exp $      */
+/*     $NetBSD: in_pcb.h,v 1.75 2022/11/04 09:01:53 ozaki-r Exp $      */
 
 /*
  * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -284,36 +284,36 @@
        inpcb_rtentry(struct inpcb *);
 void   inpcb_rtentry_unref(struct rtentry *, struct inpcb *);
 
-void   in6_pcbinit(struct inpcbtable *, int, int);
-int    in6_pcbbind(void *, struct sockaddr_in6 *, struct lwp *);
-int    in6_pcbconnect(void *, struct sockaddr_in6 *, struct lwp *);
-void   in6_pcbdetach(struct inpcb *);
-void   in6_pcbdisconnect(struct inpcb *);
-struct inpcb *in6_pcblookup_port(struct inpcbtable *, struct in6_addr *,
+void   in6pcb_init(struct inpcbtable *, int, int);
+int    in6pcb_bind(void *, struct sockaddr_in6 *, struct lwp *);
+int    in6pcb_connect(void *, struct sockaddr_in6 *, struct lwp *);
+void   in6pcb_destroy(struct inpcb *);
+void   in6pcb_disconnect(struct inpcb *);
+struct inpcb *in6pcb_lookup_local(struct inpcbtable *, struct in6_addr *,
                                   u_int, int, struct vestigial_inpcb *);
-int    in6_pcbnotify(struct inpcbtable *, const struct sockaddr *,
+int    in6pcb_notify(struct inpcbtable *, const struct sockaddr *,
        u_int, const struct sockaddr *, u_int, int, void *,
        void (*)(struct inpcb *, int));
-void   in6_pcbpurgeif0(struct inpcbtable *, struct ifnet *);
-void   in6_pcbpurgeif(struct inpcbtable *, struct ifnet *);
-void   in6_pcbstate(struct inpcb *, int);
-void   in6_rtchange(struct inpcb *, int);
-void   in6_setpeeraddr(struct inpcb *, struct sockaddr_in6 *);
-void   in6_setsockaddr(struct inpcb *, struct sockaddr_in6 *);
+void   in6pcb_purgeif0(struct inpcbtable *, struct ifnet *);
+void   in6pcb_purgeif(struct inpcbtable *, struct ifnet *);
+void   in6pcb_set_state(struct inpcb *, int);
+void   in6pcb_rtchange(struct inpcb *, int);
+void   in6pcb_fetch_peeraddr(struct inpcb *, struct sockaddr_in6 *);
+void   in6pcb_fetch_sockaddr(struct inpcb *, struct sockaddr_in6 *);
 
 /* in in6_src.c */
-int    in6_selecthlim(struct inpcb *, struct ifnet *);
-int    in6_selecthlim_rt(struct inpcb *);
-int    in6_pcbsetport(struct sockaddr_in6 *, struct inpcb *, struct lwp *);
+int    in6pcb_selecthlim(struct inpcb *, struct ifnet *);
+int    in6pcb_selecthlim_rt(struct inpcb *);
+int    in6pcb_set_port(struct sockaddr_in6 *, struct inpcb *, struct lwp *);
 
 extern struct rtentry *
-       in6_pcbrtentry(struct inpcb *);
+       in6pcb_rtentry(struct inpcb *);
 extern void
-       in6_pcbrtentry_unref(struct rtentry *, struct inpcb *);
-extern struct inpcb *in6_pcblookup_connect(struct inpcbtable *,
+       in6pcb_rtentry_unref(struct rtentry *, struct inpcb *);
+extern struct inpcb *in6pcb_lookup(struct inpcbtable *,
                                            const struct in6_addr *, u_int, const struct in6_addr *, u_int, int,
                                            struct vestigial_inpcb *);
-extern struct inpcb *in6_pcblookup_bind(struct inpcbtable *,
+extern struct inpcb *in6pcb_lookup_bound(struct inpcbtable *,
        const struct in6_addr *, u_int, int);
 
 static inline void
diff -r 8f00a996d175 -r a9114c9e5748 sys/netinet/portalgo.c
--- a/sys/netinet/portalgo.c    Fri Nov 04 09:00:58 2022 +0000
+++ b/sys/netinet/portalgo.c    Fri Nov 04 09:01:53 2022 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: portalgo.c,v 1.14 2022/11/04 09:00:58 ozaki-r Exp $    */
+/*     $NetBSD: portalgo.c,v 1.15 2022/11/04 09:01:53 ozaki-r Exp $    */
 
 /*
  * Copyright 2011 Vlad Balan
@@ -34,7 +34,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: portalgo.c,v 1.14 2022/11/04 09:00:58 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: portalgo.c,v 1.15 2022/11/04 09:01:53 ozaki-r Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -307,7 +307,7 @@
                sin6.sin6_addr = in6p_laddr(inp);
                so = inp->inp_socket;
 
-               /* XXX: this is redundant when called from in6_pcbbind */
+               /* XXX: this is redundant when called from in6pcb_bind */
                if ((so->so_options & (SO_REUSEADDR|SO_REUSEPORT)) == 0 &&
                    ((so->so_proto->pr_flags & PR_CONNREQUIRED) == 0 ||
                        (so->so_options & SO_ACCEPTCONN) == 0))
@@ -326,10 +326,10 @@
                } else
 #endif
                {
-                       t = in6_pcblookup_port(table, &sin6.sin6_addr,
+                       t = in6pcb_lookup_local(table, &sin6.sin6_addr,
                            htons(port), wild, &vestigial);
                        if (!t && vestigial.valid) {
-                               DPRINTF("%s in6_pcblookup_port returned "
+                               DPRINTF("%s in6pcb_lookup_local returned "
                                    "a result\n", __func__);
                                return false;
                        }
diff -r 8f00a996d175 -r a9114c9e5748 sys/netinet/sctp_output.c
--- a/sys/netinet/sctp_output.c Fri Nov 04 09:00:58 2022 +0000
+++ b/sys/netinet/sctp_output.c Fri Nov 04 09:01:53 2022 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: sctp_output.c,v 1.32 2022/10/28 05:26:29 ozaki-r Exp $ */
+/*     $NetBSD: sctp_output.c,v 1.33 2022/11/04 09:01:53 ozaki-r Exp $ */
 /*     $KAME: sctp_output.c,v 1.48 2005/06/16 18:29:24 jinmei Exp $    */
 
 /*
@@ -30,7 +30,7 @@
  * SUCH DAMAGE.
  */
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sctp_output.c,v 1.32 2022/10/28 05:26:29 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sctp_output.c,v 1.33 2022/11/04 09:01:53 ozaki-r Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_ipsec.h"
@@ -2416,7 +2416,7 @@
                 * We set the hop limit now since there is a good chance that
                 * our ro pointer is now filled
                 */
-               ip6h->ip6_hlim = in6_selecthlim(&inp->ip_inp.inp,
+               ip6h->ip6_hlim = in6pcb_selecthlim(&inp->ip_inp.inp,
                                                (ro ?
                                                 (rt ? (rt->rt_ifp) : (NULL)) :
                                                 (NULL)));
diff -r 8f00a996d175 -r a9114c9e5748 sys/netinet/tcp_input.c
--- a/sys/netinet/tcp_input.c   Fri Nov 04 09:00:58 2022 +0000
+++ b/sys/netinet/tcp_input.c   Fri Nov 04 09:01:53 2022 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: tcp_input.c,v 1.437 2022/11/04 09:00:58 ozaki-r Exp $  */
+/*     $NetBSD: tcp_input.c,v 1.438 2022/11/04 09:01:53 ozaki-r Exp $  */
 
 /*
  * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -138,7 +138,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: tcp_input.c,v 1.437 2022/11/04 09:00:58 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tcp_input.c,v 1.438 2022/11/04 09:01:53 ozaki-r Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -1381,11 +1381,11 @@
                        /* mapped addr case */
                        in6_in_2_v4mapin6(&ip->ip_src, &s);
                        in6_in_2_v4mapin6(&ip->ip_dst, &d);
-                       inp = in6_pcblookup_connect(&tcbtable, &s,
+                       inp = in6pcb_lookup(&tcbtable, &s,
                            th->th_sport, &d, th->th_dport, 0, &vestige);
                        if (inp == NULL && !vestige.valid) {



Home | Main Index | Thread Index | Old Index