summaryrefslogtreecommitdiff
path: root/print-ppp.c
Commit message (Collapse)AuthorAgeFilesLines
* from Darren Reed <darrenr@reed.wattle.id.au>:hannes2004-07-131-1/+5
| | | | | | catch the self-set null pointer if handle_ctrl_proto() stumbles across an unknown control-proto for which we have no specific options decoder;
* Add bounds checks.guy2004-03-241-14/+111
|
* 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-1/+1
| | | | | | | | | | | 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".
* 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".
* print opcode number alwayshannes2003-10-201-3/+4
|
* 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
* print length after LCP optionshannes2003-05-221-2/+3
|
* cleanup Magic-Num fieldshannes2003-05-221-5/+5
|
* remove some EXTRACT_ lookalikes plus misc. display cleanuphannes2003-05-221-54/+60
|
* - be more verbose about the rejected protocol in handle_ctrl_proto()hannes2003-05-221-2/+7
| | | | - hook in MPLSCP, OSICP and IPV6CP handle_ctrl_proto()
* minor display cosmetics:hannes2003-05-151-2/+2
| | | | | print 3-digit ttl field in print-ip.c unbracketize the LCP id in print-ppp.c
* misc. display cosmetics for e/v flagshannes2003-05-111-5/+5
|
* hide link-layer information correct under the eflaghannes2003-05-081-2/+2
|
* Hoist a bunch of stuff that should be done by all if_print routines intoguy2002-12-191-83/+22
| | | | | | 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/+19
| | | | | | | | | | | | | | | | | | | | | | | 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-14/+11
| | | | | | | | | | | | | 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.
* better handling of PPP protocols which we know but do not have a dissectorhannes2002-11-031-3/+3
|
* hide local hexdumping behind vv flaghannes2002-10-101-3/+3
|
* overseen ML-PPP stringhannes2002-09-151-2/+2
|
* more verbose handling of unknown protoshannes2002-09-151-34/+42
|
* no boundary checking necessary anymore;hannes2002-09-141-3/+1
|
* better handling of unknown data in handle_ctrl_proto()hannes2002-09-141-9/+4
|
* more consistent use of tok2str and support for MPLS over PPPhannes2002-09-141-112/+98
|
* Get rid of the "-Wno-unused" flag, and fix up most of theguy2002-09-051-8/+8
| | | | | | | | | | | | | | | 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".
* Add a few more GCC warnings on GCC >= 2 for ".devel" builds.guy2002-09-051-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | From Neil T. Spring: fixes for many of those warnings: addrtoname.c, configure.in: Linux needs netinet/ether.h for ether_ntohost print-*.c: change char *foo = "bar" to const char *foo = "bar" to appease -Wwrite-strings; should affect no run-time behavior. print-*.c: make some variables unsigned. print-bgp.c: plen ('prefix len') is unsigned, no reason to validate by comparing to zero. print-cnfp.c, print-rx.c: use intoa, provided by addrtoname, instead of inet_ntoa. print-domain.c: unsigned int l; (l=foo()) < 0 is guaranteed to be false, so check for (u_int)-1, which represents failure, explicitly. print-isakmp.c: complete initialization of attrmap objects. print-lwres.c: "if(x); print foo;" seemed much more likely to be intended to be "if(x) { print foo; }". print-smb.c: complete initialization of some structures. In addition, add some fixes for the signed vs. unsigned comparison warnings: extract.h: cast the result of the byte-extraction-and-combining, as, at least for the 16-bit version, C's integral promotions will turn "u_int16_t" into "int" if there are other "int"s nearby. print-*.c: make some more variables unsigned, or add casts to an unsigned type of signed values known not to be negative, or add casts to "int" of unsigned values known to fit in an "int", and make other changes needed to handle the aforementioned variables now being unsigned. print-isakmp.c: clean up the handling of error/status indicators in notify messages. print-ppp.c: get rid of a check that an unsigned quantity is >= 0. print-radius.c: clean up some of the bounds checking. print-smb.c: extract the word count into a "u_int" to avoid the aforementioned problems with C's integral promotions. print-snmp.c: change a check that an unsigned variable is >= 0 to a check that it's != 0. Also, fix some formats to use "%u" rather than "%d" for unsigned quantities.
* Added support for Win32, based on WinPcap.risso2002-08-011-7/+2
|
* whitespace cleanupitojun2002-06-111-2/+2
|
* Make "-x" and "-X" work with PPPoE interfaces; based on code from Darrenguy2002-05-291-3/+8
| | | | | Reed, with additions to get the PPP header length from the PPP print routine.
* print protocol type (LCP/IPCP/whatever) even if -e is not specified.itojun2001-10-241-5/+3
| | | | from mshindo
* In the PPP dissector, pass NULL, rather than bogus strings, toguy2001-09-091-13/+2
| | | | | | | "isoclns_print()", for the MAC source and destination addresses, and have "isoclns_print()" print the MAC addresses only if they're both non-null, rather than having the PPP print routine tweak "eflag" to suppress the printing.
* IS-IS over PPP support, from Hannes Gredler <hannes@juniper.net>.guy2001-09-091-1/+17
|
* Put the infodelay wrapping into the remaining "XXX_if_print()" routines.guy2001-07-051-8/+17
| | | | | | | | | | | | | | 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()".
* print L2 protocol type only if -e is specified (sync with other L2 behaviors).itojun2001-06-111-3/+5
|
* avoid trigraphitojun2001-03-171-2/+1
|
* Always define PPP_COMP.fenner2001-02-041-3/+4
| | | | Print [???] when we get a PPP packet that we don't handle.
* handle PPP_IPV6itojun2000-12-271-2/+3
|
* If "-n" is specified along with "-e", print the address family value asguy2000-12-041-4/+5
| | | | | | | | | | | | | "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).
* unbroken BSDI build (should be revisited). from jinmei@kame.netitojun2000-11-081-1/+6
|
* Eliminate __P().fenner2000-10-241-11/+11
|
* Pull the "linux-include" versions of "slip.h" and "slcompress.h" up toguy2000-10-091-14/+1
| | | | | | | | | | | | | | | | 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".
* Squelch a compiler warning.guy2000-10-061-1/+9
|
* some sprintf fixes, from kris@freebsd.org (patches@tcpdump.org #89)itojun2000-10-051-5/+1
| | | | pedant.
* fix range check for ipcomp negotiation. From: mshindo@mshindo.netitojun2000-10-041-2/+2
|
* 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
|
* Fix the code to handle the Password Authentication Protocolguy2000-09-241-3/+3
| | | | | | | | Authenticate-Ack and Authenticate-Nak packets to do a length check based on "msg_len", which we set in that case, rather than "passwd_len", which we don't. Thanks and a tip of the Hatlo Hat to some non-GCC compiler - I forget which one - that noticed that we were using a variable which we hadn't necessarily set.
* Add an "ip.h" header, to declare the IP stuff needed by dissectors, andguy2000-09-231-2/+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 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.
* In "ppp_protoname()", get rid of the "#ifdef PPP_xxx" around PPP_xxxguy2000-09-181-21/+8
| | | | | | | | types defined in "ppp.h" (as we know they're defined), and add PPP_VJC and PPP_VJNC. Call "ipx_print()" for PPP_IPX (and ETHERTYPE_IPX, along the lines of what we do for IP) packets.