diff options
author | andre <andre@FreeBSD.org> | 2005-11-18 20:12:40 +0000 |
---|---|---|
committer | andre <andre@FreeBSD.org> | 2005-11-18 20:12:40 +0000 |
commit | a6a209f2cc1f1d34f8b16c17f8cb345db2ecbe99 (patch) | |
tree | 2177105da5828491dd19a0aad0cf83477925d06f /sys/netinet/ip_var.h | |
parent | 50b1ba762b66c4f2056c0aa72e275ba857413419 (diff) | |
download | FreeBSD-src-a6a209f2cc1f1d34f8b16c17f8cb345db2ecbe99.zip FreeBSD-src-a6a209f2cc1f1d34f8b16c17f8cb345db2ecbe99.tar.gz |
Consolidate all IP Options handling functions into ip_options.[ch] and
include ip_options.h into all files making use of IP Options functions.
From ip_input.c rev 1.306:
ip_dooptions(struct mbuf *m, int pass)
save_rte(m, option, dst)
ip_srcroute(m0)
ip_stripoptions(m, mopt)
From ip_output.c rev 1.249:
ip_insertoptions(m, opt, phlen)
ip_optcopy(ip, jp)
ip_pcbopts(struct inpcb *inp, int optname, struct mbuf *m)
No functional changes in this commit.
Discussed with: rwatson
Sponsored by: TCP/IP Optimization Fundraise 2005
Diffstat (limited to 'sys/netinet/ip_var.h')
-rw-r--r-- | sys/netinet/ip_var.h | 18 |
1 files changed, 1 insertions, 17 deletions
diff --git a/sys/netinet/ip_var.h b/sys/netinet/ip_var.h index e64570b..49a6f9a 100644 --- a/sys/netinet/ip_var.h +++ b/sys/netinet/ip_var.h @@ -66,19 +66,6 @@ struct ipq { #endif /* _KERNEL */ /* - * Structure stored in mbuf in inpcb.ip_options - * and passed to ip_output when ip options are in use. - * The actual length of the options (including ipopt_dst) - * is in m_len. - */ -#define MAX_IPOPTLEN 40 - -struct ipoption { - struct in_addr ipopt_dst; /* first-hop dst if source routed */ - char ipopt_list[MAX_IPOPTLEN]; /* options proper */ -}; - -/* * Structure attached to inpcb.ip_moptions and * passed to ip_output when IP multicast options are in use. */ @@ -151,7 +138,6 @@ extern struct ipstat ipstat; extern u_short ip_id; /* ip packet ctr, for ids */ extern int ip_defttl; /* default IP ttl */ extern int ipforwarding; /* ip forwarding */ -extern int ip_doopts; /* process or ignore IP options */ #ifdef IPSTEALTH extern int ipstealth; /* stealth forwarding */ #endif @@ -169,6 +155,7 @@ void ip_fini(void *xtp); int ip_fragment(struct ip *ip, struct mbuf **m_frag, int mtu, u_long if_hwassist_flags, int sw_csum); void ip_freemoptions(struct ip_moptions *); +void ip_forward(struct mbuf *m, int srcrt); void ip_init(void); extern int (*ip_mforward)(struct ip *, struct ifnet *, struct mbuf *, struct ip_moptions *); @@ -184,9 +171,6 @@ struct in_ifaddr * void ip_savecontrol(struct inpcb *, struct mbuf **, struct ip *, struct mbuf *); void ip_slowtimo(void); -struct mbuf * - ip_srcroute(struct mbuf *); -void ip_stripoptions(struct mbuf *, struct mbuf *); u_int16_t ip_randomid(void); int rip_ctloutput(struct socket *, struct sockopt *); void rip_ctlinput(int, struct sockaddr *, void *); |