summaryrefslogtreecommitdiff
path: root/print-atm.c
Commit message (Collapse)AuthorAgeFilesLines
* clean K&R style up in function declarations a bitDenis Ovsienko2015-03-051-2/+2
| | | | The function body should have its opening brace on the next line.
* Clean up length checks.Guy Harris2014-12-181-1/+14
| | | | | | | | | Check only the amount of length that matters at any given point; yes, this means we do multiple checks, but so it goes. We don't need to check for LLC+SNAP - llc_print() does that for us. We do, however, need to check to make sure we can safely skip the Fore header.
* More getting rid of old u_intN_t.Guy Harris2014-04-231-1/+1
|
* u_intN_t is dead, long live uintN_t.Guy Harris2014-04-231-12/+12
| | | | | | | | | And, as we require at least autoconf 2.61, and as autoconf 2.61 and later have AC_TYPE_UINTn_T and AC_TYPE_INTn_T macros, we use them to define the uintN_t and intN_t macros if the system doesn't define them for us. This lets us get rid of bitypes.h as well.
* NDOize SNMP decoderDenis Ovsienko2014-03-291-1/+1
|
* NDOize ISO CLNS decoderDenis Ovsienko2014-03-281-1/+1
|
* make use of ND_DEFAULTPRINT()Denis Ovsienko2014-03-261-1/+1
|
* NDOize ATM, MPTCP, NTP, VTP & Whiteboard decodersDenis Ovsienko2014-03-201-59/+59
|
* NDOize LLC decoderDenis Ovsienko2014-03-151-1/+1
|
* NDOize 5 more decodersDenis Ovsienko2014-03-071-1/+1
| | | | | Update Apple's IP over IEEE1394, Bluetooth, CALM/FAST, IPv6 fragments and LAN emulation decoders. Remove some stray passages while at it.
* 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
* remove tcpdump's own CVS keywordsDenis Ovsienko2014-01-031-4/+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.
* whitespace changesMichael Richardson2014-01-011-3/+3
|
* make consistent use of the "tstr" idiomDenis Ovsienko2013-12-261-3/+5
| | | | | | | | For each decoder that has more than one instance of truncation signaling and prints the same string in each instance make sure that the string is declared as "static const char tstr[]" right after the initial includes block. Where necessary, replace fputs(s, stdout) with equivalent printf("%s", s).
* justify declarations of struct tok arraysDenis Ovsienko2013-09-241-8/+8
| | | | | | Make sure all of them are declared const and most of them -- static. Proper declaration of token arrays is a common review point for new code that is based on existing decoders. Thus fix the issue at its root.
* Remove unnecessary test.Michal Sekletar2011-10-131-4/+6
| | | | | | Also, from me: add a comment explaining why the test isn't being done. Reviewed-by: Guy Harris <guy@alum.mit.edu>
* Precede the VCI values with VCI_, to avoid collisions (such as withguy2007-10-221-9/+9
| | | | "PPC" as a definition on PowerPC machines).
* move the crc10 verification to a new file checksum.c (will add other ↵hannes2006-02-091-39/+3
| | | | checksumming routines later to this file), init shred checksumming tables with init_checksum(), assume network byte order for tag correlation ID in the ATM OAM cell printer
* print ATM cell payload type, do a denser hexdumping for printing location datahannes2006-02-081-6/+25
|
* add support for AIS/RDI OAM cell payload printing, hexdump location/source ↵hannes2006-02-081-14/+27
| | | | ID for loopback OAM cells rather than attempting to print it
* rework the oam printer: add support for payload printing of OAM loopback cellshannes2006-02-081-17/+134
|
* add support for Cisco style NLPID encapsulationhannes2006-01-251-1/+9
|
* bugfix: add hec offset for celltype determination; make use of tok2str() for ↵hannes2006-01-221-16/+11
| | | | OAM F type printing, unhide OAM elements like (vci,vpi) under eflag
* If you're going to stuff the result of EXTRACT_32BITS() into a variable,guy2005-11-101-3/+4
| | | | making the variable 32 bits or longer might be a good idea.
* 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.
* Juniper routers do not deliver a heading HEC byte for oam cells: make the ↵hannes2005-06-201-5/+5
| | | | OAM printer to support both HEC and non-HEC OAM cells
* wrong offset for functype calculationhannes2005-05-181-2/+2
|
* finalize the tokenlists of supported OAM messageshannes2005-01-191-4/+18
|
* add a basic ATM OAM cell dissector, baseline support for fault-management ↵hannes2004-10-181-6/+81
| | | | OAM cells
* 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".
* Hoist a bunch of stuff that should be done by all if_print routines intoguy2002-12-191-38/+13
| | | | | | 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-1/+4
| | | | | | | | | | | | | | | | | | | | | | | 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-20/+2
| | | | | | | | | | | | | 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.
* Fix another place to go back to calling "llc_print()", to handle theguy2002-12-111-3/+2
| | | | | case of the Ethernet type not being known, and not pass in a non-null "extracted_ethertype" pointer (otherwise "llc_print()" dumps core).
* Check for the IP SAP value in the LLC header, and note some of theguy2002-12-101-3/+26
| | | | problems with that particular heuristic.
* Put "atm_llc_print()" back - we want to handle the case of the Ethernetguy2002-12-091-9/+49
| | | | | | | | | | | type not being known, *and* have to pass in a non-null "extracted_ethertype" pointer (otherwise "llc_print()" dumps core), and we should pass in non-null pointers for the source and destination addresses. However, we can get rid of the "ether_type" variable. Fix up the test for non-LLC packets to test for the first 3 bytes *not* matching the header of an LLC/SNAP packet, not for them matching. Add in a check for RFC 2684 routed NLPID-formatted PDUs.
* get rid of EXTRACT_ lookalikes, eliminated atm_llc_print -> call direct to ↵hannes2002-12-041-50/+13
| | | | llc_print
* Get rid of the "-Wno-unused" flag, and fix up most of theguy2002-09-051-5/+5
| | | | | | | | | | | | | | | 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
|
* Add SunATM support, based on code from Yen Yen Lim at North Dakota Stateguy2002-07-111-10/+138
| | | | University.
* Note that we should perhaps also, in the heuristic test for a Fore 802.6guy2002-04-071-2/+7
| | | | | MAC header, treat 0xfe 0xfe 0x0e as the beginning of an LLC header rather than the beginning of an 802.6 MAC header.
* Just use "llc_print()" to print the LLC part of RFC 1483-encapsulatedguy2002-04-071-68/+49
| | | | ATM frames.
* 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()".
* Put the LINUX_SLL_P_ definitions back, and check for at least some ofguy2000-12-221-3/+3
| | | | | | | | | | | | | | | | | them in "print-sll.c" - as a cooked-mode capture may be reading from non-Ethernet, non-802.x devices, it may well see some ETH_P_/LINUX_SLL_P_ types that don't mean "this is an 802.2 LLC frame". We currently assume that the ETH_P_ values won't change in the kernel, so we don't have to explicitly map them. In various link-layer packet printers, if we don't handle the next layer up of packet type, and are printing the link-layer header, use the correct pointer to that header (i.e., if we've stepped "p" past the link-layer header, don't use "p", use a pointer to the beginning of the packet), and use the correct length (i.e., if we've subtracted the length of the link-layer header, add it back in, so that we always print the full packet length).
* Get rid of some includes of <net/route.h>, and empty declarations ofguy2000-10-061-4/+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).
* 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".