summaryrefslogtreecommitdiffstats
path: root/sys/netinet
diff options
context:
space:
mode:
authorbz <bz@FreeBSD.org>2011-04-20 08:03:22 +0000
committerbz <bz@FreeBSD.org>2011-04-20 08:03:22 +0000
commitbbba6487bf30314239e6ccd61060407bdfc8d6d6 (patch)
tree6f9b219bacedfea91b1686d11373e5511f0463ae /sys/netinet
parent25cccaf492f9174346c2e76cb28eefd79c356c61 (diff)
downloadFreeBSD-src-bbba6487bf30314239e6ccd61060407bdfc8d6d6.zip
FreeBSD-src-bbba6487bf30314239e6ccd61060407bdfc8d6d6.tar.gz
MFp4 CH=191760:
When compiling out INET we still need the initialization routines as well as the tuning and montoring sysctls shared with IPv6. Move the two send/recvspace variables up from the middle of the file to ease compiling out the INET only code. Reviewed by: gnn Sponsored by: The FreeBSD Foundation Sponsored by: iXsystems MFC after: 3 days
Diffstat (limited to 'sys/netinet')
-rw-r--r--sys/netinet/raw_ip.c25
1 files changed, 17 insertions, 8 deletions
diff --git a/sys/netinet/raw_ip.c b/sys/netinet/raw_ip.c
index 6f33e20..2a4a722 100644
--- a/sys/netinet/raw_ip.c
+++ b/sys/netinet/raw_ip.c
@@ -33,6 +33,7 @@
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
+#include "opt_inet.h"
#include "opt_inet6.h"
#include "opt_ipsec.h"
@@ -93,6 +94,7 @@ void (*ip_divert_ptr)(struct mbuf *, int);
int (*ng_ipfw_input_p)(struct mbuf **, int,
struct ip_fw_args *, int);
+#ifdef INET
/*
* Hooks for multicast routing. They all default to NULL, so leave them not
* initialized and rely on BSS being set to 0.
@@ -118,6 +120,15 @@ u_long (*ip_mcast_src)(int);
void (*rsvp_input_p)(struct mbuf *m, int off);
int (*ip_rsvp_vif)(struct socket *, struct sockopt *);
void (*ip_rsvp_force_done)(struct socket *);
+#endif /* INET */
+
+u_long rip_sendspace = 9216;
+SYSCTL_ULONG(_net_inet_raw, OID_AUTO, maxdgram, CTLFLAG_RW,
+ &rip_sendspace, 0, "Maximum outgoing raw IP datagram size");
+
+u_long rip_recvspace = 9216;
+SYSCTL_ULONG(_net_inet_raw, OID_AUTO, recvspace, CTLFLAG_RW,
+ &rip_recvspace, 0, "Maximum space for incoming raw IP datagrams");
/*
* Hash functions
@@ -127,6 +138,7 @@ void (*ip_rsvp_force_done)(struct socket *);
#define INP_PCBHASH_RAW(proto, laddr, faddr, mask) \
(((proto) + (laddr) + (faddr)) % (mask) + 1)
+#ifdef INET
static void
rip_inshash(struct inpcb *inp)
{
@@ -157,6 +169,7 @@ rip_delhash(struct inpcb *inp)
LIST_REMOVE(inp, inp_hash);
}
+#endif /* INET */
/*
* Raw interface to IP protocol.
@@ -200,6 +213,7 @@ rip_destroy(void)
}
#endif
+#ifdef INET
static int
rip_append(struct inpcb *last, struct ip *ip, struct mbuf *n,
struct sockaddr_in *ripsrc)
@@ -748,14 +762,6 @@ rip_ctlinput(int cmd, struct sockaddr *sa, void *vip)
}
}
-u_long rip_sendspace = 9216;
-u_long rip_recvspace = 9216;
-
-SYSCTL_ULONG(_net_inet_raw, OID_AUTO, maxdgram, CTLFLAG_RW,
- &rip_sendspace, 0, "Maximum outgoing raw IP datagram size");
-SYSCTL_ULONG(_net_inet_raw, OID_AUTO, recvspace, CTLFLAG_RW,
- &rip_recvspace, 0, "Maximum space for incoming raw IP datagrams");
-
static int
rip_attach(struct socket *so, int proto, struct thread *td)
{
@@ -980,6 +986,7 @@ rip_send(struct socket *so, int flags, struct mbuf *m, struct sockaddr *nam,
}
return (rip_output(m, so, dst));
}
+#endif /* INET */
static int
rip_pcblist(SYSCTL_HANDLER_ARGS)
@@ -1086,6 +1093,7 @@ SYSCTL_PROC(_net_inet_raw, OID_AUTO/*XXX*/, pcblist,
CTLTYPE_OPAQUE | CTLFLAG_RD, NULL, 0,
rip_pcblist, "S,xinpcb", "List of active raw IP sockets");
+#ifdef INET
struct pr_usrreqs rip_usrreqs = {
.pru_abort = rip_abort,
.pru_attach = rip_attach,
@@ -1101,3 +1109,4 @@ struct pr_usrreqs rip_usrreqs = {
.pru_sosetlabel = in_pcbsosetlabel,
.pru_close = rip_close,
};
+#endif /* INET */
OpenPOWER on IntegriCloud