Deleted Added
full compact
ip_var.h (125952) ip_var.h (126239)
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

--- 17 unchanged lines hidden (view full) ---

26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31 * SUCH DAMAGE.
32 *
33 * @(#)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

--- 17 unchanged lines hidden (view full) ---

26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31 * SUCH DAMAGE.
32 *
33 * @(#)ip_var.h 8.2 (Berkeley) 1/9/95
34 * $FreeBSD: head/sys/netinet/ip_var.h 125952 2004-02-18 00:04:52Z mlaier $
34 * $FreeBSD: head/sys/netinet/ip_var.h 126239 2004-02-25 19:55:29Z mlaier $
35 */
36
37#ifndef _NETINET_IP_VAR_H_
38#define _NETINET_IP_VAR_H_
39
40#include <sys/queue.h>
41
42/*

--- 17 unchanged lines hidden (view full) ---

60struct ipq {
61 TAILQ_ENTRY(ipq) ipq_list; /* to other reass headers */
62 u_char ipq_ttl; /* time for reass q to live */
63 u_char ipq_p; /* protocol of this fragment */
64 u_short ipq_id; /* sequence id for reassembly */
65 struct mbuf *ipq_frags; /* to ip headers of fragments */
66 struct in_addr ipq_src,ipq_dst;
67 u_char ipq_nfrags; /* # frags in this packet */
35 */
36
37#ifndef _NETINET_IP_VAR_H_
38#define _NETINET_IP_VAR_H_
39
40#include <sys/queue.h>
41
42/*

--- 17 unchanged lines hidden (view full) ---

60struct ipq {
61 TAILQ_ENTRY(ipq) ipq_list; /* to other reass headers */
62 u_char ipq_ttl; /* time for reass q to live */
63 u_char ipq_p; /* protocol of this fragment */
64 u_short ipq_id; /* sequence id for reassembly */
65 struct mbuf *ipq_frags; /* to ip headers of fragments */
66 struct in_addr ipq_src,ipq_dst;
67 u_char ipq_nfrags; /* # frags in this packet */
68 u_int32_t ipq_div_info; /* ipfw divert port & flags */
69 u_int16_t ipq_div_cookie; /* ipfw divert cookie */
70 struct label *ipq_label; /* MAC label */
71};
72#endif /* _KERNEL */
73
74/*
75 * Structure stored in mbuf in inpcb.ip_options
76 * and passed to ip_output when ip options are in use.
77 * The actual length of the options (including ipopt_dst)

--- 56 unchanged lines hidden (view full) ---

134
135/* flags passed to ip_output as last parameter */
136#define IP_FORWARDING 0x1 /* most of ip header exists */
137#define IP_RAWOUTPUT 0x2 /* raw ip header exists */
138#define IP_SENDONES 0x4 /* send all-ones broadcast */
139#define IP_ROUTETOIF SO_DONTROUTE /* bypass routing tables */
140#define IP_ALLOWBROADCAST SO_BROADCAST /* can send broadcast packets */
141
68 struct label *ipq_label; /* MAC label */
69};
70#endif /* _KERNEL */
71
72/*
73 * Structure stored in mbuf in inpcb.ip_options
74 * and passed to ip_output when ip options are in use.
75 * The actual length of the options (including ipopt_dst)

--- 56 unchanged lines hidden (view full) ---

132
133/* flags passed to ip_output as last parameter */
134#define IP_FORWARDING 0x1 /* most of ip header exists */
135#define IP_RAWOUTPUT 0x2 /* raw ip header exists */
136#define IP_SENDONES 0x4 /* send all-ones broadcast */
137#define IP_ROUTETOIF SO_DONTROUTE /* bypass routing tables */
138#define IP_ALLOWBROADCAST SO_BROADCAST /* can send broadcast packets */
139
140/* mbuf flag used by ip_fastfwd */
141#define M_FASTFWD_OURS M_PROTO1 /* changed dst to local */
142
142struct ip;
143struct inpcb;
144struct route;
145struct sockopt;
146
147extern struct ipstat ipstat;
148#ifndef RANDOM_IP_ID
149extern u_short ip_id; /* ip packet ctr, for ids */

--- 42 unchanged lines hidden (view full) ---

192void ipip_input(struct mbuf *, int);
193void rsvp_input(struct mbuf *, int);
194int ip_rsvp_init(struct socket *);
195int ip_rsvp_done(void);
196extern int (*ip_rsvp_vif)(struct socket *, struct sockopt *);
197extern void (*ip_rsvp_force_done)(struct socket *);
198extern void (*rsvp_input_p)(struct mbuf *m, int off);
199
143struct ip;
144struct inpcb;
145struct route;
146struct sockopt;
147
148extern struct ipstat ipstat;
149#ifndef RANDOM_IP_ID
150extern u_short ip_id; /* ip packet ctr, for ids */

--- 42 unchanged lines hidden (view full) ---

193void ipip_input(struct mbuf *, int);
194void rsvp_input(struct mbuf *, int);
195int ip_rsvp_init(struct socket *);
196int ip_rsvp_done(void);
197extern int (*ip_rsvp_vif)(struct socket *, struct sockopt *);
198extern void (*ip_rsvp_force_done)(struct socket *);
199extern void (*rsvp_input_p)(struct mbuf *m, int off);
200
201/*
202 * Obtain next_hop information asociated with the mbuf; if any.
203 * If a tag is present devalidate it also.
204 */
205static __inline struct sockaddr_in *
206ip_claim_next_hop(struct mbuf *m)
207{
208 struct m_tag *mtag = m_tag_find(m, PACKET_TAG_IPFORWARD, NULL);
209 if (mtag) {
210 struct sockaddr_in *sin = *(struct sockaddr_in **)(mtag+1);
211 mtag->m_tag_id = PACKET_TAG_NONE;
212 return sin;
213 } else
214 return NULL;
215}
200
216
201#ifdef IPDIVERT
202void div_init(void);
203void div_input(struct mbuf *, int);
204void div_ctlinput(int, struct sockaddr *, void *);
205void divert_packet(struct mbuf *m, int incoming, int port, int rule);
206extern struct pr_usrreqs div_usrreqs;
207#endif
208
209#ifdef PFIL_HOOKS
210extern struct pfil_head inet_pfil_hook;
211#endif
212
213void in_delayed_cksum(struct mbuf *m);
214
215#endif /* _KERNEL */
216
217#endif /* !_NETINET_IP_VAR_H_ */
217#ifdef PFIL_HOOKS
218extern struct pfil_head inet_pfil_hook;
219#endif
220
221void in_delayed_cksum(struct mbuf *m);
222
223#endif /* _KERNEL */
224
225#endif /* !_NETINET_IP_VAR_H_ */