+++ /dev/null
-version.c
-Makefile
-Makefile-devel.in
-config.status
-config.log
-config.cache
-config.h
-.devel
-stamp-h
-stamp-h.in
-tcpdump
+++ /dev/null
-$Header: /tcpdump/master/tcpdump/CHANGES,v 1.84.2.3 2004/03/30 14:36:24 mcr Exp $
-
-Tue. March 30, 2004. mcr@sandelman.ottawa.on.ca. Summary for 3.8.3 release
-
- No changes from 3.8.2. Version bumped only to maintain consistency
- with libpcap 0.8.3.
-
-Mon. March 29, 2004. mcr@sandelman.ottawa.on.ca. Summary for 3.8.2 release
-
- Fixes for print-isakmp.c CVE: CAN-2004-0183, CAN-2004-0184
- http://www.rapid7.com/advisories/R7-0017.html
- IP-over-IEEE1394 printing.
- some MINGW32 changes.
- updates for autoconf 2.5
- fixes for print-aodv.c - check for too short packets
- formatting changes to print-ascii for hex output.
- check for too short packets: print-bgp.c, print-bootp.c, print-cdp.c,
- print-chdlc.c, print-domain.c, print-icmp.c, print-icmp6.c,
- print-ip.c, print-lwres.c, print-ospf.c, print-pim.c,
- print-ppp.c,print-pppoe.c, print-rsvp.c, print-wb.c
- print-ether.c - better handling of unknown types.
- print-isoclns.c - additional decoding of types.
- print-llc.c - strings for LLC names added.
- print-pfloc.c - various enhancements
- print-radius.c - better decoding to strings.
-
-Wed. November 12, 2003. mcr@sandelman.ottawa.on.ca. Summary for 3.8 release
-
- changed syntax of -E argument so that multiple SAs can be decrypted
- fixes for Digital Unix headers and Documentation
- __attribute__ fixes
- CDP changes from Terry Kennedy <terry@tmk.com>.
- IPv6 mobility updates from Kazushi Sugyo <sugyo@pb.jp.nec.com>
- Fixes for ASN.1 decoder for 2.100.3 forms.
- Added a count of packets received and processed to clarify numbers.
- Incorporated WinDUMP patches for Win32 builds.
- PPPoE payload length headers.
- Fixes for HP C compiler builds.
- Use new pcap_breakloop() and pcap_findalldevs() if we can.
- BGP output split into multiple lines.
- Fixes to 802.11 decoding.
- Fixes to PIM decoder.
- SuperH is a CPU that can't handle unaligned access. Many fixes for
- unaligned access work.
- Fixes to Frame-Relay decoder for Q.933/922 frames.
- Clarified when Solaris can do captures as non-root.
- Added tests/ subdir for examples/regression tests.
- New -U flag. -flush stdout after every packet
- New -A flag -print ascii only
- support for decoding IS-IS inside Cisco HDLC Frames
- more verbosity for tftp decoder
- mDNS decoder
- new BFD decoder
- cross compilation patches
- RFC 3561 AODV support.
- UDP/TCP pseudo-checksum properly for source-route options.
- sanitized all files to modified BSD license
- Add support for RFC 2625 IP-over-Fibre Channel.
- fixes for DECnet support.
- Support RFC 2684 bridging of Ethernet, 802.5 Token Ring, and FDDI.
- RFC 2684 encapsulation of BPDUs.
-
-Tuesday, February 25, 2003. fenner@research.att.com. 3.7.2 release
-
- Fixed infinite loop when parsing malformed isakmp packets.
- (reported by iDefense; already fixed in CVS)
- Fixed infinite loop when parsing malformed BGP packets.
- Fixed buffer overflow with certain malformed NFS packets.
- Pretty-print unprintable network names in 802.11 printer.
- Handle truncated nbp (appletalk) packets.
- Updated DHCPv6 printer to match draft-ietf-dhc-dhcpv6-22.txt
- Print IP protocol name even if we don't have a printer for it.
- Print IP protocol name or number for fragments.
- Print the whole MPLS label stack, not just the top label.
- Print request header and file handle for NFS v3 FSINFO and PATHCONF
- requests.
- Fix NFS packet truncation checks.
- Handle "old" DR-Priority and Bidir-Capable PIM HELLO options.
- Handle unknown RADIUS attributes properly.
- Fix an ASN.1 parsing error that would cause e.g. the OID
- 2.100.3 to be misrepresented as 4.20.3 .
-
-Monday, January 21, 2002. mcr@sandelman.ottawa.on.ca. Summary for 3.7 release
-see http://www.tcpdump.org/cvs-log/2002-01-21.10:16:48.html for commit log.
- keyword "ipx" added.
- Better OSI/802.2 support on Linux.
- IEEE 802.11 support, from clenahan@fortresstech.com, achirica@ttd.net.
- LLC SAP support for FDDI/token ring/RFC-1483 style ATM
- BXXP protocol was replaced by the BEEP protocol;
- improvements to SNAP demux.
- Changes to "any" interface documentation.
- Documentation on pcap_stats() counters.
- Fix a memory leak found by Miklos Szeredi - pcap_ether_aton().
- Added MPLS encapsulation decoding per RFC3032.
- DNS dissector handles TKEY, TSIG and IXFR.
- adaptive SLIP interface patch from Igor Khristophorov <igor@atdot.org>
- SMB printing has much improved bounds checks
- OUI 0x0000f8 decoded as encapsulated ethernet for Cisco-custom bridging
- Zephyr support, from Nickolai Zeldovich <kolya@MIT.EDU>.
- Solaris - devices with digits in them. Stefan Hudson <hudson@mbay.net>
- IPX socket 0x85be is for Cisco EIGRP over IPX.
- Improvements to fragmented ESP handling.
- SCTP support from Armando L. Caro Jr. <acaro@mail.eecis.udel.edu>
- Linux ARPHDR_ATM support fixed.
- Added a "netbeui" keyword, which selects NetBEUI packets.
- IPv6 ND improvements, MobileIP dissector, 2292bis-02 for RA option.
- Handle ARPHDR_HDLC from Marcus Felipe Pereira <marcus@task.com.br>.
- Handle IPX socket 0x553 -> NetBIOS-over-IPX socket, "nwlink-dgm"
- Better Linux libc5 compat.
- BIND9 lwres dissector added.
- MIPS and SPARC get strict alignment macros (affects print-bgp.c)
- Apple LocalTalk LINKTYPE_ reserved.
- New time stamp formats documented.
- DHCP6 updated to draft-22.txt spec.
- ICMP types/codes now accept symbolic names.
- Add SIGINFO handler from LBL
- encrypted CIPE tunnels in IRIX, from Franz Schaefer <schaefer@mond.at>.
- now we are -Wstrict-prototype clean.
- NetBSD DLT_PPP_ETHER; adapted from Martin Husemann <martin@netbsd.org>.
- PPPoE dissector cleaned up.
- Support for LocalTalk hardware, from Uns Lider <unslider@miranda.org>.
- In dissector, now the caller prints the IP addresses rather than proto.
- cjclark@alum.mit.edu: print the IP proto for non-initial fragments.
- LLC frames with a DSAP and LSAP of 0xe0 are IPX frames.
- Linux cooked frames with a type value of LINUX_SLL_P_802_3 are IPX.
- captures on the "any" device won't be done in promiscuous mode
- Token Ring support on DLPI - Onno van der Linden <onno@simplex.nl>
- ARCNet support, from NetBSD.
- HSRP dissector, from Julian Cowley <julian@lava.net>.
- Handle (GRE-encapsulated) PPTP
- added -C option to rotate save file every optarg * 1,000,000 bytes.
- support for "vrrp" name - NetBSD, by Klaus Klein <kleink@netbsd.org>.
- PPTP support, from Motonori Shindo <mshindo@mshindo.net>.
- IS-IS over PPP support, from Hannes Gredler <hannes@juniper.net>.
- CNFP support for IPv6,format. Harry Raaymakers <harryr@connect.com.au>.
- ESP printing updated to RFC2406.
- HP-UX can now handle large number of PPAs.
- MSDP printer added.
- L2TP dissector improvements from Motonori Shindo.
-
-Tuesday January 9, 2001. mcr@sandelman.ottawa.on.ca. Summary for 3.6 release
- Cleaned up documentation.
- Promisc mode fixes for Linux
- IPsec changes/cleanups.
- Alignment fixes for picky architectures
-
- Removed dependency on native headers for packet dissectors.
- Removed Linux specific headers that were shipped
-
- libpcap changes provide for exchanging capture files between
- systems. Save files now have well known PACKET_ values instead of
- depending upon system dependant mappings of DLT_* types.
-
- Support for computing/checking IP and UDP/TCP checksums.
-
- Updated autoconf stock files.
-
- IPv6 improvements: dhcp (draft-15), mobile-ip6, ppp, ospf6,
-
- Added dissector support for: ISOCLNS, Token Ring, IGMPv3, bxxp,
- timed, vrrp, radius, chdlc, cnfp, cdp, IEEE802.1d, raw-AppleTalk
-
- Added filtering support for: VLANs, ESIS, ISIS
-
- Improvements to: print-telnet, IPTalk, bootp/dhcp, ECN, PPP,
- L2TP, PPPoE
-
- HP-UX 11.0 -- find the right dlpi device.
- Solaris 8 - IPv6 works
- Linux - Added support for an "any" device to capture on all interfaces
-
- Security fixes: buffer overrun audit done. Strcpy replaced with
- strlcpy, sprintf replaced with snprintf.
- Look for lex problems, and warn about them.
-
-
-v3.5 Fri Jan 28 18:00:00 PST 2000
-
-Bill Fenner <fenner@research.att.com>
-- switch to config.h for autoconf
-- unify RCSID strings
-- Updated PIMv1, PIMv2, DVMRP, IGMP parsers, add Cisco Auto-RP parser
-- Really fix the RIP printer
-- Fix MAC address -> name translation.
-- some -Wall -Wformat fixes
-- update makemib to parse much of SMIv2
-- Print TCP sequence # with -vv even if you normally wouldn't
-- Print as much of IP/TCP/UDP headers as possible even if truncated.
-
-itojun@iijlab.net
-- -X will make a ascii dump. from netbsd.
-- telnet command sequence decoder (ff xx xx). from netbsd.
-- print-bgp.c: improve options printing. ugly code exists for
- unaligned option parsing (need some fix).
-- const poisoning in SMB decoder.
-- -Wall -Werror clean checks.
-- bring in KAME IPv6/IPsec decoding code.
-
-Assar Westerlund <assar@sics.se>
-- SNMPv2 and SNMPv3 printer
-- If compiled with libsmi, tcpdump can load MIBs on the fly to decode
- SNMP packets.
-- Incorporate NFS parsing code from NetBSD. Adds support for nfsv3.
-- portability fixes
-- permit building in different directories.
-
-Ken Hornstein <kenh@cmf.nrl.navy.mil>
-- bring in code at
- /afs/transarc.com/public/afs-contrib/tools/tcpdump for parsing
- AFS3 packets
-
-Andrew Tridgell <tridge@linuxcare.com>
-- SMB printing code
-
-Love <lha@stacken.kth.se>
-- print-rx.c: add code for printing MakeDir and StoreStatus. Also
- change date format to the right one.
-
-Michael C. Richardson <mcr@sandelman.ottawa.on.ca>
-- Created tcpdump.org repository
-
-v3.4 Sat Jul 25 12:40:55 PDT 1998
-
-- Hardwire Linux slip support since it's too hard to detect.
-
-- Redo configuration of "network" libraries (-lsocket and -lnsl) to
- deal with IRIX. Thanks to John Hawkinson (jhawk@mit.edu)
-
-- Added -a which tries to translate network and broadcast addresses to
- names. Suggested by Rob van Nieuwkerk (robn@verdi.et.tudelft.nl)
-
-- Added a configure option to disable gcc.
-
-- Added a "raw" packet printer.
-
-- Not having an interface address is no longer fatal. Requested by John
- Hawkinson.
-
-- Rework signal setup to accommodate Linux.
-
-- OSPF truncation check fix. Also display the type of OSPF packets
- using MD5 authentication. Thanks to Brian Wellington
- (bwelling@tis.com)
-
-- Fix truncation check bugs in the Kerberos printer. Reported by Ezra
- Peisach (epeisach@mit.edu)
-
-- Don't catch SIGHUP when invoked with nohup(1). Thanks to Dave Plonka
- (plonka@mfa.com)
-
-- Specify full install target as a way of detecting if install
- directory does not exist. Thanks to Dave Plonka.
-
-- Bit-swap FDDI addresses for BSD/OS too. Thanks to Paul Vixie
- (paul@vix.com)
-
-- Fix off-by-one bug when testing size of ethernet packets. Thanks to
- Marty Leisner (leisner@sdsp.mc.xerox.com)
-
-- Add a local autoconf macro to check for routines in libraries; the
- autoconf version is broken (it only puts the library name in the
- cache variable name). Thanks to John Hawkinson.
-
-- Add a local autoconf macro to check for types; the autoconf version
- is broken (it uses grep instead of actually compiling a code fragment).
-
-- Modified to support the new BSD/OS 2.1 PPP and SLIP link layer header
- formats.
-
-- Extend OSF ip header workaround to versions 1 and 2.
-
-- Fix some signed problems in the nfs printer. As reported by David
- Sacerdote (davids@silence.secnet.com)
-
-- Detect group wheel and use it as the default since BSD/OS' install
- can't hack numeric groups. Reported by David Sacerdote.
-
-- AIX needs special loader options. Thanks to Jonathan I. Kamens
- (jik@cam.ov.com)
-
-- Fixed the nfs printer to print port numbers in decimal. Thanks to
- Kent Vander Velden (graphix@iastate.edu)
-
-- Find installed libpcap in /usr/local/lib when not using gcc.
-
-- Disallow network masks with non-network bits set.
-
-- Attempt to detect "egcs" versions of gcc.
-
-- Add missing closing double quotes when displaying bootp strings.
- Reported by Viet-Trung Luu (vluu@picard.math.uwaterloo.ca)
-
-v3.3 Sat Nov 30 20:56:27 PST 1996
-
-- Added Linux support.
-
-- GRE encapsulated packet printer thanks to John Hawkinson
- (jhawk@mit.edu)
-
-- Rewrite gmt2local() to avoid problematic os dependencies.
-
-- Suppress nfs truncation message on errors.
-
-- Add missing m4 quoting in AC_LBL_UNALIGNED_ACCESS autoconf macro.
- Reported by Joachim Ott (ott@ardala.han.de)
-
-- Enable "ip_hl vs. ip_vhl" workaround for OSF4 too.
-
-- Print arp hardware type in host order. Thanks to Onno van der Linden
- (onno@simplex.nl)
-
-- Avoid solaris compiler warnings. Thanks to Bruce Barnett
- (barnett@grymoire.crd.ge.com)
-
-- Fix rip printer to not print one more route than is actually in the
- packet. Thanks to Jean-Luc Richier (Jean-Luc.Richier@imag.fr) and
- Bill Fenner (fenner@parc.xerox.com)
-
-- Use autoconf endian detection since BYTE_ORDER isn't defined on all systems.
-
-- Fix dvmrp printer truncation checks and add a dvmrp probe printer.
- Thanks to Danny J. Mitzel (mitzel@ipsilon.com)
-
-- Rewrite ospf printer to improve truncation checks.
-
-- Don't parse tcp options past the EOL. As noted by David Sacerdote
- (davids@secnet.com). Also, check tcp options to make sure they ar
- actually in the tcp header (in addition to the normal truncation
- checks). Fix the SACK code to print the N blocks (instead of the
- first block N times).
-
-- Don't say really small UDP packets are truncated just because they
- aren't big enough to be a RPC. As noted by David Sacerdote.
-
-v3.2.1 Sun Jul 14 03:02:26 PDT 1996
-
-- Added rfc1716 icmp codes as suggested by Martin Fredriksson
- (martin@msp.se)
-
-- Print mtu for icmp unreach need frag packets. Thanks to John
- Hawkinson (jhawk@mit.edu)
-
-- Decode icmp router discovery messages. Thanks to Jeffrey Honig
- (jch@bsdi.com)
-
-- Added a printer entry for DLT_IEEE802 as suggested by Tak Kushida
- (kushida@trl.ibm.co.jp)
-
-- Check igmp checksum if possible. Thanks to John Hawkinson.
-
-- Made changes for SINIX. Thanks to Andrej Borsenkow
- (borsenkow.msk@sni.de)
-
-- Use autoconf's idea of the top level directory in install targets.
- Thanks to John Hawkinson.
-
-- Avoid infinite loop in tcp options printing code. Thanks to Jeffrey
- Mogul (mogul@pa.dec.com)
-
-- Avoid using -lsocket in IRIX 5.2 and earlier since it breaks snoop.
- Thanks to John Hawkinson.
-
-- Added some more packet truncation checks.
-
-- On systems that have it, use sigset() instead of signal() since
- signal() has different semantics on these systems.
-
-- Fixed some more alignment problems on the alpha.
-
-- Add code to massage unprintable characters in the domain and ipx
- printers. Thanks to John Hawkinson.
-
-- Added explicit netmask support. Thanks to Steve Nuchia
- (steve@research.oknet.com)
-
-- Add "sca" keyword (for DEC cluster services) as suggested by Terry
- Kennedy (terry@spcvxa.spc.edu)
-
-- Add "atalk" keyword as suggested by John Hawkinson.
-
-- Added an igrp printer. Thanks to Francis Dupont
- (francis.dupont@inria.fr)
-
-- Print IPX net numbers in hex a la Novell Netware. Thanks to Terry
- Kennedy (terry@spcvxa.spc.edu)
-
-- Fixed snmp extended tag field parsing bug. Thanks to Pascal Hennequin
- (pascal.hennequin@hugo.int-evry.fr)
-
-- Added some ETHERTYPEs missing on some systems.
-
-- Added truncated packet macros and various checks.
-
-- Fixed endian problems with the DECnet printer.
-
-- Use $CC when checking gcc version. Thanks to Carl Lindberg
- (carl_lindberg@blacksmith.com)
-
-- Fixes for AIX (although this system is not yet supported). Thanks to
- John Hawkinson.
-
-- Fix bugs in the autoconf misaligned accesses code fragment.
-
-- Include sys/param.h to get BYTE_ORDER in a few places. Thanks to
- Pavlin Ivanov Radoslavov (pavlin@cs.titech.ac.jp)
-
-v3.2 Sun Jun 23 02:28:10 PDT 1996
-
-- Print new icmp unreachable codes as suggested by Martin Fredriksson
- (martin@msp.se). Also print code value when unknown for icmp redirect
- and time exceeded.
-
-- Fix an alignment endian bug in getname(). Thanks to John Hawkinson.
-
-- Define "new" domain record types if not found in arpa/nameserv.h.
- Resulted from a suggestion from John Hawkinson (jhawk@mit.edu). Also
- fixed an endian bug when printing mx record and added some new record
- types.
-
-- Added RIP V2 support. Thanks to Jeffrey Honig (jch@bsdi.com)
-
-- Added T/TCP options printing. As suggested by Richard Stevens
- (rstevens@noao.edu)
-
-- Use autoconf to detect architectures that can't handle misaligned
- accesses.
-
-v3.1 Thu Jun 13 20:59:32 PDT 1996
-
-- Changed u_int32/int32 to u_int32_t/int32_t to be consistent with bsd
- and bind (as suggested by Charles Hannum).
-
-- Port to GNU autoconf.
-
-- Add support for printing DVMRP and PIM traffic thanks to
- Havard Eidnes (Havard.Eidnes@runit.sintef.no).
-
-- Fix AppleTalk, IPX and DECnet byte order problems due to wrong endian
- define being referenced. Reported by Terry Kennedy.
-
-- Minor fixes to the man page thanks to Mark Andrews.
-
-- Endian fixes to RTP and vat packet dumpers, thanks to Bruce Mah
- (bmah@cs.berkeley.edu).
-
-- Added support for new dns types, thanks to Rainer Orth.
-
-- Fixed tftp_print() to print the block number for ACKs.
-
-- Document -dd and -ddd. Resulted from a bug report from Charlie Slater
- (cslater@imatek.com).
-
-- Check return status from malloc/calloc/etc.
-
-- Check return status from pcap_loop() so we can print an error and
- exit with a bad status if there were problems.
-
-- Bail if ip option length is <= 0. Resulted from a bug report from
- Darren Reed (darrenr@vitruvius.arbld.unimelb.edu.au).
-
-- Print out a little more information for sun rpc packets.
-
-- Add suport for Kerberos 4 thanks to John Hawkinson (jhawk@mit.edu).
-
-- Fixed the Fix EXTRACT_SHORT() and EXTRACT_LONG() macros (which were
- wrong on little endian machines).
-
-- Fixed alignment bug in ipx_decode(). Thanks to Matt Crawford
- (crawdad@fnal.gov).
-
-- Fix ntp_print() to not print garbage when the stratum is
- "unspecified." Thanks to Deus Ex Machina (root@belle.bork.com).
-
-- Rewrote tcp options printer code to check for truncation. Added
- selective acknowledgment case.
-
-- Fixed an endian bug in the ospf printer. Thanks to Jeffrey C Honig
- (jch@bsdi.com)
-
-- Fix rip printer to handle 4.4 BSD sockaddr struct which only uses one
- octet for the sa_family member. Thanks to Yoshitaka Tokugawa
- (toku@dit.co.jp)
-
-- Don't checksum ip header if we don't have all of it. Thanks to John
- Hawkinson (jhawk@mit.edu).
-
-- Print out hostnames if possible in egp printer. Thanks to Jeffrey
- Honig (jhc@bsdi.com)
-
-
-v3.1a1 Wed May 3 19:21:11 PDT 1995
-
-- Include time.h when SVR4 is defined to avoid problems under Solaris
- 2.3.
-
-- Fix etheraddr_string() in the ETHER_SERVICE to return the saved
- strings, not the local buffer. Thanks to Stefan Petri
- (petri@ibr.cs.tu-bs.de).
-
-- Detect when pcap raises the snaplen (e.g. with snit). Print a warning
- that the selected value was not used. Thanks to Pascal Hennequin
- (Pascal.Hennequin@hugo.int-evry.fr).
-
-- Add a truncated packet test to print-nfs.c. Thanks to Pascal Hennequin.
-
-- BYTEORDER -> BYTE_ORDER Thanks to Terry Kennedy (terry@spcvxa.spc.edu).
-
-v3.0.3 Sun Oct 1 18:35:00 GMT 1995
-
-- Although there never was a 3.0.3 release, the linux boys cleverly
- "released" one in late 1995.
-
-v3.0.2 Thu Apr 20 21:28:16 PDT 1995
-
-- Change configuration to not use gcc v2 flags with gcc v1.
-
-- Redo gmt2local() so that it works under BSDI (which seems to return
- an empty timezone struct from gettimeofday()). Based on report from
- Terry Kennedy (terry@spcvxa.spc.edu).
-
-- Change configure to recognize IP[0-9]* as "mips" SGI hardware. Based
- on report from Mark Andrews (mandrews@alias.com).
-
-- Don't pass cc flags to gcc. Resulted from a bug report from Rainer
- Orth (ro@techfak.uni-bielefeld.de).
-
-- Fixed printout of connection id for uncompressed tcp slip packets.
- Resulted from a bug report from Richard Stevens (rstevens@noao.edu).
-
-- Hack around deficiency in Ultrix's make.
-
-- Add ETHERTYPE_TRAIL define which is missing from irix5.
-
-v3.0.1 Wed Aug 31 22:42:26 PDT 1994
-
-- Fix problems with gcc2 vs. malloc() and read() prototypes under SunOS 4.
-
-v3.0 Mon Jun 20 19:23:27 PDT 1994
-
-- Added support for printing tcp option timestamps thanks to
- Mark Andrews (mandrews@alias.com).
-
-- Reorganize protocol dumpers to take const pointers to packets so they
- never change the contents (i.e., they used to do endian conversions
- in place). Previously, whenever more than one pass was taken over
- the packet, the packet contents would be dumped incorrectly (i.e.,
- the output form -x would be wrong on little endian machines because
- the protocol dumpers would modify the data). Thanks to Charles Hannum
- (mycroft@gnu.ai.mit.edu) for reporting this problem.
-
-- Added support for decnet protocol dumping thanks to Jeff Mogul
- (mogul@pa.dec.com).
-
-- Fix bug that caused length of packet to be incorrectly printed
- (off by ether header size) for unknown ethernet types thanks
- to Greg Miller (gmiller@kayak.mitre.org).
-
-- Added support for IPX protocol dumping thanks to Brad Parker
- (brad@fcr.com).
-
-- Added check to verify IP header checksum under -v thanks to
- Brad Parker (brad@fcr.com).
-
-- Move packet capture code to new libpcap library (which is
- packaged separately).
-
-- Prototype everything and assume an ansi compiler.
-
-- print-arp.c: Print hardware ethernet addresses if they're not
- what we expect.
-
-- print-bootp.c: Decode the cmu vendor field. Add RFC1497 tags.
- Many helpful suggestions from Gordon Ross (gwr@jericho.mc.com).
-
-- print-fddi.c: Improvements. Thanks to Jeffrey Mogul
- (mogul@pa.dec.com).
-
-- print-icmp.c: Byte swap netmask before printing. Thanks to
- Richard Stevens (rstevens@noao.edu). Print icmp type when unknown.
-
-- print-ip.c: Print the inner ip datagram of ip-in-ip encapsulated packets.
- By default, only the inner packet is dumped, appended with the token
- "(encap)". Under -v, both the inner and output packets are dumped
- (on the same line). Note that the filter applies to the original packet,
- not the encapsulated packet. So if you run tcpdump on a net with an
- IP Multicast tunnel, you cannot filter out the datagrams using the
- conventional syntax. (You can filter away all the ip-in-ip traffic
- with "not ip proto 4".)
-
-- print-nfs.c: Keep pending rpc's in circular table. Add generic
- nfs header and remove os dependences. Thanks to Jeffrey Mogul.
-
-- print-ospf.c: Improvements. Thanks to Jeffrey Mogul.
-
-- tcpdump.c: Add -T flag allows interpretation of "vat", "wb", "rpc"
- (sunrpc) and rtp packets. Added "inbound" and "outbound" keywords
- Add && and || operators
-
-v2.2.1 Tue Jun 6 17:57:22 PDT 1992
-
-- Fix bug with -c flag.
-
-v2.2 Fri May 22 17:19:41 PDT 1992
-
-- savefile.c: Remove hack that shouldn't have been exported. Add
- truncate checks.
-
-- Added the 'icmp' keyword. For example, 'icmp[0] != 8 and icmp[0] != 0'
- matches non-echo/reply ICMP packets.
-
-- Many improvements to filter code optimizer.
-
-- Added 'multicast' keyword and extended the 'broadcast' keyword can now be
- so that protocol qualifications are allowed. For example, "ip broadcast"
- and "ether multicast" are valid filters.
-
-- Added support for monitoring the loopback interface (i.e. 'tcpdump -i lo').
- Jeffrey Honig (jch@MITCHELL.CIT.CORNELL.EDU) contributed the kernel
- patches to netinet/if_loop.c.
-
-- Added support for the Ungermann-Bass Ethernet on IBM/PC-RTs running AOS.
- Contact Jeffrey Honig (jch@MITCHELL.CIT.CORNELL.EDU) for the diffs.
-
-- Added EGP and OSPF printers, thanks to Jeffrey Honig.
-
-v2.1 Tue Jan 28 11:00:14 PST 1992
-
-- Internal release (never publically exported).
-
-v2.0.1 Sun Jan 26 21:10:10 PDT
-
-- Various byte ordering fixes.
-
-- Add truncation checks.
-
-- inet.c: Support BSD style SIOCGIFCONF.
-
-- nametoaddr.c: Handle multi addresses for single host.
-
-- optimize.c: Rewritten.
-
-- pcap-bpf.c: don't choke when we get ptraced. only set promiscuous
- for broadcast nets.
-
-- print-atal.c: Fix an alignment bug (thanks to
- stanonik@nprdc.navy.mil) Add missing printf() argument.
-
-- print-bootp.c: First attempt at decoding the vendor buffer.
-
-- print-domain.c: Fix truncation checks.
-
-- print-icmp.c: Calculate length of packets from the ip header.
-
-- print-ip.c: Print frag id in decimal (so it's easier to match up
- with non-frags). Add support for ospf, egp and igmp.
-
-- print-nfs.c: Lots of changes.
-
-- print-ntp.c: Make some verbose output depend on -v.
-
-- print-snmp.c: New version from John LoVerso.
-
-- print-tcp.c: Print rfc1072 tcp options.
-
-- tcpdump.c: Print "0x" prefix for %x formats. Always print 6 digits
- (microseconds) worth of precision. Fix uid bugs.
-
-- A packet dumper has been added (thanks to Jeff Mogul of DECWRL).
- With this option, you can create an architecture independent binary
- trace file in real time, without the overhead of the packet printer.
- At a later time, the packets can be filtered (again) and printed.
-
-- BSD is supported. You must have BPF in your kernel.
- Since the filtering is now done in the kernel, fewer packets are
- dropped. In fact, with BPF and the packet dumper option, a measly
- Sun 3/50 can keep up with a busy network.
-
-- Compressed SLIP packets can now be dumped, provided you use our
- SLIP software and BPF. These packets are dumped as any other IP
- packet; the compressed headers are dumped with the '-e' option.
-
-- Machines with little-endian byte ordering are supported (thanks to
- Jeff Mogul).
-
-- Ultrix 4.0 is supported (also thanks to Jeff Mogul).
-
-- IBM RT and Stanford Enetfilter support has been added by
- Rayan Zachariassen <rayan@canet.ca>. Tcpdump has been tested under
- both the vanilla Enetfilter interface, and the extended interface
- (#ifdef'd by IBMRTPC) present in the MERIT version of the Enetfilter.
-
-- TFTP packets are now printed (requests only).
-
-- BOOTP packets are now printed.
-
-- SNMP packets are now printed. (thanks to John LoVerso of Xylogics).
-
-- Sparc architectures, including the Sparcstation-1, are now
- supported thanks to Steve McCanne and Craig Leres.
-
-- SunOS 4 is now supported thanks to Micky Liu of Columbia
- University (micky@cunixc.cc.columbia.edu).
-
-- IP options are now printed.
-
-- RIP packets are now printed.
-
-- There's a -v flag that prints out more information than the
- default (e.g., it will enable printing of IP ttl, tos and id)
- and -q flag that prints out less (e.g., it will disable
- interpretation of AppleTalk-in-UDP).
-
-- The grammar has undergone substantial changes (if you have an
- earlier version of tcpdump, you should re-read the manual
- entry).
-
- The most useful change is the addition of an expression
- syntax that lets you filter on arbitrary fields or values in the
- packet. E.g., "ip[0] > 0x45" would print only packets with IP
- options, "tcp[13] & 3 != 0" would print only TCP SYN and FIN
- packets.
-
- The most painful change is that concatenation no longer means
- "and" -- e.g., you have to say "host foo and port bar" instead
- of "host foo port bar". The up side to this down is that
- repeated qualifiers can be omitted, making most filter
- expressions shorter. E.g., you can now say "ip host foo and
- (bar or baz)" to look at ip traffic between hosts foo and bar or
- between hosts foo and baz. [The old way of saying this was "ip
- host foo and (ip host bar or ip host baz)".]
-
-v2.0 Sun Jan 13 12:20:40 PST 1991
-
-- Initial public release.
+++ /dev/null
-This file lists people who have contributed to tcpdump:
-
-The current maintainers:
- Bill Fenner <fenner@research.att.com>
- Fulvio Risso <risso@polito.it>
- Guy Harris <guy@alum.mit.edu>
- Hannes Gredler <hannes@juniper.net>
- Jun-ichiro itojun Hagino <itojun@iijlab.net>
- Michael Richardson <mcr@sandelman.ottawa.on.ca>
-
-Additional people who have contributed patches:
-
- Andrew Brown <atatat@atatdot.net>
- Alfredo Andres <aandres@s21sec.com>
- Andrew Hintz <adhintz@users.sourceforge.net>
- Andrew Tridgell <tridge@linuxcare.com>
- Arkadiusz Miskiewicz <misiek@pld.org.pl>
- Armando L. Caro Jr. <acaro@mail.eecis.udel.edu>
- Atsushi Onoe <onoe@netbsd.org>
- Ben Smithurst <ben@scientia.demon.co.uk>
- Brent L. Bates <blbates@vigyan.com>
- Brian Ginsbach <ginsbach@cray.com>
- Bruce M. Simpson <bms@spc.org>
- Carles Kishimoto Bisbe <ckishimo@ac.upc.es>
- Charlie Lenahan <clenahan@fortresstech.com>
- Charles M. Hannum <mycroft@netbsd.org>
- Chris Cogdon <chris@cogdon.org>
- Chris G. Demetriou <cgd@netbsd.org>
- Chris Jepeway <jepeway@blasted-heath.com>
- Craig Rodrigues <rodrigc@mediaone.net>
- Crist J. Clark <cjclark@alum.mit.edu>
- Daniel Hagerty <hag@ai.mit.edu>
- Darren Reed <darrenr@reed.wattle.id.au>
- David Binderman <d.binderman@virgin.net>
- David Young <dyoung@ojctech.com>
- Francisco Matias Cuenca-Acuna <mcuenca@george.rutgers.edu>
- Frank Volf <volf@oasis.IAEhv.nl>
- Fulvio Risso <risso@polito.it>
- George Bakos <gbakos@ists.dartmouth.edu>
- Gerald Combs <gerald@ethereal.com>
- Gert Doering <gert@greenie.muc.de>
- Greg Stark <gsstark@mit.edu>
- Gilbert Ramirez Jr. <gram@xiexie.org>
- Gisle Vanem <giva@bgnett.no>
- Hank Leininger <tcpdump-workers@progressive-comp.com>
- Harry Raaymakers <harryr@connect.com.au>
- Heinz-Ado Arnolds <Ado.Arnolds@dhm-systems.de>
- Hendrik Scholz <hendrik@scholz.net>
- Jakob Schlyter <jakob@openbsd.org>
- Jan Oravec <wsx@wsx6.net>
- Jason R. Thorpe <thorpej@netbsd.org>
- Jefferson Ogata <jogata@nodc.noaa.gov>
- Jeffrey Hutzelman <jhutz@cmu.edu>
- Jesper Peterson <jesper@endace.com>
- Jim Hutchins <jim@ca.sandia.gov>
- Jonathan Heusser <jonny@drugphish.ch>
- Tatuya Jinmei <jinmei@kame.net>
- Jørgen Thomsen <jth@jth.net>
- Julian Cowley <julian@lava.net>
- Kaarthik Sivakumar <kaarthik@torrentnet.com>
- Kazushi Sugyo <sugyo@pb.jp.nec.com>
- Kelly Carmichael <kcarmich@ipapp.com>
- Ken Hornstein <kenh@cmf.nrl.navy.mil>
- Kevin Steves <stevesk@pobox.com>
- Klaus Klein <kleink@reziprozitaet.de>
- Kris Kennaway <kris@freebsd.org>
- Krzysztof Halasa <khc@pm.waw.pl>
- Larry Lile <lile@stdio.com>
- Lennert Buytenhek <buytenh@gnu.org>
- Loris Degioanni <loris@netgroup-serv.polito.it>
- Love Hörnquist-Åstrand <lha@stacken.kth.se>
- Maciej W. Rozycki <macro@ds2.pg.gda.pl>
- Marc A. Lehmann <pcg@goof.com>
- Mark Ellzey Thomas <mark@ackers.net>
- Marko Kiiskila <carnil@cs.tut.fi>
- Marshall Rose <mrose@dbc.mtview.ca.us>
- Martin Husemann <martin@netbsd.org>
- Michael Madore <mmadore@turbolinux.com>
- Michael Shalayeff <mickey@openbsd.org>
- Michael T. Stolarchuk <mts@off.to>
- Michele "mydecay" Marchetto <smarchetto1@tin.it>
- Monroe Williams <monroe@pobox.com>
- Motonori Shindo <mshindo@mshindo.net>
- Nathan J. Williams <nathanw@MIT.EDU>
- Nathaniel Couper-Noles <Nathaniel@isi1.tccisi.com>
- Neil T. Spring <bluehal@users.sourceforge.net>
- Niels Provos <provos@openbsd.org>
- Nickolai Zeldovich <kolya@MIT.EDU>
- Olaf Kirch <okir@caldera.de>
- Onno van der Linden <onno@simplex.nl>
- Pascal Hennequin <pascal.hennequin@int-evry.fr>
- Pasvorn Boonmark <boonmark@juniper.net>
- Paul Mundt <lethal@linux-sh.org>
- Paul S. Traina <pst@freebsd.org>
- Pavlin Radoslavov <pavlin@icir.org>
- Pekka Savola <pekkas@netcore.fi>
- Peter Fales <peter@fales-lorenz.net>
- Peter Jeremy <peter.jeremy@alcatel.com.au>
- Phil Wood <cpw@lanl.gov>
- Rafal Maszkowski <rzm@icm.edu.pl>
- Rick Jones <raj@cup.hp.com>
- Rick Watson <watsonrick@users.sourceforge.net>
- Rob Braun <bbraun@synack.net>
- Roderick Schertler <roderick@argon.org>
- Sami Farin <safari@iki.fi>
- Scott Rose <syberpunk@users.sourceforge.net>
- Sebastian Krahmer <krahmer@cs.uni-potsdam.de>
- Seth Webster <swebster@sst.ll.mit.edu>
- Takashi Yamamoto <yamt@mwd.biglobe.ne.jp>
- Terry Kennedy <terry@tmk.com>
- Timo Koskiahde
- Tony Li <tli@procket.com>
- Uns Lider <unslider@miranda.org>
- Wilbert de Graaf <wilbertdg@hetnet.nl>
- Yen Yen Lim
-
-The original LBL crew:
- Steve McCanne
- Craig Leres
- Van Jacobson
+++ /dev/null
-CHANGES
-CREDITS
-FILES
-INSTALL
-LICENSE
-Makefile.in
-README
-Readme.Win32
-VERSION
-acconfig.h
-aclocal.m4
-addrtoname.c
-addrtoname.h
-ah.h
-aodv.h
-appletalk.h
-arcnet.h
-atime.awk
-atm.h
-atmuni31.h
-bootp.h
-bpf_dump.c
-chdlc.h
-config.guess
-config.h.in
-config.sub
-configure
-configure.in
-decnet.h
-enc.h
-esp.h
-ether.h
-ethertype.h
-extract.h
-fddi.h
-gmpls.c
-gmpls.h
-gmt2local.c
-gmt2local.h
-icmp6.h
-ieee802_11.h
-igrp.h
-install-sh
-interface.h
-ip.h
-ip6.h
-ipfc.h
-ipproto.h
-ipsec_doi.h
-ipx.h
-isakmp.h
-l2tp.h
-lane.h
-lbl/os-osf4.h
-lbl/os-solaris2.h
-lbl/os-sunos4.h
-lbl/os-ultrix4.h
-llc.h
-machdep.c
-machdep.h
-makemib
-mib.h
-missing/addrinfo.h
-missing/addrsize.h
-missing/bittypes.h
-missing/dlnames.c
-missing/datalinks.c
-missing/getaddrinfo.c
-missing/getnameinfo.c
-missing/inet_aton.c
-missing/inet_ntop.c
-missing/inet_pton.c
-missing/resolv6.h
-missing/resolv_ext.h
-missing/snprintf.c
-missing/sockstorage.h
-missing/strdup.c
-missing/strlcat.c
-missing/strlcpy.c
-missing/strsep.c
-mkdep
-nameser.h
-netbios.h
-nfs.h
-nfsfh.h
-ntp.h
-oakley.h
-ospf.h
-ospf6.h
-packetdat.awk
-parsenfsfh.c
-pcap-missing.h
-ppp.h
-print-802_11.c
-print-ap1394.c
-print-ah.c
-print-aodv.c
-print-arcnet.c
-print-arp.c
-print-ascii.c
-print-atalk.c
-print-atm.c
-print-beep.c
-print-bfd.c
-print-bgp.c
-print-bootp.c
-print-cdp.c
-print-chdlc.c
-print-cip.c
-print-cnfp.c
-print-decnet.c
-print-dhcp6.c
-print-domain.c
-print-dvmrp.c
-print-egp.c
-print-enc.c
-print-esp.c
-print-ether.c
-print-fddi.c
-print-fr.c
-print-frag6.c
-print-gre.c
-print-hsrp.c
-print-icmp.c
-print-icmp6.c
-print-igmp.c
-print-igrp.c
-print-ip.c
-print-ip6.c
-print-ip6opts.c
-print-ipcomp.c
-print-ipfc.c
-print-ipx.c
-print-isakmp.c
-print-isoclns.c
-print-krb.c
-print-l2tp.c
-print-lane.c
-print-ldp.c
-print-llc.c
-print-lwres.c
-print-mobile.c
-print-mobility.c
-print-mpls.c
-print-msdp.c
-print-netbios.c
-print-nfs.c
-print-ntp.c
-print-null.c
-print-ospf.c
-print-ospf6.c
-print-pflog.c
-print-pim.c
-print-ppp.c
-print-pppoe.c
-print-pptp.c
-print-radius.c
-print-raw.c
-print-rip.c
-print-ripng.c
-print-rsvp.c
-print-rt6.c
-print-rx.c
-print-sctp.c
-print-sl.c
-print-sll.c
-print-smb.c
-print-snmp.c
-print-stp.c
-print-sunatm.c
-print-sunrpc.c
-print-tcp.c
-print-telnet.c
-print-tftp.c
-print-timed.c
-print-token.c
-print-udp.c
-print-vjc.c
-print-vrrp.c
-print-wb.c
-print-zephyr.c
-route6d.h
-rx.h
-sctpConstants.h
-sctpHeader.h
-send-ack.awk
-setsignal.c
-setsignal.h
-slcompress.h
-slip.h
-sll.h
-smb.h
-smbutil.c
-stime.awk
-strcasecmp.c
-tcp.h
-tcpdump.1
-tcpdump.c
-tcpdump-stdinc.h
-telnet.h
-timed.h
-token.h
-udp.h
-util.c
-vfprintf.c
-win32/Include/Arpa/tftp.h
-win32/Include/errno.h
-win32/Include/getopt.h
-win32/Include/inetprivate.h
-win32/Include/telnet.h
-win32/Include/w32_fzs.h
-win32/Include/Netinet/in_systm.h
-win32/Include/Netinet/ip.h
-win32/Include/Rpc/rpc.h
-win32/Src/getopt.c
-win32/prj/GNUmakefile
-win32/prj/WinDump.dsp
-win32/prj/WinDump.dsw
+++ /dev/null
-License: BSD
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions
-are met:
-
- 1. Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in
- the documentation and/or other materials provided with the
- distribution.
- 3. The names of the authors may not be used to endorse or promote
- products derived from this software without specific prior
- written permission.
-
-THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
-IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
-WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+++ /dev/null
-== Tested platforms ==
-NetBSD 1.5/i386 (mcr - 2002/1/1)
-Debian Linux (woody/i386) (mcr - 2002/1/1)
-
----
-RedHat Linux 6.1/i386 (assar)
-FreeBSD 2.2.8/i386 (itojun)
-
-
+++ /dev/null
-@(#) $Header: /tcpdump/master/tcpdump/README,v 1.63.2.1 2003/11/16 10:17:30 guy Exp $ (LBL)
-
-TCPDUMP 3.8
-Now maintained by "The Tcpdump Group"
-See www.tcpdump.org
-
-Please send inquiries/comments/reports to tcpdump-workers@tcpdump.org
-
-Anonymous CVS is available via:
- cvs -d :pserver:cvs.tcpdump.org:/tcpdump/master login
- (password "anoncvs")
- cvs -d :pserver:cvs.tcpdump.org:/tcpdump/master checkout tcpdump
-
-Version 3.8 of TCPDUMP can be retrived with the CVS tag "tcpdump_3_8rel1":
- cvs -d :pserver:cvs.tcpdump.org:/tcpdump/master checkout -r tcpdump_3_8rel1 tcpdump
-
-Please send patches against the master copy to patches@tcpdump.org.
-
-formerly from Lawrence Berkeley National Laboratory
- Network Research Group <tcpdump@ee.lbl.gov>
- ftp://ftp.ee.lbl.gov/tcpdump.tar.Z (3.4)
-
-This directory contains source code for tcpdump, a tool for network
-monitoring and data acquisition. This software was originally
-developed by the Network Research Group at the Lawrence Berkeley
-National Laboratory. The original distribution is available via
-anonymous ftp to ftp.ee.lbl.gov, in tcpdump.tar.Z. More recent
-development is performed at tcpdump.org, http://www.tcpdump.org/
-
-Tcpdump uses libpcap, a system-independent interface for user-level
-packet capture. Before building tcpdump, you must first retrieve and
-build libpcap, also originally from LBL and now being maintained by
-tcpdump.org; see http://www.tcpdump.org/ .
-
-Once libpcap is built (either install it or make sure it's in
-../libpcap), you can build tcpdump using the procedure in the INSTALL
-file.
-
-The program is loosely based on SMI's "etherfind" although none of the
-etherfind code remains. It was originally written by Van Jacobson as
-part of an ongoing research project to investigate and improve tcp and
-internet gateway performance. The parts of the program originally
-taken from Sun's etherfind were later re-written by Steven McCanne of
-LBL. To insure that there would be no vestige of proprietary code in
-tcpdump, Steve wrote these pieces from the specification given by the
-manual entry, with no access to the source of tcpdump or etherfind.
-
-Over the past few years, tcpdump has been steadily improved by the
-excellent contributions from the Internet community (just browse
-through the CHANGES file). We are grateful for all the input.
-
-Richard Stevens gives an excellent treatment of the Internet protocols
-in his book ``TCP/IP Illustrated, Volume 1''. If you want to learn more
-about tcpdump and how to interpret its output, pick up this book.
-
-Some tools for viewing and analyzing tcpdump trace files are available
-from the Internet Traffic Archive:
-
- http://www.acm.org/sigcomm/ITA/
-
-Another tool that tcpdump users might find useful is tcpslice:
-
- ftp://ftp.ee.lbl.gov/tcpslice.tar.Z
-
-It is a program that can be used to extract portions of tcpdump binary
-trace files. See the above distribution for further details and
-documentation.
-
-Problems, bugs, questions, desirable enhancements, etc. should be sent
-to the address "tcpdump-workers@tcpdump.org". Bugs, support requests,
-and feature requests may also be submitted on the SourceForge site for
-tcpdump at
-
- http://sourceforge.net/projects/tcpdump/
-
-Source code contributions, etc. should be sent to the email address
-"patches@tcpdump.org", or submitted as patches on the SourceForge site
-for tcpdump.
-
-Current versions can be found at www.tcpdump.org, or the SourceForge
-site for tcpdump.
-
- - The TCPdump team
-
-original text by: Steve McCanne, Craig Leres, Van Jacobson
-
--------------------------------------
-This directory also contains some short awk programs intended as
-examples of ways to reduce tcpdump data when you're tracking
-particular network problems:
-
-send-ack.awk
- Simplifies the tcpdump trace for an ftp (or other unidirectional
- tcp transfer). Since we assume that one host only sends and
- the other only acks, all address information is left off and
- we just note if the packet is a "send" or an "ack".
-
- There is one output line per line of the original trace.
- Field 1 is the packet time in decimal seconds, relative
- to the start of the conversation. Field 2 is delta-time
- from last packet. Field 3 is packet type/direction.
- "Send" means data going from sender to receiver, "ack"
- means an ack going from the receiver to the sender. A
- preceding "*" indicates that the data is a retransmission.
- A preceding "-" indicates a hole in the sequence space
- (i.e., missing packet(s)), a "#" means an odd-size (not max
- seg size) packet. Field 4 has the packet flags
- (same format as raw trace). Field 5 is the sequence
- number (start seq. num for sender, next expected seq number
- for acks). The number in parens following an ack is
- the delta-time from the first send of the packet to the
- ack. A number in parens following a send is the
- delta-time from the first send of the packet to the
- current send (on duplicate packets only). Duplicate
- sends or acks have a number in square brackets showing
- the number of duplicates so far.
-
- Here is a short sample from near the start of an ftp:
- 3.00 0.20 send . 512
- 3.20 0.20 ack . 1024 (0.20)
- 3.20 0.00 send P 1024
- 3.40 0.20 ack . 1536 (0.20)
- 3.80 0.40 * send . 0 (3.80) [2]
- 3.82 0.02 * ack . 1536 (0.62) [2]
- Three seconds into the conversation, bytes 512 through 1023
- were sent. 200ms later they were acked. Shortly thereafter
- bytes 1024-1535 were sent and again acked after 200ms.
- Then, for no apparent reason, 0-511 is retransmitted, 3.8
- seconds after its initial send (the round trip time for this
- ftp was 1sec, +-500ms). Since the receiver is expecting
- 1536, 1536 is re-acked when 0 arrives.
-
-packetdat.awk
- Computes chunk summary data for an ftp (or similar
- unidirectional tcp transfer). [A "chunk" refers to
- a chunk of the sequence space -- essentially the packet
- sequence number divided by the max segment size.]
-
- A summary line is printed showing the number of chunks,
- the number of packets it took to send that many chunks
- (if there are no lost or duplicated packets, the number
- of packets should equal the number of chunks) and the
- number of acks.
-
- Following the summary line is one line of information
- per chunk. The line contains eight fields:
- 1 - the chunk number
- 2 - the start sequence number for this chunk
- 3 - time of first send
- 4 - time of last send
- 5 - time of first ack
- 6 - time of last ack
- 7 - number of times chunk was sent
- 8 - number of times chunk was acked
- (all times are in decimal seconds, relative to the start
- of the conversation.)
-
- As an example, here is the first part of the output for
- an ftp trace:
-
- # 134 chunks. 536 packets sent. 508 acks.
- 1 1 0.00 5.80 0.20 0.20 4 1
- 2 513 0.28 6.20 0.40 0.40 4 1
- 3 1025 1.16 6.32 1.20 1.20 4 1
- 4 1561 1.86 15.00 2.00 2.00 6 1
- 5 2049 2.16 15.44 2.20 2.20 5 1
- 6 2585 2.64 16.44 2.80 2.80 5 1
- 7 3073 3.00 16.66 3.20 3.20 4 1
- 8 3609 3.20 17.24 3.40 5.82 4 11
- 9 4097 6.02 6.58 6.20 6.80 2 5
-
- This says that 134 chunks were transferred (about 70K
- since the average packet size was 512 bytes). It took
- 536 packets to transfer the data (i.e., on the average
- each chunk was transmitted four times). Looking at,
- say, chunk 4, we see it represents the 512 bytes of
- sequence space from 1561 to 2048. It was first sent
- 1.86 seconds into the conversation. It was last
- sent 15 seconds into the conversation and was sent
- a total of 6 times (i.e., it was retransmitted every
- 2 seconds on the average). It was acked once, 140ms
- after it first arrived.
-
-stime.awk
-atime.awk
- Output one line per send or ack, respectively, in the form
- <time> <seq. number>
- where <time> is the time in seconds since the start of the
- transfer and <seq. number> is the sequence number being sent
- or acked. I typically plot this data looking for suspicious
- patterns.
-
-
-The problem I was looking at was the bulk-data-transfer
-throughput of medium delay network paths (1-6 sec. round trip
-time) under typical DARPA Internet conditions. The trace of the
-ftp transfer of a large file was used as the raw data source.
-The method was:
-
- - On a local host (but not the Sun running tcpdump), connect to
- the remote ftp.
-
- - On the monitor Sun, start the trace going. E.g.,
- tcpdump host local-host and remote-host and port ftp-data >tracefile
-
- - On local, do either a get or put of a large file (~500KB),
- preferably to the null device (to minimize effects like
- closing the receive window while waiting for a disk write).
-
- - When transfer is finished, stop tcpdump. Use awk to make up
- two files of summary data (maxsize is the maximum packet size,
- tracedata is the file of tcpdump tracedata):
- awk -f send-ack.awk packetsize=avgsize tracedata >sa
- awk -f packetdat.awk packetsize=avgsize tracedata >pd
-
- - While the summary data files are printing, take a look at
- how the transfer behaved:
- awk -f stime.awk tracedata | xgraph
- (90% of what you learn seems to happen in this step).
-
- - Do all of the above steps several times, both directions,
- at different times of day, with different protocol
- implementations on the other end.
-
- - Using one of the Unix data analysis packages (in my case,
- S and Gary Perlman's Unix|Stat), spend a few months staring
- at the data.
-
- - Change something in the local protocol implementation and
- redo the steps above.
-
- - Once a week, tell your funding agent that you're discovering
- wonderful things and you'll write up that research report
- "real soon now".
+++ /dev/null
-mkdep
-win32/
-install-sh
-configure
-configure.in
-aclocal.m4
-Readme.Win32
-config.sub
-config.guess
-config.h.in
-Makefile.in
-Makefile-devel-adds
-INSTALL
-lbl/
-acconfig.h
+++ /dev/null
-
-Original Source can be downloaded from:
-http://www.tcpdump.org/release/tcpdump-3.8.3.tar.gz
-MD5 (tcpdump-3.8.3.tar.gz) = 30645001f4b97019677cad88d3811904
-
-
-A list of files and directories removed is in README.DELETED
+++ /dev/null
-1. update credits
-2. review "FILES"
-3. search for version info
-4. get PLATFORMS filled in
-5. update CHANGES file
-6. do same for libpcap
+++ /dev/null
-/*
- * Copyright (c) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that: (1) source code distributions
- * retain the above copyright notice and this paragraph in its entirety, (2)
- * distributions including binary code include the above copyright notice and
- * this paragraph in its entirety in the documentation or other materials
- * provided with the distribution, and (3) all advertising materials mentioning
- * features or use of this software display the following acknowledgement:
- * ``This product includes software developed by the University of California,
- * Lawrence Berkeley Laboratory and its contributors.'' Neither the name of
- * the University nor the names of its contributors may be used to endorse
- * or promote products derived from this software without specific prior
- * written permission.
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Internet, ethernet, port, and protocol string to address
- * and address to string conversion routines
- */
-#ifndef lint
-static const char rcsid[] _U_ =
- "@(#) $Header: /tcpdump/master/tcpdump/addrtoname.c,v 1.96.2.6 2004/03/24 04:14:31 guy Exp $ (LBL)";
-#endif
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include <tcpdump-stdinc.h>
-
-#ifdef USE_ETHER_NTOHOST
-#ifdef HAVE_NETINET_IF_ETHER_H
-struct mbuf; /* Squelch compiler warnings on some platforms for */
-struct rtentry; /* declarations in <net/if.h> */
-#include <net/if.h> /* for "struct ifnet" in "struct arpcom" on Solaris */
-#include <netinet/if_ether.h>
-#endif /* HAVE_NETINET_IF_ETHER_H */
-#ifdef HAVE_NETINET_ETHER_H
-#include <netinet/ether.h> /* ether_ntohost on linux */
-#endif /* HAVE_NETINET_ETHER_H */
-#endif /* USE_ETHER_NTOHOST */
-
-#include <pcap.h>
-#include <pcap-namedb.h>
-#include <signal.h>
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-
-#include "interface.h"
-#include "addrtoname.h"
-#include "llc.h"
-#include "setsignal.h"
-
-/*
- * hash tables for whatever-to-name translations
- *
- * XXX there has to be error checks against strdup(3) failure
- */
-
-#define HASHNAMESIZE 4096
-
-struct hnamemem {
- u_int32_t addr;
- const char *name;
- struct hnamemem *nxt;
-};
-
-struct hnamemem hnametable[HASHNAMESIZE];
-struct hnamemem tporttable[HASHNAMESIZE];
-struct hnamemem uporttable[HASHNAMESIZE];
-struct hnamemem eprototable[HASHNAMESIZE];
-struct hnamemem dnaddrtable[HASHNAMESIZE];
-struct hnamemem llcsaptable[HASHNAMESIZE];
-struct hnamemem ipxsaptable[HASHNAMESIZE];
-
-#if defined(INET6) && defined(WIN32)
-/*
- * fake gethostbyaddr for Win2k/XP
- * gethostbyaddr() returns incorrect value when AF_INET6 is passed
- * to 3rd argument.
- *
- * h_name in struct hostent is only valid.
- */
-static struct hostent *
-win32_gethostbyaddr(const char *addr, int len, int type)
-{
- static struct hostent host;
- static char hostbuf[NI_MAXHOST];
- char hname[NI_MAXHOST];
- struct sockaddr_in6 addr6;
-
- host.h_name = hostbuf;
- switch (type) {
- case AF_INET:
- return gethostbyaddr(addr, len, type);
- break;
- case AF_INET6:
- memset(&addr6, 0, sizeof(addr6));
- addr6.sin6_family = AF_INET6;
- memcpy(&addr6.sin6_addr, addr, len);
-#ifdef __MINGW32__
- /* MinGW doesn't provide getnameinfo */
- return NULL;
-#else
- if (getnameinfo((struct sockaddr *)&addr6, sizeof(addr6),
- hname, sizeof(hname), NULL, 0, 0)) {
- return NULL;
- } else {
- strcpy(host.h_name, hname);
- return &host;
- }
-#endif /* __MINGW32__ */
- break;
- default:
- return NULL;
- }
-}
-#define gethostbyaddr win32_gethostbyaddr
-#endif /* INET6 & WIN32*/
-
-#ifdef INET6
-struct h6namemem {
- struct in6_addr addr;
- char *name;
- struct h6namemem *nxt;
-};
-
-struct h6namemem h6nametable[HASHNAMESIZE];
-#endif /* INET6 */
-
-struct enamemem {
- u_short e_addr0;
- u_short e_addr1;
- u_short e_addr2;
- const char *e_name;
- u_char *e_nsap; /* used only for nsaptable[] */
-#define e_bs e_nsap /* for bytestringtable */
- struct enamemem *e_nxt;
-};
-
-struct enamemem enametable[HASHNAMESIZE];
-struct enamemem nsaptable[HASHNAMESIZE];
-struct enamemem bytestringtable[HASHNAMESIZE];
-
-struct protoidmem {
- u_int32_t p_oui;
- u_short p_proto;
- const char *p_name;
- struct protoidmem *p_nxt;
-};
-
-struct protoidmem protoidtable[HASHNAMESIZE];
-
-/*
- * A faster replacement for inet_ntoa().
- */
-const char *
-intoa(u_int32_t addr)
-{
- register char *cp;
- register u_int byte;
- register int n;
- static char buf[sizeof(".xxx.xxx.xxx.xxx")];
-
- NTOHL(addr);
- cp = &buf[sizeof buf];
- *--cp = '\0';
-
- n = 4;
- do {
- byte = addr & 0xff;
- *--cp = byte % 10 + '0';
- byte /= 10;
- if (byte > 0) {
- *--cp = byte % 10 + '0';
- byte /= 10;
- if (byte > 0)
- *--cp = byte + '0';
- }
- *--cp = '.';
- addr >>= 8;
- } while (--n > 0);
-
- return cp + 1;
-}
-
-static u_int32_t f_netmask;
-static u_int32_t f_localnet;
-
-/*
- * Return a name for the IP address pointed to by ap. This address
- * is assumed to be in network byte order.
- *
- * NOTE: ap is *NOT* necessarily part of the packet data (not even if
- * this is being called with the "ipaddr_string()" macro), so you
- * *CANNOT* use the TCHECK{2}/TTEST{2} macros on it. Furthermore,
- * even in cases where it *is* part of the packet data, the caller
- * would still have to check for a null return value, even if it's
- * just printing the return value with "%s" - not all versions of
- * printf print "(null)" with "%s" and a null pointer, some of them
- * don't check for a null pointer and crash in that case.
- *
- * The callers of this routine should, before handing this routine
- * a pointer to packet data, be sure that the data is present in
- * the packet buffer. They should probably do those checks anyway,
- * as other data at that layer might not be IP addresses, and it
- * also needs to check whether they're present in the packet buffer.
- */
-const char *
-getname(const u_char *ap)
-{
- register struct hostent *hp;
- u_int32_t addr;
- static struct hnamemem *p; /* static for longjmp() */
-
- memcpy(&addr, ap, sizeof(addr));
- p = &hnametable[addr & (HASHNAMESIZE-1)];
- for (; p->nxt; p = p->nxt) {
- if (p->addr == addr)
- return (p->name);
- }
- p->addr = addr;
- p->nxt = newhnamemem();
-
- /*
- * Print names unless:
- * (1) -n was given.
- * (2) Address is foreign and -f was given. (If -f was not
- * given, f_netmask and f_localnet are 0 and the test
- * evaluates to true)
- */
- if (!nflag &&
- (addr & f_netmask) == f_localnet) {
- hp = gethostbyaddr((char *)&addr, 4, AF_INET);
- if (hp) {
- char *dotp;
-
- p->name = strdup(hp->h_name);
- if (Nflag) {
- /* Remove domain qualifications */
- dotp = strchr(p->name, '.');
- if (dotp)
- *dotp = '\0';
- }
- return (p->name);
- }
- }
- p->name = strdup(intoa(addr));
- return (p->name);
-}
-
-#ifdef INET6
-/*
- * Return a name for the IP6 address pointed to by ap. This address
- * is assumed to be in network byte order.
- */
-const char *
-getname6(const u_char *ap)
-{
- register struct hostent *hp;
- struct in6_addr addr;
- static struct h6namemem *p; /* static for longjmp() */
- register const char *cp;
- char ntop_buf[INET6_ADDRSTRLEN];
-
- memcpy(&addr, ap, sizeof(addr));
- p = &h6nametable[*(u_int16_t *)&addr.s6_addr[14] & (HASHNAMESIZE-1)];
- for (; p->nxt; p = p->nxt) {
- if (memcmp(&p->addr, &addr, sizeof(addr)) == 0)
- return (p->name);
- }
- p->addr = addr;
- p->nxt = newh6namemem();
-
- /*
- * Do not print names if -n was given.
- */
- if (!nflag) {
- hp = gethostbyaddr((char *)&addr, sizeof(addr), AF_INET6);
- if (hp) {
- char *dotp;
-
- p->name = strdup(hp->h_name);
- if (Nflag) {
- /* Remove domain qualifications */
- dotp = strchr(p->name, '.');
- if (dotp)
- *dotp = '\0';
- }
- return (p->name);
- }
- }
- cp = inet_ntop(AF_INET6, &addr, ntop_buf, sizeof(ntop_buf));
- p->name = strdup(cp);
- return (p->name);
-}
-#endif /* INET6 */
-
-static char hex[] = "0123456789abcdef";
-
-
-/* Find the hash node that corresponds the ether address 'ep' */
-
-static inline struct enamemem *
-lookup_emem(const u_char *ep)
-{
- register u_int i, j, k;
- struct enamemem *tp;
-
- k = (ep[0] << 8) | ep[1];
- j = (ep[2] << 8) | ep[3];
- i = (ep[4] << 8) | ep[5];
-
- tp = &enametable[(i ^ j) & (HASHNAMESIZE-1)];
- while (tp->e_nxt)
- if (tp->e_addr0 == i &&
- tp->e_addr1 == j &&
- tp->e_addr2 == k)
- return tp;
- else
- tp = tp->e_nxt;
- tp->e_addr0 = i;
- tp->e_addr1 = j;
- tp->e_addr2 = k;
- tp->e_nxt = (struct enamemem *)calloc(1, sizeof(*tp));
- if (tp->e_nxt == NULL)
- error("lookup_emem: calloc");
-
- return tp;
-}
-
-/*
- * Find the hash node that corresponds to the bytestring 'bs'
- * with length 'nlen'
- */
-
-static inline struct enamemem *
-lookup_bytestring(register const u_char *bs, const unsigned int nlen)
-{
- struct enamemem *tp;
- register u_int i, j, k;
-
- if (nlen >= 6) {
- k = (bs[0] << 8) | bs[1];
- j = (bs[2] << 8) | bs[3];
- i = (bs[4] << 8) | bs[5];
- } else if (nlen >= 4) {
- k = (bs[0] << 8) | bs[1];
- j = (bs[2] << 8) | bs[3];
- i = 0;
- } else
- i = j = k = 0;
-
- tp = &bytestringtable[(i ^ j) & (HASHNAMESIZE-1)];
- while (tp->e_nxt)
- if (tp->e_addr0 == i &&
- tp->e_addr1 == j &&
- tp->e_addr2 == k &&
- memcmp((const char *)bs, (const char *)(tp->e_bs), nlen) == 0)
- return tp;
- else
- tp = tp->e_nxt;
-
- tp->e_addr0 = i;
- tp->e_addr1 = j;
- tp->e_addr2 = k;
-
- tp->e_bs = (u_char *) calloc(1, nlen + 1);
- memcpy(tp->e_bs, bs, nlen);
- tp->e_nxt = (struct enamemem *)calloc(1, sizeof(*tp));
- if (tp->e_nxt == NULL)
- error("lookup_bytestring: calloc");
-
- return tp;
-}
-
-/* Find the hash node that corresponds the NSAP 'nsap' */
-
-static inline struct enamemem *
-lookup_nsap(register const u_char *nsap)
-{
- register u_int i, j, k;
- unsigned int nlen = *nsap;
- struct enamemem *tp;
- const u_char *ensap = nsap + nlen - 6;
-
- if (nlen > 6) {
- k = (ensap[0] << 8) | ensap[1];
- j = (ensap[2] << 8) | ensap[3];
- i = (ensap[4] << 8) | ensap[5];
- }
- else
- i = j = k = 0;
-
- tp = &nsaptable[(i ^ j) & (HASHNAMESIZE-1)];
- while (tp->e_nxt)
- if (tp->e_addr0 == i &&
- tp->e_addr1 == j &&
- tp->e_addr2 == k &&
- tp->e_nsap[0] == nlen &&
- memcmp((const char *)&(nsap[1]),
- (char *)&(tp->e_nsap[1]), nlen) == 0)
- return tp;
- else
- tp = tp->e_nxt;
- tp->e_addr0 = i;
- tp->e_addr1 = j;
- tp->e_addr2 = k;
- tp->e_nsap = (u_char *)malloc(nlen + 1);
- if (tp->e_nsap == NULL)
- error("lookup_nsap: malloc");
- memcpy((char *)tp->e_nsap, (const char *)nsap, nlen + 1);
- tp->e_nxt = (struct enamemem *)calloc(1, sizeof(*tp));
- if (tp->e_nxt == NULL)
- error("lookup_nsap: calloc");
-
- return tp;
-}
-
-/* Find the hash node that corresponds the protoid 'pi'. */
-
-static inline struct protoidmem *
-lookup_protoid(const u_char *pi)
-{
- register u_int i, j;
- struct protoidmem *tp;
-
- /* 5 octets won't be aligned */
- i = (((pi[0] << 8) + pi[1]) << 8) + pi[2];
- j = (pi[3] << 8) + pi[4];
- /* XXX should be endian-insensitive, but do big-endian testing XXX */
-
- tp = &protoidtable[(i ^ j) & (HASHNAMESIZE-1)];
- while (tp->p_nxt)
- if (tp->p_oui == i && tp->p_proto == j)
- return tp;
- else
- tp = tp->p_nxt;
- tp->p_oui = i;
- tp->p_proto = j;
- tp->p_nxt = (struct protoidmem *)calloc(1, sizeof(*tp));
- if (tp->p_nxt == NULL)
- error("lookup_protoid: calloc");
-
- return tp;
-}
-
-const char *
-etheraddr_string(register const u_char *ep)
-{
- register u_int i;
- register char *cp;
- register struct enamemem *tp;
- char buf[sizeof("00:00:00:00:00:00")];
-
- tp = lookup_emem(ep);
- if (tp->e_name)
- return (tp->e_name);
-#ifdef USE_ETHER_NTOHOST
- if (!nflag) {
- char buf2[128];
- if (ether_ntohost(buf2, (const struct ether_addr *)ep) == 0) {
- tp->e_name = strdup(buf2);
- return (tp->e_name);
- }
- }
-#endif
- cp = buf;
- *cp++ = hex[*ep >> 4 ];
- *cp++ = hex[*ep++ & 0xf];
- for (i = 5; (int)--i >= 0;) {
- *cp++ = ':';
- *cp++ = hex[*ep >> 4 ];
- *cp++ = hex[*ep++ & 0xf];
- }
- *cp = '\0';
- tp->e_name = strdup(buf);
- return (tp->e_name);
-}
-
-const char *
-linkaddr_string(const u_char *ep, const unsigned int len)
-{
- register u_int i, j;
- register char *cp;
- register struct enamemem *tp;
-
- if (len == 6) /* XXX not totally correct... */
- return etheraddr_string(ep);
-
- tp = lookup_bytestring(ep, len);
- if (tp->e_name)
- return (tp->e_name);
-
- tp->e_name = cp = (char *)malloc(len*3);
- if (tp->e_name == NULL)
- error("linkaddr_string: malloc");
- if ((j = *ep >> 4) != 0)
- *cp++ = hex[j];
- *cp++ = hex[*ep++ & 0xf];
- for (i = len-1; i > 0 ; --i) {
- *cp++ = ':';
- if ((j = *ep >> 4) != 0)
- *cp++ = hex[j];
- *cp++ = hex[*ep++ & 0xf];
- }
- *cp = '\0';
- return (tp->e_name);
-}
-
-const char *
-etherproto_string(u_short port)
-{
- register char *cp;
- register struct hnamemem *tp;
- register u_int32_t i = port;
- char buf[sizeof("0000")];
-
- for (tp = &eprototable[i & (HASHNAMESIZE-1)]; tp->nxt; tp = tp->nxt)
- if (tp->addr == i)
- return (tp->name);
-
- tp->addr = i;
- tp->nxt = newhnamemem();
-
- cp = buf;
- NTOHS(port);
- *cp++ = hex[port >> 12 & 0xf];
- *cp++ = hex[port >> 8 & 0xf];
- *cp++ = hex[port >> 4 & 0xf];
- *cp++ = hex[port & 0xf];
- *cp++ = '\0';
- tp->name = strdup(buf);
- return (tp->name);
-}
-
-const char *
-protoid_string(register const u_char *pi)
-{
- register u_int i, j;
- register char *cp;
- register struct protoidmem *tp;
- char buf[sizeof("00:00:00:00:00")];
-
- tp = lookup_protoid(pi);
- if (tp->p_name)
- return tp->p_name;
-
- cp = buf;
- if ((j = *pi >> 4) != 0)
- *cp++ = hex[j];
- *cp++ = hex[*pi++ & 0xf];
- for (i = 4; (int)--i >= 0;) {
- *cp++ = ':';
- if ((j = *pi >> 4) != 0)
- *cp++ = hex[j];
- *cp++ = hex[*pi++ & 0xf];
- }
- *cp = '\0';
- tp->p_name = strdup(buf);
- return (tp->p_name);
-}
-
-const char *
-llcsap_string(u_char sap)
-{
- register struct hnamemem *tp;
- register u_int32_t i = sap;
- char buf[sizeof("sap 00")];
-
- for (tp = &llcsaptable[i & (HASHNAMESIZE-1)]; tp->nxt; tp = tp->nxt)
- if (tp->addr == i)
- return (tp->name);
-
- tp->addr = i;
- tp->nxt = newhnamemem();
-
- snprintf(buf, sizeof(buf), "sap %02x", sap & 0xff);
- tp->name = strdup(buf);
- return (tp->name);
-}
-
-const char *
-isonsap_string(const u_char *nsap)
-{
- register u_int i, nlen = nsap[0];
- register char *cp;
- register struct enamemem *tp;
-
- tp = lookup_nsap(nsap);
- if (tp->e_name)
- return tp->e_name;
-
- tp->e_name = cp = (char *)malloc(nlen * 2 + 2);
- if (cp == NULL)
- error("isonsap_string: malloc");
-
- nsap++;
- *cp++ = '/';
- for (i = nlen; (int)--i >= 0;) {
- *cp++ = hex[*nsap >> 4];
- *cp++ = hex[*nsap++ & 0xf];
- }
- *cp = '\0';
- return (tp->e_name);
-}
-
-const char *
-tcpport_string(u_short port)
-{
- register struct hnamemem *tp;
- register u_int32_t i = port;
- char buf[sizeof("00000")];
-
- for (tp = &tporttable[i & (HASHNAMESIZE-1)]; tp->nxt; tp = tp->nxt)
- if (tp->addr == i)
- return (tp->name);
-
- tp->addr = i;
- tp->nxt = newhnamemem();
-
- (void)snprintf(buf, sizeof(buf), "%u", i);
- tp->name = strdup(buf);
- return (tp->name);
-}
-
-const char *
-udpport_string(register u_short port)
-{
- register struct hnamemem *tp;
- register u_int32_t i = port;
- char buf[sizeof("00000")];
-
- for (tp = &uporttable[i & (HASHNAMESIZE-1)]; tp->nxt; tp = tp->nxt)
- if (tp->addr == i)
- return (tp->name);
-
- tp->addr = i;
- tp->nxt = newhnamemem();
-
- (void)snprintf(buf, sizeof(buf), "%u", i);
- tp->name = strdup(buf);
- return (tp->name);
-}
-
-const char *
-ipxsap_string(u_short port)
-{
- register char *cp;
- register struct hnamemem *tp;
- register u_int32_t i = port;
- char buf[sizeof("0000")];
-
- for (tp = &ipxsaptable[i & (HASHNAMESIZE-1)]; tp->nxt; tp = tp->nxt)
- if (tp->addr == i)
- return (tp->name);
-
- tp->addr = i;
- tp->nxt = newhnamemem();
-
- cp = buf;
- NTOHS(port);
- *cp++ = hex[port >> 12 & 0xf];
- *cp++ = hex[port >> 8 & 0xf];
- *cp++ = hex[port >> 4 & 0xf];
- *cp++ = hex[port & 0xf];
- *cp++ = '\0';
- tp->name = strdup(buf);
- return (tp->name);
-}
-
-static void
-init_servarray(void)
-{
- struct servent *sv;
- register struct hnamemem *table;
- register int i;
- char buf[sizeof("0000000000")];
-
- while ((sv = getservent()) != NULL) {
- int port = ntohs(sv->s_port);
- i = port & (HASHNAMESIZE-1);
- if (strcmp(sv->s_proto, "tcp") == 0)
- table = &tporttable[i];
- else if (strcmp(sv->s_proto, "udp") == 0)
- table = &uporttable[i];
- else
- continue;
-
- while (table->name)
- table = table->nxt;
- if (nflag) {
- (void)snprintf(buf, sizeof(buf), "%d", port);
- table->name = strdup(buf);
- } else
- table->name = strdup(sv->s_name);
- table->addr = port;
- table->nxt = newhnamemem();
- }
- endservent();
-}
-
-/*XXX from libbpfc.a */
-#ifndef WIN32
-extern struct eproto {
-#else
-__declspec( dllimport) struct eproto {
-#endif
- char *s;
- u_short p;
-} eproto_db[];
-
-static void
-init_eprotoarray(void)
-{
- register int i;
- register struct hnamemem *table;
-
- for (i = 0; eproto_db[i].s; i++) {
- int j = htons(eproto_db[i].p) & (HASHNAMESIZE-1);
- table = &eprototable[j];
- while (table->name)
- table = table->nxt;
- table->name = eproto_db[i].s;
- table->addr = htons(eproto_db[i].p);
- table->nxt = newhnamemem();
- }
-}
-
-static struct protoidlist {
- const u_char protoid[5];
- const char *name;
-} protoidlist[] = {
- {{ 0x00, 0x00, 0x0c, 0x01, 0x07 }, "CiscoMLS" },
- {{ 0x00, 0x00, 0x0c, 0x20, 0x00 }, "CiscoCDP" },
- {{ 0x00, 0x00, 0x0c, 0x20, 0x01 }, "CiscoCGMP" },
- {{ 0x00, 0x00, 0x0c, 0x20, 0x03 }, "CiscoVTP" },
- {{ 0x00, 0xe0, 0x2b, 0x00, 0xbb }, "ExtremeEDP" },
- {{ 0x00, 0x00, 0x00, 0x00, 0x00 }, NULL }
-};
-
-/*
- * SNAP proto IDs with org code 0:0:0 are actually encapsulated Ethernet
- * types.
- */
-static void
-init_protoidarray(void)
-{
- register int i;
- register struct protoidmem *tp;
- struct protoidlist *pl;
- u_char protoid[5];
-
- protoid[0] = 0;
- protoid[1] = 0;
- protoid[2] = 0;
- for (i = 0; eproto_db[i].s; i++) {
- u_short etype = htons(eproto_db[i].p);
-
- memcpy((char *)&protoid[3], (char *)&etype, 2);
- tp = lookup_protoid(protoid);
- tp->p_name = strdup(eproto_db[i].s);
- }
- /* Hardwire some SNAP proto ID names */
- for (pl = protoidlist; pl->name != NULL; ++pl) {
- tp = lookup_protoid(pl->protoid);
- /* Don't override existing name */
- if (tp->p_name != NULL)
- continue;
-
- tp->p_name = pl->name;
- }
-}
-
-static struct etherlist {
- const u_char addr[6];
- const char *name;
-} etherlist[] = {
- {{ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff }, "Broadcast" },
- {{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, NULL }
-};
-
-/*
- * Initialize the ethers hash table. We take two different approaches
- * depending on whether or not the system provides the ethers name
- * service. If it does, we just wire in a few names at startup,
- * and etheraddr_string() fills in the table on demand. If it doesn't,
- * then we suck in the entire /etc/ethers file at startup. The idea
- * is that parsing the local file will be fast, but spinning through
- * all the ethers entries via NIS & next_etherent might be very slow.
- *
- * XXX pcap_next_etherent doesn't belong in the pcap interface, but
- * since the pcap module already does name-to-address translation,
- * it's already does most of the work for the ethernet address-to-name
- * translation, so we just pcap_next_etherent as a convenience.
- */
-static void
-init_etherarray(void)
-{
- register struct etherlist *el;
- register struct enamemem *tp;
-#ifdef USE_ETHER_NTOHOST
- char name[256];
-#else
- register struct pcap_etherent *ep;
- register FILE *fp;
-
- /* Suck in entire ethers file */
- fp = fopen(PCAP_ETHERS_FILE, "r");
- if (fp != NULL) {
- while ((ep = pcap_next_etherent(fp)) != NULL) {
- tp = lookup_emem(ep->addr);
- tp->e_name = strdup(ep->name);
- }
- (void)fclose(fp);
- }
-#endif
-
- /* Hardwire some ethernet names */
- for (el = etherlist; el->name != NULL; ++el) {
- tp = lookup_emem(el->addr);
- /* Don't override existing name */
- if (tp->e_name != NULL)
- continue;
-
-#ifdef USE_ETHER_NTOHOST
- /* Use yp/nis version of name if available */
- if (ether_ntohost(name, (const struct ether_addr *)el->addr) == 0) {
- tp->e_name = strdup(name);
- continue;
- }
-#endif
- tp->e_name = el->name;
- }
-}
-
-static struct tok llcsap_db[] = {
- { LLCSAP_NULL, "null" },
- { LLCSAP_8021B_I, "802.1b-gsap" },
- { LLCSAP_8021B_G, "802.1b-isap" },
- { LLCSAP_IP, "ip-sap" },
- { LLCSAP_PROWAYNM, "proway-nm" },
- { LLCSAP_8021D, "802.1d" },
- { LLCSAP_RS511, "eia-rs511" },
- { LLCSAP_ISO8208, "x.25/llc2" },
- { LLCSAP_PROWAY, "proway" },
- { LLCSAP_SNAP, "snap" },
- { LLCSAP_IPX, "IPX" },
- { LLCSAP_NETBEUI, "netbeui" },
- { LLCSAP_ISONS, "iso-clns" },
- { LLCSAP_GLOBAL, "global" },
- { 0, NULL }
-};
-
-static void
-init_llcsaparray(void)
-{
- register int i;
- register struct hnamemem *table;
-
- for (i = 0; llcsap_db[i].s != NULL; i++) {
- table = &llcsaptable[llcsap_db[i].v];
- while (table->name)
- table = table->nxt;
- table->name = llcsap_db[i].s;
- table->addr = llcsap_db[i].v;
- table->nxt = newhnamemem();
- }
-}
-
-static struct tok ipxsap_db[] = {
- { 0x0000, "Unknown" },
- { 0x0001, "User" },
- { 0x0002, "User Group" },
- { 0x0003, "PrintQueue" },
- { 0x0004, "FileServer" },
- { 0x0005, "JobServer" },
- { 0x0006, "Gateway" },
- { 0x0007, "PrintServer" },
- { 0x0008, "ArchiveQueue" },
- { 0x0009, "ArchiveServer" },
- { 0x000a, "JobQueue" },
- { 0x000b, "Administration" },
- { 0x000F, "Novell TI-RPC" },
- { 0x0017, "Diagnostics" },
- { 0x0020, "NetBIOS" },
- { 0x0021, "NAS SNA Gateway" },
- { 0x0023, "NACS AsyncGateway" },
- { 0x0024, "RemoteBridge/RoutingService" },
- { 0x0026, "BridgeServer" },
- { 0x0027, "TCP/IP Gateway" },
- { 0x0028, "Point-to-point X.25 BridgeServer" },
- { 0x0029, "3270 Gateway" },
- { 0x002a, "CHI Corp" },
- { 0x002c, "PC Chalkboard" },
- { 0x002d, "TimeSynchServer" },
- { 0x002e, "ARCserve5.0/PalindromeBackup" },
- { 0x0045, "DI3270 Gateway" },
- { 0x0047, "AdvertisingPrintServer" },
- { 0x004a, "NetBlazerModems" },
- { 0x004b, "BtrieveVAP" },
- { 0x004c, "NetwareSQL" },
- { 0x004d, "XtreeNetwork" },
- { 0x0050, "BtrieveVAP4.11" },
- { 0x0052, "QuickLink" },
- { 0x0053, "PrintQueueUser" },
- { 0x0058, "Multipoint X.25 Router" },
- { 0x0060, "STLB/NLM" },
- { 0x0064, "ARCserve" },
- { 0x0066, "ARCserve3.0" },
- { 0x0072, "WAN CopyUtility" },
- { 0x007a, "TES-NetwareVMS" },
- { 0x0092, "WATCOM Debugger/EmeraldTapeBackupServer" },
- { 0x0095, "DDA OBGYN" },
- { 0x0098, "NetwareAccessServer" },
- { 0x009a, "Netware for VMS II/NamedPipeServer" },
- { 0x009b, "NetwareAccessServer" },
- { 0x009e, "PortableNetwareServer/SunLinkNVT" },
- { 0x00a1, "PowerchuteAPC UPS" },
- { 0x00aa, "LAWserve" },
- { 0x00ac, "CompaqIDA StatusMonitor" },
- { 0x0100, "PIPE STAIL" },
- { 0x0102, "LAN ProtectBindery" },
- { 0x0103, "OracleDataBaseServer" },
- { 0x0107, "Netware386/RSPX RemoteConsole" },
- { 0x010f, "NovellSNA Gateway" },
- { 0x0111, "TestServer" },
- { 0x0112, "HP PrintServer" },
- { 0x0114, "CSA MUX" },
- { 0x0115, "CSA LCA" },
- { 0x0116, "CSA CM" },
- { 0x0117, "CSA SMA" },
- { 0x0118, "CSA DBA" },
- { 0x0119, "CSA NMA" },
- { 0x011a, "CSA SSA" },
- { 0x011b, "CSA STATUS" },
- { 0x011e, "CSA APPC" },
- { 0x0126, "SNA TEST SSA Profile" },
- { 0x012a, "CSA TRACE" },
- { 0x012b, "NetwareSAA" },
- { 0x012e, "IKARUS VirusScan" },
- { 0x0130, "CommunicationsExecutive" },
- { 0x0133, "NNS DomainServer/NetwareNamingServicesDomain" },
- { 0x0135, "NetwareNamingServicesProfile" },
- { 0x0137, "Netware386 PrintQueue/NNS PrintQueue" },
- { 0x0141, "LAN SpoolServer" },
- { 0x0152, "IRMALAN Gateway" },
- { 0x0154, "NamedPipeServer" },
- { 0x0166, "NetWareManagement" },
- { 0x0168, "Intel PICKIT CommServer/Intel CAS TalkServer" },
- { 0x0173, "Compaq" },
- { 0x0174, "Compaq SNMP Agent" },
- { 0x0175, "Compaq" },
- { 0x0180, "XTreeServer/XTreeTools" },
- { 0x018A, "NASI ServicesBroadcastServer" },
- { 0x01b0, "GARP Gateway" },
- { 0x01b1, "Binfview" },
- { 0x01bf, "IntelLanDeskManager" },
- { 0x01ca, "AXTEC" },
- { 0x01cb, "ShivaNetModem/E" },
- { 0x01cc, "ShivaLanRover/E" },
- { 0x01cd, "ShivaLanRover/T" },
- { 0x01ce, "ShivaUniversal" },
- { 0x01d8, "CastelleFAXPressServer" },
- { 0x01da, "CastelleLANPressPrintServer" },
- { 0x01dc, "CastelleFAX/Xerox7033 FaxServer/ExcelLanFax" },
- { 0x01f0, "LEGATO" },
- { 0x01f5, "LEGATO" },
- { 0x0233, "NMS Agent/NetwareManagementAgent" },
- { 0x0237, "NMS IPX Discovery/LANternReadWriteChannel" },
- { 0x0238, "NMS IP Discovery/LANternTrapAlarmChannel" },
- { 0x023a, "LANtern" },
- { 0x023c, "MAVERICK" },
- { 0x023f, "NovellSMDR" },
- { 0x024e, "NetwareConnect" },
- { 0x024f, "NASI ServerBroadcast Cisco" },
- { 0x026a, "NMS ServiceConsole" },
- { 0x026b, "TimeSynchronizationServer Netware 4.x" },
- { 0x0278, "DirectoryServer Netware 4.x" },
- { 0x027b, "NetwareManagementAgent" },
- { 0x0280, "Novell File and Printer Sharing Service for PC" },
- { 0x0304, "NovellSAA Gateway" },
- { 0x0308, "COM/VERMED" },
- { 0x030a, "GalacticommWorldgroupServer" },
- { 0x030c, "IntelNetport2/HP JetDirect/HP Quicksilver" },
- { 0x0320, "AttachmateGateway" },
- { 0x0327, "MicrosoftDiagnostiocs" },
- { 0x0328, "WATCOM SQL Server" },
- { 0x0335, "MultiTechSystems MultisynchCommServer" },
- { 0x0343, "Xylogics RemoteAccessServer/LANModem" },
- { 0x0355, "ArcadaBackupExec" },
- { 0x0358, "MSLCD1" },
- { 0x0361, "NETINELO" },
- { 0x037e, "Powerchute UPS Monitoring" },
- { 0x037f, "ViruSafeNotify" },
- { 0x0386, "HP Bridge" },
- { 0x0387, "HP Hub" },
- { 0x0394, "NetWare SAA Gateway" },
- { 0x039b, "LotusNotes" },
- { 0x03b7, "CertusAntiVirus" },
- { 0x03c4, "ARCserve4.0" },
- { 0x03c7, "LANspool3.5" },
- { 0x03d7, "LexmarkPrinterServer" },
- { 0x03d8, "LexmarkXLE PrinterServer" },
- { 0x03dd, "BanyanENS NetwareClient" },
- { 0x03de, "GuptaSequelBaseServer/NetWareSQL" },
- { 0x03e1, "UnivelUnixware" },
- { 0x03e4, "UnivelUnixware" },
- { 0x03fc, "IntelNetport" },
- { 0x03fd, "PrintServerQueue" },
- { 0x040A, "ipnServer" },
- { 0x040D, "LVERRMAN" },
- { 0x040E, "LVLIC" },
- { 0x0414, "NET Silicon (DPI)/Kyocera" },
- { 0x0429, "SiteLockVirus" },
- { 0x0432, "UFHELPR???" },
- { 0x0433, "Synoptics281xAdvancedSNMPAgent" },
- { 0x0444, "MicrosoftNT SNA Server" },
- { 0x0448, "Oracle" },
- { 0x044c, "ARCserve5.01" },
- { 0x0457, "CanonGP55" },
- { 0x045a, "QMS Printers" },
- { 0x045b, "DellSCSI Array" },
- { 0x0491, "NetBlazerModems" },
- { 0x04ac, "OnTimeScheduler" },
- { 0x04b0, "CD-Net" },
- { 0x0513, "EmulexNQA" },
- { 0x0520, "SiteLockChecks" },
- { 0x0529, "SiteLockChecks" },
- { 0x052d, "CitrixOS2 AppServer" },
- { 0x0535, "Tektronix" },
- { 0x0536, "Milan" },
- { 0x055d, "Attachmate SNA gateway" },
- { 0x056b, "IBM8235 ModemServer" },
- { 0x056c, "ShivaLanRover/E PLUS" },
- { 0x056d, "ShivaLanRover/T PLUS" },
- { 0x0580, "McAfeeNetShield" },
- { 0x05B8, "NLM to workstation communication (Revelation Software)" },
- { 0x05BA, "CompatibleSystemsRouters" },
- { 0x05BE, "CheyenneHierarchicalStorageManager" },
- { 0x0606, "JCWatermarkImaging" },
- { 0x060c, "AXISNetworkPrinter" },
- { 0x0610, "AdaptecSCSIManagement" },
- { 0x0621, "IBM AntiVirus" },
- { 0x0640, "Windows95 RemoteRegistryService" },
- { 0x064e, "MicrosoftIIS" },
- { 0x067b, "Microsoft Win95/98 File and Print Sharing for NetWare" },
- { 0x067c, "Microsoft Win95/98 File and Print Sharing for NetWare" },
- { 0x076C, "Xerox" },
- { 0x079b, "ShivaLanRover/E 115" },
- { 0x079c, "ShivaLanRover/T 115" },
- { 0x07B4, "CubixWorldDesk" },
- { 0x07c2, "Quarterdeck IWare Connect V2.x NLM" },
- { 0x07c1, "Quarterdeck IWare Connect V3.x NLM" },
- { 0x0810, "ELAN License Server Demo" },
- { 0x0824, "ShivaLanRoverAccessSwitch/E" },
- { 0x086a, "ISSC Collector" },
- { 0x087f, "ISSC DAS AgentAIX" },
- { 0x0880, "Intel Netport PRO" },
- { 0x0881, "Intel Netport PRO" },
- { 0x0b29, "SiteLock" },
- { 0x0c29, "SiteLockApplications" },
- { 0x0c2c, "LicensingServer" },
- { 0x2101, "PerformanceTechnologyInstantInternet" },
- { 0x2380, "LAI SiteLock" },
- { 0x238c, "MeetingMaker" },
- { 0x4808, "SiteLockServer/SiteLockMetering" },
- { 0x5555, "SiteLockUser" },
- { 0x6312, "Tapeware" },
- { 0x6f00, "RabbitGateway" },
- { 0x7703, "MODEM" },
- { 0x8002, "NetPortPrinters" },
- { 0x8008, "WordPerfectNetworkVersion" },
- { 0x85BE, "Cisco EIGRP" },
- { 0x8888, "WordPerfectNetworkVersion/QuickNetworkManagement" },
- { 0x9000, "McAfeeNetShield" },
- { 0x9604, "CSA-NT_MON" },
- { 0xb6a8, "OceanIsleReachoutRemoteControl" },
- { 0xf11f, "SiteLockMetering" },
- { 0xf1ff, "SiteLock" },
- { 0xf503, "Microsoft SQL Server" },
- { 0xF905, "IBM TimeAndPlace" },
- { 0xfbfb, "TopCallIII FaxServer" },
- { 0xffff, "AnyService/Wildcard" },
- { 0, (char *)0 }
-};
-
-static void
-init_ipxsaparray(void)
-{
- register int i;
- register struct hnamemem *table;
-
- for (i = 0; ipxsap_db[i].s != NULL; i++) {
- int j = htons(ipxsap_db[i].v) & (HASHNAMESIZE-1);
- table = &ipxsaptable[j];
- while (table->name)
- table = table->nxt;
- table->name = ipxsap_db[i].s;
- table->addr = htons(ipxsap_db[i].v);
- table->nxt = newhnamemem();
- }
-}
-
-/*
- * Initialize the address to name translation machinery. We map all
- * non-local IP addresses to numeric addresses if fflag is true (i.e.,
- * to prevent blocking on the nameserver). localnet is the IP address
- * of the local network. mask is its subnet mask.
- */
-void
-init_addrtoname(u_int32_t localnet, u_int32_t mask)
-{
- if (fflag) {
- f_localnet = localnet;
- f_netmask = mask;
- }
- if (nflag)
- /*
- * Simplest way to suppress names.
- */
- return;
-
- init_etherarray();
- init_servarray();
- init_eprotoarray();
- init_llcsaparray();
- init_protoidarray();
- init_ipxsaparray();
-}
-
-const char *
-dnaddr_string(u_short dnaddr)
-{
- register struct hnamemem *tp;
-
- for (tp = &dnaddrtable[dnaddr & (HASHNAMESIZE-1)]; tp->nxt != 0;
- tp = tp->nxt)
- if (tp->addr == dnaddr)
- return (tp->name);
-
- tp->addr = dnaddr;
- tp->nxt = newhnamemem();
- if (nflag)
- tp->name = dnnum_string(dnaddr);
- else
- tp->name = dnname_string(dnaddr);
-
- return(tp->name);
-}
-
-/* Return a zero'ed hnamemem struct and cuts down on calloc() overhead */
-struct hnamemem *
-newhnamemem(void)
-{
- register struct hnamemem *p;
- static struct hnamemem *ptr = NULL;
- static u_int num = 0;
-
- if (num <= 0) {
- num = 64;
- ptr = (struct hnamemem *)calloc(num, sizeof (*ptr));
- if (ptr == NULL)
- error("newhnamemem: calloc");
- }
- --num;
- p = ptr++;
- return (p);
-}
-
-#ifdef INET6
-/* Return a zero'ed h6namemem struct and cuts down on calloc() overhead */
-struct h6namemem *
-newh6namemem(void)
-{
- register struct h6namemem *p;
- static struct h6namemem *ptr = NULL;
- static u_int num = 0;
-
- if (num <= 0) {
- num = 64;
- ptr = (struct h6namemem *)calloc(num, sizeof (*ptr));
- if (ptr == NULL)
- error("newh6namemem: calloc");
- }
- --num;
- p = ptr++;
- return (p);
-}
-#endif /* INET6 */
+++ /dev/null
-/*
- * Copyright (c) 1990, 1992, 1993, 1994, 1995, 1996, 1997
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that: (1) source code distributions
- * retain the above copyright notice and this paragraph in its entirety, (2)
- * distributions including binary code include the above copyright notice and
- * this paragraph in its entirety in the documentation or other materials
- * provided with the distribution, and (3) all advertising materials mentioning
- * features or use of this software display the following acknowledgement:
- * ``This product includes software developed by the University of California,
- * Lawrence Berkeley Laboratory and its contributors.'' Neither the name of
- * the University nor the names of its contributors may be used to endorse
- * or promote products derived from this software without specific prior
- * written permission.
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- * @(#) $Header: /tcpdump/master/tcpdump/addrtoname.h,v 1.18 2001/09/17 21:57:51 fenner Exp $ (LBL)
- */
-
-/* Name to address translation routines. */
-
-extern const char *linkaddr_string(const u_char *, const unsigned int);
-extern const char *etheraddr_string(const u_char *);
-extern const char *etherproto_string(u_short);
-extern const char *tcpport_string(u_short);
-extern const char *udpport_string(u_short);
-extern const char *getname(const u_char *);
-#ifdef INET6
-extern const char *getname6(const u_char *);
-#endif
-extern const char *intoa(u_int32_t);
-
-extern void init_addrtoname(u_int32_t, u_int32_t);
-extern struct hnamemem *newhnamemem(void);
-#ifdef INET6
-extern struct h6namemem *newh6namemem(void);
-#endif
-
-#define ipaddr_string(p) getname((const u_char *)(p))
-#ifdef INET6
-#define ip6addr_string(p) getname6((const u_char *)(p))
-#endif
+++ /dev/null
-/* $NetBSD: ah.h,v 1.12 2000/07/23 05:23:04 itojun Exp $ */
-/* $KAME: ah.h,v 1.12 2000/07/20 17:41:01 itojun Exp $ */
-
-/*
- * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the project nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-/*
- * RFC1826/2402 authentication header.
- */
-
-#ifndef _NETINET6_AH_H_
-#define _NETINET6_AH_H_
-
-struct ah {
- u_int8_t ah_nxt; /* Next Header */
- u_int8_t ah_len; /* Length of data, in 32bit */
- u_int16_t ah_reserve; /* Reserved for future use */
- u_int32_t ah_spi; /* Security parameter index */
- /* variable size, 32bit bound*/ /* Authentication data */
-};
-
-struct newah {
- u_int8_t ah_nxt; /* Next Header */
- u_int8_t ah_len; /* Length of data + 1, in 32bit */
- u_int16_t ah_reserve; /* Reserved for future use */
- u_int32_t ah_spi; /* Security parameter index */
- u_int32_t ah_seq; /* Sequence number field */
- /* variable size, 32bit bound*/ /* Authentication data */
-};
-
-#endif /*_NETINET6_AH_H_*/
+++ /dev/null
-/* @(#) $Header: /tcpdump/master/tcpdump/aodv.h,v 1.3 2003/09/13 01:34:42 guy Exp $ (LBL) */
-/*
- * Copyright (c) 2003 Bruce M. Simpson <bms@spc.org>
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by Bruce M. Simpson.
- * 4. Neither the name of Bruce M. Simpson nor the names of co-
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY Bruce M. Simpson AND CONTRIBUTORS
- * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
- * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL Bruce M. Simpson OR CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-#ifndef _AODV_H_
-#define _AODV_H_
-
-struct aodv_rreq {
- u_int8_t rreq_type; /* AODV message type (1) */
- u_int8_t rreq_flags; /* various flags */
- u_int8_t rreq_zero0; /* reserved, set to zero */
- u_int8_t rreq_hops; /* number of hops from originator */
- u_int32_t rreq_id; /* request ID */
- u_int32_t rreq_da; /* destination IPv4 address */
- u_int32_t rreq_ds; /* destination sequence number */
- u_int32_t rreq_oa; /* originator IPv4 address */
- u_int32_t rreq_os; /* originator sequence number */
-};
-#ifdef INET6
-struct aodv_rreq6 {
- u_int8_t rreq_type; /* AODV message type (1) */
- u_int8_t rreq_flags; /* various flags */
- u_int8_t rreq_zero0; /* reserved, set to zero */
- u_int8_t rreq_hops; /* number of hops from originator */
- u_int32_t rreq_id; /* request ID */
- struct in6_addr rreq_da; /* destination IPv6 address */
- u_int32_t rreq_ds; /* destination sequence number */
- struct in6_addr rreq_oa; /* originator IPv6 address */
- u_int32_t rreq_os; /* originator sequence number */
-};
-struct aodv_rreq6_draft_01 {
- u_int8_t rreq_type; /* AODV message type (16) */
- u_int8_t rreq_flags; /* various flags */
- u_int8_t rreq_zero0; /* reserved, set to zero */
- u_int8_t rreq_hops; /* number of hops from originator */
- u_int32_t rreq_id; /* request ID */
- u_int32_t rreq_ds; /* destination sequence number */
- u_int32_t rreq_os; /* originator sequence number */
- struct in6_addr rreq_da; /* destination IPv6 address */
- struct in6_addr rreq_oa; /* originator IPv6 address */
-};
-#endif
-
-#define RREQ_JOIN 0x80 /* join (reserved for multicast */
-#define RREQ_REPAIR 0x40 /* repair (reserved for multicast */
-#define RREQ_GRAT 0x20 /* gratuitous RREP */
-#define RREQ_DEST 0x10 /* destination only */
-#define RREQ_UNKNOWN 0x08 /* unknown destination sequence num */
-#define RREQ_FLAGS_MASK 0xF8 /* mask for rreq_flags */
-
-struct aodv_rrep {
- u_int8_t rrep_type; /* AODV message type (2) */
- u_int8_t rrep_flags; /* various flags */
- u_int8_t rrep_ps; /* prefix size */
- u_int8_t rrep_hops; /* number of hops from o to d */
- u_int32_t rrep_da; /* destination IPv4 address */
- u_int32_t rrep_ds; /* destination sequence number */
- u_int32_t rrep_oa; /* originator IPv4 address */
- u_int32_t rrep_life; /* lifetime of this route */
-};
-#ifdef INET6
-struct aodv_rrep6 {
- u_int8_t rrep_type; /* AODV message type (2) */
- u_int8_t rrep_flags; /* various flags */
- u_int8_t rrep_ps; /* prefix size */
- u_int8_t rrep_hops; /* number of hops from o to d */
- struct in6_addr rrep_da; /* destination IPv6 address */
- u_int32_t rrep_ds; /* destination sequence number */
- struct in6_addr rrep_oa; /* originator IPv6 address */
- u_int32_t rrep_life; /* lifetime of this route */
-};
-struct aodv_rrep6_draft_01 {
- u_int8_t rrep_type; /* AODV message type (17) */
- u_int8_t rrep_flags; /* various flags */
- u_int8_t rrep_ps; /* prefix size */
- u_int8_t rrep_hops; /* number of hops from o to d */
- u_int32_t rrep_ds; /* destination sequence number */
- struct in6_addr rrep_da; /* destination IPv6 address */
- struct in6_addr rrep_oa; /* originator IPv6 address */
- u_int32_t rrep_life; /* lifetime of this route */
-};
-#endif
-
-#define RREP_REPAIR 0x80 /* repair (reserved for multicast */
-#define RREP_ACK 0x40 /* acknowledgement required */
-#define RREP_FLAGS_MASK 0xC0 /* mask for rrep_flags */
-#define RREP_PREFIX_MASK 0x1F /* mask for prefix size */
-
-struct rerr_unreach {
- u_int32_t u_da; /* IPv4 address */
- u_int32_t u_ds; /* sequence number */
-};
-#ifdef INET6
-struct rerr_unreach6 {
- struct in6_addr u_da; /* IPv6 address */
- u_int32_t u_ds; /* sequence number */
-};
-struct rerr_unreach6_draft_01 {
- struct in6_addr u_da; /* IPv6 address */
- u_int32_t u_ds; /* sequence number */
-};
-#endif
-
-struct aodv_rerr {
- u_int8_t rerr_type; /* AODV message type (3 or 18) */
- u_int8_t rerr_flags; /* various flags */
- u_int8_t rerr_zero0; /* reserved, set to zero */
- u_int8_t rerr_dc; /* destination count */
- union {
- struct rerr_unreach dest[1];
-#ifdef INET6
- struct rerr_unreach6 dest6[1];
- struct rerr_unreach6_draft_01 dest6_draft_01[1];
-#endif
- } r;
-};
-
-#define RERR_NODELETE 0x80 /* don't delete the link */
-#define RERR_FLAGS_MASK 0x80 /* mask for rerr_flags */
-
-struct aodv_rrep_ack {
- u_int8_t ra_type;
- u_int8_t ra_zero0;
-};
-
-union aodv {
- struct aodv_rreq rreq;
- struct aodv_rrep rrep;
- struct aodv_rerr rerr;
- struct aodv_rrep_ack rrep_ack;
-#ifdef INET6
- struct aodv_rreq6 rreq6;
- struct aodv_rreq6_draft_01 rreq6_draft_01;
- struct aodv_rrep6 rrep6;
- struct aodv_rrep6_draft_01 rrep6_draft_01;
-#endif
-};
-
-#define AODV_RREQ 1 /* route request */
-#define AODV_RREP 2 /* route response */
-#define AODV_RERR 3 /* error report */
-#define AODV_RREP_ACK 4 /* route response acknowledgement */
-
-#define AODV_V6_DRAFT_01_RREQ 16 /* IPv6 route request */
-#define AODV_V6_DRAFT_01_RREP 17 /* IPv6 route response */
-#define AODV_V6_DRAFT_01_RERR 18 /* IPv6 error report */
-#define AODV_V6_DRAFT_01_RREP_ACK 19 /* IPV6 route response acknowledgment */
-
-struct aodv_ext {
- u_int8_t type; /* extension type */
- u_int8_t length; /* extension length */
-};
-
-struct aodv_hello {
- struct aodv_ext eh; /* extension header */
- u_int32_t interval; /* expect my next hello in
- * (n) ms */
-};
-
-#define AODV_EXT_HELLO 1
-
-#endif /* _AODV_H_ */
+++ /dev/null
-/*
- * Copyright (c) 1988, 1989, 1990, 1993, 1994, 1995, 1996
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that: (1) source code distributions
- * retain the above copyright notice and this paragraph in its entirety, (2)
- * distributions including binary code include the above copyright notice and
- * this paragraph in its entirety in the documentation or other materials
- * provided with the distribution, and (3) all advertising materials mentioning
- * features or use of this software display the following acknowledgement:
- * ``This product includes software developed by the University of California,
- * Lawrence Berkeley Laboratory and its contributors.'' Neither the name of
- * the University nor the names of its contributors may be used to endorse
- * or promote products derived from this software without specific prior
- * written permission.
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- * AppleTalk protocol formats (courtesy Bill Croft of Stanford/SUMEX).
- *
- * @(#) $Header: /tcpdump/master/tcpdump/appletalk.h,v 1.15 2002/12/11 07:13:49 guy Exp $ (LBL)
- */
-
-struct LAP {
- u_int8_t dst;
- u_int8_t src;
- u_int8_t type;
-};
-#define lapShortDDP 1 /* short DDP type */
-#define lapDDP 2 /* DDP type */
-#define lapKLAP 'K' /* Kinetics KLAP type */
-
-/* Datagram Delivery Protocol */
-
-struct atDDP {
- u_int16_t length;
- u_int16_t checksum;
- u_int16_t dstNet;
- u_int16_t srcNet;
- u_int8_t dstNode;
- u_int8_t srcNode;
- u_int8_t dstSkt;
- u_int8_t srcSkt;
- u_int8_t type;
-};
-
-struct atShortDDP {
- u_int16_t length;
- u_int8_t dstSkt;
- u_int8_t srcSkt;
- u_int8_t type;
-};
-
-#define ddpMaxWKS 0x7F
-#define ddpMaxData 586
-#define ddpLengthMask 0x3FF
-#define ddpHopShift 10
-#define ddpSize 13 /* size of DDP header (avoid struct padding) */
-#define ddpSSize 5
-#define ddpWKS 128 /* boundary of DDP well known sockets */
-#define ddpRTMP 1 /* RTMP type */
-#define ddpRTMPrequest 5 /* RTMP request type */
-#define ddpNBP 2 /* NBP type */
-#define ddpATP 3 /* ATP type */
-#define ddpECHO 4 /* ECHO type */
-#define ddpIP 22 /* IP type */
-#define ddpARP 23 /* ARP type */
-#define ddpKLAP 0x4b /* Kinetics KLAP type */
-
-
-/* AppleTalk Transaction Protocol */
-
-struct atATP {
- u_int8_t control;
- u_int8_t bitmap;
- u_int16_t transID;
- int32_t userData;
-};
-
-#define atpReqCode 0x40
-#define atpRspCode 0x80
-#define atpRelCode 0xC0
-#define atpXO 0x20
-#define atpEOM 0x10
-#define atpSTS 0x08
-#define atpFlagMask 0x3F
-#define atpControlMask 0xF8
-#define atpMaxNum 8
-#define atpMaxData 578
-
-
-/* AppleTalk Echo Protocol */
-
-struct atEcho {
- u_int8_t echoFunction;
- u_int8_t *echoData;
-};
-
-#define echoSkt 4 /* the echoer socket */
-#define echoSize 1 /* size of echo header */
-#define echoRequest 1 /* echo request */
-#define echoReply 2 /* echo request */
-
-
-/* Name Binding Protocol */
-
-struct atNBP {
- u_int8_t control;
- u_int8_t id;
-};
-
-struct atNBPtuple {
- u_int16_t net;
- u_int8_t node;
- u_int8_t skt;
- u_int8_t enumerator;
-};
-
-#define nbpBrRq 0x10
-#define nbpLkUp 0x20
-#define nbpLkUpReply 0x30
-
-#define nbpNIS 2
-#define nbpTupleMax 15
-
-#define nbpHeaderSize 2
-#define nbpTupleSize 5
-
-#define nbpSkt 2 /* NIS */
-
-
-/* Routing Table Maint. Protocol */
-
-#define rtmpSkt 1 /* number of RTMP socket */
-#define rtmpSize 4 /* minimum size */
-#define rtmpTupleSize 3
-
-
-/* Zone Information Protocol */
-
-struct zipHeader {
- u_int8_t command;
- u_int8_t netcount;
-};
-
-#define zipHeaderSize 2
-#define zipQuery 1
-#define zipReply 2
-#define zipTakedown 3
-#define zipBringup 4
-#define ddpZIP 6
-#define zipSkt 6
-#define GetMyZone 7
-#define GetZoneList 8
-
-/*
- * UDP port range used for ddp-in-udp encapsulation is 16512-16639
- * for client sockets (128-255) and 200-327 for server sockets
- * (0-127). We also try to recognize the pre-April 88 server
- * socket range of 768-895.
- */
-#define atalk_port(p) \
- (((unsigned)((p) - 16512) < 128) || \
- ((unsigned)((p) - 200) < 128) || \
- ((unsigned)((p) - 768) < 128))
+++ /dev/null
-/*
- * Copyright (c) 1982, 1986, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#) $Id: arcnet.h,v 1.3 2003/01/23 09:05:37 guy Exp $ (LBL)
- *
- * from: NetBSD: if_arc.h,v 1.13 1999/11/19 20:41:19 thorpej Exp
- */
-
-/*
- * Structure of a 2.5MB/s Arcnet header on the BSDs,
- * as given to interface code.
- */
-struct arc_header {
- u_int8_t arc_shost;
- u_int8_t arc_dhost;
- u_int8_t arc_type;
- /*
- * only present for newstyle encoding with LL fragmentation.
- * Don't use sizeof(anything), use ARC_HDR{,NEW}LEN instead.
- */
- u_int8_t arc_flag;
- u_int16_t arc_seqid;
-
- /*
- * only present in exception packets (arc_flag == 0xff)
- */
- u_int8_t arc_type2; /* same as arc_type */
- u_int8_t arc_flag2; /* real flag value */
- u_int16_t arc_seqid2; /* real seqid value */
-};
-
-#define ARC_HDRLEN 3
-#define ARC_HDRNEWLEN 6
-#define ARC_HDRNEWLEN_EXC 10
-
-/* RFC 1051 */
-#define ARCTYPE_IP_OLD 240 /* IP protocol */
-#define ARCTYPE_ARP_OLD 241 /* address resolution protocol */
-
-/* RFC 1201 */
-#define ARCTYPE_IP 212 /* IP protocol */
-#define ARCTYPE_ARP 213 /* address resolution protocol */
-#define ARCTYPE_REVARP 214 /* reverse addr resolution protocol */
-
-#define ARCTYPE_ATALK 221 /* Appletalk */
-#define ARCTYPE_BANIAN 247 /* Banyan Vines */
-#define ARCTYPE_IPX 250 /* Novell IPX */
-
-#define ARCTYPE_INET6 0xc4 /* IPng */
-#define ARCTYPE_DIAGNOSE 0x80 /* as per ANSI/ATA 878.1 */
-
-/*
- * Structure of a 2.5MB/s Arcnet header on Linux. Linux has
- * an extra "offset" field when given to interface code, and
- * never presents packets that look like exception frames.
- */
-struct arc_linux_header {
- u_int8_t arc_shost;
- u_int8_t arc_dhost;
- u_int16_t arc_offset;
- u_int8_t arc_type;
- /*
- * only present for newstyle encoding with LL fragmentation.
- * Don't use sizeof(anything), use ARC_LINUX_HDR{,NEW}LEN
- * instead.
- */
- u_int8_t arc_flag;
- u_int16_t arc_seqid;
-};
-
-#define ARC_LINUX_HDRLEN 5
-#define ARC_LINUX_HDRNEWLEN 8
+++ /dev/null
-$6 ~ /^ack/ && $5 !~ /[SFR]/ {
- # given a tcpdump ftp trace, output one line for each ack
- # in the form
- # <ack time> <seq no>
- # where <ack time> is the time packet was acked (in seconds with
- # zero at time of first packet) and <seq no> is the tcp sequence
- # number of the ack divided by 1024 (i.e., Kbytes acked).
- #
- # convert time to seconds
- n = split ($1,t,":")
- tim = t[1]*3600 + t[2]*60 + t[3]
- if (! tzero) {
- tzero = tim
- OFS = "\t"
- }
- # get packet sequence number
- printf "%7.2f\t%g\n", tim-tzero, $7/1024
- }
+++ /dev/null
-/*
- * Copyright (c) 2002 Guy Harris.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that: (1) source code
- * distributions retain the above copyright notice and this paragraph
- * in its entirety, and (2) distributions including binary code include
- * the above copyright notice and this paragraph in its entirety in
- * the documentation or other materials provided with the distribution.
- * The name of Guy Harris may not be used to endorse or promote products
- * derived from this software without specific prior written permission.
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- * @(#) $Header: /tcpdump/master/tcpdump/atm.h,v 1.1 2002/07/11 09:17:22 guy Exp $
- */
-
-/*
- * Traffic types for ATM.
- */
-#define ATM_UNKNOWN 0 /* Unknown */
-#define ATM_LANE 1 /* LANE */
-#define ATM_LLC 2 /* LLC encapsulation */
+++ /dev/null
-/*
- * Copyright (c) 1997 Yen Yen Lim and North Dakota State University
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by Yen Yen Lim and
- North Dakota State University
- * 4. The name of the author may not be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
- * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
- * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
- * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
- * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- *
- * @(#) $Header: /tcpdump/master/tcpdump/atmuni31.h,v 1.2 2002/08/05 07:47:23 guy Exp $ (LBL)
- */
-
-/* Based on UNI3.1 standard by ATM Forum */
-
-/* ATM traffic types based on VPI=0 and (the following VCI */
-#define PPC 0x05 /* Point-to-point signal msg */
-#define BCC 0x02 /* Broadcast signal msg */
-#define OAMF4SC 0x03 /* Segment OAM F4 flow cell */
-#define OAMF4EC 0x04 /* End-to-end OAM F4 flow cell */
-#define METAC 0x01 /* Meta signal msg */
-#define ILMIC 0x10 /* ILMI msg */
-
-/* Q.2931 signalling messages */
-#define CALL_PROCEED 0x02 /* call proceeding */
-#define CONNECT 0x07 /* connect */
-#define CONNECT_ACK 0x0f /* connect_ack */
-#define SETUP 0x05 /* setup */
-#define RELEASE 0x4d /* release */
-#define RELEASE_DONE 0x5a /* release_done */
-#define RESTART 0x46 /* restart */
-#define RESTART_ACK 0x4e /* restart ack */
-#define STATUS 0x7d /* status */
-#define STATUS_ENQ 0x75 /* status ack */
-#define ADD_PARTY 0x80 /* add party */
-#define ADD_PARTY_ACK 0x81 /* add party ack */
-#define ADD_PARTY_REJ 0x82 /* add party rej */
-#define DROP_PARTY 0x83 /* drop party */
-#define DROP_PARTY_ACK 0x84 /* drop party ack */
-
-/* Information Element Parameters in the signalling messages */
-#define CAUSE 0x08 /* cause */
-#define ENDPT_REF 0x54 /* endpoint reference */
-#define AAL_PARA 0x58 /* ATM adaptation layer parameters */
-#define TRAFF_DESCRIP 0x59 /* atm traffic descriptors */
-#define CONNECT_ID 0x5a /* connection identifier */
-#define QOS_PARA 0x5c /* quality of service parameters */
-#define B_HIGHER 0x5d /* broadband higher layer information */
-#define B_BEARER 0x5e /* broadband bearer capability */
-#define B_LOWER 0x5f /* broadband lower information */
-#define CALLING_PARTY 0x6c /* calling party number */
-#define CALLED_PARTY 0x70 /* called party nmber */
-
-#define Q2931 0x09
-
-/* Q.2931 signalling general messages format */
-#define PROTO_POS 0 /* offset of protocol discriminator */
-#define CALL_REF_POS 2 /* offset of call reference value */
-#define MSG_TYPE_POS 5 /* offset of message type */
-#define MSG_LEN_POS 7 /* offset of mesage length */
-#define IE_BEGIN_POS 9 /* offset of first information element */
-
-/* format of signalling messages */
-#define TYPE_POS 0
-#define LEN_POS 2
-#define FIELD_BEGIN_POS 4
+++ /dev/null
-/* @(#) $Header: /tcpdump/master/tcpdump/bootp.h,v 1.15 2003/07/01 19:16:06 guy Exp $ (LBL) */
-/*
- * Bootstrap Protocol (BOOTP). RFC951 and RFC1048.
- *
- * This file specifies the "implementation-independent" BOOTP protocol
- * information which is common to both client and server.
- *
- * Copyright 1988 by Carnegie Mellon.
- *
- * Permission to use, copy, modify, and distribute this program for any
- * purpose and without fee is hereby granted, provided that this copyright
- * and permission notice appear on all copies and supporting documentation,
- * the name of Carnegie Mellon not be used in advertising or publicity
- * pertaining to distribution of the program without specific prior
- * permission, and notice be given in supporting documentation that copying
- * and distribution is by permission of Carnegie Mellon and Stanford
- * University. Carnegie Mellon makes no representations about the
- * suitability of this software for any purpose. It is provided "as is"
- * without express or implied warranty.
- */
-
-
-struct bootp {
- u_int8_t bp_op; /* packet opcode type */
- u_int8_t bp_htype; /* hardware addr type */
- u_int8_t bp_hlen; /* hardware addr length */
- u_int8_t bp_hops; /* gateway hops */
- u_int32_t bp_xid; /* transaction ID */
- u_int16_t bp_secs; /* seconds since boot began */
- u_int16_t bp_flags; /* flags - see bootp_flag_values[] in print-bootp.c */
- struct in_addr bp_ciaddr; /* client IP address */
- struct in_addr bp_yiaddr; /* 'your' IP address */
- struct in_addr bp_siaddr; /* server IP address */
- struct in_addr bp_giaddr; /* gateway IP address */
- u_int8_t bp_chaddr[16]; /* client hardware address */
- u_int8_t bp_sname[64]; /* server host name */
- u_int8_t bp_file[128]; /* boot file name */
- u_int8_t bp_vend[64]; /* vendor-specific area */
-};
-
-/*
- * UDP port numbers, server and client.
- */
-#define IPPORT_BOOTPS 67
-#define IPPORT_BOOTPC 68
-
-#define BOOTPREPLY 2
-#define BOOTPREQUEST 1
-
-/*
- * Vendor magic cookie (v_magic) for CMU
- */
-#define VM_CMU "CMU"
-
-/*
- * Vendor magic cookie (v_magic) for RFC1048
- */
-#define VM_RFC1048 { 99, 130, 83, 99 }
-
-\f
-
-/*
- * RFC1048 tag values used to specify what information is being supplied in
- * the vendor field of the packet.
- */
-
-#define TAG_PAD ((u_int8_t) 0)
-#define TAG_SUBNET_MASK ((u_int8_t) 1)
-#define TAG_TIME_OFFSET ((u_int8_t) 2)
-#define TAG_GATEWAY ((u_int8_t) 3)
-#define TAG_TIME_SERVER ((u_int8_t) 4)
-#define TAG_NAME_SERVER ((u_int8_t) 5)
-#define TAG_DOMAIN_SERVER ((u_int8_t) 6)
-#define TAG_LOG_SERVER ((u_int8_t) 7)
-#define TAG_COOKIE_SERVER ((u_int8_t) 8)
-#define TAG_LPR_SERVER ((u_int8_t) 9)
-#define TAG_IMPRESS_SERVER ((u_int8_t) 10)
-#define TAG_RLP_SERVER ((u_int8_t) 11)
-#define TAG_HOSTNAME ((u_int8_t) 12)
-#define TAG_BOOTSIZE ((u_int8_t) 13)
-#define TAG_END ((u_int8_t) 255)
-/* RFC1497 tags */
-#define TAG_DUMPPATH ((u_int8_t) 14)
-#define TAG_DOMAINNAME ((u_int8_t) 15)
-#define TAG_SWAP_SERVER ((u_int8_t) 16)
-#define TAG_ROOTPATH ((u_int8_t) 17)
-#define TAG_EXTPATH ((u_int8_t) 18)
-/* RFC2132 */
-#define TAG_IP_FORWARD ((u_int8_t) 19)
-#define TAG_NL_SRCRT ((u_int8_t) 20)
-#define TAG_PFILTERS ((u_int8_t) 21)
-#define TAG_REASS_SIZE ((u_int8_t) 22)
-#define TAG_DEF_TTL ((u_int8_t) 23)
-#define TAG_MTU_TIMEOUT ((u_int8_t) 24)
-#define TAG_MTU_TABLE ((u_int8_t) 25)
-#define TAG_INT_MTU ((u_int8_t) 26)
-#define TAG_LOCAL_SUBNETS ((u_int8_t) 27)
-#define TAG_BROAD_ADDR ((u_int8_t) 28)
-#define TAG_DO_MASK_DISC ((u_int8_t) 29)
-#define TAG_SUPPLY_MASK ((u_int8_t) 30)
-#define TAG_DO_RDISC ((u_int8_t) 31)
-#define TAG_RTR_SOL_ADDR ((u_int8_t) 32)
-#define TAG_STATIC_ROUTE ((u_int8_t) 33)
-#define TAG_USE_TRAILERS ((u_int8_t) 34)
-#define TAG_ARP_TIMEOUT ((u_int8_t) 35)
-#define TAG_ETH_ENCAP ((u_int8_t) 36)
-#define TAG_TCP_TTL ((u_int8_t) 37)
-#define TAG_TCP_KEEPALIVE ((u_int8_t) 38)
-#define TAG_KEEPALIVE_GO ((u_int8_t) 39)
-#define TAG_NIS_DOMAIN ((u_int8_t) 40)
-#define TAG_NIS_SERVERS ((u_int8_t) 41)
-#define TAG_NTP_SERVERS ((u_int8_t) 42)
-#define TAG_VENDOR_OPTS ((u_int8_t) 43)
-#define TAG_NETBIOS_NS ((u_int8_t) 44)
-#define TAG_NETBIOS_DDS ((u_int8_t) 45)
-#define TAG_NETBIOS_NODE ((u_int8_t) 46)
-#define TAG_NETBIOS_SCOPE ((u_int8_t) 47)
-#define TAG_XWIN_FS ((u_int8_t) 48)
-#define TAG_XWIN_DM ((u_int8_t) 49)
-#define TAG_NIS_P_DOMAIN ((u_int8_t) 64)
-#define TAG_NIS_P_SERVERS ((u_int8_t) 65)
-#define TAG_MOBILE_HOME ((u_int8_t) 68)
-#define TAG_SMPT_SERVER ((u_int8_t) 69)
-#define TAG_POP3_SERVER ((u_int8_t) 70)
-#define TAG_NNTP_SERVER ((u_int8_t) 71)
-#define TAG_WWW_SERVER ((u_int8_t) 72)
-#define TAG_FINGER_SERVER ((u_int8_t) 73)
-#define TAG_IRC_SERVER ((u_int8_t) 74)
-#define TAG_STREETTALK_SRVR ((u_int8_t) 75)
-#define TAG_STREETTALK_STDA ((u_int8_t) 76)
-/* DHCP options */
-#define TAG_REQUESTED_IP ((u_int8_t) 50)
-#define TAG_IP_LEASE ((u_int8_t) 51)
-#define TAG_OPT_OVERLOAD ((u_int8_t) 52)
-#define TAG_TFTP_SERVER ((u_int8_t) 66)
-#define TAG_BOOTFILENAME ((u_int8_t) 67)
-#define TAG_DHCP_MESSAGE ((u_int8_t) 53)
-#define TAG_SERVER_ID ((u_int8_t) 54)
-#define TAG_PARM_REQUEST ((u_int8_t) 55)
-#define TAG_MESSAGE ((u_int8_t) 56)
-#define TAG_MAX_MSG_SIZE ((u_int8_t) 57)
-#define TAG_RENEWAL_TIME ((u_int8_t) 58)
-#define TAG_REBIND_TIME ((u_int8_t) 59)
-#define TAG_VENDOR_CLASS ((u_int8_t) 60)
-#define TAG_CLIENT_ID ((u_int8_t) 61)
-/* RFC 2241 */
-#define TAG_NDS_SERVERS ((u_int8_t) 85)
-#define TAG_NDS_TREE_NAME ((u_int8_t) 86)
-#define TAG_NDS_CONTEXT ((u_int8_t) 87)
-/* RFC 2242 */
-#define TAG_NDS_IPDOMAIN ((u_int8_t) 62)
-#define TAG_NDS_IPINFO ((u_int8_t) 63)
-/* RFC 2485 */
-#define TAG_OPEN_GROUP_UAP ((u_int8_t) 98)
-/* RFC 2563 */
-#define TAG_DISABLE_AUTOCONF ((u_int8_t) 116)
-/* RFC 2610 */
-#define TAG_SLP_DA ((u_int8_t) 78)
-#define TAG_SLP_SCOPE ((u_int8_t) 79)
-/* RFC 2937 */
-#define TAG_NS_SEARCH ((u_int8_t) 117)
-/* RFC 3011 */
-#define TAG_IP4_SUBNET_SELECT ((u_int8_t) 118)
-/* ftp://ftp.isi.edu/.../assignments/bootp-dhcp-extensions */
-#define TAG_USER_CLASS ((u_int8_t) 77)
-#define TAG_SLP_NAMING_AUTH ((u_int8_t) 80)
-#define TAG_CLIENT_FQDN ((u_int8_t) 81)
-#define TAG_AGENT_CIRCUIT ((u_int8_t) 82)
-#define TAG_AGENT_REMOTE ((u_int8_t) 83)
-#define TAG_AGENT_MASK ((u_int8_t) 84)
-#define TAG_TZ_STRING ((u_int8_t) 88)
-#define TAG_FQDN_OPTION ((u_int8_t) 89)
-#define TAG_AUTH ((u_int8_t) 90)
-#define TAG_VINES_SERVERS ((u_int8_t) 91)
-#define TAG_SERVER_RANK ((u_int8_t) 92)
-#define TAG_CLIENT_ARCH ((u_int8_t) 93)
-#define TAG_CLIENT_NDI ((u_int8_t) 94)
-#define TAG_CLIENT_GUID ((u_int8_t) 97)
-#define TAG_LDAP_URL ((u_int8_t) 95)
-#define TAG_6OVER4 ((u_int8_t) 96)
-#define TAG_PRINTER_NAME ((u_int8_t) 100)
-#define TAG_MDHCP_SERVER ((u_int8_t) 101)
-#define TAG_IPX_COMPAT ((u_int8_t) 110)
-#define TAG_NETINFO_PARENT ((u_int8_t) 112)
-#define TAG_NETINFO_PARENT_TAG ((u_int8_t) 113)
-#define TAG_URL ((u_int8_t) 114)
-#define TAG_FAILOVER ((u_int8_t) 115)
-#define TAG_EXTENDED_REQUEST ((u_int8_t) 126)
-#define TAG_EXTENDED_OPTION ((u_int8_t) 127)
-
-
-/* DHCP Message types (values for TAG_DHCP_MESSAGE option) */
-#define DHCPDISCOVER 1
-#define DHCPOFFER 2
-#define DHCPREQUEST 3
-#define DHCPDECLINE 4
-#define DHCPACK 5
-#define DHCPNAK 6
-#define DHCPRELEASE 7
-#define DHCPINFORM 8
-
-
-/*
- * "vendor" data permitted for CMU bootp clients.
- */
-
-struct cmu_vend {
- u_int8_t v_magic[4]; /* magic number */
- u_int32_t v_flags; /* flags/opcodes, etc. */
- struct in_addr v_smask; /* Subnet mask */
- struct in_addr v_dgate; /* Default gateway */
- struct in_addr v_dns1, v_dns2; /* Domain name servers */
- struct in_addr v_ins1, v_ins2; /* IEN-116 name servers */
- struct in_addr v_ts1, v_ts2; /* Time servers */
- u_int8_t v_unused[24]; /* currently unused */
-};
-
-
-/* v_flags values */
-#define VF_SMASK 1 /* Subnet mask field contains valid data */
+++ /dev/null
-/*
- * Copyright (c) 1992, 1993, 1994, 1995, 1996
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that: (1) source code distributions
- * retain the above copyright notice and this paragraph in its entirety, (2)
- * distributions including binary code include the above copyright notice and
- * this paragraph in its entirety in the documentation or other materials
- * provided with the distribution, and (3) all advertising materials mentioning
- * features or use of this software display the following acknowledgement:
- * ``This product includes software developed by the University of California,
- * Lawrence Berkeley Laboratory and its contributors.'' Neither the name of
- * the University nor the names of its contributors may be used to endorse
- * or promote products derived from this software without specific prior
- * written permission.
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- */
-#ifndef lint
-static const char rcsid[] _U_ =
- "@(#) $Header: /tcpdump/master/tcpdump/bpf_dump.c,v 1.14.2.2 2003/11/16 08:51:04 guy Exp $ (LBL)";
-#endif
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include <tcpdump-stdinc.h>
-
-#include <pcap.h>
-#include <stdio.h>
-
-#include "interface.h"
-
-void
-bpf_dump(struct bpf_program *p, int option)
-{
- struct bpf_insn *insn;
- int i;
- int n = p->bf_len;
-
- insn = p->bf_insns;
- if (option > 2) {
- printf("%d\n", n);
- for (i = 0; i < n; ++insn, ++i) {
- printf("%u %u %u %u\n", insn->code,
- insn->jt, insn->jf, insn->k);
- }
- return ;
- }
- if (option > 1) {
- for (i = 0; i < n; ++insn, ++i)
- printf("{ 0x%x, %d, %d, 0x%08x },\n",
- insn->code, insn->jt, insn->jf, insn->k);
- return;
- }
- for (i = 0; i < n; ++insn, ++i) {
-#ifdef BDEBUG
- extern int bids[];
- printf(bids[i] > 0 ? "[%02d]" : " -- ", bids[i] - 1);
-#endif
- puts(bpf_image(insn, i));
- }
-}
+++ /dev/null
-/* @(#) $Header: /tcpdump/master/tcpdump/chdlc.h,v 1.1 2000/09/18 05:11:43 guy Exp $ (LBL) */
-/*
- * Copyright (c) 1990, 1991, 1993, 1994, 1995, 1996, 1997
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that: (1) source code distributions
- * retain the above copyright notice and this paragraph in its entirety, (2)
- * distributions including binary code include the above copyright notice and
- * this paragraph in its entirety in the documentation or other materials
- * provided with the distribution, and (3) all advertising materials mentioning
- * features or use of this software display the following acknowledgement:
- * ``This product includes software developed by the University of California,
- * Lawrence Berkeley Laboratory and its contributors.'' Neither the name of
- * the University nor the names of its contributors may be used to endorse
- * or promote products derived from this software without specific prior
- * written permission.
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- */
-
-#define CHDLC_HDRLEN 4
-#define CHDLC_UNICAST 0x0f
-#define CHDLC_BCAST 0x8f
-#define CHDLC_TYPE_SLARP 0x8035
-#define CHDLC_TYPE_CDP 0x2000
+++ /dev/null
-/*
- * Copyright (c) 1992, 1994, 1996
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that: (1) source code distributions
- * retain the above copyright notice and this paragraph in its entirety, (2)
- * distributions including binary code include the above copyright notice and
- * this paragraph in its entirety in the documentation or other materials
- * provided with the distribution, and (3) all advertising materials mentioning
- * features or use of this software display the following acknowledgement:
- * ``This product includes software developed by the University of California,
- * Lawrence Berkeley Laboratory and its contributors.'' Neither the name of
- * the University nor the names of its contributors may be used to endorse
- * or promote products derived from this software without specific prior
- * written permission.
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- * @(#) $Header: /tcpdump/master/tcpdump/decnet.h,v 1.11 2002/12/11 07:13:50 guy Exp $ (LBL)
- */
-
-#ifndef WIN32
-typedef u_int8_t byte[1]; /* single byte field */
-#else
-/*
- * the keyword 'byte' generates conflicts in Windows
- */
-typedef unsigned char Byte[1]; /* single byte field */
-#define byte Byte
-#endif /* WIN32 */
-typedef u_int8_t word[2]; /* 2 byte field */
-typedef u_int8_t longword[4]; /* 4 bytes field */
-
-/*
- * Definitions for DECNET Phase IV protocol headers
- */
-union etheraddress {
- u_int8_t dne_addr[6]; /* full ethernet address */
- struct {
- u_int8_t dne_hiord[4]; /* DECnet HIORD prefix */
- u_int8_t dne_nodeaddr[2]; /* DECnet node address */
- } dne_remote;
-};
-
-typedef union etheraddress etheraddr; /* Ethernet address */
-
-#define HIORD 0x000400aa /* high 32-bits of address (swapped) */
-
-#define AREAMASK 0176000 /* mask for area field */
-#define AREASHIFT 10 /* bit-offset for area field */
-#define NODEMASK 01777 /* mask for node address field */
-
-#define DN_MAXADDL 20 /* max size of DECnet address */
-struct dn_naddr {
- u_int16_t a_len; /* length of address */
- u_int8_t a_addr[DN_MAXADDL]; /* address as bytes */
-};
-
-/*
- * Define long and short header formats.
- */
-struct shorthdr
- {
- byte sh_flags; /* route flags */
- word sh_dst; /* destination node address */
- word sh_src; /* source node address */
- byte sh_visits; /* visit count */
- };
-
-struct longhdr
- {
- byte lg_flags; /* route flags */
- byte lg_darea; /* destination area (reserved) */
- byte lg_dsarea; /* destination subarea (reserved) */
- etheraddr lg_dst; /* destination id */
- byte lg_sarea; /* source area (reserved) */
- byte lg_ssarea; /* source subarea (reserved) */
- etheraddr lg_src; /* source id */
- byte lg_nextl2; /* next level 2 router (reserved) */
- byte lg_visits; /* visit count */
- byte lg_service; /* service class (reserved) */
- byte lg_pt; /* protocol type (reserved) */
- };
-
-union routehdr
- {
- struct shorthdr rh_short; /* short route header */
- struct longhdr rh_long; /* long route header */
- };
-
-/*
- * Define the values of various fields in the protocol messages.
- *
- * 1. Data packet formats.
- */
-#define RMF_MASK 7 /* mask for message type */
-#define RMF_SHORT 2 /* short message format */
-#define RMF_LONG 6 /* long message format */
-#ifndef RMF_RQR
-#define RMF_RQR 010 /* request return to sender */
-#define RMF_RTS 020 /* returning to sender */
-#define RMF_IE 040 /* intra-ethernet packet */
-#endif /* RMR_RQR */
-#define RMF_FVER 0100 /* future version flag */
-#define RMF_PAD 0200 /* pad field */
-#define RMF_PADMASK 0177 /* pad field mask */
-
-#define VIS_MASK 077 /* visit field mask */
-
-/*
- * 2. Control packet formats.
- */
-#define RMF_CTLMASK 017 /* mask for message type */
-#define RMF_CTLMSG 01 /* control message indicator */
-#define RMF_INIT 01 /* initialization message */
-#define RMF_VER 03 /* verification message */
-#define RMF_TEST 05 /* hello and test message */
-#define RMF_L1ROUT 07 /* level 1 routing message */
-#define RMF_L2ROUT 011 /* level 2 routing message */
-#define RMF_RHELLO 013 /* router hello message */
-#define RMF_EHELLO 015 /* endnode hello message */
-
-#define TI_L2ROUT 01 /* level 2 router */
-#define TI_L1ROUT 02 /* level 1 router */
-#define TI_ENDNODE 03 /* endnode */
-#define TI_VERIF 04 /* verification required */
-#define TI_BLOCK 010 /* blocking requested */
-
-#define VE_VERS 2 /* version number (2) */
-#define VE_ECO 0 /* ECO number */
-#define VE_UECO 0 /* user ECO number (0) */
-
-#define P3_VERS 1 /* phase III version number (1) */
-#define P3_ECO 3 /* ECO number (3) */
-#define P3_UECO 0 /* user ECO number (0) */
-
-#define II_L2ROUT 01 /* level 2 router */
-#define II_L1ROUT 02 /* level 1 router */
-#define II_ENDNODE 03 /* endnode */
-#define II_VERIF 04 /* verification required */
-#define II_NOMCAST 040 /* no multicast traffic accepted */
-#define II_BLOCK 0100 /* blocking requested */
-#define II_TYPEMASK 03 /* mask for node type */
-
-#define TESTDATA 0252 /* test data bytes */
-#define TESTLEN 1 /* length of transmitted test data */
-
-/*
- * Define control message formats.
- */
-struct initmsgIII /* phase III initialization message */
- {
- byte inIII_flags; /* route flags */
- word inIII_src; /* source node address */
- byte inIII_info; /* routing layer information */
- word inIII_blksize; /* maximum data link block size */
- byte inIII_vers; /* version number */
- byte inIII_eco; /* ECO number */
- byte inIII_ueco; /* user ECO number */
- byte inIII_rsvd; /* reserved image field */
- };
-
-struct initmsg /* initialization message */
- {
- byte in_flags; /* route flags */
- word in_src; /* source node address */
- byte in_info; /* routing layer information */
- word in_blksize; /* maximum data link block size */
- byte in_vers; /* version number */
- byte in_eco; /* ECO number */
- byte in_ueco; /* user ECO number */
- word in_hello; /* hello timer */
- byte in_rsvd; /* reserved image field */
- };
-
-struct verifmsg /* verification message */
- {
- byte ve_flags; /* route flags */
- word ve_src; /* source node address */
- byte ve_fcnval; /* function value image field */
- };
-
-struct testmsg /* hello and test message */
- {
- byte te_flags; /* route flags */
- word te_src; /* source node address */
- byte te_data; /* test data image field */
- };
-
-struct l1rout /* level 1 routing message */
- {
- byte r1_flags; /* route flags */
- word r1_src; /* source node address */
- byte r1_rsvd; /* reserved field */
- };
-
-struct l2rout /* level 2 routing message */
- {
- byte r2_flags; /* route flags */
- word r2_src; /* source node address */
- byte r2_rsvd; /* reserved field */
- };
-
-struct rhellomsg /* router hello message */
- {
- byte rh_flags; /* route flags */
- byte rh_vers; /* version number */
- byte rh_eco; /* ECO number */
- byte rh_ueco; /* user ECO number */
- etheraddr rh_src; /* source id */
- byte rh_info; /* routing layer information */
- word rh_blksize; /* maximum data link block size */
- byte rh_priority; /* router's priority */
- byte rh_area; /* reserved */
- word rh_hello; /* hello timer */
- byte rh_mpd; /* reserved */
- };
-
-struct ehellomsg /* endnode hello message */
- {
- byte eh_flags; /* route flags */
- byte eh_vers; /* version number */
- byte eh_eco; /* ECO number */
- byte eh_ueco; /* user ECO number */
- etheraddr eh_src; /* source id */
- byte eh_info; /* routing layer information */
- word eh_blksize; /* maximum data link block size */
- byte eh_area; /* area (reserved) */
- byte eh_seed[8]; /* verification seed */
- etheraddr eh_router; /* designated router */
- word eh_hello; /* hello timer */
- byte eh_mpd; /* (reserved) */
- byte eh_data; /* test data image field */
- };
-
-union controlmsg
- {
- struct initmsg cm_init; /* initialization message */
- struct verifmsg cm_ver; /* verification message */
- struct testmsg cm_test; /* hello and test message */
- struct l1rout cm_l1rou; /* level 1 routing message */
- struct l2rout cm_l2rout; /* level 2 routing message */
- struct rhellomsg cm_rhello; /* router hello message */
- struct ehellomsg cm_ehello; /* endnode hello message */
- };
-
-/* Macros for decoding routing-info fields */
-#define RI_COST(x) ((x)&0777)
-#define RI_HOPS(x) (((x)>>10)&037)
-\f
-/*
- * NSP protocol fields and values.
- */
-
-#define NSP_TYPEMASK 014 /* mask to isolate type code */
-#define NSP_SUBMASK 0160 /* mask to isolate subtype code */
-#define NSP_SUBSHFT 4 /* shift to move subtype code */
-
-#define MFT_DATA 0 /* data message */
-#define MFT_ACK 04 /* acknowledgement message */
-#define MFT_CTL 010 /* control message */
-
-#define MFS_ILS 020 /* data or I/LS indicator */
-#define MFS_BOM 040 /* beginning of message (data) */
-#define MFS_MOM 0 /* middle of message (data) */
-#define MFS_EOM 0100 /* end of message (data) */
-#define MFS_INT 040 /* interrupt message */
-
-#define MFS_DACK 0 /* data acknowledgement */
-#define MFS_IACK 020 /* I/LS acknowledgement */
-#define MFS_CACK 040 /* connect acknowledgement */
-
-#define MFS_NOP 0 /* no operation */
-#define MFS_CI 020 /* connect initiate */
-#define MFS_CC 040 /* connect confirm */
-#define MFS_DI 060 /* disconnect initiate */
-#define MFS_DC 0100 /* disconnect confirm */
-#define MFS_RCI 0140 /* retransmitted connect initiate */
-
-#define SGQ_ACK 0100000 /* ack */
-#define SGQ_NAK 0110000 /* negative ack */
-#define SGQ_OACK 0120000 /* other channel ack */
-#define SGQ_ONAK 0130000 /* other channel negative ack */
-#define SGQ_MASK 07777 /* mask to isolate seq # */
-#define SGQ_OTHER 020000 /* other channel qualifier */
-#define SGQ_DELAY 010000 /* ack delay flag */
-
-#define SGQ_EOM 0100000 /* pseudo flag for end-of-message */
-
-#define LSM_MASK 03 /* mask for modifier field */
-#define LSM_NOCHANGE 0 /* no change */
-#define LSM_DONOTSEND 1 /* do not send data */
-#define LSM_SEND 2 /* send data */
-
-#define LSI_MASK 014 /* mask for interpretation field */
-#define LSI_DATA 0 /* data segment or message count */
-#define LSI_INTR 4 /* interrupt request count */
-#define LSI_INTM 0377 /* funny marker for int. message */
-
-#define COS_MASK 014 /* mask for flow control field */
-#define COS_NONE 0 /* no flow control */
-#define COS_SEGMENT 04 /* segment flow control */
-#define COS_MESSAGE 010 /* message flow control */
-#define COS_CRYPTSER 020 /* cryptographic services requested */
-#define COS_DEFAULT 1 /* default value for field */
-
-#define COI_MASK 3 /* mask for version field */
-#define COI_32 0 /* version 3.2 */
-#define COI_31 1 /* version 3.1 */
-#define COI_40 2 /* version 4.0 */
-#define COI_41 3 /* version 4.1 */
-
-#define MNU_MASK 140 /* mask for session control version */
-#define MNU_10 000 /* session V1.0 */
-#define MNU_20 040 /* session V2.0 */
-#define MNU_ACCESS 1 /* access control present */
-#define MNU_USRDATA 2 /* user data field present */
-#define MNU_INVKPROXY 4 /* invoke proxy field present */
-#define MNU_UICPROXY 8 /* use uic-based proxy */
-
-#define DC_NORESOURCES 1 /* no resource reason code */
-#define DC_NOLINK 41 /* no link terminate reason code */
-#define DC_COMPLETE 42 /* disconnect complete reason code */
-
-#define DI_NOERROR 0 /* user disconnect */
-#define DI_SHUT 3 /* node is shutting down */
-#define DI_NOUSER 4 /* destination end user does not exist */
-#define DI_INVDEST 5 /* invalid end user destination */
-#define DI_REMRESRC 6 /* insufficient remote resources */
-#define DI_TPA 8 /* third party abort */
-#define DI_PROTOCOL 7 /* protocol error discovered */
-#define DI_ABORT 9 /* user abort */
-#define DI_LOCALRESRC 32 /* insufficient local resources */
-#define DI_REMUSERRESRC 33 /* insufficient remote user resources */
-#define DI_BADACCESS 34 /* bad access control information */
-#define DI_BADACCNT 36 /* bad ACCOUNT information */
-#define DI_CONNECTABORT 38 /* connect request cancelled */
-#define DI_TIMEDOUT 38 /* remote node or user crashed */
-#define DI_UNREACHABLE 39 /* local timers expired due to ... */
-#define DI_BADIMAGE 43 /* bad image data in connect */
-#define DI_SERVMISMATCH 54 /* cryptographic service mismatch */
-
-#define UC_OBJREJECT 0 /* object rejected connect */
-#define UC_USERDISCONNECT 0 /* user disconnect */
-#define UC_RESOURCES 1 /* insufficient resources (local or remote) */
-#define UC_NOSUCHNODE 2 /* unrecognized node name */
-#define UC_REMOTESHUT 3 /* remote node shutting down */
-#define UC_NOSUCHOBJ 4 /* unrecognized object */
-#define UC_INVOBJFORMAT 5 /* invalid object name format */
-#define UC_OBJTOOBUSY 6 /* object too busy */
-#define UC_NETWORKABORT 8 /* network abort */
-#define UC_USERABORT 9 /* user abort */
-#define UC_INVNODEFORMAT 10 /* invalid node name format */
-#define UC_LOCALSHUT 11 /* local node shutting down */
-#define UC_ACCESSREJECT 34 /* invalid access control information */
-#define UC_NORESPONSE 38 /* no response from object */
-#define UC_UNREACHABLE 39 /* node unreachable */
-
-/*
- * NSP message formats.
- */
-struct nsphdr /* general nsp header */
- {
- byte nh_flags; /* message flags */
- word nh_dst; /* destination link address */
- word nh_src; /* source link address */
- };
-
-struct seghdr /* data segment header */
- {
- byte sh_flags; /* message flags */
- word sh_dst; /* destination link address */
- word sh_src; /* source link address */
- word sh_seq[3]; /* sequence numbers */
- };
-
-struct minseghdr /* minimum data segment header */
- {
- byte ms_flags; /* message flags */
- word ms_dst; /* destination link address */
- word ms_src; /* source link address */
- word ms_seq; /* sequence number */
- };
-
-struct lsmsg /* link service message (after hdr) */
- {
- byte ls_lsflags; /* link service flags */
- byte ls_fcval; /* flow control value */
- };
-
-struct ackmsg /* acknowledgement message */
- {
- byte ak_flags; /* message flags */
- word ak_dst; /* destination link address */
- word ak_src; /* source link address */
- word ak_acknum[2]; /* acknowledgement numbers */
- };
-
-struct minackmsg /* minimum acknowledgement message */
- {
- byte mk_flags; /* message flags */
- word mk_dst; /* destination link address */
- word mk_src; /* source link address */
- word mk_acknum; /* acknowledgement number */
- };
-
-struct ciackmsg /* connect acknowledgement message */
- {
- byte ck_flags; /* message flags */
- word ck_dst; /* destination link address */
- };
-
-struct cimsg /* connect initiate message */
- {
- byte ci_flags; /* message flags */
- word ci_dst; /* destination link address (0) */
- word ci_src; /* source link address */
- byte ci_services; /* requested services */
- byte ci_info; /* information */
- word ci_segsize; /* maximum segment size */
- };
-
-struct ccmsg /* connect confirm message */
- {
- byte cc_flags; /* message flags */
- word cc_dst; /* destination link address */
- word cc_src; /* source link address */
- byte cc_services; /* requested services */
- byte cc_info; /* information */
- word cc_segsize; /* maximum segment size */
- byte cc_optlen; /* optional data length */
- };
-
-struct cnmsg /* generic connect message */
- {
- byte cn_flags; /* message flags */
- word cn_dst; /* destination link address */
- word cn_src; /* source link address */
- byte cn_services; /* requested services */
- byte cn_info; /* information */
- word cn_segsize; /* maximum segment size */
- };
-
-struct dimsg /* disconnect initiate message */
- {
- byte di_flags; /* message flags */
- word di_dst; /* destination link address */
- word di_src; /* source link address */
- word di_reason; /* reason code */
- byte di_optlen; /* optional data length */
- };
-
-struct dcmsg /* disconnect confirm message */
- {
- byte dc_flags; /* message flags */
- word dc_dst; /* destination link address */
- word dc_src; /* source link address */
- word dc_reason; /* reason code */
- };
+++ /dev/null
-/* @(#) $Header: /tcpdump/master/tcpdump/enc.h,v 1.1 2003/03/08 08:55:33 guy Exp $ (LBL) */
-/* From $OpenBSD: if_enc.h,v 1.8 2001/06/25 05:14:00 angelos Exp $ */
-/*
- * The authors of this code are John Ioannidis (ji@tla.org),
- * Angelos D. Keromytis (kermit@csd.uch.gr) and
- * Niels Provos (provos@physnet.uni-hamburg.de).
- *
- * This code was written by John Ioannidis for BSD/OS in Athens, Greece,
- * in November 1995.
- *
- * Ported to OpenBSD and NetBSD, with additional transforms, in December 1996,
- * by Angelos D. Keromytis.
- *
- * Additional transforms and features in 1997 and 1998 by Angelos D. Keromytis
- * and Niels Provos.
- *
- * Copyright (C) 1995, 1996, 1997, 1998 by John Ioannidis, Angelos D. Keromytis
- * and Niels Provos.
- * Copyright (c) 2001, Angelos D. Keromytis.
- *
- * Permission to use, copy, and modify this software with or without fee
- * is hereby granted, provided that this entire notice is included in
- * all copies of any software which is or includes a copy or
- * modification of this software.
- * You may use this code under the GNU public license if you so wish. Please
- * contribute changes back to the authors under this freer than GPL license
- * so that we may further the use of strong encryption without limitations to
- * all.
- *
- * THIS SOFTWARE IS BEING PROVIDED "AS IS", WITHOUT ANY EXPRESS OR
- * IMPLIED WARRANTY. IN PARTICULAR, NONE OF THE AUTHORS MAKES ANY
- * REPRESENTATION OR WARRANTY OF ANY KIND CONCERNING THE
- * MERCHANTABILITY OF THIS SOFTWARE OR ITS FITNESS FOR ANY PARTICULAR
- * PURPOSE.
- */
-
-#define ENC_HDRLEN 12
-
-/* From $OpenBSD: mbuf.h,v 1.56 2002/01/25 15:50:23 art Exp $ */
-#define M_CONF 0x0400 /* packet was encrypted (ESP-transport) */
-#define M_AUTH 0x0800 /* packet was authenticated (AH) */
-
-struct enchdr {
- u_int32_t af;
- u_int32_t spi;
- u_int32_t flags;
-};
+++ /dev/null
-/* $NetBSD: esp.h,v 1.13 2000/09/26 08:37:38 itojun Exp $ */
-/* $KAME: esp.h,v 1.15 2000/09/20 18:15:22 itojun Exp $ */
-
-/*
- * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the project nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-/*
- * RFC1827/2406 Encapsulated Security Payload.
- */
-
-#ifndef _NETINET6_ESP_H_
-#define _NETINET6_ESP_H_
-
-struct esp {
- u_int32_t esp_spi; /* ESP */
- /*variable size, 32bit bound*/ /* Initialization Vector */
- /*variable size*/ /* Payload data */
- /*variable size*/ /* padding */
- /*8bit*/ /* pad size */
- /*8bit*/ /* next header */
- /*8bit*/ /* next header */
- /*variable size, 32bit bound*/ /* Authentication data (new IPsec) */
-};
-
-struct newesp {
- u_int32_t esp_spi; /* ESP */
- u_int32_t esp_seq; /* Sequence number */
- /*variable size*/ /* (IV and) Payload data */
- /*variable size*/ /* padding */
- /*8bit*/ /* pad size */
- /*8bit*/ /* next header */
- /*8bit*/ /* next header */
- /*variable size, 32bit bound*/ /* Authentication data */
-};
-
-struct esptail {
- u_int8_t esp_padlen; /* pad length */
- u_int8_t esp_nxt; /* Next header */
- /*variable size, 32bit bound*/ /* Authentication data (new IPsec)*/
-};
-
-#endif /*_NETINET6_ESP_H_*/
+++ /dev/null
-/* @(#) $Header: /tcpdump/master/tcpdump/ether.h,v 1.8 2002/12/11 07:13:51 guy Exp $ (LBL) */
-/*
- * Copyright (c) 1982, 1986, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)if_ether.h 8.3 (Berkeley) 5/2/95
- */
-
-#define ETHERMTU 1500
-
-/*
- * The number of bytes in an ethernet (MAC) address.
- */
-#define ETHER_ADDR_LEN 6
-
-/*
- * Structure of a DEC/Intel/Xerox or 802.3 Ethernet header.
- */
-struct ether_header {
- u_int8_t ether_dhost[ETHER_ADDR_LEN];
- u_int8_t ether_shost[ETHER_ADDR_LEN];
- u_int16_t ether_type;
-};
-
-/*
- * Length of a DEC/Intel/Xerox or 802.3 Ethernet header; note that some
- * compilers may pad "struct ether_header" to a multiple of 4 bytes,
- * for example, so "sizeof (struct ether_header)" may not give the right
- * answer.
- */
-#define ETHER_HDRLEN 14
+++ /dev/null
-/*
- * Copyright (c) 1993, 1994, 1996
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that: (1) source code distributions
- * retain the above copyright notice and this paragraph in its entirety, (2)
- * distributions including binary code include the above copyright notice and
- * this paragraph in its entirety in the documentation or other materials
- * provided with the distribution, and (3) all advertising materials mentioning
- * features or use of this software display the following acknowledgement:
- * ``This product includes software developed by the University of California,
- * Lawrence Berkeley Laboratory and its contributors.'' Neither the name of
- * the University nor the names of its contributors may be used to endorse
- * or promote products derived from this software without specific prior
- * written permission.
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- * @(#) $Header: /tcpdump/master/tcpdump/ethertype.h,v 1.20 2003/07/01 19:10:26 guy Exp $ (LBL)
- */
-
-/*
- * Ethernet types.
- *
- * We wrap the declarations with #ifdef, so that if a file includes
- * <netinet/if_ether.h>, which may declare some of these, we don't
- * get a bunch of complaints from the C compiler about redefinitions
- * of these values.
- *
- * We declare all of them here so that no file has to include
- * <netinet/if_ether.h> if all it needs are ETHERTYPE_ values.
- */
-
-#ifndef ETHERTYPE_PUP
-#define ETHERTYPE_PUP 0x0200 /* PUP protocol */
-#endif
-#ifndef ETHERTYPE_IP
-#define ETHERTYPE_IP 0x0800 /* IP protocol */
-#endif
-#ifndef ETHERTYPE_ARP
-#define ETHERTYPE_ARP 0x0806 /* Addr. resolution protocol */
-#endif
-#ifndef ETHERTYPE_REVARP
-#define ETHERTYPE_REVARP 0x8035 /* reverse Addr. resolution protocol */
-#endif
-#ifndef ETHERTYPE_NS
-#define ETHERTYPE_NS 0x0600
-#endif
-#ifndef ETHERTYPE_SPRITE
-#define ETHERTYPE_SPRITE 0x0500
-#endif
-#ifndef ETHERTYPE_TRAIL
-#define ETHERTYPE_TRAIL 0x1000
-#endif
-#ifndef ETHERTYPE_MOPDL
-#define ETHERTYPE_MOPDL 0x6001
-#endif
-#ifndef ETHERTYPE_MOPRC
-#define ETHERTYPE_MOPRC 0x6002
-#endif
-#ifndef ETHERTYPE_DN
-#define ETHERTYPE_DN 0x6003
-#endif
-#ifndef ETHERTYPE_LAT
-#define ETHERTYPE_LAT 0x6004
-#endif
-#ifndef ETHERTYPE_SCA
-#define ETHERTYPE_SCA 0x6007
-#endif
-#ifndef ETHERTYPE_LANBRIDGE
-#define ETHERTYPE_LANBRIDGE 0x8038
-#endif
-#ifndef ETHERTYPE_DECDNS
-#define ETHERTYPE_DECDNS 0x803c
-#endif
-#ifndef ETHERTYPE_DECDTS
-#define ETHERTYPE_DECDTS 0x803e
-#endif
-#ifndef ETHERTYPE_VEXP
-#define ETHERTYPE_VEXP 0x805b
-#endif
-#ifndef ETHERTYPE_VPROD
-#define ETHERTYPE_VPROD 0x805c
-#endif
-#ifndef ETHERTYPE_ATALK
-#define ETHERTYPE_ATALK 0x809b
-#endif
-#ifndef ETHERTYPE_AARP
-#define ETHERTYPE_AARP 0x80f3
-#endif
-#ifndef ETHERTYPE_8021Q
-#define ETHERTYPE_8021Q 0x8100
-#endif
-#ifndef ETHERTYPE_IPX
-#define ETHERTYPE_IPX 0x8137
-#endif
-#ifndef ETHERTYPE_IPV6
-#define ETHERTYPE_IPV6 0x86dd
-#endif
-#ifndef ETHERTYPE_PPP
-#define ETHERTYPE_PPP 0x880b
-#endif
-#ifndef ETHERTYPE_MPLS
-#define ETHERTYPE_MPLS 0x8847
-#endif
-#ifndef ETHERTYPE_MPLS_MULTI
-#define ETHERTYPE_MPLS_MULTI 0x8848
-#endif
-#ifndef ETHERTYPE_PPPOED
-#define ETHERTYPE_PPPOED 0x8863
-#endif
-#ifndef ETHERTYPE_PPPOES
-#define ETHERTYPE_PPPOES 0x8864
-#endif
-#ifndef ETHERTYPE_LOOPBACK
-#define ETHERTYPE_LOOPBACK 0x9000
-#endif
-#ifndef ETHERTYPE_VMAN
-#define ETHERTYPE_VMAN 0x9100 /* Extreme VMAN Protocol */
-#endif
-#ifndef ETHERTYPE_ISO
-#define ETHERTYPE_ISO 0xfefe /* nonstandard - used in Cisco HDLC encapsulation */
-#endif
-
-extern const struct tok ethertype_values[];
+++ /dev/null
-/*
- * Copyright (c) 1992, 1993, 1994, 1995, 1996
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that: (1) source code distributions
- * retain the above copyright notice and this paragraph in its entirety, (2)
- * distributions including binary code include the above copyright notice and
- * this paragraph in its entirety in the documentation or other materials
- * provided with the distribution, and (3) all advertising materials mentioning
- * features or use of this software display the following acknowledgement:
- * ``This product includes software developed by the University of California,
- * Lawrence Berkeley Laboratory and its contributors.'' Neither the name of
- * the University nor the names of its contributors may be used to endorse
- * or promote products derived from this software without specific prior
- * written permission.
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- * @(#) $Header: /tcpdump/master/tcpdump/extract.h,v 1.19 2002/12/11 07:13:51 guy Exp $ (LBL)
- */
-
-/* Network to host order macros */
-
-#ifdef LBL_ALIGN
-/*
- * The processor doesn't natively handle unaligned loads.
- */
-#ifdef HAVE___ATTRIBUTE__
-/*
- * We have __attribute__; we assume that means we have __attribute__((packed)).
- * Declare packed structures containing a u_int16_t and a u_int32_t,
- * cast the pointer to point to one of those, and fetch through it;
- * the GCC manual doesn't appear to explicitly say that
- * __attribute__((packed)) causes the compiler to generate unaligned-safe
- * code, but it apppears to do so.
- *
- * We do this in case the compiler can generate, for this instruction set,
- * better code to do an unaligned load and pass stuff to "ntohs()" or
- * "ntohl()" than the code to fetch the bytes one at a time and
- * assemble them. (That might not be the case on a little-endian platform,
- * where "ntohs()" and "ntohl()" might not be done inline.)
- */
-typedef struct {
- u_int16_t val;
-} __attribute__((packed)) unaligned_u_int16_t;
-
-typedef struct {
- u_int32_t val;
-} __attribute__((packed)) unaligned_u_int32_t;
-
-#define EXTRACT_16BITS(p) \
- ((u_int16_t)ntohs(((const unaligned_u_int16_t *)(p))->val))
-#define EXTRACT_32BITS(p) \
- ((u_int32_t)ntohl(((const unaligned_u_int32_t *)(p))->val))
-#else /* HAVE___ATTRIBUTE__ */
-/*
- * We don't have __attribute__, so do unaligned loads of big-endian
- * quantities the hard way - fetch the bytes one at a time and
- * assemble them.
- */
-#define EXTRACT_16BITS(p) \
- ((u_int16_t)((u_int16_t)*((const u_int8_t *)(p) + 0) << 8 | \
- (u_int16_t)*((const u_int8_t *)(p) + 1)))
-#define EXTRACT_32BITS(p) \
- ((u_int32_t)((u_int32_t)*((const u_int8_t *)(p) + 0) << 24 | \
- (u_int32_t)*((const u_int8_t *)(p) + 1) << 16 | \
- (u_int32_t)*((const u_int8_t *)(p) + 2) << 8 | \
- (u_int32_t)*((const u_int8_t *)(p) + 3)))
-#endif /* HAVE___ATTRIBUTE__ */
-#else /* LBL_ALIGN */
-/*
- * The processor natively handles unaligned loads, so we can just
- * cast the pointer and fetch through it.
- */
-#define EXTRACT_16BITS(p) \
- ((u_int16_t)ntohs(*(const u_int16_t *)(p)))
-#define EXTRACT_32BITS(p) \
- ((u_int32_t)ntohl(*(const u_int32_t *)(p)))
-#endif /* LBL_ALIGN */
-
-#define EXTRACT_24BITS(p) \
- ((u_int32_t)((u_int32_t)*((const u_int8_t *)(p) + 0) << 16 | \
- (u_int32_t)*((const u_int8_t *)(p) + 1) << 8 | \
- (u_int32_t)*((const u_int8_t *)(p) + 2)))
-
-/* Little endian protocol host order macros */
-
-#define EXTRACT_LE_8BITS(p) (*(p))
-#define EXTRACT_LE_16BITS(p) \
- ((u_int16_t)((u_int16_t)*((const u_int8_t *)(p) + 1) << 8 | \
- (u_int16_t)*((const u_int8_t *)(p) + 0)))
-#define EXTRACT_LE_32BITS(p) \
- ((u_int32_t)((u_int32_t)*((const u_int8_t *)(p) + 3) << 24 | \
- (u_int32_t)*((const u_int8_t *)(p) + 2) << 16 | \
- (u_int32_t)*((const u_int8_t *)(p) + 1) << 8 | \
- (u_int32_t)*((const u_int8_t *)(p) + 0)))
+++ /dev/null
-/*
- * Copyright (c) 1992, 1993, 1994, 1995, 1996
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that: (1) source code distributions
- * retain the above copyright notice and this paragraph in its entirety, (2)
- * distributions including binary code include the above copyright notice and
- * this paragraph in its entirety in the documentation or other materials
- * provided with the distribution, and (3) all advertising materials mentioning
- * features or use of this software display the following acknowledgement:
- * ``This product includes software developed by the University of California,
- * Lawrence Berkeley Laboratory and its contributors.'' Neither the name of
- * the University nor the names of its contributors may be used to endorse
- * or promote products derived from this software without specific prior
- * written permission.
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- * @(#) $Header: /tcpdump/master/tcpdump/fddi.h,v 1.11 2002/12/11 07:13:51 guy Exp $ (LBL)
- */
-
-/*
- * Based on Ultrix if_fddi.h
- */
-
-/*
- * This stuff should come from a system header file, but there's no
- * obviously portable way to do that and it's not really going
- * to change from system to system (except for the padding business).
- */
-
-struct fddi_header {
- u_char fddi_fc; /* frame control */
- u_char fddi_dhost[6];
- u_char fddi_shost[6];
-};
-
-/*
- * Length of an FDDI header; note that some compilers may pad
- * "struct fddi_header" to a multiple of 4 bytes, for example, so
- * "sizeof (struct fddi_header)" may not give the right
- * answer.
- */
-#define FDDI_HDRLEN 13
-
-/* Useful values for fddi_fc (frame control) field */
-
-/*
- * FDDI Frame Control bits
- */
-#define FDDIFC_C 0x80 /* Class bit */
-#define FDDIFC_L 0x40 /* Address length bit */
-#define FDDIFC_F 0x30 /* Frame format bits */
-#define FDDIFC_Z 0x0f /* Control bits */
-
-/*
- * FDDI Frame Control values. (48-bit addressing only).
- */
-#define FDDIFC_VOID 0x40 /* Void frame */
-#define FDDIFC_NRT 0x80 /* Nonrestricted token */
-#define FDDIFC_RT 0xc0 /* Restricted token */
-#define FDDIFC_SMT_INFO 0x41 /* SMT Info */
-#define FDDIFC_SMT_NSA 0x4F /* SMT Next station adrs */
-#define FDDIFC_MAC_BEACON 0xc2 /* MAC Beacon frame */
-#define FDDIFC_MAC_CLAIM 0xc3 /* MAC Claim frame */
-#define FDDIFC_LLC_ASYNC 0x50 /* Async. LLC frame */
-#define FDDIFC_LLC_SYNC 0xd0 /* Sync. LLC frame */
-#define FDDIFC_IMP_ASYNC 0x60 /* Implementor Async. */
-#define FDDIFC_IMP_SYNC 0xe0 /* Implementor Synch. */
-#define FDDIFC_SMT 0x40 /* SMT frame */
-#define FDDIFC_MAC 0xc0 /* MAC frame */
-
-#define FDDIFC_CLFF 0xF0 /* Class/Length/Format bits */
-#define FDDIFC_ZZZZ 0x0F /* Control bits */
+++ /dev/null
-/*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that: (1) source code
- * distributions retain the above copyright notice and this paragraph
- * in its entirety, and (2) distributions including binary code include
- * the above copyright notice and this paragraph in its entirety in
- * the documentation or other materials provided with the distribution.
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND
- * WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT
- * LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE.
- *
- * Original code by Hannes Gredler (hannes@juniper.net)
- */
-
-#ifndef lint
-static const char rcsid[] _U_ =
- "@(#) $Header: /tcpdump/master/tcpdump/gmpls.c,v 1.2.2.2 2003/11/16 08:51:05 guy Exp $ (LBL)";
-#endif
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include <tcpdump-stdinc.h>
-
-#include "interface.h"
-
-/* rfc3471 */
-struct tok gmpls_link_prot_values[] = {
- { 0x01, "Extra Traffic"},
- { 0x02, "Unprotected"},
- { 0x04, "Shared"},
- { 0x08, "Dedicated 1:1"},
- { 0x10, "Dedicated 1+1"},
- { 0x20, "Enhanced"},
- { 0x40, "Reserved"},
- { 0x80, "Reserved"},
- { 0, NULL }
-};
-
-/* rfc3471 */
-struct tok gmpls_switch_cap_values[] = {
- { 1, "Packet-Switch Capable-1"},
- { 2, "Packet-Switch Capable-2"},
- { 3, "Packet-Switch Capable-3"},
- { 4, "Packet-Switch Capable-4"},
- { 51, "Layer-2 Switch Capable"},
- { 100, "Time-Division-Multiplex"},
- { 150, "Lambda-Switch Capable"},
- { 200, "Fiber-Switch Capable"},
- { 0, NULL }
-};
-
-/* rfc3471 */
-struct tok gmpls_encoding_values[] = {
- { 1, "Packet"},
- { 2, "Ethernet V2/DIX"},
- { 3, "ANSI/ETSI PDH"},
- { 4, "Reserved"},
- { 5, "SDH ITU-T G.707/SONET ANSI T1.105"},
- { 6, "Reserved"},
- { 7, "Digital Wrapper"},
- { 8, "Lambda (photonic)"},
- { 9, "Fiber"},
- { 10, "Reserved"},
- { 11, "FiberChannel"},
- { 0, NULL }
-};
-
-/* rfc3471 */
-struct tok gmpls_payload_values[] = {
- { 0, "Unknown"},
- { 1, "Reserved"},
- { 2, "Reserved"},
- { 3, "Reserved"},
- { 4, "Reserved"},
- { 5, "Asynchronous mapping of E4"},
- { 6, "Asynchronous mapping of DS3/T3"},
- { 7, "Asynchronous mapping of E3"},
- { 8, "Bit synchronous mapping of E3"},
- { 9, "Byte synchronous mapping of E3"},
- { 10, "Asynchronous mapping of DS2/T2"},
- { 11, "Bit synchronous mapping of DS2/T2"},
- { 12, "Reserved"},
- { 13, "Asynchronous mapping of E1"},
- { 14, "Byte synchronous mapping of E1"},
- { 15, "Byte synchronous mapping of 31 * DS0"},
- { 16, "Asynchronous mapping of DS1/T1"},
- { 17, "Bit synchronous mapping of DS1/T1"},
- { 18, "Byte synchronous mapping of DS1/T1"},
- { 19, "VC-11 in VC-12"},
- { 20, "Reserved"},
- { 21, "Reserved"},
- { 22, "DS1 SF Asynchronous"},
- { 23, "DS1 ESF Asynchronous"},
- { 24, "DS3 M23 Asynchronous"},
- { 25, "DS3 C-Bit Parity Asynchronous"},
- { 26, "VT/LOVC"},
- { 27, "STS SPE/HOVC"},
- { 28, "POS - No Scrambling, 16 bit CRC"},
- { 29, "POS - No Scrambling, 32 bit CRC"},
- { 30, "POS - Scrambling, 16 bit CRC"},
- { 31, "POS - Scrambling, 32 bit CRC"},
- { 32, "ATM mapping"},
- { 33, "Ethernet PHY"},
- { 34, "SONET/SDH"},
- { 35, "Reserved (SONET deprecated)"},
- { 36, "Digital Wrapper"},
- { 37, "Lambda"},
- { 38, "ANSI/ETSI PDH"},
- { 39, "Reserved"},
- { 40, "Link Access Protocol SDH (X.85 and X.86)"},
- { 41, "FDDI"},
- { 42, "DQDB (ETSI ETS 300 216)"},
- { 43, "FiberChannel-3 (Services)"},
- { 44, "HDLC"},
- { 45, "Ethernet V2/DIX (only)"},
- { 46, "Ethernet 802.3 (only)"},
-/* draft-ietf-ccamp-gmpls-g709-04.txt */
- { 47, "G.709 ODUj"},
- { 48, "G.709 OTUk(v)"},
- { 49, "CBR/CBRa"},
- { 50, "CBRb"},
- { 51, "BSOT"},
- { 52, "BSNT"},
- { 53, "IP/PPP (GFP)"},
- { 54, "Ethernet MAC (framed GFP)"},
- { 55, "Ethernet PHY (transparent GFP)"},
- { 56, "ESCON"},
- { 57, "FICON"},
- { 58, "Fiber Channel"},
- { 0, NULL }
-};
+++ /dev/null
-/* @(#) $Header: /tcpdump/master/tcpdump/gmpls.h,v 1.2 2003/06/09 23:28:09 guy Exp $ (LBL) */
-/*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that: (1) source code
- * distributions retain the above copyright notice and this paragraph
- * in its entirety, and (2) distributions including binary code include
- * the above copyright notice and this paragraph in its entirety in
- * the documentation or other materials provided with the distribution.
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND
- * WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT
- * LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE.
- *
- * Original code by Hannes Gredler (hannes@juniper.net)
- */
-
-extern struct tok gmpls_link_prot_values[];
-extern struct tok gmpls_switch_cap_values[];
-extern struct tok gmpls_encoding_values[];
-extern struct tok gmpls_payload_values[];
+++ /dev/null
-/*
- * Copyright (c) 1997
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that: (1) source code distributions
- * retain the above copyright notice and this paragraph in its entirety, (2)
- * distributions including binary code include the above copyright notice and
- * this paragraph in its entirety in the documentation or other materials
- * provided with the distribution, and (3) all advertising materials mentioning
- * features or use of this software display the following acknowledgement:
- * ``This product includes software developed by the University of California,
- * Lawrence Berkeley Laboratory and its contributors.'' Neither the name of
- * the University nor the names of its contributors may be used to endorse
- * or promote products derived from this software without specific prior
- * written permission.
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- */
-
-#ifndef lint
-static const char rcsid[] _U_ =
- "@(#) $Header: /tcpdump/master/tcpdump/gmt2local.c,v 1.7.2.2 2003/11/16 08:51:06 guy Exp $ (LBL)";
-#endif
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include <tcpdump-stdinc.h>
-
-#include <stdio.h>
-
-#ifdef HAVE_OS_PROTO_H
-#include "os-proto.h"
-#endif
-
-#include "gmt2local.h"
-
-/*
- * Returns the difference between gmt and local time in seconds.
- * Use gmtime() and localtime() to keep things simple.
- */
-int32_t
-gmt2local(time_t t)
-{
- register int dt, dir;
- register struct tm *gmt, *loc;
- struct tm sgmt;
-
- if (t == 0)
- t = time(NULL);
- gmt = &sgmt;
- *gmt = *gmtime(&t);
- loc = localtime(&t);
- dt = (loc->tm_hour - gmt->tm_hour) * 60 * 60 +
- (loc->tm_min - gmt->tm_min) * 60;
-
- /*
- * If the year or julian day is different, we span 00:00 GMT
- * and must add or subtract a day. Check the year first to
- * avoid problems when the julian day wraps.
- */
- dir = loc->tm_year - gmt->tm_year;
- if (dir == 0)
- dir = loc->tm_yday - gmt->tm_yday;
- dt += dir * 24 * 60 * 60;
-
- return (dt);
-}
+++ /dev/null
-/*
- * Copyright (c) 1997
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that: (1) source code distributions
- * retain the above copyright notice and this paragraph in its entirety, (2)
- * distributions including binary code include the above copyright notice and
- * this paragraph in its entirety in the documentation or other materials
- * provided with the distribution, and (3) all advertising materials mentioning
- * features or use of this software display the following acknowledgement:
- * ``This product includes software developed by the University of California,
- * Lawrence Berkeley Laboratory and its contributors.'' Neither the name of
- * the University nor the names of its contributors may be used to endorse
- * or promote products derived from this software without specific prior
- * written permission.
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- * @(#) $Header: /tcpdump/master/tcpdump/gmt2local.h,v 1.2.1.1 1999/10/07 23:47:10 mcr Exp $ (LBL)
- */
-#ifndef gmt2local_h
-#define gmt2local_h
-
-int32_t gmt2local(time_t);
-#endif
+++ /dev/null
-/* @(#) $Header: /tcpdump/master/tcpdump/icmp6.h,v 1.14 2002/12/11 07:13:52 guy Exp $ (LBL) */
-/* $NetBSD: icmp6.h,v 1.13 2000/08/03 16:30:37 itojun Exp $ */
-/* $KAME: icmp6.h,v 1.22 2000/08/03 15:25:16 jinmei Exp $ */
-
-/*
- * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the project nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-/*
- * Copyright (c) 1982, 1986, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)ip_icmp.h 8.1 (Berkeley) 6/10/93
- */
-
-#ifndef _NETINET_ICMP6_H_
-#define _NETINET_ICMP6_H_
-
-struct icmp6_hdr {
- u_int8_t icmp6_type; /* type field */
- u_int8_t icmp6_code; /* code field */
- u_int16_t icmp6_cksum; /* checksum field */
- union {
- u_int32_t icmp6_un_data32[1]; /* type-specific field */
- u_int16_t icmp6_un_data16[2]; /* type-specific field */
- u_int8_t icmp6_un_data8[4]; /* type-specific field */
- } icmp6_dataun;
-};
-
-#define icmp6_data32 icmp6_dataun.icmp6_un_data32
-#define icmp6_data16 icmp6_dataun.icmp6_un_data16
-#define icmp6_data8 icmp6_dataun.icmp6_un_data8
-#define icmp6_pptr icmp6_data32[0] /* parameter prob */
-#define icmp6_mtu icmp6_data32[0] /* packet too big */
-#define icmp6_id icmp6_data16[0] /* echo request/reply */
-#define icmp6_seq icmp6_data16[1] /* echo request/reply */
-#define icmp6_maxdelay icmp6_data16[0] /* mcast group membership */
-
-#define ICMP6_DST_UNREACH 1 /* dest unreachable, codes: */
-#define ICMP6_PACKET_TOO_BIG 2 /* packet too big */
-#define ICMP6_TIME_EXCEEDED 3 /* time exceeded, code: */
-#define ICMP6_PARAM_PROB 4 /* ip6 header bad */
-
-#define ICMP6_ECHO_REQUEST 128 /* echo service */
-#define ICMP6_ECHO_REPLY 129 /* echo reply */
-#define ICMP6_MEMBERSHIP_QUERY 130 /* group membership query */
-#define MLD6_LISTENER_QUERY 130 /* multicast listener query */
-#define ICMP6_MEMBERSHIP_REPORT 131 /* group membership report */
-#define MLD6_LISTENER_REPORT 131 /* multicast listener report */
-#define ICMP6_MEMBERSHIP_REDUCTION 132 /* group membership termination */
-#define MLD6_LISTENER_DONE 132 /* multicast listener done */
-
-#define ND_ROUTER_SOLICIT 133 /* router solicitation */
-#define ND_ROUTER_ADVERT 134 /* router advertisment */
-#define ND_NEIGHBOR_SOLICIT 135 /* neighbor solicitation */
-#define ND_NEIGHBOR_ADVERT 136 /* neighbor advertisment */
-#define ND_REDIRECT 137 /* redirect */
-
-#define ICMP6_ROUTER_RENUMBERING 138 /* router renumbering */
-
-#define ICMP6_WRUREQUEST 139 /* who are you request */
-#define ICMP6_WRUREPLY 140 /* who are you reply */
-#define ICMP6_FQDN_QUERY 139 /* FQDN query */
-#define ICMP6_FQDN_REPLY 140 /* FQDN reply */
-#define ICMP6_NI_QUERY 139 /* node information request */
-#define ICMP6_NI_REPLY 140 /* node information reply */
-
-/* The definitions below are experimental. TBA */
-#define MLD6_MTRACE_RESP 141 /* mtrace response(to sender) */
-#define MLD6_MTRACE 142 /* mtrace messages */
-
-/* Folloing numbers are defined in the mobile-ip draft. */
-#define ICMP6_HADISCOV_REQUEST 150 /* XXX To be authorized */
-#define ICMP6_HADISCOV_REPLY 151 /* XXX To be authorized */
-#define ICMP6_MOBILEPREFIX_SOLICIT 152 /* XXX To be authorized */
-#define ICMP6_MOBILEPREFIX_ADVERT 153 /* XXX To be authorized */
-
-#define ICMP6_MAXTYPE 153
-
-#define ICMP6_DST_UNREACH_NOROUTE 0 /* no route to destination */
-#define ICMP6_DST_UNREACH_ADMIN 1 /* administratively prohibited */
-#define ICMP6_DST_UNREACH_NOTNEIGHBOR 2 /* not a neighbor(obsolete) */
-#define ICMP6_DST_UNREACH_BEYONDSCOPE 2 /* beyond scope of source address */
-#define ICMP6_DST_UNREACH_ADDR 3 /* address unreachable */
-#define ICMP6_DST_UNREACH_NOPORT 4 /* port unreachable */
-
-#define ICMP6_TIME_EXCEED_TRANSIT 0 /* ttl==0 in transit */
-#define ICMP6_TIME_EXCEED_REASSEMBLY 1 /* ttl==0 in reass */
-
-#define ICMP6_PARAMPROB_HEADER 0 /* erroneous header field */
-#define ICMP6_PARAMPROB_NEXTHEADER 1 /* unrecognized next header */
-#define ICMP6_PARAMPROB_OPTION 2 /* unrecognized option */
-
-#define ICMP6_INFOMSG_MASK 0x80 /* all informational messages */
-
-#define ICMP6_NI_SUBJ_IPV6 0 /* Query Subject is an IPv6 address */
-#define ICMP6_NI_SUBJ_FQDN 1 /* Query Subject is a Domain name */
-#define ICMP6_NI_SUBJ_IPV4 2 /* Query Subject is an IPv4 address */
-
-#define ICMP6_NI_SUCCESS 0 /* node information successful reply */
-#define ICMP6_NI_REFUSED 1 /* node information request is refused */
-#define ICMP6_NI_UNKNOWN 2 /* unknown Qtype */
-
-#define ICMP6_ROUTER_RENUMBERING_COMMAND 0 /* rr command */
-#define ICMP6_ROUTER_RENUMBERING_RESULT 1 /* rr result */
-#define ICMP6_ROUTER_RENUMBERING_SEQNUM_RESET 255 /* rr seq num reset */
-
-/* Used in kernel only */
-#define ND_REDIRECT_ONLINK 0 /* redirect to an on-link node */
-#define ND_REDIRECT_ROUTER 1 /* redirect to a better router */
-
-/*
- * Multicast Listener Discovery
- */
-struct mld6_hdr {
- struct icmp6_hdr mld6_hdr;
- struct in6_addr mld6_addr; /* multicast address */
-};
-
-#define mld6_type mld6_hdr.icmp6_type
-#define mld6_code mld6_hdr.icmp6_code
-#define mld6_cksum mld6_hdr.icmp6_cksum
-#define mld6_maxdelay mld6_hdr.icmp6_data16[0]
-#define mld6_reserved mld6_hdr.icmp6_data16[1]
-
-/*
- * Neighbor Discovery
- */
-
-struct nd_router_solicit { /* router solicitation */
- struct icmp6_hdr nd_rs_hdr;
- /* could be followed by options */
-};
-
-#define nd_rs_type nd_rs_hdr.icmp6_type
-#define nd_rs_code nd_rs_hdr.icmp6_code
-#define nd_rs_cksum nd_rs_hdr.icmp6_cksum
-#define nd_rs_reserved nd_rs_hdr.icmp6_data32[0]
-
-struct nd_router_advert { /* router advertisement */
- struct icmp6_hdr nd_ra_hdr;
- u_int32_t nd_ra_reachable; /* reachable time */
- u_int32_t nd_ra_retransmit; /* retransmit timer */
- /* could be followed by options */
-};
-
-#define nd_ra_type nd_ra_hdr.icmp6_type
-#define nd_ra_code nd_ra_hdr.icmp6_code
-#define nd_ra_cksum nd_ra_hdr.icmp6_cksum
-#define nd_ra_curhoplimit nd_ra_hdr.icmp6_data8[0]
-#define nd_ra_flags_reserved nd_ra_hdr.icmp6_data8[1]
-#define ND_RA_FLAG_MANAGED 0x80
-#define ND_RA_FLAG_OTHER 0x40
-#define ND_RA_FLAG_HOME_AGENT 0x20
-
-/*
- * Router preference values based on draft-draves-ipngwg-router-selection-01.
- * These are non-standard definitions.
- */
-#define ND_RA_FLAG_RTPREF_MASK 0x18 /* 00011000 */
-
-#define ND_RA_FLAG_RTPREF_HIGH 0x08 /* 00001000 */
-#define ND_RA_FLAG_RTPREF_MEDIUM 0x00 /* 00000000 */
-#define ND_RA_FLAG_RTPREF_LOW 0x18 /* 00011000 */
-#define ND_RA_FLAG_RTPREF_RSV 0x10 /* 00010000 */
-
-#define nd_ra_router_lifetime nd_ra_hdr.icmp6_data16[1]
-
-struct nd_neighbor_solicit { /* neighbor solicitation */
- struct icmp6_hdr nd_ns_hdr;
- struct in6_addr nd_ns_target; /*target address */
- /* could be followed by options */
-};
-
-#define nd_ns_type nd_ns_hdr.icmp6_type
-#define nd_ns_code nd_ns_hdr.icmp6_code
-#define nd_ns_cksum nd_ns_hdr.icmp6_cksum
-#define nd_ns_reserved nd_ns_hdr.icmp6_data32[0]
-
-struct nd_neighbor_advert { /* neighbor advertisement */
- struct icmp6_hdr nd_na_hdr;
- struct in6_addr nd_na_target; /* target address */
- /* could be followed by options */
-};
-
-#define nd_na_type nd_na_hdr.icmp6_type
-#define nd_na_code nd_na_hdr.icmp6_code
-#define nd_na_cksum nd_na_hdr.icmp6_cksum
-#define nd_na_flags_reserved nd_na_hdr.icmp6_data32[0]
-/* netowkr endian */
-#define ND_NA_FLAG_ROUTER ((u_int32_t)htonl(0x80000000))
-#define ND_NA_FLAG_SOLICITED ((u_int32_t)htonl(0x40000000))
-#define ND_NA_FLAG_OVERRIDE ((u_int32_t)htonl(0x20000000))
-
-struct nd_redirect { /* redirect */
- struct icmp6_hdr nd_rd_hdr;
- struct in6_addr nd_rd_target; /* target address */
- struct in6_addr nd_rd_dst; /* destination address */
- /* could be followed by options */
-};
-
-#define nd_rd_type nd_rd_hdr.icmp6_type
-#define nd_rd_code nd_rd_hdr.icmp6_code
-#define nd_rd_cksum nd_rd_hdr.icmp6_cksum
-#define nd_rd_reserved nd_rd_hdr.icmp6_data32[0]
-
-struct nd_opt_hdr { /* Neighbor discovery option header */
- u_int8_t nd_opt_type;
- u_int8_t nd_opt_len;
- /* followed by option specific data*/
-};
-
-#define ND_OPT_SOURCE_LINKADDR 1
-#define ND_OPT_TARGET_LINKADDR 2
-#define ND_OPT_PREFIX_INFORMATION 3
-#define ND_OPT_REDIRECTED_HEADER 4
-#define ND_OPT_MTU 5
-#define ND_OPT_ADVINTERVAL 7
-#define ND_OPT_HOMEAGENT_INFO 8
-#define ND_OPT_ROUTE_INFO 9 /* draft-ietf-ipngwg-router-preference, not officially assigned yet */
-
-
-struct nd_opt_prefix_info { /* prefix information */
- u_int8_t nd_opt_pi_type;
- u_int8_t nd_opt_pi_len;
- u_int8_t nd_opt_pi_prefix_len;
- u_int8_t nd_opt_pi_flags_reserved;
- u_int32_t nd_opt_pi_valid_time;
- u_int32_t nd_opt_pi_preferred_time;
- u_int32_t nd_opt_pi_reserved2;
- struct in6_addr nd_opt_pi_prefix;
-};
-
-#define ND_OPT_PI_FLAG_ONLINK 0x80
-#define ND_OPT_PI_FLAG_AUTO 0x40
-#define ND_OPT_PI_FLAG_ROUTER 0x20 /*2292bis*/
-
-struct nd_opt_rd_hdr { /* redirected header */
- u_int8_t nd_opt_rh_type;
- u_int8_t nd_opt_rh_len;
- u_int16_t nd_opt_rh_reserved1;
- u_int32_t nd_opt_rh_reserved2;
- /* followed by IP header and data */
-};
-
-struct nd_opt_mtu { /* MTU option */
- u_int8_t nd_opt_mtu_type;
- u_int8_t nd_opt_mtu_len;
- u_int16_t nd_opt_mtu_reserved;
- u_int32_t nd_opt_mtu_mtu;
-};
-
-struct nd_opt_advinterval { /* Advertisement interval option */
- u_int8_t nd_opt_adv_type;
- u_int8_t nd_opt_adv_len;
- u_int16_t nd_opt_adv_reserved;
- u_int32_t nd_opt_adv_interval;
-};
-
-struct nd_opt_homeagent_info { /* Home Agent info */
- u_int8_t nd_opt_hai_type;
- u_int8_t nd_opt_hai_len;
- u_int16_t nd_opt_hai_reserved;
- int16_t nd_opt_hai_preference;
- u_int16_t nd_opt_hai_lifetime;
-};
-
-struct nd_opt_route_info { /* route info */
- u_int8_t nd_opt_rti_type;
- u_int8_t nd_opt_rti_len;
- u_int8_t nd_opt_rti_prefixlen;
- u_int8_t nd_opt_rti_flags;
- u_int32_t nd_opt_rti_lifetime;
- /* prefix follows */
-};
-
-/*
- * icmp6 namelookup
- */
-
-struct icmp6_namelookup {
- struct icmp6_hdr icmp6_nl_hdr;
- u_int8_t icmp6_nl_nonce[8];
- int32_t icmp6_nl_ttl;
-#if 0
- u_int8_t icmp6_nl_len;
- u_int8_t icmp6_nl_name[3];
-#endif
- /* could be followed by options */
-};
-
-/*
- * icmp6 node information
- */
-struct icmp6_nodeinfo {
- struct icmp6_hdr icmp6_ni_hdr;
- u_int8_t icmp6_ni_nonce[8];
- /* could be followed by reply data */
-};
-
-#define ni_type icmp6_ni_hdr.icmp6_type
-#define ni_code icmp6_ni_hdr.icmp6_code
-#define ni_cksum icmp6_ni_hdr.icmp6_cksum
-#define ni_qtype icmp6_ni_hdr.icmp6_data16[0]
-#define ni_flags icmp6_ni_hdr.icmp6_data16[1]
-
-#define NI_QTYPE_NOOP 0 /* NOOP */
-#define NI_QTYPE_SUPTYPES 1 /* Supported Qtypes */
-#define NI_QTYPE_FQDN 2 /* FQDN (draft 04) */
-#define NI_QTYPE_DNSNAME 2 /* DNS Name */
-#define NI_QTYPE_NODEADDR 3 /* Node Addresses */
-#define NI_QTYPE_IPV4ADDR 4 /* IPv4 Addresses */
-
-/* network endian */
-#define NI_SUPTYPE_FLAG_COMPRESS ((u_int16_t)htons(0x1))
-#define NI_FQDN_FLAG_VALIDTTL ((u_int16_t)htons(0x1))
-
-/* network endian */
-#define NI_NODEADDR_FLAG_TRUNCATE ((u_int16_t)htons(0x1))
-#define NI_NODEADDR_FLAG_ALL ((u_int16_t)htons(0x2))
-#define NI_NODEADDR_FLAG_COMPAT ((u_int16_t)htons(0x4))
-#define NI_NODEADDR_FLAG_LINKLOCAL ((u_int16_t)htons(0x8))
-#define NI_NODEADDR_FLAG_SITELOCAL ((u_int16_t)htons(0x10))
-#define NI_NODEADDR_FLAG_GLOBAL ((u_int16_t)htons(0x20))
-#define NI_NODEADDR_FLAG_ANYCAST ((u_int16_t)htons(0x40)) /* just experimental. not in spec */
-
-struct ni_reply_fqdn {
- u_int32_t ni_fqdn_ttl; /* TTL */
- u_int8_t ni_fqdn_namelen; /* length in octets of the FQDN */
- u_int8_t ni_fqdn_name[3]; /* XXX: alignment */
-};
-
-/*
- * Router Renumbering. as router-renum-08.txt
- */
-struct icmp6_router_renum { /* router renumbering header */
- struct icmp6_hdr rr_hdr;
- u_int8_t rr_segnum;
- u_int8_t rr_flags;
- u_int16_t rr_maxdelay;
- u_int32_t rr_reserved;
-};
-#define ICMP6_RR_FLAGS_TEST 0x80
-#define ICMP6_RR_FLAGS_REQRESULT 0x40
-#define ICMP6_RR_FLAGS_FORCEAPPLY 0x20
-#define ICMP6_RR_FLAGS_SPECSITE 0x10
-#define ICMP6_RR_FLAGS_PREVDONE 0x08
-
-#define rr_type rr_hdr.icmp6_type
-#define rr_code rr_hdr.icmp6_code
-#define rr_cksum rr_hdr.icmp6_cksum
-#define rr_seqnum rr_hdr.icmp6_data32[0]
-
-struct rr_pco_match { /* match prefix part */
- u_int8_t rpm_code;
- u_int8_t rpm_len;
- u_int8_t rpm_ordinal;
- u_int8_t rpm_matchlen;
- u_int8_t rpm_minlen;
- u_int8_t rpm_maxlen;
- u_int16_t rpm_reserved;
- struct in6_addr rpm_prefix;
-};
-
-#define RPM_PCO_ADD 1
-#define RPM_PCO_CHANGE 2
-#define RPM_PCO_SETGLOBAL 3
-#define RPM_PCO_MAX 4
-
-struct rr_pco_use { /* use prefix part */
- u_int8_t rpu_uselen;
- u_int8_t rpu_keeplen;
- u_int8_t rpu_ramask;
- u_int8_t rpu_raflags;
- u_int32_t rpu_vltime;
- u_int32_t rpu_pltime;
- u_int32_t rpu_flags;
- struct in6_addr rpu_prefix;
-};
-#define ICMP6_RR_PCOUSE_RAFLAGS_ONLINK 0x80
-#define ICMP6_RR_PCOUSE_RAFLAGS_AUTO 0x40
-
-/* network endian */
-#define ICMP6_RR_PCOUSE_FLAGS_DECRVLTIME ((u_int32_t)htonl(0x80000000))
-#define ICMP6_RR_PCOUSE_FLAGS_DECRPLTIME ((u_int32_t)htonl(0x40000000))
-
-struct rr_result { /* router renumbering result message */
- u_int16_t rrr_flags;
- u_int8_t rrr_ordinal;
- u_int8_t rrr_matchedlen;
- u_int32_t rrr_ifid;
- struct in6_addr rrr_prefix;
-};
-/* network endian */
-#define ICMP6_RR_RESULT_FLAGS_OOB ((u_int16_t)htons(0x0002))
-#define ICMP6_RR_RESULT_FLAGS_FORBIDDEN ((u_int16_t)htons(0x0001))
-
-#endif /* not _NETINET_ICMP6_H_ */
+++ /dev/null
-/* @(#) $Header: /tcpdump/master/tcpdump/ieee802_11.h,v 1.9 2003/07/22 17:36:57 guy Exp $ (LBL) */
-/*
- * Copyright (c) 2001
- * Fortress Technologies
- * Charlie Lenahan ( clenahan@fortresstech.com )
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that: (1) source code distributions
- * retain the above copyright notice and this paragraph in its entirety, (2)
- * distributions including binary code include the above copyright notice and
- * this paragraph in its entirety in the documentation or other materials
- * provided with the distribution, and (3) all advertising materials mentioning
- * features or use of this software display the following acknowledgement:
- * ``This product includes software developed by the University of California,
- * Lawrence Berkeley Laboratory and its contributors.'' Neither the name of
- * the University nor the names of its contributors may be used to endorse
- * or promote products derived from this software without specific prior
- * written permission.
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- */
-
-/* Lengths of 802.11 header components. */
-#define IEEE802_11_FC_LEN 2
-#define IEEE802_11_DUR_LEN 2
-#define IEEE802_11_DA_LEN 6
-#define IEEE802_11_SA_LEN 6
-#define IEEE802_11_BSSID_LEN 6
-#define IEEE802_11_RA_LEN 6
-#define IEEE802_11_TA_LEN 6
-#define IEEE802_11_SEQ_LEN 2
-#define IEEE802_11_IV_LEN 3
-#define IEEE802_11_KID_LEN 1
-
-/* Frame check sequence length. */
-#define IEEE802_11_FCS_LEN 4
-
-/* Lengths of beacon components. */
-#define IEEE802_11_TSTAMP_LEN 8
-#define IEEE802_11_BCNINT_LEN 2
-#define IEEE802_11_CAPINFO_LEN 2
-#define IEEE802_11_LISTENINT_LEN 2
-
-#define IEEE802_11_AID_LEN 2
-#define IEEE802_11_STATUS_LEN 2
-#define IEEE802_11_REASON_LEN 2
-
-/* Length of previous AP in reassocation frame */
-#define IEEE802_11_AP_LEN 6
-
-#define T_MGMT 0x0 /* management */
-#define T_CTRL 0x1 /* control */
-#define T_DATA 0x2 /* data */
-#define T_RESV 0x3 /* reserved */
-
-#define ST_ASSOC_REQUEST 0x0
-#define ST_ASSOC_RESPONSE 0x1
-#define ST_REASSOC_REQUEST 0x2
-#define ST_REASSOC_RESPONSE 0x3
-#define ST_PROBE_REQUEST 0x4
-#define ST_PROBE_RESPONSE 0x5
-/* RESERVED 0x6 */
-/* RESERVED 0x7 */
-#define ST_BEACON 0x8
-#define ST_ATIM 0x9
-#define ST_DISASSOC 0xA
-#define ST_AUTH 0xB
-#define ST_DEAUTH 0xC
-/* RESERVED 0xD */
-/* RESERVED 0xE */
-/* RESERVED 0xF */
-
-
-#define CTRL_PS_POLL 0xA
-#define CTRL_RTS 0xB
-#define CTRL_CTS 0xC
-#define CTRL_ACK 0xD
-#define CTRL_CF_END 0xE
-#define CTRL_END_ACK 0xF
-
-#define DATA_DATA 0x0
-#define DATA_DATA_CF_ACK 0x1
-#define DATA_DATA_CF_POLL 0x2
-#define DATA_DATA_CF_ACK_POLL 0x3
-#define DATA_NODATA 0x4
-#define DATA_NODATA_CF_ACK 0x5
-#define DATA_NODATA_CF_POLL 0x6
-#define DATA_NODATA_CF_ACK_POLL 0x7
-
-/*
- * Bits in the frame control field.
- */
-#define FC_VERSION(fc) ((fc) & 0x3)
-#define FC_TYPE(fc) (((fc) >> 2) & 0x3)
-#define FC_SUBTYPE(fc) (((fc) >> 4) & 0xF)
-#define FC_TO_DS(fc) ((fc) & 0x0100)
-#define FC_FROM_DS(fc) ((fc) & 0x0200)
-#define FC_MORE_FLAG(fc) ((fc) & 0x0400)
-#define FC_RETRY(fc) ((fc) & 0x0800)
-#define FC_POWER_MGMT(fc) ((fc) & 0x1000)
-#define FC_MORE_DATA(fc) ((fc) & 0x2000)
-#define FC_WEP(fc) ((fc) & 0x4000)
-#define FC_ORDER(fc) ((fc) & 0x8000)
-
-struct mgmt_header_t {
- u_int16_t fc;
- u_int16_t duration;
- u_int8_t da[6];
- u_int8_t sa[6];
- u_int8_t bssid[6];
- u_int16_t seq_ctrl;
-};
-
-#define MGMT_HDRLEN (IEEE802_11_FC_LEN+IEEE802_11_DUR_LEN+\
- IEEE802_11_DA_LEN+IEEE802_11_SA_LEN+\
- IEEE802_11_BSSID_LEN+IEEE802_11_SEQ_LEN)
-
-#define CAPABILITY_ESS(cap) ((cap) & 0x0001)
-#define CAPABILITY_IBSS(cap) ((cap) & 0x0002)
-#define CAPABILITY_CFP(cap) ((cap) & 0x0004)
-#define CAPABILITY_CFP_REQ(cap) ((cap) & 0x0008)
-#define CAPABILITY_PRIVACY(cap) ((cap) & 0x0010)
-
-struct ssid_t {
- u_int8_t element_id;
- u_int8_t length;
- u_char ssid[33]; /* 32 + 1 for null */
-};
-
-struct rates_t {
- u_int8_t element_id;
- u_int8_t length;
- u_int8_t rate[8];
-};
-
-struct challenge_t {
- u_int8_t element_id;
- u_int8_t length;
- u_int8_t text[254]; /* 1-253 + 1 for null */
-};
-struct fh_t {
- u_int8_t element_id;
- u_int8_t length;
- u_int16_t dwell_time;
- u_int8_t hop_set;
- u_int8_t hop_pattern;
- u_int8_t hop_index;
-};
-
-struct ds_t {
- u_int8_t element_id;
- u_int8_t length;
- u_int8_t channel;
-};
-
-struct cf_t {
- u_int8_t element_id;
- u_int8_t length;
- u_int8_t count;
- u_int8_t period;
- u_int16_t max_duration;
- u_int16_t dur_remaing;
-};
-
-struct tim_t {
- u_int8_t element_id;
- u_int8_t length;
- u_int8_t count;
- u_int8_t period;
- u_int8_t bitmap_control;
- u_int8_t bitmap[251];
-};
-
-#define E_SSID 0
-#define E_RATES 1
-#define E_FH 2
-#define E_DS 3
-#define E_CF 4
-#define E_TIM 5
-#define E_IBSS 6
-/* reserved 7 */
-/* reserved 8 */
-/* reserved 9 */
-/* reserved 10 */
-/* reserved 11 */
-/* reserved 12 */
-/* reserved 13 */
-/* reserved 14 */
-/* reserved 15 */
-/* reserved 16 */
-
-#define E_CHALLENGE 16
-/* reserved 17 */
-/* reserved 18 */
-/* reserved 19 */
-/* reserved 16 */
-/* reserved 16 */
-
-
-struct mgmt_body_t {
- u_int8_t timestamp[8];
- u_int16_t beacon_interval;
- u_int16_t listen_interval;
- u_int16_t status_code;
- u_int16_t aid;
- u_char ap[6];
- u_int16_t reason_code;
- u_int16_t auth_alg;
- u_int16_t auth_trans_seq_num;
- struct challenge_t challenge;
- u_int16_t capability_info;
- struct ssid_t ssid;
- struct rates_t rates;
- struct ds_t ds;
- struct cf_t cf;
- struct fh_t fh;
- struct tim_t tim;
-};
-
-struct ctrl_rts_t {
- u_int16_t fc;
- u_int16_t duration;
- u_int8_t ra[6];
- u_int8_t ta[6];
- u_int8_t fcs[4];
-};
-
-#define CTRL_RTS_HDRLEN (IEEE802_11_FC_LEN+IEEE802_11_DUR_LEN+\
- IEEE802_11_RA_LEN+IEEE802_11_TA_LEN)
-
-struct ctrl_cts_t {
- u_int16_t fc;
- u_int16_t duration;
- u_int8_t ra[6];
- u_int8_t fcs[4];
-};
-
-#define CTRL_CTS_HDRLEN (IEEE802_11_FC_LEN+IEEE802_11_DUR_LEN+IEEE802_11_RA_LEN)
-
-struct ctrl_ack_t {
- u_int16_t fc;
- u_int16_t duration;
- u_int8_t ra[6];
- u_int8_t fcs[4];
-};
-
-#define CTRL_ACK_HDRLEN (IEEE802_11_FC_LEN+IEEE802_11_DUR_LEN+IEEE802_11_RA_LEN)
-
-struct ctrl_ps_poll_t {
- u_int16_t fc;
- u_int16_t aid;
- u_int8_t bssid[6];
- u_int8_t ta[6];
- u_int8_t fcs[4];
-};
-
-#define CTRL_PS_POLL_HDRLEN (IEEE802_11_FC_LEN+IEEE802_11_AID_LEN+\
- IEEE802_11_BSSID_LEN+IEEE802_11_TA_LEN)
-
-struct ctrl_end_t {
- u_int16_t fc;
- u_int16_t duration;
- u_int8_t ra[6];
- u_int8_t bssid[6];
- u_int8_t fcs[4];
-};
-
-#define CTRL_END_HDRLEN (IEEE802_11_FC_LEN+IEEE802_11_DUR_LEN+\
- IEEE802_11_RA_LEN+IEEE802_11_BSSID_LEN)
-
-struct ctrl_end_ack_t {
- u_int16_t fc;
- u_int16_t duration;
- u_int8_t ra[6];
- u_int8_t bssid[6];
- u_int8_t fcs[4];
-};
-
-#define CTRL_END_ACK_HDRLEN (IEEE802_11_FC_LEN+IEEE802_11_DUR_LEN+\
- IEEE802_11_RA_LEN+IEEE802_11_BSSID_LEN)
-
-#define IV_IV(iv) ((iv) & 0xFFFFFF)
-#define IV_PAD(iv) (((iv) >> 24) & 0x3F)
-#define IV_KEYID(iv) (((iv) >> 30) & 0x03)
+++ /dev/null
-/* @(#) $Header: /tcpdump/master/tcpdump/igrp.h,v 1.6 2002/12/11 07:13:52 guy Exp $ (LBL) */
-/* Cisco IGRP definitions */
-
-/* IGRP Header */
-
-struct igrphdr {
- u_int8_t ig_vop; /* protocol version number / opcode */
-#define IGRP_V(x) (((x) & 0xf0) >> 4)
-#define IGRP_OP(x) ((x) & 0x0f)
- u_int8_t ig_ed; /* edition number */
- u_int16_t ig_as; /* autonomous system number */
- u_int16_t ig_ni; /* number of subnet in local net */
- u_int16_t ig_ns; /* number of networks in AS */
- u_int16_t ig_nx; /* number of networks ouside AS */
- u_int16_t ig_sum; /* checksum of IGRP header & data */
-};
-
-#define IGRP_UPDATE 1
-#define IGRP_REQUEST 2
-
-/* IGRP routing entry */
-
-struct igrprte {
- u_int8_t igr_net[3]; /* 3 significant octets of IP address */
- u_int8_t igr_dly[3]; /* delay in tens of microseconds */
- u_int8_t igr_bw[3]; /* bandwidth in units of 1 kb/s */
- u_int8_t igr_mtu[2]; /* MTU in octets */
- u_int8_t igr_rel; /* percent packets successfully tx/rx */
- u_int8_t igr_ld; /* percent of channel occupied */
- u_int8_t igr_hct; /* hop count */
-};
-
-#define IGRP_RTE_SIZE 14 /* don't believe sizeof ! */
+++ /dev/null
-/*
- * Copyright (c) 1988-2002
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that: (1) source code distributions
- * retain the above copyright notice and this paragraph in its entirety, (2)
- * distributions including binary code include the above copyright notice and
- * this paragraph in its entirety in the documentation or other materials
- * provided with the distribution, and (3) all advertising materials mentioning
- * features or use of this software display the following acknowledgement:
- * ``This product includes software developed by the University of California,
- * Lawrence Berkeley Laboratory and its contributors.'' Neither the name of
- * the University nor the names of its contributors may be used to endorse
- * or promote products derived from this software without specific prior
- * written permission.
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- * @(#) $Header: /tcpdump/master/tcpdump/interface.h,v 1.217.2.5 2004/03/17 19:47:48 guy Exp $ (LBL)
- */
-
-#ifndef tcpdump_interface_h
-#define tcpdump_interface_h
-
-#ifdef HAVE_OS_PROTO_H
-#include "os-proto.h"
-#endif
-
-#ifndef HAVE___ATTRIBUTE__
-#define __attribute__(x)
-#endif
-
-/* snprintf et al */
-
-#include <stdarg.h>
-
-#if !defined(HAVE_SNPRINTF)
-int snprintf(char *, size_t, const char *, ...)
- __attribute__((format(printf, 3, 4)));
-#endif
-
-#if !defined(HAVE_VSNPRINTF)
-int vsnprintf(char *, size_t, const char *, va_list)
- __attribute__((format(printf, 3, 0)));
-#endif
-
-#ifndef HAVE_STRLCAT
-extern size_t strlcat(char *, const char *, size_t);
-#endif
-#ifndef HAVE_STRLCPY
-extern size_t strlcpy(char *, const char *, size_t);
-#endif
-
-#ifndef HAVE_STRDUP
-extern char *strdup(const char *);
-#endif
-
-#ifndef HAVE_STRSEP
-extern char *strsep(char **, const char *);
-#endif
-
-struct tok {
- int v; /* value */
- const char *s; /* string */
-};
-
-extern int aflag; /* translate network and broadcast addresses */
-extern int dflag; /* print filter code */
-extern int eflag; /* print ethernet header */
-extern int fflag; /* don't translate "foreign" IP address */
-extern int nflag; /* leave addresses as numbers */
-extern int Nflag; /* remove domains from printed host names */
-extern int qflag; /* quick (shorter) output */
-extern int Rflag; /* print sequence # field in AH/ESP*/
-extern int sflag; /* use the libsmi to translate OIDs */
-extern int Sflag; /* print raw TCP sequence numbers */
-extern int tflag; /* print packet arrival time */
-extern int uflag; /* Print undecoded NFS handles */
-extern int vflag; /* verbose */
-extern int xflag; /* print packet in hex */
-extern int Xflag; /* print packet in hex/ascii */
-extern int Aflag; /* print packet only in ascii observing TAB, LF, CR and SPACE as graphical chars */
-extern char *espsecret;
-
-extern int packettype; /* as specified by -T */
-#define PT_VAT 1 /* Visual Audio Tool */
-#define PT_WB 2 /* distributed White Board */
-#define PT_RPC 3 /* Remote Procedure Call */
-#define PT_RTP 4 /* Real-Time Applications protocol */
-#define PT_RTCP 5 /* Real-Time Applications control protocol */
-#define PT_SNMP 6 /* Simple Network Management Protocol */
-#define PT_CNFP 7 /* Cisco NetFlow protocol */
-#define PT_TFTP 8 /* trivial file transfer protocol */
-#define PT_AODV 9 /* Ad-hoc On-demand Distance Vector Protocol */
-
-#ifndef min
-#define min(a,b) ((a)>(b)?(b):(a))
-#endif
-#ifndef max
-#define max(a,b) ((b)>(a)?(b):(a))
-#endif
-
-/*
- * The default snapshot length. This value allows most printers to print
- * useful information while keeping the amount of unwanted data down.
- */
-#ifndef INET6
-#define DEFAULT_SNAPLEN 68 /* ether + IPv4 + TCP + 14 */
-#else
-#define DEFAULT_SNAPLEN 96 /* ether + IPv6 + TCP + 22 */
-#endif
-
-#ifndef BIG_ENDIAN
-#define BIG_ENDIAN 4321
-#define LITTLE_ENDIAN 1234
-#endif
-
-#define ESRC(ep) ((ep)->ether_shost)
-#define EDST(ep) ((ep)->ether_dhost)
-
-#ifndef NTOHL
-#define NTOHL(x) (x) = ntohl(x)
-#define NTOHS(x) (x) = ntohs(x)
-#define HTONL(x) (x) = htonl(x)
-#define HTONS(x) (x) = htons(x)
-#endif
-#endif
-
-extern char *program_name; /* used to generate self-identifying messages */
-
-extern int32_t thiszone; /* seconds offset from gmt to local time */
-
-extern int snaplen;
-/* global pointer to end of current packet (during printing) */
-extern const u_char *snapend;
-
-/*
- * True if "l" bytes of "var" were captured.
- *
- * The "snapend - (l) <= snapend" checks to make sure "l" isn't so large
- * that "snapend - (l)" underflows.
- *
- * The check is for <= rather than < because "l" might be 0.
- */
-#define TTEST2(var, l) (snapend - (l) <= snapend && \
- (const u_char *)&(var) <= snapend - (l))
-
-/* True if "var" was captured */
-#define TTEST(var) TTEST2(var, sizeof(var))
-
-/* Bail if "l" bytes of "var" were not captured */
-#define TCHECK2(var, l) if (!TTEST2(var, l)) goto trunc
-
-/* Bail if "var" was not captured */
-#define TCHECK(var) TCHECK2(var, sizeof(var))
-
-extern void ts_print(const struct timeval *);
-extern void relts_print(int);
-
-extern int fn_print(const u_char *, const u_char *);
-extern int fn_printn(const u_char *, u_int, const u_char *);
-extern const char *tok2str(const struct tok *, const char *, int);
-extern int mask2plen(u_int32_t);
-extern char *bittok2str(const struct tok *, const char *, int);
-extern const char *tok2strary_internal(const char **, int, const char *, int);
-#define tok2strary(a,f,i) tok2strary_internal(a, sizeof(a)/sizeof(a[0]),f,i)
-
-extern const char *dnaddr_string(u_short);
-
-extern void error(const char *, ...)
- __attribute__((noreturn, format (printf, 1, 2)));
-extern void warning(const char *, ...) __attribute__ ((format (printf, 1, 2)));
-
-extern char *read_infile(char *);
-extern char *copy_argv(char **);
-
-extern void safeputchar(int);
-extern void safeputs(const char *);
-
-extern const char *isonsap_string(const u_char *);
-extern const char *llcsap_string(u_char);
-extern const char *protoid_string(const u_char *);
-extern const char *ipxsap_string(u_short);
-extern const char *dnname_string(u_short);
-extern const char *dnnum_string(u_short);
-
-/* The printer routines. */
-
-#include <pcap.h>
-
-extern int print_unknown_data(const u_char *, const char *,int);
-extern void ascii_print_with_offset(const u_char *, const u_char *, u_int, u_int);
-extern void ascii_print(const u_char *, const u_char *, u_int);
-extern void hex_print_with_offset(const u_char *, const u_char *, u_int, u_int);
-extern void telnet_print(const u_char *, u_int);
-extern void hex_print(const u_char *, const u_char *, u_int);
-extern int ether_encap_print(u_short, const u_char *, u_int, u_int, u_short *);
-extern int llc_print(const u_char *, u_int, u_int, const u_char *,
- const u_char *, u_short *);
-extern int snap_print(const u_char *, u_int, u_int, u_short *, u_int32_t,
- u_short, u_int);
-extern void aarp_print(const u_char *, u_int);
-extern void aodv_print(const u_char *, u_int, int);
-extern void arp_print(const u_char *, u_int, u_int);
-extern void atalk_print(const u_char *, u_int);
-extern void atm_print(u_int, u_int, u_int, const u_char *, u_int, u_int);
-extern u_int atm_if_print(const struct pcap_pkthdr *, const u_char *);
-extern u_int sunatm_if_print(const struct pcap_pkthdr *, const u_char *);
-extern void bootp_print(const u_char *, u_int);
-extern void bgp_print(const u_char *, int);
-extern void beep_print(const u_char *, u_int);
-extern void cnfp_print(const u_char *, const u_char *);
-extern void decnet_print(const u_char *, u_int, u_int);
-extern void default_print(const u_char *, u_int);
-extern void default_print_unaligned(const u_char *, u_int);
-extern void dvmrp_print(const u_char *, u_int);
-extern void egp_print(const u_char *);
-extern u_int enc_if_print(const struct pcap_pkthdr *, const u_char *);
-extern u_int pflog_if_print(const struct pcap_pkthdr *, const u_char *);
-extern u_int arcnet_if_print(const struct pcap_pkthdr *, const u_char *);
-extern u_int arcnet_linux_if_print(const struct pcap_pkthdr *, const u_char *);
-extern void ether_print(const u_char *, u_int, u_int);
-extern u_int ether_if_print(const struct pcap_pkthdr *, const u_char *);
-extern u_int token_print(const u_char *, u_int, u_int);
-extern u_int token_if_print(const struct pcap_pkthdr *, const u_char *);
-extern void fddi_print(const u_char *, u_int, u_int);
-extern u_int fddi_if_print(const struct pcap_pkthdr *, const u_char *);
-extern u_int fr_if_print(const struct pcap_pkthdr *, const u_char *);
-extern u_int ieee802_11_if_print(const struct pcap_pkthdr *, const u_char *);
-extern u_int ieee802_11_radio_if_print(const struct pcap_pkthdr *,
- const u_char *);
-extern u_int ap1394_if_print(const struct pcap_pkthdr *, const u_char *);
-extern void gre_print(const u_char *, u_int);
-extern void icmp_print(const u_char *, u_int, const u_char *, int);
-extern void igmp_print(const u_char *, u_int);
-extern void igrp_print(const u_char *, u_int, const u_char *);
-extern void ip_print(const u_char *, u_int);
-extern void ipN_print(const u_char *, u_int);
-extern u_int ipfc_if_print(const struct pcap_pkthdr *, const u_char *);
-extern void ipx_print(const u_char *, u_int);
-extern void isoclns_print(const u_char *, u_int, u_int);
-extern void krb_print(const u_char *);
-extern u_int llap_print(const u_char *, u_int);
-extern u_int ltalk_if_print(const struct pcap_pkthdr *, const u_char *);
-extern void msdp_print(const unsigned char *, u_int);
-extern void nfsreply_print(const u_char *, u_int, const u_char *);
-extern void nfsreq_print(const u_char *, u_int, const u_char *);
-extern void ns_print(const u_char *, u_int, int);
-extern void ntp_print(const u_char *, u_int);
-extern u_int null_if_print(const struct pcap_pkthdr *, const u_char *);
-extern void ospf_print(const u_char *, u_int, const u_char *);
-extern void pimv1_print(const u_char *, u_int);
-extern void cisco_autorp_print(const u_char *, u_int);
-extern void rsvp_print(const u_char *, u_int);
-extern void ldp_print(const u_char *, u_int);
-extern void mobile_print(const u_char *, u_int);
-extern void pim_print(const u_char *, u_int);
-extern u_int pppoe_print(const u_char *, u_int);
-extern u_int ppp_print(register const u_char *, u_int);
-extern u_int ppp_if_print(const struct pcap_pkthdr *, const u_char *);
-extern u_int ppp_hdlc_if_print(const struct pcap_pkthdr *, const u_char *);
-extern u_int ppp_bsdos_if_print(const struct pcap_pkthdr *, const u_char *);
-extern u_int pppoe_if_print(const struct pcap_pkthdr *, const u_char *);
-extern u_int prism_if_print(const struct pcap_pkthdr *, const u_char *);
-extern int vjc_print(register const char *, u_short);
-extern u_int raw_if_print(const struct pcap_pkthdr *, const u_char *);
-extern void rip_print(const u_char *, u_int);
-extern u_int sl_if_print(const struct pcap_pkthdr *, const u_char *);
-extern void lane_print(const u_char *, u_int, u_int);
-extern u_int lane_if_print(const struct pcap_pkthdr *, const u_char *);
-extern u_int cip_if_print(const struct pcap_pkthdr *, const u_char *);
-extern u_int sl_bsdos_if_print(const struct pcap_pkthdr *, const u_char *);
-extern u_int chdlc_if_print(const struct pcap_pkthdr *, const u_char *);
-extern u_int sll_if_print(const struct pcap_pkthdr *, const u_char *);
-extern void snmp_print(const u_char *, u_int);
-extern void sunrpcrequest_print(const u_char *, u_int, const u_char *);
-extern void tcp_print(const u_char *, u_int, const u_char *, int);
-extern void tftp_print(const u_char *, u_int);
-extern void timed_print(const u_char *);
-extern void udp_print(const u_char *, u_int, const u_char *, int);
-extern void wb_print(const void *, u_int);
-extern int ah_print(register const u_char *);
-extern int esp_print(register const u_char *, register const u_char *, int *, int *);
-extern void isakmp_print(const u_char *, u_int, const u_char *);
-extern int ipcomp_print(register const u_char *, int *);
-extern void rx_print(register const u_char *, int, int, int, u_char *);
-extern void netbeui_print(u_short, const u_char *, int);
-extern void ipx_netbios_print(const u_char *, u_int);
-extern void nbt_tcp_print(const u_char *, int);
-extern void nbt_udp137_print(const u_char *, int);
-extern void nbt_udp138_print(const u_char *, int);
-extern char *smb_errstr(int, int);
-extern void print_data(const unsigned char *, int);
-extern void l2tp_print(const u_char *, u_int);
-extern void vrrp_print(const u_char *, u_int, int);
-extern void cdp_print(const u_char *, u_int, u_int);
-extern void stp_print(const u_char *, u_int);
-extern void radius_print(const u_char *, u_int);
-extern void lwres_print(const u_char *, u_int);
-extern void pptp_print(const u_char *);
-extern void sctp_print(const u_char *, const u_char *, u_int);
-extern void mpls_print(const u_char *, u_int);
-extern void mpls_lsp_ping_print(const u_char *, u_int);
-extern void zephyr_print(const u_char *, int);
-extern void hsrp_print(const u_char *, u_int);
-extern void bfd_print(const u_char *, u_int, u_int);
-
-#ifdef INET6
-extern void ip6_print(const u_char *, u_int);
-extern void ip6_opt_print(const u_char *, int);
-extern int hbhopt_print(const u_char *);
-extern int dstopt_print(const u_char *);
-extern int frag6_print(const u_char *, const u_char *);
-extern int mobility_print(const u_char *, const u_char *);
-extern void icmp6_print(const u_char *, u_int, const u_char *, int);
-extern void ripng_print(const u_char *, unsigned int);
-extern int rt6_print(const u_char *, const u_char *);
-extern void ospf6_print(const u_char *, u_int);
-extern void dhcp6_print(const u_char *, u_int);
-#endif /*INET6*/
-extern u_short in_cksum(const u_short *, register u_int, int);
-extern u_int16_t in_cksum_shouldbe(u_int16_t, u_int16_t);
-
-#ifndef HAVE_BPF_DUMP
-struct bpf_program;
-
-extern void bpf_dump(struct bpf_program *, int);
-#endif
+++ /dev/null
-/* @(#) $Header: /tcpdump/master/tcpdump/ip.h,v 1.10 2002/12/11 07:13:53 guy Exp $ (LBL) */
-/*
- * Copyright (c) 1982, 1986, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)ip.h 8.2 (Berkeley) 6/1/94
- */
-
-/*
- * Definitions for internet protocol version 4.
- * Per RFC 791, September 1981.
- */
-#define IPVERSION 4
-
-/*
- * Structure of an internet header, naked of options.
- *
- * We declare ip_len and ip_off to be short, rather than u_short
- * pragmatically since otherwise unsigned comparisons can result
- * against negative integers quite easily, and fail in subtle ways.
- */
-struct ip {
- u_int8_t ip_vhl; /* header length, version */
-#define IP_V(ip) (((ip)->ip_vhl & 0xf0) >> 4)
-#define IP_HL(ip) ((ip)->ip_vhl & 0x0f)
- u_int8_t ip_tos; /* type of service */
- u_int16_t ip_len; /* total length */
- u_int16_t ip_id; /* identification */
- u_int16_t ip_off; /* fragment offset field */
-#define IP_DF 0x4000 /* dont fragment flag */
-#define IP_MF 0x2000 /* more fragments flag */
-#define IP_OFFMASK 0x1fff /* mask for fragmenting bits */
- u_int8_t ip_ttl; /* time to live */
- u_int8_t ip_p; /* protocol */
- u_int16_t ip_sum; /* checksum */
- struct in_addr ip_src,ip_dst; /* source and dest address */
-};
-
-#define IP_MAXPACKET 65535 /* maximum packet size */
-
-/*
- * Definitions for IP type of service (ip_tos)
- */
-#define IPTOS_LOWDELAY 0x10
-#define IPTOS_THROUGHPUT 0x08
-#define IPTOS_RELIABILITY 0x04
-
-/*
- * Definitions for IP precedence (also in ip_tos) (hopefully unused)
- */
-#define IPTOS_PREC_NETCONTROL 0xe0
-#define IPTOS_PREC_INTERNETCONTROL 0xc0
-#define IPTOS_PREC_CRITIC_ECP 0xa0
-#define IPTOS_PREC_FLASHOVERRIDE 0x80
-#define IPTOS_PREC_FLASH 0x60
-#define IPTOS_PREC_IMMEDIATE 0x40
-#define IPTOS_PREC_PRIORITY 0x20
-#define IPTOS_PREC_ROUTINE 0x00
-
-/*
- * Definitions for options.
- */
-#define IPOPT_COPIED(o) ((o)&0x80)
-#define IPOPT_CLASS(o) ((o)&0x60)
-#define IPOPT_NUMBER(o) ((o)&0x1f)
-
-#define IPOPT_CONTROL 0x00
-#define IPOPT_RESERVED1 0x20
-#define IPOPT_DEBMEAS 0x40
-#define IPOPT_RESERVED2 0x60
-
-#define IPOPT_EOL 0 /* end of option list */
-#define IPOPT_NOP 1 /* no operation */
-
-#define IPOPT_RR 7 /* record packet route */
-#define IPOPT_TS 68 /* timestamp */
-#define IPOPT_SECURITY 130 /* provide s,c,h,tcc */
-#define IPOPT_LSRR 131 /* loose source route */
-#define IPOPT_SATID 136 /* satnet id */
-#define IPOPT_SSRR 137 /* strict source route */
-
-/*
- * Offsets to fields in options other than EOL and NOP.
- */
-#define IPOPT_OPTVAL 0 /* option ID */
-#define IPOPT_OLEN 1 /* option length */
-#define IPOPT_OFFSET 2 /* offset within option */
-#define IPOPT_MINOFF 4 /* min value of above */
-
-/*
- * Time stamp option structure.
- */
-struct ip_timestamp {
- u_int8_t ipt_code; /* IPOPT_TS */
- u_int8_t ipt_len; /* size of structure (variable) */
- u_int8_t ipt_ptr; /* index of current entry */
- u_int8_t ipt_oflwflg; /* flags, overflow counter */
-#define IPTS_OFLW(ip) (((ipt)->ipt_oflwflg & 0xf0) >> 4)
-#define IPTS_FLG(ip) ((ipt)->ipt_oflwflg & 0x0f)
- union ipt_timestamp {
- u_int32_t ipt_time[1];
- struct ipt_ta {
- struct in_addr ipt_addr;
- u_int32_t ipt_time;
- } ipt_ta[1];
- } ipt_timestamp;
-};
-
-/* flag bits for ipt_flg */
-#define IPOPT_TS_TSONLY 0 /* timestamps only */
-#define IPOPT_TS_TSANDADDR 1 /* timestamps and addresses */
-#define IPOPT_TS_PRESPEC 3 /* specified modules only */
-
-/* bits for security (not byte swapped) */
-#define IPOPT_SECUR_UNCLASS 0x0000
-#define IPOPT_SECUR_CONFID 0xf135
-#define IPOPT_SECUR_EFTO 0x789a
-#define IPOPT_SECUR_MMMM 0xbc4d
-#define IPOPT_SECUR_RESTR 0xaf13
-#define IPOPT_SECUR_SECRET 0xd788
-#define IPOPT_SECUR_TOPSECRET 0x6bc5
-
-/*
- * Internet implementation parameters.
- */
-#define MAXTTL 255 /* maximum time to live (seconds) */
-#define IPDEFTTL 64 /* default ttl, from RFC 1340 */
-#define IPFRAGTTL 60 /* time to live for frags, slowhz */
-#define IPTTLDEC 1 /* subtracted when forwarding */
-
-#define IP_MSS 576 /* default maximum segment size */
-
-/* in print-ip.c */
-extern u_int32_t ip_finddst(const struct ip *);
+++ /dev/null
-/* @(#) $Header: /tcpdump/master/tcpdump/ip6.h,v 1.6 2002/12/11 22:29:21 guy Exp $ (LBL) */
-/* $NetBSD: ip6.h,v 1.9 2000/07/13 05:34:21 itojun Exp $ */
-/* $KAME: ip6.h,v 1.9 2000/07/02 21:01:32 itojun Exp $ */
-
-/*
- * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the project nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-/*
- * Copyright (c) 1982, 1986, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)ip.h 8.1 (Berkeley) 6/10/93
- */
-
-#ifndef _NETINET_IP6_H_
-#define _NETINET_IP6_H_
-
-/*
- * Definition for internet protocol version 6.
- * RFC 2460
- */
-
-struct ip6_hdr {
- union {
- struct ip6_hdrctl {
- u_int32_t ip6_un1_flow; /* 20 bits of flow-ID */
- u_int16_t ip6_un1_plen; /* payload length */
- u_int8_t ip6_un1_nxt; /* next header */
- u_int8_t ip6_un1_hlim; /* hop limit */
- } ip6_un1;
- u_int8_t ip6_un2_vfc; /* 4 bits version, top 4 bits class */
- } ip6_ctlun;
- struct in6_addr ip6_src; /* source address */
- struct in6_addr ip6_dst; /* destination address */
-};
-
-#define ip6_vfc ip6_ctlun.ip6_un2_vfc
-#define ip6_flow ip6_ctlun.ip6_un1.ip6_un1_flow
-#define ip6_plen ip6_ctlun.ip6_un1.ip6_un1_plen
-#define ip6_nxt ip6_ctlun.ip6_un1.ip6_un1_nxt
-#define ip6_hlim ip6_ctlun.ip6_un1.ip6_un1_hlim
-#define ip6_hops ip6_ctlun.ip6_un1.ip6_un1_hlim
-
-#define IPV6_VERSION 0x60
-#define IPV6_VERSION_MASK 0xf0
-
-/* in network endian */
-#define IPV6_FLOWINFO_MASK ((u_int32_t)htonl(0x0fffffff)) /* flow info (28 bits) */
-#define IPV6_FLOWLABEL_MASK ((u_int32_t)htonl(0x000fffff)) /* flow label (20 bits) */
-#if 1
-/* ECN bits proposed by Sally Floyd */
-#define IP6TOS_CE 0x01 /* congestion experienced */
-#define IP6TOS_ECT 0x02 /* ECN-capable transport */
-#endif
-
-/*
- * Extension Headers
- */
-
-struct ip6_ext {
- u_char ip6e_nxt;
- u_char ip6e_len;
-};
-
-/* Hop-by-Hop options header */
-/* XXX should we pad it to force alignment on an 8-byte boundary? */
-struct ip6_hbh {
- u_int8_t ip6h_nxt; /* next header */
- u_int8_t ip6h_len; /* length in units of 8 octets */
- /* followed by options */
-};
-
-/* Destination options header */
-/* XXX should we pad it to force alignment on an 8-byte boundary? */
-struct ip6_dest {
- u_int8_t ip6d_nxt; /* next header */
- u_int8_t ip6d_len; /* length in units of 8 octets */
- /* followed by options */
-};
-
-/* Option types and related macros */
-#define IP6OPT_PAD1 0x00 /* 00 0 00000 */
-#define IP6OPT_PADN 0x01 /* 00 0 00001 */
-#define IP6OPT_JUMBO 0xC2 /* 11 0 00010 = 194 */
-#define IP6OPT_JUMBO_LEN 6
-#define IP6OPT_ROUTER_ALERT 0x05 /* 00 0 00101 */
-
-#define IP6OPT_RTALERT_LEN 4
-#define IP6OPT_RTALERT_MLD 0 /* Datagram contains an MLD message */
-#define IP6OPT_RTALERT_RSVP 1 /* Datagram contains an RSVP message */
-#define IP6OPT_RTALERT_ACTNET 2 /* contains an Active Networks msg */
-#define IP6OPT_MINLEN 2
-
-#define IP6OPT_BINDING_UPDATE 0xc6 /* 11 0 00110 */
-#define IP6OPT_BINDING_ACK 0x07 /* 00 0 00111 */
-#define IP6OPT_BINDING_REQ 0x08 /* 00 0 01000 */
-#define IP6OPT_HOME_ADDRESS 0xc9 /* 11 0 01001 */
-#define IP6OPT_EID 0x8a /* 10 0 01010 */
-
-#define IP6OPT_TYPE(o) ((o) & 0xC0)
-#define IP6OPT_TYPE_SKIP 0x00
-#define IP6OPT_TYPE_DISCARD 0x40
-#define IP6OPT_TYPE_FORCEICMP 0x80
-#define IP6OPT_TYPE_ICMP 0xC0
-
-#define IP6OPT_MUTABLE 0x20
-
-/* Routing header */
-struct ip6_rthdr {
- u_int8_t ip6r_nxt; /* next header */
- u_int8_t ip6r_len; /* length in units of 8 octets */
- u_int8_t ip6r_type; /* routing type */
- u_int8_t ip6r_segleft; /* segments left */
- /* followed by routing type specific data */
-};
-
-/* Type 0 Routing header */
-struct ip6_rthdr0 {
- u_int8_t ip6r0_nxt; /* next header */
- u_int8_t ip6r0_len; /* length in units of 8 octets */
- u_int8_t ip6r0_type; /* always zero */
- u_int8_t ip6r0_segleft; /* segments left */
- u_int8_t ip6r0_reserved; /* reserved field */
- u_int8_t ip6r0_slmap[3]; /* strict/loose bit map */
- struct in6_addr ip6r0_addr[1]; /* up to 23 addresses */
-};
-
-/* Fragment header */
-struct ip6_frag {
- u_int8_t ip6f_nxt; /* next header */
- u_int8_t ip6f_reserved; /* reserved field */
- u_int16_t ip6f_offlg; /* offset, reserved, and flag */
- u_int32_t ip6f_ident; /* identification */
-};
-
-#define IP6F_OFF_MASK 0xfff8 /* mask out offset from ip6f_offlg */
-#define IP6F_RESERVED_MASK 0x0006 /* reserved bits in ip6f_offlg */
-#define IP6F_MORE_FRAG 0x0001 /* more-fragments flag */
-
-#endif /* not _NETINET_IP6_H_ */
+++ /dev/null
-/*
- * Copyright (c) 1992, 1993, 1994, 1995, 1996
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that: (1) source code distributions
- * retain the above copyright notice and this paragraph in its entirety, (2)
- * distributions including binary code include the above copyright notice and
- * this paragraph in its entirety in the documentation or other materials
- * provided with the distribution, and (3) all advertising materials mentioning
- * features or use of this software display the following acknowledgement:
- * ``This product includes software developed by the University of California,
- * Lawrence Berkeley Laboratory and its contributors.'' Neither the name of
- * the University nor the names of its contributors may be used to endorse
- * or promote products derived from this software without specific prior
- * written permission.
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- * @(#) $Header: /tcpdump/master/tcpdump/ipfc.h,v 1.4 2002/12/11 07:13:53 guy Exp $ (LBL)
- */
-
-struct ipfc_header {
- u_char ipfc_dhost[8];
- u_char ipfc_shost[8];
-};
-
-#define IPFC_HDRLEN 16
+++ /dev/null
-/*
- * Copyright (c) 1982, 1986, 1990, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#) $Header: /tcpdump/master/tcpdump/ipproto.h,v 1.1.2.1 2003/11/24 20:31:22 guy Exp $ (LBL)
- *
- * From:
- * @(#)in.h 8.3 (Berkeley) 1/3/94
- * $FreeBSD: src/sys/netinet/in.h,v 1.38.2.3 1999/08/29 16:29:34 peter Exp $
- */
-
-#ifndef IPPROTO_IP
-#define IPPROTO_IP 0 /* dummy for IP */
-#endif
-#ifndef IPPROTO_HOPOPTS
-#define IPPROTO_HOPOPTS 0 /* IPv6 hop-by-hop options */
-#endif
-#ifndef IPPROTO_ICMP
-#define IPPROTO_ICMP 1 /* control message protocol */
-#endif
-#ifndef IPPROTO_IGMP
-#define IPPROTO_IGMP 2 /* group mgmt protocol */
-#endif
-#ifndef IPPROTO_IPV4
-#define IPPROTO_IPV4 4
-#endif
-#ifndef IPPROTO_TCP
-#define IPPROTO_TCP 6 /* tcp */
-#endif
-#ifndef IPPROTO_EGP
-#define IPPROTO_EGP 8 /* exterior gateway protocol */
-#endif
-#ifndef IPPROTO_IGRP
-#define IPPROTO_IGRP 9
-#endif
-#ifndef IPPROTO_UDP
-#define IPPROTO_UDP 17 /* user datagram protocol */
-#endif
-#ifndef IPPROTO_IPV6
-#define IPPROTO_IPV6 41
-#endif
-#ifndef IPPROTO_ROUTING
-#define IPPROTO_ROUTING 43 /* IPv6 routing header */
-#endif
-#ifndef IPPROTO_FRAGMENT
-#define IPPROTO_FRAGMENT 44 /* IPv6 fragmentation header */
-#endif
-#ifndef IPPROTO_RSVP
-#define IPPROTO_RSVP 46 /* resource reservation */
-#endif
-#ifndef IPPROTO_GRE
-#define IPPROTO_GRE 47 /* General Routing Encap. */
-#endif
-#ifndef IPPROTO_ESP
-#define IPPROTO_ESP 50 /* SIPP Encap Sec. Payload */
-#endif
-#ifndef IPPROTO_AH
-#define IPPROTO_AH 51 /* SIPP Auth Header */
-#endif
-#ifndef IPPROTO_MOBILE
-#define IPPROTO_MOBILE 55
-#endif
-#ifndef IPPROTO_ICMPV6
-#define IPPROTO_ICMPV6 58 /* ICMPv6 */
-#endif
-#ifndef IPPROTO_NONE
-#define IPPROTO_NONE 59 /* IPv6 no next header */
-#endif
-#ifndef IPPROTO_DSTOPTS
-#define IPPROTO_DSTOPTS 60 /* IPv6 destination options */
-#endif
-#ifndef IPPROTO_MOBILITY_OLD
-/*
- * The current Protocol Numbers list says that the IP protocol number for
- * mobility headers is 135; it cites draft-ietf-mobileip-ipv6-24, but
- * that draft doesn't actually give a number.
- *
- * It appears that 62 used to be used, even though that's assigned to
- * a protocol called CFTP; however, the only reference for CFTP is a
- * Network Message from BBN back in 1982, so, for now, we support 62,
- * aas well as 135, as a protocol number for mobility headers.
- */
-#define IPPROTO_MOBILITY_OLD 62
-#endif
-#ifndef IPPROTO_ND
-#define IPPROTO_ND 77 /* Sun net disk proto (temp.) */
-#endif
-#ifndef IPPROTO_IGRP
-#define IPPROTO_IGRP 88 /* Cisco/GXS IGRP */
-#endif
-#ifndef IPPROTO_OSPF
-#define IPPROTO_OSPF 89
-#endif
-#ifndef IPPROTO_PIM
-#define IPPROTO_PIM 103
-#endif
-#ifndef IPPROTO_IPCOMP
-#define IPPROTO_IPCOMP 108
-#endif
-#ifndef IPPROTO_VRRP
-#define IPPROTO_VRRP 112
-#endif
-#ifndef IPPROTO_SCTP
-#define IPPROTO_SCTP 132
-#endif
-#ifndef IPPROTO_MOBILITY
-#define IPPROTO_MOBILITY 135
-#endif
+++ /dev/null
-/*
- * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the project nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-/* YIPS @(#)$Id: ipsec_doi.h,v 1.7 2002/12/11 07:13:53 guy Exp $ */
-
-/* refer to RFC 2407 */
-
-#if !defined(_IPSEC_DOI_H_)
-#define _IPSEC_DOI_H_
-
-#define IPSEC_DOI 1
-
-/* 4.2 IPSEC Situation Definition */
-#define IPSECDOI_SIT_IDENTITY_ONLY 0x00000001
-#define IPSECDOI_SIT_SECRECY 0x00000002
-#define IPSECDOI_SIT_INTEGRITY 0x00000004
-
-/* 4.4.1 IPSEC Security Protocol Identifiers */
- /* 4.4.2 IPSEC ISAKMP Transform Values */
-#define IPSECDOI_PROTO_ISAKMP 1
-#define IPSECDOI_KEY_IKE 1
-
-/* 4.4.1 IPSEC Security Protocol Identifiers */
-#define IPSECDOI_PROTO_IPSEC_AH 2
- /* 4.4.3 IPSEC AH Transform Values */
-#define IPSECDOI_AH_MD5 2
-#define IPSECDOI_AH_SHA 3
-#define IPSECDOI_AH_DES 4
-#define IPSECDOI_AH_SHA2_256 5
-#define IPSECDOI_AH_SHA2_384 6
-#define IPSECDOI_AH_SHA2_512 7
-
-/* 4.4.1 IPSEC Security Protocol Identifiers */
-#define IPSECDOI_PROTO_IPSEC_ESP 3
- /* 4.4.4 IPSEC ESP Transform Identifiers */
-#define IPSECDOI_ESP_DES_IV64 1
-#define IPSECDOI_ESP_DES 2
-#define IPSECDOI_ESP_3DES 3
-#define IPSECDOI_ESP_RC5 4
-#define IPSECDOI_ESP_IDEA 5
-#define IPSECDOI_ESP_CAST 6
-#define IPSECDOI_ESP_BLOWFISH 7
-#define IPSECDOI_ESP_3IDEA 8
-#define IPSECDOI_ESP_DES_IV32 9
-#define IPSECDOI_ESP_RC4 10
-#define IPSECDOI_ESP_NULL 11
-#define IPSECDOI_ESP_RIJNDAEL 12
-#define IPSECDOI_ESP_AES 12
-
-/* 4.4.1 IPSEC Security Protocol Identifiers */
-#define IPSECDOI_PROTO_IPCOMP 4
- /* 4.4.5 IPSEC IPCOMP Transform Identifiers */
-#define IPSECDOI_IPCOMP_OUI 1
-#define IPSECDOI_IPCOMP_DEFLATE 2
-#define IPSECDOI_IPCOMP_LZS 3
-
-/* 4.5 IPSEC Security Association Attributes */
-#define IPSECDOI_ATTR_SA_LTYPE 1 /* B */
-#define IPSECDOI_ATTR_SA_LTYPE_DEFAULT 1
-#define IPSECDOI_ATTR_SA_LTYPE_SEC 1
-#define IPSECDOI_ATTR_SA_LTYPE_KB 2
-#define IPSECDOI_ATTR_SA_LDUR 2 /* V */
-#define IPSECDOI_ATTR_SA_LDUR_DEFAULT 28800 /* 8 hours */
-#define IPSECDOI_ATTR_GRP_DESC 3 /* B */
-#define IPSECDOI_ATTR_ENC_MODE 4 /* B */
- /* default value: host dependent */
-#define IPSECDOI_ATTR_ENC_MODE_TUNNEL 1
-#define IPSECDOI_ATTR_ENC_MODE_TRNS 2
-#define IPSECDOI_ATTR_AUTH 5 /* B */
- /* 0 means not to use authentication. */
-#define IPSECDOI_ATTR_AUTH_HMAC_MD5 1
-#define IPSECDOI_ATTR_AUTH_HMAC_SHA1 2
-#define IPSECDOI_ATTR_AUTH_DES_MAC 3
-#define IPSECDOI_ATTR_AUTH_KPDK 4 /*RFC-1826(Key/Pad/Data/Key)*/
- /*
- * When negotiating ESP without authentication, the Auth
- * Algorithm attribute MUST NOT be included in the proposal.
- * When negotiating ESP without confidentiality, the Auth
- * Algorithm attribute MUST be included in the proposal and
- * the ESP transform ID must be ESP_NULL.
- */
-#define IPSECDOI_ATTR_KEY_LENGTH 6 /* B */
-#define IPSECDOI_ATTR_KEY_ROUNDS 7 /* B */
-#define IPSECDOI_ATTR_COMP_DICT_SIZE 8 /* B */
-#define IPSECDOI_ATTR_COMP_PRIVALG 9 /* V */
-
-/* 4.6.1 Security Association Payload */
-struct ipsecdoi_sa {
- struct isakmp_gen h;
- u_int32_t doi; /* Domain of Interpretation */
- u_int32_t sit; /* Situation */
-};
-
-struct ipsecdoi_secrecy_h {
- u_int16_t len;
- u_int16_t reserved;
-};
-
-/* 4.6.2.1 Identification Type Values */
-struct ipsecdoi_id {
- struct isakmp_gen h;
- u_int8_t type; /* ID Type */
- u_int8_t proto_id; /* Protocol ID */
- u_int16_t port; /* Port */
- /* Identification Data */
-};
-
-#define IPSECDOI_ID_IPV4_ADDR 1
-#define IPSECDOI_ID_FQDN 2
-#define IPSECDOI_ID_USER_FQDN 3
-#define IPSECDOI_ID_IPV4_ADDR_SUBNET 4
-#define IPSECDOI_ID_IPV6_ADDR 5
-#define IPSECDOI_ID_IPV6_ADDR_SUBNET 6
-#define IPSECDOI_ID_IPV4_ADDR_RANGE 7
-#define IPSECDOI_ID_IPV6_ADDR_RANGE 8
-#define IPSECDOI_ID_DER_ASN1_DN 9
-#define IPSECDOI_ID_DER_ASN1_GN 10
-#define IPSECDOI_ID_KEY_ID 11
-
-/* 4.6.3 IPSEC DOI Notify Message Types */
-/* Notify Messages - Status Types */
-#define IPSECDOI_NTYPE_RESPONDER_LIFETIME 24576
-#define IPSECDOI_NTYPE_REPLAY_STATUS 24577
-#define IPSECDOI_NTYPE_INITIAL_CONTACT 24578
-
-#endif /* !defined(_IPSEC_DOI_H_) */
+++ /dev/null
-/*
- * IPX protocol formats
- *
- * @(#) $Header: /tcpdump/master/tcpdump/ipx.h,v 1.8 2002/12/11 07:13:54 guy Exp $
- */
-
-/* well-known sockets */
-#define IPX_SKT_NCP 0x0451
-#define IPX_SKT_SAP 0x0452
-#define IPX_SKT_RIP 0x0453
-#define IPX_SKT_NETBIOS 0x0455
-#define IPX_SKT_DIAGNOSTICS 0x0456
-#define IPX_SKT_NWLINK_DGM 0x0553 /* NWLink datagram, may contain SMB */
-#define IPX_SKT_EIGRP 0x85be /* Cisco EIGRP over IPX */
-
-/* IPX transport header */
-struct ipxHdr {
- u_int16_t cksum; /* Checksum */
- u_int16_t length; /* Length, in bytes, including header */
- u_int8_t tCtl; /* Transport Control (i.e. hop count) */
- u_int8_t pType; /* Packet Type (i.e. level 2 protocol) */
- u_int16_t dstNet[2]; /* destination net */
- u_int8_t dstNode[6]; /* destination node */
- u_int16_t dstSkt; /* destination socket */
- u_int16_t srcNet[2]; /* source net */
- u_int8_t srcNode[6]; /* source node */
- u_int16_t srcSkt; /* source socket */
-};
-
-#define ipxSize 30
-
+++ /dev/null
-/*
- * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the project nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-/* YIPS @(#)$Id: isakmp.h,v 1.10 2002/12/11 07:13:54 guy Exp $ */
-
-/* refer to RFC 2408 */
-
-/* must include <netinet/in.h> */
-
-#if !defined(_ISAKMP_H_)
-#define _ISAKMP_H_
-
-typedef u_char cookie_t[8];
-typedef u_char msgid_t[4];
-
-typedef struct { /* i_cookie + r_cookie */
- cookie_t i_ck;
- cookie_t r_ck;
-} isakmp_index;
-
-#define INITIATOR 1
-#define RESPONDER 2
-
-#define PORT_ISAKMP 500
-
-#define GENERATE 1
-#define VALIDATE 0
-
-/* Phase of oakley definition */
-/*
- 0000 0000 0000 0000
- | |||| ||||
- | |||| ++++--> negosiation number in phase
- | ++++-------> phase number
- +---------------> expire ?
- */
-#define ISAKMP_PH1 0x0010
-#define ISAKMP_PH2 0x0020
-#define ISAKMP_EXPIRED 0x0100
-
-#define ISAKMP_NGP_0 0x0000
-#define ISAKMP_NGP_1 0x0001
-#define ISAKMP_NGP_2 0x0002
-#define ISAKMP_NGP_3 0x0003
-#define ISAKMP_NGP_4 0x0004
-
-#define ISAKMP_PH1_N (ISAKMP_PH1 | ISAKMP_NGP_0) /* i.e. spawn */
-#define ISAKMP_PH1_1 (ISAKMP_PH1 | ISAKMP_NGP_1)
-#define ISAKMP_PH1_2 (ISAKMP_PH1 | ISAKMP_NGP_2)
-#define ISAKMP_PH1_3 (ISAKMP_PH1 | ISAKMP_NGP_3)
-#define ISAKMP_PH2_N (ISAKMP_PH2 | ISAKMP_NGP_0)
-#define ISAKMP_PH2_1 (ISAKMP_PH2 | ISAKMP_NGP_1)
-#define ISAKMP_PH2_2 (ISAKMP_PH2 | ISAKMP_NGP_2)
-#define ISAKMP_PH2_3 (ISAKMP_PH2 | ISAKMP_NGP_3)
-
-#define ISAKMP_TIMER_DEFAULT 10 /* seconds */
-#define ISAKMP_TRY_DEFAULT 3 /* times */
-
-/* 3.1 ISAKMP Header Format
- 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- ! Initiator !
- ! Cookie !
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- ! Responder !
- ! Cookie !
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- ! Next Payload ! MjVer ! MnVer ! Exchange Type ! Flags !
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- ! Message ID !
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- ! Length !
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-*/
-struct isakmp {
- cookie_t i_ck; /* Initiator Cookie */
- cookie_t r_ck; /* Responder Cookie */
- u_int8_t np; /* Next Payload Type */
- u_int8_t vers;
-#define ISAKMP_VERS_MAJOR 0xf0
-#define ISAKMP_VERS_MAJOR_SHIFT 4
-#define ISAKMP_VERS_MINOR 0x0f
-#define ISAKMP_VERS_MINOR_SHIFT 0
- u_int8_t etype; /* Exchange Type */
- u_int8_t flags; /* Flags */
- msgid_t msgid;
- u_int32_t len; /* Length */
-};
-
-/* Next Payload Type */
-#define ISAKMP_NPTYPE_NONE 0 /* NONE*/
-#define ISAKMP_NPTYPE_SA 1 /* Security Association */
-#define ISAKMP_NPTYPE_P 2 /* Proposal */
-#define ISAKMP_NPTYPE_T 3 /* Transform */
-#define ISAKMP_NPTYPE_KE 4 /* Key Exchange */
-#define ISAKMP_NPTYPE_ID 5 /* Identification */
-#define ISAKMP_NPTYPE_CERT 6 /* Certificate */
-#define ISAKMP_NPTYPE_CR 7 /* Certificate Request */
-#define ISAKMP_NPTYPE_HASH 8 /* Hash */
-#define ISAKMP_NPTYPE_SIG 9 /* Signature */
-#define ISAKMP_NPTYPE_NONCE 10 /* Nonce */
-#define ISAKMP_NPTYPE_N 11 /* Notification */
-#define ISAKMP_NPTYPE_D 12 /* Delete */
-#define ISAKMP_NPTYPE_VID 13 /* Vendor ID */
-
-#define ISAKMP_MAJOR_VERSION 1
-#define ISAKMP_MINOR_VERSION 0
-
-/* Exchange Type */
-#define ISAKMP_ETYPE_NONE 0 /* NONE */
-#define ISAKMP_ETYPE_BASE 1 /* Base */
-#define ISAKMP_ETYPE_IDENT 2 /* Identity Proteciton */
-#define ISAKMP_ETYPE_AUTH 3 /* Authentication Only */
-#define ISAKMP_ETYPE_AGG 4 /* Aggressive */
-#define ISAKMP_ETYPE_INF 5 /* Informational */
-
-/* Flags */
-#define ISAKMP_FLAG_E 0x01 /* Encryption Bit */
-#define ISAKMP_FLAG_C 0x02 /* Commit Bit */
-
-/* 3.2 Payload Generic Header
- 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- ! Next Payload ! RESERVED ! Payload Length !
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-*/
-struct isakmp_gen {
- u_int8_t np; /* Next Payload */
- u_int8_t reserved; /* RESERVED, unused, must set to 0 */
- u_int16_t len; /* Payload Length */
-};
-
-/* 3.3 Data Attributes
- 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- !A! Attribute Type ! AF=0 Attribute Length !
- !F! ! AF=1 Attribute Value !
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- . AF=0 Attribute Value .
- . AF=1 Not Transmitted .
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-*/
-struct isakmp_data {
- u_int16_t type; /* defined by DOI-spec, and Attribute Format */
- u_int16_t lorv; /* if f equal 1, Attribute Length */
- /* if f equal 0, Attribute Value */
- /* if f equal 1, Attribute Value */
-};
-#define ISAKMP_GEN_TLV 0x0000
-#define ISAKMP_GEN_TV 0x8000
- /* mask for type of attribute format */
-#define ISAKMP_GEN_MASK 0x8000
-
-/* 3.4 Security Association Payload */
- /* MAY NOT be used, because of being defined in ipsec-doi. */
- /*
- If the current payload is the last in the message,
- then the value of the next payload field will be 0.
- This field MUST NOT contain the
- values for the Proposal or Transform payloads as they are considered
- part of the security association negotiation. For example, this
- field would contain the value "10" (Nonce payload) in the first
- message of a Base Exchange (see Section 4.4) and the value "0" in the
- first message of an Identity Protect Exchange (see Section 4.5).
- */
-struct isakmp_pl_sa {
- struct isakmp_gen h;
- u_int32_t doi; /* Domain of Interpretation */
- u_int32_t sit; /* Situation */
-};
-
-/* 3.5 Proposal Payload */
- /*
- The value of the next payload field MUST only contain the value "2"
- or "0". If there are additional Proposal payloads in the message,
- then this field will be 2. If the current Proposal payload is the
- last within the security association proposal, then this field will
- be 0.
- */
-struct isakmp_pl_p {
- struct isakmp_gen h;
- u_int8_t p_no; /* Proposal # */
- u_int8_t prot_id; /* Protocol */
- u_int8_t spi_size; /* SPI Size */
- u_int8_t num_t; /* Number of Transforms */
- /* SPI */
-};
-
-/* 3.6 Transform Payload */
- /*
- The value of the next payload field MUST only contain the value "3"
- or "0". If there are additional Transform payloads in the proposal,
- then this field will be 3. If the current Transform payload is the
- last within the proposal, then this field will be 0.
- */
-struct isakmp_pl_t {
- struct isakmp_gen h;
- u_int8_t t_no; /* Transform # */
- u_int8_t t_id; /*&nbs