summaryrefslogtreecommitdiffstats
path: root/sys/netipx
diff options
context:
space:
mode:
authorrwatson <rwatson@FreeBSD.org>2007-05-11 10:20:51 +0000
committerrwatson <rwatson@FreeBSD.org>2007-05-11 10:20:51 +0000
commit47d37a80be0931ad72e67db6ba915221afdfeb4f (patch)
tree830d52c0a835e86532d14a328bcdb1121e33e37a /sys/netipx
parent46a4c44c3b39d3c635f686c57785c0dd7511f2b6 (diff)
downloadFreeBSD-src-47d37a80be0931ad72e67db6ba915221afdfeb4f.zip
FreeBSD-src-47d37a80be0931ad72e67db6ba915221afdfeb4f.tar.gz
Reduce network stack oddness: implement .pru_sockaddr and .pru_peeraddr
protocol entry points using functions named proto_getsockaddr and proto_getpeeraddr rather than proto_setsockaddr and proto_setpeeraddr. While it's true that sockaddrs are allocated and set, the net effect is to retrieve (get) the socket address or peer address from a socket, not set it, so align names to that intent.
Diffstat (limited to 'sys/netipx')
-rw-r--r--sys/netipx/ipx_pcb.c4
-rw-r--r--sys/netipx/ipx_pcb.h4
-rw-r--r--sys/netipx/ipx_usrreq.c4
3 files changed, 6 insertions, 6 deletions
diff --git a/sys/netipx/ipx_pcb.c b/sys/netipx/ipx_pcb.c
index 39663f6..c6cfd2a 100644
--- a/sys/netipx/ipx_pcb.c
+++ b/sys/netipx/ipx_pcb.c
@@ -333,7 +333,7 @@ ipx_pcbfree(ipxp)
}
void
-ipx_setsockaddr(ipxp, nam)
+ipx_getsockaddr(ipxp, nam)
register struct ipxpcb *ipxp;
struct sockaddr **nam;
{
@@ -350,7 +350,7 @@ ipx_setsockaddr(ipxp, nam)
}
void
-ipx_setpeeraddr(ipxp, nam)
+ipx_getpeeraddr(ipxp, nam)
register struct ipxpcb *ipxp;
struct sockaddr **nam;
{
diff --git a/sys/netipx/ipx_pcb.h b/sys/netipx/ipx_pcb.h
index 755eb5a..5b5921e 100644
--- a/sys/netipx/ipx_pcb.h
+++ b/sys/netipx/ipx_pcb.h
@@ -131,8 +131,8 @@ void ipx_pcbdisconnect(struct ipxpcb *ipxp);
void ipx_pcbfree(struct ipxpcb *ipxp);
struct ipxpcb *
ipx_pcblookup(struct ipx_addr *faddr, int lport, int wildp);
-void ipx_setpeeraddr(struct ipxpcb *ipxp, struct sockaddr **nam);
-void ipx_setsockaddr(struct ipxpcb *ipxp, struct sockaddr **nam);
+void ipx_getpeeraddr(struct ipxpcb *ipxp, struct sockaddr **nam);
+void ipx_getsockaddr(struct ipxpcb *ipxp, struct sockaddr **nam);
#define IPX_LIST_LOCK_INIT() mtx_init(&ipxpcb_list_mtx, "ipx_list_mtx", \
NULL, MTX_DEF | MTX_RECURSE)
diff --git a/sys/netipx/ipx_usrreq.c b/sys/netipx/ipx_usrreq.c
index 2ee7e94..ad60f4b 100644
--- a/sys/netipx/ipx_usrreq.c
+++ b/sys/netipx/ipx_usrreq.c
@@ -586,7 +586,7 @@ ipx_peeraddr(so, nam)
struct ipxpcb *ipxp = sotoipxpcb(so);
KASSERT(ipxp != NULL, ("ipx_peeraddr: ipxp == NULL"));
- ipx_setpeeraddr(ipxp, nam);
+ ipx_getpeeraddr(ipxp, nam);
return (0);
}
@@ -671,7 +671,7 @@ ipx_sockaddr(so, nam)
struct ipxpcb *ipxp = sotoipxpcb(so);
KASSERT(ipxp != NULL, ("ipx_sockaddr: ipxp == NULL"));
- ipx_setsockaddr(ipxp, nam);
+ ipx_getsockaddr(ipxp, nam);
return (0);
}
OpenPOWER on IntegriCloud