summaryrefslogtreecommitdiff
path: root/print-arp.c
Commit message (Collapse)AuthorAgeFilesLines
* display cosmetics: set the comma right for all permutations of eflag and vflaghannes2006-03-031-9/+11
|
* rework the ARP printer & add support for Frame-Relay ARPhannes2006-02-111-105/+178
|
* NDO-ized print-arp.cmcr2004-04-301-66/+77
|
* Have the configure script arrange that the Makefile define _U_guy2003-11-161-4/+4
| | | | | | | | | | appropriately, and that GNUmakefile and the MSVC++ project file define it apppriately, as we do with libpcap, rather than defining it in "interface.h". Undo the rcsid-shuffling and addition of extra #includes, as we no longer need to arrange that "interface.h" be included before using _U_ in an RCS ID or copyright.
* From Neil Spring:guy2003-11-151-4/+4
| | | | | | | | | | | use "_U_" in the definitions of "rcsid[]", to eliminate complaints about those variables being unused; move the definitions after the include of "interface.h", or add an include of "interface.h", so that "_U_" is defined. Include "config.h" before including "tcpdump-stdinc.h" in "missing/datalinks.c".
* Don't use "sa_len" as a variable name - it causes problems on Irix,guy2003-01-251-5/+5
| | | | where <sys/socket.h> #defines sa_len.
* The "__attribute__((packed))" tag on structures causes some files not toguy2002-12-111-15/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | compile with Sun C, as "interface.h" isn't being included before the structures are being declared. Furthermore, in the files that Sun C *can* compile, it doesn't cause Sun C to generate code that's safe with unaligned accesses, as "__attribute__" is defined as a do-nothing macro with compilers that don't support it. Therefore, we get rid of that tag on the structures to which it was added, and instead use "EXTRACT_16BIT()" and "EXTRACT_32BIT()" to fetch 16-bit and 32-bit big-endian quantities from packets. We also fix some other references to multi-byte quantities to get rid of code that tries to do unaligned loads on platforms that don't support them. We also throw in a hack that makes those macros use "__attribute__((packed))" on structures containing only one 16-bit or 32-bit integer to get the compiler to generate unaligned-safe code rather than doing it by hand. (GCC on SPARC produces the same code that doing it by hand does; I don't know if GCC on any other big-endian strict-alignment processor generates better code for that case. On little-endian processors, as "ntohs()" and "ntohl()" might be functions, that might actually produce worse code.) Fix some places to use "%u" rather than "%d" to print unsigned quantities.
* put __attribute__((packed)) to packet headers. s/u_short/u_int16_t/ and soitojun2002-11-091-3/+3
| | | | forth while i'm here
* Move the check for a zero-length hardware address intoguy2002-09-041-24/+16
| | | | "atmarp_addr_print()".
* Fix the ATMARP dissector to correctly dissect RFC 2225 ATM ARP.guy2002-09-041-73/+118
| | | | | | | | | 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.
* Do sanity checking on the hardware address and protocol address lengths;guy2002-09-041-3/+5
| | | | | | | 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).
* Added support for Win32, based on WinPcap.risso2002-08-011-5/+2
|
* Add SunATM support, based on code from Yen Yen Lim at North Dakota Stateguy2002-07-111-2/+131
| | | | University.
* Make "ar_sha()", "ar_spa()", "ar_tha()", and "ar_tpa()" return "constguy2002-04-251-5/+5
| | | | | u_char *" rather than "const caddr_t", to avoid signed vs. unsigned complaints from various compilers.
* Call the ARP header structure we define "struct arp_pkthdr" rather thanguy2002-02-251-4/+4
| | | | | | "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.
* Eliminate some unused parameters.fenner2001-09-171-14/+14
| | | | | | | | | | | 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.
* make arp_print() L2 neutral. from netbsditojun2001-06-181-65/+37
| | | | | | 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.
* Remove some includes of <sys/socket.h>, and add includes ofguy2000-10-101-2/+3
| | | | <netinet/in.h> to declare "ntoh[sl]" and "hton[sl]".
* Some compilers may pad structures to a length that's a multiple of 2 orguy2000-10-091-2/+6
| | | | | | | | | | | 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.
* Get rid of some includes that aren't needed; the include of <net/if.h>,guy2000-09-241-7/+1
| | | | | | 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.
* Add definitions of Ethernet types fromguy2000-09-231-2/+64
| | | | | | | | | | | | | | | | "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.
* remove non-STDC codeassar2000-07-011-6/+1
|
* Switch to config.h instead of passing defines in DEFS.fenner1999-11-211-1/+5
|
* Initial revisionmcr1999-10-071-0/+133