X-Git-Url: https://git.tcpdump.org/tcpdump/blobdiff_plain/fb75d3cd5ad603bd255d9cdc20aeca674c6f3720..4fe64c9d253007f06b52c6d8be2c99bfc28f989b:/ip.h diff --git a/ip.h b/ip.h index f76cff80..3a496da2 100644 --- a/ip.h +++ b/ip.h @@ -1,4 +1,4 @@ -/* @(#) $Header: /tcpdump/master/tcpdump/ip.h,v 1.5 2000-10-03 02:54:56 itojun Exp $ (LBL) */ +/* @(#) $Header: /tcpdump/master/tcpdump/ip.h,v 1.11 2004-09-27 21:13:10 hannes Exp $ (LBL) */ /* * Copyright (c) 1982, 1986, 1993 * The Regents of the University of California. All rights reserved. @@ -34,29 +34,6 @@ * @(#)ip.h 8.2 (Berkeley) 6/1/94 */ -#ifndef BYTE_ORDER -#define LITTLE_ENDIAN 1234 /* least-significant byte first (vax, pc) */ -#define BIG_ENDIAN 4321 /* most-significant byte first (IBM, net) */ -#define PDP_ENDIAN 3412 /* LSB first in word, MSW first in long (pdp)*/ - -#ifdef WORDS_BIGENDIAN -#define BYTE_ORDER BIG_ENDIAN -#else -#define BYTE_ORDER LITTLE_ENDIAN -#endif /* WORDS_BIGENDIAN */ -#endif /* BYTE_ORDER */ - -#if !defined(BYTE_ORDER) || \ - (BYTE_ORDER != BIG_ENDIAN && BYTE_ORDER != LITTLE_ENDIAN && \ - BYTE_ORDER != PDP_ENDIAN) - /* you must determine what the correct bit order is for - * your compiler - the next line is an intentional error - * which will force your compiles to bomb until you fix - * the above macros. - */ - #error "Undefined or invalid BYTE_ORDER"; -#endif - /* * Definitions for internet protocol version 4. * Per RFC 791, September 1981. @@ -129,6 +106,7 @@ struct ip { #define IPOPT_LSRR 131 /* loose source route */ #define IPOPT_SATID 136 /* satnet id */ #define IPOPT_SSRR 137 /* strict source route */ +#define IPOPT_RA 148 /* router-alert, rfc2113 */ /* * Offsets to fields in options other than EOL and NOP. @@ -145,9 +123,9 @@ struct ip_timestamp { u_int8_t ipt_code; /* IPOPT_TS */ u_int8_t ipt_len; /* size of structure (variable) */ u_int8_t ipt_ptr; /* index of current entry */ - u_int8_t ipt_flgoflw; /* flags, overflow counter */ -#define IPTS_FLG(ip) (((ipt)->ipt_flgoflw & 0xf0) >> 4) -#define IPTS_OFLW(ip) ((ipt)->ipt_flgoflw & 0x0f) + u_int8_t ipt_oflwflg; /* flags, overflow counter */ +#define IPTS_OFLW(ip) (((ipt)->ipt_oflwflg & 0xf0) >> 4) +#define IPTS_FLG(ip) ((ipt)->ipt_oflwflg & 0x0f) union ipt_timestamp { u_int32_t ipt_time[1]; struct ipt_ta { @@ -180,3 +158,6 @@ struct ip_timestamp { #define IPTTLDEC 1 /* subtracted when forwarding */ #define IP_MSS 576 /* default maximum segment size */ + +/* in print-ip.c */ +extern u_int32_t ip_finddst(const struct ip *);