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.
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).
"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.
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.
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.
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.
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.
"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.