Commit Graph

65 Commits

Author SHA1 Message Date
guy
f4c699b587 Fix the ATMARP dissector to correctly dissect RFC 2225 ATM ARP.
Fix the ARP dissector to check the hardware type before checking whether
the addresses are in the captured data, and call the ATMARP dissector if
the hardware type is 19.  Also fix it to return after the ATMARP
dissector returns.

Use "TTEST2()" to check whether the addresses are in the captured data.
2002-09-04 11:22:13 +00:00
guy
5dd4a8b71e Do sanity checking on the hardware address and protocol address lengths;
if the checks fail, treat it the same as we do for and unknown protocol
(we require the hardware address length not to be zero, as
"linkaddr_string()" can't handle that, and we require the protocol
address length to be 4, as we only handle IP as a protocol type).
2002-09-04 10:11:44 +00:00
risso
3d932490b8 Added support for Win32, based on WinPcap. 2002-08-01 08:52:55 +00:00
guy
464c44fbd1 Add SunATM support, based on code from Yen Yen Lim at North Dakota State
University.
2002-07-11 09:17:21 +00:00
guy
a6c4a09522 Make "ar_sha()", "ar_spa()", "ar_tha()", and "ar_tpa()" return "const
u_char *" rather than "const caddr_t", to avoid signed vs. unsigned
complaints from various compilers.
2002-04-25 04:37:31 +00:00
guy
c52270fcc5 Call the ARP header structure we define "struct arp_pkthdr" rather than
"struct arphdr"; on Tru64 UNIX 5.x, including <netinet/in.h> causes
<net/if_arp.h> to be included, and that defines its own "struct arphdr",
causing the compile to fail.
2002-02-25 09:40:32 +00:00
fenner
c672f00276 Eliminate some unused parameters.
Use const more.
Use EXTRACT_* macros more.
Use TCHECK* more.
Use tok2str() to replace some home-grown workalikes.
smb:
 - Get rid of private types, use tcpdump-defined types
 - Rename fdata and fdata1 to smb_fdata and smb_fdata1 to avoid conflict
   with IRIX library function.
2001-09-17 21:57:50 +00:00
itojun
ae68164cc6 make arp_print() L2 neutral. from netbsd
TODO: recover portions that peep L2 src/dst, by passing more args from
L2 printing to arp_print().  the current code can bomb when L2 = arcnet
(because the code assumes that L2 address len == 6), for example.
2001-06-18 09:12:27 +00:00
guy
1869f416f3 Remove some includes of <sys/socket.h>, and add includes of
<netinet/in.h> to declare "ntoh[sl]" and "hton[sl]".
2000-10-10 05:05:07 +00:00
guy
596742a577 Some compilers may pad structures to a length that's a multiple of 2 or
4 bytes, even though no member in the structure requires such an
alignment; don't use "sizeof (struct ether_arp), explicitly #define the
header length and use that #defined value.

We don't use "struct ether_addr" in any dissectors, so there's no need
to define it in "ether.h" - and, if compilers pad it to a multiple of 4
bytes, you can't use it anyway, as it'll be 8 bytes long, not 6 bytes
long.
2000-10-09 03:24:24 +00:00
guy
6f8f2af2fb Get rid of some includes that aren't needed; the include of <net/if.h>,
on at least some platforms, drags in <net/if_arp.h>, which may declare
some of the structures for ARP packet layouts, and may do so in a
fashion that conflicts with the declarations here.
2000-09-24 07:42:31 +00:00
guy
e894092542 Add definitions of Ethernet types from
"linux-includes/netinet/if_ether.h" to "ethertype.h".

Move other stuff used by dissectors from <netinet/if_ether.h> to
"ether.h", along the lines of "fddi.h" and "token.h".

Move ARP declarations from BSD include files to "print-arp.c".

Remove from dissectors includes of <netinet/if_ether.h>, and add
includes of "ethertype.h" and/or "ether.h" as necessary.

Get rid of configuration options that test declarations now made in
"ether.h" or "print-arp.c", as those declarations are now under our
control, not the OS's control.
2000-09-23 08:03:27 +00:00
assar
3cd171317f remove non-STDC code 2000-07-01 03:38:59 +00:00
fenner
b9ac23ce92 Switch to config.h instead of passing defines in DEFS. 1999-11-21 09:36:43 +00:00
mcr
f555c163f9 Initial revision 1999-10-07 23:47:09 +00:00