ip_var.h (129017) | ip_var.h (133720) |
---|---|
1/* 2 * Copyright (c) 1982, 1986, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 13 unchanged lines hidden (view full) --- 22 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 * SUCH DAMAGE. 28 * 29 * @(#)ip_var.h 8.2 (Berkeley) 1/9/95 | 1/* 2 * Copyright (c) 1982, 1986, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 13 unchanged lines hidden (view full) --- 22 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 * SUCH DAMAGE. 28 * 29 * @(#)ip_var.h 8.2 (Berkeley) 1/9/95 |
30 * $FreeBSD: head/sys/netinet/ip_var.h 129017 2004-05-06 18:46:03Z andre $ | 30 * $FreeBSD: head/sys/netinet/ip_var.h 133720 2004-08-14 15:32:40Z dwmalone $ |
31 */ 32 33#ifndef _NETINET_IP_VAR_H_ 34#define _NETINET_IP_VAR_H_ 35 36#include <sys/queue.h> 37 38/* --- 98 unchanged lines hidden (view full) --- 137#define M_FASTFWD_OURS M_PROTO1 /* changed dst to local */ 138 139struct ip; 140struct inpcb; 141struct route; 142struct sockopt; 143 144extern struct ipstat ipstat; | 31 */ 32 33#ifndef _NETINET_IP_VAR_H_ 34#define _NETINET_IP_VAR_H_ 35 36#include <sys/queue.h> 37 38/* --- 98 unchanged lines hidden (view full) --- 137#define M_FASTFWD_OURS M_PROTO1 /* changed dst to local */ 138 139struct ip; 140struct inpcb; 141struct route; 142struct sockopt; 143 144extern struct ipstat ipstat; |
145#ifndef RANDOM_IP_ID | |
146extern u_short ip_id; /* ip packet ctr, for ids */ | 145extern u_short ip_id; /* ip packet ctr, for ids */ |
147#endif | |
148extern int ip_defttl; /* default IP ttl */ 149extern int ipforwarding; /* ip forwarding */ 150extern int ip_doopts; /* process or ignore IP options */ 151#ifdef IPSTEALTH 152extern int ipstealth; /* stealth forwarding */ 153#endif 154extern u_char ip_protox[]; 155extern struct socket *ip_rsvpd; /* reservation protocol daemon */ --- 17 unchanged lines hidden (view full) --- 173struct in_ifaddr * 174 ip_rtaddr(struct in_addr); 175void ip_savecontrol(struct inpcb *, struct mbuf **, struct ip *, 176 struct mbuf *); 177void ip_slowtimo(void); 178struct mbuf * 179 ip_srcroute(void); 180void ip_stripoptions(struct mbuf *, struct mbuf *); | 146extern int ip_defttl; /* default IP ttl */ 147extern int ipforwarding; /* ip forwarding */ 148extern int ip_doopts; /* process or ignore IP options */ 149#ifdef IPSTEALTH 150extern int ipstealth; /* stealth forwarding */ 151#endif 152extern u_char ip_protox[]; 153extern struct socket *ip_rsvpd; /* reservation protocol daemon */ --- 17 unchanged lines hidden (view full) --- 171struct in_ifaddr * 172 ip_rtaddr(struct in_addr); 173void ip_savecontrol(struct inpcb *, struct mbuf **, struct ip *, 174 struct mbuf *); 175void ip_slowtimo(void); 176struct mbuf * 177 ip_srcroute(void); 178void ip_stripoptions(struct mbuf *, struct mbuf *); |
181#ifdef RANDOM_IP_ID 182u_int16_t 183 ip_randomid(void); 184#endif | 179u_int16_t ip_randomid(void); |
185int rip_ctloutput(struct socket *, struct sockopt *); 186void rip_ctlinput(int, struct sockaddr *, void *); 187void rip_init(void); 188void rip_input(struct mbuf *, int); 189int rip_output(struct mbuf *, struct socket *, u_long); 190void ipip_input(struct mbuf *, int); 191void rsvp_input(struct mbuf *, int); 192int ip_rsvp_init(struct socket *); 193int ip_rsvp_done(void); 194extern int (*ip_rsvp_vif)(struct socket *, struct sockopt *); 195extern void (*ip_rsvp_force_done)(struct socket *); 196extern void (*rsvp_input_p)(struct mbuf *m, int off); 197 198#ifdef PFIL_HOOKS 199extern struct pfil_head inet_pfil_hook; 200#endif 201 202void in_delayed_cksum(struct mbuf *m); 203 | 180int rip_ctloutput(struct socket *, struct sockopt *); 181void rip_ctlinput(int, struct sockaddr *, void *); 182void rip_init(void); 183void rip_input(struct mbuf *, int); 184int rip_output(struct mbuf *, struct socket *, u_long); 185void ipip_input(struct mbuf *, int); 186void rsvp_input(struct mbuf *, int); 187int ip_rsvp_init(struct socket *); 188int ip_rsvp_done(void); 189extern int (*ip_rsvp_vif)(struct socket *, struct sockopt *); 190extern void (*ip_rsvp_force_done)(struct socket *); 191extern void (*rsvp_input_p)(struct mbuf *m, int off); 192 193#ifdef PFIL_HOOKS 194extern struct pfil_head inet_pfil_hook; 195#endif 196 197void in_delayed_cksum(struct mbuf *m); 198 |
199static __inline uint16_t ip_newid(void); 200extern int ip_do_randomid; 201 202static __inline uint16_t 203ip_newid(void) 204{ 205 if (ip_do_randomid) 206 return ip_randomid(); 207 208 return htons(ip_id++); 209} 210 |
|
204#endif /* _KERNEL */ 205 206#endif /* !_NETINET_IP_VAR_H_ */ | 211#endif /* _KERNEL */ 212 213#endif /* !_NETINET_IP_VAR_H_ */ |