summaryrefslogtreecommitdiff
path: root/print-null.c
Commit message (Collapse)AuthorAgeFilesLines
* NDOize AppleTalk, CDP and Kerberos decodersDenis Ovsienko2014-03-281-1/+1
|
* NDOize ISO CLNS decoderDenis Ovsienko2014-03-281-1/+1
|
* make use of ND_DEFAULTPRINT()Denis Ovsienko2014-03-261-1/+1
|
* make use of NETDISSECT_REWORKEDDenis Ovsienko2014-03-151-0/+1
| | | | | Update the already converted decoders to define the macro and to include interface.h instead of netdissect.h. Fix incurred compile errors.
* NDOize 8 more small decodersDenis Ovsienko2014-03-131-1/+1
| | | | | This change converts ZeroMQ, IPX, MPLS, IPv6 options, PPPoE, RIPng, PFLOG and Sun RPC decoders.
* NDOize IP mobile, MSDP and NULL decodersDenis Ovsienko2014-03-061-23/+17
|
* don't include pcap.h needlesslyDenis Ovsienko2014-02-281-1/+0
| | | | | | | | | | Both interface.h and netdissect.h include <pcap.h>, thus most files should not include it regardless if these need it or not. The only exceptions so far remain: * addrtoname.c * missing/datalinks.c * missing/dlnames.c * tcpdump.c
* don't include addrtoname.h needlesslyDenis Ovsienko2014-02-251-1/+0
|
* remove tcpdump's own CVS keywordsDenis Ovsienko2014-01-031-5/+0
| | | | | | Remove lots of $Header's and a few $Id's that all belong to the former CVS repository of tcpdump itself. These keywords have been frozen since the migration to git in late 2008.
* Convert the IPv6 printer to use netdissect.Guy Harris2010-11-071-1/+1
|
* move the BSD AF defs into af.h and make the null and rip printer make use of ithannes2006-03-231-37/+9
|
* Add a flag to suppress the "default_print()" call made in variousguy2005-07-071-2/+2
| | | | | | | | link-layer print routines if no other print routine claimed the packet. Test whether that flag is set rather than testing whether neither of -x or -q were specified, and have -x, -q, *and* -X set that flag, so that -X suppresses it just as -x does. That way you don't get those pckets dumped twice if -X was specified.
* Print the link-layer header for packets with an unknown AF value, as itguy2005-05-191-5/+21
| | | | | | | used to do. When printing the link-layer header, interpret the "-q" flag, and print the packet length, similarly to the way the Ethernet print routine does.
* remove null_print() and make use of tok2str() instead; proto names taken ↵hannes2005-05-181-46/+13
| | | | from ethertype_values
* refactored ip_print() so that chained header parser (ESP/AH) canmcr2005-04-061-2/+8
| | | | more easily call the inner parts.
* Fix up a bunch of comments - the on-the-wire length field in aguy2004-03-171-2/+2
| | | | pcap_pkthdr is "len", not "length".
* 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 pass on src & dst MAC adresses to the isoclns decoder as MAC adresseshannes2003-05-221-2/+2
| | | | should be really printed in ether_print() using the eflag
* Check the AF_ value rather than the IP header on packets; the packetsguy2003-02-051-19/+76
| | | | | | | | | | aren't necessarily IP packets. Support several different versions of AF_INET6 from various BSDs. Handle OSI, AppleTalk, and IPX. Handle unknown AF_ values the way unknown protocol types are handled in other print routines - print the raw packet payload.
* Hoist a bunch of stuff that should be done by all if_print routines intoguy2002-12-191-20/+4
| | | | | | 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-2/+2
| | | | | | | | | | | | | | | | | | | | | | | 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-5/+4
| | | | | | | | | | | | | 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-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".
* Added support for Win32, based on WinPcap.risso2002-08-011-6/+2
|
* Get rid of unneeded incomplete definitions of "struct mbuf" and "structguy2002-06-011-6/+1
| | | | | rtentry", and unneded includes of <sys/uio.h>, <sys/file.h>, and <sys/ioctl.h>.
* 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()".
* Handle DLT_NULL correctly - the AF_ value is in host byte order, whichguy2000-12-161-11/+35
| | | | | | | | | | | | | | | | | | | | | may not be *our* byte order if we're reading a capture file from another machine; we currently handle that by checking whether it looks like an integer < 65536 or not and, if it's not, byte-swap it. This also lets us handle OpenBSD DLT_LOOP as well - it's like DLT_NULL except that the AF_ value is in *network* byte order. (Old-style Linux loopback captures were also DLT_NULL, but the header had an Ethernet type in it; there have also been captures where the header was a PPP header. For now, we just continue to assume that all DLT_NULL packets are IP, and check the IP version field to decide whether it's IPv4, IPv6, or something else. We may want to consider adopting Ethereal's heuristics, which would at least mean we wouldn't be reporting bogus packet types for old-style Linux loopback captures and those weird PPP - ISDN4BSD? - captures, although the version of libpcap that goes with this version of tcpdump doesn't produce bogus DLT_NULL captures for Linux loopback devices.)
* If "-n" is specified along with "-e", print the address family value asguy2000-12-041-18/+19
| | | | | | | | | | | | | "AF <n>" for DLT_NULL captures. Print the packet length for DLT_NULL captures when "-e" is specified (somebody complained on "freebsd-isp" about the lack of any packet length from tcpdump when capturing traffic on a "tunX" device). Make sure we always print the packet length on PPP when "-e" is specified (the person in question also complained that the packet length disappeared between FreeBSD 2.2.8 and FreeBSD 3.4, which was the result of a new "print-ppp.c" that didn't print the length).
* put stripped-down version of ip6.h and icmp6.h into tcpdump tree.itojun2000-10-071-5/+4
| | | | | | | | ip6.h is almost normal RFC2292 header. icmp6.h has couple of extensions (not covered by RFC2292), like MLD, ICMPv6 nodeinfo, and router renumber. XXX how to synchronize with future kame changes?
* always use u_intXX_t for protocol format declaration. char/short/int may notitojun2000-10-031-3/+3
| | | | | | 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
* 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/+3
| | | | | | | | | | | 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.
* remove non-STDC codeassar2000-07-011-3/+1
|
* * print-rt6.c: make IPv6 routing header printing work with new 2292bisitojun1999-12-221-5/+5
| | | | | | | | | | | API. * print-bgp.c: improve options printing. ugly code exists for unaligned option parsing (need some fix). * const poisoning in SMB decoder. * make dump format back to original. someone may want to add an option to do ascii printing, but keep the default behavior as is for scripts used in many places. * -Wall -Werror clean checks.
* 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
|
* (null_if_print): actually examine the IP version. Fromassar1999-11-211-9/+14
| | | | kuznet@ms2.inr.ac.ru
* Bring in KAME IPv6 tcpdump. replaces esp/ah/isakmp decoder.itojun1999-10-301-1/+20
| | | | | | | 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/+123