ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/cebix/BasiliskII/src/slirp/ip.h
(Generate patch)

Comparing BasiliskII/src/slirp/ip.h (file contents):
Revision 1.2 by gbeauche, 2006-01-17T21:19:12Z vs.
Revision 1.5 by asvitkine, 2012-03-30T01:10:28Z

# Line 10 | Line 10
10   * 2. Redistributions in binary form must reproduce the above copyright
11   *    notice, this list of conditions and the following disclaimer in the
12   *    documentation and/or other materials provided with the distribution.
13 < * 3. All advertising materials mentioning features or use of this software
14 < *    must display the following acknowledgement:
15 < *      This product includes software developed by the University of
16 < *      California, Berkeley and its contributors.
17 < * 4. Neither the name of the University nor the names of its contributors
13 > * 3. Neither the name of the University nor the names of its contributors
14   *    may be used to endorse or promote products derived from this software
15   *    without specific prior written permission.
16   *
# Line 75 | Line 71 | typedef u_int32_t n_long;
71  
72   /*
73   * Structure of an internet header, naked of options.
78 *
79 * We declare ip_len and ip_off to be short, rather than u_short
80 * pragmatically since otherwise unsigned comparisons can result
81 * against negative integers quite easily, and fail in subtle ways.
74   */
75   #ifdef PRAGMA_PACK_SUPPORTED
76   #pragma pack(1)
# Line 86 | Line 78 | typedef u_int32_t n_long;
78  
79   struct ip {
80   #ifdef WORDS_BIGENDIAN
81 <        u_int ip_v:4,                   /* version */
81 >        u_char ip_v:4,                  /* version */
82                  ip_hl:4;                /* header length */
83   #else
84 <        u_int ip_hl:4,          /* header length */
84 >        u_char ip_hl:4,         /* header length */
85                  ip_v:4;                 /* version */
86   #endif
87          u_int8_t ip_tos;                        /* type of service */
88 <        int16_t ip_len;                 /* total length */
88 >        u_int16_t       ip_len;                 /* total length */
89          u_int16_t       ip_id;                  /* identification */
90 <        int16_t ip_off;                 /* fragment offset field */
90 >        u_int16_t       ip_off;                 /* fragment offset field */
91   #define IP_DF 0x4000                    /* don't fragment flag */
92   #define IP_MF 0x2000                    /* more fragments flag */
93   #define IP_OFFMASK 0x1fff               /* mask for fragmenting bits */
# Line 160 | Line 152 | struct ip_timestamp {
152          u_int8_t        ipt_len;                /* size of structure (variable) */
153          u_int8_t        ipt_ptr;                /* index of current entry */
154   #ifdef WORDS_BIGENDIAN
155 <        u_int   ipt_oflw:4,             /* overflow counter */
155 >        u_char  ipt_oflw:4,             /* overflow counter */
156                  ipt_flg:4;              /* flags, see below */
157   #else
158 <        u_int   ipt_flg:4,              /* flags, see below */
158 >        u_char  ipt_flg:4,              /* flags, see below */
159                  ipt_oflw:4;             /* overflow counter */
160   #endif
161          union ipt_timestamp {
# Line 232 | Line 224 | struct ipovly {
224          caddr32_t       ih_next, ih_prev;       /* for protocol sequence q's */
225          u_int8_t        ih_x1;                  /* (unused) */
226          u_int8_t        ih_pr;                  /* protocol */
227 <        int16_t ih_len;                 /* protocol length */
227 >        u_int16_t       ih_len;                 /* protocol length */
228          struct  in_addr ih_src;         /* source internet address */
229          struct  in_addr ih_dst;         /* destination internet address */
230   } PACKED__;
# Line 265 | Line 257 | struct ipq {
257   */
258   struct  ipasfrag {
259   #ifdef WORDS_BIGENDIAN
260 <        u_int   ip_v:4,
260 >        u_char  ip_v:4,
261                  ip_hl:4;
262   #else
263 <        u_int   ip_hl:4,
263 >        u_char  ip_hl:4,
264                  ip_v:4;
265   #endif
266                                          /* BUG : u_int changed to u_int8_t.
# Line 277 | Line 269 | struct ipasfrag {
269          u_int8_t ipf_mff;               /* XXX overlays ip_tos: use low bit
270                                           * to avoid destroying tos (PPPDTRuu);
271                                           * copied from (ip_off&IP_MF) */
272 <        int16_t ip_len;
272 >        u_int16_t       ip_len;
273          u_int16_t       ip_id;
274 <        int16_t ip_off;
274 >        u_int16_t       ip_off;
275          u_int8_t        ip_ttl;
276          u_int8_t        ip_p;
277          u_int16_t       ip_sum;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines