summaryrefslogtreecommitdiffstats
path: root/sys/netipx/ipx_ip.c
diff options
context:
space:
mode:
authorwollman <wollman@FreeBSD.org>1998-08-23 03:07:17 +0000
committerwollman <wollman@FreeBSD.org>1998-08-23 03:07:17 +0000
commita76fb5eefabdc9418c911bf0b61768d533c15cbd (patch)
tree02b1e59b8833c25c113cc2a72ebb74ec057423bb /sys/netipx/ipx_ip.c
parent3846bf0ec8c81eca47577791dff72e8b96928749 (diff)
downloadFreeBSD-src-a76fb5eefabdc9418c911bf0b61768d533c15cbd.zip
FreeBSD-src-a76fb5eefabdc9418c911bf0b61768d533c15cbd.tar.gz
Yow! Completely change the way socket options are handled, eliminating
another specialized mbuf type in the process. Also clean up some of the cruft surrounding IPFW, multicast routing, RSVP, and other ill-explored corners.
Diffstat (limited to 'sys/netipx/ipx_ip.c')
-rw-r--r--sys/netipx/ipx_ip.c26
1 files changed, 16 insertions, 10 deletions
diff --git a/sys/netipx/ipx_ip.c b/sys/netipx/ipx_ip.c
index 57e8b77..5b8b8aa 100644
--- a/sys/netipx/ipx_ip.c
+++ b/sys/netipx/ipx_ip.c
@@ -33,7 +33,7 @@
*
* @(#)ipx_ip.c
*
- * $Id: ipx_ip.c,v 1.20 1998/02/09 06:10:20 eivind Exp $
+ * $Id: ipx_ip.c,v 1.21 1998/06/07 17:12:19 dfr Exp $
*/
/*
@@ -316,17 +316,23 @@ struct ifnet *ifp;
static struct ifreq ifr_ipxip = {"ipxip0"};
int
-ipxip_route(so, m, p)
+ipxip_route(so, sopt)
struct socket *so;
- register struct mbuf *m;
- struct proc *p;
+ struct sockopt *sopt;
{
- register struct ipxip_req *rq = mtod(m, struct ipxip_req *);
- struct sockaddr_ipx *ipx_dst = (struct sockaddr_ipx *)&rq->rq_ipx;
- struct sockaddr_in *ip_dst = (struct sockaddr_in *)&rq->rq_ip;
- struct route ro;
+ int error;
struct ifnet_en *ifn;
struct sockaddr_in *src;
+ struct ipxip_req rq;
+ struct sockaddr_ipx *ipx_dst;
+ struct sockaddr_in *ip_dst;
+ struct route ro;
+
+ error = sooptcopyin(sopt, &rq, sizeof rq, sizeof rq);
+ if (error)
+ return (error);
+ ipx_dst = (struct sockaddr_ipx *)&rq.rq_ipx;
+ ip_dst = (struct sockaddr_in *)&rq.rq_ip;
/*
* First, make sure we already have an IPX address:
@@ -387,14 +393,14 @@ ipxip_route(so, m, p)
ifr_ipxip.ifr_name[4] = '0' + ipxipif.if_unit - 1;
ifr_ipxip.ifr_dstaddr = *(struct sockaddr *)ipx_dst;
ipx_control(so, (int)SIOCSIFDSTADDR, (caddr_t)&ifr_ipxip,
- (struct ifnet *)ifn, p);
+ (struct ifnet *)ifn, sopt->sopt_p);
/* use any of our addresses */
satoipx_addr(ifr_ipxip.ifr_addr).x_host =
ipx_ifaddr->ia_addr.sipx_addr.x_host;
return (ipx_control(so, (int)SIOCSIFADDR, (caddr_t)&ifr_ipxip,
- (struct ifnet *)ifn, p));
+ (struct ifnet *)ifn, sopt->sopt_p));
}
static int
OpenPOWER on IntegriCloud