summaryrefslogtreecommitdiff
path: root/print-atalk.c
Commit message (Collapse)AuthorAgeFilesLines
* Add additional length checking, print unsigned lengths with %u.Guy Harris2010-08-161-11/+19
|
* Print AppleTalk layer-3 network numbers as 16-bit unsigned decimal numbers.Guy Harris2010-08-161-13/+9
| | | | | | | | | | | | | | Pick up from FreeBSD: revision 1.3 date: 1996/09/11 06:18:26; author: pst; state: Exp; lines: +9 -12 branches: 1.3.2; Print appletalk layer 3 addresses as 16 bit unsigned decimal numbers, not two 8 bit values. This conforms to industry standard. These changes have been sent back to LBL. Inside AppleTalk(R), Second Edition speaks of node numbers as 16-bit.
* Get rid of no-longer-valid comment.Guy Harris2010-08-161-8/+0
| | | | | | We no longer guarantee alignment in any printer routine; all printers must use the EXTRACT_ macros to extract integral quantities - and the Appletalk printers now do so.
* From Toshihiro Kanda, via FreeBSD: fix printing of address in AARPGuy Harris2009-07-251-1/+1
| | | | | replies (the relevant address is the source address, not the destination address).
* add EIGRP support for Appletalk, display cosmetics to better indicate that ↵hannes2004-05-011-2/+9
| | | | we are dissecting Appletalk frames
* 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".
* Hoist a bunch of stuff that should be done by all if_print routines intoguy2002-12-191-16/+12
| | | | | | tcpdump.c. Have if_print routines return the length of the link-layer header, so that the common code knows how to skip the link-layer header when printing the packet in hex/ASCII.
* The "__attribute__((packed))" tag on structures causes some files not toguy2002-12-111-6/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-2/+2
| | | | forth while i'm here
* remove buffer move in LBL_ALIGN case, which does more bad things than good ↵itojun2002-10-181-16/+1
| | | | | | things. (if there's unaligned access, they must be converted to EXTRACT_xx)
* Get rid of the "-Wno-unused" flag, and fix up most of theguy2002-09-051-2/+2
| | | | | | | | | | | | | | | unused-parameter problems reported by GCC. Add an _U_ tag to label parameters as unused if the function is called through a pointer (so that you can't change its signature by removing parameters) or if there are unused parameters only because the function isn't complete. Add some additional bounds checks the necessity for which was revealed while cleaning up unused-parameter problems. Make some routines static. "lcp_print()", defined in "print-lcp.c", isn't called anywhere - "print-ppp.c" has the code to dissect LCP. Get rid of "print-lcp.c".
* Get rid of some unnecessary includes (<time.h>, <netdb.h>, and <ctype.h>guy2002-08-061-2/+1
| | | | | are included by <tcpdump-stdinc.h>, so we don't have to include them explicitly; <errno.h> isn't needed by print routines).
* Added support for Win32, based on WinPcap.risso2002-08-011-6/+2
|
* Check for a too-small NBP length before subtracting the header sizeguy2002-02-051-1/+14
| | | | (from OpenBSD's "print-atalk.c").
* indentitojun2001-11-151-3/+3
|
* Eliminate some unused parameters.fenner2001-09-171-4/+4
| | | | | | | | | | | 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.
* Patch from Chris Jepeway <jepeway@blasted-heath.com> to not dereferenceguy2001-07-181-1/+16
| | | | | misaligned pointers in the EtherTalk DDP printer on platforms that can't handle misaligned addresses.
* Put the infodelay wrapping into the remaining "XXX_if_print()" routines.guy2001-07-051-1/+5
| | | | | | | | | | | | | | Split the Cisco HDLC printer into "chdlc_if_print()", which does the stuff expected of a low-level print routine (printing the time stamp, printing the final newline, doing the infodelay stuff) and "chdlc_print()", which doesn't do that stuff. This lets us clean up "ppp_hdlc_if_print()" a bit - it can just print the time stamp at the beginning, and do the infodelay stuff at the end, without having to treat Cisco HDLC specially by skipping the time stamp printing. (This also ensures that the time stamp is always printed, which wasn't the case before.) Print the missing final newline in "pppoe_if_print()".
* Support for LocalTalk hardware, from Uns Lider <unslider@miranda.org>.guy2001-06-181-1/+16
|
* Patch from Pekka Savola <pekkas@netcore.fi> to get rid of "savestr()"guy2001-01-201-5/+4
| | | | | | | (which doesn't actually seem to be significantly more efficient than "strdup()", at least not to the extent that it makes any difference to "tcpdump"), modified to use the BSD "strdup()", rather than the old "savestr()", on platforms that lack "strdup()".
* The packets inside IPTalk are just LLAP packets, so call the routine toguy2000-10-301-5/+9
| | | | print them "llap_print()" (as per NetBSD), not "iptalk_print()".
* Patch from Daniel Hagerty <hag@ai.mit.edu>, submitted with NetBSD PRguy2000-10-301-3/+29
| | | | | | #4141, to dissect raw Appletalk-atop-Ethernet packets correctly, i.e. not as if they were IPTalk packets. (A very similar patch was submitted for Debian bug #67642.)
* The infinite diversity of UNIX platforms is an eternal source of joy.guy2000-10-101-1/+2
| | | | | | | | | | | | | On some platforms (e.g., Solaris 2.5.1 and 2.6, at least), you have to include <netdb.h> to get MAXHOSTNAMELEN defined, including <sys/param.h> doesn't do it (on others, <netdb.h> doesn't help, and you have to include <sys/param.h>. Include <netdb.h> in some files, but, for "timed.h", just use 256 rather than MAXHOSTNAMELEN - the Berkeley time daemon protocol spec (in the timed source directory in various BSDs) says the packet includes "A zero-terminated string of up to 256 ASCII characters with the name of the machine sending the message."
* Get rid of some includes of <net/route.h>, and empty declarations ofguy2000-10-061-6/+1
| | | | | | "struct mbuf" and "struct rtentry" - they shouldn't be necessary (and weren't on the platforms on which I tested, both with GCC and the native compiler if it isn't GCC).
* some sprintf fixes, from kris@freebsd.org (patches@tcpdump.org #89)itojun2000-10-051-2/+2
| | | | pedant.
* Get rid of includes of <netinet/in_systm.h>, and replace "n_short",guy2000-09-291-2/+1
| | | | "n_long", and "n_time", defined in that file, with other types.
* Get rid of unneeded includes of <net/if.h>.guy2000-09-281-2/+1
|
* Add an "ip.h" header, to declare the IP stuff needed by dissectors, andguy2000-09-231-3/+1
| | | | | | | | | | | have dissectors include them rather than <netinet/ip.h> or <netinet/ip_var.h>, if they actually need that stuff. Put the declarations of the ICMP stuff directly into "print-icmp.c". Remove all unnecessary includes of <netinet/ip*.h> files. Copy the byte-order stuff from "nameser.h" into "tcp.h".
* Add "tcp.h" and "udp.h" headers, to declare the TCP and UDP stuff neededguy2000-09-231-4/+1
| | | | | | | | | by dissectors, and have dissectors include them rather than <netinet/udp.h>, <netinet/udp_var.h>, or <netinet/tcp.h>, if they actually need that stuff. Remove all unnecessary includes of <netinet/udp*.h> or <netinet/tcp*.h> files.
* Add definitions of Ethernet types fromguy2000-09-231-2/+1
| | | | | | | | | | | | | | | | "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.
* avoid u_short, use u_int16_t. add missing ntohs(). OpenBSD PR 1170.itojun2000-04-021-12/+13
|
* boundary check for sscanf(%s). use %s with length.itojun2000-03-131-3/+3
|
* s/sprintf/snprintf/.itojun2000-01-171-5/+7
| | | | | there seem to be couple of unsafe use of strcat and strcpy - we should bring in strl{cat,cpy}.
* Switch to config.h instead of passing defines in DEFS.fenner1999-11-211-1/+5
|
* Bring in KAME IPv6 tcpdump. replaces esp/ah/isakmp decoder.itojun1999-10-301-1/+3
| | | | | | | Hope I did not break anything. Portability on IPv4-only node needs checking, I'll do this very soon. (sorry for rather jumbo commit) XXx what is _FAVOR_BSD?
* patches to help build on Linux 2.2linux22mcr1999-10-171-4/+1
|
* Initial revisionmcr1999-10-071-0/+573