mirror of
https://github.com/opnsense/src.git
synced 2026-06-11 01:30:30 -04:00
This commit was generated by cvs2svn to compensate for changes in r172683,
which included commits to RCS files with non-trunk default branches.
This commit is contained in:
commit
e57e181f09
49 changed files with 7407 additions and 5037 deletions
|
|
@ -1,4 +1,92 @@
|
|||
$Header: /tcpdump/master/tcpdump/CHANGES,v 1.87.2.11 2005/09/20 06:05:34 guy Exp $
|
||||
$Header: /tcpdump/master/tcpdump/CHANGES,v 1.87.2.17 2007/09/13 13:39:44 ken Exp $
|
||||
|
||||
Mon. September 10, 2007. ken@xelerance.com. Summary for 0.9.8 tcpdump release
|
||||
Rework ARP printer
|
||||
Rework OSPFv3 printer
|
||||
Add support for Frame-Relay ARP
|
||||
Decode DHCP Option 121 (RFC 3442 Classless Static Route)
|
||||
Decode DHCP Option 249 (MS Classless Static Route) the same as Option 121
|
||||
TLV: Add support for Juniper .pcap extensions
|
||||
Print EGP header in new-world-order style
|
||||
Converted print-isakmp.c to NETDISSECT
|
||||
Moved AF specific stuff into af.h
|
||||
Test subsystem now table driven, and saves outputs and diffs to one place
|
||||
Require <net/pfvar.h> for pf definitions - allows reading of pflog formatted
|
||||
libpcap files on an OS other than where the file was generated
|
||||
|
||||
Wed. July 23, 2007. mcr@xelerance.com. Summary for 0.9.7 tcpdump release
|
||||
|
||||
NFS: Print unsigned values as such.
|
||||
RX: parse safely.
|
||||
BGP: fixes for IPv6-less builds.
|
||||
801.1ag: use standard codepoint.
|
||||
use /dev/bpf on systems with such a device.
|
||||
802.11: print QoS data, avoid dissect of no-data frame, ignore padding.
|
||||
smb: make sure that we haven't gone past the end of the captured data.
|
||||
smb: squelch an uninitialized complaint from coverity.
|
||||
NFS: from NetBSD; don't interpret the reply as a possible NFS reply
|
||||
if it got MSG_DENIED.
|
||||
BGP: don't print TLV values that didn't fit, from www.digit-labs.org.
|
||||
revised INSTALL.txt about libpcap dependancy.
|
||||
|
||||
Wed. April 25, 2007. ken@xelerance.com. Summary for 3.9.6 tcpdump release
|
||||
Update man page to reflect changes to libpcap
|
||||
Changes to both TCP and IP Printer Output
|
||||
Fix a potential buffer overflow in the 802.11 printer
|
||||
Print basic info about a few more Cisco LAN protocols.
|
||||
mDNS cleanup
|
||||
ICMP MPLS rework of the extension code
|
||||
bugfix: use the correct codepoint for the OSPF simple text auth token
|
||||
entry, and use safeputs to print the password.
|
||||
Add support in pflog for additional values
|
||||
Add support for OIF RSVP Extensions UNI 1.0 Rev. 2 and additional RSVP objects
|
||||
Add support for the Message-id NACK c-type.
|
||||
Add support for 802.3ah loopback ctrl msg
|
||||
Add support for Multiple-STP as per 802.1s
|
||||
Add support for rapid-SPT as per 802.1w
|
||||
Add support for CFM Link-trace msg, Link-trace-Reply msg,
|
||||
Sender-ID tlv, private tlv, port, interface status
|
||||
Add support for unidirectional link detection as per
|
||||
http://www.ietf.org/internet-drafts/draft-foschiano-udld-02.txt
|
||||
Add support for the olsr protocol as per RFC 3626 plus the LQ
|
||||
extensions from olsr.org
|
||||
Add support for variable-length checksum in DCCP, as per section 9 of
|
||||
RFC 4340.
|
||||
Add support for per-VLAN spanning tree and per-VLAN rapid spanning tree
|
||||
Add support for Multiple-STP as per 802.1s
|
||||
Add support for the cisco propriatry 'dynamic trunking protocol'
|
||||
Add support for the cisco proprietary VTP protocol
|
||||
Update dhcp6 options table as per IETF standardization activities
|
||||
|
||||
|
||||
Tue. September 19, 2006. ken@xelerance.com. Summary for 3.9.5 tcpdump release
|
||||
|
||||
Fix compiling on AIX (, at end of ENUM)
|
||||
Updated list of DNS RR typecodes
|
||||
Use local Ethernet defs on WIN32
|
||||
Add support for Frame-Relay ARP
|
||||
Fixes for compiling under MSVC++
|
||||
Add support for parsing Juniper .pcap files
|
||||
Add support for FRF.16 Multilink Frame-Relay (DLT_MFR)
|
||||
Rework the OSPFv3 printer
|
||||
Fix printing for 4.4BSD/NetBSD NFS Filehandles
|
||||
Add support for Cisco style NLPID encapsulation
|
||||
Add cisco prop. eigrp related, extended communities
|
||||
Add support for BGP signaled VPLS
|
||||
Cleanup the bootp printer
|
||||
Add support for PPP over Frame-Relay
|
||||
Add some bounds checking to the IP options code, and clean up
|
||||
the options output a bit.
|
||||
Add additional modp groups to ISAKMP printer
|
||||
Add support for Address-Withdraw and Label-Withdraw Msgs
|
||||
Add support for the BFD Discriminator TLV
|
||||
Fixes for 64bit compiling
|
||||
Add support for PIMv2 checksum verification
|
||||
Add support for further dissection of the IPCP Compression Option
|
||||
Add support for Cisco's proposed VQP protocol
|
||||
Add basic support for keyed authentication TCP option
|
||||
Lots of minor cosmetic changes to output printers
|
||||
|
||||
|
||||
Mon. September 19, 2005. ken@xelerance.com. Summary for 3.9.4 tcpdump release
|
||||
Decoder support for more Juniper link-layer types
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@ The current maintainers:
|
|||
|
||||
Additional people who have contributed patches:
|
||||
|
||||
Aaron Campbell <aaron@arbor.net>
|
||||
Alfredo Andres <aandres@s21sec.com>
|
||||
Albert Chin <china@thewrittenword.com>
|
||||
Andrew Brown <atatat@atatdot.net>
|
||||
|
|
@ -31,7 +32,9 @@ Additional people who have contributed patches:
|
|||
Charles M. Hannum <mycroft@netbsd.org>
|
||||
Chris Cogdon <chris@cogdon.org>
|
||||
Chris G. Demetriou <cgd@netbsd.org>
|
||||
Christian Sievers <c_s@users.sourceforge.net>
|
||||
Chris Jepeway <jepeway@blasted-heath.com>
|
||||
Chris Larson <clarson@kergoth.com>
|
||||
Craig Rodrigues <rodrigc@mediaone.net>
|
||||
Crist J. Clark <cjclark@alum.mit.edu>
|
||||
Daniel Hagerty <hag@ai.mit.edu>
|
||||
|
|
@ -39,6 +42,7 @@ Additional people who have contributed patches:
|
|||
David Binderman <d.binderman@virgin.net>
|
||||
David Smith <dsmith@redhat.com>
|
||||
David Young <dyoung@ojctech.com>
|
||||
Don Ebright <Don.Ebright@compuware.com>
|
||||
Eddie Kohler <xexd@sourceforge.net>
|
||||
Francis Dupont <Francis.Dupont@enst-bretagne.fr>
|
||||
Francisco Matias Cuenca-Acuna <mcuenca@george.rutgers.edu>
|
||||
|
|
@ -56,6 +60,7 @@ Additional people who have contributed patches:
|
|||
Heinz-Ado Arnolds <Ado.Arnolds@dhm-systems.de>
|
||||
Hendrik Scholz <hendrik@scholz.net>
|
||||
Ian McDonald <imcdnzl@gmail.com>
|
||||
Jacek Tobiasz <Jacek.Tobiasz@atm.com.pl>
|
||||
Jakob Schlyter <jakob@openbsd.org>
|
||||
Jan Oravec <wsx@wsx6.net>
|
||||
Jason R. Thorpe <thorpej@netbsd.org>
|
||||
|
|
@ -84,8 +89,10 @@ Additional people who have contributed patches:
|
|||
Marc A. Lehmann <pcg@goof.com>
|
||||
Mark Ellzey Thomas <mark@ackers.net>
|
||||
Marko Kiiskila <carnil@cs.tut.fi>
|
||||
Markus Schöpflin <schoepflin@sourceforge.net>
|
||||
Marshall Rose <mrose@dbc.mtview.ca.us>
|
||||
Martin Husemann <martin@netbsd.org>
|
||||
Max Laier <max@love2party.net>
|
||||
Michael Madore <mmadore@turbolinux.com>
|
||||
Michael Shalayeff <mickey@openbsd.org>
|
||||
Michael Shields <shields@msrl.com>
|
||||
|
|
@ -110,9 +117,11 @@ Additional people who have contributed patches:
|
|||
Pekka Savola <pekkas@netcore.fi>
|
||||
Peter Fales <peter@fales-lorenz.net>
|
||||
Peter Jeremy <peter.jeremy@alcatel.com.au>
|
||||
<pfhunt@users.sourceforge.net>
|
||||
Phil Wood <cpw@lanl.gov>
|
||||
Rafal Maszkowski <rzm@icm.edu.pl>
|
||||
Raphael Raimbault <raphael.raimbault@netasq.com>
|
||||
Rick Cheng <rcheng@juniper.net>
|
||||
Rick Jones <rick.jones2@hp.com>
|
||||
Rick Watson <watsonrick@users.sourceforge.net>
|
||||
Rob Braun <bbraun@synack.net>
|
||||
|
|
@ -124,11 +133,14 @@ Additional people who have contributed patches:
|
|||
Seth Webster <swebster@sst.ll.mit.edu>
|
||||
Shinsuke Suzuki <suz@kame.net>
|
||||
Steinar Haug <sthaug@nethelp.no>
|
||||
Swaminathan Chandrasekaran <chander@juniper.net>
|
||||
Takashi Yamamoto <yamt@mwd.biglobe.ne.jp>
|
||||
Terry Kennedy <terry@tmk.com>
|
||||
Timo Koskiahde
|
||||
Tony Li <tli@procket.com>
|
||||
Uns Lider <unslider@miranda.org>
|
||||
Victor Oppleman <oppleman@users.sourceforge.net>
|
||||
Wesley Griffin <wgriffin@users.sourceforge.net>
|
||||
Wilbert de Graaf <wilbertdg@hetnet.nl>
|
||||
Yen Yen Lim
|
||||
Yoshifumi Nishida
|
||||
|
|
|
|||
|
|
@ -11,6 +11,8 @@ acconfig.h
|
|||
aclocal.m4
|
||||
addrtoname.c
|
||||
addrtoname.h
|
||||
af.c
|
||||
af.h
|
||||
ah.h
|
||||
aodv.h
|
||||
appletalk.h
|
||||
|
|
@ -106,7 +108,6 @@ packetdat.awk
|
|||
parsenfsfh.c
|
||||
pcap_dump_ftell.c
|
||||
pcap-missing.h
|
||||
pf.h
|
||||
pmap_prot.h
|
||||
ppp.h
|
||||
print-802_11.c
|
||||
|
|
@ -171,6 +172,7 @@ print-netbios.c
|
|||
print-nfs.c
|
||||
print-ntp.c
|
||||
print-null.c
|
||||
print-olsr.c
|
||||
print-ospf.c
|
||||
print-ospf6.c
|
||||
print-pflog.c
|
||||
|
|
@ -229,6 +231,7 @@ tcpdump.1
|
|||
tcpdump.c
|
||||
tcpdump-stdinc.h
|
||||
telnet.h
|
||||
tftp.h
|
||||
timed.h
|
||||
token.h
|
||||
udp.h
|
||||
|
|
|
|||
|
|
@ -1,7 +1,11 @@
|
|||
@(#) $Header: /tcpdump/master/tcpdump/INSTALL,v 1.63.2.4 2005/09/20 06:05:35 guy Exp $ (LBL)
|
||||
@(#) $Header: /tcpdump/master/tcpdump/INSTALL,v 1.63.2.7 2007/09/14 01:03:12 guy Exp $ (LBL)
|
||||
|
||||
If you have not built libpcap, do so first. See the README
|
||||
file in this directory for the ftp location.
|
||||
If you have not built libpcap, and your system does not have libpcap
|
||||
installed, install libpcap first. Your system might provide a version
|
||||
of libpcap that can be installed; if so, to compile tcpdump you might
|
||||
need to install a "developer" version of libpcap as well as the
|
||||
"run-time" version. You can also install tcpdump.org's version of
|
||||
libpcap; see the README file in this directory for the ftp location.
|
||||
|
||||
You will need an ANSI C compiler to build tcpdump. The configure script
|
||||
will abort if your compiler is not ANSI compliant. If this happens, use
|
||||
|
|
@ -15,21 +19,18 @@ directory), run ./configure (a shell script). "configure" will
|
|||
determine your system attributes and generate an appropriate Makefile
|
||||
from Makefile.in. Now build tcpdump by running "make".
|
||||
|
||||
If everything builds ok, su and type "make install". This will install
|
||||
tcpdump and the manual entry. By default, tcpdump is installed with
|
||||
group execute permissions. The group used depends on your os. In
|
||||
addition, BPF packet access is controlled by permissions to
|
||||
/dev/bpf0. In any case, DO NOT give untrusted users the capability of
|
||||
running tcpdump. Tcpdump can capture any traffic on your net,
|
||||
including passwords.
|
||||
If everything builds ok, su and type "make install". This will install
|
||||
tcpdump and the manual entry. Any user will be able to use tcpdump to
|
||||
read saved captures. Whether a user will be able to capture traffic
|
||||
depends on the OS and the configuration of the system; see the tcpdump
|
||||
man page for details. DO NOT give untrusted users the ability to
|
||||
capture traffic. If a user can capture traffic, he or she could use
|
||||
utilities such as tcpdump to capture any traffic on your net, including
|
||||
passwords.
|
||||
|
||||
Note that most systems ship tcpdump, but usually an older version.
|
||||
Remember to remove or rename the installed binary when upgrading.
|
||||
|
||||
If you use Linux, this version of libpcap is known to compile and run
|
||||
with 2.0.25 and more modern, and 2.2 and later, kernels. It is
|
||||
guaranteed not to work with 1.X kernels.
|
||||
|
||||
If your system is not one which we have tested tcpdump on, you may have
|
||||
to modify the configure script and Makefile.in. Please send us patches
|
||||
for any modifications you need to make.
|
||||
|
|
@ -128,7 +129,6 @@ parsenfsfh.c - Network File System file parser routines
|
|||
pcap_dump_ftell.c - pcap_dump_ftell() implementation, in case libpcap
|
||||
doesn't have it
|
||||
pcap-missing.h - declarations of functions possibly missing from libpcap
|
||||
pf.h - OpenBSD PF definitions
|
||||
pmap_prot.h - definitions for ONC RPC portmapper protocol
|
||||
ppp.h - Point to Point Protocol definitions
|
||||
print-802_11.c - IEEE 802.11 printer routines
|
||||
|
|
@ -243,6 +243,7 @@ tcp.h - TCP definitions
|
|||
tcpdump.1 - manual entry
|
||||
tcpdump.c - main program
|
||||
telnet.h - Telnet definitions
|
||||
tftp.h - TFTP definitions
|
||||
timed.h - BSD time daemon protocol definitions
|
||||
token.h - Token Ring definitions
|
||||
udp.h - UDP definitions
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@
|
|||
# WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
|
||||
# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
#
|
||||
# @(#) $Header: /tcpdump/master/tcpdump/Makefile.in,v 1.293.2.3 2005/09/20 06:05:36 guy Exp $ (LBL)
|
||||
# @(#) $Header: /tcpdump/master/tcpdump/Makefile.in,v 1.293.2.7 2007/09/12 19:48:50 guy Exp $ (LBL)
|
||||
|
||||
#
|
||||
# Various configurable paths (remember to edit Makefile.in, not Makefile)
|
||||
|
|
@ -65,7 +65,7 @@ INSTALL_DATA = @INSTALL_DATA@
|
|||
@rm -f $@
|
||||
$(CC) $(CFLAGS) -c $(srcdir)/$*.c
|
||||
|
||||
CSRC = addrtoname.c cpack.c gmpls.c oui.c gmt2local.c ipproto.c \
|
||||
CSRC = addrtoname.c af.c cpack.c gmpls.c oui.c gmt2local.c ipproto.c \
|
||||
nlpid.c l2vpn.c machdep.c parsenfsfh.c \
|
||||
print-802_11.c print-ap1394.c print-ah.c print-arcnet.c \
|
||||
print-aodv.c print-arp.c print-ascii.c print-atalk.c print-atm.c \
|
||||
|
|
@ -80,8 +80,8 @@ CSRC = addrtoname.c cpack.c gmpls.c oui.c gmt2local.c ipproto.c \
|
|||
print-l2tp.c print-lane.c print-ldp.c print-llc.c \
|
||||
print-lmp.c print-lspping.c \
|
||||
print-lwres.c print-mobile.c print-mpls.c print-msdp.c \
|
||||
print-nfs.c print-ntp.c print-null.c print-ospf.c \
|
||||
print-pflog.c print-pgm.c print-pim.c print-ppp.c print-pppoe.c \
|
||||
print-nfs.c print-ntp.c print-null.c print-olsr.c print-ospf.c \
|
||||
print-pgm.c print-pim.c print-ppp.c print-pppoe.c \
|
||||
print-pptp.c print-radius.c print-raw.c print-rip.c \
|
||||
print-rsvp.c print-rx.c print-sctp.c print-sip.c print-sl.c print-sll.c \
|
||||
print-slow.c print-snmp.c print-stp.c print-sunatm.c print-sunrpc.c \
|
||||
|
|
@ -183,19 +183,10 @@ distclean:
|
|||
tags: $(TAGFILES)
|
||||
ctags -wtd $(TAGFILES)
|
||||
|
||||
tar:
|
||||
releasetar:
|
||||
@cwd=`pwd` ; dir=`basename $$cwd` ; name=$(PROG)-`cat VERSION` ; \
|
||||
list="" ; tar="tar chf" ; \
|
||||
for i in `cat FILES` ; do list="$$list $$name/$$i" ; done; \
|
||||
echo \
|
||||
"rm -f ../$$name; ln -s $$dir ../$$name" ; \
|
||||
rm -f ../$$name; ln -s $$dir ../$$name ; \
|
||||
echo \
|
||||
"(cd .. ; $$tar - [lots of files]) | compress > /tmp/$$name.tar.Z" ; \
|
||||
(cd .. ; $$tar - $$list) | compress > /tmp/$$name.tar.Z ; \
|
||||
echo \
|
||||
"rm -f ../$$name" ; \
|
||||
rm -f ../$$name
|
||||
list="" ; make distclean; cd ..; mkdir -p n; cd n; ln -s ../$$dir $$name; \
|
||||
tar -c -z -f $$name.tar.gz $$name/. ;
|
||||
|
||||
depend: $(GENSRC)
|
||||
${srcdir}/mkdep -c $(CC) $(DEFS) $(INCLS) $(SRC)
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
@(#) $Header: /tcpdump/master/tcpdump/README,v 1.65 2004/10/12 02:01:59 guy Exp $ (LBL)
|
||||
@(#) $Header: /tcpdump/master/tcpdump/README,v 1.65.2.1 2007/09/14 01:03:12 guy Exp $ (LBL)
|
||||
|
||||
TCPDUMP 3.9
|
||||
Now maintained by "The Tcpdump Group"
|
||||
|
|
@ -11,10 +11,11 @@ Anonymous CVS is available via:
|
|||
(password "anoncvs")
|
||||
cvs -d :pserver:cvs.tcpdump.org:/tcpdump/master checkout tcpdump
|
||||
|
||||
Version 3.9 of TCPDUMP can be retrived with the CVS tag "tcpdump_3_9rel1":
|
||||
Version 3.9 of TCPDUMP can be retrieved with the CVS tag "tcpdump_3_9rel1":
|
||||
cvs -d :pserver:cvs.tcpdump.org:/tcpdump/master checkout -r tcpdump_3_9rel1 tcpdump
|
||||
|
||||
Please send patches against the master copy to patches@tcpdump.org.
|
||||
Please submit patches against the master copy to the tcpdump project on
|
||||
sourceforge.net.
|
||||
|
||||
formerly from Lawrence Berkeley National Laboratory
|
||||
Network Research Group <tcpdump@ee.lbl.gov>
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
3.9.4
|
||||
3.9.8
|
||||
|
|
|
|||
63
contrib/tcpdump/af.c
Normal file
63
contrib/tcpdump/af.c
Normal file
|
|
@ -0,0 +1,63 @@
|
|||
/*
|
||||
* Copyright (c) 1998-2006 The TCPDUMP project
|
||||
*
|
||||
* 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/af.c,v 1.3.2.1 2007/02/26 13:33:17 hannes Exp $ (LBL)";
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include <tcpdump-stdinc.h>
|
||||
#include "interface.h"
|
||||
#include "af.h"
|
||||
|
||||
struct tok af_values[] = {
|
||||
{ 0, "Reserved"},
|
||||
{ AFNUM_INET, "IPv4"},
|
||||
{ AFNUM_INET6, "IPv6"},
|
||||
{ AFNUM_NSAP, "NSAP"},
|
||||
{ AFNUM_HDLC, "HDLC"},
|
||||
{ AFNUM_BBN1822, "BBN 1822"},
|
||||
{ AFNUM_802, "802"},
|
||||
{ AFNUM_E163, "E.163"},
|
||||
{ AFNUM_E164, "E.164"},
|
||||
{ AFNUM_F69, "F.69"},
|
||||
{ AFNUM_X121, "X.121"},
|
||||
{ AFNUM_IPX, "Novell IPX"},
|
||||
{ AFNUM_ATALK, "Appletalk"},
|
||||
{ AFNUM_DECNET, "Decnet IV"},
|
||||
{ AFNUM_BANYAN, "Banyan Vines"},
|
||||
{ AFNUM_E164NSAP, "E.164 with NSAP subaddress"},
|
||||
{ AFNUM_L2VPN, "Layer-2 VPN"},
|
||||
{ AFNUM_VPLS, "VPLS"},
|
||||
{ 0, NULL},
|
||||
};
|
||||
|
||||
struct tok bsd_af_values[] = {
|
||||
{ BSD_AFNUM_INET, "IPv4" },
|
||||
{ BSD_AFNUM_NS, "NS" },
|
||||
{ BSD_AFNUM_ISO, "ISO" },
|
||||
{ BSD_AFNUM_APPLETALK, "Appletalk" },
|
||||
{ BSD_AFNUM_IPX, "IPX" },
|
||||
{ BSD_AFNUM_INET6_BSD, "IPv6" },
|
||||
{ BSD_AFNUM_INET6_FREEBSD, "IPv6" },
|
||||
{ BSD_AFNUM_INET6_DARWIN, "IPv6" },
|
||||
{ 0, NULL}
|
||||
};
|
||||
57
contrib/tcpdump/af.h
Normal file
57
contrib/tcpdump/af.h
Normal file
|
|
@ -0,0 +1,57 @@
|
|||
/* @(#) $Header: /tcpdump/master/tcpdump/af.h,v 1.3.2.1 2007/02/26 13:33:17 hannes Exp $ (LBL) */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1998-2006 The TCPDUMP project
|
||||
*
|
||||
* 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 af_values[];
|
||||
extern struct tok bsd_af_values[];
|
||||
|
||||
/* RFC1700 address family numbers */
|
||||
#define AFNUM_INET 1
|
||||
#define AFNUM_INET6 2
|
||||
#define AFNUM_NSAP 3
|
||||
#define AFNUM_HDLC 4
|
||||
#define AFNUM_BBN1822 5
|
||||
#define AFNUM_802 6
|
||||
#define AFNUM_E163 7
|
||||
#define AFNUM_E164 8
|
||||
#define AFNUM_F69 9
|
||||
#define AFNUM_X121 10
|
||||
#define AFNUM_IPX 11
|
||||
#define AFNUM_ATALK 12
|
||||
#define AFNUM_DECNET 13
|
||||
#define AFNUM_BANYAN 14
|
||||
#define AFNUM_E164NSAP 15
|
||||
#define AFNUM_VPLS 25
|
||||
/* draft-kompella-ppvpn-l2vpn */
|
||||
#define AFNUM_L2VPN 196 /* still to be approved by IANA */
|
||||
|
||||
/*
|
||||
* BSD AF_ values.
|
||||
*
|
||||
* Unfortunately, the BSDs don't all use the same value for AF_INET6,
|
||||
* so, because we want to be able to read captures from all of the BSDs,
|
||||
* we check for all of them.
|
||||
*/
|
||||
#define BSD_AFNUM_INET 2
|
||||
#define BSD_AFNUM_NS 6 /* XEROX NS protocols */
|
||||
#define BSD_AFNUM_ISO 7
|
||||
#define BSD_AFNUM_APPLETALK 16
|
||||
#define BSD_AFNUM_IPX 23
|
||||
#define BSD_AFNUM_INET6_BSD 24 /* OpenBSD (and probably NetBSD), BSD/OS */
|
||||
#define BSD_AFNUM_INET6_FREEBSD 28
|
||||
#define BSD_AFNUM_INET6_DARWIN 30
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
/* @(#) $Header: /tcpdump/master/tcpdump/bootp.h,v 1.15 2003/07/01 19:16:06 guy Exp $ (LBL) */
|
||||
/* @(#) $Header: /tcpdump/master/tcpdump/bootp.h,v 1.15.4.3 2007/08/21 22:02:08 guy Exp $ (LBL) */
|
||||
/*
|
||||
* Bootstrap Protocol (BOOTP). RFC951 and RFC1048.
|
||||
*
|
||||
|
|
@ -161,6 +161,9 @@ struct bootp {
|
|||
#define TAG_NS_SEARCH ((u_int8_t) 117)
|
||||
/* RFC 3011 */
|
||||
#define TAG_IP4_SUBNET_SELECT ((u_int8_t) 118)
|
||||
/* RFC 3442 */
|
||||
#define TAG_CLASSLESS_STATIC_RT ((u_int8_t) 121)
|
||||
#define TAG_CLASSLESS_STA_RT_MS ((u_int8_t) 249)
|
||||
/* 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)
|
||||
|
|
@ -218,3 +221,10 @@ struct cmu_vend {
|
|||
|
||||
/* v_flags values */
|
||||
#define VF_SMASK 1 /* Subnet mask field contains valid data */
|
||||
|
||||
/* RFC 4702 DHCP Client FQDN Option */
|
||||
|
||||
#define CLIENT_FQDN_FLAGS_S 0x01
|
||||
#define CLIENT_FQDN_FLAGS_O 0x02
|
||||
#define CLIENT_FQDN_FLAGS_E 0x04
|
||||
#define CLIENT_FQDN_FLAGS_N 0x08
|
||||
|
|
|
|||
|
|
@ -181,6 +181,9 @@
|
|||
/* Define to 1 if you have the <netinet/if_ether.h> header file. */
|
||||
#undef HAVE_NETINET_IF_ETHER_H
|
||||
|
||||
/* Define to 1 if you have the <net/pfvar.h> header file. */
|
||||
#undef HAVE_NET_PFVAR_H
|
||||
|
||||
/* Define to 1 if you have the <openssl/evp.h> header file. */
|
||||
#undef HAVE_OPENSSL_EVP_H
|
||||
|
||||
|
|
@ -298,19 +301,19 @@
|
|||
/* Define as the return type of signal handlers (`int' or `void'). */
|
||||
#undef RETSIGTYPE
|
||||
|
||||
/* The size of a `char', as computed by sizeof. */
|
||||
/* The size of `char', as computed by sizeof. */
|
||||
#undef SIZEOF_CHAR
|
||||
|
||||
/* The size of a `int', as computed by sizeof. */
|
||||
/* The size of `int', as computed by sizeof. */
|
||||
#undef SIZEOF_INT
|
||||
|
||||
/* The size of a `long', as computed by sizeof. */
|
||||
/* The size of `long', as computed by sizeof. */
|
||||
#undef SIZEOF_LONG
|
||||
|
||||
/* The size of a `long long', as computed by sizeof. */
|
||||
/* The size of `long long', as computed by sizeof. */
|
||||
#undef SIZEOF_LONG_LONG
|
||||
|
||||
/* The size of a `short', as computed by sizeof. */
|
||||
/* The size of `short', as computed by sizeof. */
|
||||
#undef SIZEOF_SHORT
|
||||
|
||||
/* Define to 1 if you have the ANSI C header files. */
|
||||
|
|
|
|||
10706
contrib/tcpdump/configure
vendored
10706
contrib/tcpdump/configure
vendored
File diff suppressed because it is too large
Load diff
|
|
@ -1,4 +1,4 @@
|
|||
dnl @(#) $Header: /tcpdump/master/tcpdump/configure.in,v 1.188.2.7 2005/09/21 16:50:01 guy Exp $ (LBL)
|
||||
dnl @(#) $Header: /tcpdump/master/tcpdump/configure.in,v 1.188.2.8 2007/09/12 19:48:50 guy Exp $ (LBL)
|
||||
dnl
|
||||
dnl Copyright (c) 1994, 1995, 1996, 1997
|
||||
dnl The Regents of the University of California. All rights reserved.
|
||||
|
|
@ -6,7 +6,7 @@ dnl
|
|||
dnl Process this file with autoconf to produce a configure script.
|
||||
dnl
|
||||
|
||||
AC_REVISION($Revision: 1.188.2.7 $)
|
||||
AC_REVISION($Revision: 1.188.2.8 $)
|
||||
AC_PREREQ(2.50)
|
||||
AC_INIT(tcpdump.c)
|
||||
|
||||
|
|
@ -16,6 +16,12 @@ AC_LBL_C_INIT(V_CCOPT, V_INCLS)
|
|||
AC_LBL_C_INLINE
|
||||
AC_C___ATTRIBUTE__
|
||||
AC_CHECK_HEADERS(fcntl.h rpc/rpcent.h netdnet/dnetdb.h)
|
||||
AC_CHECK_HEADERS(net/pfvar.h, , , [#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
#include <net/if.h>])
|
||||
if test "$ac_cv_header_net_pfvar_h" == yes; then
|
||||
LOCALSRC="print-pflog.c $LOCALSRC"
|
||||
fi
|
||||
AC_CHECK_HEADERS(netinet/if_ether.h, , , [#include <sys/types.h>
|
||||
#include <sys/socket.h>])
|
||||
if test "$ac_cv_header_netinet_if_ether_h" != yes; then
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* @(#) $Header: /tcpdump/master/tcpdump/dccp.h,v 1.1.2.2 2005/09/20 06:25:45 guy Exp $ (LBL) */
|
||||
/* @(#) $Header: /tcpdump/master/tcpdump/dccp.h,v 1.1.2.4 2006/05/12 01:46:17 guy Exp $ (LBL) */
|
||||
/*
|
||||
* Copyright (C) Arnaldo Carvalho de Melo 2004
|
||||
* Copyright (C) Ian McDonald 2005 <iam4@cs.waikato.ac.nz>
|
||||
|
|
@ -86,12 +86,14 @@ struct dccp_hdr_response {
|
|||
u_int32_t dccph_resp_service;
|
||||
};
|
||||
|
||||
#if 0
|
||||
static inline struct dccp_hdr_data *dccp_hdr_data(struct dccp_hdr *hdrg)
|
||||
{
|
||||
const int ext = DCCPH_X(hdrg) ? sizeof(struct dccp_hdr_ext) : 0;
|
||||
|
||||
return (struct dccp_hdr_data *)(((u_char *)hdrg) + sizeof(hdrg) + ext);
|
||||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
* struct dccp_hdr_reset - Unconditionally shut down a connection
|
||||
|
|
@ -115,7 +117,7 @@ enum dccp_pkt_type {
|
|||
DCCP_PKT_RESET,
|
||||
DCCP_PKT_SYNC,
|
||||
DCCP_PKT_SYNCACK,
|
||||
DCCP_PKT_INVALID,
|
||||
DCCP_PKT_INVALID
|
||||
};
|
||||
|
||||
enum dccp_reset_codes {
|
||||
|
|
@ -131,7 +133,7 @@ enum dccp_reset_codes {
|
|||
DCCP_RESET_CODE_TOO_BUSY,
|
||||
DCCP_RESET_CODE_BAD_INIT_COOKIE,
|
||||
DCCP_RESET_CODE_AGGRESSION_PENALTY,
|
||||
__DCCP_RESET_CODE_LAST,
|
||||
__DCCP_RESET_CODE_LAST
|
||||
};
|
||||
|
||||
#endif /* __DCCP_HDR__ */
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* @(#) $Header: /tcpdump/master/tcpdump/ip.h,v 1.11 2004/09/27 21:13:10 hannes Exp $ (LBL) */
|
||||
/* @(#) $Header: /tcpdump/master/tcpdump/ip.h,v 1.11.2.1 2007/09/14 01:30:02 guy Exp $ (LBL) */
|
||||
/*
|
||||
* Copyright (c) 1982, 1986, 1993
|
||||
* The Regents of the University of California. All rights reserved.
|
||||
|
|
@ -102,6 +102,7 @@ struct ip {
|
|||
|
||||
#define IPOPT_RR 7 /* record packet route */
|
||||
#define IPOPT_TS 68 /* timestamp */
|
||||
#define IPOPT_RFC1393 82 /* traceroute RFC 1393 */
|
||||
#define IPOPT_SECURITY 130 /* provide s,c,h,tcc */
|
||||
#define IPOPT_LSRR 131 /* loose source route */
|
||||
#define IPOPT_SATID 136 /* satnet id */
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@
|
|||
* WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
* @(#) $Header: /tcpdump/master/tcpdump/llc.h,v 1.17.2.2 2005/09/29 07:40:12 hannes Exp $ (LBL)
|
||||
* @(#) $Header: /tcpdump/master/tcpdump/llc.h,v 1.17.2.4 2007/02/08 07:07:51 guy Exp $ (LBL)
|
||||
*/
|
||||
|
||||
/*
|
||||
|
|
@ -44,7 +44,7 @@
|
|||
#define LLC_XID 0xaf
|
||||
#define LLC_FRMR 0x87
|
||||
|
||||
#define LLC_S_CMD(is) (((is) >> 1) & 0x03)
|
||||
#define LLC_S_CMD(is) (((is) >> 2) & 0x03)
|
||||
#define LLC_RR 0x0001
|
||||
#define LLC_RNR 0x0005
|
||||
#define LLC_REJ 0x0009
|
||||
|
|
@ -102,6 +102,8 @@
|
|||
* PIDs for use with OUI_CISCO.
|
||||
*/
|
||||
#define PID_CISCO_CDP 0x2000 /* Cisco Discovery Protocol */
|
||||
#define PID_CISCO_VTP 0x2003 /* Cisco VLAN Trunk Protocol */
|
||||
#define PID_CISCO_DTP 0x2004 /* Cisco Dynamic Trunk Protocol */
|
||||
|
||||
/*
|
||||
* PIDs for use with OUI_RFC2684.
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* @(#) $Header: /tcpdump/master/tcpdump/nameser.h,v 1.14 2003/11/05 06:02:59 guy Exp $ (LBL) */
|
||||
/* @(#) $Header: /tcpdump/master/tcpdump/nameser.h,v 1.14.4.2 2006/11/10 03:15:35 guy Exp $ (LBL) */
|
||||
/*
|
||||
* Copyright (c) 1983, 1989, 1993
|
||||
* The Regents of the University of California. All rights reserved.
|
||||
|
|
@ -75,6 +75,14 @@
|
|||
* Internet nameserver port number
|
||||
*/
|
||||
#define NAMESERVER_PORT 53
|
||||
|
||||
/*
|
||||
* Port for multicast DNS; see
|
||||
*
|
||||
* http://files.multicastdns.org/draft-cheshire-dnsext-multicastdns.txt
|
||||
*
|
||||
* for the current mDNS spec.
|
||||
*/
|
||||
#define MULTICASTDNS_PORT 5353
|
||||
|
||||
/*
|
||||
|
|
@ -163,10 +171,21 @@
|
|||
#define T_SRV 33 /* Server selection */
|
||||
#define T_ATMA 34 /* ATM Address */
|
||||
#define T_NAPTR 35 /* Naming Authority PoinTeR */
|
||||
#define T_KX 36 /* Key Exchanger */
|
||||
#define T_CERT 37 /* Certificates in the DNS */
|
||||
#define T_A6 38 /* IP6 address */
|
||||
#define T_DNAME 39 /* non-terminal redirection */
|
||||
#define T_SINK 40 /* unknown */
|
||||
#define T_OPT 41 /* EDNS0 option (meta-RR) */
|
||||
#define T_APL 42 /* lists of address prefixes */
|
||||
#define T_DS 43 /* Delegation Signer */
|
||||
#define T_SSHFP 44 /* SSH Fingerprint */
|
||||
#define T_IPSECKEY 45 /* IPsec keying material */
|
||||
#define T_RRSIG 46 /* new security signature */
|
||||
#define T_NSEC 47 /* provable insecure information */
|
||||
#define T_DNSKEY 48 /* new security key */
|
||||
/* non standard */
|
||||
#define T_SPF 99 /* sender policy framework */
|
||||
#define T_UINFO 100 /* user (finger) information */
|
||||
#define T_UID 101 /* user ID */
|
||||
#define T_GID 102 /* group ID */
|
||||
|
|
@ -190,7 +209,8 @@
|
|||
#define C_HS 4 /* for Hesiod name server (MIT) (XXX) */
|
||||
/* Query class values which do not appear in resource records */
|
||||
#define C_ANY 255 /* wildcard match */
|
||||
#define C_CACHE_FLUSH 0x8000 /* mDNS cache flush flag */
|
||||
#define C_QU 0x8000 /* mDNS QU flag in queries */
|
||||
#define C_CACHE_FLUSH 0x8000 /* mDNS cache flush flag in replies */
|
||||
|
||||
/*
|
||||
* Status return codes for T_UNSPEC conversion routines
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@
|
|||
* WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
* @(#) $Header: /tcpdump/master/tcpdump/netdissect.h,v 1.16.2.3 2005/09/29 07:46:46 hannes Exp $ (LBL)
|
||||
* @(#) $Header: /tcpdump/master/tcpdump/netdissect.h,v 1.16.2.4 2006/02/08 01:40:09 hannes Exp $ (LBL)
|
||||
*/
|
||||
|
||||
#ifndef netdissect_h
|
||||
|
|
@ -231,7 +231,7 @@ extern char *copy_argv(netdissect_options *, char **);
|
|||
#endif
|
||||
|
||||
extern void safeputchar(int);
|
||||
extern void safeputs(const char *);
|
||||
extern void safeputs(const char *, int);
|
||||
|
||||
#if 0
|
||||
extern const char *isonsap_string(netdissect_options *, const u_char *);
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* @(#) $Header: /tcpdump/master/tcpdump/ospf.h,v 1.16.2.1 2005/08/23 11:16:30 hannes Exp $ (LBL) */
|
||||
/* @(#) $Header: /tcpdump/master/tcpdump/ospf.h,v 1.16.2.2 2006/12/13 08:24:27 hannes Exp $ (LBL) */
|
||||
/*
|
||||
* Copyright (c) 1991, 1993, 1994, 1995, 1996, 1997
|
||||
* The Regents of the University of California. All rights reserved.
|
||||
|
|
@ -48,6 +48,7 @@
|
|||
/* ospf_authtype */
|
||||
#define OSPF_AUTH_NONE 0 /* No auth-data */
|
||||
#define OSPF_AUTH_SIMPLE 1 /* Simple password */
|
||||
#define OSPF_AUTH_SIMPLE_LEN 8 /* max length of simple authentication */
|
||||
#define OSPF_AUTH_MD5 2 /* MD5 authentication */
|
||||
#define OSPF_AUTH_MD5_LEN 16 /* length of MD5 authentication */
|
||||
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
|
||||
#ifndef lint
|
||||
static const char rcsid[] _U_ =
|
||||
"@(#) $Header: /tcpdump/master/tcpdump/print-bfd.c,v 1.5.2.4 2005/04/28 09:28:47 hannes Exp $";
|
||||
"@(#) $Header: /tcpdump/master/tcpdump/print-bfd.c,v 1.5.2.5 2006/02/02 06:36:37 hannes Exp $";
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
|
|
@ -219,7 +219,7 @@ bfd_print(register const u_char *pptr, register u_int len, register u_int port)
|
|||
printf("BFDv%u, %s, State %s, Flags: [%s], length: %u",
|
||||
version,
|
||||
tok2str(bfd_port_values, "unknown (%u)", port),
|
||||
tok2str(bfd_v1_state_values, "unknown (%u)", bfd_header->flags & 0xc0),
|
||||
tok2str(bfd_v1_state_values, "unknown (%u)", (bfd_header->flags & 0xc0) >> 6),
|
||||
bittok2str(bfd_v1_flag_values, "none", bfd_header->flags & 0x3f),
|
||||
len);
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@
|
|||
|
||||
#ifndef lint
|
||||
static const char rcsid[] _U_ =
|
||||
"@(#) $Header: /tcpdump/master/tcpdump/print-bgp.c,v 1.91.2.6 2005/06/03 07:31:43 hannes Exp $";
|
||||
"@(#) $Header: /tcpdump/master/tcpdump/print-bgp.c,v 1.91.2.12 2007/07/14 22:26:35 guy Exp $";
|
||||
#endif
|
||||
|
||||
#include <tcpdump-stdinc.h>
|
||||
|
|
@ -50,6 +50,7 @@ static const char rcsid[] _U_ =
|
|||
#include "extract.h"
|
||||
#include "bgp.h"
|
||||
#include "l2vpn.h"
|
||||
#include "af.h"
|
||||
|
||||
struct bgp {
|
||||
u_int8_t bgp_marker[16];
|
||||
|
|
@ -339,46 +340,6 @@ static struct tok bgp_safi_values[] = {
|
|||
#define BGP_COMMUNITY_NO_ADVERT 0xffffff02
|
||||
#define BGP_COMMUNITY_NO_EXPORT_SUBCONFED 0xffffff03
|
||||
|
||||
/* RFC1700 address family numbers */
|
||||
#define AFNUM_INET 1
|
||||
#define AFNUM_INET6 2
|
||||
#define AFNUM_NSAP 3
|
||||
#define AFNUM_HDLC 4
|
||||
#define AFNUM_BBN1822 5
|
||||
#define AFNUM_802 6
|
||||
#define AFNUM_E163 7
|
||||
#define AFNUM_E164 8
|
||||
#define AFNUM_F69 9
|
||||
#define AFNUM_X121 10
|
||||
#define AFNUM_IPX 11
|
||||
#define AFNUM_ATALK 12
|
||||
#define AFNUM_DECNET 13
|
||||
#define AFNUM_BANYAN 14
|
||||
#define AFNUM_E164NSAP 15
|
||||
/* draft-kompella-ppvpn-l2vpn */
|
||||
#define AFNUM_L2VPN 196 /* still to be approved by IANA */
|
||||
|
||||
static struct tok bgp_afi_values[] = {
|
||||
{ 0, "Reserved"},
|
||||
{ AFNUM_INET, "IPv4"},
|
||||
{ AFNUM_INET6, "IPv6"},
|
||||
{ AFNUM_NSAP, "NSAP"},
|
||||
{ AFNUM_HDLC, "HDLC"},
|
||||
{ AFNUM_BBN1822, "BBN 1822"},
|
||||
{ AFNUM_802, "802"},
|
||||
{ AFNUM_E163, "E.163"},
|
||||
{ AFNUM_E164, "E.164"},
|
||||
{ AFNUM_F69, "F.69"},
|
||||
{ AFNUM_X121, "X.121"},
|
||||
{ AFNUM_IPX, "Novell IPX"},
|
||||
{ AFNUM_ATALK, "Appletalk"},
|
||||
{ AFNUM_DECNET, "Decnet IV"},
|
||||
{ AFNUM_BANYAN, "Banyan Vines"},
|
||||
{ AFNUM_E164NSAP, "E.164 with NSAP subaddress"},
|
||||
{ AFNUM_L2VPN, "Layer-2 VPN"},
|
||||
{ 0, NULL},
|
||||
};
|
||||
|
||||
/* Extended community type - draft-ietf-idr-bgp-ext-communities-05 */
|
||||
#define BGP_EXT_COM_RT_0 0x0002 /* Route Target,Format AS(2bytes):AN(4bytes) */
|
||||
#define BGP_EXT_COM_RT_1 0x0102 /* Route Target,Format IP address:AN(2bytes) */
|
||||
|
|
@ -403,6 +364,14 @@ static struct tok bgp_afi_values[] = {
|
|||
|
||||
#define BGP_EXT_COM_L2INFO 0x800a /* draft-kompella-ppvpn-l2vpn */
|
||||
|
||||
/* http://www.cisco.com/en/US/tech/tk436/tk428/technologies_tech_note09186a00801eb09a.shtml */
|
||||
#define BGP_EXT_COM_EIGRP_GEN 0x8800
|
||||
#define BGP_EXT_COM_EIGRP_METRIC_AS_DELAY 0x8801
|
||||
#define BGP_EXT_COM_EIGRP_METRIC_REL_NH_BW 0x8802
|
||||
#define BGP_EXT_COM_EIGRP_METRIC_LOAD_MTU 0x8803
|
||||
#define BGP_EXT_COM_EIGRP_EXT_REMAS_REMID 0x8804
|
||||
#define BGP_EXT_COM_EIGRP_EXT_REMPROTO_REMMETRIC 0x8805
|
||||
|
||||
static struct tok bgp_extd_comm_flag_values[] = {
|
||||
{ 0x8000, "vendor-specific"},
|
||||
{ 0x4000, "non-transitive"},
|
||||
|
|
@ -427,6 +396,12 @@ static struct tok bgp_extd_comm_subtype_values[] = {
|
|||
{ BGP_EXT_COM_OSPF_RID, "ospf-router-id"},
|
||||
{ BGP_EXT_COM_OSPF_RID2, "ospf-router-id"},
|
||||
{ BGP_EXT_COM_L2INFO, "layer2-info"},
|
||||
{ BGP_EXT_COM_EIGRP_GEN , "eigrp-general-route (flag, tag)" },
|
||||
{ BGP_EXT_COM_EIGRP_METRIC_AS_DELAY , "eigrp-route-metric (AS, delay)" },
|
||||
{ BGP_EXT_COM_EIGRP_METRIC_REL_NH_BW , "eigrp-route-metric (reliability, nexthop, bandwidth)" },
|
||||
{ BGP_EXT_COM_EIGRP_METRIC_LOAD_MTU , "eigrp-route-metric (load, MTU)" },
|
||||
{ BGP_EXT_COM_EIGRP_EXT_REMAS_REMID , "eigrp-external-route (remote-AS, remote-ID)" },
|
||||
{ BGP_EXT_COM_EIGRP_EXT_REMPROTO_REMMETRIC , "eigrp-external-route (remote-proto, remote-metric)" },
|
||||
{ 0, NULL},
|
||||
};
|
||||
|
||||
|
|
@ -491,6 +466,9 @@ decode_labeled_prefix4(const u_char *pptr, char *buf, u_int buflen)
|
|||
stacked labels in a a single BGP message
|
||||
*/
|
||||
|
||||
if (24 > plen)
|
||||
return -1;
|
||||
|
||||
plen-=24; /* adjust prefixlen - labellength */
|
||||
|
||||
if (32 < plen)
|
||||
|
|
@ -565,9 +543,15 @@ decode_rt_routing_info(const u_char *pptr, char *buf, u_int buflen)
|
|||
TCHECK(pptr[0]);
|
||||
plen = pptr[0]; /* get prefix length */
|
||||
|
||||
if (0 == plen)
|
||||
return 1; /* default route target */
|
||||
|
||||
if (32 > plen)
|
||||
return -1;
|
||||
|
||||
plen-=32; /* adjust prefix length */
|
||||
|
||||
if (0 < plen)
|
||||
if (64 < plen)
|
||||
return -1;
|
||||
|
||||
memset(&route_target, 0, sizeof(route_target));
|
||||
|
|
@ -596,6 +580,9 @@ decode_labeled_vpn_prefix4(const u_char *pptr, char *buf, u_int buflen)
|
|||
TCHECK(pptr[0]);
|
||||
plen = pptr[0]; /* get prefix length */
|
||||
|
||||
if ((24+64) > plen)
|
||||
return -1;
|
||||
|
||||
plen-=(24+64); /* adjust prefixlen - labellength - RD len*/
|
||||
|
||||
if (32 < plen)
|
||||
|
|
@ -741,6 +728,10 @@ decode_labeled_prefix6(const u_char *pptr, char *buf, u_int buflen)
|
|||
|
||||
TCHECK(pptr[0]);
|
||||
plen = pptr[0]; /* get prefix length */
|
||||
|
||||
if (24 > plen)
|
||||
return -1;
|
||||
|
||||
plen-=24; /* adjust prefixlen - labellength */
|
||||
|
||||
if (128 < plen)
|
||||
|
|
@ -775,6 +766,9 @@ decode_labeled_vpn_prefix6(const u_char *pptr, char *buf, u_int buflen)
|
|||
TCHECK(pptr[0]);
|
||||
plen = pptr[0]; /* get prefix length */
|
||||
|
||||
if ((24+64) > plen)
|
||||
return -1;
|
||||
|
||||
plen-=(24+64); /* adjust prefixlen - labellength - RD len*/
|
||||
|
||||
if (128 < plen)
|
||||
|
|
@ -840,6 +834,9 @@ decode_labeled_vpn_clnp_prefix(const u_char *pptr, char *buf, u_int buflen)
|
|||
TCHECK(pptr[0]);
|
||||
plen = pptr[0]; /* get prefix length */
|
||||
|
||||
if ((24+64) > plen)
|
||||
return -1;
|
||||
|
||||
plen-=(24+64); /* adjust prefixlen - labellength - RD len*/
|
||||
|
||||
if (152 < plen)
|
||||
|
|
@ -1013,7 +1010,7 @@ bgp_attr_print(const struct bgp_attr *attr, const u_char *pptr, int len)
|
|||
safi = tptr[2];
|
||||
|
||||
printf("\n\t AFI: %s (%u), %sSAFI: %s (%u)",
|
||||
tok2strbuf(bgp_afi_values, "Unknown AFI", af,
|
||||
tok2strbuf(af_values, "Unknown AFI", af,
|
||||
tokbuf, sizeof(tokbuf)),
|
||||
af,
|
||||
(safi>128) ? "vendor specific " : "", /* 128 is meanwhile wellknown */
|
||||
|
|
@ -1049,6 +1046,7 @@ bgp_attr_print(const struct bgp_attr *attr, const u_char *pptr, int len)
|
|||
case (AFNUM_L2VPN<<8 | SAFNUM_VPNUNICAST):
|
||||
case (AFNUM_L2VPN<<8 | SAFNUM_VPNMULTICAST):
|
||||
case (AFNUM_L2VPN<<8 | SAFNUM_VPNUNIMULTICAST):
|
||||
case (AFNUM_VPLS<<8 | SAFNUM_VPLS):
|
||||
break;
|
||||
default:
|
||||
TCHECK2(tptr[0], tlen);
|
||||
|
|
@ -1132,6 +1130,7 @@ bgp_attr_print(const struct bgp_attr *attr, const u_char *pptr, int len)
|
|||
}
|
||||
break;
|
||||
#endif
|
||||
case (AFNUM_VPLS<<8 | SAFNUM_VPLS):
|
||||
case (AFNUM_L2VPN<<8 | SAFNUM_VPNUNICAST):
|
||||
case (AFNUM_L2VPN<<8 | SAFNUM_VPNMULTICAST):
|
||||
case (AFNUM_L2VPN<<8 | SAFNUM_VPNUNIMULTICAST):
|
||||
|
|
@ -1291,6 +1290,7 @@ bgp_attr_print(const struct bgp_attr *attr, const u_char *pptr, int len)
|
|||
printf("\n\t %s", buf);
|
||||
break;
|
||||
#endif
|
||||
case (AFNUM_VPLS<<8 | SAFNUM_VPLS):
|
||||
case (AFNUM_L2VPN<<8 | SAFNUM_VPNUNICAST):
|
||||
case (AFNUM_L2VPN<<8 | SAFNUM_VPNMULTICAST):
|
||||
case (AFNUM_L2VPN<<8 | SAFNUM_VPNUNIMULTICAST):
|
||||
|
|
@ -1346,7 +1346,7 @@ bgp_attr_print(const struct bgp_attr *attr, const u_char *pptr, int len)
|
|||
safi = tptr[2];
|
||||
|
||||
printf("\n\t AFI: %s (%u), %sSAFI: %s (%u)",
|
||||
tok2strbuf(bgp_afi_values, "Unknown AFI", af,
|
||||
tok2strbuf(af_values, "Unknown AFI", af,
|
||||
tokbuf, sizeof(tokbuf)),
|
||||
af,
|
||||
(safi>128) ? "vendor specific " : "", /* 128 is meanwhile wellknown */
|
||||
|
|
@ -1425,6 +1425,7 @@ bgp_attr_print(const struct bgp_attr *attr, const u_char *pptr, int len)
|
|||
printf("\n\t %s", buf);
|
||||
break;
|
||||
#endif
|
||||
case (AFNUM_VPLS<<8 | SAFNUM_VPLS):
|
||||
case (AFNUM_L2VPN<<8 | SAFNUM_VPNUNICAST):
|
||||
case (AFNUM_L2VPN<<8 | SAFNUM_VPNMULTICAST):
|
||||
case (AFNUM_L2VPN<<8 | SAFNUM_VPNUNIMULTICAST):
|
||||
|
|
@ -1537,7 +1538,7 @@ bgp_attr_print(const struct bgp_attr *attr, const u_char *pptr, int len)
|
|||
*(tptr+6),
|
||||
tokbuf, sizeof(tokbuf)),
|
||||
(*(tptr+7) & BGP_OSPF_RTYPE_METRIC_TYPE) ? "E2" : "",
|
||||
(*(tptr+6) == (BGP_OSPF_RTYPE_EXT ||BGP_OSPF_RTYPE_NSSA )) ? "E1" : "");
|
||||
((*(tptr+6) == BGP_OSPF_RTYPE_EXT) || (*(tptr+6) == BGP_OSPF_RTYPE_NSSA)) ? "E1" : "");
|
||||
break;
|
||||
case BGP_EXT_COM_L2INFO:
|
||||
printf(": %s Control Flags [0x%02x]:MTU %u",
|
||||
|
|
@ -1674,7 +1675,7 @@ bgp_open_print(const u_char *dat, int length)
|
|||
switch(cap_type) {
|
||||
case BGP_CAPCODE_MP:
|
||||
printf("\n\t\tAFI %s (%u), SAFI %s (%u)",
|
||||
tok2strbuf(bgp_afi_values, "Unknown",
|
||||
tok2strbuf(af_values, "Unknown",
|
||||
EXTRACT_16BITS(opt+i+BGP_OPT_SIZE+2),
|
||||
tokbuf, sizeof(tokbuf)),
|
||||
EXTRACT_16BITS(opt+i+BGP_OPT_SIZE+2),
|
||||
|
|
@ -1691,7 +1692,7 @@ bgp_open_print(const u_char *dat, int length)
|
|||
cap_offset=4;
|
||||
while(tcap_len>=4) {
|
||||
printf("\n\t\t AFI %s (%u), SAFI %s (%u), Forwarding state preserved: %s",
|
||||
tok2strbuf(bgp_afi_values,"Unknown",
|
||||
tok2strbuf(af_values,"Unknown",
|
||||
EXTRACT_16BITS(opt+i+BGP_OPT_SIZE+cap_offset),
|
||||
tokbuf, sizeof(tokbuf)),
|
||||
EXTRACT_16BITS(opt+i+BGP_OPT_SIZE+cap_offset),
|
||||
|
|
@ -1905,7 +1906,7 @@ bgp_notification_print(const u_char *dat, int length)
|
|||
tptr = dat + BGP_NOTIFICATION_SIZE;
|
||||
TCHECK2(*tptr, 7);
|
||||
printf(", AFI %s (%u), SAFI %s (%u), Max Prefixes: %u",
|
||||
tok2strbuf(bgp_afi_values, "Unknown",
|
||||
tok2strbuf(af_values, "Unknown",
|
||||
EXTRACT_16BITS(tptr), tokbuf, sizeof(tokbuf)),
|
||||
EXTRACT_16BITS(tptr),
|
||||
tok2strbuf(bgp_safi_values, "Unknown", *(tptr+2),
|
||||
|
|
@ -1939,7 +1940,7 @@ bgp_route_refresh_print(const u_char *pptr, int len) {
|
|||
bgp_route_refresh_header = (const struct bgp_route_refresh *)pptr;
|
||||
|
||||
printf("\n\t AFI %s (%u), SAFI %s (%u)",
|
||||
tok2strbuf(bgp_afi_values,"Unknown",
|
||||
tok2strbuf(af_values,"Unknown",
|
||||
/* this stinks but the compiler pads the structure
|
||||
* weird */
|
||||
EXTRACT_16BITS(&bgp_route_refresh_header->afi),
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@
|
|||
|
||||
#ifndef lint
|
||||
static const char rcsid[] _U_ =
|
||||
"@(#) $Header: /tcpdump/master/tcpdump/print-chdlc.c,v 1.32.2.8 2005/08/23 10:29:42 hannes Exp $ (LBL)";
|
||||
"@(#) $Header: /tcpdump/master/tcpdump/print-chdlc.c,v 1.32.2.11 2005/11/29 08:57:10 hannes Exp $ (LBL)";
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
|
|
@ -42,6 +42,13 @@ static const char rcsid[] _U_ =
|
|||
|
||||
static void chdlc_slarp_print(const u_char *, u_int);
|
||||
|
||||
const struct tok chdlc_cast_values[] = {
|
||||
{ CHDLC_UNICAST, "unicast" },
|
||||
{ CHDLC_BCAST, "bcast" },
|
||||
{ 0, NULL}
|
||||
};
|
||||
|
||||
|
||||
/* Standard CHDLC printer */
|
||||
u_int
|
||||
chdlc_if_print(const struct pcap_pkthdr *h, register const u_char *p)
|
||||
|
|
@ -59,58 +66,52 @@ chdlc_if_print(const struct pcap_pkthdr *h, register const u_char *p)
|
|||
u_int
|
||||
chdlc_print(register const u_char *p, u_int length) {
|
||||
u_int proto;
|
||||
const struct ip *ip;
|
||||
|
||||
proto = EXTRACT_16BITS(&p[2]);
|
||||
if (eflag) {
|
||||
switch (p[0]) {
|
||||
case CHDLC_UNICAST:
|
||||
printf("unicast ");
|
||||
break;
|
||||
case CHDLC_BCAST:
|
||||
printf("bcast ");
|
||||
break;
|
||||
default:
|
||||
printf("0x%02x ", p[0]);
|
||||
break;
|
||||
}
|
||||
printf("%d %04x: ", length, proto);
|
||||
printf("%s, ethertype %s (0x%04x), length %u: ",
|
||||
tok2str(chdlc_cast_values, "0x%02x", p[0]),
|
||||
tok2str(ethertype_values, "Unknown", proto),
|
||||
proto,
|
||||
length);
|
||||
}
|
||||
|
||||
length -= CHDLC_HDRLEN;
|
||||
ip = (const struct ip *)(p + CHDLC_HDRLEN);
|
||||
p += CHDLC_HDRLEN;
|
||||
|
||||
switch (proto) {
|
||||
case ETHERTYPE_IP:
|
||||
ip_print(gndo, (const u_char *)ip, length);
|
||||
ip_print(gndo, p, length);
|
||||
break;
|
||||
#ifdef INET6
|
||||
case ETHERTYPE_IPV6:
|
||||
ip6_print((const u_char *)ip, length);
|
||||
ip6_print(p, length);
|
||||
break;
|
||||
#endif
|
||||
case CHDLC_TYPE_SLARP:
|
||||
chdlc_slarp_print((const u_char *)ip, length);
|
||||
chdlc_slarp_print(p, length);
|
||||
break;
|
||||
#if 0
|
||||
case CHDLC_TYPE_CDP:
|
||||
chdlc_cdp_print((const u_char *)ip, length);
|
||||
chdlc_cdp_print(p, length);
|
||||
break;
|
||||
#endif
|
||||
case ETHERTYPE_MPLS:
|
||||
case ETHERTYPE_MPLS_MULTI:
|
||||
mpls_print((const u_char *)(ip), length);
|
||||
mpls_print(p, length);
|
||||
break;
|
||||
case ETHERTYPE_ISO:
|
||||
/* is the fudge byte set ? lets verify by spotting ISO headers */
|
||||
if (*(p+CHDLC_HDRLEN+1) == 0x81 ||
|
||||
*(p+CHDLC_HDRLEN+1) == 0x82 ||
|
||||
*(p+CHDLC_HDRLEN+1) == 0x83)
|
||||
isoclns_print(p+CHDLC_HDRLEN+1, length-1, length-1);
|
||||
if (*(p+1) == 0x81 ||
|
||||
*(p+1) == 0x82 ||
|
||||
*(p+1) == 0x83)
|
||||
isoclns_print(p+1, length-1, length-1);
|
||||
else
|
||||
isoclns_print(p+CHDLC_HDRLEN, length, length);
|
||||
isoclns_print(p, length, length);
|
||||
break;
|
||||
default:
|
||||
printf("unknown CHDLC protocol (0x%04x)", proto);
|
||||
if (!eflag)
|
||||
printf("unknown CHDLC protocol (0x%04x)", proto);
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@
|
|||
|
||||
#ifndef lint
|
||||
static const char rcsid[] _U_ =
|
||||
"@(#) $Header: /tcpdump/master/tcpdump/print-dccp.c,v 1.1.2.2 2005/09/20 06:25:45 guy Exp $ (LBL)";
|
||||
"@(#) $Header: /tcpdump/master/tcpdump/print-dccp.c,v 1.1.2.6 2006/02/19 05:08:44 guy Exp $ (LBL)";
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
|
|
@ -146,7 +146,7 @@ static u_int64_t dccp_seqno(const struct dccp_hdr *dh)
|
|||
u_int64_t seqno = EXTRACT_24BITS(&seq_high) & 0xFFFFFF;
|
||||
|
||||
if (DCCPH_X(dh) != 0) {
|
||||
const struct dccp_hdr_ext *dhx = (void *)dh + sizeof(*dh);
|
||||
const struct dccp_hdr_ext *dhx = (void *)(dh + 1);
|
||||
u_int32_t seq_low = dhx->dccph_seq_low;
|
||||
seqno &= 0x00FFFF; /* clear reserved field */
|
||||
seqno = (seqno << 32) + EXTRACT_32BITS(&seq_low);
|
||||
|
|
@ -155,25 +155,36 @@ static u_int64_t dccp_seqno(const struct dccp_hdr *dh)
|
|||
return seqno;
|
||||
}
|
||||
|
||||
static u_int64_t dccp_ack_no(const struct dccp_hdr *dh,
|
||||
const struct dccp_hdr_ack_bits *dh_ack)
|
||||
static inline unsigned int dccp_basic_hdr_len(const struct dccp_hdr *dh)
|
||||
{
|
||||
u_int32_t ack_high = DCCPH_ACK(dh_ack);
|
||||
u_int64_t ackno = EXTRACT_24BITS(&ack_high) & 0xFFFFFF;
|
||||
return sizeof(*dh) + (DCCPH_X(dh) ? sizeof(struct dccp_hdr_ext) : 0);
|
||||
}
|
||||
|
||||
static void dccp_print_ack_no(const u_char *bp)
|
||||
{
|
||||
const struct dccp_hdr *dh = (const struct dccp_hdr *)bp;
|
||||
const struct dccp_hdr_ack_bits *dh_ack =
|
||||
(struct dccp_hdr_ack_bits *)(bp + dccp_basic_hdr_len(dh));
|
||||
u_int32_t ack_high;
|
||||
u_int64_t ackno;
|
||||
|
||||
TCHECK2(*dh_ack,4);
|
||||
ack_high = DCCPH_ACK(dh_ack);
|
||||
ackno = EXTRACT_24BITS(&ack_high) & 0xFFFFFF;
|
||||
|
||||
if (DCCPH_X(dh) != 0) {
|
||||
u_int32_t ack_low = dh_ack->dccph_ack_nr_low;
|
||||
|
||||
u_int32_t ack_low;
|
||||
|
||||
TCHECK2(*dh_ack,8);
|
||||
ack_low = dh_ack->dccph_ack_nr_low;
|
||||
|
||||
ackno &= 0x00FFFF; /* clear reserved field */
|
||||
ackno = (ackno << 32) + EXTRACT_32BITS(&ack_low);
|
||||
}
|
||||
|
||||
return ackno;
|
||||
}
|
||||
|
||||
static inline unsigned int dccp_basic_hdr_len(const struct dccp_hdr *dh)
|
||||
{
|
||||
return sizeof(*dh) + (DCCPH_X(dh) ? sizeof(struct dccp_hdr_ext) : 0);
|
||||
(void)printf("(ack=%" PRIu64 ") ", ackno);
|
||||
trunc:
|
||||
return;
|
||||
}
|
||||
|
||||
static inline unsigned int dccp_packet_hdr_len(const u_int8_t type)
|
||||
|
|
@ -301,7 +312,8 @@ void dccp_print(const u_char *bp, const u_char *data2, u_int len)
|
|||
struct dccp_hdr_request *dhr =
|
||||
(struct dccp_hdr_request *)(bp + dccp_basic_hdr_len(dh));
|
||||
TCHECK(*dhr);
|
||||
(void)printf("request (service=%d) ", dhr->dccph_req_service);
|
||||
(void)printf("request (service=%d) ",
|
||||
EXTRACT_32BITS(&dhr->dccph_req_service));
|
||||
extlen += 4;
|
||||
break;
|
||||
}
|
||||
|
|
@ -309,9 +321,8 @@ void dccp_print(const u_char *bp, const u_char *data2, u_int len)
|
|||
struct dccp_hdr_response *dhr =
|
||||
(struct dccp_hdr_response *)(bp + dccp_basic_hdr_len(dh));
|
||||
TCHECK(*dhr);
|
||||
(void)printf("response (service=%d, ack=%" PRIu64 ") ",
|
||||
dhr->dccph_resp_service,
|
||||
dccp_ack_no(dh,&(dhr->dccph_resp_ack)));
|
||||
(void)printf("response (service=%d) ",
|
||||
EXTRACT_32BITS(&dhr->dccph_resp_service));
|
||||
extlen += 12;
|
||||
break;
|
||||
}
|
||||
|
|
@ -319,20 +330,12 @@ void dccp_print(const u_char *bp, const u_char *data2, u_int len)
|
|||
(void)printf("data ");
|
||||
break;
|
||||
case DCCP_PKT_ACK: {
|
||||
struct dccp_hdr_ack_bits *dha =
|
||||
(struct dccp_hdr_ack_bits *)(bp + dccp_basic_hdr_len(dh));
|
||||
TCHECK(*dha);
|
||||
(void)printf("ack (ack=%" PRIu64 ") ",
|
||||
dccp_ack_no(dh,dha));
|
||||
(void)printf("ack ");
|
||||
extlen += 8;
|
||||
break;
|
||||
}
|
||||
case DCCP_PKT_DATAACK: {
|
||||
struct dccp_hdr_ack_bits *dha =
|
||||
(struct dccp_hdr_ack_bits *)(bp + dccp_basic_hdr_len(dh));
|
||||
TCHECK(*dha);
|
||||
(void)printf("dataack (ack=%" PRIu64 ") ",
|
||||
dccp_ack_no(dh,dha));
|
||||
(void)printf("dataack ");
|
||||
extlen += 8;
|
||||
break;
|
||||
}
|
||||
|
|
@ -366,6 +369,10 @@ void dccp_print(const u_char *bp, const u_char *data2, u_int len)
|
|||
break;
|
||||
}
|
||||
|
||||
if ((DCCPH_TYPE(dh) != DCCP_PKT_DATA) &&
|
||||
(DCCPH_TYPE(dh) != DCCP_PKT_REQUEST))
|
||||
dccp_print_ack_no(bp);
|
||||
|
||||
if (vflag < 2)
|
||||
return;
|
||||
|
||||
|
|
|
|||
|
|
@ -32,13 +32,15 @@
|
|||
* RFC3319,
|
||||
* RFC3633,
|
||||
* RFC3646,
|
||||
* draft-ietf-dhc-dhcpv6-opt-timeconfig-03.txt,
|
||||
* draft-ietf-dhc-lifetime-00.txt,
|
||||
* RFC3898,
|
||||
* RFC4075,
|
||||
* RFC4242,
|
||||
* RFC4280,
|
||||
*/
|
||||
|
||||
#ifndef lint
|
||||
static const char rcsid[] _U_ =
|
||||
"@(#) $Header: /tcpdump/master/tcpdump/print-dhcp6.c,v 1.35 2004/07/06 22:16:03 guy Exp $";
|
||||
"@(#) $Header: /tcpdump/master/tcpdump/print-dhcp6.c,v 1.35.2.1 2006/10/25 22:04:36 guy Exp $";
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
|
|
@ -104,8 +106,8 @@ struct dhcp6_relay {
|
|||
#define DH6OPT_CLIENTID 1
|
||||
#define DH6OPT_SERVERID 2
|
||||
#define DH6OPT_IA_NA 3
|
||||
#define DH6OPT_IA_TMP 4
|
||||
#define DH6OPT_IADDR 5
|
||||
#define DH6OPT_IA_TA 4
|
||||
#define DH6OPT_IA_ADDR 5
|
||||
#define DH6OPT_ORO 6
|
||||
#define DH6OPT_PREFERENCE 7
|
||||
# define DH6OPT_PREF_MAX 255
|
||||
|
|
@ -141,21 +143,18 @@ struct dhcp6_relay {
|
|||
#define DH6OPT_DNSNAME 24
|
||||
#define DH6OPT_IA_PD 25
|
||||
#define DH6OPT_IA_PD_PREFIX 26
|
||||
|
||||
/*
|
||||
* The old prefix delegation option used in the service specification document
|
||||
* (200206xx version) by NTT Communications.
|
||||
*/
|
||||
#define DH6OPT_PREFIX_DELEGATION 30
|
||||
#define DH6OPT_PREFIX_INFORMATION 31
|
||||
#define DH6OPT_PREFIX_REQUEST 32
|
||||
|
||||
/*
|
||||
* The following one is an unassigned number.
|
||||
* We temporarily use values as of KAME snap 20040322.
|
||||
*/
|
||||
#define DH6OPT_NTP_SERVERS 35
|
||||
#define DH6OPT_LIFETIME 36
|
||||
#define DH6OPT_NIS_SERVERS 27
|
||||
#define DH6OPT_NISP_SERVERS 28
|
||||
#define DH6OPT_NIS_NAME 29
|
||||
#define DH6OPT_NISP_NAME 30
|
||||
#define DH6OPT_NTP_SERVERS 31
|
||||
#define DH6OPT_LIFETIME 32
|
||||
#define DH6OPT_BCMCS_SERVER_D 33
|
||||
#define DH6OPT_BCMCS_SERVER_A 34
|
||||
#define DH6OPT_GEOCONF_CIVIC 36
|
||||
#define DH6OPT_REMOTE_ID 37
|
||||
#define DH6OPT_SUBSCRIBER_ID 38
|
||||
#define DH6OPT_CLIENT_FQDN 39
|
||||
|
||||
struct dhcp6opt {
|
||||
u_int16_t dh6opt_type;
|
||||
|
|
@ -171,6 +170,14 @@ struct dhcp6_ia {
|
|||
u_int32_t dh6opt_ia_t2;
|
||||
};
|
||||
|
||||
struct dhcp6_ia_addr {
|
||||
u_int16_t dh6opt_ia_addr_type;
|
||||
u_int16_t dh6opt_ia_addr_len;
|
||||
struct in6_addr dh6opt_ia_addr_addr;
|
||||
u_int32_t dh6opt_ia_addr_pltime;
|
||||
u_int32_t dh6opt_ia_addr_vltime;
|
||||
} __attribute__ ((__packed__));
|
||||
|
||||
struct dhcp6_ia_prefix {
|
||||
u_int16_t dh6opt_ia_prefix_type;
|
||||
u_int16_t dh6opt_ia_prefix_len;
|
||||
|
|
@ -205,6 +212,10 @@ dhcp6opt_name(int type)
|
|||
return "server ID";
|
||||
case DH6OPT_IA_NA:
|
||||
return "IA_NA";
|
||||
case DH6OPT_IA_TA:
|
||||
return "IA_TA";
|
||||
case DH6OPT_IA_ADDR:
|
||||
return "IA_ADDR";
|
||||
case DH6OPT_ORO:
|
||||
return "option request";
|
||||
case DH6OPT_PREFERENCE:
|
||||
|
|
@ -241,10 +252,6 @@ dhcp6opt_name(int type)
|
|||
return "DNS";
|
||||
case DH6OPT_DNSNAME:
|
||||
return "DNS name";
|
||||
case DH6OPT_PREFIX_DELEGATION:
|
||||
return "prefix delegation";
|
||||
case DH6OPT_PREFIX_INFORMATION:
|
||||
return "prefix information";
|
||||
case DH6OPT_IA_PD:
|
||||
return "IA_PD";
|
||||
case DH6OPT_IA_PD_PREFIX:
|
||||
|
|
@ -253,6 +260,26 @@ dhcp6opt_name(int type)
|
|||
return "NTP Server";
|
||||
case DH6OPT_LIFETIME:
|
||||
return "lifetime";
|
||||
case DH6OPT_NIS_SERVERS:
|
||||
return "NIS server";
|
||||
case DH6OPT_NISP_SERVERS:
|
||||
return "NIS+ server";
|
||||
case DH6OPT_NIS_NAME:
|
||||
return "NIS domain name";
|
||||
case DH6OPT_NISP_NAME:
|
||||
return "NIS+ domain name";
|
||||
case DH6OPT_BCMCS_SERVER_D:
|
||||
return "BCMCS domain name";
|
||||
case DH6OPT_BCMCS_SERVER_A:
|
||||
return "BCMCS server";
|
||||
case DH6OPT_GEOCONF_CIVIC:
|
||||
return "Geoconf Civic";
|
||||
case DH6OPT_REMOTE_ID:
|
||||
return "Remote ID";
|
||||
case DH6OPT_SUBSCRIBER_ID:
|
||||
return "Subscriber ID";
|
||||
case DH6OPT_CLIENT_FQDN:
|
||||
return "Client FQDN";
|
||||
default:
|
||||
snprintf(genstr, sizeof(genstr), "opt_%d", type);
|
||||
return(genstr);
|
||||
|
|
@ -298,9 +325,9 @@ dhcp6opt_print(const u_char *cp, const u_char *ep)
|
|||
size_t optlen;
|
||||
u_int16_t val16;
|
||||
u_int32_t val32;
|
||||
struct in6_addr addr6;
|
||||
struct dhcp6_ia ia;
|
||||
struct dhcp6_ia_prefix ia_prefix;
|
||||
struct dhcp6_ia_addr ia_addr;
|
||||
struct dhcp6_auth authopt;
|
||||
u_int authinfolen, authrealmlen;
|
||||
|
||||
|
|
@ -369,6 +396,29 @@ dhcp6opt_print(const u_char *cp, const u_char *ep)
|
|||
break;
|
||||
}
|
||||
break;
|
||||
case DH6OPT_IA_ADDR:
|
||||
if (optlen < sizeof(ia_addr) - 4) {
|
||||
printf(" ?)");
|
||||
break;
|
||||
}
|
||||
memcpy(&ia_addr, (u_char *)dh6o, sizeof(ia_addr));
|
||||
printf(" %s",
|
||||
ip6addr_string(&ia_addr.dh6opt_ia_addr_addr));
|
||||
ia_addr.dh6opt_ia_addr_pltime =
|
||||
ntohl(ia_addr.dh6opt_ia_addr_pltime);
|
||||
ia_addr.dh6opt_ia_addr_vltime =
|
||||
ntohl(ia_addr.dh6opt_ia_addr_vltime);
|
||||
printf(" pltime:%lu vltime:%lu",
|
||||
(unsigned long)ia_addr.dh6opt_ia_addr_pltime,
|
||||
(unsigned long)ia_addr.dh6opt_ia_addr_vltime);
|
||||
if (optlen > sizeof(ia_addr) - 4) {
|
||||
/* there are sub-options */
|
||||
dhcp6opt_print((u_char *)dh6o +
|
||||
sizeof(ia_addr),
|
||||
(u_char *)(dh6o + 1) + optlen);
|
||||
}
|
||||
printf(")");
|
||||
break;
|
||||
case DH6OPT_ORO:
|
||||
if (optlen % 2) {
|
||||
printf(" ?)");
|
||||
|
|
@ -526,6 +576,9 @@ dhcp6opt_print(const u_char *cp, const u_char *ep)
|
|||
case DH6OPT_SIP_SERVER_A:
|
||||
case DH6OPT_DNS:
|
||||
case DH6OPT_NTP_SERVERS:
|
||||
case DH6OPT_NIS_SERVERS:
|
||||
case DH6OPT_NISP_SERVERS:
|
||||
case DH6OPT_BCMCS_SERVER_A:
|
||||
if (optlen % 16) {
|
||||
printf(" ?)");
|
||||
break;
|
||||
|
|
@ -535,25 +588,6 @@ dhcp6opt_print(const u_char *cp, const u_char *ep)
|
|||
printf(" %s", ip6addr_string(&tp[i]));
|
||||
printf(")");
|
||||
break;
|
||||
case DH6OPT_PREFIX_DELEGATION:
|
||||
dhcp6opt_print((u_char *)(dh6o + 1),
|
||||
(u_char *)(dh6o + 1) + optlen);
|
||||
printf(")");
|
||||
break;
|
||||
case DH6OPT_PREFIX_INFORMATION:
|
||||
if (optlen % 21)
|
||||
printf(" ?)");
|
||||
memcpy(&addr6, (u_char *)(dh6o + 1) + 5,
|
||||
sizeof(addr6));
|
||||
printf(" %s/%d", ip6addr_string(&addr6),
|
||||
(int)*((u_char *)(dh6o + 1) + 4));
|
||||
memcpy(&val32, dh6o + 1, sizeof(val32));
|
||||
val32 = ntohl(val32);
|
||||
if (val32 == DHCP6_DURATITION_INFINITE)
|
||||
printf(" lease-duration: infinite)");
|
||||
else
|
||||
printf(" lease-duration: %u)", val32);
|
||||
break;
|
||||
case DH6OPT_STATUS_CODE:
|
||||
if (optlen < 2) {
|
||||
printf(" ?)");
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@
|
|||
|
||||
#ifndef lint
|
||||
static const char rcsid[] _U_ =
|
||||
"@(#) $Header: /tcpdump/master/tcpdump/print-ipfc.c,v 1.7.2.1 2005/07/07 01:24:36 guy Exp $ (LBL)";
|
||||
"@(#) $Header: /tcpdump/master/tcpdump/print-ipfc.c,v 1.7.2.2 2005/11/13 12:12:59 guy Exp $ (LBL)";
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
|
|
@ -101,8 +101,6 @@ ipfc_print(const u_char *p, u_int length, u_int caplen)
|
|||
p += IPFC_HDRLEN;
|
||||
caplen -= IPFC_HDRLEN;
|
||||
|
||||
/* Frame Control field determines interpretation of packet */
|
||||
extracted_ethertype = 0;
|
||||
/* Try to print the LLC-layer header & higher layers */
|
||||
if (llc_print(p, length, caplen, ESRC(&ehdr), EDST(&ehdr),
|
||||
&extracted_ethertype) == 0) {
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
|
||||
#ifndef lint
|
||||
static const char rcsid[] _U_ =
|
||||
"@(#) $Header: /tcpdump/master/tcpdump/print-juniper.c,v 1.8.2.19 2005/08/23 10:29:42 hannes Exp $ (LBL)";
|
||||
"@(#) $Header: /tcpdump/master/tcpdump/print-juniper.c,v 1.8.2.22 2006/05/10 22:42:46 guy Exp $ (LBL)";
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
|
|
@ -670,7 +670,6 @@ u_int
|
|||
juniper_atm2_print(const struct pcap_pkthdr *h, register const u_char *p)
|
||||
{
|
||||
u_int16_t extracted_ethertype;
|
||||
u_int32_t control_word;
|
||||
|
||||
struct juniper_l2info_t l2info;
|
||||
|
||||
|
|
@ -681,12 +680,6 @@ juniper_atm2_print(const struct pcap_pkthdr *h, register const u_char *p)
|
|||
p+=l2info.header_len;
|
||||
|
||||
if (l2info.cookie[7] & ATM2_PKT_TYPE_MASK) { /* OAM cell ? */
|
||||
control_word = EXTRACT_32BITS(p);
|
||||
if(control_word == 0 || control_word == 0x08000000) {
|
||||
l2info.header_len += 4;
|
||||
l2info.length -= 4;
|
||||
p += 4;
|
||||
}
|
||||
oam_print(p,l2info.length,ATM_OAM_NOHEC);
|
||||
return l2info.header_len;
|
||||
}
|
||||
|
|
@ -802,6 +795,9 @@ juniper_parse_header (const u_char *p, const struct pcap_pkthdr *h, struct junip
|
|||
|
||||
struct juniper_cookie_table_t *lp = juniper_cookie_table;
|
||||
u_int idx, offset;
|
||||
#ifdef DLT_JUNIPER_ATM2
|
||||
u_int32_t control_word;
|
||||
#endif
|
||||
|
||||
l2info->header_len = 0;
|
||||
l2info->cookie_len = 0;
|
||||
|
|
@ -974,10 +970,21 @@ juniper_parse_header (const u_char *p, const struct pcap_pkthdr *h, struct junip
|
|||
case DLT_JUNIPER_ATM2:
|
||||
TCHECK2(p[0],4);
|
||||
/* ATM cell relay control word present ? */
|
||||
if (l2info->cookie[7] & ATM2_PKT_TYPE_MASK && *p & 0x08) {
|
||||
l2info->header_len += 4;
|
||||
if (l2info->cookie[7] & ATM2_PKT_TYPE_MASK) {
|
||||
control_word = EXTRACT_32BITS(p);
|
||||
/* some control word heuristics */
|
||||
switch(control_word) {
|
||||
case 0: /* zero control word */
|
||||
case 0x08000000: /* < JUNOS 7.4 control-word */
|
||||
case 0x08380000: /* cntl word plus cell length (56) >= JUNOS 7.4*/
|
||||
l2info->header_len += 4;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
if (eflag)
|
||||
printf("control-word 0x%08x ",EXTRACT_32BITS(p));
|
||||
printf("control-word 0x%08x ", control_word);
|
||||
}
|
||||
break;
|
||||
#endif
|
||||
|
|
@ -985,6 +992,23 @@ juniper_parse_header (const u_char *p, const struct pcap_pkthdr *h, struct junip
|
|||
case DLT_JUNIPER_ATM1:
|
||||
break;
|
||||
#endif
|
||||
#ifdef DLT_JUNIPER_PPP
|
||||
case DLT_JUNIPER_PPP:
|
||||
break;
|
||||
#endif
|
||||
#ifdef DLT_JUNIPER_CHDLC
|
||||
case DLT_JUNIPER_CHDLC:
|
||||
break;
|
||||
#endif
|
||||
#ifdef DLT_JUNIPER_ETHER
|
||||
case DLT_JUNIPER_ETHER:
|
||||
break;
|
||||
#endif
|
||||
#ifdef DLT_JUNIPER_FRELAY
|
||||
case DLT_JUNIPER_FRELAY:
|
||||
break;
|
||||
#endif
|
||||
|
||||
default:
|
||||
printf("Unknown Juniper DLT_ type %u: ", l2info->pictype);
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@
|
|||
|
||||
#ifndef lint
|
||||
static const char rcsid[] _U_ =
|
||||
"@(#) $Header: /tcpdump/master/tcpdump/print-l2tp.c,v 1.17.2.2 2005/04/20 21:50:16 guy Exp $";
|
||||
"@(#) $Header: /tcpdump/master/tcpdump/print-l2tp.c,v 1.17.2.3 2006/06/23 02:07:27 hannes Exp $";
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
|
|
@ -40,14 +40,6 @@ static const char rcsid[] _U_ =
|
|||
|
||||
static char tstr[] = " [|l2tp]";
|
||||
|
||||
#ifndef TRUE
|
||||
#define TRUE 1
|
||||
#endif
|
||||
|
||||
#ifndef FALSE
|
||||
#define FALSE 0
|
||||
#endif
|
||||
|
||||
#define L2TP_MSGTYPE_SCCRQ 1 /* Start-Control-Connection-Request */
|
||||
#define L2TP_MSGTYPE_SCCRP 2 /* Start-Control-Connection-Reply */
|
||||
#define L2TP_MSGTYPE_SCCCN 3 /* Start-Control-Connection-Connected */
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@
|
|||
|
||||
#ifndef lint
|
||||
static const char rcsid[] _U_ =
|
||||
"@(#) $Header: /tcpdump/master/tcpdump/print-lane.c,v 1.23.2.1 2005/07/07 01:24:37 guy Exp $ (LBL)";
|
||||
"@(#) $Header: /tcpdump/master/tcpdump/print-lane.c,v 1.23.2.2 2005/11/13 12:12:59 guy Exp $ (LBL)";
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
|
|
@ -134,7 +134,6 @@ lane_print(const u_char *p, u_int length, u_int caplen)
|
|||
/*
|
||||
* Is it (gag) an 802.3 encapsulation?
|
||||
*/
|
||||
extracted_ethertype = 0;
|
||||
if (ether_type <= ETHERMTU) {
|
||||
/* Try to print the LLC-layer header & higher layers */
|
||||
if (llc_print(p, length, caplen, ep->h_source, ep->h_dest,
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@
|
|||
|
||||
#ifndef lint
|
||||
static const char rcsid[] _U_ =
|
||||
"@(#) $Header: /tcpdump/master/tcpdump/print-ldp.c,v 1.8.2.6 2005/07/11 20:24:34 hannes Exp $";
|
||||
"@(#) $Header: /tcpdump/master/tcpdump/print-ldp.c,v 1.8.2.10 2007/02/26 13:31:33 hannes Exp $";
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
|
|
@ -33,6 +33,7 @@ static const char rcsid[] _U_ =
|
|||
#include "decode_prefix.h"
|
||||
#include "extract.h"
|
||||
#include "addrtoname.h"
|
||||
#include "af.h"
|
||||
|
||||
#include "l2vpn.h"
|
||||
|
||||
|
|
@ -116,7 +117,7 @@ static const struct tok ldp_msg_values[] = {
|
|||
{ LDP_MSG_INIT, "Initialization" },
|
||||
{ LDP_MSG_KEEPALIVE, "Keepalive" },
|
||||
{ LDP_MSG_ADDRESS, "Address" },
|
||||
{ LDP_MSG_ADDRESS_WITHDRAW, "Address Widthdraw" },
|
||||
{ LDP_MSG_ADDRESS_WITHDRAW, "Address Withdraw" },
|
||||
{ LDP_MSG_LABEL_MAPPING, "Label Mapping" },
|
||||
{ LDP_MSG_LABEL_REQUEST, "Label Request" },
|
||||
{ LDP_MSG_LABEL_WITHDRAW, "Label Withdraw" },
|
||||
|
|
@ -214,12 +215,7 @@ static const struct tok ldp_fec_martini_ifparm_vccv_cv_values[] = {
|
|||
{ 0, NULL}
|
||||
};
|
||||
|
||||
/* RFC1700 address family numbers, same definition in print-bgp.c */
|
||||
#define AFNUM_INET 1
|
||||
#define AFNUM_INET6 2
|
||||
|
||||
#define FALSE 0
|
||||
#define TRUE 1
|
||||
#define AFNUM_LEN 2
|
||||
|
||||
int ldp_msg_print(register const u_char *);
|
||||
int ldp_tlv_print(register const u_char *);
|
||||
|
|
@ -296,21 +292,24 @@ ldp_tlv_print(register const u_char *tptr) {
|
|||
|
||||
case LDP_TLV_ADDRESS_LIST:
|
||||
af = EXTRACT_16BITS(tptr);
|
||||
tptr+=2;
|
||||
printf("\n\t Adress Family: ");
|
||||
tptr+=AFNUM_LEN;
|
||||
tlv_tlen -= AFNUM_LEN;
|
||||
printf("\n\t Address Family: ");
|
||||
if (af == AFNUM_INET) {
|
||||
printf("IPv4, addresses:");
|
||||
for (i=0; i<(tlv_tlen-2)/4; i++) {
|
||||
while(tlv_tlen >= sizeof(struct in_addr)) {
|
||||
printf(" %s",ipaddr_string(tptr));
|
||||
tptr+=sizeof(struct in_addr);
|
||||
tlv_tlen-=sizeof(struct in_addr);
|
||||
tptr+=sizeof(struct in_addr);
|
||||
}
|
||||
}
|
||||
#ifdef INET6
|
||||
else if (af == AFNUM_INET6) {
|
||||
printf("IPv6, addresses:");
|
||||
for (i=0; i<(tlv_tlen-2)/16; i++) {
|
||||
while(tlv_tlen >= sizeof(struct in6_addr)) {
|
||||
printf(" %s",ip6addr_string(tptr));
|
||||
tptr+=sizeof(struct in6_addr);
|
||||
tlv_tlen-=sizeof(struct in6_addr);
|
||||
tptr+=sizeof(struct in6_addr);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
|
@ -574,6 +573,8 @@ ldp_msg_print(register const u_char *pptr) {
|
|||
case LDP_MSG_KEEPALIVE:
|
||||
case LDP_MSG_ADDRESS:
|
||||
case LDP_MSG_LABEL_MAPPING:
|
||||
case LDP_MSG_ADDRESS_WITHDRAW:
|
||||
case LDP_MSG_LABEL_WITHDRAW:
|
||||
while(msg_tlen >= 4) {
|
||||
processed = ldp_tlv_print(msg_tptr);
|
||||
if (processed == 0)
|
||||
|
|
@ -588,9 +589,7 @@ ldp_msg_print(register const u_char *pptr) {
|
|||
* you are welcome to contribute code ;-)
|
||||
*/
|
||||
|
||||
case LDP_MSG_ADDRESS_WITHDRAW:
|
||||
case LDP_MSG_LABEL_REQUEST:
|
||||
case LDP_MSG_LABEL_WITHDRAW:
|
||||
case LDP_MSG_LABEL_RELEASE:
|
||||
case LDP_MSG_LABEL_ABORT_REQUEST:
|
||||
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@
|
|||
|
||||
#ifndef lint
|
||||
static const char rcsid[] _U_ =
|
||||
"@(#) $Header: /tcpdump/master/tcpdump/print-lmp.c,v 1.5.2.1 2005/05/19 06:44:03 guy Exp $";
|
||||
"@(#) $Header: /tcpdump/master/tcpdump/print-lmp.c,v 1.5.2.4 2006/06/23 02:07:27 hannes Exp $";
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
|
|
@ -59,7 +59,7 @@ struct lmp_common_header {
|
|||
#define LMP_EXTRACT_VERSION(x) (((x)&0xf0)>>4)
|
||||
|
||||
static const struct tok lmp_header_flag_values[] = {
|
||||
{ 0x00, "Control Channel Down"},
|
||||
{ 0x01, "Control Channel Down"},
|
||||
{ 0x02, "LMP restart"},
|
||||
{ 0, NULL}
|
||||
};
|
||||
|
|
@ -307,9 +307,6 @@ static const struct tok lmp_data_link_subobj[] = {
|
|||
#define LMP_SD_SERVICE_CONFIG_CPSA_LINK_TYPE_SDH 5 /* UNI 1.0 Sec 9.4.2 */
|
||||
#define LMP_SD_SERVICE_CONFIG_CPSA_LINK_TYPE_SONET 6 /* UNI 1.0 Sec 9.4.2 */
|
||||
|
||||
#define FALSE 0
|
||||
#define TRUE 1
|
||||
|
||||
/*
|
||||
* the ctypes are not globally unique so for
|
||||
* translating it to strings we build a table based
|
||||
|
|
@ -599,25 +596,25 @@ lmp_print(register const u_char *pptr, register u_int len) {
|
|||
subobj_len);
|
||||
switch(subobj_type) {
|
||||
case INT_SWITCHING_TYPE_SUBOBJ:
|
||||
printf("\n\t\t Switching Type: %s (%u)",
|
||||
printf("\n\t Switching Type: %s (%u)",
|
||||
tok2str(gmpls_switch_cap_values,
|
||||
"Unknown",
|
||||
EXTRACT_16BITS(obj_tptr+offset+2)>>8),
|
||||
EXTRACT_16BITS(obj_tptr+offset+2)>>8);
|
||||
printf("\n\t\t Encoding Type: %s (%u)",
|
||||
printf("\n\t Encoding Type: %s (%u)",
|
||||
tok2str(gmpls_encoding_values,
|
||||
"Unknown",
|
||||
EXTRACT_16BITS(obj_tptr+offset+2)&0x00FF),
|
||||
EXTRACT_16BITS(obj_tptr+offset+2)&0x00FF);
|
||||
bw.i = EXTRACT_32BITS(obj_tptr+offset+4);
|
||||
printf("\n\t\t Min Reservable Bandwidth: %.3f Mbps",
|
||||
bw.f);
|
||||
printf("\n\t Min Reservable Bandwidth: %.3f Mbps",
|
||||
bw.f*8/1000000);
|
||||
bw.i = EXTRACT_32BITS(obj_tptr+offset+8);
|
||||
printf("\n\t\t Max Reservable Bandwidth: %.3f Mbps",
|
||||
bw.f);
|
||||
printf("\n\t Max Reservable Bandwidth: %.3f Mbps",
|
||||
bw.f*8/1000000);
|
||||
break;
|
||||
case WAVELENGTH_SUBOBJ:
|
||||
printf("\n\t\t Wavelength: %u",
|
||||
printf("\n\t Wavelength: %u",
|
||||
EXTRACT_32BITS(obj_tptr+offset+4));
|
||||
break;
|
||||
default:
|
||||
|
|
@ -656,7 +653,7 @@ lmp_print(register const u_char *pptr, register u_int len) {
|
|||
EXTRACT_16BITS(obj_tptr+10),
|
||||
EXTRACT_16BITS(obj_tptr+10)&8000 ? "(Payload test messages capable)" : "");
|
||||
bw.i = EXTRACT_32BITS(obj_tptr+12);
|
||||
printf("\n\t Transmission Rate: %.3f Mbps",bw.f);
|
||||
printf("\n\t Transmission Rate: %.3f Mbps",bw.f*8/1000000);
|
||||
printf("\n\t Wavelength: %u",
|
||||
EXTRACT_32BITS(obj_tptr+16));
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
|
||||
#ifndef lint
|
||||
static const char rcsid[] _U_ =
|
||||
"@(#) $Header: /tcpdump/master/tcpdump/print-lspping.c,v 1.12.2.3 2005/05/03 08:12:31 hannes Exp $";
|
||||
"@(#) $Header: /tcpdump/master/tcpdump/print-lspping.c,v 1.12.2.6 2006/06/23 02:07:27 hannes Exp $";
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
|
|
@ -79,8 +79,6 @@ struct lspping_common_header {
|
|||
};
|
||||
|
||||
#define LSPPING_VERSION 1
|
||||
#define FALSE 0
|
||||
#define TRUE 1
|
||||
|
||||
static const struct tok lspping_msg_type_values[] = {
|
||||
{ 1, "MPLS Echo Request"},
|
||||
|
|
@ -137,6 +135,8 @@ struct lspping_tlv_header {
|
|||
#define LSPPING_TLV_DOWNSTREAM_MAPPING 2
|
||||
#define LSPPING_TLV_PAD 3
|
||||
#define LSPPING_TLV_ERROR_CODE 4
|
||||
#define LSPPING_TLV_BFD_DISCRIMINATOR 15 /* draft-ietf-bfd-mpls-02 */
|
||||
#define LSPPING_TLV_BFD_DISCRIMINATOR_LEN 4
|
||||
#define LSPPING_TLV_VENDOR_PRIVATE 0xfc00
|
||||
|
||||
static const struct tok lspping_tlv_values[] = {
|
||||
|
|
@ -144,6 +144,7 @@ static const struct tok lspping_tlv_values[] = {
|
|||
{ LSPPING_TLV_DOWNSTREAM_MAPPING, "Downstream Mapping" },
|
||||
{ LSPPING_TLV_PAD, "Pad" },
|
||||
{ LSPPING_TLV_ERROR_CODE, "Error Code" },
|
||||
{ LSPPING_TLV_BFD_DISCRIMINATOR, "BFD Discriminator" },
|
||||
{ LSPPING_TLV_VENDOR_PRIVATE, "Vendor Enterprise Code" },
|
||||
{ 0, NULL}
|
||||
};
|
||||
|
|
@ -832,6 +833,12 @@ lspping_print(register const u_char *pptr, register u_int len) {
|
|||
|
||||
break;
|
||||
|
||||
case LSPPING_TLV_BFD_DISCRIMINATOR:
|
||||
tptr += sizeof(struct lspping_tlv_header);
|
||||
if (!TTEST2(*tptr, LSPPING_TLV_BFD_DISCRIMINATOR_LEN))
|
||||
goto trunc;
|
||||
printf("\n\t BFD Discriminator 0x%08x", EXTRACT_32BITS(tptr));
|
||||
break;
|
||||
/*
|
||||
* FIXME those are the defined TLVs that lack a decoder
|
||||
* you are welcome to contribute code ;-)
|
||||
|
|
|
|||
397
contrib/tcpdump/print-olsr.c
Normal file
397
contrib/tcpdump/print-olsr.c
Normal file
|
|
@ -0,0 +1,397 @@
|
|||
/*
|
||||
* Copyright (c) 1998-2007 The TCPDUMP project
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
* Optimized Link State Protocl (OLSR) as per rfc3626
|
||||
*
|
||||
* Original code by Hannes Gredler <hannes@juniper.net>
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include <tcpdump-stdinc.h>
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "interface.h"
|
||||
#include "addrtoname.h"
|
||||
#include "extract.h"
|
||||
#include "ip.h"
|
||||
|
||||
/*
|
||||
* RFC 3626 common header
|
||||
*
|
||||
* 0 1 2 3
|
||||
* 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
|
||||
* +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
||||
* | Packet Length | Packet Sequence Number |
|
||||
* +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
||||
* | Message Type | Vtime | Message Size |
|
||||
* +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
||||
* | Originator Address |
|
||||
* +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
||||
* | Time To Live | Hop Count | Message Sequence Number |
|
||||
* +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
||||
* | |
|
||||
* : MESSAGE :
|
||||
* | |
|
||||
* +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
||||
* | Message Type | Vtime | Message Size |
|
||||
* +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
||||
* | Originator Address |
|
||||
* +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
||||
* | Time To Live | Hop Count | Message Sequence Number |
|
||||
* +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
||||
* | |
|
||||
* : MESSAGE :
|
||||
* | |
|
||||
* +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
||||
* : :
|
||||
*/
|
||||
|
||||
struct olsr_common {
|
||||
u_int8_t packet_len[2];
|
||||
u_int8_t packet_seq[2];
|
||||
};
|
||||
|
||||
#define OLSR_HELLO_MSG 1 /* rfc3626 */
|
||||
#define OLSR_TC_MSG 2 /* rfc3626 */
|
||||
#define OLSR_MID_MSG 3 /* rfc3626 */
|
||||
#define OLSR_HNA_MSG 4 /* rfc3626 */
|
||||
#define OLSR_POWERINFO_MSG 128
|
||||
#define OLSR_NAMESERVICE_MSG 130
|
||||
#define OLSR_HELLO_LQ_MSG 201 /* LQ extensions olsr.org */
|
||||
#define OLSR_TC_LQ_MSG 202 /* LQ extensions olsr.org */
|
||||
|
||||
static struct tok olsr_msg_values[] = {
|
||||
{ OLSR_HELLO_MSG, "Hello" },
|
||||
{ OLSR_TC_MSG, "TC" },
|
||||
{ OLSR_MID_MSG, "MID" },
|
||||
{ OLSR_HNA_MSG, "HNA" },
|
||||
{ OLSR_POWERINFO_MSG, "Powerinfo" },
|
||||
{ OLSR_NAMESERVICE_MSG, "Nameservice" },
|
||||
{ OLSR_HELLO_LQ_MSG, "Hello-LQ" },
|
||||
{ OLSR_TC_LQ_MSG, "TC-LQ" },
|
||||
{ 0, NULL}
|
||||
};
|
||||
|
||||
struct olsr_msg {
|
||||
u_int8_t msg_type;
|
||||
u_int8_t vtime;
|
||||
u_int8_t msg_len[2];
|
||||
u_int8_t originator[4];
|
||||
u_int8_t ttl;
|
||||
u_int8_t hopcount;
|
||||
u_int8_t msg_seq[2];
|
||||
};
|
||||
|
||||
struct olsr_hello {
|
||||
u_int8_t res[2];
|
||||
u_int8_t htime;
|
||||
u_int8_t will;
|
||||
};
|
||||
|
||||
struct olsr_hello_link {
|
||||
u_int8_t link_code;
|
||||
u_int8_t res;
|
||||
u_int8_t len[2];
|
||||
};
|
||||
|
||||
struct olsr_tc {
|
||||
u_int8_t ans_seq[2];
|
||||
u_int8_t res[2];
|
||||
};
|
||||
|
||||
struct olsr_hna {
|
||||
u_int8_t network[4];
|
||||
u_int8_t mask[4];
|
||||
};
|
||||
|
||||
|
||||
#define OLSR_EXTRACT_LINK_TYPE(link_code) (link_code & 0x3)
|
||||
#define OLSR_EXTRACT_NEIGHBOR_TYPE(link_code) (link_code >> 2)
|
||||
|
||||
static struct tok olsr_link_type_values[] = {
|
||||
{ 0, "Unspecified" },
|
||||
{ 1, "Asymmetric" },
|
||||
{ 2, "Symmetric" },
|
||||
{ 3, "Lost" },
|
||||
{ 0, NULL}
|
||||
};
|
||||
|
||||
static struct tok olsr_neighbor_type_values[] = {
|
||||
{ 0, "Not-Neighbor" },
|
||||
{ 1, "Symmetric" },
|
||||
{ 2, "Symmetric-MPR" },
|
||||
{ 0, NULL}
|
||||
};
|
||||
|
||||
struct olsr_lq_neighbor {
|
||||
u_int8_t neighbor[4];
|
||||
u_int8_t link_quality;
|
||||
u_int8_t neighbor_link_quality;
|
||||
u_int8_t res[2];
|
||||
};
|
||||
|
||||
/*
|
||||
* macro to convert the 8-bit mantissa/exponent to a double float
|
||||
* taken from olsr.org.
|
||||
*/
|
||||
#define VTIME_SCALE_FACTOR 0.0625
|
||||
#define ME_TO_DOUBLE(me) \
|
||||
(double)(VTIME_SCALE_FACTOR*(1+(double)(me>>4)/16)*(double)(1<<(me&0x0F)))
|
||||
|
||||
/*
|
||||
* print a neighbor list with LQ extensions.
|
||||
*/
|
||||
static void
|
||||
olsr_print_lq_neighbor (const u_char *msg_data, u_int hello_len)
|
||||
{
|
||||
struct olsr_lq_neighbor *lq_neighbor;
|
||||
|
||||
while (hello_len >= sizeof(struct olsr_lq_neighbor)) {
|
||||
|
||||
lq_neighbor = (struct olsr_lq_neighbor *)msg_data;
|
||||
|
||||
printf("\n\t neighbor %s, link-quality %.2lf%%"
|
||||
", neighbor-link-quality %.2lf%%",
|
||||
ipaddr_string(lq_neighbor->neighbor),
|
||||
((double)lq_neighbor->link_quality/2.55),
|
||||
((double)lq_neighbor->neighbor_link_quality/2.55));
|
||||
|
||||
msg_data += sizeof(struct olsr_lq_neighbor);
|
||||
hello_len -= sizeof(struct olsr_lq_neighbor);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* print a neighbor list.
|
||||
*/
|
||||
static void
|
||||
olsr_print_neighbor (const u_char *msg_data, u_int hello_len)
|
||||
{
|
||||
int neighbor;
|
||||
|
||||
printf("\n\t neighbor\n\t\t");
|
||||
neighbor = 1;
|
||||
|
||||
while (hello_len >= sizeof(struct in_addr)) {
|
||||
|
||||
/* print 4 neighbors per line */
|
||||
|
||||
printf("%s%s", ipaddr_string(msg_data),
|
||||
neighbor % 4 == 0 ? "\n\t\t" : " ");
|
||||
|
||||
msg_data += sizeof(struct in_addr);
|
||||
hello_len -= sizeof(struct in_addr);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
olsr_print (const u_char *pptr, u_int length)
|
||||
{
|
||||
union {
|
||||
const struct olsr_common *common;
|
||||
const struct olsr_msg *msg;
|
||||
const struct olsr_hello *hello;
|
||||
const struct olsr_hello_link *hello_link;
|
||||
const struct olsr_lq_neighbor *lq_neighbor;
|
||||
const struct olsr_tc *tc;
|
||||
const struct olsr_hna *hna;
|
||||
} ptr;
|
||||
|
||||
u_int msg_type, msg_len, msg_tlen, hello_len, prefix;
|
||||
u_int8_t link_type, neighbor_type;
|
||||
const u_char *tptr, *msg_data;
|
||||
|
||||
tptr = pptr;
|
||||
|
||||
if (length < sizeof(struct olsr_common)) {
|
||||
goto trunc;
|
||||
}
|
||||
|
||||
if (!TTEST2(*tptr, sizeof(struct olsr_common))) {
|
||||
goto trunc;
|
||||
}
|
||||
|
||||
ptr.common = (struct olsr_common *)tptr;
|
||||
length = MIN(length, EXTRACT_16BITS(ptr.common->packet_len));
|
||||
|
||||
printf("OLSR, seq 0x%04x, length %u",
|
||||
EXTRACT_16BITS(ptr.common->packet_seq),
|
||||
length);
|
||||
|
||||
tptr += sizeof(struct olsr_common);
|
||||
|
||||
/*
|
||||
* In non-verbose mode, just print version.
|
||||
*/
|
||||
if (vflag < 1) {
|
||||
return;
|
||||
}
|
||||
|
||||
while (tptr < (pptr+length)) {
|
||||
|
||||
if (!TTEST2(*tptr, sizeof(struct olsr_msg)))
|
||||
goto trunc;
|
||||
|
||||
ptr.msg = (struct olsr_msg *)tptr;
|
||||
|
||||
msg_type = ptr.msg->msg_type;
|
||||
msg_len = EXTRACT_16BITS(ptr.msg->msg_len);
|
||||
|
||||
/* infinite loop check */
|
||||
if (msg_type == 0 || msg_len == 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
printf("\n\t%s Message (%u), originator %s, ttl %u, hop %u"
|
||||
"\n\t vtime %.3lfs, msg-seq 0x%04x, length %u",
|
||||
tok2str(olsr_msg_values, "Unknown", msg_type),
|
||||
msg_type, ipaddr_string(ptr.msg->originator),
|
||||
ptr.msg->ttl,
|
||||
ptr.msg->hopcount,
|
||||
ME_TO_DOUBLE(ptr.msg->vtime),
|
||||
EXTRACT_16BITS(ptr.msg->msg_seq),
|
||||
msg_len);
|
||||
|
||||
msg_tlen = msg_len - sizeof(struct olsr_msg);
|
||||
msg_data = tptr + sizeof(struct olsr_msg);
|
||||
|
||||
switch (msg_type) {
|
||||
case OLSR_HELLO_MSG:
|
||||
case OLSR_HELLO_LQ_MSG:
|
||||
if (!TTEST2(*msg_data, sizeof(struct olsr_hello)))
|
||||
goto trunc;
|
||||
|
||||
ptr.hello = (struct olsr_hello *)msg_data;
|
||||
printf("\n\t hello-time %.3lfs, MPR willingness %u",
|
||||
ME_TO_DOUBLE(ptr.hello->htime), ptr.hello->will);
|
||||
msg_data += sizeof(struct olsr_hello);
|
||||
msg_tlen -= sizeof(struct olsr_hello);
|
||||
|
||||
while (msg_tlen >= sizeof(struct olsr_hello_link)) {
|
||||
|
||||
/*
|
||||
* link-type.
|
||||
*/
|
||||
if (!TTEST2(*msg_data, sizeof(struct olsr_hello_link)))
|
||||
goto trunc;
|
||||
|
||||
ptr.hello_link = (struct olsr_hello_link *)msg_data;
|
||||
|
||||
hello_len = EXTRACT_16BITS(ptr.hello_link->len);
|
||||
link_type = OLSR_EXTRACT_LINK_TYPE(ptr.hello_link->link_code);
|
||||
neighbor_type = OLSR_EXTRACT_NEIGHBOR_TYPE(ptr.hello_link->link_code);
|
||||
|
||||
printf("\n\t link-type %s, neighbor-type %s, len %u",
|
||||
tok2str(olsr_link_type_values, "Unknown", link_type),
|
||||
tok2str(olsr_neighbor_type_values, "Unknown", neighbor_type),
|
||||
hello_len);
|
||||
|
||||
msg_data += sizeof(struct olsr_hello_link);
|
||||
msg_tlen -= sizeof(struct olsr_hello_link);
|
||||
hello_len -= sizeof(struct olsr_hello_link);
|
||||
|
||||
if (msg_type == OLSR_HELLO_MSG) {
|
||||
olsr_print_neighbor(msg_data, hello_len);
|
||||
} else {
|
||||
olsr_print_lq_neighbor(msg_data, hello_len);
|
||||
}
|
||||
|
||||
msg_data += hello_len;
|
||||
msg_tlen -= hello_len;
|
||||
}
|
||||
break;
|
||||
|
||||
case OLSR_TC_MSG:
|
||||
case OLSR_TC_LQ_MSG:
|
||||
if (!TTEST2(*msg_data, sizeof(struct olsr_tc)))
|
||||
goto trunc;
|
||||
|
||||
ptr.tc = (struct olsr_tc *)msg_data;
|
||||
printf("\n\t advertised neighbor seq 0x%04x",
|
||||
EXTRACT_16BITS(ptr.tc->ans_seq));
|
||||
msg_data += sizeof(struct olsr_tc);
|
||||
msg_tlen -= sizeof(struct olsr_tc);
|
||||
|
||||
if (msg_type == OLSR_TC_MSG) {
|
||||
olsr_print_neighbor(msg_data, msg_tlen);
|
||||
} else {
|
||||
olsr_print_lq_neighbor(msg_data, msg_tlen);
|
||||
}
|
||||
break;
|
||||
|
||||
case OLSR_MID_MSG:
|
||||
if (!TTEST2(*msg_data, sizeof(struct in_addr)))
|
||||
goto trunc;
|
||||
|
||||
while (msg_tlen >= sizeof(struct in_addr)) {
|
||||
printf("\n\t interface address %s", ipaddr_string(msg_data));
|
||||
msg_data += sizeof(struct in_addr);
|
||||
msg_tlen -= sizeof(struct in_addr);
|
||||
}
|
||||
break;
|
||||
|
||||
case OLSR_HNA_MSG:
|
||||
prefix = 1;
|
||||
printf("\n\t advertised networks\n\t ");
|
||||
while (msg_tlen >= sizeof(struct olsr_hna)) {
|
||||
if (!TTEST2(*msg_data, sizeof(struct olsr_hna)))
|
||||
goto trunc;
|
||||
|
||||
ptr.hna = (struct olsr_hna *)msg_data;
|
||||
|
||||
/* print 4 prefixes per line */
|
||||
|
||||
printf("%s/%u%s",
|
||||
ipaddr_string(ptr.hna->network),
|
||||
mask2plen(EXTRACT_32BITS(ptr.hna->mask)),
|
||||
prefix % 4 == 0 ? "\n\t " : " ");
|
||||
|
||||
msg_data += sizeof(struct olsr_hna);
|
||||
msg_tlen -= sizeof(struct olsr_hna);
|
||||
prefix ++;
|
||||
}
|
||||
break;
|
||||
|
||||
/*
|
||||
* FIXME those are the defined messages that lack a decoder
|
||||
* you are welcome to contribute code ;-)
|
||||
*/
|
||||
|
||||
case OLSR_POWERINFO_MSG:
|
||||
case OLSR_NAMESERVICE_MSG:
|
||||
default:
|
||||
print_unknown_data(msg_data, "\n\t ", msg_tlen);
|
||||
break;
|
||||
}
|
||||
tptr += msg_len;
|
||||
}
|
||||
|
||||
return;
|
||||
|
||||
trunc:
|
||||
printf("[|olsr]");
|
||||
}
|
||||
|
||||
/*
|
||||
* Local Variables:
|
||||
* c-style: whitesmith
|
||||
* c-basic-offset: 4
|
||||
* End:
|
||||
*/
|
||||
|
|
@ -23,7 +23,7 @@
|
|||
|
||||
#ifndef lint
|
||||
static const char rcsid[] _U_ =
|
||||
"@(#) $Header: /tcpdump/master/tcpdump/print-ospf.c,v 1.56.2.3 2005/08/23 11:16:29 hannes Exp $ (LBL)";
|
||||
"@(#) $Header: /tcpdump/master/tcpdump/print-ospf.c,v 1.56.2.4 2006/12/13 08:24:27 hannes Exp $ (LBL)";
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
|
|
@ -57,7 +57,7 @@ static struct tok ospf_option_values[] = {
|
|||
|
||||
static struct tok ospf_authtype_values[] = {
|
||||
{ OSPF_AUTH_NONE, "none" },
|
||||
{ OSPF_AUTH_NONE, "simple" },
|
||||
{ OSPF_AUTH_SIMPLE, "simple" },
|
||||
{ OSPF_AUTH_MD5, "MD5" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
|
|
@ -932,12 +932,8 @@ ospf_print(register const u_char *bp, register u_int length,
|
|||
break;
|
||||
|
||||
case OSPF_AUTH_SIMPLE:
|
||||
if (fn_printn(op->ospf_authdata,
|
||||
sizeof(op->ospf_authdata), snapend)) {
|
||||
printf("\"");
|
||||
goto trunc;
|
||||
}
|
||||
printf("\"");
|
||||
printf("\n\tSimple text password: ");
|
||||
safeputs(op->ospf_authdata, OSPF_AUTH_SIMPLE_LEN);
|
||||
break;
|
||||
|
||||
case OSPF_AUTH_MD5:
|
||||
|
|
|
|||
|
|
@ -21,13 +21,27 @@
|
|||
|
||||
#ifndef lint
|
||||
static const char rcsid[] _U_ =
|
||||
"@(#) $Header: /tcpdump/master/tcpdump/print-pflog.c,v 1.13.2.1 2005/07/07 01:24:38 guy Exp $ (LBL)";
|
||||
"@(#) $Header: /tcpdump/master/tcpdump/print-pflog.c,v 1.13.2.4 2007/09/13 17:18:10 gianluca Exp $ (LBL)";
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_NET_PFVAR_H
|
||||
#error "No pf headers available"
|
||||
#endif
|
||||
|
||||
#include <sys/types.h>
|
||||
#ifndef WIN32
|
||||
#include <sys/socket.h>
|
||||
#endif
|
||||
#include <net/if.h>
|
||||
#include <net/pfvar.h>
|
||||
#include <net/if_pflog.h>
|
||||
|
||||
|
||||
|
||||
#include <tcpdump-stdinc.h>
|
||||
|
||||
#include <stdio.h>
|
||||
|
|
@ -35,7 +49,6 @@ static const char rcsid[] _U_ =
|
|||
|
||||
#include "interface.h"
|
||||
#include "addrtoname.h"
|
||||
#include "pf.h"
|
||||
|
||||
static struct tok pf_reasons[] = {
|
||||
{ 0, "0(match)" },
|
||||
|
|
@ -44,6 +57,15 @@ static struct tok pf_reasons[] = {
|
|||
{ 3, "3(short)" },
|
||||
{ 4, "4(normalize)" },
|
||||
{ 5, "5(memory)" },
|
||||
{ 6, "6(bad-timestamp)" },
|
||||
{ 7, "7(congestion)" },
|
||||
{ 8, "8(ip-option)" },
|
||||
{ 9, "9(proto-cksum)" },
|
||||
{ 10, "10(state-mismatch)" },
|
||||
{ 11, "11(state-insert)" },
|
||||
{ 12, "12(state-limit)" },
|
||||
{ 13, "13(src-limit)" },
|
||||
{ 14, "14(synproxy)" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@
|
|||
|
||||
#ifndef lint
|
||||
static const char rcsid[] _U_ =
|
||||
"@(#) $Header: /tcpdump/master/tcpdump/print-pptp.c,v 1.11 2003/11/16 09:36:33 guy Exp $";
|
||||
"@(#) $Header: /tcpdump/master/tcpdump/print-pptp.c,v 1.11.2.1 2006/06/23 02:07:27 hannes Exp $";
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
|
|
@ -40,14 +40,6 @@ static const char rcsid[] _U_ =
|
|||
|
||||
static char tstr[] = " [|pptp]";
|
||||
|
||||
#ifndef TRUE
|
||||
#define TRUE 1
|
||||
#endif
|
||||
|
||||
#ifndef FALSE
|
||||
#define FALSE 0
|
||||
#endif
|
||||
|
||||
#define PPTP_MSG_TYPE_CTRL 1 /* Control Message */
|
||||
#define PPTP_MSG_TYPE_MGMT 2 /* Management Message (currently not used */
|
||||
#define PPTP_MAGIC_COOKIE 0x1a2b3c4d /* for sanity check */
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1998-2005 The TCPDUMP project
|
||||
* Copyright (c) 1998-2007 The TCPDUMP project
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that: (1) source code
|
||||
|
|
@ -17,7 +17,7 @@
|
|||
|
||||
#ifndef lint
|
||||
static const char rcsid[] _U_ =
|
||||
"@(#) $Header: /tcpdump/master/tcpdump/print-rsvp.c,v 1.33.2.8 2005/09/22 14:52:40 hannes Exp $";
|
||||
"@(#) $Header: /tcpdump/master/tcpdump/print-rsvp.c,v 1.33.2.15 2007/09/13 17:33:54 guy Exp $";
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
|
|
@ -35,6 +35,7 @@ static const char rcsid[] _U_ =
|
|||
#include "addrtoname.h"
|
||||
#include "ethertype.h"
|
||||
#include "gmpls.h"
|
||||
#include "af.h"
|
||||
|
||||
/*
|
||||
* RFC 2205 common header
|
||||
|
|
@ -134,9 +135,9 @@ static const struct tok rsvp_header_flag_values[] = {
|
|||
#define RSVP_OBJ_ERO 20 /* rfc3209 */
|
||||
#define RSVP_OBJ_RRO 21 /* rfc3209 */
|
||||
#define RSVP_OBJ_HELLO 22 /* rfc3209 */
|
||||
#define RSVP_OBJ_MESSAGE_ID 23
|
||||
#define RSVP_OBJ_MESSAGE_ID_ACK 24
|
||||
#define RSVP_OBJ_MESSAGE_ID_LIST 25
|
||||
#define RSVP_OBJ_MESSAGE_ID 23 /* rfc2961 */
|
||||
#define RSVP_OBJ_MESSAGE_ID_ACK 24 /* rfc2961 */
|
||||
#define RSVP_OBJ_MESSAGE_ID_LIST 25 /* rfc2961 */
|
||||
#define RSVP_OBJ_RECOVERY_LABEL 34 /* rfc3473 */
|
||||
#define RSVP_OBJ_UPSTREAM_LABEL 35 /* rfc3473 */
|
||||
#define RSVP_OBJ_LABEL_SET 36 /* rfc3473 */
|
||||
|
|
@ -152,6 +153,7 @@ static const struct tok rsvp_header_flag_values[] = {
|
|||
#define RSVP_OBJ_PROPERTIES 204 /* juniper proprietary */
|
||||
#define RSVP_OBJ_FASTREROUTE 205 /* draft-ietf-mpls-rsvp-lsp-fastreroute-07 */
|
||||
#define RSVP_OBJ_SESSION_ATTRIBUTE 207 /* rfc3209 */
|
||||
#define RSVP_OBJ_GENERALIZED_UNI 229 /* OIF RSVP extensions UNI 1.0 Signaling, Rel. 2 */
|
||||
#define RSVP_OBJ_CALL_ID 230 /* rfc3474 */
|
||||
#define RSVP_OBJ_CALL_OPS 236 /* rfc3474 */
|
||||
|
||||
|
|
@ -189,6 +191,7 @@ static const struct tok rsvp_obj_values[] = {
|
|||
{ RSVP_OBJ_PROPERTIES, "Properties" },
|
||||
{ RSVP_OBJ_FASTREROUTE, "Fast Re-Route" },
|
||||
{ RSVP_OBJ_SESSION_ATTRIBUTE, "Session Attribute" },
|
||||
{ RSVP_OBJ_GENERALIZED_UNI, "Generalized UNI" },
|
||||
{ RSVP_OBJ_CALL_ID, "Call-ID" },
|
||||
{ RSVP_OBJ_CALL_OPS, "Call Capability" },
|
||||
{ RSVP_OBJ_RESTART_CAPABILITY, "Restart Capability" },
|
||||
|
|
@ -202,6 +205,7 @@ static const struct tok rsvp_obj_values[] = {
|
|||
#define RSVP_CTYPE_IPV6 2
|
||||
#define RSVP_CTYPE_TUNNEL_IPV4 7
|
||||
#define RSVP_CTYPE_TUNNEL_IPV6 8
|
||||
#define RSVP_CTYPE_UNI_IPV4 11 /* OIF RSVP extensions UNI 1.0 Signaling Rel. 2 */
|
||||
#define RSVP_CTYPE_1 1
|
||||
#define RSVP_CTYPE_2 2
|
||||
#define RSVP_CTYPE_3 3
|
||||
|
|
@ -234,11 +238,13 @@ static const struct tok rsvp_ctype_values[] = {
|
|||
{ 256*RSVP_OBJ_SESSION+RSVP_CTYPE_IPV4, "IPv4" },
|
||||
{ 256*RSVP_OBJ_SESSION+RSVP_CTYPE_IPV6, "IPv6" },
|
||||
{ 256*RSVP_OBJ_SESSION+RSVP_CTYPE_TUNNEL_IPV4, "Tunnel IPv4" },
|
||||
{ 256*RSVP_OBJ_SESSION+RSVP_CTYPE_UNI_IPV4, "UNI IPv4" },
|
||||
{ 256*RSVP_OBJ_SENDER_TEMPLATE+RSVP_CTYPE_IPV4, "IPv4" },
|
||||
{ 256*RSVP_OBJ_SENDER_TEMPLATE+RSVP_CTYPE_IPV6, "IPv6" },
|
||||
{ 256*RSVP_OBJ_SENDER_TEMPLATE+RSVP_CTYPE_TUNNEL_IPV4, "Tunnel IPv4" },
|
||||
{ 256*RSVP_OBJ_MESSAGE_ID+RSVP_CTYPE_1, "1" },
|
||||
{ 256*RSVP_OBJ_MESSAGE_ID_ACK+RSVP_CTYPE_1, "1" },
|
||||
{ 256*RSVP_OBJ_MESSAGE_ID_ACK+RSVP_CTYPE_1, "Message id ack" },
|
||||
{ 256*RSVP_OBJ_MESSAGE_ID_ACK+RSVP_CTYPE_2, "Message id nack" },
|
||||
{ 256*RSVP_OBJ_MESSAGE_ID_LIST+RSVP_CTYPE_1, "1" },
|
||||
{ 256*RSVP_OBJ_STYLE+RSVP_CTYPE_1, "1" },
|
||||
{ 256*RSVP_OBJ_HELLO+RSVP_CTYPE_1, "Hello Request" },
|
||||
|
|
@ -271,8 +277,11 @@ static const struct tok rsvp_ctype_values[] = {
|
|||
{ 256*RSVP_OBJ_FASTREROUTE+RSVP_CTYPE_1, "1" }, /* new style */
|
||||
{ 256*RSVP_OBJ_DETOUR+RSVP_CTYPE_TUNNEL_IPV4, "Tunnel IPv4" },
|
||||
{ 256*RSVP_OBJ_PROPERTIES+RSVP_CTYPE_1, "1" },
|
||||
{ 256*RSVP_OBJ_ADMIN_STATUS+RSVP_CTYPE_1, "1" },
|
||||
{ 256*RSVP_OBJ_CLASSTYPE+RSVP_CTYPE_1, "1" },
|
||||
{ 256*RSVP_OBJ_CLASSTYPE_OLD+RSVP_CTYPE_1, "1" },
|
||||
{ 256*RSVP_OBJ_LABEL_SET+RSVP_CTYPE_1, "1" },
|
||||
{ 256*RSVP_OBJ_GENERALIZED_UNI+RSVP_CTYPE_1, "1" },
|
||||
{ 0, NULL}
|
||||
};
|
||||
|
||||
|
|
@ -416,9 +425,44 @@ static struct tok rsvp_obj_error_code_diffserv_te_values[] = {
|
|||
{ 0, NULL}
|
||||
};
|
||||
|
||||
#define FALSE 0
|
||||
#define TRUE 1
|
||||
/* rfc3473 / rfc 3471 */
|
||||
static const struct tok rsvp_obj_admin_status_flag_values[] = {
|
||||
{ 0x80000000, "Reflect" },
|
||||
{ 0x00000004, "Testing" },
|
||||
{ 0x00000002, "Admin-down" },
|
||||
{ 0x00000001, "Delete-in-progress" },
|
||||
{ 0, NULL}
|
||||
};
|
||||
|
||||
/* label set actions - rfc3471 */
|
||||
#define LABEL_SET_INCLUSIVE_LIST 0
|
||||
#define LABEL_SET_EXCLUSIVE_LIST 1
|
||||
#define LABEL_SET_INCLUSIVE_RANGE 2
|
||||
#define LABEL_SET_EXCLUSIVE_RANGE 3
|
||||
|
||||
static const struct tok rsvp_obj_label_set_action_values[] = {
|
||||
{ LABEL_SET_INCLUSIVE_LIST, "Inclusive list" },
|
||||
{ LABEL_SET_EXCLUSIVE_LIST, "Exclusive list" },
|
||||
{ LABEL_SET_INCLUSIVE_RANGE, "Inclusive range" },
|
||||
{ LABEL_SET_EXCLUSIVE_RANGE, "Exclusive range" },
|
||||
{ 0, NULL}
|
||||
};
|
||||
|
||||
/* OIF RSVP extensions UNI 1.0 Signaling, release 2 */
|
||||
#define RSVP_GEN_UNI_SUBOBJ_SOURCE_TNA_ADDRESS 1
|
||||
#define RSVP_GEN_UNI_SUBOBJ_DESTINATION_TNA_ADDRESS 2
|
||||
#define RSVP_GEN_UNI_SUBOBJ_DIVERSITY 3
|
||||
#define RSVP_GEN_UNI_SUBOBJ_EGRESS_LABEL 4
|
||||
#define RSVP_GEN_UNI_SUBOBJ_SERVICE_LEVEL 5
|
||||
|
||||
static const struct tok rsvp_obj_generalized_uni_values[] = {
|
||||
{ RSVP_GEN_UNI_SUBOBJ_SOURCE_TNA_ADDRESS, "Source TNA address" },
|
||||
{ RSVP_GEN_UNI_SUBOBJ_DESTINATION_TNA_ADDRESS, "Destination TNA address" },
|
||||
{ RSVP_GEN_UNI_SUBOBJ_DIVERSITY, "Diversity" },
|
||||
{ RSVP_GEN_UNI_SUBOBJ_EGRESS_LABEL, "Egress label" },
|
||||
{ RSVP_GEN_UNI_SUBOBJ_SERVICE_LEVEL, "Service level" },
|
||||
{ 0, NULL}
|
||||
};
|
||||
|
||||
static int rsvp_intserv_print(const u_char *, u_short);
|
||||
|
||||
|
|
@ -587,6 +631,8 @@ rsvp_obj_print (const u_char *tptr, const char *ident, u_int tlen) {
|
|||
} bw;
|
||||
u_int8_t namelen;
|
||||
|
||||
u_int action, subchannel;
|
||||
|
||||
while(tlen>=sizeof(struct rsvp_object_header)) {
|
||||
/* did we capture enough for fully decoding the object header ? */
|
||||
if (!TTEST2(*tptr, sizeof(struct rsvp_object_header)))
|
||||
|
|
@ -684,6 +730,7 @@ rsvp_obj_print (const u_char *tptr, const char *ident, u_int tlen) {
|
|||
break;
|
||||
#endif
|
||||
case RSVP_CTYPE_TUNNEL_IPV4:
|
||||
case RSVP_CTYPE_UNI_IPV4:
|
||||
if (obj_tlen < 12)
|
||||
return -1;
|
||||
printf("%s IPv4 Tunnel EndPoint: %s, Tunnel ID: 0x%04x, Extended Tunnel ID: %s",
|
||||
|
|
@ -900,7 +947,7 @@ rsvp_obj_print (const u_char *tptr, const char *ident, u_int tlen) {
|
|||
obj_tptr+=12;
|
||||
break;
|
||||
case RSVP_CTYPE_4:
|
||||
if (obj_tlen < 8)
|
||||
if (obj_tlen < 4)
|
||||
return-1;
|
||||
printf("%s LSP Encoding Type: %s (%u)",
|
||||
ident,
|
||||
|
|
@ -918,8 +965,8 @@ rsvp_obj_print (const u_char *tptr, const char *ident, u_int tlen) {
|
|||
"Unknown",
|
||||
EXTRACT_16BITS(obj_tptr+2)),
|
||||
EXTRACT_16BITS(obj_tptr+2));
|
||||
obj_tlen-=8;
|
||||
obj_tptr+=8;
|
||||
obj_tlen-=4;
|
||||
obj_tptr+=4;
|
||||
break;
|
||||
default:
|
||||
hexdump=TRUE;
|
||||
|
|
@ -1024,6 +1071,106 @@ rsvp_obj_print (const u_char *tptr, const char *ident, u_int tlen) {
|
|||
}
|
||||
break;
|
||||
|
||||
case RSVP_OBJ_GENERALIZED_UNI:
|
||||
switch(rsvp_obj_ctype) {
|
||||
int subobj_type,af,subobj_len,total_subobj_len;
|
||||
|
||||
case RSVP_CTYPE_1:
|
||||
|
||||
if (obj_tlen < 4)
|
||||
return-1;
|
||||
|
||||
/* read variable length subobjects */
|
||||
total_subobj_len = obj_tlen;
|
||||
while(total_subobj_len > 0) {
|
||||
subobj_len = EXTRACT_16BITS(obj_tptr);
|
||||
subobj_type = (EXTRACT_16BITS(obj_tptr+2))>>8;
|
||||
af = (EXTRACT_16BITS(obj_tptr+2))&0x00FF;
|
||||
|
||||
printf("%s Subobject Type: %s (%u), AF: %s (%u), length: %u",
|
||||
ident,
|
||||
tok2str(rsvp_obj_generalized_uni_values, "Unknown", subobj_type),
|
||||
subobj_type,
|
||||
tok2str(af_values, "Unknown", af), af,
|
||||
subobj_len);
|
||||
|
||||
switch(subobj_type) {
|
||||
case RSVP_GEN_UNI_SUBOBJ_SOURCE_TNA_ADDRESS:
|
||||
case RSVP_GEN_UNI_SUBOBJ_DESTINATION_TNA_ADDRESS:
|
||||
|
||||
switch(af) {
|
||||
case AFNUM_INET:
|
||||
if (subobj_len < 8)
|
||||
return -1;
|
||||
printf("%s UNI IPv4 TNA address: %s",
|
||||
ident, ipaddr_string(obj_tptr+4));
|
||||
break;
|
||||
#ifdef INET6
|
||||
case AFNUM_INET6:
|
||||
if (subobj_len < 20)
|
||||
return -1;
|
||||
printf("%s UNI IPv6 TNA address: %s",
|
||||
ident, ip6addr_string(obj_tptr+4));
|
||||
break;
|
||||
#endif
|
||||
case AFNUM_NSAP:
|
||||
if (subobj_len) {
|
||||
/* unless we have a TLV parser lets just hexdump */
|
||||
hexdump=TRUE;
|
||||
}
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
||||
case RSVP_GEN_UNI_SUBOBJ_DIVERSITY:
|
||||
if (subobj_len) {
|
||||
/* unless we have a TLV parser lets just hexdump */
|
||||
hexdump=TRUE;
|
||||
}
|
||||
break;
|
||||
|
||||
case RSVP_GEN_UNI_SUBOBJ_EGRESS_LABEL:
|
||||
if (subobj_len < 16) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
printf("%s U-bit: %x, Label type: %u, Logical port id: %u, Label: %u",
|
||||
ident,
|
||||
((EXTRACT_32BITS(obj_tptr+4))>>31),
|
||||
((EXTRACT_32BITS(obj_tptr+4))&0xFF),
|
||||
EXTRACT_32BITS(obj_tptr+8),
|
||||
EXTRACT_32BITS(obj_tptr+12));
|
||||
break;
|
||||
|
||||
case RSVP_GEN_UNI_SUBOBJ_SERVICE_LEVEL:
|
||||
if (subobj_len < 8) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
printf("%s Service level: %u",
|
||||
ident, (EXTRACT_32BITS(obj_tptr+4))>>24);
|
||||
break;
|
||||
|
||||
default:
|
||||
hexdump=TRUE;
|
||||
break;
|
||||
}
|
||||
total_subobj_len-=subobj_len;
|
||||
obj_tptr+=subobj_len;
|
||||
obj_tlen+=subobj_len;
|
||||
}
|
||||
|
||||
if (total_subobj_len) {
|
||||
/* unless we have a TLV parser lets just hexdump */
|
||||
hexdump=TRUE;
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
hexdump=TRUE;
|
||||
}
|
||||
break;
|
||||
|
||||
case RSVP_OBJ_RSVP_HOP:
|
||||
switch(rsvp_obj_ctype) {
|
||||
case RSVP_CTYPE_3: /* fall through - FIXME add TLV parser */
|
||||
|
|
@ -1358,6 +1505,7 @@ rsvp_obj_print (const u_char *tptr, const char *ident, u_int tlen) {
|
|||
case RSVP_OBJ_MESSAGE_ID_LIST:
|
||||
switch(rsvp_obj_ctype) {
|
||||
case RSVP_CTYPE_1:
|
||||
case RSVP_CTYPE_2:
|
||||
if (obj_tlen < 8)
|
||||
return-1;
|
||||
printf("%s Flags [0x%02x], epoch: %u",
|
||||
|
|
@ -1410,6 +1558,66 @@ rsvp_obj_print (const u_char *tptr, const char *ident, u_int tlen) {
|
|||
}
|
||||
break;
|
||||
|
||||
case RSVP_OBJ_ADMIN_STATUS:
|
||||
switch(rsvp_obj_ctype) {
|
||||
case RSVP_CTYPE_1:
|
||||
if (obj_tlen < 4)
|
||||
return-1;
|
||||
printf("%s Flags [%s]", ident,
|
||||
bittok2str(rsvp_obj_admin_status_flag_values, "none",
|
||||
EXTRACT_32BITS(obj_tptr)));
|
||||
obj_tlen-=4;
|
||||
obj_tptr+=4;
|
||||
break;
|
||||
default:
|
||||
hexdump=TRUE;
|
||||
}
|
||||
break;
|
||||
|
||||
case RSVP_OBJ_LABEL_SET:
|
||||
switch(rsvp_obj_ctype) {
|
||||
case RSVP_CTYPE_1:
|
||||
if (obj_tlen < 4)
|
||||
return-1;
|
||||
action = (EXTRACT_16BITS(obj_tptr)>>8);
|
||||
|
||||
printf("%s Action: %s (%u), Label type: %u", ident,
|
||||
tok2str(rsvp_obj_label_set_action_values, "Unknown", action),
|
||||
action, ((EXTRACT_32BITS(obj_tptr) & 0x7F)));
|
||||
|
||||
switch (action) {
|
||||
case LABEL_SET_INCLUSIVE_RANGE:
|
||||
case LABEL_SET_EXCLUSIVE_RANGE: /* fall through */
|
||||
|
||||
/* only a couple of subchannels are expected */
|
||||
if (obj_tlen < 12)
|
||||
return -1;
|
||||
printf("%s Start range: %u, End range: %u", ident,
|
||||
EXTRACT_32BITS(obj_tptr+4),
|
||||
EXTRACT_32BITS(obj_tptr+8));
|
||||
obj_tlen-=12;
|
||||
obj_tptr+=12;
|
||||
break;
|
||||
|
||||
default:
|
||||
obj_tlen-=4;
|
||||
obj_tptr+=4;
|
||||
subchannel = 1;
|
||||
while(obj_tlen >= 4 ) {
|
||||
printf("%s Subchannel #%u: %u", ident, subchannel,
|
||||
EXTRACT_32BITS(obj_tptr));
|
||||
obj_tptr+=4;
|
||||
obj_tlen-=4;
|
||||
subchannel++;
|
||||
}
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
hexdump=TRUE;
|
||||
}
|
||||
|
||||
/*
|
||||
* FIXME those are the defined objects that lack a decoder
|
||||
* you are welcome to contribute code ;-)
|
||||
|
|
@ -1417,7 +1625,6 @@ rsvp_obj_print (const u_char *tptr, const char *ident, u_int tlen) {
|
|||
|
||||
case RSVP_OBJ_SCOPE:
|
||||
case RSVP_OBJ_POLICY_DATA:
|
||||
case RSVP_OBJ_LABEL_SET:
|
||||
case RSVP_OBJ_ACCEPT_LABEL_SET:
|
||||
case RSVP_OBJ_PROTECTION:
|
||||
default:
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@
|
|||
|
||||
#ifndef lint
|
||||
static const char rcsid[] _U_ =
|
||||
"@(#) $Header: /tcpdump/master/tcpdump/print-rx.c,v 1.37 2003/11/16 09:36:36 guy Exp $";
|
||||
"@(#) $Header: /tcpdump/master/tcpdump/print-rx.c,v 1.37.2.2 2007/06/15 19:43:15 guy Exp $";
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
|
|
@ -1013,6 +1013,7 @@ acl_print(u_char *s, int maxsize, u_char *end)
|
|||
int pos, neg, acl;
|
||||
int n, i;
|
||||
char *user;
|
||||
char fmt[1024];
|
||||
|
||||
if ((user = (char *)malloc(maxsize)) == NULL)
|
||||
return;
|
||||
|
|
@ -1046,7 +1047,8 @@ acl_print(u_char *s, int maxsize, u_char *end)
|
|||
printf("a");
|
||||
|
||||
for (i = 0; i < pos; i++) {
|
||||
if (sscanf((char *) s, "%s %d\n%n", user, &acl, &n) != 2)
|
||||
snprintf(fmt, sizeof(fmt), "%%%ds %%d\n%%n", maxsize - 1);
|
||||
if (sscanf((char *) s, fmt, user, &acl, &n) != 2)
|
||||
goto finish;
|
||||
s += n;
|
||||
printf(" +{");
|
||||
|
|
@ -1059,7 +1061,8 @@ acl_print(u_char *s, int maxsize, u_char *end)
|
|||
}
|
||||
|
||||
for (i = 0; i < neg; i++) {
|
||||
if (sscanf((char *) s, "%s %d\n%n", user, &acl, &n) != 2)
|
||||
snprintf(fmt, sizeof(fmt), "%%%ds %%d\n%%n", maxsize - 1);
|
||||
if (sscanf((char *) s, fmt, user, &acl, &n) != 2)
|
||||
goto finish;
|
||||
s += n;
|
||||
printf(" -{");
|
||||
|
|
@ -2299,6 +2302,7 @@ rx_ack_print(register const u_char *bp, int length)
|
|||
{
|
||||
struct rx_ackPacket *rxa;
|
||||
int i, start, last;
|
||||
u_int32_t firstPacket;
|
||||
|
||||
if (length < (int)sizeof(struct rx_header))
|
||||
return;
|
||||
|
|
@ -2327,8 +2331,9 @@ rx_ack_print(register const u_char *bp, int length)
|
|||
(int) EXTRACT_16BITS(&rxa->bufferSpace),
|
||||
(int) EXTRACT_16BITS(&rxa->maxSkew));
|
||||
|
||||
firstPacket = EXTRACT_32BITS(&rxa->firstPacket);
|
||||
printf(" first %d serial %d reason %s",
|
||||
EXTRACT_32BITS(&rxa->firstPacket), EXTRACT_32BITS(&rxa->serial),
|
||||
firstPacket, EXTRACT_32BITS(&rxa->serial),
|
||||
tok2str(rx_ack_reasons, "#%d", (int) rxa->reason));
|
||||
|
||||
/*
|
||||
|
|
@ -2371,7 +2376,7 @@ rx_ack_print(register const u_char *bp, int length)
|
|||
|
||||
if (last == -2) {
|
||||
printf(" acked %d",
|
||||
rxa->firstPacket + i);
|
||||
firstPacket + i);
|
||||
start = i;
|
||||
}
|
||||
|
||||
|
|
@ -2385,7 +2390,7 @@ rx_ack_print(register const u_char *bp, int length)
|
|||
*/
|
||||
|
||||
else if (last != i - 1) {
|
||||
printf(",%d", rxa->firstPacket + i);
|
||||
printf(",%d", firstPacket + i);
|
||||
start = i;
|
||||
}
|
||||
|
||||
|
|
@ -2411,7 +2416,7 @@ rx_ack_print(register const u_char *bp, int length)
|
|||
* range.
|
||||
*/
|
||||
} else if (last == i - 1 && start != last)
|
||||
printf("-%d", rxa->firstPacket + i - 1);
|
||||
printf("-%d", firstPacket + i - 1);
|
||||
|
||||
/*
|
||||
* So, what's going on here? We ran off the end of the
|
||||
|
|
@ -2425,7 +2430,7 @@ rx_ack_print(register const u_char *bp, int length)
|
|||
*/
|
||||
|
||||
if (last == i - 1 && start != last)
|
||||
printf("-%d", rxa->firstPacket + i - 1);
|
||||
printf("-%d", firstPacket + i - 1);
|
||||
|
||||
/*
|
||||
* Same as above, just without comments
|
||||
|
|
@ -2435,18 +2440,18 @@ rx_ack_print(register const u_char *bp, int length)
|
|||
if (rxa->acks[i] == RX_ACK_TYPE_NACK) {
|
||||
if (last == -2) {
|
||||
printf(" nacked %d",
|
||||
rxa->firstPacket + i);
|
||||
firstPacket + i);
|
||||
start = i;
|
||||
} else if (last != i - 1) {
|
||||
printf(",%d", rxa->firstPacket + i);
|
||||
printf(",%d", firstPacket + i);
|
||||
start = i;
|
||||
}
|
||||
last = i;
|
||||
} else if (last == i - 1 && start != last)
|
||||
printf("-%d", rxa->firstPacket + i - 1);
|
||||
printf("-%d", firstPacket + i - 1);
|
||||
|
||||
if (last == i - 1 && start != last)
|
||||
printf("-%d", rxa->firstPacket + i - 1);
|
||||
printf("-%d", firstPacket + i - 1);
|
||||
|
||||
bp += rxa->nAcks;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@
|
|||
|
||||
#ifndef lint
|
||||
static const char rcsid[] _U_ =
|
||||
"@(#) $Header: /tcpdump/master/tcpdump/print-sctp.c,v 1.16.2.4 2005/07/07 01:24:38 guy Exp $ (NETLAB/PEL)";
|
||||
"@(#) $Header: /tcpdump/master/tcpdump/print-sctp.c,v 1.16.2.5 2007/09/13 18:04:58 guy Exp $ (NETLAB/PEL)";
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
|
|
@ -206,6 +206,7 @@ void sctp_print(const u_char *bp, /* beginning of sctp packet */
|
|||
if (htons(chunkDescPtr->chunkLength) <
|
||||
sizeof(struct sctpDataPart)+
|
||||
sizeof(struct sctpChunkDesc)+1) {
|
||||
/* Less than 1 byte of chunk payload */
|
||||
printf("bogus chunk length %u]",
|
||||
htons(chunkDescPtr->chunkLength));
|
||||
return;
|
||||
|
|
@ -213,7 +214,7 @@ void sctp_print(const u_char *bp, /* beginning of sctp packet */
|
|||
default_print(payloadPtr,
|
||||
htons(chunkDescPtr->chunkLength) -
|
||||
(sizeof(struct sctpDataPart)+
|
||||
sizeof(struct sctpChunkDesc)+1));
|
||||
sizeof(struct sctpChunkDesc)));
|
||||
} else
|
||||
printf("]");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@
|
|||
*/
|
||||
#ifndef lint
|
||||
static const char rcsid[] _U_ =
|
||||
"@(#) $Header: /tcpdump/master/tcpdump/print-sll.c,v 1.16.2.2 2005/07/07 01:24:39 guy Exp $ (LBL)";
|
||||
"@(#) $Header: /tcpdump/master/tcpdump/print-sll.c,v 1.16.2.3 2005/11/13 12:13:00 guy Exp $ (LBL)";
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
|
|
@ -148,7 +148,6 @@ sll_if_print(const struct pcap_pkthdr *h, const u_char *p)
|
|||
* Is it (gag) an 802.3 encapsulation, or some non-Ethernet
|
||||
* packet type?
|
||||
*/
|
||||
extracted_ethertype = 0;
|
||||
if (ether_type <= ETHERMTU) {
|
||||
/*
|
||||
* Yes - what type is it?
|
||||
|
|
@ -173,6 +172,9 @@ sll_if_print(const struct pcap_pkthdr *h, const u_char *p)
|
|||
break;
|
||||
|
||||
default:
|
||||
extracted_ethertype = 0;
|
||||
/*FALLTHROUGH*/
|
||||
|
||||
unknown:
|
||||
/* ether_type not known, print raw packet */
|
||||
if (!eflag)
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@
|
|||
|
||||
#ifndef lint
|
||||
static const char rcsid[] _U_ =
|
||||
"@(#) $Header: /tcpdump/master/tcpdump/print-smb.c,v 1.41.2.2 2005/05/08 20:01:09 guy Exp $";
|
||||
"@(#) $Header: /tcpdump/master/tcpdump/print-smb.c,v 1.41.2.4 2007/07/14 22:29:05 guy Exp $";
|
||||
#endif
|
||||
|
||||
#include <tcpdump-stdinc.h>
|
||||
|
|
@ -904,8 +904,8 @@ print_smb(const u_char *buf, const u_char *maxbuf)
|
|||
|
||||
printf("\nSMB PACKET: %s (%s) (CHAINED)\n",
|
||||
fn->name, request ? "REQUEST" : "REPLY");
|
||||
if (newsmboffset < smboffset) {
|
||||
printf("Bad andX offset: %u < %u\n", newsmboffset, smboffset);
|
||||
if (newsmboffset <= smboffset) {
|
||||
printf("Bad andX offset: %u <= %u\n", newsmboffset, smboffset);
|
||||
break;
|
||||
}
|
||||
smboffset = newsmboffset;
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@
|
|||
|
||||
#ifndef lint
|
||||
static const char rcsid[] _U_ =
|
||||
"@(#) $Header: /tcpdump/master/tcpdump/print-tcp.c,v 1.120.2.2 2005/04/21 06:36:05 guy Exp $ (LBL)";
|
||||
"@(#) $Header: /tcpdump/master/tcpdump/print-tcp.c,v 1.120.2.3 2005/10/16 06:05:46 guy Exp $ (LBL)";
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
|
|
@ -799,7 +799,7 @@ tcp_verify_signature(const struct ip *ip, const struct tcphdr *tp,
|
|||
MD5_Update(&ctx, tcpmd5secret, strlen(tcpmd5secret));
|
||||
MD5_Final(sig, &ctx);
|
||||
|
||||
if (memcmp(rcvsig, sig, 16))
|
||||
if (memcmp(rcvsig, sig, TCP_SIGLEN) == 0)
|
||||
return (SIGNATURE_VALID);
|
||||
else
|
||||
return (SIGNATURE_INVALID);
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@
|
|||
|
||||
#ifndef lint
|
||||
static const char rcsid[] _U_ =
|
||||
"@(#) $Header: /tcpdump/master/tcpdump/print-tftp.c,v 1.37 2003/11/16 09:36:40 guy Exp $ (LBL)";
|
||||
"@(#) $Header: /tcpdump/master/tcpdump/print-tftp.c,v 1.37.2.1 2007/09/14 01:03:12 guy Exp $ (LBL)";
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
|
|
@ -35,7 +35,6 @@ static const char rcsid[] _U_ =
|
|||
#ifdef SEGSIZE
|
||||
#undef SEGSIZE /* SINIX sucks */
|
||||
#endif
|
||||
#include <arpa/tftp.h>
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
|
@ -43,6 +42,7 @@ static const char rcsid[] _U_ =
|
|||
#include "interface.h"
|
||||
#include "addrtoname.h"
|
||||
#include "extract.h"
|
||||
#include "tftp.h"
|
||||
|
||||
/* op code to string mapping */
|
||||
static struct tok op2str[] = {
|
||||
|
|
@ -51,6 +51,7 @@ static struct tok op2str[] = {
|
|||
{ DATA, "DATA" }, /* data packet */
|
||||
{ ACK, "ACK" }, /* acknowledgement */
|
||||
{ ERROR, "ERROR" }, /* error code */
|
||||
{ OACK, "OACK" }, /* option acknowledgement */
|
||||
{ 0, NULL }
|
||||
};
|
||||
|
||||
|
|
@ -97,6 +98,7 @@ tftp_print(register const u_char *bp, u_int length)
|
|||
|
||||
case RRQ:
|
||||
case WRQ:
|
||||
case OACK:
|
||||
/*
|
||||
* XXX Not all arpa/tftp.h's specify th_stuff as any
|
||||
* array; use address of th_block instead
|
||||
|
|
@ -106,11 +108,15 @@ tftp_print(register const u_char *bp, u_int length)
|
|||
#else
|
||||
p = (u_char *)&tp->th_block;
|
||||
#endif
|
||||
fputs(" \"", stdout);
|
||||
putchar(' ');
|
||||
/* Print filename or first option */
|
||||
if (opcode != OACK)
|
||||
putchar('"');
|
||||
i = fn_print(p, snapend);
|
||||
putchar('"');
|
||||
if (opcode != OACK)
|
||||
putchar('"');
|
||||
|
||||
/* Print the mode and any options */
|
||||
/* Print the mode (RRQ and WRQ only) and any options */
|
||||
while ((p = (const u_char *)strchr((const char *)p, '\0')) != NULL) {
|
||||
if (length <= (u_int)(p - (const u_char *)&tp->th_block))
|
||||
break;
|
||||
|
|
@ -134,7 +140,7 @@ tftp_print(register const u_char *bp, u_int length)
|
|||
case ERROR:
|
||||
/* Print error code string */
|
||||
TCHECK(tp->th_code);
|
||||
printf(" %s ", tok2str(err2str, "tftp-err-#%d \"",
|
||||
printf(" %s \"", tok2str(err2str, "tftp-err-#%d \"",
|
||||
EXTRACT_16BITS(&tp->th_code)));
|
||||
/* Print error message string */
|
||||
i = fn_print((const u_char *)tp->th_data, snapend);
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@
|
|||
|
||||
#ifndef lint
|
||||
static const char rcsid[] _U_ =
|
||||
"@(#) $Header: /tcpdump/master/tcpdump/smbutil.c,v 1.36.2.1 2005/04/21 04:09:58 guy Exp $";
|
||||
"@(#) $Header: /tcpdump/master/tcpdump/smbutil.c,v 1.36.2.3 2007/07/15 19:08:25 guy Exp $";
|
||||
#endif
|
||||
|
||||
#include <tcpdump-stdinc.h>
|
||||
|
|
@ -279,6 +279,7 @@ print_data(const unsigned char *buf, int len)
|
|||
return;
|
||||
printf("[%03X] ", i);
|
||||
for (i = 0; i < len; /*nothing*/) {
|
||||
TCHECK(buf[i]);
|
||||
printf("%02X ", buf[i] & 0xff);
|
||||
i++;
|
||||
if (i%8 == 0)
|
||||
|
|
@ -310,6 +311,11 @@ print_data(const unsigned char *buf, int len)
|
|||
print_asc(&buf[i - n], n);
|
||||
printf("\n");
|
||||
}
|
||||
return;
|
||||
|
||||
trunc:
|
||||
printf("\n");
|
||||
printf("WARNING: Short packet. Try increasing the snap length\n");
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -745,6 +751,9 @@ smb_fdata1(const u_char *buf, const char *fmt, const u_char *maxbuf,
|
|||
t = interpret_long_date(buf);
|
||||
buf += 8;
|
||||
break;
|
||||
default:
|
||||
t = 0;
|
||||
break;
|
||||
}
|
||||
if (t != 0) {
|
||||
lt = localtime(&t);
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* @(#) $Header: /tcpdump/master/tcpdump/tcp.h,v 1.11 2004/03/23 07:15:37 guy Exp $ (LBL) */
|
||||
/* @(#) $Header: /tcpdump/master/tcpdump/tcp.h,v 1.11.2.1 2005/11/29 09:09:26 hannes Exp $ (LBL) */
|
||||
/*
|
||||
* Copyright (c) 1982, 1986, 1993
|
||||
* The Regents of the University of California. All rights reserved.
|
||||
|
|
@ -77,8 +77,8 @@ struct tcphdr {
|
|||
#define TCPOPT_CCECHO 13 /* T/TCP CC options (rfc1644) */
|
||||
#define TCPOPT_SIGNATURE 19 /* Keyed MD5 (rfc2385) */
|
||||
#define TCPOLEN_SIGNATURE 18
|
||||
|
||||
#define TCP_SIGLEN 16 /* length of an option 19 digest */
|
||||
#define TCPOPT_AUTH 20 /* Enhanced AUTH option */
|
||||
|
||||
#define TCPOPT_TSTAMP_HDR \
|
||||
(TCPOPT_NOP<<24|TCPOPT_NOP<<16|TCPOPT_TIMESTAMP<<8|TCPOLEN_TIMESTAMP)
|
||||
|
|
|
|||
|
|
@ -1,19 +1,19 @@
|
|||
20:57:35.938066 IP 127.0.0.1.55920 > 127.0.0.1.80: S 928549246:928549246(0) win 32767 <mss 16396,sackOK,timestamp 1306300950 0,nop,wscale 2>
|
||||
23:57:35.938066 IP 127.0.0.1.55920 > 127.0.0.1.80: S 928549246:928549246(0) win 32767 <mss 16396,sackOK,timestamp 1306300950 0,nop,wscale 2>
|
||||
0x0000: 4500 003c 1b68 4000 4006 2152 7f00 0001 E..<.h@.@.!R....
|
||||
0x0010: 7f00 0001 da70 0050 3758 897e 0000 0000 .....p.P7X.~....
|
||||
0x0020: a002 7fff 1421 0000 0204 400c 0402 080a .....!....@.....
|
||||
0x0030: 4ddc 9216 0000 0000 0103 0302 M...........
|
||||
20:57:35.938122 IP 127.0.0.1.80 > 127.0.0.1.55920: S 930778609:930778609(0) ack 928549247 win 32767 <mss 16396,sackOK,timestamp 1306300950 1306300950,nop,wscale 2>
|
||||
23:57:35.938122 IP 127.0.0.1.80 > 127.0.0.1.55920: S 930778609:930778609(0) ack 928549247 win 32767 <mss 16396,sackOK,timestamp 1306300950 1306300950,nop,wscale 2>
|
||||
0x0000: 4500 003c 0000 4000 4006 3cba 7f00 0001 E..<..@.@.<.....
|
||||
0x0010: 7f00 0001 0050 da70 377a 8df1 3758 897f .....P.p7z..7X..
|
||||
0x0020: a012 7fff 6eb1 0000 0204 400c 0402 080a ....n.....@.....
|
||||
0x0030: 4ddc 9216 4ddc 9216 0103 0302 M...M.......
|
||||
20:57:35.938167 IP 127.0.0.1.55920 > 127.0.0.1.80: . ack 1 win 8192 <nop,nop,timestamp 1306300950 1306300950>
|
||||
23:57:35.938167 IP 127.0.0.1.55920 > 127.0.0.1.80: . ack 1 win 8192 <nop,nop,timestamp 1306300950 1306300950>
|
||||
0x0000: 4500 0034 1b6a 4000 4006 2158 7f00 0001 E..4.j@.@.!X....
|
||||
0x0010: 7f00 0001 da70 0050 3758 897f 377a 8df2 .....p.P7X..7z..
|
||||
0x0020: 8010 2000 37d0 0000 0101 080a 4ddc 9216 ....7.......M...
|
||||
0x0030: 4ddc 9216 M...
|
||||
20:57:35.939423 IP 127.0.0.1.55920 > 127.0.0.1.80: P 1:203(202) ack 1 win 8192 <nop,nop,timestamp 1306300951 1306300950>
|
||||
23:57:35.939423 IP 127.0.0.1.55920 > 127.0.0.1.80: P 1:203(202) ack 1 win 8192 <nop,nop,timestamp 1306300951 1306300950>
|
||||
0x0000: 4500 00fe 1b6c 4000 4006 208c 7f00 0001 E....l@.@.......
|
||||
0x0010: 7f00 0001 da70 0050 3758 897f 377a 8df2 .....p.P7X..7z..
|
||||
0x0020: 8018 2000 fef2 0000 0101 080a 4ddc 9217 ............M...
|
||||
|
|
@ -30,12 +30,12 @@
|
|||
0x00d0: 6363 6570 742d 4c61 6e67 7561 6765 3a20 ccept-Language:.
|
||||
0x00e0: 656e 0d0a 436f 6e6e 6563 7469 6f6e 3a20 en..Connection:.
|
||||
0x00f0: 4b65 6570 2d41 6c69 7665 0d0a 0d0a Keep-Alive....
|
||||
20:57:35.940474 IP 127.0.0.1.80 > 127.0.0.1.55920: . ack 203 win 8192 <nop,nop,timestamp 1306300952 1306300951>
|
||||
23:57:35.940474 IP 127.0.0.1.80 > 127.0.0.1.55920: . ack 203 win 8192 <nop,nop,timestamp 1306300952 1306300951>
|
||||
0x0000: 4500 0034 1fe4 4000 4006 1cde 7f00 0001 E..4..@.@.......
|
||||
0x0010: 7f00 0001 0050 da70 377a 8df2 3758 8a49 .....P.p7z..7X.I
|
||||
0x0020: 8010 2000 3703 0000 0101 080a 4ddc 9218 ....7.......M...
|
||||
0x0030: 4ddc 9217 M...
|
||||
20:57:35.941232 IP 127.0.0.1.80 > 127.0.0.1.55920: P 1:5560(5559) ack 203 win 8192 <nop,nop,timestamp 1306300953 1306300951>
|
||||
23:57:35.941232 IP 127.0.0.1.80 > 127.0.0.1.55920: P 1:5560(5559) ack 203 win 8192 <nop,nop,timestamp 1306300953 1306300951>
|
||||
0x0000: 4500 15eb 1fe6 4000 4006 0725 7f00 0001 E.....@.@..%....
|
||||
0x0010: 7f00 0001 0050 da70 377a 8df2 3758 8a49 .....P.p7z..7X.I
|
||||
0x0020: 8018 2000 13e0 0000 0101 080a 4ddc 9219 ............M...
|
||||
|
|
@ -387,22 +387,22 @@
|
|||
0x15c0: 342f 3036 2f32 3020 3135 3a33 333a 3537 4/06/20.15:33:57
|
||||
0x15d0: 2024 2e0a 2020 2d2d 3e0a 0a3c 2f42 4f44 .$....-->..</BOD
|
||||
0x15e0: 593e 0a3c 2f48 544d 4c3e 0a Y>.</HTML>.
|
||||
20:57:35.941260 IP 127.0.0.1.55920 > 127.0.0.1.80: . ack 5560 win 12383 <nop,nop,timestamp 1306300953 1306300953>
|
||||
23:57:35.941260 IP 127.0.0.1.55920 > 127.0.0.1.80: . ack 5560 win 12383 <nop,nop,timestamp 1306300953 1306300953>
|
||||
0x0000: 4500 0034 1b6e 4000 4006 2154 7f00 0001 E..4.n@.@.!T....
|
||||
0x0010: 7f00 0001 da70 0050 3758 8a49 377a a3a9 .....p.P7X.I7z..
|
||||
0x0020: 8010 305f 10ea 0000 0101 080a 4ddc 9219 ..0_........M...
|
||||
0x0030: 4ddc 9219 M...
|
||||
20:57:37.229575 IP 127.0.0.1.55920 > 127.0.0.1.80: F 203:203(0) ack 5560 win 12383 <nop,nop,timestamp 1306302241 1306300953>
|
||||
23:57:37.229575 IP 127.0.0.1.55920 > 127.0.0.1.80: F 203:203(0) ack 5560 win 12383 <nop,nop,timestamp 1306302241 1306300953>
|
||||
0x0000: 4500 0034 1b70 4000 4006 2152 7f00 0001 E..4.p@.@.!R....
|
||||
0x0010: 7f00 0001 da70 0050 3758 8a49 377a a3a9 .....p.P7X.I7z..
|
||||
0x0020: 8011 305f 0be1 0000 0101 080a 4ddc 9721 ..0_........M..!
|
||||
0x0030: 4ddc 9219 M...
|
||||
20:57:37.230839 IP 127.0.0.1.80 > 127.0.0.1.55920: F 5560:5560(0) ack 204 win 8192 <nop,nop,timestamp 1306302243 1306302241>
|
||||
23:57:37.230839 IP 127.0.0.1.80 > 127.0.0.1.55920: F 5560:5560(0) ack 204 win 8192 <nop,nop,timestamp 1306302243 1306302241>
|
||||
0x0000: 4500 0034 1fe8 4000 4006 1cda 7f00 0001 E..4..@.@.......
|
||||
0x0010: 7f00 0001 0050 da70 377a a3a9 3758 8a4a .....P.p7z..7X.J
|
||||
0x0020: 8011 2000 1735 0000 0101 080a 4ddc 9723 .....5......M..#
|
||||
0x0030: 4ddc 9721 M..!
|
||||
20:57:37.230900 IP 127.0.0.1.55920 > 127.0.0.1.80: . ack 5561 win 12383 <nop,nop,timestamp 1306302243 1306302243>
|
||||
23:57:37.230900 IP 127.0.0.1.55920 > 127.0.0.1.80: . ack 5561 win 12383 <nop,nop,timestamp 1306302243 1306302243>
|
||||
0x0000: 4500 0034 1b72 4000 4006 2150 7f00 0001 E..4.r@.@.!P....
|
||||
0x0010: 7f00 0001 da70 0050 3758 8a4a 377a a3aa .....p.P7X.J7z..
|
||||
0x0020: 8010 305f 06d4 0000 0101 080a 4ddc 9723 ..0_........M..#
|
||||
|
|
|
|||
|
|
@ -1,22 +1,22 @@
|
|||
20:57:35.938066 IP 127.0.0.1.55920 > 127.0.0.1.80: S 928549246:928549246(0) win 32767 <mss 16396,sackOK,timestamp 1306300950 0,nop,wscale 2>
|
||||
23:57:35.938066 IP 127.0.0.1.55920 > 127.0.0.1.80: S 928549246:928549246(0) win 32767 <mss 16396,sackOK,timestamp 1306300950 0,nop,wscale 2>
|
||||
0x0000: 0000 0000 0000 0000 0000 0000 0800 4500 ..............E.
|
||||
0x0010: 003c 1b68 4000 4006 2152 7f00 0001 7f00 .<.h@.@.!R......
|
||||
0x0020: 0001 da70 0050 3758 897e 0000 0000 a002 ...p.P7X.~......
|
||||
0x0030: 7fff 1421 0000 0204 400c 0402 080a 4ddc ...!....@.....M.
|
||||
0x0040: 9216 0000 0000 0103 0302 ..........
|
||||
20:57:35.938122 IP 127.0.0.1.80 > 127.0.0.1.55920: S 930778609:930778609(0) ack 928549247 win 32767 <mss 16396,sackOK,timestamp 1306300950 1306300950,nop,wscale 2>
|
||||
23:57:35.938122 IP 127.0.0.1.80 > 127.0.0.1.55920: S 930778609:930778609(0) ack 928549247 win 32767 <mss 16396,sackOK,timestamp 1306300950 1306300950,nop,wscale 2>
|
||||
0x0000: 0000 0000 0000 0000 0000 0000 0800 4500 ..............E.
|
||||
0x0010: 003c 0000 4000 4006 3cba 7f00 0001 7f00 .<..@.@.<.......
|
||||
0x0020: 0001 0050 da70 377a 8df1 3758 897f a012 ...P.p7z..7X....
|
||||
0x0030: 7fff 6eb1 0000 0204 400c 0402 080a 4ddc ..n.....@.....M.
|
||||
0x0040: 9216 4ddc 9216 0103 0302 ..M.......
|
||||
20:57:35.938167 IP 127.0.0.1.55920 > 127.0.0.1.80: . ack 1 win 8192 <nop,nop,timestamp 1306300950 1306300950>
|
||||
23:57:35.938167 IP 127.0.0.1.55920 > 127.0.0.1.80: . ack 1 win 8192 <nop,nop,timestamp 1306300950 1306300950>
|
||||
0x0000: 0000 0000 0000 0000 0000 0000 0800 4500 ..............E.
|
||||
0x0010: 0034 1b6a 4000 4006 2158 7f00 0001 7f00 .4.j@.@.!X......
|
||||
0x0020: 0001 da70 0050 3758 897f 377a 8df2 8010 ...p.P7X..7z....
|
||||
0x0030: 2000 37d0 0000 0101 080a 4ddc 9216 4ddc ..7.......M...M.
|
||||
0x0040: 9216 ..
|
||||
20:57:35.939423 IP 127.0.0.1.55920 > 127.0.0.1.80: P 1:203(202) ack 1 win 8192 <nop,nop,timestamp 1306300951 1306300950>
|
||||
23:57:35.939423 IP 127.0.0.1.55920 > 127.0.0.1.80: P 1:203(202) ack 1 win 8192 <nop,nop,timestamp 1306300951 1306300950>
|
||||
0x0000: 0000 0000 0000 0000 0000 0000 0800 4500 ..............E.
|
||||
0x0010: 00fe 1b6c 4000 4006 208c 7f00 0001 7f00 ...l@.@.........
|
||||
0x0020: 0001 da70 0050 3758 897f 377a 8df2 8018 ...p.P7X..7z....
|
||||
|
|
@ -34,13 +34,13 @@
|
|||
0x00e0: 6570 742d 4c61 6e67 7561 6765 3a20 656e ept-Language:.en
|
||||
0x00f0: 0d0a 436f 6e6e 6563 7469 6f6e 3a20 4b65 ..Connection:.Ke
|
||||
0x0100: 6570 2d41 6c69 7665 0d0a 0d0a ep-Alive....
|
||||
20:57:35.940474 IP 127.0.0.1.80 > 127.0.0.1.55920: . ack 203 win 8192 <nop,nop,timestamp 1306300952 1306300951>
|
||||
23:57:35.940474 IP 127.0.0.1.80 > 127.0.0.1.55920: . ack 203 win 8192 <nop,nop,timestamp 1306300952 1306300951>
|
||||
0x0000: 0000 0000 0000 0000 0000 0000 0800 4500 ..............E.
|
||||
0x0010: 0034 1fe4 4000 4006 1cde 7f00 0001 7f00 .4..@.@.........
|
||||
0x0020: 0001 0050 da70 377a 8df2 3758 8a49 8010 ...P.p7z..7X.I..
|
||||
0x0030: 2000 3703 0000 0101 080a 4ddc 9218 4ddc ..7.......M...M.
|
||||
0x0040: 9217 ..
|
||||
20:57:35.941232 IP 127.0.0.1.80 > 127.0.0.1.55920: P 1:5560(5559) ack 203 win 8192 <nop,nop,timestamp 1306300953 1306300951>
|
||||
23:57:35.941232 IP 127.0.0.1.80 > 127.0.0.1.55920: P 1:5560(5559) ack 203 win 8192 <nop,nop,timestamp 1306300953 1306300951>
|
||||
0x0000: 0000 0000 0000 0000 0000 0000 0800 4500 ..............E.
|
||||
0x0010: 15eb 1fe6 4000 4006 0725 7f00 0001 7f00 ....@.@..%......
|
||||
0x0020: 0001 0050 da70 377a 8df2 3758 8a49 8018 ...P.p7z..7X.I..
|
||||
|
|
@ -393,25 +393,25 @@
|
|||
0x15d0: 3036 2f32 3020 3135 3a33 333a 3537 2024 06/20.15:33:57.$
|
||||
0x15e0: 2e0a 2020 2d2d 3e0a 0a3c 2f42 4f44 593e ....-->..</BODY>
|
||||
0x15f0: 0a3c 2f48 544d 4c3e 0a .</HTML>.
|
||||
20:57:35.941260 IP 127.0.0.1.55920 > 127.0.0.1.80: . ack 5560 win 12383 <nop,nop,timestamp 1306300953 1306300953>
|
||||
23:57:35.941260 IP 127.0.0.1.55920 > 127.0.0.1.80: . ack 5560 win 12383 <nop,nop,timestamp 1306300953 1306300953>
|
||||
0x0000: 0000 0000 0000 0000 0000 0000 0800 4500 ..............E.
|
||||
0x0010: 0034 1b6e 4000 4006 2154 7f00 0001 7f00 .4.n@.@.!T......
|
||||
0x0020: 0001 da70 0050 3758 8a49 377a a3a9 8010 ...p.P7X.I7z....
|
||||
0x0030: 305f 10ea 0000 0101 080a 4ddc 9219 4ddc 0_........M...M.
|
||||
0x0040: 9219 ..
|
||||
20:57:37.229575 IP 127.0.0.1.55920 > 127.0.0.1.80: F 203:203(0) ack 5560 win 12383 <nop,nop,timestamp 1306302241 1306300953>
|
||||
23:57:37.229575 IP 127.0.0.1.55920 > 127.0.0.1.80: F 203:203(0) ack 5560 win 12383 <nop,nop,timestamp 1306302241 1306300953>
|
||||
0x0000: 0000 0000 0000 0000 0000 0000 0800 4500 ..............E.
|
||||
0x0010: 0034 1b70 4000 4006 2152 7f00 0001 7f00 .4.p@.@.!R......
|
||||
0x0020: 0001 da70 0050 3758 8a49 377a a3a9 8011 ...p.P7X.I7z....
|
||||
0x0030: 305f 0be1 0000 0101 080a 4ddc 9721 4ddc 0_........M..!M.
|
||||
0x0040: 9219 ..
|
||||
20:57:37.230839 IP 127.0.0.1.80 > 127.0.0.1.55920: F 5560:5560(0) ack 204 win 8192 <nop,nop,timestamp 1306302243 1306302241>
|
||||
23:57:37.230839 IP 127.0.0.1.80 > 127.0.0.1.55920: F 5560:5560(0) ack 204 win 8192 <nop,nop,timestamp 1306302243 1306302241>
|
||||
0x0000: 0000 0000 0000 0000 0000 0000 0800 4500 ..............E.
|
||||
0x0010: 0034 1fe8 4000 4006 1cda 7f00 0001 7f00 .4..@.@.........
|
||||
0x0020: 0001 0050 da70 377a a3a9 3758 8a4a 8011 ...P.p7z..7X.J..
|
||||
0x0030: 2000 1735 0000 0101 080a 4ddc 9723 4ddc ...5......M..#M.
|
||||
0x0040: 9721 .!
|
||||
20:57:37.230900 IP 127.0.0.1.55920 > 127.0.0.1.80: . ack 5561 win 12383 <nop,nop,timestamp 1306302243 1306302243>
|
||||
23:57:37.230900 IP 127.0.0.1.55920 > 127.0.0.1.80: . ack 5561 win 12383 <nop,nop,timestamp 1306302243 1306302243>
|
||||
0x0000: 0000 0000 0000 0000 0000 0000 0800 4500 ..............E.
|
||||
0x0010: 0034 1b72 4000 4006 2150 7f00 0001 7f00 .4.r@.@.!P......
|
||||
0x0020: 0001 da70 0050 3758 8a4a 377a a3aa 8010 ...p.P7X.J7z....
|
||||
|
|
|
|||
82
contrib/tcpdump/tftp.h
Normal file
82
contrib/tcpdump/tftp.h
Normal file
|
|
@ -0,0 +1,82 @@
|
|||
/* @(#) $Header: /tcpdump/master/tcpdump/tftp.h,v 1.1.2.1 2007/09/14 01:03:12 guy Exp $ (LBL) */
|
||||
/*
|
||||
* Copyright (c) 1983, 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.
|
||||
*
|
||||
* @(#)tftp.h 8.1 (Berkeley) 6/2/93
|
||||
*/
|
||||
|
||||
#ifndef _TFTP_H_
|
||||
#define _TFTP_H_
|
||||
|
||||
/*
|
||||
* Trivial File Transfer Protocol (IEN-133)
|
||||
*/
|
||||
#define SEGSIZE 512 /* data segment size */
|
||||
|
||||
/*
|
||||
* Packet types.
|
||||
*/
|
||||
#define RRQ 01 /* read request */
|
||||
#define WRQ 02 /* write request */
|
||||
#define DATA 03 /* data packet */
|
||||
#define ACK 04 /* acknowledgement */
|
||||
#define ERROR 05 /* error code */
|
||||
#define OACK 06 /* option acknowledgement */
|
||||
|
||||
struct tftphdr {
|
||||
unsigned short th_opcode; /* packet type */
|
||||
union {
|
||||
unsigned short tu_block; /* block # */
|
||||
unsigned short tu_code; /* error code */
|
||||
char tu_stuff[1]; /* request packet stuff */
|
||||
} th_u;
|
||||
char th_data[1]; /* data or error string */
|
||||
};
|
||||
|
||||
#define th_block th_u.tu_block
|
||||
#define th_code th_u.tu_code
|
||||
#define th_stuff th_u.tu_stuff
|
||||
#define th_msg th_data
|
||||
|
||||
/*
|
||||
* Error codes.
|
||||
*/
|
||||
#define EUNDEF 0 /* not defined */
|
||||
#define ENOTFOUND 1 /* file not found */
|
||||
#define EACCESS 2 /* access violation */
|
||||
#define ENOSPACE 3 /* disk full or allocation exceeded */
|
||||
#define EBADOP 4 /* illegal TFTP operation */
|
||||
#define EBADID 5 /* unknown transfer ID */
|
||||
#define EEXISTS 6 /* file already exists */
|
||||
#define ENOUSER 7 /* no such user */
|
||||
|
||||
#endif /* !_TFTP_H_ */
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
/* @(#) $Header: /tcpdump/master/tcpdump/udp.h,v 1.8 2005/04/06 21:33:28 mcr Exp $ (LBL) */
|
||||
/* @(#) $Header: /tcpdump/master/tcpdump/udp.h,v 1.8.2.2 2007/03/28 07:45:46 hannes Exp $ (LBL) */
|
||||
/*
|
||||
* Copyright (c) 1982, 1986, 1993
|
||||
* The Regents of the University of California. All rights reserved.
|
||||
|
|
@ -57,6 +57,7 @@ struct udphdr {
|
|||
#define RIP_PORT 520 /*XXX*/
|
||||
#define LDP_PORT 646
|
||||
#define AODV_PORT 654 /*XXX*/
|
||||
#define OLSR_PORT 698 /* rfc3626 */
|
||||
#define KERBEROS_SEC_PORT 750 /*XXX*/
|
||||
#define L2TP_PORT 1701 /*XXX*/
|
||||
#define SIP_PORT 5060
|
||||
|
|
@ -73,13 +74,13 @@ struct udphdr {
|
|||
#define RADIUS_ACCOUNTING_PORT 1646
|
||||
#define RADIUS_NEW_ACCOUNTING_PORT 1813
|
||||
#define HSRP_PORT 1985 /*XXX*/
|
||||
#define LMP_PORT 701 /* rfc4204 */
|
||||
#define LWRES_PORT 921
|
||||
#define ZEPHYR_SRV_PORT 2103
|
||||
#define ZEPHYR_CLT_PORT 2104
|
||||
#define MPLS_LSP_PING_PORT 3503 /* draft-ietf-mpls-lsp-ping-02.txt */
|
||||
#define BFD_CONTROL_PORT 3784 /* draft-katz-ward-bfd-v4v6-1hop-00.txt */
|
||||
#define BFD_ECHO_PORT 3785 /* draft-katz-ward-bfd-v4v6-1hop-00.txt */
|
||||
#define LMP_PORT 49998 /* unofficial - no IANA assignment yet */
|
||||
|
||||
#ifdef INET6
|
||||
#define RIPNG_PORT 521 /*XXX*/
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@
|
|||
|
||||
#ifndef lint
|
||||
static const char rcsid[] _U_ =
|
||||
"@(#) $Header: /tcpdump/master/tcpdump/util.c,v 1.95.2.5 2005/06/16 01:19:57 guy Exp $ (LBL)";
|
||||
"@(#) $Header: /tcpdump/master/tcpdump/util.c,v 1.95.2.6 2006/02/08 01:40:09 hannes Exp $ (LBL)";
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
|
|
@ -507,10 +507,12 @@ read_infile(char *fname)
|
|||
}
|
||||
|
||||
void
|
||||
safeputs(const char *s)
|
||||
safeputs(const char *s, int maxlen)
|
||||
{
|
||||
while (*s) {
|
||||
int idx = 0;
|
||||
while (*s && idx < maxlen) {
|
||||
safeputchar(*s);
|
||||
idx++;
|
||||
s++;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue