summaryrefslogtreecommitdiff
path: root/print-sl.c
Commit message (Collapse)AuthorAgeFilesLines
* refactored ip_print() so that chained header parser (ESP/AH) canmcr2005-04-061-3/+3
| | | | more easily call the inner parts.
* 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-42/+9
| | | | | | 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.
* Add a new routine "default_print_packet()", which takes a pointer to theguy2002-12-181-3/+3
| | | | | | | | | | | | | | | | | | | | | | | beginning of the raw packet data, the captured length of the raw packet data, and the length of the link-layer header, and: if "-e" was specified, prints all the raw packet data; if "-e" was not specified, prints all the raw packet data past the link-layer header, if there is any. Use that routine in all the "xxx_if_print()" routines if "-x" was specified. Make "arcnet_encap_print()" static - it's not used outside "print-arcnet.c". Add missing info printing code to "atm_if_print()". Print the packet data in "lane_if_print()", not in "lane_print()", as "lane_print()" can be called from other "xxx_if_print()" routines, and those routines will also print the packet data if "-x" was specified - no need to print it twice.
* We no longer use "packetp" for anything, so eliminate it. (If anyguy2002-12-181-9/+9
| | | | | | | | | | | | | dissector really needs source and destination MAC addresses, we should make global pointers to them - which would be null for packets lacking MAC addresses, so dissectors that need them will need to do something sensible if those pointers are null.) Don't fake up an Ethernet header if there aren't any MAC addresses to use when faking it up. "bp_chaddr" in "print-bootp.c" is an array, so "bp->bp_chaddr" cannot be null, and there's no need to test for it not being null.
* Get rid of the "-Wno-unused" flag, and fix up most of theguy2002-09-051-3/+3
| | | | | | | | | | | | | | | 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".
* Added support for Win32, based on WinPcap.risso2002-08-011-7/+2
|
* Put the infodelay wrapping into the remaining "XXX_if_print()" routines.guy2001-07-051-1/+9
| | | | | | | | | | | | | | 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()".
* 64-bit cleanup - cast the difference between two pointers to "long" andguy2000-10-101-2/+2
| | | | print it with "%ld".
* Pull the "linux-include" versions of "slip.h" and "slcompress.h" up toguy2000-10-091-48/+3
| | | | | | | | | | | | | | | | the top-level directory, remove from them all stuff not needed by tcpdump, include them rather than the system's header files, and get rid of assorted unnecessary include files. This means you don't need to check for "slip.h" when building "print-sl.c", stubbing it out on systems that don't have "slip.h". We also don't need to build the stuff in "print-vjc.c" only on BSD/OS. Use "u_int32_t" and "u_int16_t" rather than "u_int" and "u_short" for structure members in "print-chdlc.c". Move PPP_HDRLEN from "print-ppp.c" to "ppp.h", as per the XXX comment in "print-ppp.c".
* always use u_intXX_t for protocol format declaration. char/short/int may notitojun2000-10-031-5/+5
| | | | | | come with exact size. while at it, correct signedness of ip/udp header field. nuke most of the use of bitfield. TODO: bitfield in namser.h
* do not use integer bitfield when we care about the resulting member size.itojun2000-10-031-3/+3
| | | | | u_int x:4, y:4; will occupy sizeof(int) on some platforms, while it occupy 1 byte on some platforms. use macro to decode th_off.
* 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-5/+5
| | | | | | | | | | | 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-3/+3
| | | | | | | | | 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.
* remove non-STDC codeassar2000-07-011-3/+2
|
* fix compilation.itojun1999-11-211-2/+2
| | | | | - print-udp.c: rename of nfsv2.h -> nfs.h - print-{null,sl}.c: ipv6_print -> ip6_print
* Switch to config.h instead of passing defines in DEFS.fenner1999-11-211-1/+5
|
* (sl_if_print): actually examine the IP version. Fromassar1999-11-211-2/+13
| | | | kuznet@ms2.inr.ac.ru
* patches to help build on Linux 2.2linux22mcr1999-10-171-4/+1
|
* Initial revisionmcr1999-10-071-0/+306