Deleted Added
full compact
ip.h (8293) ip.h (8876)
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.h 8.1 (Berkeley) 6/10/93
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.h 8.1 (Berkeley) 6/10/93
34 * $Id: ip.h,v 1.3 1994/08/21 05:27:30 paul Exp $
34 * $Id: ip.h,v 1.4 1995/05/05 14:36:38 ache Exp $
35 */
36
37#ifndef _NETINET_IP_H_
38#define _NETINET_IP_H_
39
40/*
41 * Definitions for internet protocol version 4.
42 * Per RFC 791, September 1981.
43 */
44#define IPVERSION 4
45
46/*
47 * Structure of an internet header, naked of options.
48 *
49 * We declare ip_len and ip_off to be short, rather than u_short
50 * pragmatically since otherwise unsigned comparisons can result
51 * against negative integers quite easily, and fail in subtle ways.
52 */
53struct ip {
35 */
36
37#ifndef _NETINET_IP_H_
38#define _NETINET_IP_H_
39
40/*
41 * Definitions for internet protocol version 4.
42 * Per RFC 791, September 1981.
43 */
44#define IPVERSION 4
45
46/*
47 * Structure of an internet header, naked of options.
48 *
49 * We declare ip_len and ip_off to be short, rather than u_short
50 * pragmatically since otherwise unsigned comparisons can result
51 * against negative integers quite easily, and fail in subtle ways.
52 */
53struct ip {
54#if BYTE_ORDER == LITTLE_ENDIAN
54#if BYTE_ORDER == LITTLE_ENDIAN
55 u_char ip_hl:4, /* header length */
56 ip_v:4; /* version */
57#endif
55 u_char ip_hl:4, /* header length */
56 ip_v:4; /* version */
57#endif
58#if BYTE_ORDER == BIG_ENDIAN
58#if BYTE_ORDER == BIG_ENDIAN
59 u_char ip_v:4, /* version */
60 ip_hl:4; /* header length */
61#endif
62 u_char ip_tos; /* type of service */
63 short ip_len; /* total length */
64 u_short ip_id; /* identification */
65 short ip_off; /* fragment offset field */
66#define IP_DF 0x4000 /* dont fragment flag */

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

126
127/*
128 * Time stamp option structure.
129 */
130struct ip_timestamp {
131 u_char ipt_code; /* IPOPT_TS */
132 u_char ipt_len; /* size of structure (variable) */
133 u_char ipt_ptr; /* index of current entry */
59 u_char ip_v:4, /* version */
60 ip_hl:4; /* header length */
61#endif
62 u_char ip_tos; /* type of service */
63 short ip_len; /* total length */
64 u_short ip_id; /* identification */
65 short ip_off; /* fragment offset field */
66#define IP_DF 0x4000 /* dont fragment flag */

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

126
127/*
128 * Time stamp option structure.
129 */
130struct ip_timestamp {
131 u_char ipt_code; /* IPOPT_TS */
132 u_char ipt_len; /* size of structure (variable) */
133 u_char ipt_ptr; /* index of current entry */
134#if BYTE_ORDER == LITTLE_ENDIAN
134#if BYTE_ORDER == LITTLE_ENDIAN
135 u_char ipt_flg:4, /* flags, see below */
136 ipt_oflw:4; /* overflow counter */
137#endif
135 u_char ipt_flg:4, /* flags, see below */
136 ipt_oflw:4; /* overflow counter */
137#endif
138#if BYTE_ORDER == BIG_ENDIAN
138#if BYTE_ORDER == BIG_ENDIAN
139 u_char ipt_oflw:4, /* overflow counter */
140 ipt_flg:4; /* flags, see below */
141#endif
142 union ipt_timestamp {
143 n_long ipt_time[1];
144 struct ipt_ta {
145 struct in_addr ipt_addr;
146 n_long ipt_time;

--- 29 unchanged lines hidden ---
139 u_char ipt_oflw:4, /* overflow counter */
140 ipt_flg:4; /* flags, see below */
141#endif
142 union ipt_timestamp {
143 n_long ipt_time[1];
144 struct ipt_ta {
145 struct in_addr ipt_addr;
146 n_long ipt_time;

--- 29 unchanged lines hidden ---