From 81ceab7147ecaac14fa1889cdb461205e1002393 Mon Sep 17 00:00:00 2001 From: Rui Paulo Date: Fri, 20 Mar 2009 13:27:51 +0000 Subject: [PATCH 1/2] Flatten vendor/tcpdump and remove keyword expansion. --- contrib/tcpdump/CHANGES => CHANGES | 0 contrib/tcpdump/CREDITS => CREDITS | 0 contrib/tcpdump/FILES => FILES | 0 contrib/tcpdump/INSTALL => INSTALL | 0 contrib/tcpdump/LICENSE => LICENSE | 0 .../Makefile-devel-adds => Makefile-devel-adds | 0 contrib/tcpdump/Makefile.in => Makefile.in | 0 contrib/tcpdump/PLATFORMS => PLATFORMS | 0 contrib/tcpdump/README => README | 0 contrib/tcpdump/Readme.Win32 => Readme.Win32 | 0 contrib/tcpdump/TODO => TODO | 0 contrib/tcpdump/VERSION => VERSION | 0 contrib/tcpdump/acconfig.h => acconfig.h | 0 contrib/tcpdump/aclocal.m4 => aclocal.m4 | 0 contrib/tcpdump/acsite.m4 => acsite.m4 | 0 contrib/tcpdump/addrtoname.c => addrtoname.c | 0 contrib/tcpdump/addrtoname.h => addrtoname.h | 0 contrib/tcpdump/af.c => af.c | 0 contrib/tcpdump/af.h => af.h | 0 contrib/tcpdump/ah.h => ah.h | 0 contrib/tcpdump/aodv.h => aodv.h | 0 contrib/tcpdump/appletalk.h => appletalk.h | 0 contrib/tcpdump/arcnet.h => arcnet.h | 0 contrib/tcpdump/atime.awk => atime.awk | 0 contrib/tcpdump/atm.h => atm.h | 0 contrib/tcpdump/atmuni31.h => atmuni31.h | 0 contrib/tcpdump/bgp.h => bgp.h | 0 contrib/tcpdump/bootp.h => bootp.h | 0 contrib/tcpdump/bpf_dump.c => bpf_dump.c | 0 contrib/tcpdump/chdlc.h => chdlc.h | 0 contrib/tcpdump/config.guess => config.guess | 0 contrib/tcpdump/config.h.in => config.h.in | 0 contrib/tcpdump/config.sub => config.sub | 0 contrib/tcpdump/configure => configure | 0 contrib/tcpdump/configure.in => configure.in | 0 contrib/tcpdump/.cvsignore | 12 ------------ contrib/tcpdump/cpack.c => cpack.c | 0 contrib/tcpdump/cpack.h => cpack.h | 0 contrib/tcpdump/dccp.h => dccp.h | 0 contrib/tcpdump/decnet.h => decnet.h | 0 contrib/tcpdump/decode_prefix.h => decode_prefix.h | 0 contrib/tcpdump/dhcp6.h => dhcp6.h | 0 contrib/tcpdump/dhcp6opt.h => dhcp6opt.h | 0 contrib/tcpdump/enc.h => enc.h | 0 contrib/tcpdump/esp.h => esp.h | 0 contrib/tcpdump/ether.h => ether.h | 0 contrib/tcpdump/ethertype.h => ethertype.h | 0 contrib/tcpdump/extract.h => extract.h | 0 contrib/tcpdump/fddi.h => fddi.h | 0 contrib/tcpdump/gmpls.c => gmpls.c | 0 contrib/tcpdump/gmpls.h => gmpls.h | 0 contrib/tcpdump/gmt2local.c => gmt2local.c | 0 contrib/tcpdump/gmt2local.h => gmt2local.h | 0 contrib/tcpdump/icmp6.h => icmp6.h | 0 contrib/tcpdump/ieee802_11.h => ieee802_11.h | 0 .../tcpdump/ieee802_11_radio.h => ieee802_11_radio.h | 2 +- contrib/tcpdump/igrp.h => igrp.h | 0 contrib/tcpdump/install-sh => install-sh | 0 contrib/tcpdump/interface.h => interface.h | 0 contrib/tcpdump/ip.h => ip.h | 0 contrib/tcpdump/ip6.h => ip6.h | 0 contrib/tcpdump/ipfc.h => ipfc.h | 0 contrib/tcpdump/ipproto.c => ipproto.c | 0 contrib/tcpdump/ipproto.h => ipproto.h | 2 +- contrib/tcpdump/ipsec_doi.h => ipsec_doi.h | 0 contrib/tcpdump/ipx.h => ipx.h | 0 contrib/tcpdump/isakmp.h => isakmp.h | 0 contrib/tcpdump/l2tp.h => l2tp.h | 0 contrib/tcpdump/l2vpn.c => l2vpn.c | 0 contrib/tcpdump/l2vpn.h => l2vpn.h | 0 contrib/tcpdump/lane.h => lane.h | 0 {contrib/tcpdump/lbl => lbl}/gnuc.h | 0 {contrib/tcpdump/lbl => lbl}/os-osf4.h | 0 {contrib/tcpdump/lbl => lbl}/os-solaris2.h | 0 {contrib/tcpdump/lbl => lbl}/os-sunos4.h | 0 {contrib/tcpdump/lbl => lbl}/os-ultrix4.h | 0 contrib/tcpdump/llc.h => llc.h | 0 contrib/tcpdump/machdep.c => machdep.c | 0 contrib/tcpdump/machdep.h => machdep.h | 0 contrib/tcpdump/makemib => makemib | 0 contrib/tcpdump/mib.h => mib.h | 0 {contrib/tcpdump/missing => missing}/addrinfo.h | 0 {contrib/tcpdump/missing => missing}/addrsize.h | 0 {contrib/tcpdump/missing => missing}/bittypes.h | 0 {contrib/tcpdump/missing => missing}/cdecl_ext.h | 0 {contrib/tcpdump/missing => missing}/datalinks.c | 0 {contrib/tcpdump/missing => missing}/dlnames.c | 0 {contrib/tcpdump/missing => missing}/getaddrinfo.c | 0 {contrib/tcpdump/missing => missing}/getnameinfo.c | 0 {contrib/tcpdump/missing => missing}/inet_aton.c | 0 {contrib/tcpdump/missing => missing}/inet_ntop.c | 0 {contrib/tcpdump/missing => missing}/inet_pton.c | 0 {contrib/tcpdump/missing => missing}/resolv6.h | 0 {contrib/tcpdump/missing => missing}/resolv_ext.h | 0 {contrib/tcpdump/missing => missing}/snprintf.c | 0 {contrib/tcpdump/missing => missing}/sockstorage.h | 0 {contrib/tcpdump/missing => missing}/strdup.c | 0 {contrib/tcpdump/missing => missing}/strlcat.c | 0 {contrib/tcpdump/missing => missing}/strlcpy.c | 0 {contrib/tcpdump/missing => missing}/strsep.c | 0 contrib/tcpdump/mkdep => mkdep | 0 contrib/tcpdump/mpls.h => mpls.h | 0 contrib/tcpdump/nameser.h => nameser.h | 0 contrib/tcpdump/netbios.h => netbios.h | 0 contrib/tcpdump/netdissect.h => netdissect.h | 0 contrib/tcpdump/nfs.h => nfs.h | 0 contrib/tcpdump/nfsfh.h => nfsfh.h | 0 contrib/tcpdump/nfsv2.h => nfsv2.h | 0 contrib/tcpdump/nlpid.c => nlpid.c | 0 contrib/tcpdump/nlpid.h => nlpid.h | 0 contrib/tcpdump/ntp.h => ntp.h | 0 contrib/tcpdump/oakley.h => oakley.h | 0 contrib/tcpdump/ospf.h => ospf.h | 0 contrib/tcpdump/ospf6.h => ospf6.h | 0 contrib/tcpdump/oui.c => oui.c | 0 contrib/tcpdump/oui.h => oui.h | 0 contrib/tcpdump/packetdat.awk => packetdat.awk | 0 contrib/tcpdump/parsenfsfh.c => parsenfsfh.c | 0 contrib/tcpdump/pcap-missing.h => pcap-missing.h | 0 .../tcpdump/pcap_dump_ftell.c => pcap_dump_ftell.c | 0 contrib/tcpdump/pf.h => pf.h | 0 contrib/tcpdump/pmap_prot.h => pmap_prot.h | 2 +- contrib/tcpdump/ppp.h => ppp.h | 0 contrib/tcpdump/print-802_11.c => print-802_11.c | 0 contrib/tcpdump/print-ah.c => print-ah.c | 0 contrib/tcpdump/print-aodv.c => print-aodv.c | 0 contrib/tcpdump/print-ap1394.c => print-ap1394.c | 0 contrib/tcpdump/print-arcnet.c => print-arcnet.c | 0 contrib/tcpdump/print-arp.c => print-arp.c | 0 contrib/tcpdump/print-ascii.c => print-ascii.c | 0 contrib/tcpdump/print-atalk.c => print-atalk.c | 0 contrib/tcpdump/print-atm.c => print-atm.c | 0 contrib/tcpdump/print-beep.c => print-beep.c | 0 contrib/tcpdump/print-bfd.c => print-bfd.c | 0 contrib/tcpdump/print-bgp.c => print-bgp.c | 0 contrib/tcpdump/print-bootp.c => print-bootp.c | 0 contrib/tcpdump/print-bxxp.c => print-bxxp.c | 0 contrib/tcpdump/print-cdp.c => print-cdp.c | 0 contrib/tcpdump/print-chdlc.c => print-chdlc.c | 0 contrib/tcpdump/print-cip.c => print-cip.c | 0 contrib/tcpdump/print-cnfp.c => print-cnfp.c | 0 contrib/tcpdump/print-dccp.c => print-dccp.c | 0 contrib/tcpdump/print-decnet.c => print-decnet.c | 0 contrib/tcpdump/print-dhcp6.c => print-dhcp6.c | 0 contrib/tcpdump/print-domain.c => print-domain.c | 0 contrib/tcpdump/print-dvmrp.c => print-dvmrp.c | 0 contrib/tcpdump/print-eap.c => print-eap.c | 0 contrib/tcpdump/print-egp.c => print-egp.c | 0 contrib/tcpdump/print-eigrp.c => print-eigrp.c | 0 contrib/tcpdump/print-enc.c => print-enc.c | 0 contrib/tcpdump/print-esp.c => print-esp.c | 0 contrib/tcpdump/print-ether.c => print-ether.c | 0 contrib/tcpdump/print-fddi.c => print-fddi.c | 0 contrib/tcpdump/print-fr.c => print-fr.c | 0 contrib/tcpdump/print-frag6.c => print-frag6.c | 0 contrib/tcpdump/print-gre.c => print-gre.c | 0 contrib/tcpdump/print-hsrp.c => print-hsrp.c | 0 contrib/tcpdump/print-icmp.c => print-icmp.c | 0 contrib/tcpdump/print-icmp6.c => print-icmp6.c | 0 contrib/tcpdump/print-igmp.c => print-igmp.c | 0 contrib/tcpdump/print-igrp.c => print-igrp.c | 0 contrib/tcpdump/print-ip.c => print-ip.c | 0 contrib/tcpdump/print-ip6.c => print-ip6.c | 0 contrib/tcpdump/print-ip6opts.c => print-ip6opts.c | 0 contrib/tcpdump/print-ipcomp.c => print-ipcomp.c | 0 contrib/tcpdump/print-ipfc.c => print-ipfc.c | 0 contrib/tcpdump/print-ipx.c => print-ipx.c | 0 contrib/tcpdump/print-isakmp.c => print-isakmp.c | 0 contrib/tcpdump/print-isoclns.c => print-isoclns.c | 0 contrib/tcpdump/print-juniper.c => print-juniper.c | 0 contrib/tcpdump/print-krb.c => print-krb.c | 0 contrib/tcpdump/print-l2tp.c => print-l2tp.c | 0 contrib/tcpdump/print-lane.c => print-lane.c | 0 contrib/tcpdump/print-lcp.c => print-lcp.c | 0 contrib/tcpdump/print-ldp.c => print-ldp.c | 0 contrib/tcpdump/print-llc.c => print-llc.c | 0 contrib/tcpdump/print-lmp.c => print-lmp.c | 0 contrib/tcpdump/print-lspping.c => print-lspping.c | 0 contrib/tcpdump/print-lwres.c => print-lwres.c | 0 contrib/tcpdump/print-mobile.c => print-mobile.c | 0 contrib/tcpdump/print-mobility.c => print-mobility.c | 0 contrib/tcpdump/print-mpls.c => print-mpls.c | 0 contrib/tcpdump/print-msdp.c => print-msdp.c | 0 contrib/tcpdump/print-netbios.c => print-netbios.c | 0 contrib/tcpdump/print-nfs.c => print-nfs.c | 0 contrib/tcpdump/print-ntp.c => print-ntp.c | 0 contrib/tcpdump/print-null.c => print-null.c | 0 contrib/tcpdump/print-olsr.c => print-olsr.c | 0 contrib/tcpdump/print-ospf.c => print-ospf.c | 0 contrib/tcpdump/print-ospf6.c => print-ospf6.c | 0 contrib/tcpdump/print-pflog.c => print-pflog.c | 0 contrib/tcpdump/print-pgm.c => print-pgm.c | 0 contrib/tcpdump/print-pim.c => print-pim.c | 0 contrib/tcpdump/print-ppp.c => print-ppp.c | 0 contrib/tcpdump/print-pppoe.c => print-pppoe.c | 0 contrib/tcpdump/print-pptp.c => print-pptp.c | 0 contrib/tcpdump/print-radius.c => print-radius.c | 0 contrib/tcpdump/print-raw.c => print-raw.c | 0 contrib/tcpdump/print-rip.c => print-rip.c | 0 contrib/tcpdump/print-ripng.c => print-ripng.c | 0 contrib/tcpdump/print-rsvp.c => print-rsvp.c | 0 contrib/tcpdump/print-rt6.c => print-rt6.c | 0 contrib/tcpdump/print-rx.c => print-rx.c | 0 contrib/tcpdump/print-sctp.c => print-sctp.c | 0 contrib/tcpdump/print-sip.c => print-sip.c | 0 contrib/tcpdump/print-sl.c => print-sl.c | 0 contrib/tcpdump/print-sll.c => print-sll.c | 0 contrib/tcpdump/print-slow.c => print-slow.c | 0 contrib/tcpdump/print-smb.c => print-smb.c | 0 contrib/tcpdump/print-snmp.c => print-snmp.c | 0 contrib/tcpdump/print-stp.c => print-stp.c | 0 contrib/tcpdump/print-sunatm.c => print-sunatm.c | 0 contrib/tcpdump/print-sunrpc.c => print-sunrpc.c | 0 contrib/tcpdump/print-symantec.c => print-symantec.c | 0 contrib/tcpdump/print-syslog.c => print-syslog.c | 0 contrib/tcpdump/print-tcp.c => print-tcp.c | 0 contrib/tcpdump/print-telnet.c => print-telnet.c | 0 contrib/tcpdump/print-tftp.c => print-tftp.c | 0 contrib/tcpdump/print-timed.c => print-timed.c | 0 contrib/tcpdump/print-token.c => print-token.c | 0 contrib/tcpdump/print-udp.c => print-udp.c | 0 contrib/tcpdump/print-vjc.c => print-vjc.c | 0 contrib/tcpdump/print-vrrp.c => print-vrrp.c | 0 contrib/tcpdump/print-wb.c => print-wb.c | 0 contrib/tcpdump/print-zephyr.c => print-zephyr.c | 0 contrib/tcpdump/route6d.h => route6d.h | 0 contrib/tcpdump/rpc_auth.h => rpc_auth.h | 2 +- contrib/tcpdump/rpc_msg.h => rpc_msg.h | 2 +- contrib/tcpdump/rx.h => rx.h | 0 contrib/tcpdump/savestr.c => savestr.c | 0 contrib/tcpdump/savestr.h => savestr.h | 0 contrib/tcpdump/sctpConstants.h => sctpConstants.h | 0 contrib/tcpdump/sctpHeader.h => sctpHeader.h | 0 contrib/tcpdump/send-ack.awk => send-ack.awk | 0 contrib/tcpdump/setsignal.c => setsignal.c | 0 contrib/tcpdump/setsignal.h => setsignal.h | 0 contrib/tcpdump/slcompress.h => slcompress.h | 0 contrib/tcpdump/slip.h => slip.h | 0 contrib/tcpdump/sll.h => sll.h | 0 contrib/tcpdump/smb.h => smb.h | 0 contrib/tcpdump/smbutil.c => smbutil.c | 0 contrib/tcpdump/stime.awk => stime.awk | 0 contrib/tcpdump/strcasecmp.c => strcasecmp.c | 0 contrib/tcpdump/tcp.h => tcp.h | 0 contrib/tcpdump/tcpdump-stdinc.h => tcpdump-stdinc.h | 0 contrib/tcpdump/tcpdump.1 => tcpdump.1 | 0 contrib/tcpdump/tcpdump.c => tcpdump.c | 0 contrib/tcpdump/telnet.h => telnet.h | 0 {contrib/tcpdump/tests => tests}/.cvsignore | 0 .../tests => tests}/02-sunrise-sunset-esp.puu | 0 .../tests => tests}/08-sunrise-sunset-aes.puu | 0 .../tests => tests}/08-sunrise-sunset-esp2.puu | 0 {contrib/tcpdump/tests => tests}/alltests.sh | 0 {contrib/tcpdump/tests => tests}/bgp_vpn_attrset.out | 0 {contrib/tcpdump/tests => tests}/bgp_vpn_attrset.sh | 0 {contrib/tcpdump/tests => tests}/eapon1.gdbinit | 0 {contrib/tcpdump/tests => tests}/eapon1.out | 0 {contrib/tcpdump/tests => tests}/eapon1.puu | 0 {contrib/tcpdump/tests => tests}/eapon1.sh | 0 {contrib/tcpdump/tests => tests}/eapon2.puu | 0 {contrib/tcpdump/tests => tests}/esp-secrets.txt | 0 {contrib/tcpdump/tests => tests}/esp0.out | 0 {contrib/tcpdump/tests => tests}/esp0.sh | 0 {contrib/tcpdump/tests => tests}/esp1.gdbinit | 0 {contrib/tcpdump/tests => tests}/esp1.out | 0 {contrib/tcpdump/tests => tests}/esp1.sh | 0 {contrib/tcpdump/tests => tests}/esp2.gdbinit | 0 {contrib/tcpdump/tests => tests}/esp2.out | 0 {contrib/tcpdump/tests => tests}/esp2.sh | 0 {contrib/tcpdump/tests => tests}/esp3.gdbinit | 0 {contrib/tcpdump/tests => tests}/esp3.sh | 0 {contrib/tcpdump/tests => tests}/esp4.gdbinit | 0 {contrib/tcpdump/tests => tests}/esp4.sh | 0 {contrib/tcpdump/tests => tests}/esp5.gdbinit | 0 {contrib/tcpdump/tests => tests}/esp5.out | 0 {contrib/tcpdump/tests => tests}/esp5.sh | 0 {contrib/tcpdump/tests => tests}/espudp1.out | 0 {contrib/tcpdump/tests => tests}/espudp1.puu | 0 {contrib/tcpdump/tests => tests}/espudp1.sh | 0 .../tests => tests}/isakmp-delete-segfault.puu | 0 .../isakmp-identification-segfault.puu | 0 .../tcpdump/tests => tests}/isakmp-pointer-loop.puu | 0 {contrib/tcpdump/tests => tests}/isakmp1.out | 0 {contrib/tcpdump/tests => tests}/isakmp1.sh | 0 {contrib/tcpdump/tests => tests}/isakmp2.out | 0 {contrib/tcpdump/tests => tests}/isakmp2.sh | 0 {contrib/tcpdump/tests => tests}/isakmp3.out | 0 {contrib/tcpdump/tests => tests}/isakmp3.sh | 0 {contrib/tcpdump/tests => tests}/isakmp4.out | 0 {contrib/tcpdump/tests => tests}/isakmp4.sh | 0 {contrib/tcpdump/tests => tests}/isakmp4500.puu | 0 {contrib/tcpdump/tests => tests}/lmp.out | 0 {contrib/tcpdump/tests => tests}/lmp.puu | 0 {contrib/tcpdump/tests => tests}/lmp.sh | 0 {contrib/tcpdump/tests => tests}/mpls-ldp-hello.out | 0 {contrib/tcpdump/tests => tests}/mpls-ldp-hello.puu | 0 {contrib/tcpdump/tests => tests}/mpls-ldp-hello.sh | 0 {contrib/tcpdump/tests => tests}/ospf-gmpls.out | 0 {contrib/tcpdump/tests => tests}/ospf-gmpls.puu | 0 {contrib/tcpdump/tests => tests}/ospf-gmpls.sh | 0 {contrib/tcpdump/tests => tests}/print-A.out | 0 {contrib/tcpdump/tests => tests}/print-AA.out | 0 {contrib/tcpdump/tests => tests}/print-X.out | 0 {contrib/tcpdump/tests => tests}/print-XX.out | 0 {contrib/tcpdump/tests => tests}/print-capX.out | 0 {contrib/tcpdump/tests => tests}/print-capXX.out | 0 {contrib/tcpdump/tests => tests}/print-flags.puu | 0 {contrib/tcpdump/tests => tests}/print-flags.sh | 0 {contrib/tcpdump/tests => tests}/print-x.out | 0 {contrib/tcpdump/tests => tests}/print-xx.out | 0 contrib/tcpdump/tftp.h => tftp.h | 0 contrib/tcpdump/timed.h => timed.h | 0 contrib/tcpdump/token.h => token.h | 0 contrib/tcpdump/udp.h => udp.h | 0 contrib/tcpdump/util.c => util.c | 0 contrib/tcpdump/vfprintf.c => vfprintf.c | 0 316 files changed, 5 insertions(+), 17 deletions(-) rename contrib/tcpdump/CHANGES => CHANGES (100%) rename contrib/tcpdump/CREDITS => CREDITS (100%) rename contrib/tcpdump/FILES => FILES (100%) rename contrib/tcpdump/INSTALL => INSTALL (100%) rename contrib/tcpdump/LICENSE => LICENSE (100%) rename contrib/tcpdump/Makefile-devel-adds => Makefile-devel-adds (100%) rename contrib/tcpdump/Makefile.in => Makefile.in (100%) rename contrib/tcpdump/PLATFORMS => PLATFORMS (100%) rename contrib/tcpdump/README => README (100%) rename contrib/tcpdump/Readme.Win32 => Readme.Win32 (100%) rename contrib/tcpdump/TODO => TODO (100%) rename contrib/tcpdump/VERSION => VERSION (100%) rename contrib/tcpdump/acconfig.h => acconfig.h (100%) rename contrib/tcpdump/aclocal.m4 => aclocal.m4 (100%) rename contrib/tcpdump/acsite.m4 => acsite.m4 (100%) rename contrib/tcpdump/addrtoname.c => addrtoname.c (100%) rename contrib/tcpdump/addrtoname.h => addrtoname.h (100%) rename contrib/tcpdump/af.c => af.c (100%) rename contrib/tcpdump/af.h => af.h (100%) rename contrib/tcpdump/ah.h => ah.h (100%) rename contrib/tcpdump/aodv.h => aodv.h (100%) rename contrib/tcpdump/appletalk.h => appletalk.h (100%) rename contrib/tcpdump/arcnet.h => arcnet.h (100%) rename contrib/tcpdump/atime.awk => atime.awk (100%) rename contrib/tcpdump/atm.h => atm.h (100%) rename contrib/tcpdump/atmuni31.h => atmuni31.h (100%) rename contrib/tcpdump/bgp.h => bgp.h (100%) rename contrib/tcpdump/bootp.h => bootp.h (100%) rename contrib/tcpdump/bpf_dump.c => bpf_dump.c (100%) rename contrib/tcpdump/chdlc.h => chdlc.h (100%) rename contrib/tcpdump/config.guess => config.guess (100%) rename contrib/tcpdump/config.h.in => config.h.in (100%) rename contrib/tcpdump/config.sub => config.sub (100%) rename contrib/tcpdump/configure => configure (100%) rename contrib/tcpdump/configure.in => configure.in (100%) delete mode 100644 contrib/tcpdump/.cvsignore rename contrib/tcpdump/cpack.c => cpack.c (100%) rename contrib/tcpdump/cpack.h => cpack.h (100%) rename contrib/tcpdump/dccp.h => dccp.h (100%) rename contrib/tcpdump/decnet.h => decnet.h (100%) rename contrib/tcpdump/decode_prefix.h => decode_prefix.h (100%) rename contrib/tcpdump/dhcp6.h => dhcp6.h (100%) rename contrib/tcpdump/dhcp6opt.h => dhcp6opt.h (100%) rename contrib/tcpdump/enc.h => enc.h (100%) rename contrib/tcpdump/esp.h => esp.h (100%) rename contrib/tcpdump/ether.h => ether.h (100%) rename contrib/tcpdump/ethertype.h => ethertype.h (100%) rename contrib/tcpdump/extract.h => extract.h (100%) rename contrib/tcpdump/fddi.h => fddi.h (100%) rename contrib/tcpdump/gmpls.c => gmpls.c (100%) rename contrib/tcpdump/gmpls.h => gmpls.h (100%) rename contrib/tcpdump/gmt2local.c => gmt2local.c (100%) rename contrib/tcpdump/gmt2local.h => gmt2local.h (100%) rename contrib/tcpdump/icmp6.h => icmp6.h (100%) rename contrib/tcpdump/ieee802_11.h => ieee802_11.h (100%) rename contrib/tcpdump/ieee802_11_radio.h => ieee802_11_radio.h (98%) rename contrib/tcpdump/igrp.h => igrp.h (100%) rename contrib/tcpdump/install-sh => install-sh (100%) rename contrib/tcpdump/interface.h => interface.h (100%) rename contrib/tcpdump/ip.h => ip.h (100%) rename contrib/tcpdump/ip6.h => ip6.h (100%) rename contrib/tcpdump/ipfc.h => ipfc.h (100%) rename contrib/tcpdump/ipproto.c => ipproto.c (100%) rename contrib/tcpdump/ipproto.h => ipproto.h (98%) rename contrib/tcpdump/ipsec_doi.h => ipsec_doi.h (100%) rename contrib/tcpdump/ipx.h => ipx.h (100%) rename contrib/tcpdump/isakmp.h => isakmp.h (100%) rename contrib/tcpdump/l2tp.h => l2tp.h (100%) rename contrib/tcpdump/l2vpn.c => l2vpn.c (100%) rename contrib/tcpdump/l2vpn.h => l2vpn.h (100%) rename contrib/tcpdump/lane.h => lane.h (100%) rename {contrib/tcpdump/lbl => lbl}/gnuc.h (100%) rename {contrib/tcpdump/lbl => lbl}/os-osf4.h (100%) rename {contrib/tcpdump/lbl => lbl}/os-solaris2.h (100%) rename {contrib/tcpdump/lbl => lbl}/os-sunos4.h (100%) rename {contrib/tcpdump/lbl => lbl}/os-ultrix4.h (100%) rename contrib/tcpdump/llc.h => llc.h (100%) rename contrib/tcpdump/machdep.c => machdep.c (100%) rename contrib/tcpdump/machdep.h => machdep.h (100%) rename contrib/tcpdump/makemib => makemib (100%) rename contrib/tcpdump/mib.h => mib.h (100%) rename {contrib/tcpdump/missing => missing}/addrinfo.h (100%) rename {contrib/tcpdump/missing => missing}/addrsize.h (100%) rename {contrib/tcpdump/missing => missing}/bittypes.h (100%) rename {contrib/tcpdump/missing => missing}/cdecl_ext.h (100%) rename {contrib/tcpdump/missing => missing}/datalinks.c (100%) rename {contrib/tcpdump/missing => missing}/dlnames.c (100%) rename {contrib/tcpdump/missing => missing}/getaddrinfo.c (100%) rename {contrib/tcpdump/missing => missing}/getnameinfo.c (100%) rename {contrib/tcpdump/missing => missing}/inet_aton.c (100%) rename {contrib/tcpdump/missing => missing}/inet_ntop.c (100%) rename {contrib/tcpdump/missing => missing}/inet_pton.c (100%) rename {contrib/tcpdump/missing => missing}/resolv6.h (100%) rename {contrib/tcpdump/missing => missing}/resolv_ext.h (100%) rename {contrib/tcpdump/missing => missing}/snprintf.c (100%) rename {contrib/tcpdump/missing => missing}/sockstorage.h (100%) rename {contrib/tcpdump/missing => missing}/strdup.c (100%) rename {contrib/tcpdump/missing => missing}/strlcat.c (100%) rename {contrib/tcpdump/missing => missing}/strlcpy.c (100%) rename {contrib/tcpdump/missing => missing}/strsep.c (100%) rename contrib/tcpdump/mkdep => mkdep (100%) rename contrib/tcpdump/mpls.h => mpls.h (100%) rename contrib/tcpdump/nameser.h => nameser.h (100%) rename contrib/tcpdump/netbios.h => netbios.h (100%) rename contrib/tcpdump/netdissect.h => netdissect.h (100%) rename contrib/tcpdump/nfs.h => nfs.h (100%) rename contrib/tcpdump/nfsfh.h => nfsfh.h (100%) rename contrib/tcpdump/nfsv2.h => nfsv2.h (100%) rename contrib/tcpdump/nlpid.c => nlpid.c (100%) rename contrib/tcpdump/nlpid.h => nlpid.h (100%) rename contrib/tcpdump/ntp.h => ntp.h (100%) rename contrib/tcpdump/oakley.h => oakley.h (100%) rename contrib/tcpdump/ospf.h => ospf.h (100%) rename contrib/tcpdump/ospf6.h => ospf6.h (100%) rename contrib/tcpdump/oui.c => oui.c (100%) rename contrib/tcpdump/oui.h => oui.h (100%) rename contrib/tcpdump/packetdat.awk => packetdat.awk (100%) rename contrib/tcpdump/parsenfsfh.c => parsenfsfh.c (100%) rename contrib/tcpdump/pcap-missing.h => pcap-missing.h (100%) rename contrib/tcpdump/pcap_dump_ftell.c => pcap_dump_ftell.c (100%) rename contrib/tcpdump/pf.h => pf.h (100%) rename contrib/tcpdump/pmap_prot.h => pmap_prot.h (97%) rename contrib/tcpdump/ppp.h => ppp.h (100%) rename contrib/tcpdump/print-802_11.c => print-802_11.c (100%) rename contrib/tcpdump/print-ah.c => print-ah.c (100%) rename contrib/tcpdump/print-aodv.c => print-aodv.c (100%) rename contrib/tcpdump/print-ap1394.c => print-ap1394.c (100%) rename contrib/tcpdump/print-arcnet.c => print-arcnet.c (100%) rename contrib/tcpdump/print-arp.c => print-arp.c (100%) rename contrib/tcpdump/print-ascii.c => print-ascii.c (100%) rename contrib/tcpdump/print-atalk.c => print-atalk.c (100%) rename contrib/tcpdump/print-atm.c => print-atm.c (100%) rename contrib/tcpdump/print-beep.c => print-beep.c (100%) rename contrib/tcpdump/print-bfd.c => print-bfd.c (100%) rename contrib/tcpdump/print-bgp.c => print-bgp.c (100%) rename contrib/tcpdump/print-bootp.c => print-bootp.c (100%) rename contrib/tcpdump/print-bxxp.c => print-bxxp.c (100%) rename contrib/tcpdump/print-cdp.c => print-cdp.c (100%) rename contrib/tcpdump/print-chdlc.c => print-chdlc.c (100%) rename contrib/tcpdump/print-cip.c => print-cip.c (100%) rename contrib/tcpdump/print-cnfp.c => print-cnfp.c (100%) rename contrib/tcpdump/print-dccp.c => print-dccp.c (100%) rename contrib/tcpdump/print-decnet.c => print-decnet.c (100%) rename contrib/tcpdump/print-dhcp6.c => print-dhcp6.c (100%) rename contrib/tcpdump/print-domain.c => print-domain.c (100%) rename contrib/tcpdump/print-dvmrp.c => print-dvmrp.c (100%) rename contrib/tcpdump/print-eap.c => print-eap.c (100%) rename contrib/tcpdump/print-egp.c => print-egp.c (100%) rename contrib/tcpdump/print-eigrp.c => print-eigrp.c (100%) rename contrib/tcpdump/print-enc.c => print-enc.c (100%) rename contrib/tcpdump/print-esp.c => print-esp.c (100%) rename contrib/tcpdump/print-ether.c => print-ether.c (100%) rename contrib/tcpdump/print-fddi.c => print-fddi.c (100%) rename contrib/tcpdump/print-fr.c => print-fr.c (100%) rename contrib/tcpdump/print-frag6.c => print-frag6.c (100%) rename contrib/tcpdump/print-gre.c => print-gre.c (100%) rename contrib/tcpdump/print-hsrp.c => print-hsrp.c (100%) rename contrib/tcpdump/print-icmp.c => print-icmp.c (100%) rename contrib/tcpdump/print-icmp6.c => print-icmp6.c (100%) rename contrib/tcpdump/print-igmp.c => print-igmp.c (100%) rename contrib/tcpdump/print-igrp.c => print-igrp.c (100%) rename contrib/tcpdump/print-ip.c => print-ip.c (100%) rename contrib/tcpdump/print-ip6.c => print-ip6.c (100%) rename contrib/tcpdump/print-ip6opts.c => print-ip6opts.c (100%) rename contrib/tcpdump/print-ipcomp.c => print-ipcomp.c (100%) rename contrib/tcpdump/print-ipfc.c => print-ipfc.c (100%) rename contrib/tcpdump/print-ipx.c => print-ipx.c (100%) rename contrib/tcpdump/print-isakmp.c => print-isakmp.c (100%) rename contrib/tcpdump/print-isoclns.c => print-isoclns.c (100%) rename contrib/tcpdump/print-juniper.c => print-juniper.c (100%) rename contrib/tcpdump/print-krb.c => print-krb.c (100%) rename contrib/tcpdump/print-l2tp.c => print-l2tp.c (100%) rename contrib/tcpdump/print-lane.c => print-lane.c (100%) rename contrib/tcpdump/print-lcp.c => print-lcp.c (100%) rename contrib/tcpdump/print-ldp.c => print-ldp.c (100%) rename contrib/tcpdump/print-llc.c => print-llc.c (100%) rename contrib/tcpdump/print-lmp.c => print-lmp.c (100%) rename contrib/tcpdump/print-lspping.c => print-lspping.c (100%) rename contrib/tcpdump/print-lwres.c => print-lwres.c (100%) rename contrib/tcpdump/print-mobile.c => print-mobile.c (100%) rename contrib/tcpdump/print-mobility.c => print-mobility.c (100%) rename contrib/tcpdump/print-mpls.c => print-mpls.c (100%) rename contrib/tcpdump/print-msdp.c => print-msdp.c (100%) rename contrib/tcpdump/print-netbios.c => print-netbios.c (100%) rename contrib/tcpdump/print-nfs.c => print-nfs.c (100%) rename contrib/tcpdump/print-ntp.c => print-ntp.c (100%) rename contrib/tcpdump/print-null.c => print-null.c (100%) rename contrib/tcpdump/print-olsr.c => print-olsr.c (100%) rename contrib/tcpdump/print-ospf.c => print-ospf.c (100%) rename contrib/tcpdump/print-ospf6.c => print-ospf6.c (100%) rename contrib/tcpdump/print-pflog.c => print-pflog.c (100%) rename contrib/tcpdump/print-pgm.c => print-pgm.c (100%) rename contrib/tcpdump/print-pim.c => print-pim.c (100%) rename contrib/tcpdump/print-ppp.c => print-ppp.c (100%) rename contrib/tcpdump/print-pppoe.c => print-pppoe.c (100%) rename contrib/tcpdump/print-pptp.c => print-pptp.c (100%) rename contrib/tcpdump/print-radius.c => print-radius.c (100%) rename contrib/tcpdump/print-raw.c => print-raw.c (100%) rename contrib/tcpdump/print-rip.c => print-rip.c (100%) rename contrib/tcpdump/print-ripng.c => print-ripng.c (100%) rename contrib/tcpdump/print-rsvp.c => print-rsvp.c (100%) rename contrib/tcpdump/print-rt6.c => print-rt6.c (100%) rename contrib/tcpdump/print-rx.c => print-rx.c (100%) rename contrib/tcpdump/print-sctp.c => print-sctp.c (100%) rename contrib/tcpdump/print-sip.c => print-sip.c (100%) rename contrib/tcpdump/print-sl.c => print-sl.c (100%) rename contrib/tcpdump/print-sll.c => print-sll.c (100%) rename contrib/tcpdump/print-slow.c => print-slow.c (100%) rename contrib/tcpdump/print-smb.c => print-smb.c (100%) rename contrib/tcpdump/print-snmp.c => print-snmp.c (100%) rename contrib/tcpdump/print-stp.c => print-stp.c (100%) rename contrib/tcpdump/print-sunatm.c => print-sunatm.c (100%) rename contrib/tcpdump/print-sunrpc.c => print-sunrpc.c (100%) rename contrib/tcpdump/print-symantec.c => print-symantec.c (100%) rename contrib/tcpdump/print-syslog.c => print-syslog.c (100%) rename contrib/tcpdump/print-tcp.c => print-tcp.c (100%) rename contrib/tcpdump/print-telnet.c => print-telnet.c (100%) rename contrib/tcpdump/print-tftp.c => print-tftp.c (100%) rename contrib/tcpdump/print-timed.c => print-timed.c (100%) rename contrib/tcpdump/print-token.c => print-token.c (100%) rename contrib/tcpdump/print-udp.c => print-udp.c (100%) rename contrib/tcpdump/print-vjc.c => print-vjc.c (100%) rename contrib/tcpdump/print-vrrp.c => print-vrrp.c (100%) rename contrib/tcpdump/print-wb.c => print-wb.c (100%) rename contrib/tcpdump/print-zephyr.c => print-zephyr.c (100%) rename contrib/tcpdump/route6d.h => route6d.h (100%) rename contrib/tcpdump/rpc_auth.h => rpc_auth.h (96%) rename contrib/tcpdump/rpc_msg.h => rpc_msg.h (97%) rename contrib/tcpdump/rx.h => rx.h (100%) rename contrib/tcpdump/savestr.c => savestr.c (100%) rename contrib/tcpdump/savestr.h => savestr.h (100%) rename contrib/tcpdump/sctpConstants.h => sctpConstants.h (100%) rename contrib/tcpdump/sctpHeader.h => sctpHeader.h (100%) rename contrib/tcpdump/send-ack.awk => send-ack.awk (100%) rename contrib/tcpdump/setsignal.c => setsignal.c (100%) rename contrib/tcpdump/setsignal.h => setsignal.h (100%) rename contrib/tcpdump/slcompress.h => slcompress.h (100%) rename contrib/tcpdump/slip.h => slip.h (100%) rename contrib/tcpdump/sll.h => sll.h (100%) rename contrib/tcpdump/smb.h => smb.h (100%) rename contrib/tcpdump/smbutil.c => smbutil.c (100%) rename contrib/tcpdump/stime.awk => stime.awk (100%) rename contrib/tcpdump/strcasecmp.c => strcasecmp.c (100%) rename contrib/tcpdump/tcp.h => tcp.h (100%) rename contrib/tcpdump/tcpdump-stdinc.h => tcpdump-stdinc.h (100%) rename contrib/tcpdump/tcpdump.1 => tcpdump.1 (100%) rename contrib/tcpdump/tcpdump.c => tcpdump.c (100%) rename contrib/tcpdump/telnet.h => telnet.h (100%) rename {contrib/tcpdump/tests => tests}/.cvsignore (100%) rename {contrib/tcpdump/tests => tests}/02-sunrise-sunset-esp.puu (100%) rename {contrib/tcpdump/tests => tests}/08-sunrise-sunset-aes.puu (100%) rename {contrib/tcpdump/tests => tests}/08-sunrise-sunset-esp2.puu (100%) rename {contrib/tcpdump/tests => tests}/alltests.sh (100%) rename {contrib/tcpdump/tests => tests}/bgp_vpn_attrset.out (100%) rename {contrib/tcpdump/tests => tests}/bgp_vpn_attrset.sh (100%) rename {contrib/tcpdump/tests => tests}/eapon1.gdbinit (100%) rename {contrib/tcpdump/tests => tests}/eapon1.out (100%) rename {contrib/tcpdump/tests => tests}/eapon1.puu (100%) rename {contrib/tcpdump/tests => tests}/eapon1.sh (100%) rename {contrib/tcpdump/tests => tests}/eapon2.puu (100%) rename {contrib/tcpdump/tests => tests}/esp-secrets.txt (100%) rename {contrib/tcpdump/tests => tests}/esp0.out (100%) rename {contrib/tcpdump/tests => tests}/esp0.sh (100%) rename {contrib/tcpdump/tests => tests}/esp1.gdbinit (100%) rename {contrib/tcpdump/tests => tests}/esp1.out (100%) rename {contrib/tcpdump/tests => tests}/esp1.sh (100%) rename {contrib/tcpdump/tests => tests}/esp2.gdbinit (100%) rename {contrib/tcpdump/tests => tests}/esp2.out (100%) rename {contrib/tcpdump/tests => tests}/esp2.sh (100%) rename {contrib/tcpdump/tests => tests}/esp3.gdbinit (100%) rename {contrib/tcpdump/tests => tests}/esp3.sh (100%) rename {contrib/tcpdump/tests => tests}/esp4.gdbinit (100%) rename {contrib/tcpdump/tests => tests}/esp4.sh (100%) rename {contrib/tcpdump/tests => tests}/esp5.gdbinit (100%) rename {contrib/tcpdump/tests => tests}/esp5.out (100%) rename {contrib/tcpdump/tests => tests}/esp5.sh (100%) rename {contrib/tcpdump/tests => tests}/espudp1.out (100%) rename {contrib/tcpdump/tests => tests}/espudp1.puu (100%) rename {contrib/tcpdump/tests => tests}/espudp1.sh (100%) rename {contrib/tcpdump/tests => tests}/isakmp-delete-segfault.puu (100%) rename {contrib/tcpdump/tests => tests}/isakmp-identification-segfault.puu (100%) rename {contrib/tcpdump/tests => tests}/isakmp-pointer-loop.puu (100%) rename {contrib/tcpdump/tests => tests}/isakmp1.out (100%) rename {contrib/tcpdump/tests => tests}/isakmp1.sh (100%) rename {contrib/tcpdump/tests => tests}/isakmp2.out (100%) rename {contrib/tcpdump/tests => tests}/isakmp2.sh (100%) rename {contrib/tcpdump/tests => tests}/isakmp3.out (100%) rename {contrib/tcpdump/tests => tests}/isakmp3.sh (100%) rename {contrib/tcpdump/tests => tests}/isakmp4.out (100%) rename {contrib/tcpdump/tests => tests}/isakmp4.sh (100%) rename {contrib/tcpdump/tests => tests}/isakmp4500.puu (100%) rename {contrib/tcpdump/tests => tests}/lmp.out (100%) rename {contrib/tcpdump/tests => tests}/lmp.puu (100%) rename {contrib/tcpdump/tests => tests}/lmp.sh (100%) rename {contrib/tcpdump/tests => tests}/mpls-ldp-hello.out (100%) rename {contrib/tcpdump/tests => tests}/mpls-ldp-hello.puu (100%) rename {contrib/tcpdump/tests => tests}/mpls-ldp-hello.sh (100%) rename {contrib/tcpdump/tests => tests}/ospf-gmpls.out (100%) rename {contrib/tcpdump/tests => tests}/ospf-gmpls.puu (100%) rename {contrib/tcpdump/tests => tests}/ospf-gmpls.sh (100%) rename {contrib/tcpdump/tests => tests}/print-A.out (100%) rename {contrib/tcpdump/tests => tests}/print-AA.out (100%) rename {contrib/tcpdump/tests => tests}/print-X.out (100%) rename {contrib/tcpdump/tests => tests}/print-XX.out (100%) rename {contrib/tcpdump/tests => tests}/print-capX.out (100%) rename {contrib/tcpdump/tests => tests}/print-capXX.out (100%) rename {contrib/tcpdump/tests => tests}/print-flags.puu (100%) rename {contrib/tcpdump/tests => tests}/print-flags.sh (100%) rename {contrib/tcpdump/tests => tests}/print-x.out (100%) rename {contrib/tcpdump/tests => tests}/print-xx.out (100%) rename contrib/tcpdump/tftp.h => tftp.h (100%) rename contrib/tcpdump/timed.h => timed.h (100%) rename contrib/tcpdump/token.h => token.h (100%) rename contrib/tcpdump/udp.h => udp.h (100%) rename contrib/tcpdump/util.c => util.c (100%) rename contrib/tcpdump/vfprintf.c => vfprintf.c (100%) diff --git a/contrib/tcpdump/CHANGES b/CHANGES similarity index 100% rename from contrib/tcpdump/CHANGES rename to CHANGES diff --git a/contrib/tcpdump/CREDITS b/CREDITS similarity index 100% rename from contrib/tcpdump/CREDITS rename to CREDITS diff --git a/contrib/tcpdump/FILES b/FILES similarity index 100% rename from contrib/tcpdump/FILES rename to FILES diff --git a/contrib/tcpdump/INSTALL b/INSTALL similarity index 100% rename from contrib/tcpdump/INSTALL rename to INSTALL diff --git a/contrib/tcpdump/LICENSE b/LICENSE similarity index 100% rename from contrib/tcpdump/LICENSE rename to LICENSE diff --git a/contrib/tcpdump/Makefile-devel-adds b/Makefile-devel-adds similarity index 100% rename from contrib/tcpdump/Makefile-devel-adds rename to Makefile-devel-adds diff --git a/contrib/tcpdump/Makefile.in b/Makefile.in similarity index 100% rename from contrib/tcpdump/Makefile.in rename to Makefile.in diff --git a/contrib/tcpdump/PLATFORMS b/PLATFORMS similarity index 100% rename from contrib/tcpdump/PLATFORMS rename to PLATFORMS diff --git a/contrib/tcpdump/README b/README similarity index 100% rename from contrib/tcpdump/README rename to README diff --git a/contrib/tcpdump/Readme.Win32 b/Readme.Win32 similarity index 100% rename from contrib/tcpdump/Readme.Win32 rename to Readme.Win32 diff --git a/contrib/tcpdump/TODO b/TODO similarity index 100% rename from contrib/tcpdump/TODO rename to TODO diff --git a/contrib/tcpdump/VERSION b/VERSION similarity index 100% rename from contrib/tcpdump/VERSION rename to VERSION diff --git a/contrib/tcpdump/acconfig.h b/acconfig.h similarity index 100% rename from contrib/tcpdump/acconfig.h rename to acconfig.h diff --git a/contrib/tcpdump/aclocal.m4 b/aclocal.m4 similarity index 100% rename from contrib/tcpdump/aclocal.m4 rename to aclocal.m4 diff --git a/contrib/tcpdump/acsite.m4 b/acsite.m4 similarity index 100% rename from contrib/tcpdump/acsite.m4 rename to acsite.m4 diff --git a/contrib/tcpdump/addrtoname.c b/addrtoname.c similarity index 100% rename from contrib/tcpdump/addrtoname.c rename to addrtoname.c diff --git a/contrib/tcpdump/addrtoname.h b/addrtoname.h similarity index 100% rename from contrib/tcpdump/addrtoname.h rename to addrtoname.h diff --git a/contrib/tcpdump/af.c b/af.c similarity index 100% rename from contrib/tcpdump/af.c rename to af.c diff --git a/contrib/tcpdump/af.h b/af.h similarity index 100% rename from contrib/tcpdump/af.h rename to af.h diff --git a/contrib/tcpdump/ah.h b/ah.h similarity index 100% rename from contrib/tcpdump/ah.h rename to ah.h diff --git a/contrib/tcpdump/aodv.h b/aodv.h similarity index 100% rename from contrib/tcpdump/aodv.h rename to aodv.h diff --git a/contrib/tcpdump/appletalk.h b/appletalk.h similarity index 100% rename from contrib/tcpdump/appletalk.h rename to appletalk.h diff --git a/contrib/tcpdump/arcnet.h b/arcnet.h similarity index 100% rename from contrib/tcpdump/arcnet.h rename to arcnet.h diff --git a/contrib/tcpdump/atime.awk b/atime.awk similarity index 100% rename from contrib/tcpdump/atime.awk rename to atime.awk diff --git a/contrib/tcpdump/atm.h b/atm.h similarity index 100% rename from contrib/tcpdump/atm.h rename to atm.h diff --git a/contrib/tcpdump/atmuni31.h b/atmuni31.h similarity index 100% rename from contrib/tcpdump/atmuni31.h rename to atmuni31.h diff --git a/contrib/tcpdump/bgp.h b/bgp.h similarity index 100% rename from contrib/tcpdump/bgp.h rename to bgp.h diff --git a/contrib/tcpdump/bootp.h b/bootp.h similarity index 100% rename from contrib/tcpdump/bootp.h rename to bootp.h diff --git a/contrib/tcpdump/bpf_dump.c b/bpf_dump.c similarity index 100% rename from contrib/tcpdump/bpf_dump.c rename to bpf_dump.c diff --git a/contrib/tcpdump/chdlc.h b/chdlc.h similarity index 100% rename from contrib/tcpdump/chdlc.h rename to chdlc.h diff --git a/contrib/tcpdump/config.guess b/config.guess similarity index 100% rename from contrib/tcpdump/config.guess rename to config.guess diff --git a/contrib/tcpdump/config.h.in b/config.h.in similarity index 100% rename from contrib/tcpdump/config.h.in rename to config.h.in diff --git a/contrib/tcpdump/config.sub b/config.sub similarity index 100% rename from contrib/tcpdump/config.sub rename to config.sub diff --git a/contrib/tcpdump/configure b/configure similarity index 100% rename from contrib/tcpdump/configure rename to configure diff --git a/contrib/tcpdump/configure.in b/configure.in similarity index 100% rename from contrib/tcpdump/configure.in rename to configure.in diff --git a/contrib/tcpdump/.cvsignore b/contrib/tcpdump/.cvsignore deleted file mode 100644 index 791f14cdb7cf..000000000000 --- a/contrib/tcpdump/.cvsignore +++ /dev/null @@ -1,12 +0,0 @@ -version.c -Makefile -Makefile-devel.in -config.status -config.log -config.cache -config.h -.devel -stamp-h -stamp-h.in -tcpdump -autom4te.cache diff --git a/contrib/tcpdump/cpack.c b/cpack.c similarity index 100% rename from contrib/tcpdump/cpack.c rename to cpack.c diff --git a/contrib/tcpdump/cpack.h b/cpack.h similarity index 100% rename from contrib/tcpdump/cpack.h rename to cpack.h diff --git a/contrib/tcpdump/dccp.h b/dccp.h similarity index 100% rename from contrib/tcpdump/dccp.h rename to dccp.h diff --git a/contrib/tcpdump/decnet.h b/decnet.h similarity index 100% rename from contrib/tcpdump/decnet.h rename to decnet.h diff --git a/contrib/tcpdump/decode_prefix.h b/decode_prefix.h similarity index 100% rename from contrib/tcpdump/decode_prefix.h rename to decode_prefix.h diff --git a/contrib/tcpdump/dhcp6.h b/dhcp6.h similarity index 100% rename from contrib/tcpdump/dhcp6.h rename to dhcp6.h diff --git a/contrib/tcpdump/dhcp6opt.h b/dhcp6opt.h similarity index 100% rename from contrib/tcpdump/dhcp6opt.h rename to dhcp6opt.h diff --git a/contrib/tcpdump/enc.h b/enc.h similarity index 100% rename from contrib/tcpdump/enc.h rename to enc.h diff --git a/contrib/tcpdump/esp.h b/esp.h similarity index 100% rename from contrib/tcpdump/esp.h rename to esp.h diff --git a/contrib/tcpdump/ether.h b/ether.h similarity index 100% rename from contrib/tcpdump/ether.h rename to ether.h diff --git a/contrib/tcpdump/ethertype.h b/ethertype.h similarity index 100% rename from contrib/tcpdump/ethertype.h rename to ethertype.h diff --git a/contrib/tcpdump/extract.h b/extract.h similarity index 100% rename from contrib/tcpdump/extract.h rename to extract.h diff --git a/contrib/tcpdump/fddi.h b/fddi.h similarity index 100% rename from contrib/tcpdump/fddi.h rename to fddi.h diff --git a/contrib/tcpdump/gmpls.c b/gmpls.c similarity index 100% rename from contrib/tcpdump/gmpls.c rename to gmpls.c diff --git a/contrib/tcpdump/gmpls.h b/gmpls.h similarity index 100% rename from contrib/tcpdump/gmpls.h rename to gmpls.h diff --git a/contrib/tcpdump/gmt2local.c b/gmt2local.c similarity index 100% rename from contrib/tcpdump/gmt2local.c rename to gmt2local.c diff --git a/contrib/tcpdump/gmt2local.h b/gmt2local.h similarity index 100% rename from contrib/tcpdump/gmt2local.h rename to gmt2local.h diff --git a/contrib/tcpdump/icmp6.h b/icmp6.h similarity index 100% rename from contrib/tcpdump/icmp6.h rename to icmp6.h diff --git a/contrib/tcpdump/ieee802_11.h b/ieee802_11.h similarity index 100% rename from contrib/tcpdump/ieee802_11.h rename to ieee802_11.h diff --git a/contrib/tcpdump/ieee802_11_radio.h b/ieee802_11_radio.h similarity index 98% rename from contrib/tcpdump/ieee802_11_radio.h rename to ieee802_11_radio.h index 05c8a89e0026..f4416ab9959a 100644 --- a/contrib/tcpdump/ieee802_11_radio.h +++ b/ieee802_11_radio.h @@ -1,4 +1,4 @@ -/* $FreeBSD$ */ +/* $FreeBSD: vendor/tcpdump/dist/contrib/tcpdump/ieee802_11_radio.h 172683 2007-10-16 02:20:42Z mlaier $ */ /* $NetBSD: ieee802_11_radio.h,v 1.2 2006/02/26 03:04:03 dyoung Exp $ */ /* $Header: /tcpdump/master/tcpdump/ieee802_11_radio.h,v 1.1.2.1 2006/06/13 22:24:45 guy Exp $ */ diff --git a/contrib/tcpdump/igrp.h b/igrp.h similarity index 100% rename from contrib/tcpdump/igrp.h rename to igrp.h diff --git a/contrib/tcpdump/install-sh b/install-sh similarity index 100% rename from contrib/tcpdump/install-sh rename to install-sh diff --git a/contrib/tcpdump/interface.h b/interface.h similarity index 100% rename from contrib/tcpdump/interface.h rename to interface.h diff --git a/contrib/tcpdump/ip.h b/ip.h similarity index 100% rename from contrib/tcpdump/ip.h rename to ip.h diff --git a/contrib/tcpdump/ip6.h b/ip6.h similarity index 100% rename from contrib/tcpdump/ip6.h rename to ip6.h diff --git a/contrib/tcpdump/ipfc.h b/ipfc.h similarity index 100% rename from contrib/tcpdump/ipfc.h rename to ipfc.h diff --git a/contrib/tcpdump/ipproto.c b/ipproto.c similarity index 100% rename from contrib/tcpdump/ipproto.c rename to ipproto.c diff --git a/contrib/tcpdump/ipproto.h b/ipproto.h similarity index 98% rename from contrib/tcpdump/ipproto.h rename to ipproto.h index 1800db4580da..7134d7d5ebe7 100644 --- a/contrib/tcpdump/ipproto.h +++ b/ipproto.h @@ -34,7 +34,7 @@ * * From: * @(#)in.h 8.3 (Berkeley) 1/3/94 - * $FreeBSD$ + * $FreeBSD: vendor/tcpdump/dist/contrib/tcpdump/ipproto.h 162017 2006-09-04 20:04:42Z sam $ */ extern struct tok ipproto_values[]; diff --git a/contrib/tcpdump/ipsec_doi.h b/ipsec_doi.h similarity index 100% rename from contrib/tcpdump/ipsec_doi.h rename to ipsec_doi.h diff --git a/contrib/tcpdump/ipx.h b/ipx.h similarity index 100% rename from contrib/tcpdump/ipx.h rename to ipx.h diff --git a/contrib/tcpdump/isakmp.h b/isakmp.h similarity index 100% rename from contrib/tcpdump/isakmp.h rename to isakmp.h diff --git a/contrib/tcpdump/l2tp.h b/l2tp.h similarity index 100% rename from contrib/tcpdump/l2tp.h rename to l2tp.h diff --git a/contrib/tcpdump/l2vpn.c b/l2vpn.c similarity index 100% rename from contrib/tcpdump/l2vpn.c rename to l2vpn.c diff --git a/contrib/tcpdump/l2vpn.h b/l2vpn.h similarity index 100% rename from contrib/tcpdump/l2vpn.h rename to l2vpn.h diff --git a/contrib/tcpdump/lane.h b/lane.h similarity index 100% rename from contrib/tcpdump/lane.h rename to lane.h diff --git a/contrib/tcpdump/lbl/gnuc.h b/lbl/gnuc.h similarity index 100% rename from contrib/tcpdump/lbl/gnuc.h rename to lbl/gnuc.h diff --git a/contrib/tcpdump/lbl/os-osf4.h b/lbl/os-osf4.h similarity index 100% rename from contrib/tcpdump/lbl/os-osf4.h rename to lbl/os-osf4.h diff --git a/contrib/tcpdump/lbl/os-solaris2.h b/lbl/os-solaris2.h similarity index 100% rename from contrib/tcpdump/lbl/os-solaris2.h rename to lbl/os-solaris2.h diff --git a/contrib/tcpdump/lbl/os-sunos4.h b/lbl/os-sunos4.h similarity index 100% rename from contrib/tcpdump/lbl/os-sunos4.h rename to lbl/os-sunos4.h diff --git a/contrib/tcpdump/lbl/os-ultrix4.h b/lbl/os-ultrix4.h similarity index 100% rename from contrib/tcpdump/lbl/os-ultrix4.h rename to lbl/os-ultrix4.h diff --git a/contrib/tcpdump/llc.h b/llc.h similarity index 100% rename from contrib/tcpdump/llc.h rename to llc.h diff --git a/contrib/tcpdump/machdep.c b/machdep.c similarity index 100% rename from contrib/tcpdump/machdep.c rename to machdep.c diff --git a/contrib/tcpdump/machdep.h b/machdep.h similarity index 100% rename from contrib/tcpdump/machdep.h rename to machdep.h diff --git a/contrib/tcpdump/makemib b/makemib similarity index 100% rename from contrib/tcpdump/makemib rename to makemib diff --git a/contrib/tcpdump/mib.h b/mib.h similarity index 100% rename from contrib/tcpdump/mib.h rename to mib.h diff --git a/contrib/tcpdump/missing/addrinfo.h b/missing/addrinfo.h similarity index 100% rename from contrib/tcpdump/missing/addrinfo.h rename to missing/addrinfo.h diff --git a/contrib/tcpdump/missing/addrsize.h b/missing/addrsize.h similarity index 100% rename from contrib/tcpdump/missing/addrsize.h rename to missing/addrsize.h diff --git a/contrib/tcpdump/missing/bittypes.h b/missing/bittypes.h similarity index 100% rename from contrib/tcpdump/missing/bittypes.h rename to missing/bittypes.h diff --git a/contrib/tcpdump/missing/cdecl_ext.h b/missing/cdecl_ext.h similarity index 100% rename from contrib/tcpdump/missing/cdecl_ext.h rename to missing/cdecl_ext.h diff --git a/contrib/tcpdump/missing/datalinks.c b/missing/datalinks.c similarity index 100% rename from contrib/tcpdump/missing/datalinks.c rename to missing/datalinks.c diff --git a/contrib/tcpdump/missing/dlnames.c b/missing/dlnames.c similarity index 100% rename from contrib/tcpdump/missing/dlnames.c rename to missing/dlnames.c diff --git a/contrib/tcpdump/missing/getaddrinfo.c b/missing/getaddrinfo.c similarity index 100% rename from contrib/tcpdump/missing/getaddrinfo.c rename to missing/getaddrinfo.c diff --git a/contrib/tcpdump/missing/getnameinfo.c b/missing/getnameinfo.c similarity index 100% rename from contrib/tcpdump/missing/getnameinfo.c rename to missing/getnameinfo.c diff --git a/contrib/tcpdump/missing/inet_aton.c b/missing/inet_aton.c similarity index 100% rename from contrib/tcpdump/missing/inet_aton.c rename to missing/inet_aton.c diff --git a/contrib/tcpdump/missing/inet_ntop.c b/missing/inet_ntop.c similarity index 100% rename from contrib/tcpdump/missing/inet_ntop.c rename to missing/inet_ntop.c diff --git a/contrib/tcpdump/missing/inet_pton.c b/missing/inet_pton.c similarity index 100% rename from contrib/tcpdump/missing/inet_pton.c rename to missing/inet_pton.c diff --git a/contrib/tcpdump/missing/resolv6.h b/missing/resolv6.h similarity index 100% rename from contrib/tcpdump/missing/resolv6.h rename to missing/resolv6.h diff --git a/contrib/tcpdump/missing/resolv_ext.h b/missing/resolv_ext.h similarity index 100% rename from contrib/tcpdump/missing/resolv_ext.h rename to missing/resolv_ext.h diff --git a/contrib/tcpdump/missing/snprintf.c b/missing/snprintf.c similarity index 100% rename from contrib/tcpdump/missing/snprintf.c rename to missing/snprintf.c diff --git a/contrib/tcpdump/missing/sockstorage.h b/missing/sockstorage.h similarity index 100% rename from contrib/tcpdump/missing/sockstorage.h rename to missing/sockstorage.h diff --git a/contrib/tcpdump/missing/strdup.c b/missing/strdup.c similarity index 100% rename from contrib/tcpdump/missing/strdup.c rename to missing/strdup.c diff --git a/contrib/tcpdump/missing/strlcat.c b/missing/strlcat.c similarity index 100% rename from contrib/tcpdump/missing/strlcat.c rename to missing/strlcat.c diff --git a/contrib/tcpdump/missing/strlcpy.c b/missing/strlcpy.c similarity index 100% rename from contrib/tcpdump/missing/strlcpy.c rename to missing/strlcpy.c diff --git a/contrib/tcpdump/missing/strsep.c b/missing/strsep.c similarity index 100% rename from contrib/tcpdump/missing/strsep.c rename to missing/strsep.c diff --git a/contrib/tcpdump/mkdep b/mkdep similarity index 100% rename from contrib/tcpdump/mkdep rename to mkdep diff --git a/contrib/tcpdump/mpls.h b/mpls.h similarity index 100% rename from contrib/tcpdump/mpls.h rename to mpls.h diff --git a/contrib/tcpdump/nameser.h b/nameser.h similarity index 100% rename from contrib/tcpdump/nameser.h rename to nameser.h diff --git a/contrib/tcpdump/netbios.h b/netbios.h similarity index 100% rename from contrib/tcpdump/netbios.h rename to netbios.h diff --git a/contrib/tcpdump/netdissect.h b/netdissect.h similarity index 100% rename from contrib/tcpdump/netdissect.h rename to netdissect.h diff --git a/contrib/tcpdump/nfs.h b/nfs.h similarity index 100% rename from contrib/tcpdump/nfs.h rename to nfs.h diff --git a/contrib/tcpdump/nfsfh.h b/nfsfh.h similarity index 100% rename from contrib/tcpdump/nfsfh.h rename to nfsfh.h diff --git a/contrib/tcpdump/nfsv2.h b/nfsv2.h similarity index 100% rename from contrib/tcpdump/nfsv2.h rename to nfsv2.h diff --git a/contrib/tcpdump/nlpid.c b/nlpid.c similarity index 100% rename from contrib/tcpdump/nlpid.c rename to nlpid.c diff --git a/contrib/tcpdump/nlpid.h b/nlpid.h similarity index 100% rename from contrib/tcpdump/nlpid.h rename to nlpid.h diff --git a/contrib/tcpdump/ntp.h b/ntp.h similarity index 100% rename from contrib/tcpdump/ntp.h rename to ntp.h diff --git a/contrib/tcpdump/oakley.h b/oakley.h similarity index 100% rename from contrib/tcpdump/oakley.h rename to oakley.h diff --git a/contrib/tcpdump/ospf.h b/ospf.h similarity index 100% rename from contrib/tcpdump/ospf.h rename to ospf.h diff --git a/contrib/tcpdump/ospf6.h b/ospf6.h similarity index 100% rename from contrib/tcpdump/ospf6.h rename to ospf6.h diff --git a/contrib/tcpdump/oui.c b/oui.c similarity index 100% rename from contrib/tcpdump/oui.c rename to oui.c diff --git a/contrib/tcpdump/oui.h b/oui.h similarity index 100% rename from contrib/tcpdump/oui.h rename to oui.h diff --git a/contrib/tcpdump/packetdat.awk b/packetdat.awk similarity index 100% rename from contrib/tcpdump/packetdat.awk rename to packetdat.awk diff --git a/contrib/tcpdump/parsenfsfh.c b/parsenfsfh.c similarity index 100% rename from contrib/tcpdump/parsenfsfh.c rename to parsenfsfh.c diff --git a/contrib/tcpdump/pcap-missing.h b/pcap-missing.h similarity index 100% rename from contrib/tcpdump/pcap-missing.h rename to pcap-missing.h diff --git a/contrib/tcpdump/pcap_dump_ftell.c b/pcap_dump_ftell.c similarity index 100% rename from contrib/tcpdump/pcap_dump_ftell.c rename to pcap_dump_ftell.c diff --git a/contrib/tcpdump/pf.h b/pf.h similarity index 100% rename from contrib/tcpdump/pf.h rename to pf.h diff --git a/contrib/tcpdump/pmap_prot.h b/pmap_prot.h similarity index 97% rename from contrib/tcpdump/pmap_prot.h rename to pmap_prot.h index 17cb92ff9a78..cf6b620b39fe 100644 --- a/contrib/tcpdump/pmap_prot.h +++ b/pmap_prot.h @@ -29,7 +29,7 @@ * * from: @(#)pmap_prot.h 1.14 88/02/08 SMI * from: @(#)pmap_prot.h 2.1 88/07/29 4.0 RPCSRC - * $FreeBSD$ + * $FreeBSD: vendor/tcpdump/dist/contrib/tcpdump/pmap_prot.h 147899 2005-07-11 03:54:22Z sam $ */ /* diff --git a/contrib/tcpdump/ppp.h b/ppp.h similarity index 100% rename from contrib/tcpdump/ppp.h rename to ppp.h diff --git a/contrib/tcpdump/print-802_11.c b/print-802_11.c similarity index 100% rename from contrib/tcpdump/print-802_11.c rename to print-802_11.c diff --git a/contrib/tcpdump/print-ah.c b/print-ah.c similarity index 100% rename from contrib/tcpdump/print-ah.c rename to print-ah.c diff --git a/contrib/tcpdump/print-aodv.c b/print-aodv.c similarity index 100% rename from contrib/tcpdump/print-aodv.c rename to print-aodv.c diff --git a/contrib/tcpdump/print-ap1394.c b/print-ap1394.c similarity index 100% rename from contrib/tcpdump/print-ap1394.c rename to print-ap1394.c diff --git a/contrib/tcpdump/print-arcnet.c b/print-arcnet.c similarity index 100% rename from contrib/tcpdump/print-arcnet.c rename to print-arcnet.c diff --git a/contrib/tcpdump/print-arp.c b/print-arp.c similarity index 100% rename from contrib/tcpdump/print-arp.c rename to print-arp.c diff --git a/contrib/tcpdump/print-ascii.c b/print-ascii.c similarity index 100% rename from contrib/tcpdump/print-ascii.c rename to print-ascii.c diff --git a/contrib/tcpdump/print-atalk.c b/print-atalk.c similarity index 100% rename from contrib/tcpdump/print-atalk.c rename to print-atalk.c diff --git a/contrib/tcpdump/print-atm.c b/print-atm.c similarity index 100% rename from contrib/tcpdump/print-atm.c rename to print-atm.c diff --git a/contrib/tcpdump/print-beep.c b/print-beep.c similarity index 100% rename from contrib/tcpdump/print-beep.c rename to print-beep.c diff --git a/contrib/tcpdump/print-bfd.c b/print-bfd.c similarity index 100% rename from contrib/tcpdump/print-bfd.c rename to print-bfd.c diff --git a/contrib/tcpdump/print-bgp.c b/print-bgp.c similarity index 100% rename from contrib/tcpdump/print-bgp.c rename to print-bgp.c diff --git a/contrib/tcpdump/print-bootp.c b/print-bootp.c similarity index 100% rename from contrib/tcpdump/print-bootp.c rename to print-bootp.c diff --git a/contrib/tcpdump/print-bxxp.c b/print-bxxp.c similarity index 100% rename from contrib/tcpdump/print-bxxp.c rename to print-bxxp.c diff --git a/contrib/tcpdump/print-cdp.c b/print-cdp.c similarity index 100% rename from contrib/tcpdump/print-cdp.c rename to print-cdp.c diff --git a/contrib/tcpdump/print-chdlc.c b/print-chdlc.c similarity index 100% rename from contrib/tcpdump/print-chdlc.c rename to print-chdlc.c diff --git a/contrib/tcpdump/print-cip.c b/print-cip.c similarity index 100% rename from contrib/tcpdump/print-cip.c rename to print-cip.c diff --git a/contrib/tcpdump/print-cnfp.c b/print-cnfp.c similarity index 100% rename from contrib/tcpdump/print-cnfp.c rename to print-cnfp.c diff --git a/contrib/tcpdump/print-dccp.c b/print-dccp.c similarity index 100% rename from contrib/tcpdump/print-dccp.c rename to print-dccp.c diff --git a/contrib/tcpdump/print-decnet.c b/print-decnet.c similarity index 100% rename from contrib/tcpdump/print-decnet.c rename to print-decnet.c diff --git a/contrib/tcpdump/print-dhcp6.c b/print-dhcp6.c similarity index 100% rename from contrib/tcpdump/print-dhcp6.c rename to print-dhcp6.c diff --git a/contrib/tcpdump/print-domain.c b/print-domain.c similarity index 100% rename from contrib/tcpdump/print-domain.c rename to print-domain.c diff --git a/contrib/tcpdump/print-dvmrp.c b/print-dvmrp.c similarity index 100% rename from contrib/tcpdump/print-dvmrp.c rename to print-dvmrp.c diff --git a/contrib/tcpdump/print-eap.c b/print-eap.c similarity index 100% rename from contrib/tcpdump/print-eap.c rename to print-eap.c diff --git a/contrib/tcpdump/print-egp.c b/print-egp.c similarity index 100% rename from contrib/tcpdump/print-egp.c rename to print-egp.c diff --git a/contrib/tcpdump/print-eigrp.c b/print-eigrp.c similarity index 100% rename from contrib/tcpdump/print-eigrp.c rename to print-eigrp.c diff --git a/contrib/tcpdump/print-enc.c b/print-enc.c similarity index 100% rename from contrib/tcpdump/print-enc.c rename to print-enc.c diff --git a/contrib/tcpdump/print-esp.c b/print-esp.c similarity index 100% rename from contrib/tcpdump/print-esp.c rename to print-esp.c diff --git a/contrib/tcpdump/print-ether.c b/print-ether.c similarity index 100% rename from contrib/tcpdump/print-ether.c rename to print-ether.c diff --git a/contrib/tcpdump/print-fddi.c b/print-fddi.c similarity index 100% rename from contrib/tcpdump/print-fddi.c rename to print-fddi.c diff --git a/contrib/tcpdump/print-fr.c b/print-fr.c similarity index 100% rename from contrib/tcpdump/print-fr.c rename to print-fr.c diff --git a/contrib/tcpdump/print-frag6.c b/print-frag6.c similarity index 100% rename from contrib/tcpdump/print-frag6.c rename to print-frag6.c diff --git a/contrib/tcpdump/print-gre.c b/print-gre.c similarity index 100% rename from contrib/tcpdump/print-gre.c rename to print-gre.c diff --git a/contrib/tcpdump/print-hsrp.c b/print-hsrp.c similarity index 100% rename from contrib/tcpdump/print-hsrp.c rename to print-hsrp.c diff --git a/contrib/tcpdump/print-icmp.c b/print-icmp.c similarity index 100% rename from contrib/tcpdump/print-icmp.c rename to print-icmp.c diff --git a/contrib/tcpdump/print-icmp6.c b/print-icmp6.c similarity index 100% rename from contrib/tcpdump/print-icmp6.c rename to print-icmp6.c diff --git a/contrib/tcpdump/print-igmp.c b/print-igmp.c similarity index 100% rename from contrib/tcpdump/print-igmp.c rename to print-igmp.c diff --git a/contrib/tcpdump/print-igrp.c b/print-igrp.c similarity index 100% rename from contrib/tcpdump/print-igrp.c rename to print-igrp.c diff --git a/contrib/tcpdump/print-ip.c b/print-ip.c similarity index 100% rename from contrib/tcpdump/print-ip.c rename to print-ip.c diff --git a/contrib/tcpdump/print-ip6.c b/print-ip6.c similarity index 100% rename from contrib/tcpdump/print-ip6.c rename to print-ip6.c diff --git a/contrib/tcpdump/print-ip6opts.c b/print-ip6opts.c similarity index 100% rename from contrib/tcpdump/print-ip6opts.c rename to print-ip6opts.c diff --git a/contrib/tcpdump/print-ipcomp.c b/print-ipcomp.c similarity index 100% rename from contrib/tcpdump/print-ipcomp.c rename to print-ipcomp.c diff --git a/contrib/tcpdump/print-ipfc.c b/print-ipfc.c similarity index 100% rename from contrib/tcpdump/print-ipfc.c rename to print-ipfc.c diff --git a/contrib/tcpdump/print-ipx.c b/print-ipx.c similarity index 100% rename from contrib/tcpdump/print-ipx.c rename to print-ipx.c diff --git a/contrib/tcpdump/print-isakmp.c b/print-isakmp.c similarity index 100% rename from contrib/tcpdump/print-isakmp.c rename to print-isakmp.c diff --git a/contrib/tcpdump/print-isoclns.c b/print-isoclns.c similarity index 100% rename from contrib/tcpdump/print-isoclns.c rename to print-isoclns.c diff --git a/contrib/tcpdump/print-juniper.c b/print-juniper.c similarity index 100% rename from contrib/tcpdump/print-juniper.c rename to print-juniper.c diff --git a/contrib/tcpdump/print-krb.c b/print-krb.c similarity index 100% rename from contrib/tcpdump/print-krb.c rename to print-krb.c diff --git a/contrib/tcpdump/print-l2tp.c b/print-l2tp.c similarity index 100% rename from contrib/tcpdump/print-l2tp.c rename to print-l2tp.c diff --git a/contrib/tcpdump/print-lane.c b/print-lane.c similarity index 100% rename from contrib/tcpdump/print-lane.c rename to print-lane.c diff --git a/contrib/tcpdump/print-lcp.c b/print-lcp.c similarity index 100% rename from contrib/tcpdump/print-lcp.c rename to print-lcp.c diff --git a/contrib/tcpdump/print-ldp.c b/print-ldp.c similarity index 100% rename from contrib/tcpdump/print-ldp.c rename to print-ldp.c diff --git a/contrib/tcpdump/print-llc.c b/print-llc.c similarity index 100% rename from contrib/tcpdump/print-llc.c rename to print-llc.c diff --git a/contrib/tcpdump/print-lmp.c b/print-lmp.c similarity index 100% rename from contrib/tcpdump/print-lmp.c rename to print-lmp.c diff --git a/contrib/tcpdump/print-lspping.c b/print-lspping.c similarity index 100% rename from contrib/tcpdump/print-lspping.c rename to print-lspping.c diff --git a/contrib/tcpdump/print-lwres.c b/print-lwres.c similarity index 100% rename from contrib/tcpdump/print-lwres.c rename to print-lwres.c diff --git a/contrib/tcpdump/print-mobile.c b/print-mobile.c similarity index 100% rename from contrib/tcpdump/print-mobile.c rename to print-mobile.c diff --git a/contrib/tcpdump/print-mobility.c b/print-mobility.c similarity index 100% rename from contrib/tcpdump/print-mobility.c rename to print-mobility.c diff --git a/contrib/tcpdump/print-mpls.c b/print-mpls.c similarity index 100% rename from contrib/tcpdump/print-mpls.c rename to print-mpls.c diff --git a/contrib/tcpdump/print-msdp.c b/print-msdp.c similarity index 100% rename from contrib/tcpdump/print-msdp.c rename to print-msdp.c diff --git a/contrib/tcpdump/print-netbios.c b/print-netbios.c similarity index 100% rename from contrib/tcpdump/print-netbios.c rename to print-netbios.c diff --git a/contrib/tcpdump/print-nfs.c b/print-nfs.c similarity index 100% rename from contrib/tcpdump/print-nfs.c rename to print-nfs.c diff --git a/contrib/tcpdump/print-ntp.c b/print-ntp.c similarity index 100% rename from contrib/tcpdump/print-ntp.c rename to print-ntp.c diff --git a/contrib/tcpdump/print-null.c b/print-null.c similarity index 100% rename from contrib/tcpdump/print-null.c rename to print-null.c diff --git a/contrib/tcpdump/print-olsr.c b/print-olsr.c similarity index 100% rename from contrib/tcpdump/print-olsr.c rename to print-olsr.c diff --git a/contrib/tcpdump/print-ospf.c b/print-ospf.c similarity index 100% rename from contrib/tcpdump/print-ospf.c rename to print-ospf.c diff --git a/contrib/tcpdump/print-ospf6.c b/print-ospf6.c similarity index 100% rename from contrib/tcpdump/print-ospf6.c rename to print-ospf6.c diff --git a/contrib/tcpdump/print-pflog.c b/print-pflog.c similarity index 100% rename from contrib/tcpdump/print-pflog.c rename to print-pflog.c diff --git a/contrib/tcpdump/print-pgm.c b/print-pgm.c similarity index 100% rename from contrib/tcpdump/print-pgm.c rename to print-pgm.c diff --git a/contrib/tcpdump/print-pim.c b/print-pim.c similarity index 100% rename from contrib/tcpdump/print-pim.c rename to print-pim.c diff --git a/contrib/tcpdump/print-ppp.c b/print-ppp.c similarity index 100% rename from contrib/tcpdump/print-ppp.c rename to print-ppp.c diff --git a/contrib/tcpdump/print-pppoe.c b/print-pppoe.c similarity index 100% rename from contrib/tcpdump/print-pppoe.c rename to print-pppoe.c diff --git a/contrib/tcpdump/print-pptp.c b/print-pptp.c similarity index 100% rename from contrib/tcpdump/print-pptp.c rename to print-pptp.c diff --git a/contrib/tcpdump/print-radius.c b/print-radius.c similarity index 100% rename from contrib/tcpdump/print-radius.c rename to print-radius.c diff --git a/contrib/tcpdump/print-raw.c b/print-raw.c similarity index 100% rename from contrib/tcpdump/print-raw.c rename to print-raw.c diff --git a/contrib/tcpdump/print-rip.c b/print-rip.c similarity index 100% rename from contrib/tcpdump/print-rip.c rename to print-rip.c diff --git a/contrib/tcpdump/print-ripng.c b/print-ripng.c similarity index 100% rename from contrib/tcpdump/print-ripng.c rename to print-ripng.c diff --git a/contrib/tcpdump/print-rsvp.c b/print-rsvp.c similarity index 100% rename from contrib/tcpdump/print-rsvp.c rename to print-rsvp.c diff --git a/contrib/tcpdump/print-rt6.c b/print-rt6.c similarity index 100% rename from contrib/tcpdump/print-rt6.c rename to print-rt6.c diff --git a/contrib/tcpdump/print-rx.c b/print-rx.c similarity index 100% rename from contrib/tcpdump/print-rx.c rename to print-rx.c diff --git a/contrib/tcpdump/print-sctp.c b/print-sctp.c similarity index 100% rename from contrib/tcpdump/print-sctp.c rename to print-sctp.c diff --git a/contrib/tcpdump/print-sip.c b/print-sip.c similarity index 100% rename from contrib/tcpdump/print-sip.c rename to print-sip.c diff --git a/contrib/tcpdump/print-sl.c b/print-sl.c similarity index 100% rename from contrib/tcpdump/print-sl.c rename to print-sl.c diff --git a/contrib/tcpdump/print-sll.c b/print-sll.c similarity index 100% rename from contrib/tcpdump/print-sll.c rename to print-sll.c diff --git a/contrib/tcpdump/print-slow.c b/print-slow.c similarity index 100% rename from contrib/tcpdump/print-slow.c rename to print-slow.c diff --git a/contrib/tcpdump/print-smb.c b/print-smb.c similarity index 100% rename from contrib/tcpdump/print-smb.c rename to print-smb.c diff --git a/contrib/tcpdump/print-snmp.c b/print-snmp.c similarity index 100% rename from contrib/tcpdump/print-snmp.c rename to print-snmp.c diff --git a/contrib/tcpdump/print-stp.c b/print-stp.c similarity index 100% rename from contrib/tcpdump/print-stp.c rename to print-stp.c diff --git a/contrib/tcpdump/print-sunatm.c b/print-sunatm.c similarity index 100% rename from contrib/tcpdump/print-sunatm.c rename to print-sunatm.c diff --git a/contrib/tcpdump/print-sunrpc.c b/print-sunrpc.c similarity index 100% rename from contrib/tcpdump/print-sunrpc.c rename to print-sunrpc.c diff --git a/contrib/tcpdump/print-symantec.c b/print-symantec.c similarity index 100% rename from contrib/tcpdump/print-symantec.c rename to print-symantec.c diff --git a/contrib/tcpdump/print-syslog.c b/print-syslog.c similarity index 100% rename from contrib/tcpdump/print-syslog.c rename to print-syslog.c diff --git a/contrib/tcpdump/print-tcp.c b/print-tcp.c similarity index 100% rename from contrib/tcpdump/print-tcp.c rename to print-tcp.c diff --git a/contrib/tcpdump/print-telnet.c b/print-telnet.c similarity index 100% rename from contrib/tcpdump/print-telnet.c rename to print-telnet.c diff --git a/contrib/tcpdump/print-tftp.c b/print-tftp.c similarity index 100% rename from contrib/tcpdump/print-tftp.c rename to print-tftp.c diff --git a/contrib/tcpdump/print-timed.c b/print-timed.c similarity index 100% rename from contrib/tcpdump/print-timed.c rename to print-timed.c diff --git a/contrib/tcpdump/print-token.c b/print-token.c similarity index 100% rename from contrib/tcpdump/print-token.c rename to print-token.c diff --git a/contrib/tcpdump/print-udp.c b/print-udp.c similarity index 100% rename from contrib/tcpdump/print-udp.c rename to print-udp.c diff --git a/contrib/tcpdump/print-vjc.c b/print-vjc.c similarity index 100% rename from contrib/tcpdump/print-vjc.c rename to print-vjc.c diff --git a/contrib/tcpdump/print-vrrp.c b/print-vrrp.c similarity index 100% rename from contrib/tcpdump/print-vrrp.c rename to print-vrrp.c diff --git a/contrib/tcpdump/print-wb.c b/print-wb.c similarity index 100% rename from contrib/tcpdump/print-wb.c rename to print-wb.c diff --git a/contrib/tcpdump/print-zephyr.c b/print-zephyr.c similarity index 100% rename from contrib/tcpdump/print-zephyr.c rename to print-zephyr.c diff --git a/contrib/tcpdump/route6d.h b/route6d.h similarity index 100% rename from contrib/tcpdump/route6d.h rename to route6d.h diff --git a/contrib/tcpdump/rpc_auth.h b/rpc_auth.h similarity index 96% rename from contrib/tcpdump/rpc_auth.h rename to rpc_auth.h index 2b8ddc10164b..b6fa11e29e5f 100644 --- a/contrib/tcpdump/rpc_auth.h +++ b/rpc_auth.h @@ -29,7 +29,7 @@ * * from: @(#)auth.h 1.17 88/02/08 SMI * from: @(#)auth.h 2.3 88/08/07 4.0 RPCSRC - * $FreeBSD$ + * $FreeBSD: vendor/tcpdump/dist/contrib/tcpdump/rpc_auth.h 147899 2005-07-11 03:54:22Z sam $ */ /* diff --git a/contrib/tcpdump/rpc_msg.h b/rpc_msg.h similarity index 97% rename from contrib/tcpdump/rpc_msg.h rename to rpc_msg.h index 01185de1ca15..93cb8c109cf4 100644 --- a/contrib/tcpdump/rpc_msg.h +++ b/rpc_msg.h @@ -29,7 +29,7 @@ * * from: @(#)rpc_msg.h 1.7 86/07/16 SMI * from: @(#)rpc_msg.h 2.1 88/07/29 4.0 RPCSRC - * $FreeBSD$ + * $FreeBSD: vendor/tcpdump/dist/contrib/tcpdump/rpc_msg.h 147899 2005-07-11 03:54:22Z sam $ */ /* diff --git a/contrib/tcpdump/rx.h b/rx.h similarity index 100% rename from contrib/tcpdump/rx.h rename to rx.h diff --git a/contrib/tcpdump/savestr.c b/savestr.c similarity index 100% rename from contrib/tcpdump/savestr.c rename to savestr.c diff --git a/contrib/tcpdump/savestr.h b/savestr.h similarity index 100% rename from contrib/tcpdump/savestr.h rename to savestr.h diff --git a/contrib/tcpdump/sctpConstants.h b/sctpConstants.h similarity index 100% rename from contrib/tcpdump/sctpConstants.h rename to sctpConstants.h diff --git a/contrib/tcpdump/sctpHeader.h b/sctpHeader.h similarity index 100% rename from contrib/tcpdump/sctpHeader.h rename to sctpHeader.h diff --git a/contrib/tcpdump/send-ack.awk b/send-ack.awk similarity index 100% rename from contrib/tcpdump/send-ack.awk rename to send-ack.awk diff --git a/contrib/tcpdump/setsignal.c b/setsignal.c similarity index 100% rename from contrib/tcpdump/setsignal.c rename to setsignal.c diff --git a/contrib/tcpdump/setsignal.h b/setsignal.h similarity index 100% rename from contrib/tcpdump/setsignal.h rename to setsignal.h diff --git a/contrib/tcpdump/slcompress.h b/slcompress.h similarity index 100% rename from contrib/tcpdump/slcompress.h rename to slcompress.h diff --git a/contrib/tcpdump/slip.h b/slip.h similarity index 100% rename from contrib/tcpdump/slip.h rename to slip.h diff --git a/contrib/tcpdump/sll.h b/sll.h similarity index 100% rename from contrib/tcpdump/sll.h rename to sll.h diff --git a/contrib/tcpdump/smb.h b/smb.h similarity index 100% rename from contrib/tcpdump/smb.h rename to smb.h diff --git a/contrib/tcpdump/smbutil.c b/smbutil.c similarity index 100% rename from contrib/tcpdump/smbutil.c rename to smbutil.c diff --git a/contrib/tcpdump/stime.awk b/stime.awk similarity index 100% rename from contrib/tcpdump/stime.awk rename to stime.awk diff --git a/contrib/tcpdump/strcasecmp.c b/strcasecmp.c similarity index 100% rename from contrib/tcpdump/strcasecmp.c rename to strcasecmp.c diff --git a/contrib/tcpdump/tcp.h b/tcp.h similarity index 100% rename from contrib/tcpdump/tcp.h rename to tcp.h diff --git a/contrib/tcpdump/tcpdump-stdinc.h b/tcpdump-stdinc.h similarity index 100% rename from contrib/tcpdump/tcpdump-stdinc.h rename to tcpdump-stdinc.h diff --git a/contrib/tcpdump/tcpdump.1 b/tcpdump.1 similarity index 100% rename from contrib/tcpdump/tcpdump.1 rename to tcpdump.1 diff --git a/contrib/tcpdump/tcpdump.c b/tcpdump.c similarity index 100% rename from contrib/tcpdump/tcpdump.c rename to tcpdump.c diff --git a/contrib/tcpdump/telnet.h b/telnet.h similarity index 100% rename from contrib/tcpdump/telnet.h rename to telnet.h diff --git a/contrib/tcpdump/tests/.cvsignore b/tests/.cvsignore similarity index 100% rename from contrib/tcpdump/tests/.cvsignore rename to tests/.cvsignore diff --git a/contrib/tcpdump/tests/02-sunrise-sunset-esp.puu b/tests/02-sunrise-sunset-esp.puu similarity index 100% rename from contrib/tcpdump/tests/02-sunrise-sunset-esp.puu rename to tests/02-sunrise-sunset-esp.puu diff --git a/contrib/tcpdump/tests/08-sunrise-sunset-aes.puu b/tests/08-sunrise-sunset-aes.puu similarity index 100% rename from contrib/tcpdump/tests/08-sunrise-sunset-aes.puu rename to tests/08-sunrise-sunset-aes.puu diff --git a/contrib/tcpdump/tests/08-sunrise-sunset-esp2.puu b/tests/08-sunrise-sunset-esp2.puu similarity index 100% rename from contrib/tcpdump/tests/08-sunrise-sunset-esp2.puu rename to tests/08-sunrise-sunset-esp2.puu diff --git a/contrib/tcpdump/tests/alltests.sh b/tests/alltests.sh similarity index 100% rename from contrib/tcpdump/tests/alltests.sh rename to tests/alltests.sh diff --git a/contrib/tcpdump/tests/bgp_vpn_attrset.out b/tests/bgp_vpn_attrset.out similarity index 100% rename from contrib/tcpdump/tests/bgp_vpn_attrset.out rename to tests/bgp_vpn_attrset.out diff --git a/contrib/tcpdump/tests/bgp_vpn_attrset.sh b/tests/bgp_vpn_attrset.sh similarity index 100% rename from contrib/tcpdump/tests/bgp_vpn_attrset.sh rename to tests/bgp_vpn_attrset.sh diff --git a/contrib/tcpdump/tests/eapon1.gdbinit b/tests/eapon1.gdbinit similarity index 100% rename from contrib/tcpdump/tests/eapon1.gdbinit rename to tests/eapon1.gdbinit diff --git a/contrib/tcpdump/tests/eapon1.out b/tests/eapon1.out similarity index 100% rename from contrib/tcpdump/tests/eapon1.out rename to tests/eapon1.out diff --git a/contrib/tcpdump/tests/eapon1.puu b/tests/eapon1.puu similarity index 100% rename from contrib/tcpdump/tests/eapon1.puu rename to tests/eapon1.puu diff --git a/contrib/tcpdump/tests/eapon1.sh b/tests/eapon1.sh similarity index 100% rename from contrib/tcpdump/tests/eapon1.sh rename to tests/eapon1.sh diff --git a/contrib/tcpdump/tests/eapon2.puu b/tests/eapon2.puu similarity index 100% rename from contrib/tcpdump/tests/eapon2.puu rename to tests/eapon2.puu diff --git a/contrib/tcpdump/tests/esp-secrets.txt b/tests/esp-secrets.txt similarity index 100% rename from contrib/tcpdump/tests/esp-secrets.txt rename to tests/esp-secrets.txt diff --git a/contrib/tcpdump/tests/esp0.out b/tests/esp0.out similarity index 100% rename from contrib/tcpdump/tests/esp0.out rename to tests/esp0.out diff --git a/contrib/tcpdump/tests/esp0.sh b/tests/esp0.sh similarity index 100% rename from contrib/tcpdump/tests/esp0.sh rename to tests/esp0.sh diff --git a/contrib/tcpdump/tests/esp1.gdbinit b/tests/esp1.gdbinit similarity index 100% rename from contrib/tcpdump/tests/esp1.gdbinit rename to tests/esp1.gdbinit diff --git a/contrib/tcpdump/tests/esp1.out b/tests/esp1.out similarity index 100% rename from contrib/tcpdump/tests/esp1.out rename to tests/esp1.out diff --git a/contrib/tcpdump/tests/esp1.sh b/tests/esp1.sh similarity index 100% rename from contrib/tcpdump/tests/esp1.sh rename to tests/esp1.sh diff --git a/contrib/tcpdump/tests/esp2.gdbinit b/tests/esp2.gdbinit similarity index 100% rename from contrib/tcpdump/tests/esp2.gdbinit rename to tests/esp2.gdbinit diff --git a/contrib/tcpdump/tests/esp2.out b/tests/esp2.out similarity index 100% rename from contrib/tcpdump/tests/esp2.out rename to tests/esp2.out diff --git a/contrib/tcpdump/tests/esp2.sh b/tests/esp2.sh similarity index 100% rename from contrib/tcpdump/tests/esp2.sh rename to tests/esp2.sh diff --git a/contrib/tcpdump/tests/esp3.gdbinit b/tests/esp3.gdbinit similarity index 100% rename from contrib/tcpdump/tests/esp3.gdbinit rename to tests/esp3.gdbinit diff --git a/contrib/tcpdump/tests/esp3.sh b/tests/esp3.sh similarity index 100% rename from contrib/tcpdump/tests/esp3.sh rename to tests/esp3.sh diff --git a/contrib/tcpdump/tests/esp4.gdbinit b/tests/esp4.gdbinit similarity index 100% rename from contrib/tcpdump/tests/esp4.gdbinit rename to tests/esp4.gdbinit diff --git a/contrib/tcpdump/tests/esp4.sh b/tests/esp4.sh similarity index 100% rename from contrib/tcpdump/tests/esp4.sh rename to tests/esp4.sh diff --git a/contrib/tcpdump/tests/esp5.gdbinit b/tests/esp5.gdbinit similarity index 100% rename from contrib/tcpdump/tests/esp5.gdbinit rename to tests/esp5.gdbinit diff --git a/contrib/tcpdump/tests/esp5.out b/tests/esp5.out similarity index 100% rename from contrib/tcpdump/tests/esp5.out rename to tests/esp5.out diff --git a/contrib/tcpdump/tests/esp5.sh b/tests/esp5.sh similarity index 100% rename from contrib/tcpdump/tests/esp5.sh rename to tests/esp5.sh diff --git a/contrib/tcpdump/tests/espudp1.out b/tests/espudp1.out similarity index 100% rename from contrib/tcpdump/tests/espudp1.out rename to tests/espudp1.out diff --git a/contrib/tcpdump/tests/espudp1.puu b/tests/espudp1.puu similarity index 100% rename from contrib/tcpdump/tests/espudp1.puu rename to tests/espudp1.puu diff --git a/contrib/tcpdump/tests/espudp1.sh b/tests/espudp1.sh similarity index 100% rename from contrib/tcpdump/tests/espudp1.sh rename to tests/espudp1.sh diff --git a/contrib/tcpdump/tests/isakmp-delete-segfault.puu b/tests/isakmp-delete-segfault.puu similarity index 100% rename from contrib/tcpdump/tests/isakmp-delete-segfault.puu rename to tests/isakmp-delete-segfault.puu diff --git a/contrib/tcpdump/tests/isakmp-identification-segfault.puu b/tests/isakmp-identification-segfault.puu similarity index 100% rename from contrib/tcpdump/tests/isakmp-identification-segfault.puu rename to tests/isakmp-identification-segfault.puu diff --git a/contrib/tcpdump/tests/isakmp-pointer-loop.puu b/tests/isakmp-pointer-loop.puu similarity index 100% rename from contrib/tcpdump/tests/isakmp-pointer-loop.puu rename to tests/isakmp-pointer-loop.puu diff --git a/contrib/tcpdump/tests/isakmp1.out b/tests/isakmp1.out similarity index 100% rename from contrib/tcpdump/tests/isakmp1.out rename to tests/isakmp1.out diff --git a/contrib/tcpdump/tests/isakmp1.sh b/tests/isakmp1.sh similarity index 100% rename from contrib/tcpdump/tests/isakmp1.sh rename to tests/isakmp1.sh diff --git a/contrib/tcpdump/tests/isakmp2.out b/tests/isakmp2.out similarity index 100% rename from contrib/tcpdump/tests/isakmp2.out rename to tests/isakmp2.out diff --git a/contrib/tcpdump/tests/isakmp2.sh b/tests/isakmp2.sh similarity index 100% rename from contrib/tcpdump/tests/isakmp2.sh rename to tests/isakmp2.sh diff --git a/contrib/tcpdump/tests/isakmp3.out b/tests/isakmp3.out similarity index 100% rename from contrib/tcpdump/tests/isakmp3.out rename to tests/isakmp3.out diff --git a/contrib/tcpdump/tests/isakmp3.sh b/tests/isakmp3.sh similarity index 100% rename from contrib/tcpdump/tests/isakmp3.sh rename to tests/isakmp3.sh diff --git a/contrib/tcpdump/tests/isakmp4.out b/tests/isakmp4.out similarity index 100% rename from contrib/tcpdump/tests/isakmp4.out rename to tests/isakmp4.out diff --git a/contrib/tcpdump/tests/isakmp4.sh b/tests/isakmp4.sh similarity index 100% rename from contrib/tcpdump/tests/isakmp4.sh rename to tests/isakmp4.sh diff --git a/contrib/tcpdump/tests/isakmp4500.puu b/tests/isakmp4500.puu similarity index 100% rename from contrib/tcpdump/tests/isakmp4500.puu rename to tests/isakmp4500.puu diff --git a/contrib/tcpdump/tests/lmp.out b/tests/lmp.out similarity index 100% rename from contrib/tcpdump/tests/lmp.out rename to tests/lmp.out diff --git a/contrib/tcpdump/tests/lmp.puu b/tests/lmp.puu similarity index 100% rename from contrib/tcpdump/tests/lmp.puu rename to tests/lmp.puu diff --git a/contrib/tcpdump/tests/lmp.sh b/tests/lmp.sh similarity index 100% rename from contrib/tcpdump/tests/lmp.sh rename to tests/lmp.sh diff --git a/contrib/tcpdump/tests/mpls-ldp-hello.out b/tests/mpls-ldp-hello.out similarity index 100% rename from contrib/tcpdump/tests/mpls-ldp-hello.out rename to tests/mpls-ldp-hello.out diff --git a/contrib/tcpdump/tests/mpls-ldp-hello.puu b/tests/mpls-ldp-hello.puu similarity index 100% rename from contrib/tcpdump/tests/mpls-ldp-hello.puu rename to tests/mpls-ldp-hello.puu diff --git a/contrib/tcpdump/tests/mpls-ldp-hello.sh b/tests/mpls-ldp-hello.sh similarity index 100% rename from contrib/tcpdump/tests/mpls-ldp-hello.sh rename to tests/mpls-ldp-hello.sh diff --git a/contrib/tcpdump/tests/ospf-gmpls.out b/tests/ospf-gmpls.out similarity index 100% rename from contrib/tcpdump/tests/ospf-gmpls.out rename to tests/ospf-gmpls.out diff --git a/contrib/tcpdump/tests/ospf-gmpls.puu b/tests/ospf-gmpls.puu similarity index 100% rename from contrib/tcpdump/tests/ospf-gmpls.puu rename to tests/ospf-gmpls.puu diff --git a/contrib/tcpdump/tests/ospf-gmpls.sh b/tests/ospf-gmpls.sh similarity index 100% rename from contrib/tcpdump/tests/ospf-gmpls.sh rename to tests/ospf-gmpls.sh diff --git a/contrib/tcpdump/tests/print-A.out b/tests/print-A.out similarity index 100% rename from contrib/tcpdump/tests/print-A.out rename to tests/print-A.out diff --git a/contrib/tcpdump/tests/print-AA.out b/tests/print-AA.out similarity index 100% rename from contrib/tcpdump/tests/print-AA.out rename to tests/print-AA.out diff --git a/contrib/tcpdump/tests/print-X.out b/tests/print-X.out similarity index 100% rename from contrib/tcpdump/tests/print-X.out rename to tests/print-X.out diff --git a/contrib/tcpdump/tests/print-XX.out b/tests/print-XX.out similarity index 100% rename from contrib/tcpdump/tests/print-XX.out rename to tests/print-XX.out diff --git a/contrib/tcpdump/tests/print-capX.out b/tests/print-capX.out similarity index 100% rename from contrib/tcpdump/tests/print-capX.out rename to tests/print-capX.out diff --git a/contrib/tcpdump/tests/print-capXX.out b/tests/print-capXX.out similarity index 100% rename from contrib/tcpdump/tests/print-capXX.out rename to tests/print-capXX.out diff --git a/contrib/tcpdump/tests/print-flags.puu b/tests/print-flags.puu similarity index 100% rename from contrib/tcpdump/tests/print-flags.puu rename to tests/print-flags.puu diff --git a/contrib/tcpdump/tests/print-flags.sh b/tests/print-flags.sh similarity index 100% rename from contrib/tcpdump/tests/print-flags.sh rename to tests/print-flags.sh diff --git a/contrib/tcpdump/tests/print-x.out b/tests/print-x.out similarity index 100% rename from contrib/tcpdump/tests/print-x.out rename to tests/print-x.out diff --git a/contrib/tcpdump/tests/print-xx.out b/tests/print-xx.out similarity index 100% rename from contrib/tcpdump/tests/print-xx.out rename to tests/print-xx.out diff --git a/contrib/tcpdump/tftp.h b/tftp.h similarity index 100% rename from contrib/tcpdump/tftp.h rename to tftp.h diff --git a/contrib/tcpdump/timed.h b/timed.h similarity index 100% rename from contrib/tcpdump/timed.h rename to timed.h diff --git a/contrib/tcpdump/token.h b/token.h similarity index 100% rename from contrib/tcpdump/token.h rename to token.h diff --git a/contrib/tcpdump/udp.h b/udp.h similarity index 100% rename from contrib/tcpdump/udp.h rename to udp.h diff --git a/contrib/tcpdump/util.c b/util.c similarity index 100% rename from contrib/tcpdump/util.c rename to util.c diff --git a/contrib/tcpdump/vfprintf.c b/vfprintf.c similarity index 100% rename from contrib/tcpdump/vfprintf.c rename to vfprintf.c From 0ea0e7ad03dff03bb5448f640640d7904c01c8d4 Mon Sep 17 00:00:00 2001 From: Rui Paulo Date: Sat, 21 Mar 2009 16:23:46 +0000 Subject: [PATCH 2/2] Import tcpdump 4.0.0. --- CHANGES | 42 +- CREDITS | 295 ++-- FILES | 251 --- INSTALL => INSTALL.txt | 8 +- Makefile-devel-adds | 22 - Makefile.in | 219 ++- PLATFORMS | 9 - README | 14 +- Readme.Win32 | 24 - TODO | 6 - VERSION | 2 +- aclocal.m4 | 37 +- acsite.m4 | 505 ------ addrtoname.c | 14 +- addrtoname.h | 13 +- af.c | 2 +- af.h | 2 +- aodv.h | 2 +- appletalk.h | 2 +- arcnet.h | 2 +- atm.h | 3 +- atmuni31.h | 14 +- bgp.h | 2 +- bootp.h | 2 +- bpf_dump.c | 4 +- chdlc.h | 2 +- checksum.c | 137 ++ config.h.in | 6 + configure | 591 ++++++- configure.in | 167 +- dccp.h | 6 +- decnet.h | 2 +- dhcp6.h | 200 --- dhcp6opt.h | 81 - enc.h | 2 +- ether.h | 2 +- ethertype.h | 17 +- extract.h | 6 +- fddi.h | 2 +- gmpls.c | 26 +- gmpls.h | 12 +- gmt2local.c | 2 +- gmt2local.h | 2 +- icmp6.h | 4 +- ieee802_11.h | 2 +- ieee802_11_radio.h | 6 +- igrp.h | 2 +- interface.h | 32 +- ip.h | 2 +- ip6.h | 4 +- ipfc.h | 2 +- ipproto.c | 2 +- ipproto.h | 4 +- ipsec_doi.h | 2 +- ipx.h | 2 +- isakmp.h | 149 +- l2tp.h | 2 +- l2vpn.c | 2 +- l2vpn.h | 2 +- lane.h | 2 +- lbl/gnuc.h | 43 - lbl/os-osf4.h | 2 +- lbl/os-solaris2.h | 2 +- lbl/os-sunos4.h | 2 +- lbl/os-ultrix4.h | 2 +- llc.h | 4 +- machdep.c | 2 +- machdep.h | 2 +- makemib | 2 +- missing/addrinfo.h | 2 +- missing/cdecl_ext.h | 37 - missing/datalinks.c | 2 +- missing/dlnames.c | 2 +- missing/getaddrinfo.c | 2 +- missing/getnameinfo.c | 2 +- missing/inet_aton.c | 4 +- missing/inet_ntop.c | 4 +- missing/inet_pton.c | 4 +- missing/snprintf.c | 4 +- missing/strdup.c | 2 +- missing/strlcat.c | 2 +- missing/strlcpy.c | 2 +- missing/strsep.c | 2 +- mpls.h | 2 +- nameser.h | 2 +- netbios.h | 2 +- netdissect.h | 12 +- nfs.h | 19 +- nfsfh.h | 2 +- nfsv2.h | 262 ---- nlpid.c | 2 +- nlpid.h | 2 +- ntp.h | 2 +- oakley.h | 2 +- ospf.h | 68 +- ospf6.h | 77 +- oui.c | 5 +- oui.h | 5 +- parsenfsfh.c | 2 +- pcap-missing.h | 2 +- pcap_dump_ftell.c | 2 +- pf.h | 77 - pmap_prot.h | 4 +- ppp.h | 2 +- print-802_11.c | 53 +- print-ah.c | 2 +- print-aodv.c | 2 +- print-ap1394.c | 6 +- print-arcnet.c | 2 +- print-arp.c | 285 ++-- print-ascii.c | 2 +- print-atalk.c | 2 +- print-atm.c | 163 +- print-beep.c | 2 +- print-bfd.c | 2 +- print-bgp.c | 457 +++++- print-bootp.c | 16 +- print-bt.c | 78 + print-bxxp.c | 82 - print-cdp.c | 2 +- print-cfm.c | 641 ++++++++ print-chdlc.c | 2 +- print-cip.c | 2 +- print-cnfp.c | 2 +- print-dccp.c | 71 +- print-decnet.c | 2 +- print-dhcp6.c | 133 +- print-domain.c | 39 +- print-dtp.c | 123 ++ print-dvmrp.c | 2 +- print-eap.c | 274 +++- print-egp.c | 16 +- print-eigrp.c | 2 +- print-enc.c | 15 +- print-esp.c | 2 +- print-ether.c | 24 +- print-fddi.c | 2 +- print-fr.c | 119 +- print-frag6.c | 2 +- print-gre.c | 2 +- print-hsrp.c | 2 +- print-icmp.c | 4 +- print-icmp6.c | 6 +- print-igmp.c | 2 +- print-igrp.c | 2 +- print-ip.c | 4 +- print-ip6.c | 2 +- print-ip6opts.c | 2 +- print-ipcomp.c | 2 +- print-ipfc.c | 2 +- print-ipx.c | 2 +- print-isakmp.c | 1794 +++++++++++++++++----- print-isoclns.c | 156 +- print-juniper.c | 467 +++++- print-krb.c | 2 +- print-l2tp.c | 2 +- print-lane.c | 2 +- print-lcp.c | 216 --- print-ldp.c | 35 +- print-llc.c | 28 +- print-lldp.c | 1107 +++++++++++++ print-lmp.c | 28 +- print-lspping.c | 13 +- print-lwapp.c | 360 +++++ print-lwres.c | 2 +- print-mobile.c | 2 +- print-mobility.c | 2 +- print-mpcp.c | 274 ++++ print-mpls.c | 2 +- print-msdp.c | 2 +- print-netbios.c | 2 +- print-nfs.c | 26 +- print-ntp.c | 2 +- print-null.c | 5 +- print-ospf.c | 788 ++++++---- print-ospf6.c | 594 +++---- print-pflog.c | 7 +- print-pgm.c | 2 +- print-pim.c | 2 +- print-ppp.c | 2 +- print-pppoe.c | 2 +- print-pptp.c | 2 +- print-radius.c | 2 +- print-raw.c | 2 +- print-rip.c | 19 +- print-ripng.c | 2 +- print-rrcp.c | 137 ++ print-rsvp.c | 2 +- print-rt6.c | 2 +- print-rx.c | 332 +++- print-sctp.c | 2 +- print-sflow.c | 577 +++++++ print-sip.c | 2 +- print-sl.c | 2 +- print-sll.c | 2 +- print-slow.c | 477 +++++- print-smb.c | 45 +- print-snmp.c | 2 +- print-stp.c | 2 +- print-sunatm.c | 2 +- print-sunrpc.c | 2 +- print-symantec.c | 2 +- print-syslog.c | 2 +- print-tcp.c | 1205 ++++++++------- print-telnet.c | 2 +- print-tftp.c | 6 +- print-timed.c | 2 +- print-token.c | 2 +- print-udld.c | 173 +++ print-udp.c | 12 +- print-vjc.c | 2 +- print-vqp.c | 209 +++ print-vrrp.c | 2 +- print-vtp.c | 378 +++++ print-wb.c | 2 +- print-zephyr.c | 11 +- route6d.h | 2 +- rpc_auth.h | 4 +- rpc_msg.h | 4 +- rx.h | 2 +- savestr.c | 68 - savestr.h | 24 - sctpConstants.h | 2 +- sctpHeader.h | 2 +- setsignal.c | 2 +- setsignal.h | 2 +- slcompress.h | 2 +- slip.h | 2 +- sll.h | 6 +- smb.h | 2 +- smbutil.c | 2 +- strcasecmp.c | 2 +- tcp.h | 44 +- tcpdump-stdinc.h | 2 +- tcpdump.1 | 855 ++--------- tcpdump.c | 386 ++++- telnet.h | 4 +- tests/.cvsignore | 11 - tests/02-sunrise-sunset-esp.puu | 34 - tests/08-sunrise-sunset-aes.puu | 36 - tests/08-sunrise-sunset-esp2.puu | 43 - tests/alltests.sh | 12 - tests/bgp_vpn_attrset.out | 18 - tests/bgp_vpn_attrset.sh | 11 - tests/eapon1.gdbinit | 1 - tests/eapon1.out | 114 -- tests/eapon1.puu | 368 ----- tests/eapon1.sh | 13 - tests/eapon2.puu | 66 - tests/esp-secrets.txt | 5 - tests/esp0.out | 8 - tests/esp0.sh | 12 - tests/esp1.gdbinit | 1 - tests/esp1.out | 8 - tests/esp1.sh | 13 - tests/esp2.gdbinit | 1 - tests/esp2.out | 8 - tests/esp2.sh | 13 - tests/esp3.gdbinit | 1 - tests/esp3.sh | 12 - tests/esp4.gdbinit | 2 - tests/esp4.sh | 13 - tests/esp5.gdbinit | 3 - tests/esp5.out | 8 - tests/esp5.sh | 13 - tests/espudp1.out | 8 - tests/espudp1.puu | 35 - tests/espudp1.sh | 13 - tests/isakmp-delete-segfault.puu | 20 - tests/isakmp-identification-segfault.puu | 11 - tests/isakmp-pointer-loop.puu | 6 - tests/isakmp1.out | 1 - tests/isakmp1.sh | 12 - tests/isakmp2.out | 1 - tests/isakmp2.sh | 12 - tests/isakmp3.out | 2 - tests/isakmp3.sh | 13 - tests/isakmp4.out | 35 - tests/isakmp4.sh | 13 - tests/isakmp4500.puu | 155 -- tests/lmp.out | 191 --- tests/lmp.puu | 42 - tests/lmp.sh | 14 - tests/mpls-ldp-hello.out | 9 - tests/mpls-ldp-hello.puu | 6 - tests/mpls-ldp-hello.sh | 14 - tests/ospf-gmpls.out | 83 - tests/ospf-gmpls.puu | 18 - tests/ospf-gmpls.sh | 14 - tests/print-A.out | 193 --- tests/print-AA.out | 193 --- tests/print-X.out | 409 ----- tests/print-XX.out | 419 ----- tests/print-capX.out | 409 ----- tests/print-capXX.out | 419 ----- tests/print-flags.puu | 151 -- tests/print-flags.sh | 12 - tests/print-x.out | 409 ----- tests/print-xx.out | 419 ----- tftp.h | 4 +- timed.h | 9 +- token.h | 2 +- udp.h | 6 +- util.c | 107 +- vfprintf.c | 2 +- 305 files changed, 11861 insertions(+), 10174 deletions(-) delete mode 100644 FILES rename INSTALL => INSTALL.txt (98%) delete mode 100644 Makefile-devel-adds delete mode 100644 PLATFORMS delete mode 100644 Readme.Win32 delete mode 100644 TODO delete mode 100644 acsite.m4 create mode 100644 checksum.c delete mode 100644 dhcp6.h delete mode 100644 dhcp6opt.h delete mode 100644 lbl/gnuc.h delete mode 100644 missing/cdecl_ext.h delete mode 100644 nfsv2.h delete mode 100644 pf.h create mode 100644 print-bt.c delete mode 100644 print-bxxp.c create mode 100644 print-cfm.c create mode 100644 print-dtp.c delete mode 100644 print-lcp.c create mode 100644 print-lldp.c create mode 100644 print-lwapp.c create mode 100644 print-mpcp.c create mode 100644 print-rrcp.c create mode 100644 print-sflow.c create mode 100644 print-udld.c create mode 100644 print-vqp.c create mode 100644 print-vtp.c delete mode 100644 savestr.c delete mode 100644 savestr.h delete mode 100644 tests/.cvsignore delete mode 100644 tests/02-sunrise-sunset-esp.puu delete mode 100644 tests/08-sunrise-sunset-aes.puu delete mode 100644 tests/08-sunrise-sunset-esp2.puu delete mode 100644 tests/alltests.sh delete mode 100644 tests/bgp_vpn_attrset.out delete mode 100755 tests/bgp_vpn_attrset.sh delete mode 100644 tests/eapon1.gdbinit delete mode 100644 tests/eapon1.out delete mode 100644 tests/eapon1.puu delete mode 100755 tests/eapon1.sh delete mode 100644 tests/eapon2.puu delete mode 100644 tests/esp-secrets.txt delete mode 100644 tests/esp0.out delete mode 100644 tests/esp0.sh delete mode 100644 tests/esp1.gdbinit delete mode 100644 tests/esp1.out delete mode 100644 tests/esp1.sh delete mode 100644 tests/esp2.gdbinit delete mode 100644 tests/esp2.out delete mode 100644 tests/esp2.sh delete mode 100644 tests/esp3.gdbinit delete mode 100644 tests/esp3.sh delete mode 100644 tests/esp4.gdbinit delete mode 100644 tests/esp4.sh delete mode 100644 tests/esp5.gdbinit delete mode 100644 tests/esp5.out delete mode 100644 tests/esp5.sh delete mode 100644 tests/espudp1.out delete mode 100644 tests/espudp1.puu delete mode 100644 tests/espudp1.sh delete mode 100644 tests/isakmp-delete-segfault.puu delete mode 100644 tests/isakmp-identification-segfault.puu delete mode 100644 tests/isakmp-pointer-loop.puu delete mode 100644 tests/isakmp1.out delete mode 100644 tests/isakmp1.sh delete mode 100644 tests/isakmp2.out delete mode 100644 tests/isakmp2.sh delete mode 100644 tests/isakmp3.out delete mode 100644 tests/isakmp3.sh delete mode 100644 tests/isakmp4.out delete mode 100644 tests/isakmp4.sh delete mode 100644 tests/isakmp4500.puu delete mode 100644 tests/lmp.out delete mode 100644 tests/lmp.puu delete mode 100755 tests/lmp.sh delete mode 100644 tests/mpls-ldp-hello.out delete mode 100644 tests/mpls-ldp-hello.puu delete mode 100755 tests/mpls-ldp-hello.sh delete mode 100644 tests/ospf-gmpls.out delete mode 100644 tests/ospf-gmpls.puu delete mode 100755 tests/ospf-gmpls.sh delete mode 100644 tests/print-A.out delete mode 100644 tests/print-AA.out delete mode 100644 tests/print-X.out delete mode 100644 tests/print-XX.out delete mode 100644 tests/print-capX.out delete mode 100644 tests/print-capXX.out delete mode 100644 tests/print-flags.puu delete mode 100755 tests/print-flags.sh delete mode 100644 tests/print-x.out delete mode 100644 tests/print-xx.out diff --git a/CHANGES b/CHANGES index aa29e305cfdf..3f3b6759ce2e 100644 --- a/CHANGES +++ b/CHANGES @@ -1,20 +1,36 @@ -$Header: /tcpdump/master/tcpdump/CHANGES,v 1.87.2.17 2007/09/13 13:39:44 ken Exp $ +$Header: /tcpdump/master/tcpdump/CHANGES,v 1.98.2.2 2008-10-15 23:26:30 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 +Mon. October 27, 2008. ken@netfunctional.ca. Summary for 4.0.0 tcpdump release + Add support for Bluetooth Sniffing + Add support for Realtek Remote Control Protocol (openrrcp.org.ru) + Add support for 802.11 AVS + Add support for SMB over TCP + Add support for 4 byte BGP AS printing + Add support for compiling on case-insensitive file systems + Add support for ikev2 printing + Update support for decoding AFS + Update DHCPv6 printer + Use newer libpcap API's (allows -B option on all platforms) + Add -I to turn on monitor mode + Bugfixes in lldp, lspping, dccp, ESP, NFS printers + Cleanup unused files and various cruft + +Mon. September 10, 2007. ken@xelerance.com. Summary for 3.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 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 + +Wed. July 23, 2007. mcr@xelerance.com. Summary for 3.9.7 libpcap release NFS: Print unsigned values as such. RX: parse safely. diff --git a/CREDITS b/CREDITS index d327880c083d..b058d67a727c 100644 --- a/CREDITS +++ b/CREDITS @@ -1,147 +1,165 @@ This file lists people who have contributed to tcpdump: The current maintainers: - Bill Fenner - David Young - Fulvio Risso - Guy Harris - Hannes Gredler - Jun-ichiro itojun Hagino - Michael Richardson + Bill Fenner + David Young + Fulvio Risso + Guy Harris + Hannes Gredler + Michael Richardson Additional people who have contributed patches: - Aaron Campbell - Alfredo Andres - Albert Chin - Andrew Brown - Andrew Church - Andrew Hintz - Andrew Tridgell - Andy Heffernan - Arkadiusz Miskiewicz - Armando L. Caro Jr. - Arnaldo Carvalho de Melo - Atsushi Onoe - Ben Smithurst - Brent L. Bates - Brian Ginsbach - Bruce M. Simpson - Carles Kishimoto Bisbe - Charlie Lenahan - Charles M. Hannum - Chris Cogdon - Chris G. Demetriou - Christian Sievers - Chris Jepeway - Chris Larson - Craig Rodrigues - Crist J. Clark - Daniel Hagerty - Darren Reed - David Binderman - David Smith - David Young - Don Ebright - Eddie Kohler - Francis Dupont - Francisco Matias Cuenca-Acuna - Frank Volf - Fulvio Risso - George Bakos - Gerald Combs - Gert Doering - Greg Stark - Gilbert Ramirez Jr. - Gisle Vanem - Hannes Viertel - Hank Leininger - Harry Raaymakers - Heinz-Ado Arnolds - Hendrik Scholz - Ian McDonald - Jacek Tobiasz - Jakob Schlyter - Jan Oravec - Jason R. Thorpe - Jefferson Ogata - Jeffrey Hutzelman - Jesper Peterson - Jim Hutchins - Jonathan Heusser - Tatuya Jinmei - Jørgen Thomsen - Julian Cowley - Kaarthik Sivakumar - Kazushi Sugyo - Kelly Carmichael - Ken Hornstein - Kevin Steves - Klaus Klein - Kris Kennaway - Krzysztof Halasa - Larry Lile - Lennert Buytenhek - Loris Degioanni - Love Hörnquist-Åstrand - Maciej W. Rozycki - Manu Pathak - Marc A. Lehmann - Mark Ellzey Thomas - Marko Kiiskila - Markus Schöpflin - Marshall Rose - Martin Husemann - Max Laier - Michael Madore - Michael Shalayeff - Michael Shields - Michael T. Stolarchuk - Michele "mydecay" Marchetto - Monroe Williams - Motonori Shindo - Nathan J. Williams - Nathaniel Couper-Noles - Neil T. Spring - Niels Provos - Nickolai Zeldovich - Nicolas Ferrero - Noritoshi Demizu - Olaf Kirch - Onno van der Linden - Pascal Hennequin - Pasvorn Boonmark - Paul Mundt - Paul S. Traina - Pavlin Radoslavov - Pekka Savola - Peter Fales - Peter Jeremy - - Phil Wood - Rafal Maszkowski - Raphael Raimbault - Rick Cheng - Rick Jones - Rick Watson - Rob Braun - Roderick Schertler - Sami Farin - Scott Rose - Sebastian Krahmer - Sebastien Vincent - Seth Webster - Shinsuke Suzuki - Steinar Haug - Swaminathan Chandrasekaran - Takashi Yamamoto - Terry Kennedy + Aaron Campbell + Alfredo Andres + Albert Chin + Ananth Suryanarayana + Andrea Bittau + Andrew Brown + Andrew Church + Andrew Hintz + Andrew Silent + Andrew Tridgell + Andy Heffernan + Arkadiusz Miskiewicz + Armando L. Caro Jr. + Arnaldo Carvalho de Melo + Ben Byer + Atsushi Onoe + Ben Smithurst + Bjoern A. Zeeb + Brent L. Bates + Brian Ginsbach + Bruce M. Simpson + Carles Kishimoto Bisbe + Charlie Lenahan + Charles M. Hannum + Chris Cogdon + Chris G. Demetriou + Christian Sievers + Chris Jepeway + Chris Larson + Craig Rodrigues + Crist J. Clark + Daniel Hagerty + Darren Reed + David Binderman + David Smith + David Young + Don Ebright + Eddie Kohler + Florent Drouin + Francis Dupont + Francisco Matias Cuenca-Acuna + Francois-Xavier Le Bail + Frank Volf + Fulvio Risso + George Bakos + Gerald Combs + Gerrit Renker + Gert Doering + Greg Minshall + Greg Stark + Gilbert Ramirez Jr. + Gisle Vanem + Hannes Viertel + Hank Leininger + Harry Raaymakers + Heinz-Ado Arnolds + Hendrik Scholz + Ian McDonald + Jacek Tobiasz + Jakob Schlyter + Jan Oravec + Jason R. Thorpe + Jefferson Ogata + Jeffrey Hutzelman + Jesper Peterson + Jim Hutchins + Jonathan Heusser + Tatuya Jinmei + Joerg Mayer + Jørgen Thomsen + Julian Cowley + Kaarthik Sivakumar + Kazushi Sugyo + Kelly Carmichael + Ken Hornstein + Kevin Steves + Klaus Klein + Kris Kennaway + Krzysztof Halasa + Larry Lile + Lennert Buytenhek + Loris Degioanni + Love Hörnquist-Åstrand + Luis Martin Garcia + Maciej W. Rozycki + Manu Pathak + Marc Binderberger + Marc A. Lehmann + Mark Ellzey Thomas + Marko Kiiskila + Markus Schöpflin + Marshall Rose + Martin Husemann + Max Laier + Michael A. Meffie III + Michael Madore + Michael Shalayeff + Michael Shields + Michael T. Stolarchuk + Michele "mydecay" Marchetto + Mike Frysinger + Monroe Williams + Motonori Shindo + Nathan J. Williams + Nathaniel Couper-Noles + Neil T. Spring + Niels Provos + Nickolai Zeldovich + Nicolas Ferrero + Noritoshi Demizu + Olaf Kirch + Onno van der Linden + Paolo Abeni + Pascal Hennequin + Pasvorn Boonmark + Paul Mundt + Paul S. Traina + Pavlin Radoslavov + Pekka Savola + Peter Fales + Peter Jeremy + + Phil Wood + Rafal Maszkowski + Raphael Raimbault + Rick Cheng + Rick Jones + Rick Watson + Rob Braun + Roderick Schertler + Sagun Shakya + Sami Farin + Scott Rose + Sebastian Krahmer + Sebastien Raveau + Sebastien Vincent + Sepherosa Ziehau + Seth Webster + Shinsuke Suzuki + Steinar Haug + Swaminathan Chandrasekaran + Takashi Yamamoto + Terry Kennedy Timo Koskiahde - Tony Li - Uns Lider - Victor Oppleman - Wesley Griffin - Wilbert de Graaf + Tony Li + Uns Lider + Victor Oppleman + Wesley Griffin + Wilbert de Graaf + Will Drewry Yen Yen Lim Yoshifumi Nishida @@ -149,3 +167,6 @@ The original LBL crew: Steve McCanne Craig Leres Van Jacobson + +Past maintainers: + Jun-ichiro itojun Hagino diff --git a/FILES b/FILES deleted file mode 100644 index 4e2afa26c610..000000000000 --- a/FILES +++ /dev/null @@ -1,251 +0,0 @@ -CHANGES -CREDITS -FILES -INSTALL -LICENSE -Makefile.in -README -Readme.Win32 -VERSION -acconfig.h -aclocal.m4 -addrtoname.c -addrtoname.h -af.c -af.h -ah.h -aodv.h -appletalk.h -arcnet.h -atime.awk -atm.h -atmuni31.h -bootp.h -bpf_dump.c -bgp.h -chdlc.h -config.guess -config.h.in -config.sub -configure -configure.in -cpack.c -cpack.h -dccp.h -decnet.h -decode_prefix.h -enc.h -esp.h -ether.h -ethertype.h -extract.h -fddi.h -gmpls.c -gmpls.h -gmt2local.c -gmt2local.h -icmp6.h -ieee802_11.h -ieee802_11_radio.h -igrp.h -install-sh -interface.h -ip.h -ip6.h -ipfc.h -ipproto.c -ipproto.h -ipsec_doi.h -ipx.h -isakmp.h -l2tp.h -l2vpn.c -l2vpn.h -lane.h -lbl/os-osf4.h -lbl/os-solaris2.h -lbl/os-sunos4.h -lbl/os-ultrix4.h -llc.h -machdep.c -machdep.h -makemib -mib.h -missing/addrinfo.h -missing/addrsize.h -missing/bittypes.h -missing/dlnames.c -missing/datalinks.c -missing/getaddrinfo.c -missing/getnameinfo.c -missing/inet_aton.c -missing/inet_ntop.c -missing/inet_pton.c -missing/resolv6.h -missing/resolv_ext.h -missing/snprintf.c -missing/sockstorage.h -missing/strdup.c -missing/strlcat.c -missing/strlcpy.c -missing/strsep.c -mkdep -mpls.h -nameser.h -netbios.h -netdissect.h -nfs.h -nfsfh.h -nlpid.c -nlpid.h -ntp.h -oakley.h -ospf.h -ospf6.h -oui.c -oui.h -packetdat.awk -parsenfsfh.c -pcap_dump_ftell.c -pcap-missing.h -pmap_prot.h -ppp.h -print-802_11.c -print-ah.c -print-aodv.c -print-ap1394.c -print-arcnet.c -print-arp.c -print-ascii.c -print-atalk.c -print-atm.c -print-beep.c -print-bfd.c -print-bgp.c -print-bootp.c -print-cdp.c -print-chdlc.c -print-cip.c -print-cnfp.c -print-dccp.c -print-decnet.c -print-dhcp6.c -print-domain.c -print-dvmrp.c -print-eap.c -print-egp.c -print-enc.c -print-esp.c -print-eigrp.c -print-ether.c -print-fddi.c -print-fr.c -print-frag6.c -print-gre.c -print-hsrp.c -print-icmp.c -print-icmp6.c -print-igmp.c -print-igrp.c -print-ip.c -print-ip6.c -print-ip6opts.c -print-ipcomp.c -print-ipfc.c -print-ipx.c -print-isakmp.c -print-isoclns.c -print-juniper.c -print-krb.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-mobility.c -print-mpls.c -print-msdp.c -print-netbios.c -print-nfs.c -print-ntp.c -print-null.c -print-olsr.c -print-ospf.c -print-ospf6.c -print-pflog.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-ripng.c -print-rsvp.c -print-rt6.c -print-rx.c -print-sctp.c -print-sip.c -print-sl.c -print-sll.c -print-slow.c -print-smb.c -print-snmp.c -print-stp.c -print-sunatm.c -print-sunrpc.c -print-symantec.c -print-syslog.c -print-tcp.c -print-telnet.c -print-tftp.c -print-timed.c -print-token.c -print-udp.c -print-vjc.c -print-vrrp.c -print-wb.c -print-zephyr.c -route6d.h -rpc_auth.h -rpc_msg.h -rx.h -sctpConstants.h -sctpHeader.h -send-ack.awk -setsignal.c -setsignal.h -slcompress.h -slip.h -sll.h -smb.h -smbutil.c -stime.awk -strcasecmp.c -tcp.h -tcpdump.1 -tcpdump.c -tcpdump-stdinc.h -telnet.h -tftp.h -timed.h -token.h -udp.h -util.c -vfprintf.c -win32/Include/Arpa/tftp.h -win32/Include/errno.h -win32/Include/getopt.h -win32/Include/inetprivate.h -win32/Include/telnet.h -win32/Include/w32_fzs.h -win32/Include/Netinet/in_systm.h -win32/Include/Netinet/ip.h -win32/Src/getopt.c -win32/prj/GNUmakefile -win32/prj/WinDump.dsp -win32/prj/WinDump.dsw diff --git a/INSTALL b/INSTALL.txt similarity index 98% rename from INSTALL rename to INSTALL.txt index 745997f3569a..e263f5368f0e 100644 --- a/INSTALL +++ b/INSTALL.txt @@ -1,4 +1,4 @@ -@(#) $Header: /tcpdump/master/tcpdump/INSTALL,v 1.63.2.7 2007/09/14 01:03:12 guy Exp $ (LBL) +@(#) $Header: /tcpdump/master/tcpdump/INSTALL.txt,v 1.1.2.1 2008-02-06 10:49:22 guy Exp $ (LBL) If you have not built libpcap, and your system does not have libpcap installed, install libpcap first. Your system might provide a version @@ -43,7 +43,7 @@ FILES CHANGES - description of differences between releases CREDITS - people that have helped tcpdump along FILES - list of files exported as part of the distribution -INSTALL - this file +INSTALL.txt - this file LICENSE - the license under which tcpdump is distributed Makefile.in - compilation rules (input to the configure script) README - description of distribution @@ -140,9 +140,10 @@ print-arp.c - Address Resolution Protocol printer routines print-ascii.c - ASCII packet dump routines print-atalk.c - AppleTalk printer routines print-atm.c - ATM printer routines +print-beep.c - BEEP printer routines print-bgp.c - Border Gateway Protocol printer routines print-bootp.c - BOOTP and IPv4 DHCP printer routines -print-beep.c - BEEP printer routines +print-bt.c - Bluetooth printer routines print-cdp.c - Cisco Discovery Protocol printer routines print-chdlc.c - Cisco HDLC printer routines print-cip.c - Classical-IP over ATM routines @@ -199,6 +200,7 @@ print-radius.c - Radius protocol printer routines print-raw.c - Raw IP printer routines print-rip.c - Routing Information Protocol printer routines print-ripng.c - IPv6 Routing Information Protocol printer routines +print-rrcp.c - Realtek Remote Control Protocol routines print-rsvp.c - Resource reSerVation Protocol (RSVP) printer routines print-rt6.c - IPv6 routing header printer routines print-rx.c - AFS RX printer routines diff --git a/Makefile-devel-adds b/Makefile-devel-adds deleted file mode 100644 index 512a1199795c..000000000000 --- a/Makefile-devel-adds +++ /dev/null @@ -1,22 +0,0 @@ -# -# Auto-regenerate configure script or Makefile when things change. -# From autoconf.info . Works best with GNU Make. -# -${srcdir}/configure: configure.in - cd ${srcdir} && autoconf - -# autoheader might not change config.h.in, so touch a stamp file. -${srcdir}/config.h.in: ${srcdir}/stamp-h.in -${srcdir}/stamp-h.in: configure.in acconfig.h - cd ${srcdir} && autoheader - echo timestamp > ${srcdir}/stamp-h.in - -config.h: stamp-h -stamp-h: ${srcdir}/config.h.in config.status - ./config.status - -Makefile: Makefile.in config.status - ./config.status - -config.status: ${srcdir}/configure - ./config.status --recheck diff --git a/Makefile.in b/Makefile.in index dcc8f40792f1..e28e186a366d 100644 --- a/Makefile.in +++ b/Makefile.in @@ -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.7 2007/09/12 19:48:50 guy Exp $ (LBL) +# @(#) $Header: /tcpdump/master/tcpdump/Makefile.in,v 1.317.2.4 2008-05-27 07:14:26 guy Exp $ (LBL) # # Various configurable paths (remember to edit Makefile.in, not Makefile) @@ -57,6 +57,7 @@ LIBS = @LIBS@ INSTALL = @INSTALL@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_DATA = @INSTALL_DATA@ +RANLIB = @RANLIB@ # Explicitly define compilation rule since SunOS 4's make doesn't like gcc. # Also, gcc does not remove the .o before forking 'as', which can be a @@ -65,45 +66,122 @@ INSTALL_DATA = @INSTALL_DATA@ @rm -f $@ $(CC) $(CFLAGS) -c $(srcdir)/$*.c -CSRC = addrtoname.c af.c cpack.c gmpls.c oui.c gmt2local.c ipproto.c \ +CSRC = addrtoname.c af.c checksum.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 \ - print-beep.c print-bfd.c print-bgp.c print-bootp.c print-cdp.c \ - print-chdlc.c print-cip.c print-cnfp.c print-dccp.c print-decnet.c \ - print-domain.c print-dvmrp.c print-enc.c print-egp.c \ + print-beep.c print-bfd.c print-bgp.c print-bootp.c print-bt.c \ + print-cdp.c print-cfm.c print-chdlc.c print-cip.c print-cnfp.c \ + print-dccp.c print-decnet.c \ + print-domain.c print-dtp.c print-dvmrp.c print-enc.c print-egp.c \ print-eap.c print-eigrp.c\ print-esp.c print-ether.c print-fddi.c print-fr.c \ print-gre.c print-hsrp.c print-icmp.c print-igmp.c \ print-igrp.c print-ip.c print-ipcomp.c print-ipfc.c \ - print-ipx.c print-isakmp.c print-isoclns.c print-juniper.c print-krb.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-ipx.c print-isoclns.c print-juniper.c print-krb.c \ + print-l2tp.c print-lane.c print-ldp.c print-lldp.c print-llc.c \ + print-lmp.c print-lspping.c print-lwapp.c \ + print-lwres.c print-mobile.c print-mpcp.c print-mpls.c print-msdp.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-pgm.c print-pim.c print-ppp.c print-pppoe.c print-pptp.c \ + print-radius.c print-raw.c print-rip.c print-rrcp.c print-rsvp.c \ + print-rx.c print-sctp.c print-sflow.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 \ print-symantec.c print-syslog.c print-tcp.c print-telnet.c print-tftp.c \ - print-timed.c print-token.c print-udp.c print-vjc.c print-vrrp.c \ + print-timed.c print-token.c print-udld.c print-udp.c \ + print-vjc.c print-vqp.c print-vrrp.c print-vtp.c \ print-wb.c print-zephyr.c setsignal.c tcpdump.c util.c +LIBNETDISSECT_SRC=print-isakmp.c +LIBNETDISSECT_OBJ=$(LIBNETDISSECT_SRC:.c=.o) +LIBNETDISSECT=libnetdissect.a + LOCALSRC = @LOCALSRC@ GENSRC = version.c LIBOBJS = @LIBOBJS@ -SRC = $(CSRC) $(GENSRC) $(LOCALSRC) +SRC = $(CSRC) $(GENSRC) $(LOCALSRC) $(LIBNETDISSECT_SRC) # We would like to say "OBJ = $(SRC:.c=.o)" but Ultrix's make cannot # hack the extra indirection -OBJ = $(CSRC:.c=.o) $(GENSRC:.c=.o) $(LOCALSRC:.c=.o) $(LIBOBJS) -HDR = addrtoname.h appletalk.h bootp.h cpack.h dccp.h decnet.h \ - ethertype.h extract.h fddi.h gmt2local.h igrp.h interface.h \ - ipx.h llc.h machdep.h mib.h nfsfh.h nfsv2.h ntp.h ospf.h \ +OBJ = $(CSRC:.c=.o) $(GENSRC:.c=.o) $(LOCALSRC:.c=.o) $(LIBOBJS) $(LIBNETDISSECT_OBJ) +HDR = \ + acconfig.h \ + addrtoname.h \ + af.h \ + ah.h \ + aodv.h \ + appletalk.h \ + arcnet.h \ + atm.h \ + atmuni31.h \ + bootp.h \ + bgp.h \ + chdlc.h \ + cpack.h \ + dccp.h \ + decnet.h \ + decode_prefix.h \ + enc.h \ + esp.h \ + ether.h \ + ethertype.h \ + extract.h \ + fddi.h \ + gmpls.h \ + gmt2local.h \ + icmp6.h \ + ieee802_11.h \ + ieee802_11_radio.h \ + igrp.h \ + interface.h \ + interface.h \ + ip.h \ + ip6.h \ + ipfc.h \ + ipproto.h \ + ipsec_doi.h \ + ipx.h \ + isakmp.h \ + l2tp.h \ + l2vpn.h \ + lane.h \ + llc.h \ + machdep.h \ + mib.h \ + mpls.h \ + nameser.h \ + netbios.h \ + netdissect.h \ + nfs.h \ + nfsfh.h \ + nlpid.h \ + ntp.h \ + oakley.h \ + ospf.h \ + ospf6.h \ + oui.h \ + pcap-missing.h \ + pmap_prot.h \ + ppp.h \ + route6d.h \ + rpc_auth.h \ + rpc_msg.h \ + rx.h \ + sctpConstants.h \ + sctpHeader.h \ setsignal.h \ - gnuc.h ipsec_doi.h isakmp.h l2tp.h nameser.h \ - netbios.h oakley.h ospf6.h pf.h ppp.h route6d.h + slcompress.h \ + slip.h \ + sll.h \ + smb.h \ + tcp.h \ + tcpdump-stdinc.h \ + telnet.h \ + tftp.h \ + timed.h \ + token.h \ + udp.h TAGHDR = \ /usr/include/arpa/tftp.h \ @@ -120,12 +198,92 @@ TAGFILES = $(SRC) $(HDR) $(TAGHDR) CLEANFILES = $(PROG) $(OBJ) $(GENSRC) +EXTRA_DIST = \ + CHANGES \ + CREDITS \ + INSTALL.txt \ + LICENSE \ + Makefile.in \ + README \ + Readme.Win32 \ + VERSION \ + aclocal.m4 \ + atime.awk \ + bpf_dump.c \ + config.guess \ + config.h.in \ + config.sub \ + configure \ + configure.in \ + install-sh \ + lbl/os-osf4.h \ + lbl/os-solaris2.h \ + lbl/os-sunos4.h \ + lbl/os-ultrix4.h \ + makemib \ + missing/addrinfo.h \ + missing/addrsize.h \ + missing/bittypes.h \ + missing/dlnames.c \ + missing/datalinks.c \ + missing/getaddrinfo.c \ + missing/getnameinfo.c \ + missing/inet_aton.c \ + missing/inet_ntop.c \ + missing/inet_pton.c \ + missing/resolv6.h \ + missing/resolv_ext.h \ + missing/snprintf.c \ + missing/sockstorage.h \ + missing/strdup.c \ + missing/strlcat.c \ + missing/strlcpy.c \ + missing/strsep.c \ + mkdep \ + packetdat.awk \ + pcap_dump_ftell.c \ + print-dhcp6.c \ + print-frag6.c \ + print-icmp6.c \ + print-ip6.c \ + print-ip6opts.c \ + print-mobility.c \ + print-netbios.c \ + print-ospf6.c \ + print-pflog.c \ + print-ripng.c \ + print-rt6.c \ + print-smb.c \ + send-ack.awk \ + smbutil.c \ + stime.awk \ + strcasecmp.c \ + tcpdump.1 \ + vfprintf.c \ + win32/Include/Arpa/tftp.h \ + win32/Include/errno.h \ + win32/Include/getopt.h \ + win32/Include/inetprivate.h \ + win32/Include/telnet.h \ + win32/Include/w32_fzs.h \ + win32/Include/Netinet/in_systm.h \ + win32/Include/Netinet/ip.h \ + win32/Src/getopt.c \ + win32/prj/GNUmakefile \ + win32/prj/WinDump.dsp \ + win32/prj/WinDump.dsw + all: $(PROG) $(PROG): $(OBJ) @V_PCAPDEP@ @rm -f $@ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(OBJ) $(LIBS) +$(LIBNETDISSECT): $(LIBNETDISSECT_OBJ) + @rm -f $@ + $(AR) cr $@ $(LIBNETDISSECT_OBJ) + $(RANLIB) $@ + datalinks.o: $(srcdir)/missing/datalinks.c $(CC) $(CFLAGS) -o $@ -c $(srcdir)/missing/datalinks.c dlnames.o: $(srcdir)/missing/dlnames.c @@ -154,12 +312,20 @@ version.o: version.c version.c: $(srcdir)/VERSION @rm -f $@ - sed -e 's/.*/char version[] = "&";/' $(srcdir)/VERSION > $@ + if grep CVS ${srcdir}/VERSION >/dev/null; then \ + read ver <${srcdir}/VERSION; \ + echo $$ver | tr -d '\012'; \ + date +_%Y_%m_%d; \ + else \ + cat ${srcdir}/VERSION; \ + fi | sed -e 's/.*/char version[] = "&";/' > $@ -install: + +install: all [ -d $(DESTDIR)$(sbindir) ] || \ (mkdir -p $(DESTDIR)$(sbindir); chmod 755 $(DESTDIR)$(sbindir)) $(INSTALL_PROGRAM) $(PROG) $(DESTDIR)$(sbindir)/$(PROG) + $(INSTALL_PROGRAM) $(PROG) $(DESTDIR)$(sbindir)/$(PROG).`cat ${srcdir}/VERSION` [ -d $(DESTDIR)$(mandir)/man1 ] || \ (mkdir -p $(DESTDIR)$(mandir)/man1; chmod 755 $(DESTDIR)$(mandir)/man1) $(INSTALL_DATA) $(srcdir)/$(PROG).1 $(DESTDIR)$(mandir)/man1/$(PROG).1 @@ -183,10 +349,15 @@ distclean: tags: $(TAGFILES) ctags -wtd $(TAGFILES) +TAGS: $(TAGFILES) + etags $(TAGFILES) + releasetar: @cwd=`pwd` ; dir=`basename $$cwd` ; name=$(PROG)-`cat VERSION` ; \ - list="" ; make distclean; cd ..; mkdir -p n; cd n; ln -s ../$$dir $$name; \ - tar -c -z -f $$name.tar.gz $$name/. ; + mkdir $$name; \ + tar cf - $(CSRC) $(HDR) $(LIBNETDISSECT_SRC) $(EXTRA_DIST) | (cd $$name; tar xf -); \ + tar -c -z -f $$name.tar.gz $$name; \ + rm -rf $$name depend: $(GENSRC) ${srcdir}/mkdep -c $(CC) $(DEFS) $(INCLS) $(SRC) diff --git a/PLATFORMS b/PLATFORMS deleted file mode 100644 index 2e1aedf773d4..000000000000 --- a/PLATFORMS +++ /dev/null @@ -1,9 +0,0 @@ -== Tested platforms == -NetBSD 1.5/i386 (mcr - 2002/1/1) -Debian Linux (woody/i386) (mcr - 2002/1/1) - ---- -RedHat Linux 6.1/i386 (assar) -FreeBSD 2.2.8/i386 (itojun) - - diff --git a/README b/README index cb51d3092d63..c2b6760aba44 100644 --- a/README +++ b/README @@ -1,10 +1,11 @@ -@(#) $Header: /tcpdump/master/tcpdump/README,v 1.65.2.1 2007/09/14 01:03:12 guy Exp $ (LBL) +@(#) $Header: /tcpdump/master/tcpdump/README,v 1.66.2.1 2008-05-30 01:38:20 guy Exp $ (LBL) TCPDUMP 3.9 Now maintained by "The Tcpdump Group" See www.tcpdump.org -Please send inquiries/comments/reports to tcpdump-workers@tcpdump.org +Please send inquiries/comments/reports to: + tcpdump-workers@lists.tcpdump.org Anonymous CVS is available via: cvs -d :pserver:cvs.tcpdump.org:/tcpdump/master login @@ -68,15 +69,14 @@ trace files. See the above distribution for further details and documentation. Problems, bugs, questions, desirable enhancements, etc. should be sent -to the address "tcpdump-workers@tcpdump.org". Bugs, support requests, -and feature requests may also be submitted on the SourceForge site for -tcpdump at +to the address "tcpdump-workers@lists.tcpdump.org". Bugs, support +requests, and feature requests may also be submitted on the SourceForge +site for tcpdump at http://sourceforge.net/projects/tcpdump/ Source code contributions, etc. should be sent to the email address -"patches@tcpdump.org", or submitted as patches on the SourceForge site -for tcpdump. +submitted as patches on the SourceForge site for tcpdump. Current versions can be found at www.tcpdump.org, or the SourceForge site for tcpdump. diff --git a/Readme.Win32 b/Readme.Win32 deleted file mode 100644 index fdf8b12bc767..000000000000 --- a/Readme.Win32 +++ /dev/null @@ -1,24 +0,0 @@ -To build tcpdump under Windows, you need: - -- version 6 (or higher) of Microsoft Visual Studio or the Cygnus gnu -C compiler. -- The November 2001 (or later) edition of Microsoft Platform -Software Development Kit (SDK), that contains some necessary includes -for IPv6 support. You can download it from http://www.microsoft.com/sdk -- the WinPcap source code, that includes libpcap for win32. Download it -from http://winpcap.polito.it or download libpcap sources from -http://www.tcpdump.org and follow the instructions in the README.Win32 -file. - -First, extract tcpdump and WinPcap in the same folder, and build WinPcap. - -The Visual Studio project and the cygwin makefile are in the Win32\prj -folder. - -From Visual Studio, open windump.dsw and build the program. The release -version of the WinDump.exe executable file will be created in the -windump\win32\prj\release directory . The debug version will be generated -in windump\win32\prj\debug. - -From cygnus, go to windump\win32\prj\ and type "make". WinDump.exe will be -created in the same directory. \ No newline at end of file diff --git a/TODO b/TODO deleted file mode 100644 index 12c8b3f51946..000000000000 --- a/TODO +++ /dev/null @@ -1,6 +0,0 @@ -1. update credits -2. review "FILES" -3. search for version info -4. get PLATFORMS filled in -5. update CHANGES file -6. do same for libpcap diff --git a/VERSION b/VERSION index 26cb48590ea4..fcdb2e109f68 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -3.9.8 +4.0.0 diff --git a/aclocal.m4 b/aclocal.m4 index 4b7010530422..823862ee539b 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -1,4 +1,4 @@ -dnl @(#) $Header: /tcpdump/master/tcpdump/aclocal.m4,v 1.106.2.7 2005/11/08 03:00:52 guy Exp $ (LBL) +dnl @(#) $Header: /tcpdump/master/tcpdump/aclocal.m4,v 1.113.2.3 2008-09-25 21:50:04 guy Exp $ (LBL) dnl dnl Copyright (c) 1995, 1996, 1997, 1998 dnl The Regents of the University of California. All rights reserved. @@ -259,7 +259,7 @@ AC_DEFUN(AC_LBL_LIBPCAP, AC_MSG_ERROR(see the INSTALL doc for more info) fi dnl - dnl Good old Red Hat Linux puts "pcap.h" in + dnl Some versions of Red Hat Linux put "pcap.h" in dnl "/usr/include/pcap"; had the LBL folks done so, dnl that would have been a good idea, but for dnl the Red Hat folks to do so just breaks source @@ -273,6 +273,10 @@ AC_DEFUN(AC_LBL_LIBPCAP, dnl see if it's in a "pcap" subdirectory of them and, dnl if so, add that subdirectory to the "-I" list. dnl + dnl (We now also put pcap.h in /usr/include/pcap, but we + dnl leave behind a /usr/include/pcap.h that includes it, + dnl so you can still just include .) + dnl AC_MSG_CHECKING(for extraneous pcap header directories) if test \( ! -r /usr/local/include/pcap.h \) -a \ \( ! -r /usr/include/pcap.h \); then @@ -664,7 +668,7 @@ AC_DEFUN(AC_LBL_UNALIGNED_ACCESS, # know it does work, and have the script just fail on other # cpu types and update it when such a failure occurs. # - alpha*|arm*|hp*|mips*|sh*|sparc*|ia64|nv1) + alpha*|arm*|bfin*|hp*|mips*|sh*|sparc*|ia64|nv1) ac_cv_lbl_unaligned_fail=yes ;; @@ -1254,3 +1258,30 @@ else fi AC_MSG_RESULT($ac_cv___attribute__) ]) + +AC_DEFUN(AC_LBL_SSLEAY, + [ + # + # XXX - is there a better way to check if a given library is + # in a given directory than checking each of the possible + # shared library suffixes? + # + # Are there any other suffixes we need to look for? Do we + # have to worry about ".so.{version}"? + # + # Or should we just look for "libcrypto.*"? + # + if test -d "$1/lib" -a \( -f "$1/lib/libcrypto.a" -o \ + -f "$1/lib/libcrypto.so" -o \ + -f "$1/lib/libcrypto.sl" -o \ + -f "$1/lib/libcrypto.dylib" \); then + ac_cv_ssleay_path="$1" + fi + + # + # Make sure we have the headers as well. + # + if test -d "$1/include/openssl" -a -f "$1/include/openssl/des.h"; then + incdir="-I$1/include" + fi +]) diff --git a/acsite.m4 b/acsite.m4 deleted file mode 100644 index 746faf1e1a4f..000000000000 --- a/acsite.m4 +++ /dev/null @@ -1,505 +0,0 @@ -dnl @(#) $Header: acsite.m4,v 1.41 96/11/29 15:30:40 leres Exp $ (LBL) -dnl -dnl Copyright (c) 1995, 1996 -dnl The Regents of the University of California. All rights reserved. -dnl -dnl Redistribution and use in source and binary forms, with or without -dnl modification, are permitted provided that: (1) source code distributions -dnl retain the above copyright notice and this paragraph in its entirety, (2) -dnl distributions including binary code include the above copyright notice and -dnl this paragraph in its entirety in the documentation or other materials -dnl provided with the distribution, and (3) all advertising materials mentioning -dnl features or use of this software display the following acknowledgement: -dnl ``This product includes software developed by the University of California, -dnl Lawrence Berkeley Laboratory and its contributors.'' Neither the name of -dnl the University nor the names of its contributors may be used to endorse -dnl or promote products derived from this software without specific prior -dnl written permission. -dnl THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED -dnl WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF -dnl MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -dnl -dnl LBL autoconf macros -dnl - -dnl -dnl Determine which compiler we're using (cc or gcc) -dnl If using gcc, determine the version number -dnl If using cc, require that it support ansi prototypes -dnl If using gcc, use -O2 (otherwise use -O) -dnl If using cc, explicitly specify /usr/local/include -dnl -dnl usage: -dnl -dnl AC_LBL_C_INIT(copt, incls) -dnl -dnl results: -dnl -dnl $1 (copt set) -dnl $2 (incls set) -dnl CC -dnl ac_cv_gcc_vers -dnl LBL_CFLAGS -dnl -dnl XXX need to add test to make sure ac_prog_cc hasn't been called -AC_DEFUN(AC_LBL_C_INIT, - [AC_PREREQ(2.12) - $1=-O - $2="" - if test "${CFLAGS+set}" = set; then - LBL_CFLAGS="$CFLAGS" - fi - if test -z "$CC" ; then - case "$target_os" in - - bsdi*) - AC_CHECK_PROG(SHLICC2, shlicc2, yes, no) - if test $SHLICC2 = yes ; then - CC=shlicc2 - export CC - fi - ;; - esac - fi - AC_PROG_CC - if test $ac_cv_prog_gcc = yes ; then - if test "$SHLICC2" = yes ; then - ac_cv_gcc_vers=2 - $1=-O2 - else - AC_MSG_CHECKING(gcc version) - AC_CACHE_VAL(ac_cv_gcc_vers, - ac_cv_gcc_vers=`$CC -v 2>&1 | \ - sed -n -e '$s/.* //' -e '$s/\..*//p'`) - AC_MSG_RESULT($ac_cv_gcc_vers) - if test $ac_cv_gcc_vers -gt 1 ; then - $1=-O2 - fi - fi - else - AC_MSG_CHECKING(that $CC handles ansi prototypes) - AC_CACHE_VAL(ac_cv_cc_ansi_prototypes, - AC_TRY_COMPILE( - [#include ], - [int frob(int, char *)], - ac_cv_cc_ansi_prototypes=yes, - ac_cv_cc_ansi_prototypes=no)) - AC_MSG_RESULT($ac_cv_cc_ansi_prototypes) - if test $ac_cv_cc_ansi_prototypes = no ; then - case "$target_os" in - - hpux*) - AC_MSG_CHECKING(for HP-UX ansi compiler ($CC -Aa -D_HPUX_SOURCE)) - savedcflags="$CFLAGS" - CFLAGS="-Aa -D_HPUX_SOURCE $CFLAGS" - AC_CACHE_VAL(ac_cv_cc_hpux_cc_aa, - AC_TRY_COMPILE( - [#include ], - [int frob(int, char *)], - ac_cv_cc_hpux_cc_aa=yes, - ac_cv_cc_hpux_cc_aa=no)) - AC_MSG_RESULT($ac_cv_cc_hpux_cc_aa) - if test $ac_cv_cc_hpux_cc_aa = no ; then - AC_MSG_ERROR(see the INSTALL for more info) - fi - CFLAGS="$savedcflags" - V_CCOPT="-Aa $V_CCOPT" - AC_DEFINE(_HPUX_SOURCE) - ;; - - *) - AC_MSG_ERROR(see the INSTALL for more info) - ;; - esac - fi - $2=-I/usr/local/include - - case "$target_os" in - - irix*) - V_CCOPT="$V_CCOPT -xansi -signed -g3" - ;; - - osf*) - V_CCOPT="$V_CCOPT -g3" - ;; - - ultrix*) - AC_MSG_CHECKING(that Ultrix $CC hacks const in prototypes) - AC_CACHE_VAL(ac_cv_cc_const_proto, - AC_TRY_COMPILE( - [#include ], - [struct a { int b; }; - void c(const struct a *)], - ac_cv_cc_const_proto=yes, - ac_cv_cc_const_proto=no)) - AC_MSG_RESULT($ac_cv_cc_const_proto) - if test $ac_cv_cc_const_proto = no ; then - AC_DEFINE(const,) - fi - ;; - esac - fi -]) - -dnl -dnl Use pfopen.c if available and pfopen() not in standard libraries -dnl Require libpcap -dnl Look for libpcap in .. -dnl Use the installed libpcap if there is no local version -dnl -dnl usage: -dnl -dnl AC_LBL_LIBPCAP(pcapdep, incls) -dnl -dnl results: -dnl -dnl $1 (pcapdep set) -dnl $2 (incls appended) -dnl LIBS -dnl -AC_DEFUN(AC_LBL_LIBPCAP, - [pfopen=/usr/examples/packetfilter/pfopen.c - if test -f $pfopen ; then - AC_CHECK_FUNCS(pfopen) - if test $ac_cv_func_pfopen = "no" ; then - AC_MSG_RESULT(Using $pfopen) - LIBS="$LIBS $pfopen" - fi - fi - AC_MSG_CHECKING(for local pcap library) - libpcap=FAIL - lastdir=FAIL - places=`ls .. | sed -e 's,/$,,' -e 's,^,../,' | \ - egrep '/libpcap-[[0-9]]*\.[[0-9]]*(\.[[0-9]]*)?([[ab]][[0-9]]*)?$'` - for dir in $places ../libpcap libpcap ; do - basedir=`echo $dir | sed -e 's/[[ab]][[0-9]]*$//'` - if test $lastdir = $basedir ; then - dnl skip alphas when an actual release is present - continue; - fi - lastdir=$dir - if test -r $dir/pcap.c ; then - libpcap=$dir/libpcap.a - d=$dir - dnl continue and select the last one that exists - fi - done - if test $libpcap = FAIL ; then - AC_MSG_RESULT(not found) - AC_CHECK_LIB(pcap, main, libpcap="-lpcap") - if test $libpcap = FAIL ; then - AC_MSG_ERROR(see the INSTALL doc for more info) - fi - else - $1=$libpcap - $2="-I$d $$2" - AC_MSG_RESULT($libpcap) - fi - LIBS="$libpcap $LIBS"]) - -dnl -dnl Define RETSIGTYPE and RETSIGVAL -dnl -dnl usage: -dnl -dnl AC_LBL_TYPE_SIGNAL -dnl -dnl results: -dnl -dnl RETSIGTYPE (defined) -dnl RETSIGVAL (defined) -dnl -AC_DEFUN(AC_LBL_TYPE_SIGNAL, - [AC_TYPE_SIGNAL - if test "$ac_cv_type_signal" = void ; then - AC_DEFINE(RETSIGVAL,) - else - AC_DEFINE(RETSIGVAL,(0)) - fi - case "$target_os" in - - irix*) - AC_DEFINE(_BSD_SIGNALS) - ;; - - *) - AC_CHECK_FUNCS(sigset) - if test $ac_cv_func_sigset = yes ; then - AC_DEFINE(signal, sigset) - fi - ;; - esac]) - -dnl -dnl If using gcc, see if fixincludes should be run -dnl -dnl usage: -dnl -dnl AC_LBL_FIXINCLUDES -dnl -AC_DEFUN(AC_LBL_FIXINCLUDES, - [if test $ac_cv_prog_gcc = yes ; then - AC_MSG_CHECKING(if fixincludes is needed) - AC_CACHE_VAL(ac_cv_gcc_fixincludes, - AC_TRY_COMPILE( - [/* - * This generates a "duplicate case value" when fixincludes - * has not be run. - */ -# include -# include -# include -# ifdef HAVE_SYS_IOCCOM_H -# include -# endif], - [switch (0) { - case _IO('A', 1):; - case _IO('B', 1):; - }], - ac_cv_gcc_fixincludes=yes, - ac_cv_gcc_fixincludes=no)) - AC_MSG_RESULT($ac_cv_gcc_fixincludes) - if test $ac_cv_gcc_fixincludes = no ; then - # Don't cache failure - unset ac_cv_gcc_fixincludes - AC_MSG_ERROR(see the INSTALL for more info) - fi - fi]) - -dnl -dnl Check for flex, default to lex -dnl Require flex 2.4 or higher -dnl Check for bison, default to yacc -dnl Default to lex/yacc if both flex and bison are not available -dnl Define the yy prefix string if using flex and bison -dnl -dnl usage: -dnl -dnl AC_LBL_LEX_AND_YACC(lex, yacc, yyprefix) -dnl -dnl results: -dnl -dnl $1 (lex set) -dnl $2 (yacc appended) -dnl $3 (optional flex and bison -P prefix) -dnl -AC_DEFUN(AC_LBL_LEX_AND_YACC, - [AC_CHECK_PROGS($1, flex, lex) - if test "$$1" = flex ; then - # The -V flag was added in 2.4 - AC_MSG_CHECKING(for flex 2.4 or higher) - AC_CACHE_VAL(ac_cv_flex_v24, - if flex -V >/dev/null 2>&1; then - ac_cv_flex_v24=yes - else - ac_cv_flex_v24=no - fi) - AC_MSG_RESULT($ac_cv_flex_v24) - if test $ac_cv_flex_v24 = no ; then - s="2.4 or higher required" - AC_MSG_WARN(ignoring obsolete flex executable ($s)) - $1=lex - fi - fi - AC_CHECK_PROGS($2, bison, yacc) - if test "$$2" = bison ; then - $2="$$2 -y" - fi - if test "$$1" != lex -a "$$2" = yacc -o "$$1" = lex -a "$$2" != yacc ; then - AC_MSG_WARN(don't have both flex and bison; reverting to lex/yacc) - $1=lex - $2=yacc - fi - if test "$$1" = flex -a -n "$3" ; then - $1="$$1 -P$3" - $2="$$2 -p $3" - fi]) - -dnl -dnl Checks to see if union wait is used with WEXITSTATUS() -dnl -dnl usage: -dnl -dnl AC_LBL_UNION_WAIT -dnl -dnl results: -dnl -dnl DECLWAITSTATUS (defined) -dnl -AC_DEFUN(AC_LBL_UNION_WAIT, - [AC_MSG_CHECKING(if union wait is used) - AC_CACHE_VAL(ac_cv_union_wait, - AC_TRY_COMPILE([ -# include -# include ], - [int status; - u_int i = WEXITSTATUS(status); - u_int j = waitpid(0, &status, 0);], - ac_cv_union_wait=no, - ac_cv_union_wait=yes)) - AC_MSG_RESULT($ac_cv_union_wait) - if test $ac_cv_union_wait = yes ; then - AC_DEFINE(DECLWAITSTATUS,union wait) - else - AC_DEFINE(DECLWAITSTATUS,int) - fi]) - -dnl -dnl Checks to see if the sockaddr struct has the 4.4 BSD sa_len member -dnl -dnl usage: -dnl -dnl AC_LBL_SOCKADDR_SA_LEN -dnl -dnl results: -dnl -dnl HAVE_SOCKADDR_SA_LEN (defined) -dnl -AC_DEFUN(AC_LBL_SOCKADDR_SA_LEN, - [AC_MSG_CHECKING(if sockaddr struct has sa_len member) - AC_CACHE_VAL(ac_cv_sockaddr_has_sa_len, - AC_TRY_COMPILE([ -# include -# include ], - [u_int i = sizeof(((struct sockaddr *)0)->sa_len)], - ac_cv_sockaddr_has_sa_len=yes, - ac_cv_sockaddr_has_sa_len=no)) - AC_MSG_RESULT($ac_cv_sockaddr_has_sa_len) - if test $ac_cv_sockaddr_has_sa_len = yes ; then - AC_DEFINE(HAVE_SOCKADDR_SA_LEN) - fi]) - -dnl -dnl Checks to see if -R is used -dnl -dnl usage: -dnl -dnl AC_LBL_HAVE_RUN_PATH -dnl -dnl results: -dnl -dnl ac_cv_have_run_path (yes or no) -dnl -AC_DEFUN(AC_LBL_HAVE_RUN_PATH, - [AC_MSG_CHECKING(for ${CC-cc} -R) - AC_CACHE_VAL(ac_cv_have_run_path, - [echo 'main(){}' > conftest.c - ${CC-cc} -o conftest conftest.c -R/a1/b2/c3 >conftest.out 2>&1 - if test ! -s conftest.out ; then - ac_cv_have_run_path=yes - else - ac_cv_have_run_path=no - fi - rm -f conftest*]) - AC_MSG_RESULT($ac_cv_have_run_path) - ]) - -dnl -dnl Checks to see if unaligned memory accesses fail -dnl -dnl usage: -dnl -dnl AC_LBL_UNALIGNED_ACCESS -dnl -dnl results: -dnl -dnl LBL_ALIGN (DEFINED) -dnl -AC_DEFUN(AC_LBL_UNALIGNED_ACCESS, - [AC_MSG_CHECKING(if unaligned accesses fail) - AC_CACHE_VAL(ac_cv_unaligned_fail, - [case "$target_cpu" in - - alpha|hp*|mips|sparc) - ac_cv_unaligned_fail=yes - ;; - - *) - cat >conftest.c < -# include -# include - unsigned char a[[5]] = { 1, 2, 3, 4, 5 }; - main() { - unsigned int i; - pid_t pid; - int status; - /* avoid "core dumped" message */ - pid = fork(); - if (pid < 0) - exit(2); - if (pid > 0) { - /* parent */ - pid = waitpid(pid, &status, 0); - if (pid < 0) - exit(3); - exit(!WIFEXITED(status)); - } - /* child */ - i = *(unsigned int *)&a[[1]]; - printf("%d\n", i); - exit(0); - } -EOF - ${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS \ - conftest.c $LIBS >/dev/null 2>&1 - if test ! -x conftest ; then - dnl failed to compile for some reason - ac_cv_unaligned_fail=yes - else - ./conftest >conftest.out - if test ! -s conftest.out ; then - ac_cv_unaligned_fail=yes - else - ac_cv_unaligned_fail=no - fi - fi - rm -f conftest* core core.conftest - ;; - esac]) - AC_MSG_RESULT($ac_cv_unaligned_fail) - if test $ac_cv_unaligned_fail = yes ; then - AC_DEFINE(LBL_ALIGN) - fi]) - -dnl -dnl If using gcc and the file .devel exists: -dnl Compile with -g (if supported) and -Wall -dnl If using gcc 2, do extra prototype checking -dnl If an os prototype include exists, symlink os-proto.h to it -dnl -dnl usage: -dnl -dnl AC_LBL_DEVEL(copt) -dnl -dnl results: -dnl -dnl $1 (copt appended) -dnl HAVE_OS_PROTO_H (defined) -dnl os-proto.h (symlinked) -dnl -AC_DEFUN(AC_LBL_DEVEL, - [rm -f os-proto.h - if test "${LBL_CFLAGS+set}" = set; then - $1="$$1 ${LBL_CFLAGS}" - fi - if test $ac_cv_prog_gcc = yes -a -f .devel ; then - if test "${LBL_CFLAGS+set}" != set; then - if test "$ac_cv_prog_cc_g" = yes ; then - $1="-g $$1" - fi - $1="$$1 -Wall" - if test $ac_cv_gcc_vers -gt 1 ; then - $1="$$1 -Wmissing-prototypes -Wstrict-prototypes" - fi - fi - os=`echo $target_os | sed -e 's/\([[0-9]][[0-9]]*\)[[^0-9]].*$/\1/'` - name="lbl/os-$os.h" - if test -f $name ; then - ln -s $name os-proto.h - AC_DEFINE(HAVE_OS_PROTO_H) - else - AC_MSG_WARN(can't find $name) - fi - fi]) diff --git a/addrtoname.c b/addrtoname.c index 53d615f2c0ef..e67d1148c942 100644 --- a/addrtoname.c +++ b/addrtoname.c @@ -23,7 +23,7 @@ */ #ifndef lint static const char rcsid[] _U_ = - "@(#) $Header: /tcpdump/master/tcpdump/addrtoname.c,v 1.108.2.9 2007/09/14 00:26:18 guy Exp $ (LBL)"; + "@(#) $Header: /tcpdump/master/tcpdump/addrtoname.c,v 1.119 2007-08-08 14:06:34 hannes Exp $ (LBL)"; #endif #ifdef HAVE_CONFIG_H @@ -79,7 +79,6 @@ extern int ether_ntohost(char *, const struct ether_addr *); */ #define HASHNAMESIZE 4096 -#define BUFSIZE 128 struct hnamemem { u_int32_t addr; @@ -509,14 +508,19 @@ etheraddr_string(register const u_char *ep) } const char * -linkaddr_string(const u_char *ep, const unsigned int len) +linkaddr_string(const u_char *ep, const unsigned int type, const unsigned int len) { register u_int i; register char *cp; register struct enamemem *tp; - if (len == ETHER_ADDR_LEN) /* XXX not totally correct... */ - return etheraddr_string(ep); + if (type == LINKADDR_ETHER && len == ETHER_ADDR_LEN) { + return etheraddr_string(ep); + } + + if (type == LINKADDR_FRELAY) { + return q922_string(ep); + } tp = lookup_bytestring(ep, len); if (tp->e_name) diff --git a/addrtoname.h b/addrtoname.h index 67ded6e69484..1df204a941f4 100644 --- a/addrtoname.h +++ b/addrtoname.h @@ -18,12 +18,21 @@ * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. * - * @(#) $Header: /tcpdump/master/tcpdump/addrtoname.h,v 1.18 2001/09/17 21:57:51 fenner Exp $ (LBL) + * @(#) $Header: /tcpdump/master/tcpdump/addrtoname.h,v 1.20 2007-08-08 14:06:34 hannes Exp $ (LBL) */ /* Name to address translation routines. */ -extern const char *linkaddr_string(const u_char *, const unsigned int); +enum { + LINKADDR_ETHER, + LINKADDR_FRELAY, + LINKADDR_IEEE1394, + LINKADDR_ATM +}; + +#define BUFSIZE 128 + +extern const char *linkaddr_string(const u_char *, const unsigned int, const unsigned int); extern const char *etheraddr_string(const u_char *); extern const char *etherproto_string(u_short); extern const char *tcpport_string(u_short); diff --git a/af.c b/af.c index 76d61787d495..e3c77bf3c4ce 100644 --- a/af.c +++ b/af.c @@ -17,7 +17,7 @@ #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)"; + "@(#) $Header: /tcpdump/master/tcpdump/af.c,v 1.3 2006-03-23 14:58:44 hannes Exp $ (LBL)"; #endif #ifdef HAVE_CONFIG_H diff --git a/af.h b/af.h index 1ba766212a27..c036cef9637d 100644 --- a/af.h +++ b/af.h @@ -1,4 +1,4 @@ -/* @(#) $Header: /tcpdump/master/tcpdump/af.h,v 1.3.2.1 2007/02/26 13:33:17 hannes Exp $ (LBL) */ +/* @(#) $Header: /tcpdump/master/tcpdump/af.h,v 1.3 2006-03-23 14:58:44 hannes Exp $ (LBL) */ /* * Copyright (c) 1998-2006 The TCPDUMP project diff --git a/aodv.h b/aodv.h index 335c175c12c0..456ec8b309ed 100644 --- a/aodv.h +++ b/aodv.h @@ -1,4 +1,4 @@ -/* @(#) $Header: /tcpdump/master/tcpdump/aodv.h,v 1.3 2003/09/13 01:34:42 guy Exp $ (LBL) */ +/* @(#) $Header: /tcpdump/master/tcpdump/aodv.h,v 1.3 2003-09-13 01:34:42 guy Exp $ (LBL) */ /* * Copyright (c) 2003 Bruce M. Simpson * All rights reserved. diff --git a/appletalk.h b/appletalk.h index 67e62ef870f2..ff972f65bfa9 100644 --- a/appletalk.h +++ b/appletalk.h @@ -20,7 +20,7 @@ * * AppleTalk protocol formats (courtesy Bill Croft of Stanford/SUMEX). * - * @(#) $Header: /tcpdump/master/tcpdump/appletalk.h,v 1.16 2004/05/01 09:41:50 hannes Exp $ (LBL) + * @(#) $Header: /tcpdump/master/tcpdump/appletalk.h,v 1.16 2004-05-01 09:41:50 hannes Exp $ (LBL) */ struct LAP { diff --git a/arcnet.h b/arcnet.h index 6e649f61e02f..3b609566ff81 100644 --- a/arcnet.h +++ b/arcnet.h @@ -30,7 +30,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * @(#) $Id: arcnet.h,v 1.3 2003/01/23 09:05:37 guy Exp $ (LBL) + * @(#) $Id: arcnet.h,v 1.3 2003-01-23 09:05:37 guy Exp $ (LBL) * * from: NetBSD: if_arc.h,v 1.13 1999/11/19 20:41:19 thorpej Exp */ diff --git a/atm.h b/atm.h index c6ac53ea0719..65ac5c17e514 100644 --- a/atm.h +++ b/atm.h @@ -14,7 +14,7 @@ * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. * - * @(#) $Header: /tcpdump/master/tcpdump/atm.h,v 1.1.4.1 2005/06/20 07:45:05 hannes Exp $ + * @(#) $Header: /tcpdump/master/tcpdump/atm.h,v 1.3 2006-02-08 01:43:00 hannes Exp $ */ /* @@ -30,3 +30,4 @@ */ #define ATM_OAM_NOHEC 0 #define ATM_OAM_HEC 1 +#define ATM_HDR_LEN_NOHEC 4 diff --git a/atmuni31.h b/atmuni31.h index 304859a9f14b..32acfb1ee504 100644 --- a/atmuni31.h +++ b/atmuni31.h @@ -29,18 +29,18 @@ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - * @(#) $Header: /tcpdump/master/tcpdump/atmuni31.h,v 1.2 2002/08/05 07:47:23 guy Exp $ (LBL) + * @(#) $Header: /tcpdump/master/tcpdump/atmuni31.h,v 1.2.6.1 2007-10-22 19:39:12 guy Exp $ (LBL) */ /* Based on UNI3.1 standard by ATM Forum */ /* ATM traffic types based on VPI=0 and (the following VCI */ -#define PPC 0x05 /* Point-to-point signal msg */ -#define BCC 0x02 /* Broadcast signal msg */ -#define OAMF4SC 0x03 /* Segment OAM F4 flow cell */ -#define OAMF4EC 0x04 /* End-to-end OAM F4 flow cell */ -#define METAC 0x01 /* Meta signal msg */ -#define ILMIC 0x10 /* ILMI msg */ +#define VCI_PPC 0x05 /* Point-to-point signal msg */ +#define VCI_BCC 0x02 /* Broadcast signal msg */ +#define VCI_OAMF4SC 0x03 /* Segment OAM F4 flow cell */ +#define VCI_OAMF4EC 0x04 /* End-to-end OAM F4 flow cell */ +#define VCI_METAC 0x01 /* Meta signal msg */ +#define VCI_ILMIC 0x10 /* ILMI msg */ /* Q.2931 signalling messages */ #define CALL_PROCEED 0x02 /* call proceeding */ diff --git a/bgp.h b/bgp.h index 06be3ea7c0c1..508159601437 100755 --- a/bgp.h +++ b/bgp.h @@ -1,4 +1,4 @@ -/* @(#) $Header: /tcpdump/master/tcpdump/bgp.h,v 1.3 2004/06/16 08:45:15 hannes Exp $ (LBL) */ +/* @(#) $Header: /tcpdump/master/tcpdump/bgp.h,v 1.3 2004-06-16 08:45:15 hannes Exp $ (LBL) */ /* * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that: (1) source code diff --git a/bootp.h b/bootp.h index 7c63d0c4a304..8f61b13a8617 100644 --- a/bootp.h +++ b/bootp.h @@ -1,4 +1,4 @@ -/* @(#) $Header: /tcpdump/master/tcpdump/bootp.h,v 1.15.4.3 2007/08/21 22:02:08 guy Exp $ (LBL) */ +/* @(#) $Header: /tcpdump/master/tcpdump/bootp.h,v 1.18 2007-08-21 21:59:11 guy Exp $ (LBL) */ /* * Bootstrap Protocol (BOOTP). RFC951 and RFC1048. * diff --git a/bpf_dump.c b/bpf_dump.c index 0cad4d95542e..f509b7edbfcb 100644 --- a/bpf_dump.c +++ b/bpf_dump.c @@ -20,7 +20,7 @@ */ #ifndef lint static const char rcsid[] _U_ = - "@(#) $Header: /tcpdump/master/tcpdump/bpf_dump.c,v 1.16 2003/11/16 09:36:08 guy Exp $ (LBL)"; + "@(#) $Header: /tcpdump/master/tcpdump/bpf_dump.c,v 1.16.4.1 2008-02-14 20:54:53 guy Exp $ (LBL)"; #endif #ifdef HAVE_CONFIG_H @@ -35,7 +35,7 @@ static const char rcsid[] _U_ = #include "interface.h" void -bpf_dump(struct bpf_program *p, int option) +bpf_dump(const struct bpf_program *p, int option) { struct bpf_insn *insn; int i; diff --git a/chdlc.h b/chdlc.h index 4fb6e1d4e41d..d11726336ee0 100644 --- a/chdlc.h +++ b/chdlc.h @@ -1,4 +1,4 @@ -/* @(#) $Header: /tcpdump/master/tcpdump/chdlc.h,v 1.1 2000/09/18 05:11:43 guy Exp $ (LBL) */ +/* @(#) $Header: /tcpdump/master/tcpdump/chdlc.h,v 1.1 2000-09-18 05:11:43 guy Exp $ (LBL) */ /* * Copyright (c) 1990, 1991, 1993, 1994, 1995, 1996, 1997 * The Regents of the University of California. All rights reserved. diff --git a/checksum.c b/checksum.c new file mode 100644 index 000000000000..f441be3d4d7a --- /dev/null +++ b/checksum.c @@ -0,0 +1,137 @@ +/* + * 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. + * + * miscellaneous checksumming routines + * + * Original code by Hannes Gredler (hannes@juniper.net) + */ + +#ifndef lint +static const char rcsid[] _U_ = + "@(#) $Header: /tcpdump/master/tcpdump/checksum.c,v 1.4 2006-09-25 09:23:32 hannes Exp $"; +#endif + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include + +#include +#include +#include + +#include "interface.h" + +#define CRC10_POLYNOMIAL 0x633 +static u_int16_t crc10_table[256]; + +static void +init_crc10_table(void) +{ + register int i, j; + register u_int16_t accum; + + for ( i = 0; i < 256; i++ ) + { + accum = ((unsigned short) i << 2); + for ( j = 0; j < 8; j++ ) + { + if ((accum <<= 1) & 0x400) accum ^= CRC10_POLYNOMIAL; + } + crc10_table[i] = accum; + } + return; +} + +u_int16_t +verify_crc10_cksum(u_int16_t accum, const u_char *p, int length) +{ + register int i; + + for ( i = 0; i < length; i++ ) + { + accum = ((accum << 8) & 0x3ff) + ^ crc10_table[( accum >> 2) & 0xff] + ^ *p++; + } + return accum; +} + +/* precompute checksum tables */ +void +init_checksum(void) { + + init_crc10_table(); + +} + +/* + * Creates the OSI Fletcher checksum. See 8473-1, Appendix C, section C.3. + * The checksum field of the passed PDU does not need to be reset to zero. + */ +u_int16_t +create_osi_cksum (const u_int8_t *pptr, int checksum_offset, int length) +{ + + int x; + int y; + u_int32_t mul; + u_int32_t c0; + u_int32_t c1; + u_int16_t checksum; + int index; + + checksum = 0; + + c0 = 0; + c1 = 0; + + for (index = 0; index < length; index++) { + /* + * Ignore the contents of the checksum field. + */ + if (index == checksum_offset || + index == checksum_offset+1) { + c1 += c0; + pptr++; + } else { + c0 = c0 + *(pptr++); + c1 += c0; + } + } + + c0 = c0 % 255; + c1 = c1 % 255; + + mul = (length - checksum_offset)*(c0); + + x = mul - c0 - c1; + y = c1 - mul - 1; + + if ( y >= 0 ) y++; + if ( x < 0 ) x--; + + x %= 255; + y %= 255; + + + if (x == 0) x = 255; + if (y == 0) y = 255; + + y &= 0x00FF; + checksum = ((x << 8) | y); + + return checksum; +} diff --git a/config.h.in b/config.h.in index 86ffe06e8892..085cc936b36e 100644 --- a/config.h.in +++ b/config.h.in @@ -187,9 +187,15 @@ /* Define to 1 if you have the header file. */ #undef HAVE_OPENSSL_EVP_H +/* Define to 1 if you have the header file. */ +#undef HAVE_PCAP_BLUETOOTH_H + /* Define to 1 if you have the `pcap_breakloop' function. */ #undef HAVE_PCAP_BREAKLOOP +/* Define to 1 if you have the `pcap_create' function. */ +#undef HAVE_PCAP_CREATE + /* Define to 1 if you have the `pcap_dump_flush' function. */ #undef HAVE_PCAP_DUMP_FLUSH diff --git a/configure b/configure index 2494df5473eb..f4b7754dce40 100755 --- a/configure +++ b/configure @@ -1,5 +1,5 @@ #! /bin/sh -# From configure.in Revision: 1.188.2.8 . +# From configure.in Revision: 1.196.2.6 . # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.61. # @@ -671,6 +671,7 @@ CPP GREP EGREP LIBOBJS +RANLIB V_CCOPT V_DEFS V_GROUP @@ -1274,7 +1275,8 @@ Optional Packages: --without-gcc don't use gcc --with-user=USERNAME drop privileges by default to USERNAME --with-chroot=DIRECTORY when dropping privileges, chroot to DIRECTORY - --without-crypto disable crypto support + --with-crypto[=PATH] use SSLeay libcrypto (located in directory PATH, if + supplied). [default=yes, if available] Some influential environment variables: CC C compiler command @@ -4035,7 +4037,7 @@ fi done -if test "$ac_cv_header_net_pfvar_h" == yes; then +if test "$ac_cv_header_net_pfvar_h" = yes; then LOCALSRC="print-pflog.c $LOCALSRC" fi @@ -9362,7 +9364,7 @@ fi echo "$as_me: error: see the INSTALL doc for more info" >&2;} { (exit 1); exit 1; }; } fi - { echo "$as_me:$LINENO: checking for extraneous pcap header directories" >&5 + { echo "$as_me:$LINENO: checking for extraneous pcap header directories" >&5 echo $ECHO_N "checking for extraneous pcap header directories... $ECHO_C" >&6; } if test \( ! -r /usr/local/include/pcap.h \) -a \ \( ! -r /usr/include/pcap.h \); then @@ -10758,6 +10760,73 @@ _ACEOF fi fi +# libdlpi is needed for Solaris 11 and later. +{ echo "$as_me:$LINENO: checking for dlpi_walk in -ldlpi" >&5 +echo $ECHO_N "checking for dlpi_walk in -ldlpi... $ECHO_C" >&6; } +if test "${ac_cv_lib_dlpi_dlpi_walk+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldlpi -L/lib $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char dlpi_walk (); +int +main () +{ +return dlpi_walk (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_lib_dlpi_dlpi_walk=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_dlpi_dlpi_walk=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_lib_dlpi_dlpi_walk" >&5 +echo "${ECHO_T}$ac_cv_lib_dlpi_dlpi_walk" >&6; } +if test $ac_cv_lib_dlpi_dlpi_walk = yes; then + LIBS="$LIBS -ldlpi" LDFLAGS="-L/lib $LDFLAGS" +fi + + { echo "$as_me:$LINENO: checking if sockaddr struct has sa_len member" >&5 echo $ECHO_N "checking if sockaddr struct has sa_len member... $ECHO_C" >&6; } @@ -10822,6 +10891,104 @@ if test "$ac_cv_sockaddr_has_sa_len" = no; then missing_includes=yes fi +# +# Do we have the new open API? Check for pcap_create, and assume that, +# if we do, we also have pcap_activate() and the other new routines. + +for ac_func in pcap_create +do +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +{ echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define $ac_func to an innocuous variant, in case declares $ac_func. + For example, HP-UX 11i declares gettimeofday. */ +#define $ac_func innocuous_$ac_func + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef $ac_func + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char $ac_func (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined __stub_$ac_func || defined __stub___$ac_func +choke me +#endif + +int +main () +{ +return $ac_func (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + eval "$as_ac_var=no" +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +fi +ac_res=`eval echo '${'$as_ac_var'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +fi +done + + @@ -10919,8 +11086,8 @@ fi done if test $ac_cv_func_pcap_findalldevs = "yes" ; then - savedcflags="$CFLAGS" - CFLAGS="$CFLAGS $V_INCLS" + savedppflags="$CPPLAGS" + CPPFLAGS="$CPPFLAGS $V_INCLS" { echo "$as_me:$LINENO: checking for pcap_if_t" >&5 echo $ECHO_N "checking for pcap_if_t... $ECHO_C" >&6; } if test "${ac_cv_type_pcap_if_t+set}" = set; then @@ -10984,7 +11151,7 @@ _ACEOF fi - CFLAGS="$savedcflags" + CPPFLAGS="$savedcppflags" fi if test $ac_cv_func_pcap_lib_version = "no" ; then @@ -11304,6 +11471,154 @@ if test -f /dev/bpf0 ; then V_GROUP=bpf fi +# +# Check for some headers introduced in later versions of libpcap +# and used by some printers. +# +savedcppflags="$CPPFLAGS" +CPPFLAGS="$CPPFLAGS $V_INCLS" + +for ac_header in pcap/bluetooth.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +else + # Is the header compilable? +{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_compiler=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } + +# Is the header present? +{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <$ac_header> +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi + +rm -f conftest.err conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + + ;; +esac +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + eval "$as_ac_Header=\$ac_header_preproc" +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } + +fi +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + +CPPFLAGS="$savedcppflags" + for ac_header in sys/bitypes.h do @@ -12581,6 +12896,103 @@ fi fi +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. +set dummy ${ac_tool_prefix}ranlib; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_RANLIB+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$RANLIB"; then + ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +RANLIB=$ac_cv_prog_RANLIB +if test -n "$RANLIB"; then + { echo "$as_me:$LINENO: result: $RANLIB" >&5 +echo "${ECHO_T}$RANLIB" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_RANLIB"; then + ac_ct_RANLIB=$RANLIB + # Extract the first word of "ranlib", so it can be a program name with args. +set dummy ranlib; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_RANLIB"; then + ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_RANLIB="ranlib" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB +if test -n "$ac_ct_RANLIB"; then + { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5 +echo "${ECHO_T}$ac_ct_RANLIB" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + if test "x$ac_ct_RANLIB" = x; then + RANLIB=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&2;} +ac_tool_warned=yes ;; +esac + RANLIB=$ac_ct_RANLIB + fi +else + RANLIB="$ac_cv_prog_RANLIB" +fi + + rm -f os-proto.h if test "${LBL_CFLAGS+set}" = set; then V_CCOPT="$V_CCOPT ${LBL_CFLAGS}" @@ -12719,7 +13131,7 @@ else # know it does work, and have the script just fail on other # cpu types and update it when such a failure occurs. # - alpha*|arm*|hp*|mips*|sh*|sparc*|ia64|nv1) + alpha*|arm*|bfin*|hp*|mips*|sh*|sparc*|ia64|nv1) ac_cv_lbl_unaligned_fail=yes ;; @@ -12837,66 +13249,137 @@ _ACEOF fi +# Check for SSLeay +{ echo "$as_me:$LINENO: checking whether to use SSLeay libcrypto" >&5 +echo $ECHO_N "checking whether to use SSLeay libcrypto... $ECHO_C" >&6; } +# Specify location for both includes and libraries. +want_libcrypto=youmama # Check whether --with-crypto was given. if test "${with_crypto+set}" = set; then withval=$with_crypto; + if test $withval = no + then + want_libcrypto=no + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } + elif test $withval = yes + then + want_libcrypto=yes + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + else + want_libcrypto=yes + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + crypto_dir=$withval + fi + else -{ echo "$as_me:$LINENO: checking for SSLeay" >&5 -echo $ECHO_N "checking for SSLeay... $ECHO_C" >&6; } -ac_cv_ssleay_path=no -incdir=no + # + # Use libcrypto if it's present, otherwise don't. + # + want_libcrypto=ifavailable + { echo "$as_me:$LINENO: result: yes, if available" >&5 +echo "${ECHO_T}yes, if available" >&6; } -# -# If Xprefix is set in the environment, use that value. -# XXX - this should arguably be done by having --with-crypto take an -# optional argument, and have that argument be used to set Xprefix -# if present. -# -if test -z "$Xprefix"; then - Xprefix=`eval echo $prefix` fi -for dir in $Xprefix /usr/${host_alias} /usr /usr/local /usr/local/ssl /usr/pkg; do +if test "$want_libcrypto" != "no"; then + ac_cv_ssleay_path=no + incdir=no + if test "x$crypto_dir" = x; then + # + # Location not specified; check the default locations. + # + { echo "$as_me:$LINENO: checking where SSLeay is located" >&5 +echo $ECHO_N "checking where SSLeay is located... $ECHO_C" >&6; } + dirs="/usr /usr/local /usr/local/ssl /usr/pkg" + if test "x${host_alias}" != x; then + dirs="/usr/${host_alias} $dirs" + fi + for dir in $dirs; do + # # XXX - is there a better way to check if a given library is # in a given directory than checking each of the possible # shared library suffixes? # - # Are there any other suffixes we need to look for? Do we have to - # worry about ".so.{version}"? + # Are there any other suffixes we need to look for? Do we + # have to worry about ".so.{version}"? # # Or should we just look for "libcrypto.*"? # - if test -d $dir/lib -a \( -f $dir/lib/libcrypto.a -o \ - -f $dir/lib/libcrypto.so -o \ - -f $dir/lib/libcrypto.sl -o \ - -f $dir/lib/libcrypto.dylib \); then - ac_cv_ssleay_path=$dir + if test -d "$dir/lib" -a \( -f "$dir/lib/libcrypto.a" -o \ + -f "$dir/lib/libcrypto.so" -o \ + -f "$dir/lib/libcrypto.sl" -o \ + -f "$dir/lib/libcrypto.dylib" \); then + ac_cv_ssleay_path="$dir" fi - if test -d $dir/include/openssl -a -f $dir/include/openssl/des.h; then + + # + # Make sure we have the headers as well. + # + if test -d "$dir/include/openssl" -a -f "$dir/include/openssl/des.h"; then incdir="-I$dir/include" fi - if test "$ac_cv_ssleay_path" != "no" -a "$incdir" != "no"; then - break; - else - ac_cv_ssleay_path=no - incdir=no - fi -done -{ echo "$as_me:$LINENO: result: $ac_cv_ssleay_path" >&5 + + + if test "$ac_cv_ssleay_path" != "no" -a "$incdir" != "no"; then + break; + else + ac_cv_ssleay_path=no + incdir=no + fi + done + if test "$ac_cv_ssleay_path" != no; then + { echo "$as_me:$LINENO: result: $ac_cv_ssleay_path" >&5 echo "${ECHO_T}$ac_cv_ssleay_path" >&6; } -if test "$ac_cv_ssleay_path" != no; then - V_INCLS="$V_INCLS $incdir" - LDFLAGS="-L$dir/lib $LDFLAGS" - if test -f $ac_cv_ssleay_path/lib/libRSAglue.a; then - LIBS="$LIBS -lRSAglue" + fi + else + { echo "$as_me:$LINENO: checking for SSLeay in $crypto_dir" >&5 +echo $ECHO_N "checking for SSLeay in $crypto_dir... $ECHO_C" >&6; } + + # + # XXX - is there a better way to check if a given library is + # in a given directory than checking each of the possible + # shared library suffixes? + # + # Are there any other suffixes we need to look for? Do we + # have to worry about ".so.{version}"? + # + # Or should we just look for "libcrypto.*"? + # + if test -d "$crypto_dir/lib" -a \( -f "$crypto_dir/lib/libcrypto.a" -o \ + -f "$crypto_dir/lib/libcrypto.so" -o \ + -f "$crypto_dir/lib/libcrypto.sl" -o \ + -f "$crypto_dir/lib/libcrypto.dylib" \); then + ac_cv_ssleay_path="$crypto_dir" fi - if test -f $ac_cv_ssleay_path/lib/librsaref.a; then - LIBS="$LIBS -lrsaref" + + # + # Make sure we have the headers as well. + # + if test -d "$crypto_dir/include/openssl" -a -f "$crypto_dir/include/openssl/des.h"; then + incdir="-I$crypto_dir/include" fi + if test "$ac_cv_ssleay_path" != no; then + { echo "$as_me:$LINENO: result: found" >&5 +echo "${ECHO_T}found" >&6; } + fi + fi + if test "$ac_cv_ssleay_path" != no; then + V_INCLS="$V_INCLS $incdir" + LDFLAGS="-L$dir/lib $LDFLAGS" + if test -f $ac_cv_ssleay_path/lib/libRSAglue.a; then + LIBS="$LIBS -lRSAglue" + fi + if test -f $ac_cv_ssleay_path/lib/librsaref.a; then + LIBS="$LIBS -lrsaref" + fi + { echo "$as_me:$LINENO: checking for DES_cbc_encrypt in -lcrypto" >&5 echo $ECHO_N "checking for DES_cbc_encrypt in -lcrypto... $ECHO_C" >&6; } if test "${ac_cv_lib_crypto_DES_cbc_encrypt+set}" = set; then @@ -12968,7 +13451,7 @@ _ACEOF fi - CPPFLAGS="$CPPFLAGS $V_INCLS" + CPPFLAGS="$CPPFLAGS $V_INCLS" for ac_header in openssl/evp.h do @@ -13109,11 +13592,20 @@ fi done + else + # + # Not found. Did the user explicitly ask for it? + # + { echo "$as_me:$LINENO: result: not found" >&5 +echo "${ECHO_T}not found" >&6; } + if test "$want_libcrypto" = yes; then + { { echo "$as_me:$LINENO: error: SSLeay not found" >&5 +echo "$as_me: error: SSLeay not found" >&2;} + { (exit 1); exit 1; }; } + fi + fi fi -fi - - if test "$missing_includes" = "yes"; then CPPFLAGS="$CPPFLAGS -I\$(srcdir)/missing" V_INCLS="$V_INCLS -I\$(srcdir)/missing" @@ -13898,6 +14390,7 @@ CPP!$CPP$ac_delim GREP!$GREP$ac_delim EGREP!$EGREP$ac_delim LIBOBJS!$LIBOBJS$ac_delim +RANLIB!$RANLIB$ac_delim V_CCOPT!$V_CCOPT$ac_delim V_DEFS!$V_DEFS$ac_delim V_GROUP!$V_GROUP$ac_delim @@ -13910,7 +14403,7 @@ INSTALL_DATA!$INSTALL_DATA$ac_delim LTLIBOBJS!$LTLIBOBJS$ac_delim _ACEOF - if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 67; then + if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 68; then break elif $ac_last_try; then { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 diff --git a/configure.in b/configure.in index 5a010e7bf8ef..f3528c4dd27a 100755 --- a/configure.in +++ b/configure.in @@ -1,4 +1,4 @@ -dnl @(#) $Header: /tcpdump/master/tcpdump/configure.in,v 1.188.2.8 2007/09/12 19:48:50 guy Exp $ (LBL) +dnl @(#) $Header: /tcpdump/master/tcpdump/configure.in,v 1.196.2.6 2008-09-25 21:50:04 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.8 $) +AC_REVISION($Revision: 1.196.2.6 $) AC_PREREQ(2.50) AC_INIT(tcpdump.c) @@ -19,7 +19,7 @@ AC_CHECK_HEADERS(fcntl.h rpc/rpcent.h netdnet/dnetdb.h) AC_CHECK_HEADERS(net/pfvar.h, , , [#include #include #include ]) -if test "$ac_cv_header_net_pfvar_h" == yes; then +if test "$ac_cv_header_net_pfvar_h" = yes; then LOCALSRC="print-pflog.c $LOCALSRC" fi AC_CHECK_HEADERS(netinet/if_ether.h, , , [#include @@ -696,6 +696,9 @@ don't.]) fi fi +# libdlpi is needed for Solaris 11 and later. +AC_CHECK_LIB(dlpi, dlpi_walk, LIBS="$LIBS -ldlpi" LDFLAGS="-L/lib $LDFLAGS", ,-L/lib) + dnl portability macros for getaddrinfo/getnameinfo dnl dnl Check for sa_len @@ -704,15 +707,20 @@ if test "$ac_cv_sockaddr_has_sa_len" = no; then missing_includes=yes fi +# +# Do we have the new open API? Check for pcap_create, and assume that, +# if we do, we also have pcap_activate() and the other new routines. +AC_CHECK_FUNCS(pcap_create) + AC_CHECK_FUNCS(pcap_findalldevs pcap_dump_flush pcap_lib_version) if test $ac_cv_func_pcap_findalldevs = "yes" ; then dnl Check for Mac OS X, which may ship pcap.h from 0.6 but libpcap may dnl be 0.8; this means that lib has pcap_findalldevs but header doesn't dnl have pcap_if_t. - savedcflags="$CFLAGS" - CFLAGS="$CFLAGS $V_INCLS" + savedppflags="$CPPLAGS" + CPPFLAGS="$CPPFLAGS $V_INCLS" AC_CHECK_TYPES(pcap_if_t, , , [#include ]) - CFLAGS="$savedcflags" + CPPFLAGS="$savedcppflags" fi if test $ac_cv_func_pcap_lib_version = "no" ; then @@ -795,6 +803,15 @@ if test -f /dev/bpf0 ; then V_GROUP=bpf fi +# +# Check for some headers introduced in later versions of libpcap +# and used by some printers. +# +savedcppflags="$CPPFLAGS" +CPPFLAGS="$CPPFLAGS $V_INCLS" +AC_CHECK_HEADERS(pcap/bluetooth.h) +CPPFLAGS="$savedcppflags" + AC_CHECK_HEADERS(sys/bitypes.h) AC_CHECK_TYPE([int8_t], , @@ -900,6 +917,8 @@ if test "$ac_lbl_inttypes_h_defines_formats" = no; then ]) fi +AC_PROG_RANLIB + AC_LBL_DEVEL(V_CCOPT) AC_LBL_SOCKADDR_SA_LEN @@ -908,65 +927,89 @@ AC_LBL_UNALIGNED_ACCESS AC_VAR_H_ERRNO -AC_ARG_WITH(crypto, [ --without-crypto disable crypto support], - [], [ -AC_MSG_CHECKING(for SSLeay) -ac_cv_ssleay_path=no -incdir=no - -# -# If Xprefix is set in the environment, use that value. -# XXX - this should arguably be done by having --with-crypto take an -# optional argument, and have that argument be used to set Xprefix -# if present. -# -if test -z "$Xprefix"; then - Xprefix=`eval echo $prefix` -fi - -for dir in $Xprefix /usr/${host_alias} /usr /usr/local /usr/local/ssl /usr/pkg; do - # - # XXX - is there a better way to check if a given library is - # in a given directory than checking each of the possible - # shared library suffixes? - # - # Are there any other suffixes we need to look for? Do we have to - # worry about ".so.{version}"? - # - # Or should we just look for "libcrypto.*"? - # - if test -d $dir/lib -a \( -f $dir/lib/libcrypto.a -o \ - -f $dir/lib/libcrypto.so -o \ - -f $dir/lib/libcrypto.sl -o \ - -f $dir/lib/libcrypto.dylib \); then - ac_cv_ssleay_path=$dir - fi - if test -d $dir/include/openssl -a -f $dir/include/openssl/des.h; then - incdir="-I$dir/include" - fi - if test "$ac_cv_ssleay_path" != "no" -a "$incdir" != "no"; then - break; +# Check for SSLeay +AC_MSG_CHECKING(whether to use SSLeay libcrypto) +# Specify location for both includes and libraries. +want_libcrypto=youmama +AC_ARG_WITH(crypto, + AS_HELP_STRING([--with-crypto@<:@=PATH@:>@], + [use SSLeay libcrypto (located in directory PATH, if supplied). @<:@default=yes, if available@:>@]), +[ + if test $withval = no + then + want_libcrypto=no + AC_MSG_RESULT(no) + elif test $withval = yes + then + want_libcrypto=yes + AC_MSG_RESULT(yes) else - ac_cv_ssleay_path=no - incdir=no + want_libcrypto=yes + AC_MSG_RESULT(yes) + crypto_dir=$withval fi -done -AC_MSG_RESULT($ac_cv_ssleay_path) -if test "$ac_cv_ssleay_path" != no; then - V_INCLS="$V_INCLS $incdir" - LDFLAGS="-L$dir/lib $LDFLAGS" - if test -f $ac_cv_ssleay_path/lib/libRSAglue.a; then - LIBS="$LIBS -lRSAglue" - fi - if test -f $ac_cv_ssleay_path/lib/librsaref.a; then - LIBS="$LIBS -lrsaref" - fi - AC_CHECK_LIB(crypto, DES_cbc_encrypt) - - CPPFLAGS="$CPPFLAGS $V_INCLS" - AC_CHECK_HEADERS(openssl/evp.h) -fi +],[ + # + # Use libcrypto if it's present, otherwise don't. + # + want_libcrypto=ifavailable + AC_MSG_RESULT([yes, if available]) ]) +if test "$want_libcrypto" != "no"; then + ac_cv_ssleay_path=no + incdir=no + if test "x$crypto_dir" = x; then + # + # Location not specified; check the default locations. + # + AC_MSG_CHECKING(where SSLeay is located) + dirs="/usr /usr/local /usr/local/ssl /usr/pkg" + if test "x${host_alias}" != x; then + dirs="/usr/${host_alias} $dirs" + fi + for dir in $dirs; do + AC_LBL_SSLEAY($dir) + + if test "$ac_cv_ssleay_path" != "no" -a "$incdir" != "no"; then + break; + else + ac_cv_ssleay_path=no + incdir=no + fi + done + if test "$ac_cv_ssleay_path" != no; then + AC_MSG_RESULT($ac_cv_ssleay_path) + fi + else + AC_MSG_CHECKING(for SSLeay in $crypto_dir) + AC_LBL_SSLEAY($crypto_dir) + if test "$ac_cv_ssleay_path" != no; then + AC_MSG_RESULT(found) + fi + fi + if test "$ac_cv_ssleay_path" != no; then + V_INCLS="$V_INCLS $incdir" + LDFLAGS="-L$dir/lib $LDFLAGS" + if test -f $ac_cv_ssleay_path/lib/libRSAglue.a; then + LIBS="$LIBS -lRSAglue" + fi + if test -f $ac_cv_ssleay_path/lib/librsaref.a; then + LIBS="$LIBS -lrsaref" + fi + AC_CHECK_LIB(crypto, DES_cbc_encrypt) + + CPPFLAGS="$CPPFLAGS $V_INCLS" + AC_CHECK_HEADERS(openssl/evp.h) + else + # + # Not found. Did the user explicitly ask for it? + # + AC_MSG_RESULT(not found) + if test "$want_libcrypto" = yes; then + AC_MSG_ERROR(SSLeay not found) + fi + fi +fi dnl dnl set additional include path if necessary diff --git a/dccp.h b/dccp.h index 1afa8c0f578a..5c66e23cd860 100644 --- a/dccp.h +++ b/dccp.h @@ -1,4 +1,4 @@ -/* @(#) $Header: /tcpdump/master/tcpdump/dccp.h,v 1.1.2.4 2006/05/12 01:46:17 guy Exp $ (LBL) */ +/* @(#) $Header: /tcpdump/master/tcpdump/dccp.h,v 1.5 2006-11-02 09:05:23 hannes Exp $ (LBL) */ /* * Copyright (C) Arnaldo Carvalho de Melo 2004 * Copyright (C) Ian McDonald 2005 @@ -36,8 +36,8 @@ struct dccp_hdr { } dccph_xtrs; }; -#define DCCPH_CCVAL(dh) (((dh)->dccph_ccval_cscov) & 0x0F) -#define DCCPH_CSCOV(dh) (((dh)->dccph_ccval_cscov >> 4) & 0x0F) +#define DCCPH_CCVAL(dh) (((dh)->dccph_ccval_cscov >> 4) & 0xF) +#define DCCPH_CSCOV(dh) (((dh)->dccph_ccval_cscov) & 0xF) #define DCCPH_X(dh) ((dh)->dccph_xtrs.dccph_xtr & 1) #define DCCPH_TYPE(dh) (((dh)->dccph_xtrs.dccph_xtr >> 1) & 0xF) diff --git a/decnet.h b/decnet.h index 9a5c147703c9..d25d157d4270 100644 --- a/decnet.h +++ b/decnet.h @@ -18,7 +18,7 @@ * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. * - * @(#) $Header: /tcpdump/master/tcpdump/decnet.h,v 1.11 2002/12/11 07:13:50 guy Exp $ (LBL) + * @(#) $Header: /tcpdump/master/tcpdump/decnet.h,v 1.11 2002-12-11 07:13:50 guy Exp $ (LBL) */ #ifndef WIN32 diff --git a/dhcp6.h b/dhcp6.h deleted file mode 100644 index 8381b11f9195..000000000000 --- a/dhcp6.h +++ /dev/null @@ -1,200 +0,0 @@ -/* @(#) $Header: /tcpdump/master/tcpdump/Attic/dhcp6.h,v 1.4 2000/12/17 23:07:48 guy Exp $ (LBL) */ -/* - * Copyright (C) 1998 and 1999 WIDE Project. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. Neither the name of the project nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ -/* - * draft-ietf-dhc-dhcpv6-15 - */ - -#ifndef __DHCP6_H_DEFINED -#define __DHCP6_H_DEFINED - -/* Error Values */ -#define DH6ERR_FAILURE 16 -#define DH6ERR_AUTHFAIL 17 -#define DH6ERR_POORLYFORMED 18 -#define DH6ERR_UNAVAIL 19 -#define DH6ERR_NOBINDING 20 -#define DH6ERR_INVALIDSOURCE 21 -#define DH6ERR_NOSERVER 23 -#define DH6ERR_ICMPERROR 64 - -/* Message type */ -#define DH6_SOLICIT 1 -#define DH6_ADVERT 2 -#define DH6_REQUEST 3 -#define DH6_REPLY 4 -#define DH6_RELEASE 5 -#define DH6_RECONFIG 6 - -/* Predefined addresses */ -#define DH6ADDR_ALLAGENT "ff02::1:2" -#define DH6ADDR_ALLSERVER "ff05::1:3" -#define DH6ADDR_ALLRELAY "ff05::1:4" -#define DH6PORT_DOWNSTREAM "546" -#define DH6PORT_UPSTREAM "547" - -/* Protocol constants */ -#define ADV_CLIENT_WAIT 2 /* sec */ -#define DEFAULT_SOLICIT_HOPCOUNT 4 -#define SERVER_MIN_ADV_DELAY 100 /* msec */ -#define SERVER_MAX_ADV_DELAY 1000 /* msec */ -#define REPLY_MSG_TIMEOUT 2 /* sec */ -#define REQUEST_MSG_MIN_RETRANS 10 /* retransmissions */ -#define RECONF_MSG_MIN_RETRANS 10 /* retransmissions */ -#define RECONF_MSG_RETRANS_INTERVAL 12 /* sec */ -#define RECONF_MMSG_MIN_RESP 2 /* sec */ -#define RECONF_MMSG_MAX_RESP 10 /* sec */ -#define RECONF_MULTICAST_REQUEST_WAIT 120 /* sec */ -#define MIN_SOLICIT_DELAY 1 /* sec */ -#define MAX_SOLICIT_DELAY 5 /* sec */ -#define XID_TIMEOUT 600 /* sec */ - -/* DHCP6 base packet format */ -struct dhcp6_solicit { - u_int8_t dh6sol_msgtype; /* DH6_SOLICIT */ - u_int8_t dh6sol_flags; -#define DH6SOL_CLOSE 0x80 -#define DH6SOL_PREFIX 0x40 - /* XXX: solicit-ID is a 9-bit field...ugly! */ -#define DH6SOL_SOLICIT_ID_MASK 0x01ff -#define DH6SOL_SOLICIT_ID_SHIFT 0 -#define DH6SOL_SOLICIT_ID(x) \ - (((x) & DH6SOL_SOLICIT_ID_MASK) >> DH6SOL_SOLICIT_ID_SHIFT) -#define DH6SOL_SOLICIT_PLEN_MASK 0xfe00 -#define DH6SOL_SOLICIT_PLEN_SHIFT 9 -#define DH6SOL_SOLICIT_PLEN(x) \ - (((x) & DH6SOL_SOLICIT_PLEN_MASK) >> DH6SOL_SOLICIT_PLEN_SHIFT) - u_int16_t dh6sol_plen_id; /* prefix-len and solict-ID */ - struct in6_addr dh6sol_cliaddr; /* client's lladdr */ - struct in6_addr dh6sol_relayaddr; /* relay agent's lladdr */ -}; - -struct dhcp6_advert { - u_int8_t dh6adv_msgtype; /* DH6_ADVERT */ - u_int8_t dh6adv_rsv_id; /* reserved and uppermost bit of ID */ - u_int8_t dh6adv_solcit_id; /* lower 8 bits of solicit-ID */ - u_int8_t dh6adv_pref; - struct in6_addr dh6adv_cliaddr; /* client's link-local addr */ - struct in6_addr dh6adv_relayaddr; /* relay agent's (non-ll) addr */ - struct in6_addr dh6adv_serveraddr; /* server's addr */ - /* extensions */ -}; - -struct dhcp6_request { - u_int8_t dh6req_msgtype; /* DH6_REQUEST */ - u_int8_t dh6req_flags; -#define DH6REQ_CLOSE 0x80 -#define DH6REQ_REBOOT 0x40 - u_int16_t dh6req_xid; /* transaction-ID */ - struct in6_addr dh6req_cliaddr; /* client's lladdr */ - struct in6_addr dh6req_relayaddr; /* relay agent's (non-ll) addr */ - struct in6_addr dh6req_serveraddr; /* server's addr */ - /* extensions */ -}; - -struct dhcp6_reply { - u_int8_t dh6rep_msgtype; /* DH6_REPLY */ - u_int8_t dh6rep_flagandstat; -#define DH6REP_RELAYPRESENT 0x80 -#define DH6REP_STATMASK 0x7f - u_int16_t dh6rep_xid; /* transaction-ID */ - struct in6_addr dh6rep_cliaddr; /* client's lladdr */ - /* struct in6_addr dh6rep_relayaddr; optional: relay address */ - /* extensions */ -}; - -/* XXX: followings are based on older drafts */ -struct dhcp6_release { - u_int8_t dh6rel_msgtype; /* DH6_RELEASE */ - u_int8_t dh6rel_flags; -#define DH6REL_DIRECT 0x80 - u_int16_t dh6rel_xid; /* transaction-ID */ - struct in6_addr dh6rel_cliaddr; /* client's lladdr */ - struct in6_addr dh6rel_relayaddr; /* relay agent's (non-ll) addr */ - struct in6_addr dh6rel_reladdr; /* server's addr to be released */ - /* extensions */ -}; - -struct dhcp6_reconfig { - u_int8_t dh6cfg_msgtype; /* DH6_RECONFIG */ - u_int8_t dh6cfg_flags; -#define DH6REP_NOREPLY 0x80 - u_int16_t dh6cfg_xid; /* transaction-ID */ - struct in6_addr dh6cfg_servaddr; /* server's addr */ - /* extensions */ -}; - -union dhcp6 { - u_int8_t dh6_msgtype; - struct dhcp6_solicit dh6_sol; - struct dhcp6_advert dh6_adv; - struct dhcp6_request dh6_req; - struct dhcp6_reply dh6_rep; - struct dhcp6_release dh6_rel; - struct dhcp6_reconfig dh6_cfg; -}; - -/* DHCP6 extension */ -struct dhcp6e_ipaddr { - u_int16_t dh6eip_type; - u_int16_t dh6eip_len; - u_int8_t dh6eip_status; -#define DH6EX_IP_SUCCESS 0 /* request granted, no errors */ -#define DH6EX_IP_SECFAIL 18 /* Security parameters failed */ -#define DH6EX_IP_AAAAFAIL 20 /* AAAA Record Parameter Problem */ -#define DH6EX_IP_PTRFAIL 21 /* PTR Record Parameter Problem */ -#define DH6EX_IP_PARAMFAIL 22 /* Unable to honor required params */ -#define DH6EX_IP_DNSNAMEFAIL 23 /* DNS name string error */ -#define DH6EX_IP_NODYNDNS 24 /* dynDNS Not Implemented */ -#define DH6EX_IP_NOAUTHDNS 25 /* Authoritative DNS Server not found */ -#define DH6EX_IP_DNSFORMFAIL 33 /* DNS format error */ -#define DH6EX_IP_SERVFAIL 34 /* dynDNS unavailable at this time */ -#define DH6EX_IP_NXDOMAIN 35 /* name does not exist */ -#define DH6EX_IP_NOTIMP 36 /* DNS does not support the Opcode */ -#define DH6EX_IP_REFUSED 37 /* DNS refuses specified operation */ -#define DH6EX_IP_YXDOMAIN 38 /* name does not exist */ -#define DH6EX_IP_YXRRSET 39 /* RRset does not exist */ -#define DH6EX_IP_NXRRSET 40 /* RRset does not exist */ -#define DH6EX_IP_NOTAUTH 41 /* non authoritative name server */ -#define DH6EX_IP_NOTZONE 42 /* prerequisite out of zone */ - u_int8_t dh6eip_flags; -#define DH6EX_IP_CLIANTADDR 0x80 /* C: cliant's addr */ -#define DH6EX_IP_LIFETIME 0x40 /* L: preferred/valid lifetime */ -#define DH6EX_IP_FORCEOPTS 0x20 /* Q: options are mandatory */ -#define DH6EX_IP_AAAA 0x10 /* A: DNS dynamic update for AAAA */ -#define DH6EX_IP_PTR 0x08 /* P: DNS dynamic update for PTR*/ - u_int8_t dh6eip_pad; - u_int8_t dh6eip_prefixlen; - /* struct in6_addr: client's address (if C bit = 1) */ - /* u_int: preferred lifetime (if L bit = 1) */ - /* u_int: valid lifetime (if L bit = 1) */ - /* string: DNS name */ -}; - -#endif /*__DHCP6_H_DEFINED*/ diff --git a/dhcp6opt.h b/dhcp6opt.h deleted file mode 100644 index fc6534dd1bb9..000000000000 --- a/dhcp6opt.h +++ /dev/null @@ -1,81 +0,0 @@ -/* @(#) $Header: /tcpdump/master/tcpdump/Attic/dhcp6opt.h,v 1.4 2001/09/17 21:57:51 fenner Exp $ (LBL) */ -/* - * Copyright (C) 1998 and 1999 WIDE Project. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. Neither the name of the project nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -/* - * draft-ietf-dhc-v6exts-11 - */ - -#ifndef __DHCP6OPT_H_DEFINED -#define __DHCP6OPT_H_DEFINED - -#define OL6_N -1 -#define OL6_16N -2 -#define OL6_Z -3 - -#define OT6_NONE 0 -#define OT6_V6 1 -#define OT6_STR 2 -#define OT6_NUM 3 - -struct dhcp6_opt { - u_int code; - int len; - const char *name; - int type; -}; - -/* index to parameters */ -#define DH6T_CLIENT_ADV_WAIT 1 /* milliseconds */ -#define DH6T_DEFAULT_SOLICIT_HOPCOUNT 2 /* times */ -#define DH6T_SERVER_MIN_ADV_DELAY 3 /* milliseconds */ -#define DH6T_SERVER_MAX_ADV_DELAY 4 /* milliseconds */ -#define DH6T_REQUEST_MSG_MIN_RETRANS 5 /* retransmissions */ -#define DH6T_REPLY_MSG_TIMEOUT 6 /* milliseconds */ -#define DH6T_REPLY_MSG_RETRANS_INTERVAL 7 /* milliseconds */ -#define DH6T_RECONF_MSG_TIMEOUT 8 /* milliseconds */ -#define DH6T_RECONF_MSG_MIN_RETRANS 9 /* retransmissions */ -#define DH6T_RECONF_MSG_RETRANS_INTERVAL 10 /* milliseconds */ -#define DH6T_RECONF_MMSG_MIN_RESP 11 /* milliseconds */ -#define DH6T_RECONF_MMSG_MAX_RESP 12 /* milliseconds */ -#define DH6T_MIN_SOLICIT_DELAY 13 /* milliseconds */ -#define DH6T_MAX_SOLICIT_DELAY 14 /* milliseconds */ -#define DH6T_XID_TIMEOUT 15 /* milliseconds */ -#define DH6T_RECONF_MULTICAST_REQUEST_WAIT 16 /* milliseconds */ - -#if 0 -extern struct dhcp6_opt *dh6o_pad; -extern struct dhcp6_opt *dh6o_end; -extern int dhcp6_param[]; -extern void dhcp6opttab_init (void); -extern struct dhcp6_opt *dhcp6opttab_byname (char *); -extern struct dhcp6_opt *dhcp6opttab_bycode (u_int); -#endif - -#endif /*__DHCP6OPT_H_DEFINED*/ diff --git a/enc.h b/enc.h index f54b4eb6950a..2d57e2b8df16 100644 --- a/enc.h +++ b/enc.h @@ -1,4 +1,4 @@ -/* @(#) $Header: /tcpdump/master/tcpdump/enc.h,v 1.1 2003/03/08 08:55:33 guy Exp $ (LBL) */ +/* @(#) $Header: /tcpdump/master/tcpdump/enc.h,v 1.1 2003-03-08 08:55:33 guy Exp $ (LBL) */ /* From $OpenBSD: if_enc.h,v 1.8 2001/06/25 05:14:00 angelos Exp $ */ /* * The authors of this code are John Ioannidis (ji@tla.org), diff --git a/ether.h b/ether.h index 3d3f3be50146..e8b3a7138dd5 100644 --- a/ether.h +++ b/ether.h @@ -1,4 +1,4 @@ -/* @(#) $Header: /tcpdump/master/tcpdump/ether.h,v 1.8 2002/12/11 07:13:51 guy Exp $ (LBL) */ +/* @(#) $Header: /tcpdump/master/tcpdump/ether.h,v 1.8 2002-12-11 07:13:51 guy Exp $ (LBL) */ /* * Copyright (c) 1982, 1986, 1993 * The Regents of the University of California. All rights reserved. diff --git a/ethertype.h b/ethertype.h index 36dc8e24d304..97550c7fdc31 100644 --- a/ethertype.h +++ b/ethertype.h @@ -18,7 +18,7 @@ * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. * - * @(#) $Header: /tcpdump/master/tcpdump/ethertype.h,v 1.24.2.1 2005/07/10 14:51:10 hannes Exp $ (LBL) + * @(#) $Header: /tcpdump/master/tcpdump/ethertype.h,v 1.29.2.1 2008-02-06 10:49:22 guy Exp $ (LBL) */ /* @@ -109,6 +109,9 @@ #ifndef ETHERTYPE_PPP #define ETHERTYPE_PPP 0x880b #endif +#ifndef ETHERTYPE_MPCP +#define ETHERTYPE_MPCP 0x8808 +#endif #ifndef ETHERTYPE_SLOW #define ETHERTYPE_SLOW 0x8809 #endif @@ -127,15 +130,27 @@ #ifndef ETHERTYPE_JUMBO #define ETHERTYPE_JUMBO 0x8870 #endif +#ifndef ETHERTYPE_LLDP +#define ETHERTYPE_LLDP 0x88cc +#endif #ifndef ETHERTYPE_EAPOL #define ETHERTYPE_EAPOL 0x888e #endif +#ifndef ETHERTYPE_RRCP +#define ETHERTYPE_RRCP 0x8899 +#endif #ifndef ETHERTYPE_LOOPBACK #define ETHERTYPE_LOOPBACK 0x9000 #endif #ifndef ETHERTYPE_VMAN #define ETHERTYPE_VMAN 0x9100 /* Extreme VMAN Protocol */ #endif +#ifndef ETHERTYPE_CFM_OLD +#define ETHERTYPE_CFM_OLD 0xabcd /* 802.1ag depreciated */ +#endif +#ifndef ETHERTYPE_CFM +#define ETHERTYPE_CFM 0x8902 /* 802.1ag */ +#endif #ifndef ETHERTYPE_ISO #define ETHERTYPE_ISO 0xfefe /* nonstandard - used in Cisco HDLC encapsulation */ #endif diff --git a/extract.h b/extract.h index f3db2505dd41..bab63f205d77 100644 --- a/extract.h +++ b/extract.h @@ -18,7 +18,7 @@ * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. * - * @(#) $Header: /tcpdump/master/tcpdump/extract.h,v 1.24 2005/01/15 02:06:50 guy Exp $ (LBL) + * @(#) $Header: /tcpdump/master/tcpdump/extract.h,v 1.25 2006-01-30 16:20:07 hannes Exp $ (LBL) */ /* @@ -115,6 +115,10 @@ typedef struct { (u_int32_t)*((const u_int8_t *)(p) + 2) << 16 | \ (u_int32_t)*((const u_int8_t *)(p) + 1) << 8 | \ (u_int32_t)*((const u_int8_t *)(p) + 0))) +#define EXTRACT_LE_24BITS(p) \ + ((u_int32_t)((u_int32_t)*((const u_int8_t *)(p) + 2) << 16 | \ + (u_int32_t)*((const u_int8_t *)(p) + 1) << 8 | \ + (u_int32_t)*((const u_int8_t *)(p) + 0))) #define EXTRACT_LE_64BITS(p) \ ((u_int64_t)((u_int64_t)*((const u_int8_t *)(p) + 7) << 56 | \ (u_int64_t)*((const u_int8_t *)(p) + 6) << 48 | \ diff --git a/fddi.h b/fddi.h index 690af48d8747..df38c8e9a870 100644 --- a/fddi.h +++ b/fddi.h @@ -18,7 +18,7 @@ * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. * - * @(#) $Header: /tcpdump/master/tcpdump/fddi.h,v 1.11 2002/12/11 07:13:51 guy Exp $ (LBL) + * @(#) $Header: /tcpdump/master/tcpdump/fddi.h,v 1.11 2002-12-11 07:13:51 guy Exp $ (LBL) */ /* diff --git a/gmpls.c b/gmpls.c index 4d4b9aeb3985..ff9adb595005 100644 --- a/gmpls.c +++ b/gmpls.c @@ -15,7 +15,7 @@ #ifndef lint static const char rcsid[] _U_ = - "@(#) $Header: /tcpdump/master/tcpdump/gmpls.c,v 1.5.2.1 2005/05/19 06:44:02 guy Exp $ (LBL)"; + "@(#) $Header: /tcpdump/master/tcpdump/gmpls.c,v 1.7 2006-04-14 07:11:59 hannes Exp $ (LBL)"; #endif #ifdef HAVE_CONFIG_H @@ -25,6 +25,7 @@ static const char rcsid[] _U_ = #include #include "interface.h" +#include "gmpls.h" /* rfc3471 */ struct tok gmpls_link_prot_values[] = { @@ -41,14 +42,21 @@ struct tok gmpls_link_prot_values[] = { /* rfc3471 */ struct tok gmpls_switch_cap_values[] = { - { 1, "Packet-Switch Capable-1"}, - { 2, "Packet-Switch Capable-2"}, - { 3, "Packet-Switch Capable-3"}, - { 4, "Packet-Switch Capable-4"}, - { 51, "Layer-2 Switch Capable"}, - { 100, "Time-Division-Multiplex"}, - { 150, "Lambda-Switch Capable"}, - { 200, "Fiber-Switch Capable"}, + { GMPLS_PSC1, "Packet-Switch Capable-1"}, + { GMPLS_PSC2, "Packet-Switch Capable-2"}, + { GMPLS_PSC3, "Packet-Switch Capable-3"}, + { GMPLS_PSC4, "Packet-Switch Capable-4"}, + { GMPLS_L2SC, "Layer-2 Switch Capable"}, + { GMPLS_TSC, "Time-Division-Multiplex"}, + { GMPLS_LSC, "Lambda-Switch Capable"}, + { GMPLS_FSC, "Fiber-Switch Capable"}, + { 0, NULL } +}; + +/* rfc4205 */ +struct tok gmpls_switch_cap_tsc_indication_values[] = { + { 0, "Standard SONET/SDH" }, + { 1, "Arbitrary SONET/SDH" }, { 0, NULL } }; diff --git a/gmpls.h b/gmpls.h index 8c3f051ecc60..6b2db230a1d5 100644 --- a/gmpls.h +++ b/gmpls.h @@ -1,4 +1,4 @@ -/* @(#) $Header: /tcpdump/master/tcpdump/gmpls.h,v 1.3.2.1 2005/05/19 06:44:03 guy Exp $ (LBL) */ +/* @(#) $Header: /tcpdump/master/tcpdump/gmpls.h,v 1.5 2006-04-14 07:11:59 hannes Exp $ (LBL) */ /* * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that: (1) source code @@ -14,8 +14,18 @@ * Original code by Hannes Gredler (hannes@juniper.net) */ +#define GMPLS_PSC1 1 +#define GMPLS_PSC2 2 +#define GMPLS_PSC3 3 +#define GMPLS_PSC4 4 +#define GMPLS_L2SC 51 +#define GMPLS_TSC 100 +#define GMPLS_LSC 150 +#define GMPLS_FSC 200 + extern struct tok gmpls_link_prot_values[]; extern struct tok gmpls_switch_cap_values[]; +extern struct tok gmpls_switch_cap_tsc_indication_values[]; extern struct tok gmpls_encoding_values[]; extern struct tok gmpls_payload_values[]; extern struct tok diffserv_te_bc_values[]; diff --git a/gmt2local.c b/gmt2local.c index 926e86cfb7fc..1fe0e8a955f3 100644 --- a/gmt2local.c +++ b/gmt2local.c @@ -21,7 +21,7 @@ #ifndef lint static const char rcsid[] _U_ = - "@(#) $Header: /tcpdump/master/tcpdump/gmt2local.c,v 1.9 2003/11/16 09:36:09 guy Exp $ (LBL)"; + "@(#) $Header: /tcpdump/master/tcpdump/gmt2local.c,v 1.9 2003-11-16 09:36:09 guy Exp $ (LBL)"; #endif #ifdef HAVE_CONFIG_H diff --git a/gmt2local.h b/gmt2local.h index 81b0e9607235..17120c5b785e 100644 --- a/gmt2local.h +++ b/gmt2local.h @@ -18,7 +18,7 @@ * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. * - * @(#) $Header: /tcpdump/master/tcpdump/gmt2local.h,v 1.2.1.1 1999/10/07 23:47:10 mcr Exp $ (LBL) + * @(#) $Header: /tcpdump/master/tcpdump/gmt2local.h,v 1.2.1.1 1999-10-07 23:47:10 mcr Exp $ (LBL) */ #ifndef gmt2local_h #define gmt2local_h diff --git a/icmp6.h b/icmp6.h index 20a51e3a6198..5d272703fac0 100644 --- a/icmp6.h +++ b/icmp6.h @@ -1,5 +1,5 @@ -/* @(#) $Header: /tcpdump/master/tcpdump/icmp6.h,v 1.16.2.1 2005/09/05 09:29:28 guy Exp $ (LBL) */ -/* $NetBSD: icmp6.h,v 1.13 2000/08/03 16:30:37 itojun Exp $ */ +/* @(#) $Header: /tcpdump/master/tcpdump/icmp6.h,v 1.18 2007-08-29 02:31:44 mcr Exp $ (LBL) */ +/* NetBSD: icmp6.h,v 1.13 2000/08/03 16:30:37 itojun Exp */ /* $KAME: icmp6.h,v 1.22 2000/08/03 15:25:16 jinmei Exp $ */ /* diff --git a/ieee802_11.h b/ieee802_11.h index f578a43f1a4f..3bcda7d22ba1 100644 --- a/ieee802_11.h +++ b/ieee802_11.h @@ -1,4 +1,4 @@ -/* @(#) $Header: /tcpdump/master/tcpdump/ieee802_11.h,v 1.9.4.3 2007/07/22 20:01:16 guy Exp $ (LBL) */ +/* @(#) $Header: /tcpdump/master/tcpdump/ieee802_11.h,v 1.12 2007-07-22 19:59:06 guy Exp $ (LBL) */ /* * Copyright (c) 2001 * Fortress Technologies diff --git a/ieee802_11_radio.h b/ieee802_11_radio.h index f4416ab9959a..3f2b836f3bfa 100644 --- a/ieee802_11_radio.h +++ b/ieee802_11_radio.h @@ -1,6 +1,6 @@ -/* $FreeBSD: vendor/tcpdump/dist/contrib/tcpdump/ieee802_11_radio.h 172683 2007-10-16 02:20:42Z mlaier $ */ -/* $NetBSD: ieee802_11_radio.h,v 1.2 2006/02/26 03:04:03 dyoung Exp $ */ -/* $Header: /tcpdump/master/tcpdump/ieee802_11_radio.h,v 1.1.2.1 2006/06/13 22:24:45 guy Exp $ */ +/* $FreeBSD: src/sys/net80211/ieee80211_radiotap.h,v 1.5 2005/01/22 20:12:05 sam Exp $ */ +/* NetBSD: ieee802_11_radio.h,v 1.2 2006/02/26 03:04:03 dyoung Exp */ +/* $Header: /tcpdump/master/tcpdump/ieee802_11_radio.h,v 1.3 2007-08-29 02:31:44 mcr Exp $ */ /*- * Copyright (c) 2003, 2004 David Young. All rights reserved. diff --git a/igrp.h b/igrp.h index 78876d3d8428..b5f133bcb3cd 100644 --- a/igrp.h +++ b/igrp.h @@ -1,4 +1,4 @@ -/* @(#) $Header: /tcpdump/master/tcpdump/igrp.h,v 1.6 2002/12/11 07:13:52 guy Exp $ (LBL) */ +/* @(#) $Header: /tcpdump/master/tcpdump/igrp.h,v 1.6 2002-12-11 07:13:52 guy Exp $ (LBL) */ /* Cisco IGRP definitions */ /* IGRP Header */ diff --git a/interface.h b/interface.h index 49ba87d25711..1f031231d47a 100644 --- a/interface.h +++ b/interface.h @@ -18,7 +18,7 @@ * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. * - * @(#) $Header: /tcpdump/master/tcpdump/interface.h,v 1.244.2.21 2007/03/28 07:45:46 hannes Exp $ (LBL) + * @(#) $Header: /tcpdump/master/tcpdump/interface.h,v 1.280.2.4 2008-04-04 19:42:52 guy Exp $ (LBL) */ #ifndef tcpdump_interface_h @@ -164,6 +164,11 @@ extern const char *ipxsap_string(u_short); extern const char *dnname_string(u_short); extern const char *dnnum_string(u_short); +/* checksum routines */ +extern void init_checksum(void); +extern u_int16_t verify_crc10_cksum(u_int16_t, const u_char *, int); +extern u_int16_t create_osi_cksum(const u_int8_t *, int, int); + /* The printer routines. */ #include @@ -209,10 +214,13 @@ extern u_int fr_if_print(const struct pcap_pkthdr *, const u_char *); extern u_int mfr_if_print(const struct pcap_pkthdr *, const u_char *); extern u_int fr_print(register const u_char *, u_int); extern u_int mfr_print(register const u_char *, u_int); +extern char *q922_string(const u_char *); extern u_int ieee802_11_if_print(const struct pcap_pkthdr *, const u_char *); extern u_int ieee802_11_radio_if_print(const struct pcap_pkthdr *, const u_char *); extern u_int ap1394_if_print(const struct pcap_pkthdr *, const u_char *); +extern u_int ieee802_11_radio_avs_if_print(const struct pcap_pkthdr *, + const u_char *); extern void gre_print(const u_char *, u_int); extern void icmp_print(const u_char *, u_int, const u_char *, int); extern void igmp_print(const u_char *, u_int); @@ -236,8 +244,11 @@ extern void pimv1_print(const u_char *, u_int); extern void cisco_autorp_print(const u_char *, u_int); extern void rsvp_print(const u_char *, u_int); extern void ldp_print(const u_char *, u_int); +extern void lldp_print(const u_char *, u_int); extern void lmp_print(const u_char *, u_int); extern void lspping_print(const u_char *, u_int); +extern void lwapp_control_print(const u_char *, u_int, int); +extern void lwapp_data_print(const u_char *, u_int); extern void eigrp_print(const u_char *, u_int); extern void mobile_print(const u_char *, u_int); extern void pim_print(const u_char *, u_int); @@ -250,6 +261,7 @@ extern u_int pppoe_if_print(const struct pcap_pkthdr *, const u_char *); extern u_int prism_if_print(const struct pcap_pkthdr *, const u_char *); extern void q933_print(const u_char *, u_int); extern int vjc_print(register const char *, u_short); +extern void vqp_print(register const u_char *, register u_int); extern u_int raw_if_print(const struct pcap_pkthdr *, const u_char *); extern void rip_print(const u_char *, u_int); extern u_int sl_if_print(const struct pcap_pkthdr *, const u_char *); @@ -281,7 +293,9 @@ extern u_int symantec_if_print(const struct pcap_pkthdr *, const u_char *); extern void tcp_print(const u_char *, u_int, const u_char *, int); extern void tftp_print(const u_char *, u_int); extern void timed_print(const u_char *); +extern void udld_print(const u_char *, u_int); extern void udp_print(const u_char *, u_int, const u_char *, int); +extern void vtp_print(const u_char *, u_int); extern void wb_print(const void *, u_int); extern int ah_print(register const u_char *); extern int ipcomp_print(register const u_char *, int *); @@ -291,14 +305,19 @@ extern void ipx_netbios_print(const u_char *, u_int); extern void nbt_tcp_print(const u_char *, int); extern void nbt_udp137_print(const u_char *, int); extern void nbt_udp138_print(const u_char *, int); +extern void smb_tcp_print(const u_char *, int); extern char *smb_errstr(int, int); extern const char *nt_errstr(u_int32_t); extern void print_data(const unsigned char *, int); extern void l2tp_print(const u_char *, u_int); extern void vrrp_print(const u_char *, u_int, int); extern void slow_print(const u_char *, u_int); +extern void sflow_print(const u_char *, u_int); +extern void mpcp_print(const u_char *, u_int); +extern void cfm_print(const u_char *, u_int); extern void pgm_print(const u_char *, u_int, const u_char *); extern void cdp_print(const u_char *, u_int, u_int); +extern void dtp_print(const u_char *, u_int); extern void stp_print(const u_char *, u_int); extern void radius_print(const u_char *, u_int); extern void lwres_print(const u_char *, u_int); @@ -312,6 +331,7 @@ extern void hsrp_print(const u_char *, u_int); extern void bfd_print(const u_char *, u_int, u_int); extern void sip_print(const u_char *, u_int); extern void syslog_print(const u_char *, u_int); +extern u_int bt_if_print(const struct pcap_pkthdr *, const u_char *); #ifdef INET6 extern void ip6_print(const u_char *, u_int); @@ -332,7 +352,7 @@ extern u_int16_t in_cksum_shouldbe(u_int16_t, u_int16_t); #ifndef HAVE_BPF_DUMP struct bpf_program; -extern void bpf_dump(struct bpf_program *, int); +extern void bpf_dump(const struct bpf_program *, int); #endif @@ -340,10 +360,12 @@ extern void bpf_dump(struct bpf_program *, int); /* forward compatibility */ +#ifndef NETDISSECT_REWORKED extern netdissect_options *gndo; #define eflag gndo->ndo_eflag #define fflag gndo->ndo_fflag +#define Kflag gndo->ndo_Kflag #define nflag gndo->ndo_nflag #define Nflag gndo->ndo_Nflag #define Oflag gndo->ndo_Oflag @@ -359,13 +381,19 @@ extern netdissect_options *gndo; #define xflag gndo->ndo_xflag #define Xflag gndo->ndo_Xflag #define Cflag gndo->ndo_Cflag +#define Gflag gndo->ndo_Gflag #define Aflag gndo->ndo_Aflag +#define Bflag gndo->ndo_Bflag +#define Iflag gndo->ndo_Iflag #define suppress_default_print gndo->ndo_suppress_default_print #define packettype gndo->ndo_packettype #define tcpmd5secret gndo->ndo_tcpmd5secret #define Wflag gndo->ndo_Wflag #define WflagChars gndo->ndo_WflagChars #define Cflag_count gndo->ndo_Cflag_count +#define Gflag_count gndo->ndo_Gflag_count +#define Gflag_time gndo->ndo_Gflag_time #define snaplen gndo->ndo_snaplen #define snapend gndo->ndo_snapend +#endif diff --git a/ip.h b/ip.h index e232ae0d185e..a01d0f07d49e 100644 --- a/ip.h +++ b/ip.h @@ -1,4 +1,4 @@ -/* @(#) $Header: /tcpdump/master/tcpdump/ip.h,v 1.11.2.1 2007/09/14 01:30:02 guy Exp $ (LBL) */ +/* @(#) $Header: /tcpdump/master/tcpdump/ip.h,v 1.12 2007-09-14 01:29:28 guy Exp $ (LBL) */ /* * Copyright (c) 1982, 1986, 1993 * The Regents of the University of California. All rights reserved. diff --git a/ip6.h b/ip6.h index acf465c6b082..e4f9fe1c9e5e 100644 --- a/ip6.h +++ b/ip6.h @@ -1,5 +1,5 @@ -/* @(#) $Header: /tcpdump/master/tcpdump/ip6.h,v 1.6.4.1 2005/04/20 10:04:37 guy Exp $ (LBL) */ -/* $NetBSD: ip6.h,v 1.9 2000/07/13 05:34:21 itojun Exp $ */ +/* @(#) $Header: /tcpdump/master/tcpdump/ip6.h,v 1.8 2007-08-29 02:31:44 mcr Exp $ (LBL) */ +/* NetBSD: ip6.h,v 1.9 2000/07/13 05:34:21 itojun Exp */ /* $KAME: ip6.h,v 1.9 2000/07/02 21:01:32 itojun Exp $ */ /* diff --git a/ipfc.h b/ipfc.h index f822d4af2e79..438d1156446a 100644 --- a/ipfc.h +++ b/ipfc.h @@ -18,7 +18,7 @@ * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. * - * @(#) $Header: /tcpdump/master/tcpdump/ipfc.h,v 1.4 2002/12/11 07:13:53 guy Exp $ (LBL) + * @(#) $Header: /tcpdump/master/tcpdump/ipfc.h,v 1.4 2002-12-11 07:13:53 guy Exp $ (LBL) */ struct ipfc_header { diff --git a/ipproto.c b/ipproto.c index 66ea3563ce8f..7b89afb9c836 100755 --- a/ipproto.c +++ b/ipproto.c @@ -15,7 +15,7 @@ #ifndef lint static const char rcsid[] _U_ = - "@(#) $Header: /tcpdump/master/tcpdump/ipproto.c,v 1.3.2.3 2005/09/20 06:05:37 guy Exp $ (LBL)"; + "@(#) $Header: /tcpdump/master/tcpdump/ipproto.c,v 1.6 2005-09-20 06:01:22 guy Exp $ (LBL)"; #endif #ifdef HAVE_CONFIG_H diff --git a/ipproto.h b/ipproto.h index 7134d7d5ebe7..f5257863cedd 100644 --- a/ipproto.h +++ b/ipproto.h @@ -30,11 +30,11 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * @(#) $Header: /tcpdump/master/tcpdump/ipproto.h,v 1.4.2.2 2005/09/20 06:05:37 guy Exp $ (LBL) + * @(#) $Header: /tcpdump/master/tcpdump/ipproto.h,v 1.6 2005-09-20 06:01:22 guy Exp $ (LBL) * * From: * @(#)in.h 8.3 (Berkeley) 1/3/94 - * $FreeBSD: vendor/tcpdump/dist/contrib/tcpdump/ipproto.h 162017 2006-09-04 20:04:42Z sam $ + * $FreeBSD: src/sys/netinet/in.h,v 1.38.2.3 1999/08/29 16:29:34 peter Exp $ */ extern struct tok ipproto_values[]; diff --git a/ipsec_doi.h b/ipsec_doi.h index 83d05ea54bad..554a2586a0a3 100644 --- a/ipsec_doi.h +++ b/ipsec_doi.h @@ -26,7 +26,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ -/* YIPS @(#)$Id: ipsec_doi.h,v 1.7 2002/12/11 07:13:53 guy Exp $ */ +/* YIPS @(#)$Id: ipsec_doi.h,v 1.7 2002-12-11 07:13:53 guy Exp $ */ /* refer to RFC 2407 */ diff --git a/ipx.h b/ipx.h index a8c1cd5115eb..bfc301980d18 100644 --- a/ipx.h +++ b/ipx.h @@ -1,7 +1,7 @@ /* * IPX protocol formats * - * @(#) $Header: /tcpdump/master/tcpdump/ipx.h,v 1.8 2002/12/11 07:13:54 guy Exp $ + * @(#) $Header: /tcpdump/master/tcpdump/ipx.h,v 1.8 2002-12-11 07:13:54 guy Exp $ */ /* well-known sockets */ diff --git a/isakmp.h b/isakmp.h index 94fac401d48e..85d383d1b3be 100644 --- a/isakmp.h +++ b/isakmp.h @@ -26,7 +26,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ -/* YIPS @(#)$Id: isakmp.h,v 1.10 2002/12/11 07:13:54 guy Exp $ */ +/* YIPS @(#)$Id: isakmp.h,v 1.11 2007-08-29 02:38:14 mcr Exp $ */ /* refer to RFC 2408 */ @@ -81,7 +81,7 @@ typedef struct { /* i_cookie + r_cookie */ #define ISAKMP_TIMER_DEFAULT 10 /* seconds */ #define ISAKMP_TRY_DEFAULT 3 /* times */ -/* 3.1 ISAKMP Header Format +/* 3.1 ISAKMP Header Format (IKEv1 and IKEv2) 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ ! Initiator ! @@ -128,8 +128,11 @@ struct isakmp { #define ISAKMP_NPTYPE_D 12 /* Delete */ #define ISAKMP_NPTYPE_VID 13 /* Vendor ID */ -#define ISAKMP_MAJOR_VERSION 1 -#define ISAKMP_MINOR_VERSION 0 +#define IKEv1_MAJOR_VERSION 1 +#define IKEv1_MINOR_VERSION 0 + +#define IKEv2_MAJOR_VERSION 2 +#define IKEv2_MINOR_VERSION 0 /* Exchange Type */ #define ISAKMP_ETYPE_NONE 0 /* NONE */ @@ -142,6 +145,13 @@ struct isakmp { /* Flags */ #define ISAKMP_FLAG_E 0x01 /* Encryption Bit */ #define ISAKMP_FLAG_C 0x02 /* Commit Bit */ +#define ISAKMP_FLAG_extra 0x04 + +/* IKEv2 */ +#define ISAKMP_FLAG_I (1 << 3) /* (I)nitiator */ +#define ISAKMP_FLAG_V (1 << 4) /* (V)ersion */ +#define ISAKMP_FLAG_R (1 << 5) /* (R)esponse */ + /* 3.2 Payload Generic Header 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 @@ -151,7 +161,7 @@ struct isakmp { */ struct isakmp_gen { u_int8_t np; /* Next Payload */ - u_int8_t reserved; /* RESERVED, unused, must set to 0 */ + u_int8_t critical; /* bit 7 - critical, rest is RESERVED */ u_int16_t len; /* Payload Length */ }; @@ -188,7 +198,7 @@ struct isakmp_data { message of a Base Exchange (see Section 4.4) and the value "0" in the first message of an Identity Protect Exchange (see Section 4.5). */ -struct isakmp_pl_sa { +struct ikev1_pl_sa { struct isakmp_gen h; u_int32_t doi; /* Domain of Interpretation */ u_int32_t sit; /* Situation */ @@ -202,7 +212,7 @@ struct isakmp_pl_sa { last within the security association proposal, then this field will be 0. */ -struct isakmp_pl_p { +struct ikev1_pl_p { struct isakmp_gen h; u_int8_t p_no; /* Proposal # */ u_int8_t prot_id; /* Protocol */ @@ -218,7 +228,7 @@ struct isakmp_pl_p { then this field will be 3. If the current Transform payload is the last within the proposal, then this field will be 0. */ -struct isakmp_pl_t { +struct ikev1_pl_t { struct isakmp_gen h; u_int8_t t_no; /* Transform # */ u_int8_t t_id; /* Transform-Id */ @@ -227,14 +237,14 @@ struct isakmp_pl_t { }; /* 3.7 Key Exchange Payload */ -struct isakmp_pl_ke { +struct ikev1_pl_ke { struct isakmp_gen h; /* Key Exchange Data */ }; /* 3.8 Identification Payload */ /* MUST NOT to be used, because of being defined in ipsec-doi. */ -struct isakmp_pl_id { +struct ikev1_pl_id { struct isakmp_gen h; union { u_int8_t id_type; /* ID Type */ @@ -244,7 +254,7 @@ struct isakmp_pl_id { }; /* 3.9 Certificate Payload */ -struct isakmp_pl_cert { +struct ikev1_pl_cert { struct isakmp_gen h; u_int8_t encode; /* Cert Encoding */ char cert; /* Certificate Data */ @@ -268,7 +278,7 @@ struct isakmp_pl_cert { #define ISAKMP_CERT_SPKI 9 /* 3.10 Certificate Request Payload */ -struct isakmp_pl_cr { +struct ikev1_pl_cr { struct isakmp_gen h; u_int8_t num_cert; /* # Cert. Types */ /* @@ -283,27 +293,27 @@ struct isakmp_pl_cr { /* 3.11 Hash Payload */ /* may not be used, because of having only data. */ -struct isakmp_pl_hash { +struct ikev1_pl_hash { struct isakmp_gen h; /* Hash Data */ }; /* 3.12 Signature Payload */ /* may not be used, because of having only data. */ -struct isakmp_pl_sig { +struct ikev1_pl_sig { struct isakmp_gen h; /* Signature Data */ }; /* 3.13 Nonce Payload */ /* may not be used, because of having only data. */ -struct isakmp_pl_nonce { +struct ikev1_pl_nonce { struct isakmp_gen h; /* Nonce Data */ }; /* 3.14 Notification Payload */ -struct isakmp_pl_n { +struct ikev1_pl_n { struct isakmp_gen h; u_int32_t doi; /* Domain of Interpretation */ u_int8_t prot_id; /* Protocol-ID */ @@ -347,7 +357,7 @@ struct isakmp_pl_n { #define ISAKMP_LOG_RETRY_LIMIT_REACHED 65530 /* 3.15 Delete Payload */ -struct isakmp_pl_d { +struct ikev1_pl_d { struct isakmp_gen h; u_int32_t doi; /* Domain of Interpretation */ u_int8_t prot_id; /* Protocol-Id */ @@ -357,15 +367,15 @@ struct isakmp_pl_d { }; -struct isakmp_ph1tab { - struct isakmp_ph1 *head; - struct isakmp_ph1 *tail; +struct ikev1_ph1tab { + struct ikev1_ph1 *head; + struct ikev1_ph1 *tail; int len; }; struct isakmp_ph2tab { - struct isakmp_ph2 *head; - struct isakmp_ph2 *tail; + struct ikev1_ph2 *head; + struct ikev1_ph2 *tail; int len; }; @@ -375,4 +385,99 @@ struct isakmp_ph2tab { #define PFS_NEED 1 #define PFS_NONEED 0 +/* IKEv2 (RFC4306) */ + +/* 3.3 Security Association Payload -- generic header */ +/* 3.3.1. Proposal Substructure */ +struct ikev2_p { + struct isakmp_gen h; + u_int8_t p_no; /* Proposal # */ + u_int8_t prot_id; /* Protocol */ + u_int8_t spi_size; /* SPI Size */ + u_int8_t num_t; /* Number of Transforms */ +}; + +/* 3.3.2. Transform Substructure */ +struct ikev2_t { + struct isakmp_gen h; + u_int8_t t_type; /* Transform Type (ENCR,PRF,INTEG,etc.*/ + u_int8_t res2; /* reserved byte */ + u_int16_t t_id; /* Transform ID */ +}; + +enum ikev2_t_type { + IV2_T_ENCR = 1, + IV2_T_PRF = 2, + IV2_T_INTEG= 3, + IV2_T_DH = 4, + IV2_T_ESN = 5, +}; + +/* 3.4. Key Exchange Payload */ +struct ikev2_ke { + struct isakmp_gen h; + u_int16_t ke_group; + u_int16_t ke_res1; + /* KE data */ +}; + + +/* 3.10 Notification Payload */ +struct ikev2_n { + struct isakmp_gen h; + u_int8_t prot_id; /* Protocol-ID */ + u_int8_t spi_size; /* SPI Size */ + u_int16_t type; /* Notify Message Type */ + /* SPI */ + /* Notification Data */ +}; + +enum ikev2_n_type { + IV2_NOTIFY_UNSUPPORTED_CRITICAL_PAYLOAD = 1, + IV2_NOTIFY_INVALID_IKE_SPI = 4, + IV2_NOTIFY_INVALID_MAJOR_VERSION = 5, + IV2_NOTIFY_INVALID_SYNTAX = 7, + IV2_NOTIFY_INVALID_MESSAGE_ID = 9, + IV2_NOTIFY_INVALID_SPI =11, + IV2_NOTIFY_NO_PROPOSAL_CHOSEN =14, + IV2_NOTIFY_INVALID_KE_PAYLOAD =17, + IV2_NOTIFY_AUTHENTICATION_FAILED =24, + IV2_NOTIFY_SINGLE_PAIR_REQUIRED =34, + IV2_NOTIFY_NO_ADDITIONAL_SAS =35, + IV2_NOTIFY_INTERNAL_ADDRESS_FAILURE =36, + IV2_NOTIFY_FAILED_CP_REQUIRED =37, + IV2_NOTIFY_INVALID_SELECTORS =39, + IV2_NOTIFY_INITIAL_CONTACT =16384, + IV2_NOTIFY_SET_WINDOW_SIZE =16385, + IV2_NOTIFY_ADDITIONAL_TS_POSSIBLE =16386, + IV2_NOTIFY_IPCOMP_SUPPORTED =16387, + IV2_NOTIFY_NAT_DETECTION_SOURCE_IP =16388, + IV2_NOTIFY_NAT_DETECTION_DESTINATION_IP =16389, + IV2_NOTIFY_COOKIE =16390, + IV2_NOTIFY_USE_TRANSPORT_MODE =16391, + IV2_NOTIFY_HTTP_CERT_LOOKUP_SUPPORTED =16392, + IV2_NOTIFY_REKEY_SA =16393, + IV2_NOTIFY_ESP_TFC_PADDING_NOT_SUPPORTED =16394, + IV2_NOTIFY_NON_FIRST_FRAGMENTS_ALSO =16395 +}; + +struct notify_messages { + u_int16_t type; + char *msg; +}; + +/* 3.8 Notification Payload */ +struct ikev2_auth { + struct isakmp_gen h; + u_int8_t auth_method; /* Protocol-ID */ + u_int8_t reserved[3]; + /* authentication data */ +}; + +enum ikev2_auth_type { + IV2_RSA_SIG = 1, + IV2_SHARED = 2, + IV2_DSS_SIG = 3, +}; + #endif /* !defined(_ISAKMP_H_) */ diff --git a/l2tp.h b/l2tp.h index 156888347f56..5be24b9fc5af 100644 --- a/l2tp.h +++ b/l2tp.h @@ -1,4 +1,4 @@ -/* @(#) $Header: /tcpdump/master/tcpdump/l2tp.h,v 1.5 2001/11/05 10:03:27 guy Exp $ (LBL) */ +/* @(#) $Header: /tcpdump/master/tcpdump/l2tp.h,v 1.5 2001-11-05 10:03:27 guy Exp $ (LBL) */ /* * Copyright (c) 1991, 1993, 1994, 1995, 1996, 1997 * The Regents of the University of California. All rights reserved. diff --git a/l2vpn.c b/l2vpn.c index d98e69adfd16..a82219178289 100755 --- a/l2vpn.c +++ b/l2vpn.c @@ -15,7 +15,7 @@ #ifndef lint static const char rcsid[] _U_ = - "@(#) $Header: /tcpdump/master/tcpdump/l2vpn.c,v 1.1 2004/06/15 09:42:40 hannes Exp $ (LBL)"; + "@(#) $Header: /tcpdump/master/tcpdump/l2vpn.c,v 1.1 2004-06-15 09:42:40 hannes Exp $ (LBL)"; #endif #ifdef HAVE_CONFIG_H diff --git a/l2vpn.h b/l2vpn.h index 64eb0247b7d2..766cda546ae1 100755 --- a/l2vpn.h +++ b/l2vpn.h @@ -1,4 +1,4 @@ -/* @(#) $Header: /tcpdump/master/tcpdump/l2vpn.h,v 1.1 2004/06/15 09:42:41 hannes Exp $ (LBL) */ +/* @(#) $Header: /tcpdump/master/tcpdump/l2vpn.h,v 1.1 2004-06-15 09:42:41 hannes Exp $ (LBL) */ /* * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that: (1) source code diff --git a/lane.h b/lane.h index 51b6e19c9392..76cc020ea791 100644 --- a/lane.h +++ b/lane.h @@ -20,7 +20,7 @@ * */ -/* $Id: lane.h,v 1.7 2002/12/11 07:13:54 guy Exp $ */ +/* $Id: lane.h,v 1.7 2002-12-11 07:13:54 guy Exp $ */ #ifndef ETHER_ADDR_LEN #define ETHER_ADDR_LEN 6 diff --git a/lbl/gnuc.h b/lbl/gnuc.h deleted file mode 100644 index 1615d437675f..000000000000 --- a/lbl/gnuc.h +++ /dev/null @@ -1,43 +0,0 @@ -/* @(#) $Header: /tcpdump/master/tcpdump/lbl/gnuc.h,v 1.3.1.1 1999/10/07 23:47:13 mcr Exp $ (LBL) */ - -/* Define __P() macro, if necessary */ -#ifndef __P -#if __STDC__ -#define __P(protos) protos -#else -#define __P(protos) () -#endif -#endif - -/* inline foo */ -#ifdef __GNUC__ -#define inline __inline -#else -#define inline -#endif - -/* - * Handle new and old "dead" routine prototypes - * - * For example: - * - * __dead void foo(void) __attribute__((volatile)); - * - */ -#ifdef __GNUC__ -#ifndef __dead -#define __dead volatile -#endif -#if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 5) -#ifndef __attribute__ -#define __attribute__(args) -#endif -#endif -#else -#ifndef __dead -#define __dead -#endif -#ifndef __attribute__ -#define __attribute__(args) -#endif -#endif diff --git a/lbl/os-osf4.h b/lbl/os-osf4.h index 62866ede5852..5682b7e6c1fa 100644 --- a/lbl/os-osf4.h +++ b/lbl/os-osf4.h @@ -18,7 +18,7 @@ * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. * - * @(#) $Header: /tcpdump/master/tcpdump/lbl/os-osf4.h,v 1.1 2002/12/11 05:03:13 guy Exp $ (LBL) + * @(#) $Header: /tcpdump/master/tcpdump/lbl/os-osf4.h,v 1.1 2002-12-11 05:03:13 guy Exp $ (LBL) */ /* Prototypes missing in Digital UNIX 4.x */ diff --git a/lbl/os-solaris2.h b/lbl/os-solaris2.h index de481c2f7e19..5c01b87212e6 100644 --- a/lbl/os-solaris2.h +++ b/lbl/os-solaris2.h @@ -18,7 +18,7 @@ * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. * - * @(#) $Header: /tcpdump/master/tcpdump/lbl/os-solaris2.h,v 1.19 2000/10/11 04:02:15 guy Exp $ (LBL) + * @(#) $Header: /tcpdump/master/tcpdump/lbl/os-solaris2.h,v 1.19 2000-10-11 04:02:15 guy Exp $ (LBL) */ /* Prototypes missing in SunOS 5 */ diff --git a/lbl/os-sunos4.h b/lbl/os-sunos4.h index 2e0f25fc5827..51a70dd4487d 100644 --- a/lbl/os-sunos4.h +++ b/lbl/os-sunos4.h @@ -18,7 +18,7 @@ * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. * - * @(#) $Header: /tcpdump/master/tcpdump/lbl/os-sunos4.h,v 1.32.1.1 1999/10/07 23:47:13 mcr Exp $ (LBL) + * @(#) $Header: /tcpdump/master/tcpdump/lbl/os-sunos4.h,v 1.32.1.1 1999-10-07 23:47:13 mcr Exp $ (LBL) */ /* Prototypes missing in SunOS 4 */ diff --git a/lbl/os-ultrix4.h b/lbl/os-ultrix4.h index 676b3bdd93eb..1b154eeec26d 100644 --- a/lbl/os-ultrix4.h +++ b/lbl/os-ultrix4.h @@ -18,7 +18,7 @@ * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. * - * @(#) $Header: /tcpdump/master/tcpdump/lbl/os-ultrix4.h,v 1.19.1.1 1999/10/07 23:47:13 mcr Exp $ (LBL) + * @(#) $Header: /tcpdump/master/tcpdump/lbl/os-ultrix4.h,v 1.19.1.1 1999-10-07 23:47:13 mcr Exp $ (LBL) */ /* Prototypes missing in Ultrix 4 */ diff --git a/llc.h b/llc.h index fc04c671f022..faa72561c9a9 100644 --- a/llc.h +++ b/llc.h @@ -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.4 2007/02/08 07:07:51 guy Exp $ (LBL) + * @(#) $Header: /tcpdump/master/tcpdump/llc.h,v 1.23 2007-04-13 09:43:11 hannes Exp $ (LBL) */ /* @@ -104,6 +104,8 @@ #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 */ +#define PID_CISCO_UDLD 0x0111 /* Unidirectional Link Detection */ +#define PID_CISCO_PVST 0x010b /* Per VLAN Spanning Tree+ and RPVST+ */ /* * PIDs for use with OUI_RFC2684. diff --git a/machdep.c b/machdep.c index 5b04503a7281..2bcf31747062 100644 --- a/machdep.c +++ b/machdep.c @@ -21,7 +21,7 @@ #ifndef lint static const char rcsid[] _U_ = - "@(#) $Header: /tcpdump/master/tcpdump/machdep.c,v 1.13 2003/12/15 03:53:21 guy Exp $ (LBL)"; + "@(#) $Header: /tcpdump/master/tcpdump/machdep.c,v 1.13 2003-12-15 03:53:21 guy Exp $ (LBL)"; #endif #ifdef HAVE_CONFIG_H diff --git a/machdep.h b/machdep.h index 8d49a7af716b..6328c8265947 100644 --- a/machdep.h +++ b/machdep.h @@ -18,7 +18,7 @@ * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. * - * @(#) $Header: /tcpdump/master/tcpdump/machdep.h,v 1.2 2000/01/17 06:24:24 itojun Exp $ (LBL) + * @(#) $Header: /tcpdump/master/tcpdump/machdep.h,v 1.2 2000-01-17 06:24:24 itojun Exp $ (LBL) */ #ifndef tcpdump_machdep_h #define tcpdump_machdep_h diff --git a/makemib b/makemib index 2c80bef05832..b59e2f105a75 100755 --- a/makemib +++ b/makemib @@ -27,7 +27,7 @@ # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF # THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # -# @(#) $Id: makemib,v 1.3 2001/09/17 22:16:52 fenner Exp $ (jlv) +# @(#) $Id: makemib,v 1.3 2001-09-17 22:16:52 fenner Exp $ (jlv) # # This script will read either ASN.1-style MIB files or the ".defs" files diff --git a/missing/addrinfo.h b/missing/addrinfo.h index 09f6a425eaab..1b5f92ecb860 100644 --- a/missing/addrinfo.h +++ b/missing/addrinfo.h @@ -27,7 +27,7 @@ * SUCH DAMAGE. */ -/* $Id: addrinfo.h,v 1.4 2002/06/11 17:13:36 itojun Exp $ */ +/* $Id: addrinfo.h,v 1.4 2002-06-11 17:13:36 itojun Exp $ */ #ifndef HAVE_ADDRINFO diff --git a/missing/cdecl_ext.h b/missing/cdecl_ext.h deleted file mode 100644 index 9591db264574..000000000000 --- a/missing/cdecl_ext.h +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (C) 1999 WIDE Project. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. Neither the name of the project nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ -#ifndef HAVE_PORTABLE_PROTOTYPE - -#if defined(__STDC__) || defined(__cplusplus) -#define __P(protos) protos /* full-blown ANSI C */ -#else -#define __P(protos) () /* traditional C preprocessor */ -#endif - -#endif /* !HAVE_PORTABLE_PROTOTYPE */ diff --git a/missing/datalinks.c b/missing/datalinks.c index 2cc126737945..1bd86448a8d0 100644 --- a/missing/datalinks.c +++ b/missing/datalinks.c @@ -33,7 +33,7 @@ #ifndef lint static const char rcsid[] _U_ = - "@(#) $Header: /tcpdump/master/tcpdump/missing/datalinks.c,v 1.3 2003/11/16 09:36:47 guy Exp $ (LBL)"; + "@(#) $Header: /tcpdump/master/tcpdump/missing/datalinks.c,v 1.3 2003-11-16 09:36:47 guy Exp $ (LBL)"; #endif #ifdef HAVE_CONFIG_H diff --git a/missing/dlnames.c b/missing/dlnames.c index f4f583ee8670..32072b784f95 100644 --- a/missing/dlnames.c +++ b/missing/dlnames.c @@ -33,7 +33,7 @@ #ifndef lint static const char rcsid[] _U_ = - "@(#) $Header: /tcpdump/master/tcpdump/missing/dlnames.c,v 1.5 2003/11/18 23:09:43 guy Exp $ (LBL)"; + "@(#) $Header: /tcpdump/master/tcpdump/missing/dlnames.c,v 1.5 2003-11-18 23:09:43 guy Exp $ (LBL)"; #endif #ifdef HAVE_CONFIG_H diff --git a/missing/getaddrinfo.c b/missing/getaddrinfo.c index 883032282c41..f59b2c4ef365 100644 --- a/missing/getaddrinfo.c +++ b/missing/getaddrinfo.c @@ -51,7 +51,7 @@ #ifndef lint static const char rcsid[] _U_ = - "@(#) $Header: /tcpdump/master/tcpdump/missing/getaddrinfo.c,v 1.13 2003/11/16 09:36:48 guy Exp $"; + "@(#) $Header: /tcpdump/master/tcpdump/missing/getaddrinfo.c,v 1.13 2003-11-16 09:36:48 guy Exp $"; #endif #include diff --git a/missing/getnameinfo.c b/missing/getnameinfo.c index 6bd5b474438e..c287221c402b 100644 --- a/missing/getnameinfo.c +++ b/missing/getnameinfo.c @@ -43,7 +43,7 @@ #ifndef lint static const char rcsid[] _U_ = - "@(#) $Header: /tcpdump/master/tcpdump/missing/getnameinfo.c,v 1.11 2003/11/16 09:36:49 guy Exp $"; + "@(#) $Header: /tcpdump/master/tcpdump/missing/getnameinfo.c,v 1.11 2003-11-16 09:36:49 guy Exp $"; #endif #include diff --git a/missing/inet_aton.c b/missing/inet_aton.c index a4b2eeb3fa3e..bc1461aa7189 100644 --- a/missing/inet_aton.c +++ b/missing/inet_aton.c @@ -36,11 +36,11 @@ * SUCH DAMAGE. */ -/* $Id: inet_aton.c,v 1.6 2003/11/16 09:36:49 guy Exp $ */ +/* $Id: inet_aton.c,v 1.6 2003-11-16 09:36:49 guy Exp $ */ #ifndef lint static const char rcsid[] _U_ = - "@(#) $Header: /tcpdump/master/tcpdump/missing/inet_aton.c,v 1.6 2003/11/16 09:36:49 guy Exp $"; + "@(#) $Header: /tcpdump/master/tcpdump/missing/inet_aton.c,v 1.6 2003-11-16 09:36:49 guy Exp $"; #endif #include diff --git a/missing/inet_ntop.c b/missing/inet_ntop.c index 8bbbad619a22..d17d5925737d 100644 --- a/missing/inet_ntop.c +++ b/missing/inet_ntop.c @@ -36,11 +36,11 @@ * SUCH DAMAGE. */ -/* $Id: inet_ntop.c,v 1.8 2005/02/09 02:25:46 guy Exp $ */ +/* $Id: inet_ntop.c,v 1.8 2005-02-09 02:25:46 guy Exp $ */ #ifndef lint static const char rcsid[] _U_ = - "@(#) $Header: /tcpdump/master/tcpdump/missing/inet_ntop.c,v 1.8 2005/02/09 02:25:46 guy Exp $"; + "@(#) $Header: /tcpdump/master/tcpdump/missing/inet_ntop.c,v 1.8 2005-02-09 02:25:46 guy Exp $"; #endif #include diff --git a/missing/inet_pton.c b/missing/inet_pton.c index 1b8abd2cbab1..83f67e1e515a 100644 --- a/missing/inet_pton.c +++ b/missing/inet_pton.c @@ -36,11 +36,11 @@ * SUCH DAMAGE. */ -/* $Id: inet_pton.c,v 1.6 2003/11/16 09:36:51 guy Exp $ */ +/* $Id: inet_pton.c,v 1.6 2003-11-16 09:36:51 guy Exp $ */ #ifndef lint static const char rcsid[] _U_ = - "@(#) $Header: /tcpdump/master/tcpdump/missing/inet_pton.c,v 1.6 2003/11/16 09:36:51 guy Exp $"; + "@(#) $Header: /tcpdump/master/tcpdump/missing/inet_pton.c,v 1.6 2003-11-16 09:36:51 guy Exp $"; #endif #include diff --git a/missing/snprintf.c b/missing/snprintf.c index 4f2bb321238f..79329977bf9b 100644 --- a/missing/snprintf.c +++ b/missing/snprintf.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. */ -/* $Id: snprintf.c,v 1.8 2003/11/16 09:36:51 guy Exp $ */ +/* $Id: snprintf.c,v 1.8 2003-11-16 09:36:51 guy Exp $ */ #ifdef HAVE_CONFIG_H #include @@ -39,7 +39,7 @@ #ifndef lint static const char rcsid[] _U_ = - "@(#) $Header: /tcpdump/master/tcpdump/missing/snprintf.c,v 1.8 2003/11/16 09:36:51 guy Exp $"; + "@(#) $Header: /tcpdump/master/tcpdump/missing/snprintf.c,v 1.8 2003-11-16 09:36:51 guy Exp $"; #endif #include diff --git a/missing/strdup.c b/missing/strdup.c index 103c3b26f6f3..079a8ff82141 100644 --- a/missing/strdup.c +++ b/missing/strdup.c @@ -33,7 +33,7 @@ #if defined(LIBC_SCCS) && !defined(lint) static const char rcsid[] = - "@(#) $Header: /tcpdump/master/tcpdump/missing/strdup.c,v 1.1 2001/01/20 07:26:08 guy Exp $ (LBL)"; + "@(#) $Header: /tcpdump/master/tcpdump/missing/strdup.c,v 1.1 2001-01-20 07:26:08 guy Exp $ (LBL)"; #endif /* LIBC_SCCS and not lint */ #include diff --git a/missing/strlcat.c b/missing/strlcat.c index fca2e8a2f5b6..a3d3face4a83 100644 --- a/missing/strlcat.c +++ b/missing/strlcat.c @@ -30,7 +30,7 @@ #ifndef lint static const char rcsid[] _U_ = - "@(#) $Header: /tcpdump/master/tcpdump/missing/strlcat.c,v 1.5 2003/11/16 09:36:51 guy Exp $ (LBL)"; + "@(#) $Header: /tcpdump/master/tcpdump/missing/strlcat.c,v 1.5 2003-11-16 09:36:51 guy Exp $ (LBL)"; #endif #ifdef HAVE_CONFIG_H diff --git a/missing/strlcpy.c b/missing/strlcpy.c index 3f1809a7b36d..a92e4d130bb9 100644 --- a/missing/strlcpy.c +++ b/missing/strlcpy.c @@ -30,7 +30,7 @@ #ifndef lint static const char rcsid[] _U_ = - "@(#) $Header: /tcpdump/master/tcpdump/missing/strlcpy.c,v 1.5 2003/11/16 09:36:52 guy Exp $ (LBL)"; + "@(#) $Header: /tcpdump/master/tcpdump/missing/strlcpy.c,v 1.5 2003-11-16 09:36:52 guy Exp $ (LBL)"; #endif #ifdef HAVE_CONFIG_H diff --git a/missing/strsep.c b/missing/strsep.c index 19fb6b2c0178..0362d1f51b71 100644 --- a/missing/strsep.c +++ b/missing/strsep.c @@ -33,7 +33,7 @@ #if defined(LIBC_SCCS) && !defined(lint) static const char rcsid[] = - "@(#) $Header: /tcpdump/master/tcpdump/missing/strsep.c,v 1.3 2003/03/25 08:33:48 guy Exp $ (LBL)"; + "@(#) $Header: /tcpdump/master/tcpdump/missing/strsep.c,v 1.3 2003-03-25 08:33:48 guy Exp $ (LBL)"; #endif /* LIBC_SCCS and not lint */ #ifdef HAVE_CONFIG_H diff --git a/mpls.h b/mpls.h index 69fc9c9176d0..ae1c97e67ee0 100644 --- a/mpls.h +++ b/mpls.h @@ -1,4 +1,4 @@ -/* @(#) $Header: /tcpdump/master/tcpdump/mpls.h,v 1.1 2004/06/14 14:47:58 hannes Exp $ (LBL) +/* @(#) $Header: /tcpdump/master/tcpdump/mpls.h,v 1.1 2004-06-14 14:47:58 hannes Exp $ (LBL) * Copyright (C) 2001 WIDE Project. All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/nameser.h b/nameser.h index e6391f43b9be..f441f3ea6f56 100644 --- a/nameser.h +++ b/nameser.h @@ -1,4 +1,4 @@ -/* @(#) $Header: /tcpdump/master/tcpdump/nameser.h,v 1.14.4.2 2006/11/10 03:15:35 guy Exp $ (LBL) */ +/* @(#) $Header: /tcpdump/master/tcpdump/nameser.h,v 1.16 2006-11-10 03:18:21 guy Exp $ (LBL) */ /* * Copyright (c) 1983, 1989, 1993 * The Regents of the University of California. All rights reserved. diff --git a/netbios.h b/netbios.h index 34abebae8ec0..d3e2725fc6d1 100644 --- a/netbios.h +++ b/netbios.h @@ -1,7 +1,7 @@ /* * NETBIOS protocol formats * - * @(#) $Header: /tcpdump/master/tcpdump/netbios.h,v 1.3 2002/12/11 07:13:55 guy Exp $ + * @(#) $Header: /tcpdump/master/tcpdump/netbios.h,v 1.3 2002-12-11 07:13:55 guy Exp $ */ struct p8022Hdr { diff --git a/netdissect.h b/netdissect.h index 3609455e67c2..cd6f2f137285 100644 --- a/netdissect.h +++ b/netdissect.h @@ -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.4 2006/02/08 01:40:09 hannes Exp $ (LBL) + * @(#) $Header: /tcpdump/master/tcpdump/netdissect.h,v 1.23.2.2 2008-04-04 19:42:52 guy Exp $ (LBL) */ #ifndef netdissect_h @@ -77,6 +77,7 @@ extern const char *tok2strbuf(const struct tok *, const char *, int, /* tok2str is deprecated */ extern const char *tok2str(const struct tok *, const char *, int); extern char *bittok2str(const struct tok *, const char *, int); +extern char *bittok2str_nosep(const struct tok *, const char *, int); typedef struct netdissect_options netdissect_options; @@ -85,6 +86,7 @@ struct netdissect_options { int ndo_aflag; /* translate network and broadcast addresses */ int ndo_eflag; /* print ethernet header */ int ndo_fflag; /* don't translate "foreign" IP address */ + int ndo_Kflag; /* don't check TCP checksums */ int ndo_nflag; /* leave addresses as numbers */ int ndo_Nflag; /* remove domains from printed host names */ int ndo_qflag; /* quick (shorter) output */ @@ -100,12 +102,17 @@ struct netdissect_options { int ndo_Aflag; /* print packet only in ascii observing TAB, * LF, CR and SPACE as graphical chars */ + int ndo_Bflag; /* buffer size */ + int ndo_Iflag; /* rfmon (monitor) mode */ int ndo_Oflag; /* run filter code optimizer */ int ndo_dlt; /* if != -1, ask libpcap for the DLT it names*/ int ndo_pflag; /* don't go promiscuous */ int ndo_Cflag; /* rotate dump files after this many bytes */ int ndo_Cflag_count; /* Keep track of which file number we're writing */ + int ndo_Gflag; /* rotate dump files after this many seconds */ + int ndo_Gflag_count; /* number of files created with Gflag rotation */ + time_t ndo_Gflag_time; /* The last time_t the dump file was rotated. */ int ndo_Wflag; /* recycle output files after this number of files */ int ndo_WflagChars; int ndo_suppress_default_print; /* don't use default_print() for unknown packet types */ @@ -245,7 +252,7 @@ extern const char *dnnum_string(netdissect_options *, u_short); #include -extern void eap_print(netdissect_options *,const u_char *, u_int); +extern void eap_print(netdissect_options *,const u_char *, u_int); extern int esp_print(netdissect_options *, register const u_char *bp, int len, register const u_char *bp2, int *nhdr, int *padlen); @@ -258,6 +265,7 @@ extern void ip_print(netdissect_options *,const u_char *, u_int); extern void ip_print_inner(netdissect_options *ndo, const u_char *bp, u_int length, u_int nh, const u_char *bp2); +extern void rrcp_print(netdissect_options *,const u_char *, u_int); /* stuff that has not yet been rototiled */ #if 0 diff --git a/nfs.h b/nfs.h index 3d47c7d3d937..bf6c9838c89c 100644 --- a/nfs.h +++ b/nfs.h @@ -1,5 +1,5 @@ -/* @(#) $Header: /tcpdump/master/tcpdump/nfs.h,v 1.7 2002/12/11 07:13:55 guy Exp $ (LBL) */ -/* $NetBSD: nfs.h,v 1.1 1996/05/23 22:49:53 fvdl Exp $ */ +/* @(#) $Header: /tcpdump/master/tcpdump/nfs.h,v 1.8.2.1 2007-11-18 03:24:55 guy Exp $ (LBL) */ +/* NetBSD: nfs.h,v 1.1 1996/05/23 22:49:53 fvdl Exp */ /* * Copyright (c) 1989, 1993 @@ -286,21 +286,6 @@ struct nfs_uquad { }; typedef struct nfs_uquad nfsuint64; -#if 0 /* XXX - this doesn't seemed to be used and it doesn't work - * with non-gcc, so comment it out for now. - */ - -/* - * Used to convert between two u_longs and a u_quad_t. - */ -union nfs_quadconvert { - u_int32_t lval[2]; - u_int64_t qval; -}; -typedef union nfs_quadconvert nfsquad_t; - -#endif - /* * NFS Version 3 special file number. */ diff --git a/nfsfh.h b/nfsfh.h index b8a82e4bd910..0bca424a2d0b 100644 --- a/nfsfh.h +++ b/nfsfh.h @@ -1,4 +1,4 @@ -/* @(#) $Header: /tcpdump/master/tcpdump/nfsfh.h,v 1.13 2002/04/24 06:27:05 guy Exp $ (LBL) */ +/* @(#) $Header: /tcpdump/master/tcpdump/nfsfh.h,v 1.13 2002-04-24 06:27:05 guy Exp $ (LBL) */ /* * Copyright (c) 1993, 1994 Jeffrey C. Mogul, Digital Equipment Corporation, diff --git a/nfsv2.h b/nfsv2.h deleted file mode 100644 index b2c0ff9929e4..000000000000 --- a/nfsv2.h +++ /dev/null @@ -1,262 +0,0 @@ -/* - * Copyright (c) 1994, 1995, 1996 - * The Regents of the University of California. All rights reserved. - * - * This code is derived from software contributed to Berkeley by - * Rick Macklem at The University of Guelph. - * - * 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. - * - * @(#)nfsv2.h 7.11 (Berkeley) 9/30/92 - */ - -/* - * nfs definitions as per the version 2 specs - */ - -/* - * Constants as defined in the Sun NFS Version 2 spec. - * "NFS: Network File System Protocol Specification" RFC1094 - */ - -#define NFS_PORT 2049 -#define NFS_PROG 100003 -#define NFS_VER2 2 -#define NFS_MAXDGRAMDATA 8192 -#define NFS_MAXDATA 32768 -#define NFS_MAXPATHLEN 1024 -#define NFS_MAXNAMLEN 255 -#define NFS_FHSIZE 32 -#define NFS_MAXPKTHDR 404 -#define NFS_MAXPACKET (NFS_MAXPKTHDR+NFS_MAXDATA) -#define NFS_MINPACKET 20 -#define NFS_FABLKSIZE 512 /* Size in bytes of a block wrt fa_blocks */ - -/* Stat numbers for rpc returns */ -#define NFS_OK 0 -#define NFSERR_PERM 1 -#define NFSERR_NOENT 2 -#define NFSERR_IO 5 -#define NFSERR_NXIO 6 -#define NFSERR_ACCES 13 -#define NFSERR_EXIST 17 -#define NFSERR_NODEV 19 -#define NFSERR_NOTDIR 20 -#define NFSERR_ISDIR 21 -#define NFSERR_FBIG 27 -#define NFSERR_NOSPC 28 -#define NFSERR_ROFS 30 -#define NFSERR_NAMETOL 63 -#define NFSERR_NOTEMPTY 66 -#define NFSERR_DQUOT 69 -#define NFSERR_STALE 70 -#define NFSERR_WFLUSH 99 - -/* Sizes in bytes of various nfs rpc components */ -#define NFSX_FH 32 -#define NFSX_UNSIGNED 4 -#define NFSX_NFSFATTR 68 -#define NFSX_NQFATTR 92 -#define NFSX_NFSSATTR 32 -#define NFSX_NQSATTR 44 -#define NFSX_COOKIE 4 -#define NFSX_NFSSTATFS 20 -#define NFSX_NQSTATFS 28 -#define NFSX_FATTR(isnq) ((isnq) ? NFSX_NQFATTR : NFSX_NFSFATTR) -#define NFSX_SATTR(isnq) ((isnq) ? NFSX_NQSATTR : NFSX_NFSSATTR) -#define NFSX_STATFS(isnq) ((isnq) ? NFSX_NQSTATFS : NFSX_NFSSTATFS) - -/* nfs rpc procedure numbers */ -#define NFSPROC_NULL 0 -#define NFSPROC_GETATTR 1 -#define NFSPROC_SETATTR 2 -#define NFSPROC_NOOP 3 -#define NFSPROC_ROOT NFSPROC_NOOP /* Obsolete */ -#define NFSPROC_LOOKUP 4 -#define NFSPROC_READLINK 5 -#define NFSPROC_READ 6 -#define NFSPROC_WRITECACHE NFSPROC_NOOP /* Obsolete */ -#define NFSPROC_WRITE 8 -#define NFSPROC_CREATE 9 -#define NFSPROC_REMOVE 10 -#define NFSPROC_RENAME 11 -#define NFSPROC_LINK 12 -#define NFSPROC_SYMLINK 13 -#define NFSPROC_MKDIR 14 -#define NFSPROC_RMDIR 15 -#define NFSPROC_READDIR 16 -#define NFSPROC_STATFS 17 - -/* NQ nfs numbers */ -#define NQNFSPROC_READDIRLOOK 18 -#define NQNFSPROC_GETLEASE 19 -#define NQNFSPROC_VACATED 20 -#define NQNFSPROC_EVICTED 21 -#define NQNFSPROC_ACCESS 22 - -#define NFS_NPROCS 23 -/* Conversion macros */ -extern int vttoif_tab[]; -#define vtonfs_mode(t,m) \ - txdr_unsigned(((t) == VFIFO) ? MAKEIMODE(VCHR, (m)) : \ - MAKEIMODE((t), (m))) -#define nfstov_mode(a) (fxdr_unsigned(u_short, (a))&07777) -#define vtonfs_type(a) txdr_unsigned(nfs_type[((int32_t)(a))]) -#define nfstov_type(a) ntov_type[fxdr_unsigned(u_int32_t,(a))&0x7] - -/* File types */ -typedef enum { - NFNON=0, NFREG=1, NFDIR=2, NFBLK=3, NFCHR=4, NFLNK=5 -} tcpdump_nfstype; - -/* Structs for common parts of the rpc's */ -struct nfsv2_time { - u_int32_t nfs_sec; - u_int32_t nfs_usec; -}; - -struct nqnfs_time { - u_int32_t nq_sec; - u_int32_t nq_nsec; -}; - -/* - * File attributes and setable attributes. These structures cover both - * NFS version 2 and the NQNFS protocol. Note that the union is only - * used to that one pointer can refer to both variants. These structures - * go out on the wire and must be densely packed, so no quad data types - * are used. (all fields are int32_t or u_int32_t's or structures of same) - * NB: You can't do sizeof(struct nfsv2_fattr), you must use the - * NFSX_FATTR(isnq) macro. - */ -struct nfsv2_fattr { - u_int32_t fa_type; - u_int32_t fa_mode; - u_int32_t fa_nlink; - u_int32_t fa_uid; - u_int32_t fa_gid; - union { - struct { - u_int32_t nfsfa_size; - u_int32_t nfsfa_blocksize; - u_int32_t nfsfa_rdev; - u_int32_t nfsfa_blocks; - u_int32_t nfsfa_fsid; - u_int32_t nfsfa_fileid; - struct nfsv2_time nfsfa_atime; - struct nfsv2_time nfsfa_mtime; - struct nfsv2_time nfsfa_ctime; - } fa_nfsv2; - struct { - struct { - u_int32_t nqfa_qsize[2]; - } nqfa_size; - u_int32_t nqfa_blocksize; - u_int32_t nqfa_rdev; - struct { - u_int32_t nqfa_qbytes[2]; - } nqfa_bytes; - u_int32_t nqfa_fsid; - u_int32_t nqfa_fileid; - struct nqnfs_time nqfa_atime; - struct nqnfs_time nqfa_mtime; - struct nqnfs_time nqfa_ctime; - u_int32_t nqfa_flags; - u_int32_t nqfa_gen; - struct { - u_int32_t nqfa_qfilerev[2]; - } nqfa_filerev; - } fa_nqnfs; - } fa_un; -}; - -/* and some ugly defines for accessing union components */ -#define fa_nfssize fa_un.fa_nfsv2.nfsfa_size -#define fa_nfsblocksize fa_un.fa_nfsv2.nfsfa_blocksize -#define fa_nfsrdev fa_un.fa_nfsv2.nfsfa_rdev -#define fa_nfsblocks fa_un.fa_nfsv2.nfsfa_blocks -#define fa_nfsfsid fa_un.fa_nfsv2.nfsfa_fsid -#define fa_nfsfileid fa_un.fa_nfsv2.nfsfa_fileid -#define fa_nfsatime fa_un.fa_nfsv2.nfsfa_atime -#define fa_nfsmtime fa_un.fa_nfsv2.nfsfa_mtime -#define fa_nfsctime fa_un.fa_nfsv2.nfsfa_ctime -#define fa_nqsize fa_un.fa_nqnfs.nqfa_size -#define fa_nqblocksize fa_un.fa_nqnfs.nqfa_blocksize -#define fa_nqrdev fa_un.fa_nqnfs.nqfa_rdev -#define fa_nqbytes fa_un.fa_nqnfs.nqfa_bytes -#define fa_nqfsid fa_un.fa_nqnfs.nqfa_fsid -#define fa_nqfileid fa_un.fa_nqnfs.nqfa_fileid -#define fa_nqatime fa_un.fa_nqnfs.nqfa_atime -#define fa_nqmtime fa_un.fa_nqnfs.nqfa_mtime -#define fa_nqctime fa_un.fa_nqnfs.nqfa_ctime -#define fa_nqflags fa_un.fa_nqnfs.nqfa_flags -#define fa_nqgen fa_un.fa_nqnfs.nqfa_gen -#define fa_nqfilerev fa_un.fa_nqnfs.nqfa_filerev - -struct nfsv2_sattr { - u_int32_t sa_mode; - u_int32_t sa_uid; - u_int32_t sa_gid; - union { - struct { - u_int32_t nfssa_size; - struct nfsv2_time nfssa_atime; - struct nfsv2_time nfssa_mtime; - } sa_nfsv2; - struct { - struct { - u_int32_t nqsa_qsize[2]; - } nqsa_size; - struct nqnfs_time nqsa_atime; - struct nqnfs_time nqsa_mtime; - u_int32_t nqsa_flags; - u_int32_t nqsa_rdev; - } sa_nqnfs; - } sa_un; -}; - -/* and some ugly defines for accessing the unions */ -#define sa_nfssize sa_un.sa_nfsv2.nfssa_size -#define sa_nfsatime sa_un.sa_nfsv2.nfssa_atime -#define sa_nfsmtime sa_un.sa_nfsv2.nfssa_mtime -#define sa_nqsize sa_un.sa_nqnfs.nqsa_size -#define sa_nqatime sa_un.sa_nqnfs.nqsa_atime -#define sa_nqmtime sa_un.sa_nqnfs.nqsa_mtime -#define sa_nqflags sa_un.sa_nqnfs.nqsa_flags -#define sa_nqrdev sa_un.sa_nqnfs.nqsa_rdev - -struct nfsv2_statfs { - u_int32_t sf_tsize; - u_int32_t sf_bsize; - u_int32_t sf_blocks; - u_int32_t sf_bfree; - u_int32_t sf_bavail; - u_int32_t sf_files; /* Nqnfs only */ - u_int32_t sf_ffree; /* ditto */ -}; diff --git a/nlpid.c b/nlpid.c index 7dfd6a6f883d..47ebb5350493 100755 --- a/nlpid.c +++ b/nlpid.c @@ -15,7 +15,7 @@ #ifndef lint static const char rcsid[] _U_ = - "@(#) $Header: /tcpdump/master/tcpdump/nlpid.c,v 1.4 2004/10/19 15:27:55 hannes Exp $ (LBL)"; + "@(#) $Header: /tcpdump/master/tcpdump/nlpid.c,v 1.4 2004-10-19 15:27:55 hannes Exp $ (LBL)"; #endif #ifdef HAVE_CONFIG_H diff --git a/nlpid.h b/nlpid.h index fdca44655238..31f6b66da6ba 100644 --- a/nlpid.h +++ b/nlpid.h @@ -1,4 +1,4 @@ -/* @(#) $Header: /tcpdump/master/tcpdump/nlpid.h,v 1.4 2004/10/19 15:27:55 hannes Exp $ (LBL) */ +/* @(#) $Header: /tcpdump/master/tcpdump/nlpid.h,v 1.4 2004-10-19 15:27:55 hannes Exp $ (LBL) */ /* * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that: (1) source code diff --git a/ntp.h b/ntp.h index df856699ae89..0614f73ba8bd 100644 --- a/ntp.h +++ b/ntp.h @@ -1,4 +1,4 @@ -/* $Header: /tcpdump/master/tcpdump/ntp.h,v 1.8 2004/01/28 14:34:50 hannes Exp $ */ +/* $Header: /tcpdump/master/tcpdump/ntp.h,v 1.8 2004-01-28 14:34:50 hannes Exp $ */ /* * Based on ntp.h from the U of MD implementation diff --git a/oakley.h b/oakley.h index f40d6073eb01..ad328171b336 100644 --- a/oakley.h +++ b/oakley.h @@ -26,7 +26,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ -/* YIPS @(#)$Id: oakley.h,v 1.4 2002/12/11 07:13:56 guy Exp $ */ +/* YIPS @(#)$Id: oakley.h,v 1.4 2002-12-11 07:13:56 guy Exp $ */ /* refer to RFC 2409 */ diff --git a/ospf.h b/ospf.h index 91a904fed19c..2b1c6ee4c6b7 100644 --- a/ospf.h +++ b/ospf.h @@ -1,4 +1,4 @@ -/* @(#) $Header: /tcpdump/master/tcpdump/ospf.h,v 1.16.2.2 2006/12/13 08:24:27 hannes Exp $ (LBL) */ +/* @(#) $Header: /tcpdump/master/tcpdump/ospf.h,v 1.23 2007-10-08 07:53:21 hannes Exp $ (LBL) */ /* * Copyright (c) 1991, 1993, 1994, 1995, 1996, 1997 * The Regents of the University of California. All rights reserved. @@ -31,7 +31,7 @@ /* Options field * * +------------------------------------+ - * | * | O | DC | EA | N/P | MC | E | T | + * | DN | O | DC | L | N/P | MC | E | T | * +------------------------------------+ * */ @@ -41,6 +41,7 @@ #define OSPF_OPTION_MC 0x04 /* MC bit: Multicast capable */ #define OSPF_OPTION_NP 0x08 /* N/P bit: NSSA capable */ #define OSPF_OPTION_EA 0x10 /* EA bit: External Attribute capable */ +#define OSPF_OPTION_L 0x10 /* L bit: Packet contains LLS data block */ #define OSPF_OPTION_DC 0x20 /* DC bit: Demand circuit capable */ #define OSPF_OPTION_O 0x40 /* O bit: Opaque LSA capable */ #define OSPF_OPTION_DN 0x80 /* DN bit: Up/Down Bit capable - draft-ietf-ospf-2547-dnbit-04 */ @@ -53,9 +54,10 @@ #define OSPF_AUTH_MD5_LEN 16 /* length of MD5 authentication */ /* db_flags */ -#define OSPF_DB_INIT 0x04 /* */ +#define OSPF_DB_INIT 0x04 #define OSPF_DB_MORE 0x02 -#define OSPF_DB_MASTER 0x01 +#define OSPF_DB_MASTER 0x01 +#define OSPF_DB_RESYNC 0x08 /* RFC4811 */ /* ls_type */ #define LS_TYPE_ROUTER 1 /* router link */ @@ -86,10 +88,10 @@ #define LS_OPAQUE_TE_LINK_SUBTLV_MAX_RES_BW 7 /* rfc3630 */ #define LS_OPAQUE_TE_LINK_SUBTLV_UNRES_BW 8 /* rfc3630 */ #define LS_OPAQUE_TE_LINK_SUBTLV_ADMIN_GROUP 9 /* rfc3630 */ -#define LS_OPAQUE_TE_LINK_SUBTLV_LINK_LOCAL_REMOTE_ID 11 /* draft-ietf-ccamp-ospf-gmpls-extensions */ -#define LS_OPAQUE_TE_LINK_SUBTLV_LINK_PROTECTION_TYPE 14 /* draft-ietf-ccamp-ospf-gmpls-extensions */ -#define LS_OPAQUE_TE_LINK_SUBTLV_INTF_SW_CAP_DESCR 15 /* draft-ietf-ccamp-ospf-gmpls-extensions */ -#define LS_OPAQUE_TE_LINK_SUBTLV_SHARED_RISK_GROUP 16 /* draft-ietf-ccamp-ospf-gmpls-extensions */ +#define LS_OPAQUE_TE_LINK_SUBTLV_LINK_LOCAL_REMOTE_ID 11 /* rfc4203 */ +#define LS_OPAQUE_TE_LINK_SUBTLV_LINK_PROTECTION_TYPE 14 /* rfc4203 */ +#define LS_OPAQUE_TE_LINK_SUBTLV_INTF_SW_CAP_DESCR 15 /* rfc4203 */ +#define LS_OPAQUE_TE_LINK_SUBTLV_SHARED_RISK_GROUP 16 /* rfc4203 */ #define LS_OPAQUE_TE_LINK_SUBTLV_BW_CONSTRAINTS 17 /* rfc4124 */ #define LS_OPAQUE_TE_LINK_SUBTLV_LINK_TYPE_PTP 1 /* rfc3630 */ @@ -106,12 +108,6 @@ #define LS_OPAQUE_RI_TLV_CAP 1 /* draft-ietf-ospf-cap-03 */ -/************************************************* - * - * is the above a bug in the documentation? - * - *************************************************/ - /* rla_link.link_type */ #define RLA_TYPE_ROUTER 1 /* point-to-point to another router */ @@ -140,6 +136,31 @@ #define MCLA_VERTEX_ROUTER 1 #define MCLA_VERTEX_NETWORK 2 +/* Link-Local-Signaling */ +#define OSPF_LLS_EO 1 /* RFC4811, RFC4812 */ +#define OSPF_LLS_MD5 2 /* RFC4813 */ + +#define OSPF_LLS_EO_LR 0x00000001 /* RFC4811 */ +#define OSPF_LLS_EO_RS 0x00000002 /* RFC4812 */ + +/* + * TOS metric struct (will be 0 or more in router links update) + */ +struct tos_metric { + u_int8_t tos_type; + u_int8_t reserved; + u_int8_t tos_metric[2]; +}; +struct tos_link { + u_int8_t link_type; + u_int8_t link_tos_count; + u_int8_t tos_metric[2]; +}; +union un_tos { + struct tos_link link; + struct tos_metric metrics; +}; + /* link state advertisement header */ struct lsa_hdr { u_int16_t ls_age; @@ -172,9 +193,7 @@ struct lsa { struct rlalink { struct in_addr link_id; struct in_addr link_data; - u_int8_t link_type; - u_int8_t link_toscount; - u_int16_t link_tos0metric; + union un_tos un_tos; } rla_link[1]; /* may repeat */ } un_rla; @@ -235,16 +254,6 @@ struct lsa { } lsa_un; }; - -/* - * TOS metric struct (will be 0 or more in router links update) - */ -struct tos_metric { - u_int8_t tos_type; - u_int8_t tos_zero; - u_int16_t tos_metric; -}; - #define OSPF_AUTH_SIZE 8 /* @@ -275,7 +284,7 @@ struct ospfhdr { /* Database Description packet */ struct { - u_int8_t db_zero[2]; + u_int16_t db_ifmtu; u_int8_t db_options; u_int8_t db_flags; u_int32_t db_seq; @@ -314,3 +323,6 @@ struct ospfhdr { #define ospf_lsu ospf_un.un_lsu #define ospf_lsa ospf_un.un_lsa +/* Functions shared by ospf and ospf6 */ +extern int ospf_print_te_lsa(u_int8_t *, u_int); +extern int ospf_print_grace_lsa(u_int8_t *, u_int); diff --git a/ospf6.h b/ospf6.h index b8298ead9165..e2eabee1815c 100644 --- a/ospf6.h +++ b/ospf6.h @@ -1,4 +1,4 @@ -/* @(#) $Header: /tcpdump/master/tcpdump/ospf6.h,v 1.6 2002/12/11 07:13:56 guy Exp $ (LBL) */ +/* @(#) $Header: /tcpdump/master/tcpdump/ospf6.h,v 1.7 2006-09-05 15:50:26 hannes Exp $ (LBL) */ /* * Copyright (c) 1991, 1993, 1994, 1995, 1996, 1997 * The Regents of the University of California. All rights reserved. @@ -21,13 +21,11 @@ * * OSPF support contributed by Jeffrey Honig (jch@mitchell.cit.cornell.edu) */ -#define OSPF_TYPE_UMD 0 /* UMd's special monitoring packets */ -#define OSPF_TYPE_HELLO 1 /* Hello */ -#define OSPF_TYPE_DB 2 /* Database Description */ -#define OSPF_TYPE_LSR 3 /* Link State Request */ -#define OSPF_TYPE_LSU 4 /* Link State Update */ -#define OSPF_TYPE_LSA 5 /* Link State Ack */ -#define OSPF_TYPE_MAX 6 +#define OSPF_TYPE_HELLO 1 /* Hello */ +#define OSPF_TYPE_DD 2 /* Database Description */ +#define OSPF_TYPE_LS_REQ 3 /* Link State Request */ +#define OSPF_TYPE_LS_UPDATE 4 /* Link State Update */ +#define OSPF_TYPE_LS_ACK 5 /* Link State Ack */ /* Options *_options */ #define OSPF6_OPTION_V6 0x01 /* V6 bit: A bit for peeping tom */ @@ -50,23 +48,18 @@ #define LS_TYPE_INTER_AR 4 /* Inter-Area-Router */ #define LS_TYPE_ASE 5 /* ASE */ #define LS_TYPE_GROUP 6 /* Group membership */ -#define LS_TYPE_TYPE7 7 /* Type 7 LSA */ +#define LS_TYPE_NSSA 7 /* NSSA */ #define LS_TYPE_LINK 8 /* Link LSA */ #define LS_TYPE_INTRA_AP 9 /* Intra-Area-Prefix */ -#define LS_TYPE_MAX 10 +#define LS_TYPE_INTRA_ATE 10 /* Intra-Area-TE */ +#define LS_TYPE_GRACE 11 /* Grace LSA */ #define LS_TYPE_MASK 0x1fff #define LS_SCOPE_LINKLOCAL 0x0000 #define LS_SCOPE_AREA 0x2000 #define LS_SCOPE_AS 0x4000 #define LS_SCOPE_MASK 0x6000 - -/************************************************* - * - * is the above a bug in the documentation? - * - *************************************************/ - +#define LS_SCOPE_U 0x8000 /* rla_link.link_type */ #define RLA_TYPE_ROUTER 1 /* point-to-point to another router */ @@ -78,6 +71,14 @@ #define RLA_FLAG_E 0x02 #define RLA_FLAG_V 0x04 #define RLA_FLAG_W 0x08 +#define RLA_FLAG_N 0x10 + +/* lsa_prefix options */ +#define LSA_PREFIX_OPT_NU 0x01 +#define LSA_PREFIX_OPT_LA 0x02 +#define LSA_PREFIX_OPT_MC 0x04 +#define LSA_PREFIX_OPT_P 0x08 +#define LSA_PREFIX_OPT_DN 0x10 /* sla_tosmetric breakdown */ #define SLA_MASK_TOS 0x7f000000 @@ -85,19 +86,14 @@ #define SLA_SHIFT_TOS 24 /* asla_metric */ -#define ASLA_FLAG_EXTERNAL 0x04000000 #define ASLA_FLAG_FWDADDR 0x02000000 #define ASLA_FLAG_ROUTETAG 0x01000000 #define ASLA_MASK_METRIC 0x00ffffff -/* multicast vertex type */ -#define MCLA_VERTEX_ROUTER 1 -#define MCLA_VERTEX_NETWORK 2 - typedef u_int32_t rtrid_t; /* link state advertisement header */ -struct lsa_hdr { +struct lsa6_hdr { u_int16_t ls_age; u_int16_t ls_type; rtrid_t ls_stateid; @@ -107,16 +103,16 @@ struct lsa_hdr { u_int16_t ls_length; }; -struct lsa_prefix { +struct lsa6_prefix { u_int8_t lsa_p_len; u_int8_t lsa_p_opt; - u_int16_t lsa_p_mbz; + u_int16_t lsa_p_metric; u_int8_t lsa_p_prefix[4]; }; /* link state advertisement */ -struct lsa { - struct lsa_hdr ls_hdr; +struct lsa6 { + struct lsa6_hdr ls_hdr; /* Link state types */ union { @@ -128,7 +124,7 @@ struct lsa { } rla_flgandopt; #define rla_flags rla_flgandopt.flg #define rla_options rla_flgandopt.opt - struct rlalink { + struct rlalink6 { u_int8_t link_type; u_int8_t link_zero[1]; u_int16_t link_metric; @@ -147,13 +143,13 @@ struct lsa { /* Inter Area Prefix LSA */ struct { u_int32_t inter_ap_metric; - struct lsa_prefix inter_ap_prefix[1]; + struct lsa6_prefix inter_ap_prefix[1]; } un_inter_ap; /* AS external links advertisements */ struct { u_int32_t asla_metric; - struct lsa_prefix asla_prefix[1]; + struct lsa6_prefix asla_prefix[1]; /* some optional fields follow */ } un_asla; @@ -183,7 +179,7 @@ struct lsa { #define llsa_options llsa_priandopt.opt struct in6_addr llsa_lladdr; u_int32_t llsa_nprefix; - struct lsa_prefix llsa_prefix[1]; + struct lsa6_prefix llsa_prefix[1]; } un_llsa; /* Intra-Area-Prefix */ @@ -192,21 +188,12 @@ struct lsa { u_int16_t intra_ap_lstype; rtrid_t intra_ap_lsid; rtrid_t intra_ap_rtid; - struct lsa_prefix intra_ap_prefix[1]; + struct lsa6_prefix intra_ap_prefix[1]; } un_intra_ap; } lsa_un; }; -/* - * TOS metric struct (will be 0 or more in router links update) - */ -struct tos_metric { - u_int8_t tos_type; - u_int8_t tos_zero; - u_int16_t tos_metric; -}; - #define OSPF_AUTH_SIZE 8 /* @@ -246,11 +233,11 @@ struct ospf6hdr { u_int8_t db_mbz; u_int8_t db_flags; u_int32_t db_seq; - struct lsa_hdr db_lshdr[1]; /* may repeat */ + struct lsa6_hdr db_lshdr[1]; /* may repeat */ } un_db; /* Link State Request */ - struct lsr { + struct lsr6 { u_int16_t ls_mbz; u_int16_t ls_type; rtrid_t ls_stateid; @@ -260,12 +247,12 @@ struct ospf6hdr { /* Link State Update */ struct { u_int32_t lsu_count; - struct lsa lsu_lsa[1]; /* may repeat */ + struct lsa6 lsu_lsa[1]; /* may repeat */ } un_lsu; /* Link State Acknowledgement */ struct { - struct lsa_hdr lsa_lshdr[1]; /* may repeat */ + struct lsa6_hdr lsa_lshdr[1]; /* may repeat */ } un_lsa ; } ospf6_un ; }; diff --git a/oui.c b/oui.c index 7cdcd40181d7..e6569d465405 100644 --- a/oui.c +++ b/oui.c @@ -15,7 +15,7 @@ #ifndef lint static const char rcsid[] _U_ = - "@(#) $Header: /tcpdump/master/tcpdump/oui.c,v 1.4.2.1 2005/04/17 01:20:56 guy Exp $ (LBL)"; + "@(#) $Header: /tcpdump/master/tcpdump/oui.c,v 1.8.2.1 2008-01-09 09:44:39 hannes Exp $ (LBL)"; #endif #ifdef HAVE_CONFIG_H @@ -39,6 +39,9 @@ struct tok oui_values[] = { { OUI_APPLETALK, "Appletalk" }, { OUI_JUNIPER, "Juniper" }, { OUI_HP, "Hewlett-Packard" }, + { OUI_IEEE_8021_PRIVATE, "IEEE 802.1 Private"}, + { OUI_IEEE_8023_PRIVATE, "IEEE 802.3 Private"}, + { OUI_TIA, "ANSI/TIA"}, { 0, NULL } }; diff --git a/oui.h b/oui.h index 4d79e197d42e..e70f82ab62ba 100644 --- a/oui.h +++ b/oui.h @@ -1,4 +1,4 @@ -/* @(#) $Header: /tcpdump/master/tcpdump/oui.h,v 1.3.2.1 2005/04/17 01:20:56 guy Exp $ (LBL) */ +/* @(#) $Header: /tcpdump/master/tcpdump/oui.h,v 1.7.2.1 2008-01-09 09:44:39 hannes Exp $ (LBL) */ /* * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that: (1) source code @@ -27,6 +27,9 @@ extern struct tok smi_values[]; #define OUI_APPLETALK 0x080007 /* Appletalk */ #define OUI_JUNIPER 0x009069 /* Juniper */ #define OUI_HP 0x080009 /* Hewlett-Packard */ +#define OUI_IEEE_8021_PRIVATE 0x0080c2 /* IEEE 802.1 Organisation Specific - Annex F */ +#define OUI_IEEE_8023_PRIVATE 0x00120f /* IEEE 802.3 Organisation Specific - Annex G */ +#define OUI_TIA 0x0012bb /* TIA - Telecommunications Industry Association - ANSI/TIA-1057- 2006 */ /* * These are SMI Network Management Private Enterprise Codes for diff --git a/parsenfsfh.c b/parsenfsfh.c index ef1e0ba38bde..d5f877d82235 100644 --- a/parsenfsfh.c +++ b/parsenfsfh.c @@ -42,7 +42,7 @@ #ifndef lint static const char rcsid[] _U_ = - "@(#) $Header: /tcpdump/master/tcpdump/parsenfsfh.c,v 1.28.2.1 2007/06/15 19:15:04 guy Exp $ (LBL)"; + "@(#) $Header: /tcpdump/master/tcpdump/parsenfsfh.c,v 1.29 2006-06-13 22:21:38 guy Exp $ (LBL)"; #endif #ifdef HAVE_CONFIG_H diff --git a/pcap-missing.h b/pcap-missing.h index 1f2fcb422b95..5c0ece25b313 100644 --- a/pcap-missing.h +++ b/pcap-missing.h @@ -18,7 +18,7 @@ * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. * - * @(#) $Header: /tcpdump/master/tcpdump/pcap-missing.h,v 1.2.2.1 2005/06/03 22:10:16 guy Exp $ (LBL) + * @(#) $Header: /tcpdump/master/tcpdump/pcap-missing.h,v 1.3 2005-06-03 22:08:52 guy Exp $ (LBL) */ #ifndef tcpdump_pcap_missing_h diff --git a/pcap_dump_ftell.c b/pcap_dump_ftell.c index 438cd29dbeb9..6eb3a4ab75c9 100644 --- a/pcap_dump_ftell.c +++ b/pcap_dump_ftell.c @@ -21,7 +21,7 @@ #ifndef lint static const char rcsid[] _U_ = - "@(#) $Header: /tcpdump/master/tcpdump/pcap_dump_ftell.c,v 1.1.2.1 2005/06/03 22:10:17 guy Exp $ (LBL)"; + "@(#) $Header: /tcpdump/master/tcpdump/pcap_dump_ftell.c,v 1.1 2005-06-03 22:08:52 guy Exp $ (LBL)"; #endif #include diff --git a/pf.h b/pf.h deleted file mode 100644 index c2d332abb3cd..000000000000 --- a/pf.h +++ /dev/null @@ -1,77 +0,0 @@ -/* - * Copyright (c) 2001 Daniel Hartmeier - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - 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. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS 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 - * COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @(#) $Header: /tcpdump/master/tcpdump/pf.h,v 1.2 2004/04/02 06:36:25 guy Exp $ (LBL) - */ - -/* from $OpenBSD: pfvar.h,v 1.170 2003/08/22 21:50:34 david Exp $ */ - -enum { PF_INOUT=0, PF_IN=1, PF_OUT=2 }; -enum { PF_PASS=0, PF_DROP=1, PF_SCRUB=2, PF_NAT=3, PF_NONAT=4, - PF_BINAT=5, PF_NOBINAT=6, PF_RDR=7, PF_NORDR=8, PF_SYNPROXY_DROP=9 }; - -/* Reasons code for passing/dropping a packet */ -#define PFRES_MATCH 0 /* Explicit match of a rule */ -#define PFRES_BADOFF 1 /* Bad offset for pull_hdr */ -#define PFRES_FRAG 2 /* Dropping following fragment */ -#define PFRES_SHORT 3 /* Dropping short packet */ -#define PFRES_NORM 4 /* Dropping by normalizer */ -#define PFRES_MEMORY 5 /* Dropped due to lacking mem */ -#define PFRES_MAX 6 /* total+1 */ - -#define PFRES_NAMES { \ - "match", \ - "bad-offset", \ - "fragment", \ - "short", \ - "normalize", \ - "memory", \ - NULL \ -} - -#define PF_RULESET_NAME_SIZE 16 - -/* from $OpenBSD: if_pflog.h,v 1.9 2003/07/15 20:27:27 dhartmei Exp $ */ - -#ifndef IFNAMSIZ -#define IFNAMSIZ 16 -#endif - -struct pfloghdr { - u_int8_t length; - u_int8_t af; - u_int8_t action; - u_int8_t reason; - char ifname[IFNAMSIZ]; - char ruleset[PF_RULESET_NAME_SIZE]; - u_int32_t rulenr; - u_int32_t subrulenr; - u_int8_t dir; - u_int8_t pad[3]; -}; -#define PFLOG_HDRLEN sizeof(struct pfloghdr) diff --git a/pmap_prot.h b/pmap_prot.h index cf6b620b39fe..67ad62626feb 100644 --- a/pmap_prot.h +++ b/pmap_prot.h @@ -1,4 +1,4 @@ -/* @(#) $Header: /tcpdump/master/tcpdump/pmap_prot.h,v 1.1.2.2 2005/04/27 21:44:06 guy Exp $ (LBL) */ +/* @(#) $Header: /tcpdump/master/tcpdump/pmap_prot.h,v 1.3 2005-04-27 21:43:48 guy Exp $ (LBL) */ /* * Sun RPC is a product of Sun Microsystems, Inc. and is provided for * unrestricted use provided that this legend is included on all tape @@ -29,7 +29,7 @@ * * from: @(#)pmap_prot.h 1.14 88/02/08 SMI * from: @(#)pmap_prot.h 2.1 88/07/29 4.0 RPCSRC - * $FreeBSD: vendor/tcpdump/dist/contrib/tcpdump/pmap_prot.h 147899 2005-07-11 03:54:22Z sam $ + * $FreeBSD: src/include/rpc/pmap_prot.h,v 1.9.2.1 1999/08/29 14:39:05 peter Exp $ */ /* diff --git a/ppp.h b/ppp.h index 71621caa9ca7..f1a2c48b98d8 100644 --- a/ppp.h +++ b/ppp.h @@ -1,4 +1,4 @@ -/* @(#) $Header: /tcpdump/master/tcpdump/ppp.h,v 1.16 2004/10/20 16:14:16 hannes Exp $ (LBL) */ +/* @(#) $Header: /tcpdump/master/tcpdump/ppp.h,v 1.16 2004-10-20 16:14:16 hannes Exp $ (LBL) */ /* * Point to Point Protocol (PPP) RFC1331 * diff --git a/print-802_11.c b/print-802_11.c index 21e316defcc8..835d21bd3741 100644 --- a/print-802_11.c +++ b/print-802_11.c @@ -22,7 +22,7 @@ #ifndef lint static const char rcsid[] _U_ = - "@(#) $Header: /tcpdump/master/tcpdump/print-802_11.c,v 1.31.2.15 2007/07/22 23:14:14 guy Exp $ (LBL)"; + "@(#) $Header: /tcpdump/master/tcpdump/print-802_11.c,v 1.47.2.2 2007-12-29 23:25:28 guy Exp $ (LBL)"; #endif #ifdef HAVE_CONFIG_H @@ -264,7 +264,7 @@ parse_elements(struct mgmt_body_t *pbody, const u_char *p, int offset) if (pbody->tim.length <= 3) break; - if (pbody->tim.length - 3 > sizeof pbody->tim.bitmap) + if (pbody->tim.length - 3 > (int)sizeof pbody->tim.bitmap) return; if (!TTEST2(*(p + offset), pbody->tim.length - 3)) return; @@ -1209,6 +1209,11 @@ ieee802_11_avs_radio_print(const u_char *p, u_int length, u_int caplen) { u_int32_t caphdr_len; + if (caplen < 8) { + printf("[|802.11]"); + return caplen; + } + caphdr_len = EXTRACT_32BITS(p + 4); if (caphdr_len < 8) { /* @@ -1231,32 +1236,38 @@ ieee802_11_avs_radio_print(const u_char *p, u_int length, u_int caplen) #define PRISM_HDR_LEN 144 +#define WLANCAP_MAGIC_COOKIE_BASE 0x80211000 #define WLANCAP_MAGIC_COOKIE_V1 0x80211001 +#define WLANCAP_MAGIC_COOKIE_V2 0x80211002 /* * For DLT_PRISM_HEADER; like DLT_IEEE802_11, but with an extra header, * containing information such as radio information, which we * currently ignore. * - * If, however, the packet begins with WLANCAP_MAGIC_COOKIE_V1, it's - * really DLT_IEEE802_11_RADIO (currently, on Linux, there's no - * ARPHRD_ type for DLT_IEEE802_11_RADIO, as there is a - * ARPHRD_IEEE80211_PRISM for DLT_PRISM_HEADER, so - * ARPHRD_IEEE80211_PRISM is used for DLT_IEEE802_11_RADIO, and - * the first 4 bytes of the header are used to indicate which it is). + * If, however, the packet begins with WLANCAP_MAGIC_COOKIE_V1 or + * WLANCAP_MAGIC_COOKIE_V2, it's really DLT_IEEE802_11_RADIO_AVS + * (currently, on Linux, there's no ARPHRD_ type for + * DLT_IEEE802_11_RADIO_AVS, as there is a ARPHRD_IEEE80211_PRISM + * for DLT_PRISM_HEADER, so ARPHRD_IEEE80211_PRISM is used for + * the AVS header, and the first 4 bytes of the header are used to + * indicate whether it's a Prism header or an AVS header). */ u_int prism_if_print(const struct pcap_pkthdr *h, const u_char *p) { u_int caplen = h->caplen; u_int length = h->len; + u_int32_t msgcode; if (caplen < 4) { printf("[|802.11]"); return caplen; } - if (EXTRACT_32BITS(p) == WLANCAP_MAGIC_COOKIE_V1) + msgcode = EXTRACT_32BITS(p); + if (msgcode == WLANCAP_MAGIC_COOKIE_V1 || + msgcode == WLANCAP_MAGIC_COOKIE_V2) return ieee802_11_avs_radio_print(p, length, caplen); if (caplen < PRISM_HDR_LEN) { @@ -1270,19 +1281,21 @@ prism_if_print(const struct pcap_pkthdr *h, const u_char *p) /* * For DLT_IEEE802_11_RADIO; like DLT_IEEE802_11, but with an extra - * header, containing information such as radio information, which we - * currently ignore. + * header, containing information such as radio information. */ u_int ieee802_11_radio_if_print(const struct pcap_pkthdr *h, const u_char *p) { - u_int caplen = h->caplen; - u_int length = h->len; - - if (caplen < 8) { - printf("[|802.11]"); - return caplen; - } - - return ieee802_11_radio_print(p, length, caplen); + return ieee802_11_radio_print(p, h->len, h->caplen); +} + +/* + * For DLT_IEEE802_11_RADIO_AVS; like DLT_IEEE802_11, but with an + * extra header, containing information such as radio information, + * which we currently ignore. + */ +u_int +ieee802_11_radio_avs_if_print(const struct pcap_pkthdr *h, const u_char *p) +{ + return ieee802_11_avs_radio_print(p, h->len, h->caplen); } diff --git a/print-ah.c b/print-ah.c index 92ed9094d72d..ecd106b73806 100644 --- a/print-ah.c +++ b/print-ah.c @@ -23,7 +23,7 @@ #ifndef lint static const char rcsid[] _U_ = - "@(#) $Header: /tcpdump/master/tcpdump/print-ah.c,v 1.22 2003/11/19 00:36:06 guy Exp $ (LBL)"; + "@(#) $Header: /tcpdump/master/tcpdump/print-ah.c,v 1.22 2003-11-19 00:36:06 guy Exp $ (LBL)"; #endif #ifdef HAVE_CONFIG_H diff --git a/print-aodv.c b/print-aodv.c index 80a547dd305f..c5f662237448 100644 --- a/print-aodv.c +++ b/print-aodv.c @@ -32,7 +32,7 @@ #ifndef lint static const char rcsid[] _U_ = - "@(#) $Header: /tcpdump/master/tcpdump/print-aodv.c,v 1.11 2004/03/24 00:30:19 guy Exp $ (LBL)"; + "@(#) $Header: /tcpdump/master/tcpdump/print-aodv.c,v 1.11 2004-03-24 00:30:19 guy Exp $ (LBL)"; #endif #ifdef HAVE_CONFIG_H diff --git a/print-ap1394.c b/print-ap1394.c index a01ce34cef65..dd9bc5a6c25d 100644 --- a/print-ap1394.c +++ b/print-ap1394.c @@ -20,7 +20,7 @@ */ #ifndef lint static const char rcsid[] _U_ = - "@(#) $Header: /tcpdump/master/tcpdump/print-ap1394.c,v 1.3.2.1 2005/07/07 01:24:33 guy Exp $ (LBL)"; + "@(#) $Header: /tcpdump/master/tcpdump/print-ap1394.c,v 1.5 2006-02-11 22:12:06 hannes Exp $ (LBL)"; #endif #ifdef HAVE_CONFIG_H @@ -60,8 +60,8 @@ ap1394_hdr_print(register const u_char *bp, u_int length) fp = (const struct firewire_header *)bp; (void)printf("%s > %s", - linkaddr_string(fp->firewire_dhost, FIREWIRE_EUI64_LEN), - linkaddr_string(fp->firewire_shost, FIREWIRE_EUI64_LEN)); + linkaddr_string(fp->firewire_dhost, LINKADDR_IEEE1394, FIREWIRE_EUI64_LEN), + linkaddr_string(fp->firewire_shost, LINKADDR_IEEE1394, FIREWIRE_EUI64_LEN)); if (!qflag) { (void)printf(", ethertype %s (0x%04x)", diff --git a/print-arcnet.c b/print-arcnet.c index 63f9c215d7ac..48a43030b4d2 100644 --- a/print-arcnet.c +++ b/print-arcnet.c @@ -22,7 +22,7 @@ */ #ifndef lint static const char rcsid[] _U_ = - "@(#) $Header: /tcpdump/master/tcpdump/print-arcnet.c,v 1.20 2005/04/06 21:32:38 mcr Exp $ (LBL)"; + "@(#) $Header: /tcpdump/master/tcpdump/print-arcnet.c,v 1.20 2005-04-06 21:32:38 mcr Exp $ (LBL)"; #endif #ifdef HAVE_CONFIG_H diff --git a/print-arp.c b/print-arp.c index 68e9dc6894c7..0ca86cfca087 100644 --- a/print-arp.c +++ b/print-arp.c @@ -21,7 +21,7 @@ #ifndef lint static const char rcsid[] _U_ = - "@(#) $Header: /tcpdump/master/tcpdump/print-arp.c,v 1.64 2004/04/30 16:42:14 mcr Exp $ (LBL)"; + "@(#) $Header: /tcpdump/master/tcpdump/print-arp.c,v 1.66 2006-03-03 22:53:21 hannes Exp $ (LBL)"; #endif #ifdef HAVE_CONFIG_H @@ -49,24 +49,27 @@ static const char rcsid[] _U_ = * arp_tha and arp_tpa in that order, according to the lengths * specified. Field names used correspond to RFC 826. */ -struct arp_pkthdr { - u_short ar_hrd; /* format of hardware address */ -#define ARPHRD_ETHER 1 /* ethernet hardware format */ -#define ARPHRD_IEEE802 6 /* token-ring hardware format */ -#define ARPHRD_ARCNET 7 /* arcnet hardware format */ -#define ARPHRD_FRELAY 15 /* frame relay hardware format */ -#define ARPHRD_STRIP 23 /* Ricochet Starmode Radio hardware format */ -#define ARPHRD_IEEE1394 24 /* IEEE 1394 (FireWire) hardware format */ - u_short ar_pro; /* format of protocol address */ - u_char ar_hln; /* length of hardware address */ - u_char ar_pln; /* length of protocol address */ - u_short ar_op; /* one of: */ -#define ARPOP_REQUEST 1 /* request to resolve address */ -#define ARPOP_REPLY 2 /* response to previous request */ -#define ARPOP_REVREQUEST 3 /* request protocol address given hardware */ -#define ARPOP_REVREPLY 4 /* response giving protocol address */ -#define ARPOP_INVREQUEST 8 /* request to identify peer */ -#define ARPOP_INVREPLY 9 /* response identifying peer */ +struct arp_pkthdr { + u_short ar_hrd; /* format of hardware address */ +#define ARPHRD_ETHER 1 /* ethernet hardware format */ +#define ARPHRD_IEEE802 6 /* token-ring hardware format */ +#define ARPHRD_ARCNET 7 /* arcnet hardware format */ +#define ARPHRD_FRELAY 15 /* frame relay hardware format */ +#define ARPHRD_ATM2225 19 /* ATM (RFC 2225) */ +#define ARPHRD_STRIP 23 /* Ricochet Starmode Radio hardware format */ +#define ARPHRD_IEEE1394 24 /* IEEE 1394 (FireWire) hardware format */ + u_short ar_pro; /* format of protocol address */ + u_char ar_hln; /* length of hardware address */ + u_char ar_pln; /* length of protocol address */ + u_short ar_op; /* one of: */ +#define ARPOP_REQUEST 1 /* request to resolve address */ +#define ARPOP_REPLY 2 /* response to previous request */ +#define ARPOP_REVREQUEST 3 /* request protocol address given hardware */ +#define ARPOP_REVREPLY 4 /* response giving protocol address */ +#define ARPOP_INVREQUEST 8 /* request to identify peer */ +#define ARPOP_INVREPLY 9 /* response identifying peer */ +#define ARPOP_NAK 10 /* NAK - only valif for ATM ARP */ + /* * The remaining fields are variable in size, * according to the sizes above. @@ -86,8 +89,8 @@ struct arp_pkthdr { #define ARP_HDRLEN 8 #define HRD(ap) EXTRACT_16BITS(&(ap)->ar_hrd) -#define HLN(ap) ((ap)->ar_hln) -#define PLN(ap) ((ap)->ar_pln) +#define HRD_LEN(ap) ((ap)->ar_hln) +#define PROTO_LEN(ap) ((ap)->ar_pln) #define OP(ap) EXTRACT_16BITS(&(ap)->ar_op) #define PRO(ap) EXTRACT_16BITS(&(ap)->ar_pro) #define SHA(ap) (ar_sha(ap)) @@ -95,6 +98,29 @@ struct arp_pkthdr { #define THA(ap) (ar_tha(ap)) #define TPA(ap) (ar_tpa(ap)) + +struct tok arpop_values[] = { + { ARPOP_REQUEST, "Request" }, + { ARPOP_REPLY, "Reply" }, + { ARPOP_REVREQUEST, "Reverse Request" }, + { ARPOP_REVREPLY, "Reverse Reply" }, + { ARPOP_INVREQUEST, "Inverse Request" }, + { ARPOP_INVREPLY, "Inverse Reply" }, + { ARPOP_NAK, "NACK Reply" }, + { 0, NULL } +}; + +struct tok arphrd_values[] = { + { ARPHRD_ETHER, "Ethernet" }, + { ARPHRD_IEEE802, "TokenRing" }, + { ARPHRD_ARCNET, "ArcNet" }, + { ARPHRD_FRELAY, "FrameRelay" }, + { ARPHRD_STRIP, "Strip" }, + { ARPHRD_IEEE1394, "IEEE 1394" }, + { ARPHRD_ATM2225, "ATM" }, + { 0, NULL } +}; + /* * ATM Address Resolution Protocol. * @@ -104,20 +130,18 @@ struct arp_pkthdr { * the ATM number and subaddress - and the hardware addresses consist * of an ATM number and an ATM subaddress. */ -struct atmarp_pkthdr { - u_short aar_hrd; /* format of hardware address */ -#define ARPHRD_ATM2225 19 /* ATM (RFC 2225) */ - u_short aar_pro; /* format of protocol address */ - u_char aar_shtl; /* length of source ATM number */ - u_char aar_sstl; /* length of source ATM subaddress */ -#define ATMARP_IS_E164 0x40 /* bit in type/length for E.164 format */ -#define ATMARP_LEN_MASK 0x3F /* length of {sub}address in type/length */ - u_short aar_op; /* same as regular ARP */ -#define ATMARPOP_NAK 10 /* NAK */ - u_char aar_spln; /* length of source protocol address */ - u_char aar_thtl; /* length of target ATM number */ - u_char aar_tstl; /* length of target ATM subaddress */ - u_char aar_tpln; /* length of target protocol address */ +struct atmarp_pkthdr { + u_short aar_hrd; /* format of hardware address */ + u_short aar_pro; /* format of protocol address */ + u_char aar_shtl; /* length of source ATM number */ + u_char aar_sstl; /* length of source ATM subaddress */ +#define ATMARP_IS_E164 0x40 /* bit in type/length for E.164 format */ +#define ATMARP_LEN_MASK 0x3F /* length of {sub}address in type/length */ + u_short aar_op; /* same as regular ARP */ + u_char aar_spln; /* length of source protocol address */ + u_char aar_thtl; /* length of target ATM number */ + u_char aar_tstl; /* length of target ATM subaddress */ + u_char aar_tpln; /* length of target protocol address */ /* * The remaining fields are variable in size, * according to the sizes above. @@ -132,19 +156,19 @@ struct atmarp_pkthdr { #endif #define ATMHRD(ap) EXTRACT_16BITS(&(ap)->aar_hrd) -#define ATMSHLN(ap) ((ap)->aar_shtl & ATMARP_LEN_MASK) +#define ATMSHRD_LEN(ap) ((ap)->aar_shtl & ATMARP_LEN_MASK) #define ATMSSLN(ap) ((ap)->aar_sstl & ATMARP_LEN_MASK) -#define ATMSPLN(ap) ((ap)->aar_spln) +#define ATMSPROTO_LEN(ap) ((ap)->aar_spln) #define ATMOP(ap) EXTRACT_16BITS(&(ap)->aar_op) #define ATMPRO(ap) EXTRACT_16BITS(&(ap)->aar_pro) -#define ATMTHLN(ap) ((ap)->aar_thtl & ATMARP_LEN_MASK) +#define ATMTHRD_LEN(ap) ((ap)->aar_thtl & ATMARP_LEN_MASK) #define ATMTSLN(ap) ((ap)->aar_tstl & ATMARP_LEN_MASK) -#define ATMTPLN(ap) ((ap)->aar_tpln) +#define ATMTPROTO_LEN(ap) ((ap)->aar_tpln) #define aar_sha(ap) ((const u_char *)((ap)+1)) -#define aar_ssa(ap) (aar_sha(ap) + ATMSHLN(ap)) +#define aar_ssa(ap) (aar_sha(ap) + ATMSHRD_LEN(ap)) #define aar_spa(ap) (aar_ssa(ap) + ATMSSLN(ap)) -#define aar_tha(ap) (aar_spa(ap) + ATMSPLN(ap)) -#define aar_tsa(ap) (aar_tha(ap) + ATMTHLN(ap)) +#define aar_tha(ap) (aar_spa(ap) + ATMSPROTO_LEN(ap)) +#define aar_tsa(ap) (aar_tha(ap) + ATMTHRD_LEN(ap)) #define aar_tpa(ap) (aar_tsa(ap) + ATMTSLN(ap)) }; @@ -165,10 +189,10 @@ atmarp_addr_print(netdissect_options *ndo, if (ha_len == 0) ND_PRINT((ndo, "")); else { - ND_PRINT((ndo, "%s", linkaddr_string(ha, ha_len))); + ND_PRINT((ndo, "%s", linkaddr_string(ha, LINKADDR_ATM, ha_len))); if (srca_len != 0) ND_PRINT((ndo, ",%s", - linkaddr_string(srca, srca_len))); + linkaddr_string(srca, LINKADDR_ATM, srca_len))); } } @@ -186,69 +210,86 @@ atmarp_print(netdissect_options *ndo, pro = ATMPRO(ap); op = ATMOP(ap); - if (!ND_TTEST2(*aar_tpa(ap), ATMTPLN(ap))) { - ND_PRINT((ndo, "truncated-atmarp")); + if (!ND_TTEST2(*aar_tpa(ap), ATMTPROTO_LEN(ap))) { + ND_PRINT((ndo, "[|ARP]")); ND_DEFAULTPRINT((const u_char *)ap, length); return; } + if (!ndo->ndo_eflag) { + ND_PRINT((ndo, "ARP, ")); + } + if ((pro != ETHERTYPE_IP && pro != ETHERTYPE_TRAIL) || - ATMSPLN(ap) != 4 || ATMTPLN(ap) != 4) { - ND_PRINT((ndo, "atmarp-#%d for proto #%d (%d/%d) hardware #%d", - op, pro, ATMSPLN(ap), ATMTPLN(ap), hrd)); - return; + ATMSPROTO_LEN(ap) != 4 || + ATMTPROTO_LEN(ap) != 4 || + ndo->ndo_vflag) { + ND_PRINT((ndo, "%s, %s (len %u/%u)", + tok2str(arphrd_values, "Unknown Hardware (%u)", hrd), + tok2str(ethertype_values, "Unknown Protocol (0x%04x)", pro), + ATMSPROTO_LEN(ap), + ATMTPROTO_LEN(ap))); + + /* don't know know about the address formats */ + if (!ndo->ndo_vflag) { + goto out; + } } - if (pro == ETHERTYPE_TRAIL) - ND_PRINT((ndo, "trailer-")); + + /* print operation */ + printf("%s%s ", + ndo->ndo_vflag ? ", " : "", + tok2str(arpop_values, "Unknown (%u)", op)); + switch (op) { case ARPOP_REQUEST: - ND_PRINT((ndo, "arp who-has %s", ipaddr_string(ATMTPA(ap)))); - if (ATMTHLN(ap) != 0) { + ND_PRINT((ndo, "who-has %s", ipaddr_string(ATMTPA(ap)))); + if (ATMTHRD_LEN(ap) != 0) { ND_PRINT((ndo, " (")); - atmarp_addr_print(ndo, ATMTHA(ap), ATMTHLN(ap), + atmarp_addr_print(ndo, ATMTHA(ap), ATMTHRD_LEN(ap), ATMTSA(ap), ATMTSLN(ap)); ND_PRINT((ndo, ")")); } - ND_PRINT((ndo, " tell %s", ipaddr_string(ATMSPA(ap)))); + ND_PRINT((ndo, "tell %s", ipaddr_string(ATMSPA(ap)))); break; case ARPOP_REPLY: - ND_PRINT((ndo, "arp reply %s", ipaddr_string(ATMSPA(ap)))); - ND_PRINT((ndo, " is-at ")); - atmarp_addr_print(ndo, ATMSHA(ap), ATMSHLN(ap), ATMSSA(ap), - ATMSSLN(ap)); + ND_PRINT((ndo, "%s is-at ", ipaddr_string(ATMSPA(ap)))); + atmarp_addr_print(ndo, ATMSHA(ap), ATMSHRD_LEN(ap), ATMSSA(ap), + ATMSSLN(ap)); break; case ARPOP_INVREQUEST: - ND_PRINT((ndo, "invarp who-is ")); - atmarp_addr_print(ndo, ATMTHA(ap), ATMTHLN(ap), ATMTSA(ap), + ND_PRINT((ndo, "who-is ")); + atmarp_addr_print(ndo, ATMTHA(ap), ATMTHRD_LEN(ap), ATMTSA(ap), ATMTSLN(ap)); ND_PRINT((ndo, " tell ")); - atmarp_addr_print(ndo, ATMSHA(ap), ATMSHLN(ap), ATMSSA(ap), + atmarp_addr_print(ndo, ATMSHA(ap), ATMSHRD_LEN(ap), ATMSSA(ap), ATMSSLN(ap)); break; case ARPOP_INVREPLY: - ND_PRINT((ndo, "invarp reply ")); - atmarp_addr_print(ndo, ATMSHA(ap), ATMSHLN(ap), ATMSSA(ap), + atmarp_addr_print(ndo, ATMSHA(ap), ATMSHRD_LEN(ap), ATMSSA(ap), ATMSSLN(ap)); - ND_PRINT((ndo, " at %s", ipaddr_string(ATMSPA(ap)))); + ND_PRINT((ndo, "at %s", ipaddr_string(ATMSPA(ap)))); break; - case ATMARPOP_NAK: - ND_PRINT((ndo, "nak reply for %s", - ipaddr_string(ATMSPA(ap)))); + case ARPOP_NAK: + ND_PRINT((ndo, "for %s", ipaddr_string(ATMSPA(ap)))); break; default: - ND_PRINT((ndo, "atmarp-#%d", op)); ND_DEFAULTPRINT((const u_char *)ap, caplen); return; } - return; + + out: + ND_PRINT((ndo, ", length %u", length)); + return; + trunc: - ND_PRINT((ndo, "[|atmarp]")); + ND_PRINT((ndo, "[|ARP]")); } void @@ -256,81 +297,115 @@ arp_print(netdissect_options *ndo, const u_char *bp, u_int length, u_int caplen) { const struct arp_pkthdr *ap; - u_short pro, hrd, op; + u_short pro, hrd, op, linkaddr; ap = (const struct arp_pkthdr *)bp; ND_TCHECK(*ap); + hrd = HRD(ap); - if (hrd == ARPHRD_ATM2225) { - atmarp_print(ndo, bp, length, caplen); - return; - } pro = PRO(ap); op = OP(ap); - if (!ND_TTEST2(*ar_tpa(ap), PLN(ap))) { - ND_PRINT((ndo, "truncated-arp")); + + /* if its ATM then call the ATM ARP printer + for Frame-relay ARP most of the fields + are similar to Ethernet so overload the Ethernet Printer + and set the linkaddr type for linkaddr_string() accordingly */ + + switch(hrd) { + case ARPHRD_ATM2225: + atmarp_print(ndo, bp, length, caplen); + return; + case ARPHRD_FRELAY: + linkaddr = LINKADDR_FRELAY; + default: + linkaddr = LINKADDR_ETHER; + break; + } + + if (!ND_TTEST2(*ar_tpa(ap), PROTO_LEN(ap))) { + ND_PRINT((ndo, "[|ARP]")); ND_DEFAULTPRINT((const u_char *)ap, length); return; } - if ((pro != ETHERTYPE_IP && pro != ETHERTYPE_TRAIL) || - PLN(ap) != 4 || HLN(ap) == 0) { - ND_PRINT((ndo, "arp-#%d for proto #%d (%d) hardware #%d (%d)", - op, pro, PLN(ap), hrd, HLN(ap))); - return; + if (!ndo->ndo_eflag) { + ND_PRINT((ndo, "ARP, ")); + } + + /* print hardware type/len and proto type/len */ + if ((pro != ETHERTYPE_IP && pro != ETHERTYPE_TRAIL) || + PROTO_LEN(ap) != 4 || + HRD_LEN(ap) == 0 || + ndo->ndo_vflag) { + ND_PRINT((ndo, "%s (len %u), %s (len %u)", + tok2str(arphrd_values, "Unknown Hardware (%u)", hrd), + HRD_LEN(ap), + tok2str(ethertype_values, "Unknown Protocol (0x%04x)", pro), + PROTO_LEN(ap))); + + /* don't know know about the address formats */ + if (!ndo->ndo_vflag) { + goto out; + } } - if (pro == ETHERTYPE_TRAIL) - ND_PRINT((ndo, "trailer-")); + + /* print operation */ + printf("%s%s ", + ndo->ndo_vflag ? ", " : "", + tok2str(arpop_values, "Unknown (%u)", op)); + switch (op) { case ARPOP_REQUEST: - ND_PRINT((ndo, "arp who-has %s", ipaddr_string(TPA(ap)))); - if (memcmp((const char *)ezero, (const char *)THA(ap), HLN(ap)) != 0) + ND_PRINT((ndo, "who-has %s", ipaddr_string(TPA(ap)))); + if (memcmp((const char *)ezero, (const char *)THA(ap), HRD_LEN(ap)) != 0) ND_PRINT((ndo, " (%s)", - linkaddr_string(THA(ap), HLN(ap)))); + linkaddr_string(THA(ap), linkaddr, HRD_LEN(ap)))); ND_PRINT((ndo, " tell %s", ipaddr_string(SPA(ap)))); break; case ARPOP_REPLY: - ND_PRINT((ndo, "arp reply %s", ipaddr_string(SPA(ap)))); - ND_PRINT((ndo, " is-at %s", linkaddr_string(SHA(ap), HLN(ap)))); + ND_PRINT((ndo, "%s is-at %s", + ipaddr_string(SPA(ap)), + linkaddr_string(SHA(ap), linkaddr, HRD_LEN(ap)))); break; case ARPOP_REVREQUEST: - ND_PRINT((ndo, "rarp who-is %s tell %s", - linkaddr_string(THA(ap), HLN(ap)), - linkaddr_string(SHA(ap), HLN(ap)))); + ND_PRINT((ndo, "who-is %s tell %s", + linkaddr_string(THA(ap), linkaddr, HRD_LEN(ap)), + linkaddr_string(SHA(ap), linkaddr, HRD_LEN(ap)))); break; case ARPOP_REVREPLY: - ND_PRINT((ndo, "rarp reply %s at %s", - linkaddr_string(THA(ap), HLN(ap)), + ND_PRINT((ndo, "%s at %s", + linkaddr_string(THA(ap), linkaddr, HRD_LEN(ap)), ipaddr_string(TPA(ap)))); break; case ARPOP_INVREQUEST: - ND_PRINT((ndo, "invarp who-is %s tell %s", - linkaddr_string(THA(ap), HLN(ap)), - linkaddr_string(SHA(ap), HLN(ap)))); + ND_PRINT((ndo, "who-is %s tell %s", + linkaddr_string(THA(ap), linkaddr, HRD_LEN(ap)), + linkaddr_string(SHA(ap), linkaddr, HRD_LEN(ap)))); break; case ARPOP_INVREPLY: - ND_PRINT((ndo,"invarp reply %s at %s", - linkaddr_string(THA(ap), HLN(ap)), + ND_PRINT((ndo,"%s at %s", + linkaddr_string(THA(ap), linkaddr, HRD_LEN(ap)), ipaddr_string(TPA(ap)))); break; default: - ND_PRINT((ndo, "arp-#%d", op)); ND_DEFAULTPRINT((const u_char *)ap, caplen); return; } - if (hrd != ARPHRD_ETHER) - ND_PRINT((ndo, " hardware #%d", hrd)); + + out: + ND_PRINT((ndo, ", length %u", length)); + return; trunc: - ND_PRINT((ndo, "[|arp]")); + ND_PRINT((ndo, "[|ARP]")); } /* diff --git a/print-ascii.c b/print-ascii.c index cd48edd98d66..fa8793cb0641 100644 --- a/print-ascii.c +++ b/print-ascii.c @@ -42,7 +42,7 @@ #ifndef lint static const char rcsid[] _U_ = - "@(#) $Header: /tcpdump/master/tcpdump/print-ascii.c,v 1.16.2.1 2005/07/06 20:54:49 guy Exp $"; + "@(#) $Header: /tcpdump/master/tcpdump/print-ascii.c,v 1.17 2005-07-06 20:53:32 guy Exp $"; #endif #include #include diff --git a/print-atalk.c b/print-atalk.c index f1f45a3cb72d..6ea136116788 100644 --- a/print-atalk.c +++ b/print-atalk.c @@ -23,7 +23,7 @@ #ifndef lint static const char rcsid[] _U_ = - "@(#) $Header: /tcpdump/master/tcpdump/print-atalk.c,v 1.81 2004/05/01 09:41:50 hannes Exp $ (LBL)"; + "@(#) $Header: /tcpdump/master/tcpdump/print-atalk.c,v 1.81 2004-05-01 09:41:50 hannes Exp $ (LBL)"; #endif #ifdef HAVE_CONFIG_H diff --git a/print-atm.c b/print-atm.c index d664d6e5c310..f50918bfb289 100644 --- a/print-atm.c +++ b/print-atm.c @@ -20,7 +20,7 @@ */ #ifndef lint static const char rcsid[] _U_ = - "@(#) $Header: /tcpdump/master/tcpdump/print-atm.c,v 1.38.2.6 2006/01/25 13:27:24 hannes Exp $ (LBL)"; + "@(#) $Header: /tcpdump/master/tcpdump/print-atm.c,v 1.48.2.1 2007-10-22 19:39:12 guy Exp $ (LBL)"; #endif #ifdef HAVE_CONFIG_H @@ -43,25 +43,51 @@ static const char rcsid[] _U_ = #include "ether.h" +#define OAM_CRC10_MASK 0x3ff +#define OAM_PAYLOAD_LEN 48 +#define OAM_FUNCTION_SPECIFIC_LEN 45 /* this excludes crc10 and cell-type/function-type */ +#define OAM_CELLTYPE_FUNCTYPE_LEN 1 + struct tok oam_f_values[] = { - { OAMF4SC, "OAM F4 (segment)" }, - { OAMF4EC, "OAM F4 (end)" }, + { VCI_OAMF4SC, "OAM F4 (segment)" }, + { VCI_OAMF4EC, "OAM F4 (end)" }, { 0, NULL } }; +struct tok atm_pty_values[] = { + { 0x0, "user data, uncongested, SDU 0" }, + { 0x1, "user data, uncongested, SDU 1" }, + { 0x2, "user data, congested, SDU 0" }, + { 0x3, "user data, congested, SDU 1" }, + { 0x4, "VCC OAM F5 flow segment" }, + { 0x5, "VCC OAM F5 flow end-to-end" }, + { 0x6, "Traffic Control and resource Mgmt" }, + { 0, NULL } +}; + +#define OAM_CELLTYPE_FM 0x1 +#define OAM_CELLTYPE_PM 0x2 +#define OAM_CELLTYPE_AD 0x8 +#define OAM_CELLTYPE_SM 0xf + struct tok oam_celltype_values[] = { - { 0x1, "Fault Management" }, - { 0x2, "Performance Management" }, - { 0x8, "activate/deactivate" }, - { 0xf, "System Management" }, + { OAM_CELLTYPE_FM, "Fault Management" }, + { OAM_CELLTYPE_PM, "Performance Management" }, + { OAM_CELLTYPE_AD, "activate/deactivate" }, + { OAM_CELLTYPE_SM, "System Management" }, { 0, NULL } }; +#define OAM_FM_FUNCTYPE_AIS 0x0 +#define OAM_FM_FUNCTYPE_RDI 0x1 +#define OAM_FM_FUNCTYPE_CONTCHECK 0x4 +#define OAM_FM_FUNCTYPE_LOOPBACK 0x8 + struct tok oam_fm_functype_values[] = { - { 0x0, "AIS" }, - { 0x1, "RDI" }, - { 0x4, "Continuity Check" }, - { 0x8, "Loopback" }, + { OAM_FM_FUNCTYPE_AIS, "AIS" }, + { OAM_FM_FUNCTYPE_RDI, "RDI" }, + { OAM_FM_FUNCTYPE_CONTCHECK, "Continuity Check" }, + { OAM_FM_FUNCTYPE_LOOPBACK, "Loopback" }, { 0, NULL } }; @@ -78,6 +104,14 @@ struct tok oam_ad_functype_values[] = { { 0, NULL } }; +#define OAM_FM_LOOPBACK_INDICATOR_MASK 0x1 + +struct tok oam_fm_loopback_indicator_values[] = { + { 0x0, "Reply" }, + { 0x1, "Request" }, + { 0, NULL } +}; + static const struct tok *oam_functype_values[16] = { NULL, oam_fm_functype_values, /* 1 */ @@ -261,24 +295,24 @@ atm_print(u_int vpi, u_int vci, u_int traftype, const u_char *p, u_int length, if (vpi == 0) { switch (vci) { - case PPC: + case VCI_PPC: sig_print(p, caplen); return; - case BCC: + case VCI_BCC: printf("broadcast sig: "); return; - case OAMF4SC: /* fall through */ - case OAMF4EC: + case VCI_OAMF4SC: /* fall through */ + case VCI_OAMF4EC: oam_print(p, length, ATM_OAM_HEC); return; - case METAC: + case VCI_METAC: printf("meta: "); return; - case ILMIC: + case VCI_ILMIC: printf("ilmi: "); snmp_print(p, length); return; @@ -301,26 +335,53 @@ atm_print(u_int vpi, u_int vci, u_int traftype, const u_char *p, u_int length, } } +struct oam_fm_loopback_t { + u_int8_t loopback_indicator; + u_int8_t correlation_tag[4]; + u_int8_t loopback_id[12]; + u_int8_t source_id[12]; + u_int8_t unused[16]; +}; + +struct oam_fm_ais_rdi_t { + u_int8_t failure_type; + u_int8_t failure_location[16]; + u_int8_t unused[28]; +}; + int oam_print (const u_char *p, u_int length, u_int hec) { u_int32_t cell_header; - u_int16_t cell_type, func_type,vpi,vci,payload,clp; + u_int16_t vpi, vci, cksum, cksum_shouldbe, idx; + u_int8_t cell_type, func_type, payload, clp; + + union { + const struct oam_fm_loopback_t *oam_fm_loopback; + const struct oam_fm_ais_rdi_t *oam_fm_ais_rdi; + } oam_ptr; + cell_header = EXTRACT_32BITS(p+hec); - cell_type = ((*(p+4+hec))>>4) & 0x0f; - func_type = *(p+4+hec) & 0x0f; + cell_type = ((*(p+ATM_HDR_LEN_NOHEC+hec))>>4) & 0x0f; + func_type = (*(p+ATM_HDR_LEN_NOHEC+hec)) & 0x0f; vpi = (cell_header>>20)&0xff; vci = (cell_header>>4)&0xffff; payload = (cell_header>>1)&0x7; clp = cell_header&0x1; - printf("%s, vpi %u, vci %u, payload %u, clp %u, ", + printf("%s, vpi %u, vci %u, payload [ %s ], clp %u, length %u", tok2str(oam_f_values, "OAM F5", vci), - vpi, vci, payload, clp); + vpi, vci, + tok2str(atm_pty_values, "Unknown", payload), + clp, length); - printf("cell-type %s (%u)", + if (!vflag) { + return 1; + } + + printf("\n\tcell-type %s (%u)", tok2str(oam_celltype_values, "unknown", cell_type), cell_type); @@ -328,9 +389,61 @@ oam_print (const u_char *p, u_int length, u_int hec) { printf(", func-type unknown (%u)", func_type); else printf(", func-type %s (%u)", - bittok2str(oam_functype_values[cell_type],"none",func_type), + tok2str(oam_functype_values[cell_type],"none",func_type), func_type); - printf(", length %u",length); + p += ATM_HDR_LEN_NOHEC + hec; + + switch (cell_type << 4 | func_type) { + case (OAM_CELLTYPE_FM << 4 | OAM_FM_FUNCTYPE_LOOPBACK): + oam_ptr.oam_fm_loopback = (const struct oam_fm_loopback_t *)(p + OAM_CELLTYPE_FUNCTYPE_LEN); + printf("\n\tLoopback-Indicator %s, Correlation-Tag 0x%08x", + tok2str(oam_fm_loopback_indicator_values, + "Unknown", + oam_ptr.oam_fm_loopback->loopback_indicator & OAM_FM_LOOPBACK_INDICATOR_MASK), + EXTRACT_32BITS(&oam_ptr.oam_fm_loopback->correlation_tag)); + printf("\n\tLocation-ID "); + for (idx = 0; idx < sizeof(oam_ptr.oam_fm_loopback->loopback_id); idx++) { + if (idx % 2) { + printf("%04x ", EXTRACT_16BITS(&oam_ptr.oam_fm_loopback->loopback_id[idx])); + } + } + printf("\n\tSource-ID "); + for (idx = 0; idx < sizeof(oam_ptr.oam_fm_loopback->source_id); idx++) { + if (idx % 2) { + printf("%04x ", EXTRACT_16BITS(&oam_ptr.oam_fm_loopback->source_id[idx])); + } + } + break; + + case (OAM_CELLTYPE_FM << 4 | OAM_FM_FUNCTYPE_AIS): + case (OAM_CELLTYPE_FM << 4 | OAM_FM_FUNCTYPE_RDI): + oam_ptr.oam_fm_ais_rdi = (const struct oam_fm_ais_rdi_t *)(p + OAM_CELLTYPE_FUNCTYPE_LEN); + printf("\n\tFailure-type 0x%02x", oam_ptr.oam_fm_ais_rdi->failure_type); + printf("\n\tLocation-ID "); + for (idx = 0; idx < sizeof(oam_ptr.oam_fm_ais_rdi->failure_location); idx++) { + if (idx % 2) { + printf("%04x ", EXTRACT_16BITS(&oam_ptr.oam_fm_ais_rdi->failure_location[idx])); + } + } + break; + + case (OAM_CELLTYPE_FM << 4 | OAM_FM_FUNCTYPE_CONTCHECK): + /* FIXME */ + break; + + default: + break; + } + + /* crc10 checksum verification */ + cksum = EXTRACT_16BITS(p + OAM_CELLTYPE_FUNCTYPE_LEN + OAM_FUNCTION_SPECIFIC_LEN) + & OAM_CRC10_MASK; + cksum_shouldbe = verify_crc10_cksum(0, p, OAM_PAYLOAD_LEN); + + printf("\n\tcksum 0x%03x (%scorrect)", + cksum, + cksum_shouldbe == 0 ? "" : "in"); + return 1; } diff --git a/print-beep.c b/print-beep.c index db40d611245a..b476dbf96b61 100644 --- a/print-beep.c +++ b/print-beep.c @@ -11,7 +11,7 @@ #ifndef lint static const char rcsid[] _U_ = - "@(#) $Header: /tcpdump/master/tcpdump/print-beep.c,v 1.6 2003/11/16 09:36:13 guy Exp $"; + "@(#) $Header: /tcpdump/master/tcpdump/print-beep.c,v 1.6 2003-11-16 09:36:13 guy Exp $"; #endif #ifdef HAVE_CONFIG_H diff --git a/print-bfd.c b/print-bfd.c index 03e59dc4959f..6406168b1b5d 100644 --- a/print-bfd.c +++ b/print-bfd.c @@ -15,7 +15,7 @@ #ifndef lint static const char rcsid[] _U_ = - "@(#) $Header: /tcpdump/master/tcpdump/print-bfd.c,v 1.5.2.5 2006/02/02 06:36:37 hannes Exp $"; + "@(#) $Header: /tcpdump/master/tcpdump/print-bfd.c,v 1.10 2006-02-02 06:35:52 hannes Exp $"; #endif #ifdef HAVE_CONFIG_H diff --git a/print-bgp.c b/print-bgp.c index 34aa7985eca8..2dfdf52e0787 100644 --- a/print-bgp.c +++ b/print-bgp.c @@ -36,7 +36,7 @@ #ifndef lint static const char rcsid[] _U_ = - "@(#) $Header: /tcpdump/master/tcpdump/print-bgp.c,v 1.91.2.12 2007/07/14 22:26:35 guy Exp $"; + "@(#) $Header: /tcpdump/master/tcpdump/print-bgp.c,v 1.117.2.1 2007-12-08 10:08:07 hannes Exp $"; #endif #include @@ -49,8 +49,8 @@ static const char rcsid[] _U_ = #include "addrtoname.h" #include "extract.h" #include "bgp.h" -#include "l2vpn.h" #include "af.h" +#include "l2vpn.h" struct bgp { u_int8_t bgp_marker[16]; @@ -145,6 +145,9 @@ struct bgp_attr { #define BGPTYPE_MP_REACH_NLRI 14 /* RFC2283 */ #define BGPTYPE_MP_UNREACH_NLRI 15 /* RFC2283 */ #define BGPTYPE_EXTD_COMMUNITIES 16 /* draft-ietf-idr-bgp-ext-communities */ +#define BGPTYPE_AS4_PATH 17 /* RFC4893 */ +#define BGPTYPE_AGGREGATOR4 18 /* RFC4893 */ +#define BGPTYPE_PMSI_TUNNEL 22 /* draft-ietf-l3vpn-2547bis-mcast-bgp-02.txt */ #define BGPTYPE_ATTR_SET 128 /* draft-marques-ppvpn-ibgp */ #define BGP_MP_NLRI_MINSIZE 3 /* End of RIB Marker detection */ @@ -152,11 +155,13 @@ struct bgp_attr { static struct tok bgp_attr_values[] = { { BGPTYPE_ORIGIN, "Origin"}, { BGPTYPE_AS_PATH, "AS Path"}, + { BGPTYPE_AS4_PATH, "AS4 Path"}, { BGPTYPE_NEXT_HOP, "Next Hop"}, { BGPTYPE_MULTI_EXIT_DISC, "Multi Exit Discriminator"}, { BGPTYPE_LOCAL_PREF, "Local Preference"}, { BGPTYPE_ATOMIC_AGGREGATE, "Atomic Aggregate"}, { BGPTYPE_AGGREGATOR, "Aggregator"}, + { BGPTYPE_AGGREGATOR4, "Aggregator4"}, { BGPTYPE_COMMUNITIES, "Community"}, { BGPTYPE_ORIGINATOR_ID, "Originator ID"}, { BGPTYPE_CLUSTER_LIST, "Cluster List"}, @@ -166,6 +171,7 @@ static struct tok bgp_attr_values[] = { { BGPTYPE_MP_REACH_NLRI, "Multi-Protocol Reach NLRI"}, { BGPTYPE_MP_UNREACH_NLRI, "Multi-Protocol Unreach NLRI"}, { BGPTYPE_EXTD_COMMUNITIES, "Extended Community"}, + { BGPTYPE_PMSI_TUNNEL, "PMSI Tunnel"}, { BGPTYPE_ATTR_SET, "Attribute Set"}, { 255, "Reserved for development"}, { 0, NULL} @@ -176,6 +182,9 @@ static struct tok bgp_attr_values[] = { #define BGP_CONFED_AS_SEQUENCE 3 /* draft-ietf-idr-rfc3065bis-01 */ #define BGP_CONFED_AS_SET 4 /* draft-ietf-idr-rfc3065bis-01 */ +#define BGP_AS_SEG_TYPE_MIN BGP_AS_SET +#define BGP_AS_SEG_TYPE_MAX BGP_CONFED_AS_SET + static struct tok bgp_as_path_segment_open_values[] = { { BGP_AS_SEQUENCE, ""}, { BGP_AS_SET, "{ "}, @@ -267,6 +276,7 @@ static struct tok bgp_notify_minor_open_values[] = { { 4, "Unsupported Optional Parameter"}, { 5, "Authentication Failure"}, { 6, "Unacceptable Hold Time"}, + { 7, "Capability Message Error"}, { 0, NULL} }; @@ -300,6 +310,31 @@ static struct tok bgp_origin_values[] = { { 0, NULL} }; +#define BGP_PMSI_TUNNEL_RSVP_P2MP 1 +#define BGP_PMSI_TUNNEL_LDP_P2MP 2 +#define BGP_PMSI_TUNNEL_PIM_SSM 3 +#define BGP_PMSI_TUNNEL_PIM_SM 4 +#define BGP_PMSI_TUNNEL_PIM_BIDIR 5 +#define BGP_PMSI_TUNNEL_INGRESS 6 +#define BGP_PMSI_TUNNEL_LDP_MP2MP 7 + +static struct tok bgp_pmsi_tunnel_values[] = { + { BGP_PMSI_TUNNEL_RSVP_P2MP, "RSVP-TE P2MP LSP"}, + { BGP_PMSI_TUNNEL_LDP_P2MP, "LDP P2MP LSP"}, + { BGP_PMSI_TUNNEL_PIM_SSM, "PIM-SSM Tree"}, + { BGP_PMSI_TUNNEL_PIM_SM, "PIM-SM Tree"}, + { BGP_PMSI_TUNNEL_PIM_BIDIR, "PIM-Bidir Tree"}, + { BGP_PMSI_TUNNEL_INGRESS, "Ingress Replication"}, + { BGP_PMSI_TUNNEL_LDP_MP2MP, "LDP MP2MP LSP"}, + { 0, NULL} +}; + +static struct tok bgp_pmsi_flag_values[] = { + { 0x01, "Leaf Information required"}, + { 0, NULL} +}; + + /* Subsequent address family identifier, RFC2283 section 7 */ #define SAFNUM_RES 0 #define SAFNUM_UNICAST 1 @@ -307,6 +342,8 @@ static struct tok bgp_origin_values[] = { #define SAFNUM_UNIMULTICAST 3 /* labeled BGP RFC3107 */ #define SAFNUM_LABUNICAST 4 +/* draft-ietf-l3vpn-2547bis-mcast-bgp-02.txt */ +#define SAFNUM_MULTICAST_VPN 5 #define SAFNUM_TUNNEL 64 /* XXX */ #define SAFNUM_VPLS 65 /* XXX */ #define SAFNUM_MDT 66 /* XXX */ @@ -331,7 +368,8 @@ static struct tok bgp_safi_values[] = { { SAFNUM_VPNUNICAST, "labeled VPN Unicast"}, { SAFNUM_VPNMULTICAST, "labeled VPN Multicast"}, { SAFNUM_VPNUNIMULTICAST, "labeled VPN Unicast+Multicast"}, - { SAFNUM_RT_ROUTING_INFO, "Route Target Routing Information"}, /* draft-marques-ppvpn-rt-constrain-01.txt */ + { SAFNUM_RT_ROUTING_INFO, "Route Target Routing Information"}, + { SAFNUM_MULTICAST_VPN, "Multicast VPN"}, { 0, NULL } }; @@ -349,8 +387,6 @@ static struct tok bgp_safi_values[] = { #define BGP_EXT_COM_RO_2 0x0203 /* Route Origin,Format AN(4bytes):local(2bytes) */ #define BGP_EXT_COM_LINKBAND 0x4004 /* Link Bandwidth,Format AS(2B):Bandwidth(4B) */ /* rfc2547 bgp-mpls-vpns */ -#define BGP_EXT_COM_CISCO_MCAST 0x0009 /* cisco proprietary */ - #define BGP_EXT_COM_VPN_ORIGIN 0x0005 /* OSPF Domain ID / VPN of Origin - draft-rosen-vpns-ospf-bgp-mpls */ #define BGP_EXT_COM_VPN_ORIGIN2 0x0105 /* duplicate - keep for backwards compatability */ #define BGP_EXT_COM_VPN_ORIGIN3 0x0205 /* duplicate - keep for backwards compatability */ @@ -364,6 +400,9 @@ static struct tok bgp_safi_values[] = { #define BGP_EXT_COM_L2INFO 0x800a /* draft-kompella-ppvpn-l2vpn */ +#define BGP_EXT_COM_SOURCE_AS 0x0009 /* draft-ietf-l3vpn-2547bis-mcast-bgp-02.txt */ +#define BGP_EXT_COM_VRF_RT_IMP 0x010a /* draft-ietf-l3vpn-2547bis-mcast-bgp-02.txt */ + /* 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 @@ -386,7 +425,6 @@ static struct tok bgp_extd_comm_subtype_values[] = { { BGP_EXT_COM_RO_1, "origin"}, { BGP_EXT_COM_RO_2, "origin"}, { BGP_EXT_COM_LINKBAND, "link-BW"}, - { BGP_EXT_COM_CISCO_MCAST, "mdt-group"}, { BGP_EXT_COM_VPN_ORIGIN, "ospf-domain"}, { BGP_EXT_COM_VPN_ORIGIN2, "ospf-domain"}, { BGP_EXT_COM_VPN_ORIGIN3, "ospf-domain"}, @@ -402,6 +440,8 @@ static struct tok bgp_extd_comm_subtype_values[] = { { 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)" }, + { BGP_EXT_COM_SOURCE_AS, "source-AS" }, + { BGP_EXT_COM_VRF_RT_IMP, "vrf-route-import"}, { 0, NULL}, }; @@ -494,6 +534,99 @@ decode_labeled_prefix4(const u_char *pptr, char *buf, u_int buflen) return -2; } +/* + * bgp_vpn_ip_print + * + * print an ipv4 or ipv6 address into a buffer dependend on address length. + */ +static char * +bgp_vpn_ip_print (const u_char *pptr, u_int addr_length) { + + /* worst case string is s fully formatted v6 address */ + static char addr[sizeof("1234:5678:89ab:cdef:1234:5678:89ab:cdef")]; + char *pos = addr; + + switch(addr_length) { + case (sizeof(struct in_addr) << 3): /* 32 */ + TCHECK2(pptr[0], sizeof(struct in_addr)); + snprintf(pos, sizeof(addr), "%s", ipaddr_string(pptr)); + break; +#ifdef INET6 + case (sizeof(struct in6_addr) << 3): /* 128 */ + TCHECK2(pptr[0], sizeof(struct in6_addr)); + snprintf(pos, sizeof(addr), "%s", ip6addr_string(pptr)); + break; +#endif + default: + snprintf(pos, sizeof(addr), "bogus address length %u", addr_length); + break; + } + pos += strlen(pos); + +trunc: + *(pos) = '\0'; + return (addr); +} + +/* + * bgp_vpn_sg_print + * + * print an multicast s,g entry into a buffer. + * the s,g entry is encoded like this. + * + * +-----------------------------------+ + * | Multicast Source Length (1 octet) | + * +-----------------------------------+ + * | Multicast Source (Variable) | + * +-----------------------------------+ + * | Multicast Group Length (1 octet) | + * +-----------------------------------+ + * | Multicast Group (Variable) | + * +-----------------------------------+ + * + * return the number of bytes read from the wire. + */ +static int +bgp_vpn_sg_print (const u_char *pptr, char *buf, u_int buflen) { + + u_int8_t addr_length; + u_int total_length, offset; + + total_length = 0; + + /* Source address length, encoded in bits */ + TCHECK2(pptr[0], 1); + addr_length = *pptr++; + + /* Source address */ + TCHECK2(pptr[0], (addr_length >> 3)); + total_length += (addr_length >> 3) + 1; + offset = strlen(buf); + if (addr_length) { + snprintf(buf + offset, buflen - offset, ", Source %s", + bgp_vpn_ip_print(pptr, addr_length)); + pptr += (addr_length >> 3); + } + + /* Group address length, encoded in bits */ + TCHECK2(pptr[0], 1); + addr_length = *pptr++; + + /* Group address */ + TCHECK2(pptr[0], (addr_length >> 3)); + total_length += (addr_length >> 3) + 1; + offset = strlen(buf); + if (addr_length) { + snprintf(buf + offset, buflen - offset, ", Group %s", + bgp_vpn_ip_print(pptr, addr_length)); + pptr += (addr_length >> 3); + } + +trunc: + return (total_length); +} + + /* RDs and RTs share the same semantics * we use bgp_vpn_rd_print for * printing route targets inside a NLRI */ @@ -507,10 +640,12 @@ bgp_vpn_rd_print (const u_char *pptr) { /* ok lets load the RD format */ switch (EXTRACT_16BITS(pptr)) { - /* AS:IP-address fmt*/ + /* 2-byte-AS:number fmt*/ case 0: - snprintf(pos, sizeof(rd) - (pos - rd), "%u:%u.%u.%u.%u", - EXTRACT_16BITS(pptr+2), *(pptr+4), *(pptr+5), *(pptr+6), *(pptr+7)); + snprintf(pos, sizeof(rd) - (pos - rd), "%u:%u (= %u.%u.%u.%u)", + EXTRACT_16BITS(pptr+2), + EXTRACT_32BITS(pptr+4), + *(pptr+4), *(pptr+5), *(pptr+6), *(pptr+7)); break; /* IP-address:AS fmt*/ @@ -609,6 +744,108 @@ decode_labeled_vpn_prefix4(const u_char *pptr, char *buf, u_int buflen) return -2; } +#define BGP_MULTICAST_VPN_ROUTE_TYPE_INTRA_AS_I_PMSI 1 +#define BGP_MULTICAST_VPN_ROUTE_TYPE_INTER_AS_I_PMSI 2 +#define BGP_MULTICAST_VPN_ROUTE_TYPE_S_PMSI 3 +#define BGP_MULTICAST_VPN_ROUTE_TYPE_INTRA_AS_SEG_LEAF 4 +#define BGP_MULTICAST_VPN_ROUTE_TYPE_SOURCE_ACTIVE 5 +#define BGP_MULTICAST_VPN_ROUTE_TYPE_SHARED_TREE_JOIN 6 +#define BGP_MULTICAST_VPN_ROUTE_TYPE_SOURCE_TREE_JOIN 7 + +static struct tok bgp_multicast_vpn_route_type_values[] = { + { BGP_MULTICAST_VPN_ROUTE_TYPE_INTRA_AS_I_PMSI, "Intra-AS I-PMSI"}, + { BGP_MULTICAST_VPN_ROUTE_TYPE_INTER_AS_I_PMSI, "Inter-AS I-PMSI"}, + { BGP_MULTICAST_VPN_ROUTE_TYPE_S_PMSI, "S-PMSI"}, + { BGP_MULTICAST_VPN_ROUTE_TYPE_INTRA_AS_SEG_LEAF, "Intra-AS Segment-Leaf"}, + { BGP_MULTICAST_VPN_ROUTE_TYPE_SOURCE_ACTIVE, "Source-Active"}, + { BGP_MULTICAST_VPN_ROUTE_TYPE_SHARED_TREE_JOIN, "Shared Tree Join"}, + { BGP_MULTICAST_VPN_ROUTE_TYPE_SOURCE_TREE_JOIN, "Source Tree Join"}, +}; + +static int +decode_multicast_vpn(const u_char *pptr, char *buf, u_int buflen) +{ + u_int8_t route_type, route_length, addr_length, sg_length; + u_int offset; + + TCHECK2(pptr[0], 2); + route_type = *pptr++; + route_length = *pptr++; + + snprintf(buf, buflen, "Route-Type: %s (%u), length: %u", + tok2str(bgp_multicast_vpn_route_type_values, + "Unknown", route_type), + route_type, route_length); + + switch(route_type) { + case BGP_MULTICAST_VPN_ROUTE_TYPE_INTRA_AS_I_PMSI: + TCHECK2(pptr[0], BGP_VPN_RD_LEN); + offset = strlen(buf); + snprintf(buf + offset, buflen - offset, ", RD: %s, Originator %s", + bgp_vpn_rd_print(pptr), + bgp_vpn_ip_print(pptr + BGP_VPN_RD_LEN, + (route_length - BGP_VPN_RD_LEN) << 3)); + break; + case BGP_MULTICAST_VPN_ROUTE_TYPE_INTER_AS_I_PMSI: + TCHECK2(pptr[0], BGP_VPN_RD_LEN + 4); + offset = strlen(buf); + snprintf(buf + offset, buflen - offset, ", RD: %s, Source-AS %u", + bgp_vpn_rd_print(pptr), + EXTRACT_32BITS(pptr + BGP_VPN_RD_LEN)); + break; + + case BGP_MULTICAST_VPN_ROUTE_TYPE_S_PMSI: + TCHECK2(pptr[0], BGP_VPN_RD_LEN); + offset = strlen(buf); + snprintf(buf + offset, buflen - offset, ", RD: %s", + bgp_vpn_rd_print(pptr)); + pptr += BGP_VPN_RD_LEN; + + sg_length = bgp_vpn_sg_print(pptr, buf, buflen); + addr_length = route_length - sg_length; + + TCHECK2(pptr[0], addr_length); + offset = strlen(buf); + snprintf(buf + offset, buflen - offset, ", Originator %s", + bgp_vpn_ip_print(pptr, addr_length << 3)); + break; + + case BGP_MULTICAST_VPN_ROUTE_TYPE_SOURCE_ACTIVE: + TCHECK2(pptr[0], BGP_VPN_RD_LEN); + offset = strlen(buf); + snprintf(buf + offset, buflen - offset, ", RD: %s", + bgp_vpn_rd_print(pptr)); + pptr += BGP_VPN_RD_LEN; + + bgp_vpn_sg_print(pptr, buf, buflen); + break; + + case BGP_MULTICAST_VPN_ROUTE_TYPE_SHARED_TREE_JOIN: /* fall through */ + case BGP_MULTICAST_VPN_ROUTE_TYPE_SOURCE_TREE_JOIN: + TCHECK2(pptr[0], BGP_VPN_RD_LEN); + offset = strlen(buf); + snprintf(buf + offset, buflen - offset, ", RD: %s, Source-AS %u", + bgp_vpn_rd_print(pptr), + EXTRACT_32BITS(pptr + BGP_VPN_RD_LEN)); + pptr += BGP_VPN_RD_LEN; + + bgp_vpn_sg_print(pptr, buf, buflen); + break; + + /* + * no per route-type printing yet. + */ + case BGP_MULTICAST_VPN_ROUTE_TYPE_INTRA_AS_SEG_LEAF: + default: + break; + } + + return route_length + 2; + +trunc: + return -2; +} + /* * As I remember, some versions of systems have an snprintf() that * returns -1 if the buffer would have overflowed. If the return @@ -863,6 +1100,63 @@ decode_labeled_vpn_clnp_prefix(const u_char *pptr, char *buf, u_int buflen) return -2; } +/* + * bgp_attr_get_as_size + * + * Try to find the size of the ASs encoded in an as-path. It is not obvious, as + * both Old speakers that do not support 4 byte AS, and the new speakers that do + * support, exchange AS-Path with the same path-attribute type value 0x02. + */ +static int +bgp_attr_get_as_size (u_int8_t bgpa_type, const u_char *pptr, int len) +{ + const u_char *tptr = pptr; + + /* + * If the path attribute is the optional AS4 path type, then we already + * know, that ASs must be encoded in 4 byte format. + */ + if (bgpa_type == BGPTYPE_AS4_PATH) { + return 4; + } + + /* + * Let us assume that ASs are of 2 bytes in size, and check if the AS-Path + * TLV is good. If not, ask the caller to try with AS encoded as 4 bytes + * each. + */ + while (tptr < pptr + len) { + TCHECK(tptr[0]); + + /* + * If we do not find a valid segment type, our guess might be wrong. + */ + if (tptr[0] < BGP_AS_SEG_TYPE_MIN || tptr[0] > BGP_AS_SEG_TYPE_MAX) { + goto trunc; + } + TCHECK(tptr[1]); + tptr += 2 + tptr[1] * 2; + } + + /* + * If we correctly reached end of the AS path attribute data content, + * then most likely ASs were indeed encoded as 2 bytes. + */ + if (tptr == pptr + len) { + return 2; + } + +trunc: + + /* + * We can come here, either we did not have enough data, or if we + * try to decode 4 byte ASs in 2 byte format. Either way, return 4, + * so that calller can try to decode each AS as of 4 bytes. If indeed + * there was not enough data, it will crib and end the parse anyways. + */ + return 4; +} + static int bgp_attr_print(const struct bgp_attr *attr, const u_char *pptr, int len) { @@ -878,6 +1172,7 @@ bgp_attr_print(const struct bgp_attr *attr, const u_char *pptr, int len) const u_char *tptr; char buf[MAXHOSTNAMELEN + 100]; char tokbuf[TOKBUFSIZE]; + int as_size; tptr = pptr; tlen=len; @@ -895,6 +1190,11 @@ bgp_attr_print(const struct bgp_attr *attr, const u_char *pptr, int len) } break; + + /* + * Process AS4 byte path and AS2 byte path attributes here. + */ + case BGPTYPE_AS4_PATH: case BGPTYPE_AS_PATH: if (len % 2) { printf("invalid len"); @@ -905,21 +1205,33 @@ bgp_attr_print(const struct bgp_attr *attr, const u_char *pptr, int len) break; } + /* + * BGP updates exchanged between New speakers that support 4 + * byte AS, ASs are always encoded in 4 bytes. There is no + * definitive way to find this, just by the packet's + * contents. So, check for packet's TLV's sanity assuming + * 2 bytes first, and it does not pass, assume that ASs are + * encoded in 4 bytes format and move on. + */ + as_size = bgp_attr_get_as_size(attr->bgpa_type, pptr, len); + while (tptr < pptr + len) { TCHECK(tptr[0]); printf("%s", tok2strbuf(bgp_as_path_segment_open_values, "?", tptr[0], tokbuf, sizeof(tokbuf))); - for (i = 0; i < tptr[1] * 2; i += 2) { - TCHECK2(tptr[2 + i], 2); - printf("%u ", EXTRACT_16BITS(&tptr[2 + i])); + for (i = 0; i < tptr[1] * as_size; i += as_size) { + TCHECK2(tptr[2 + i], as_size); + printf("%u ", + as_size == 2 ? EXTRACT_16BITS(&tptr[2 + i]) : + EXTRACT_32BITS(&tptr[2 + i])); } TCHECK(tptr[0]); printf("%s", tok2strbuf(bgp_as_path_segment_close_values, "?", tptr[0], tokbuf, sizeof(tokbuf))); TCHECK(tptr[1]); - tptr += 2 + tptr[1] * 2; + tptr += 2 + tptr[1] * as_size; } break; case BGPTYPE_NEXT_HOP: @@ -952,6 +1264,15 @@ bgp_attr_print(const struct bgp_attr *attr, const u_char *pptr, int len) printf(" AS #%u, origin %s", EXTRACT_16BITS(tptr), getname(tptr + 2)); break; + case BGPTYPE_AGGREGATOR4: + if (len != 8) { + printf("invalid len"); + break; + } + TCHECK2(tptr[0], 8); + printf(" AS #%u, origin %s", EXTRACT_32BITS(tptr), + getname(tptr + 4)); + break; case BGPTYPE_COMMUNITIES: if (len % 4) { printf("invalid len"); @@ -1027,12 +1348,12 @@ bgp_attr_print(const struct bgp_attr *attr, const u_char *pptr, int len) case (AFNUM_INET<<8 | SAFNUM_VPNUNICAST): case (AFNUM_INET<<8 | SAFNUM_VPNMULTICAST): case (AFNUM_INET<<8 | SAFNUM_VPNUNIMULTICAST): + case (AFNUM_INET<<8 | SAFNUM_MULTICAST_VPN): #ifdef INET6 case (AFNUM_INET6<<8 | SAFNUM_UNICAST): case (AFNUM_INET6<<8 | SAFNUM_MULTICAST): case (AFNUM_INET6<<8 | SAFNUM_UNIMULTICAST): case (AFNUM_INET6<<8 | SAFNUM_LABUNICAST): - case (AFNUM_INET6<<8 | SAFNUM_RT_ROUTING_INFO): case (AFNUM_INET6<<8 | SAFNUM_VPNUNICAST): case (AFNUM_INET6<<8 | SAFNUM_VPNMULTICAST): case (AFNUM_INET6<<8 | SAFNUM_VPNUNIMULTICAST): @@ -1073,6 +1394,7 @@ bgp_attr_print(const struct bgp_attr *attr, const u_char *pptr, int len) case (AFNUM_INET<<8 | SAFNUM_UNIMULTICAST): case (AFNUM_INET<<8 | SAFNUM_LABUNICAST): case (AFNUM_INET<<8 | SAFNUM_RT_ROUTING_INFO): + case (AFNUM_INET<<8 | SAFNUM_MULTICAST_VPN): if (tlen < (int)sizeof(struct in_addr)) { printf("invalid len"); tlen = 0; @@ -1103,7 +1425,6 @@ bgp_attr_print(const struct bgp_attr *attr, const u_char *pptr, int len) case (AFNUM_INET6<<8 | SAFNUM_MULTICAST): case (AFNUM_INET6<<8 | SAFNUM_UNIMULTICAST): case (AFNUM_INET6<<8 | SAFNUM_LABUNICAST): - case (AFNUM_INET6<<8 | SAFNUM_RT_ROUTING_INFO): if (tlen < (int)sizeof(struct in6_addr)) { printf("invalid len"); tlen = 0; @@ -1248,6 +1569,16 @@ bgp_attr_print(const struct bgp_attr *attr, const u_char *pptr, int len) else printf("\n\t %s", buf); break; + case (AFNUM_INET<<8 | SAFNUM_MULTICAST_VPN): /* fall through */ + case (AFNUM_INET6<<8 | SAFNUM_MULTICAST_VPN): + advance = decode_multicast_vpn(tptr, buf, sizeof(buf)); + if (advance == -1) + printf("\n\t (illegal prefix length)"); + else if (advance == -2) + goto trunc; + else + printf("\n\t %s", buf); + break; #ifdef INET6 case (AFNUM_INET6<<8 | SAFNUM_UNICAST): case (AFNUM_INET6<<8 | SAFNUM_MULTICAST): @@ -1280,15 +1611,6 @@ bgp_attr_print(const struct bgp_attr *attr, const u_char *pptr, int len) else printf("\n\t %s", buf); break; - case (AFNUM_INET6<<8 | SAFNUM_RT_ROUTING_INFO): - advance = decode_rt_routing_info(tptr, buf, sizeof(buf)); - if (advance == -1) - printf("\n\t (illegal prefix length)"); - else if (advance == -2) - goto trunc; - else - printf("\n\t %s", buf); - break; #endif case (AFNUM_VPLS<<8 | SAFNUM_VPLS): case (AFNUM_L2VPN<<8 | SAFNUM_VPNUNICAST): @@ -1459,6 +1781,16 @@ bgp_attr_print(const struct bgp_attr *attr, const u_char *pptr, int len) else printf("\n\t %s", buf); break; + case (AFNUM_INET<<8 | SAFNUM_MULTICAST_VPN): /* fall through */ + case (AFNUM_INET6<<8 | SAFNUM_MULTICAST_VPN): + advance = decode_multicast_vpn(tptr, buf, sizeof(buf)); + if (advance == -1) + printf("\n\t (illegal prefix length)"); + else if (advance == -2) + goto trunc; + else + printf("\n\t %s", buf); + break; default: TCHECK2(*(tptr-3),tlen); printf("no AFI %u / SAFI %u decoder",af,safi); @@ -1495,12 +1827,14 @@ bgp_attr_print(const struct bgp_attr *attr, const u_char *pptr, int len) switch(extd_comm) { case BGP_EXT_COM_RT_0: case BGP_EXT_COM_RO_0: - printf(": %u:%s", + printf(": %u:%u (= %s)", EXTRACT_16BITS(tptr+2), + EXTRACT_32BITS(tptr+4), getname(tptr+4)); break; case BGP_EXT_COM_RT_1: case BGP_EXT_COM_RO_1: + case BGP_EXT_COM_VRF_RT_IMP: printf(": %s:%u", getname(tptr+2), EXTRACT_16BITS(tptr+6)); @@ -1516,11 +1850,6 @@ bgp_attr_print(const struct bgp_attr *attr, const u_char *pptr, int len) printf(": bandwidth: %.3f Mbps", bw.f*8/1000000); break; - case BGP_EXT_COM_CISCO_MCAST: - printf(": AS %u, group %s", - EXTRACT_16BITS(tptr+2), - getname(tptr+4)); - break; case BGP_EXT_COM_VPN_ORIGIN: case BGP_EXT_COM_VPN_ORIGIN2: case BGP_EXT_COM_VPN_ORIGIN3: @@ -1549,6 +1878,9 @@ bgp_attr_print(const struct bgp_attr *attr, const u_char *pptr, int len) *(tptr+3), EXTRACT_16BITS(tptr+4)); break; + case BGP_EXT_COM_SOURCE_AS: + printf(": AS %u", EXTRACT_16BITS(tptr+2)); + break; default: TCHECK2(*tptr,8); print_unknown_data(tptr,"\n\t ",8); @@ -1559,6 +1891,64 @@ bgp_attr_print(const struct bgp_attr *attr, const u_char *pptr, int len) } break; + case BGPTYPE_PMSI_TUNNEL: + { + u_int8_t tunnel_type, flags; + + tunnel_type = *(tptr+1); + flags = *tptr; + tlen = len; + + TCHECK2(tptr[0], 5); + printf("\n\t Tunnel-type %s (%u), Flags [%s], MPLS Label %u", + tok2str(bgp_pmsi_tunnel_values, "Unknown", tunnel_type), + tunnel_type, + bittok2str(bgp_pmsi_flag_values, "none", flags), + EXTRACT_24BITS(tptr+2)>>4); + + tptr +=5; + tlen -= 5; + + switch (tunnel_type) { + case BGP_PMSI_TUNNEL_PIM_SM: /* fall through */ + case BGP_PMSI_TUNNEL_PIM_BIDIR: + TCHECK2(tptr[0], 8); + printf("\n\t Sender %s, P-Group %s", + ipaddr_string(tptr), + ipaddr_string(tptr+4)); + break; + + case BGP_PMSI_TUNNEL_PIM_SSM: + TCHECK2(tptr[0], 8); + printf("\n\t Root-Node %s, P-Group %s", + ipaddr_string(tptr), + ipaddr_string(tptr+4)); + break; + case BGP_PMSI_TUNNEL_INGRESS: + TCHECK2(tptr[0], 4); + printf("\n\t Tunnel-Endpoint %s", + ipaddr_string(tptr)); + break; + case BGP_PMSI_TUNNEL_LDP_P2MP: /* fall through */ + case BGP_PMSI_TUNNEL_LDP_MP2MP: + TCHECK2(tptr[0], 8); + printf("\n\t Root-Node %s, LSP-ID 0x%08x", + ipaddr_string(tptr), + EXTRACT_32BITS(tptr+4)); + break; + case BGP_PMSI_TUNNEL_RSVP_P2MP: + TCHECK2(tptr[0], 8); + printf("\n\t Extended-Tunnel-ID %s, P2MP-ID 0x%08x", + ipaddr_string(tptr), + EXTRACT_32BITS(tptr+4)); + break; + default: + if (vflag <= 1) { + print_unknown_data(tptr,"\n\t ",tlen); + } + } + break; + } case BGPTYPE_ATTR_SET: TCHECK2(tptr[0], 4); printf("\n\t Origin AS: %u", EXTRACT_32BITS(tptr)); @@ -2077,3 +2467,10 @@ bgp_print(const u_char *dat, int length) trunc: printf(" [|BGP]"); } + +/* + * Local Variables: + * c-style: whitesmith + * c-basic-offset: 4 + * End: + */ diff --git a/print-bootp.c b/print-bootp.c index e2086e44ea01..b442c18388a7 100644 --- a/print-bootp.c +++ b/print-bootp.c @@ -22,7 +22,7 @@ */ #ifndef lint static const char rcsid[] _U_ = - "@(#) $Header: /tcpdump/master/tcpdump/print-bootp.c,v 1.78.2.9 2007/08/21 22:02:08 guy Exp $ (LBL)"; + "@(#) $Header: /tcpdump/master/tcpdump/print-bootp.c,v 1.88 2007-09-20 15:04:45 hannes Exp $ (LBL)"; #endif #ifdef HAVE_CONFIG_H @@ -352,9 +352,13 @@ static struct tok dhcp_msg_values[] = { { 0, NULL } }; -#define AGENT_SUBOPTION_CIRCUIT_ID 1 +#define AGENT_SUBOPTION_CIRCUIT_ID 1 /* RFC 3046 */ +#define AGENT_SUBOPTION_REMOTE_ID 2 /* RFC 3046 */ +#define AGENT_SUBOPTION_SUBSCRIBER_ID 6 /* RFC 3993 */ static struct tok agent_suboption_values[] = { { AGENT_SUBOPTION_CIRCUIT_ID, "Circuit-ID" }, + { AGENT_SUBOPTION_REMOTE_ID, "Remote-ID" }, + { AGENT_SUBOPTION_SUBSCRIBER_ID, "Subscriber-ID" }, { 0, NULL } }; @@ -686,9 +690,11 @@ rfc1048_print(register const u_char *bp) suboptlen); switch (subopt) { - case AGENT_SUBOPTION_CIRCUIT_ID: - fn_printn(bp, suboptlen, NULL); - break; + case AGENT_SUBOPTION_CIRCUIT_ID: /* fall through */ + case AGENT_SUBOPTION_REMOTE_ID: + case AGENT_SUBOPTION_SUBSCRIBER_ID: + fn_printn(bp, suboptlen, NULL); + break; default: print_unknown_data(bp, "\n\t\t", suboptlen); diff --git a/print-bt.c b/print-bt.c new file mode 100644 index 000000000000..498440cde333 --- /dev/null +++ b/print-bt.c @@ -0,0 +1,78 @@ +/* + * Copyright (c) 2007 + * paolo.abeni@email.it All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that: (1) source code distributions + * retain the above copyright notice and this paragraph in its entirety, (2) + * distributions including binary code include the above copyright notice and + * this paragraph in its entirety in the documentation or other materials + * provided with the distribution, and (3) all advertising materials mentioning + * features or use of this software display the following acknowledgement: + * ``This product includes software developed by Paolo Abeni.'' + * The name of author may not be used to endorse or promote products derived + * from this software without specific prior written permission. + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + */ + +#ifndef lint +static const char rcsid[] _U_ = + "@(#) $Header: /tcpdump/master/tcpdump/print-bt.c,v 1.1.2.1 2008-09-25 21:50:04 guy Exp $"; +#endif + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include + +#include +#include +#include + +#include "interface.h" +#include "addrtoname.h" + +#if defined(DLT_BLUETOOTH_HCI_H4_WITH_PHDR) && defined(HAVE_PCAP_BLUETOOTH_H) +#include + +#define BT_HDRLEN sizeof(pcap_bluetooth_h4_header) +/* + * This is the top level routine of the printer. 'p' points + * to the bluetooth header of the packet, 'h->ts' is the timestamp, + * 'h->len' is the length of the packet off the wire, and 'h->caplen' + * is the number of bytes actually captured. + */ +u_int +bt_if_print(const struct pcap_pkthdr *h, const u_char *p) +{ + u_int length = h->len; + u_int caplen = h->caplen; + const pcap_bluetooth_h4_header* hdr = (const pcap_bluetooth_h4_header*)p; + + if (caplen < BT_HDRLEN) { + printf("[|bt]"); + return (BT_HDRLEN); + } + caplen -= BT_HDRLEN; + length -= BT_HDRLEN; + p += BT_HDRLEN; + if (eflag) + (void)printf("hci length %d, direction %s, ", length, (ntohl(hdr->direction)&0x1)?"in":"out"); + + if (!suppress_default_print) + default_print(p, caplen); + + return (BT_HDRLEN); +} +#endif + + +/* + * Local Variables: + * c-style: whitesmith + * c-basic-offset: 8 + * End: + */ diff --git a/print-bxxp.c b/print-bxxp.c deleted file mode 100644 index 56be54fc17f9..000000000000 --- a/print-bxxp.c +++ /dev/null @@ -1,82 +0,0 @@ -/* - * Copyright (C) 2000, Richard Sharpe - * - * This software may be distributed either under the terms of the - * BSD-style licence that accompanies tcpdump or under the GNU GPL - * version 2 or later. - * - * print-bxxp.c - * - */ - -#ifndef lint -static const char rcsid[] = - "@(#) $Header: /tcpdump/master/tcpdump/print-bxxp.c,v 1.3 2000/10/05 04:10:01 itojun Exp $"; -#endif - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include -#include - -#ifdef HAVE_MEMORY_H -#include -#endif -#include -#include -#include -#include - -#include "interface.h" -#include "extract.h" - -/* Check for a string but not go beyond length - * Return TRUE on match, FALSE otherwise - * - * Looks at the first few chars up to tl1 ... - */ - -int l_strnstart(const u_char *, u_int, const u_char *, u_int); - -int -l_strnstart(register const u_char *tstr1, register u_int tl1, - register const u_char *str2, register u_int l2) -{ - - if (tl1 > l2) - return 0; - - return (strncmp(tstr1, str2, tl1) == 0 ? 1 : 0); - -} - -void -bxxp_print(register const u_char *bp, register u_int length) -{ - - if (l_strnstart("REQ ", 4, bp, length)) { /* A REQuest */ - - printf(" BXXP REQ"); - - } - else if (l_strnstart("RSP ", 4, bp, length)) { - - printf(" BXXP RSP"); - - } - else if (l_strnstart("SEQ ", 4, bp, length)) { - - printf(" BXXP SEQ"); - - } - else if (l_strnstart("END", 4, bp, length)) { - - printf(" BXXP END"); - - } - else - printf(" BXXP (payload or undecoded)"); - -} diff --git a/print-cdp.c b/print-cdp.c index 4398fbefdae7..f8f4427c046b 100644 --- a/print-cdp.c +++ b/print-cdp.c @@ -26,7 +26,7 @@ #ifndef lint static const char rcsid[] _U_ = - "@(#) $Header: /tcpdump/master/tcpdump/print-cdp.c,v 1.25 2004/10/07 14:53:11 hannes Exp $"; + "@(#) $Header: /tcpdump/master/tcpdump/print-cdp.c,v 1.25 2004-10-07 14:53:11 hannes Exp $"; #endif #ifdef HAVE_CONFIG_H diff --git a/print-cfm.c b/print-cfm.c new file mode 100644 index 000000000000..bd98dd26d26c --- /dev/null +++ b/print-cfm.c @@ -0,0 +1,641 @@ +/* + * 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. + * + * Support for the IEEE Connectivity Fault Management Protocols as per 802.1ag. + * + * Original code by Hannes Gredler (hannes@juniper.net) + */ + +#ifndef lint +static const char rcsid[] _U_ = + "@(#) $Header: /tcpdump/master/tcpdump/print-cfm.c,v 1.5 2007-07-24 16:01:42 hannes Exp $"; +#endif + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include + +#include +#include +#include + +#include "interface.h" +#include "extract.h" +#include "ether.h" +#include "addrtoname.h" +#include "oui.h" +#include "af.h" + +/* + * Prototypes + */ +const char * cfm_egress_id_string(register const u_char *); +int cfm_mgmt_addr_print(register const u_char *); + +struct cfm_common_header_t { + u_int8_t mdlevel_version; + u_int8_t opcode; + u_int8_t flags; + u_int8_t first_tlv_offset; +}; + +#define CFM_VERSION 0 +#define CFM_EXTRACT_VERSION(x) (((x)&0x1f)) +#define CFM_EXTRACT_MD_LEVEL(x) (((x)&0xe0)>>5) + +#define CFM_OPCODE_CCM 1 +#define CFM_OPCODE_LBR 2 +#define CFM_OPCODE_LBM 3 +#define CFM_OPCODE_LTR 4 +#define CFM_OPCODE_LTM 5 + +static const struct tok cfm_opcode_values[] = { + { CFM_OPCODE_CCM, "Continouity Check Message"}, + { CFM_OPCODE_LBR, "Loopback Reply"}, + { CFM_OPCODE_LBM, "Loopback Message"}, + { CFM_OPCODE_LTR, "Linktrace Reply"}, + { CFM_OPCODE_LTM, "Linktrace Message"}, + { 0, NULL} +}; + +/* + * Message Formats. + */ +struct cfm_ccm_t { + u_int8_t sequence[4]; + u_int8_t ma_epi[2]; + u_int8_t md_nameformat; + u_int8_t md_namelength; + u_int8_t md_name[46]; /* md name and short ma name */ + u_int8_t reserved_itu[16]; + u_int8_t reserved[6]; +}; + +/* + * Timer Bases for the CCM Interval field. + * Expressed in units of seconds. + */ +const float ccm_interval_base[8] = {0, 0.003333, 0.01, 0.1, 1, 10, 60, 600}; +#define CCM_INTERVAL_MIN_MULTIPLIER 3.25 +#define CCM_INTERVAL_MAX_MULTIPLIER 3.5 + +#define CFM_CCM_RDI_FLAG 0x80 +#define CFM_EXTRACT_CCM_INTERVAL(x) (((x)&0x07)) + +#define CFM_CCM_MD_FORMAT_8021 0 +#define CFM_CCM_MD_FORMAT_NONE 1 +#define CFM_CCM_MD_FORMAT_DNS 2 +#define CFM_CCM_MD_FORMAT_MAC 3 +#define CFM_CCM_MD_FORMAT_CHAR 4 + +static const struct tok cfm_md_nameformat_values[] = { + { CFM_CCM_MD_FORMAT_8021, "IEEE 802.1"}, + { CFM_CCM_MD_FORMAT_NONE, "No MD Name present"}, + { CFM_CCM_MD_FORMAT_DNS, "DNS string"}, + { CFM_CCM_MD_FORMAT_MAC, "MAC + 16Bit Integer"}, + { CFM_CCM_MD_FORMAT_CHAR, "Character string"}, + { 0, NULL} +}; + +#define CFM_CCM_MA_FORMAT_8021 0 +#define CFM_CCM_MA_FORMAT_VID 1 +#define CFM_CCM_MA_FORMAT_CHAR 2 +#define CFM_CCM_MA_FORMAT_INT 3 +#define CFM_CCM_MA_FORMAT_VPN 4 + +static const struct tok cfm_ma_nameformat_values[] = { + { CFM_CCM_MA_FORMAT_8021, "IEEE 802.1"}, + { CFM_CCM_MA_FORMAT_VID, "Primary VID"}, + { CFM_CCM_MA_FORMAT_CHAR, "Character string"}, + { CFM_CCM_MA_FORMAT_INT, "16Bit Integer"}, + { CFM_CCM_MA_FORMAT_VPN, "RFC2685 VPN-ID"}, + { 0, NULL} +}; + +struct cfm_lbm_t { + u_int8_t transaction_id[4]; + u_int8_t reserved[4]; +}; + +struct cfm_ltm_t { + u_int8_t transaction_id[4]; + u_int8_t egress_id[8]; + u_int8_t ttl; + u_int8_t original_mac[ETHER_ADDR_LEN]; + u_int8_t target_mac[ETHER_ADDR_LEN]; + u_int8_t reserved[3]; +}; + +static const struct tok cfm_ltm_flag_values[] = { + { 0x80, "Use Forwarding-DB only"}, + { 0, NULL} +}; + +struct cfm_ltr_t { + u_int8_t transaction_id[4]; + u_int8_t last_egress_id[8]; + u_int8_t next_egress_id[8]; + u_int8_t ttl; + u_int8_t replay_action; + u_int8_t reserved[6]; +}; + +static const struct tok cfm_ltr_flag_values[] = { + { 0x80, "Forwarded"}, + { 0x40, "Terminal MEP"}, + { 0, NULL} +}; + +static const struct tok cfm_ltr_replay_action_values[] = { + { 1, "Exact Match"}, + { 2, "Filtering DB"}, + { 3, "MIP CCM DB"}, + { 0, NULL} +}; + + +#define CFM_TLV_END 0 +#define CFM_TLV_SENDER_ID 1 +#define CFM_TLV_PORT_STATUS 2 +#define CFM_TLV_INTERFACE_STATUS 3 +#define CFM_TLV_DATA 4 +#define CFM_TLV_REPLY_INGRESS 5 +#define CFM_TLV_REPLY_EGRESS 6 +#define CFM_TLV_PRIVATE 31 + +static const struct tok cfm_tlv_values[] = { + { CFM_TLV_END, "End"}, + { CFM_TLV_SENDER_ID, "Sender ID"}, + { CFM_TLV_PORT_STATUS, "Port status"}, + { CFM_TLV_INTERFACE_STATUS, "Interface status"}, + { CFM_TLV_DATA, "Data"}, + { CFM_TLV_REPLY_INGRESS, "Reply Ingress"}, + { CFM_TLV_REPLY_EGRESS, "Reply Egress"}, + { CFM_TLV_PRIVATE, "Organization Specific"}, + { 0, NULL} +}; + +/* + * TLVs + */ + +struct cfm_tlv_header_t { + u_int8_t type; + u_int8_t length[2]; +}; + +/* FIXME define TLV formats */ + +static const struct tok cfm_tlv_port_status_values[] = { + { 1, "Blocked"}, + { 2, "Up"}, + { 0, NULL} +}; + +static const struct tok cfm_tlv_interface_status_values[] = { + { 1, "Up"}, + { 2, "Down"}, + { 3, "Testing"}, + { 5, "Dormant"}, + { 6, "not present"}, + { 7, "lower Layer down"}, + { 0, NULL} +}; + +#define CFM_CHASSIS_ID_CHASSIS_COMPONENT 1 +#define CFM_CHASSIS_ID_INTERFACE_ALIAS 2 +#define CFM_CHASSIS_ID_PORT_COMPONENT 3 +#define CFM_CHASSIS_ID_MAC_ADDRESS 4 +#define CFM_CHASSIS_ID_NETWORK_ADDRESS 5 +#define CFM_CHASSIS_ID_INTERFACE_NAME 6 +#define CFM_CHASSIS_ID_LOCAL 7 + +static const struct tok cfm_tlv_senderid_chassisid_values[] = { + { 0, "Reserved"}, + { CFM_CHASSIS_ID_CHASSIS_COMPONENT, "Chassis component"}, + { CFM_CHASSIS_ID_INTERFACE_ALIAS, "Interface alias"}, + { CFM_CHASSIS_ID_PORT_COMPONENT, "Port component"}, + { CFM_CHASSIS_ID_MAC_ADDRESS, "MAC address"}, + { CFM_CHASSIS_ID_NETWORK_ADDRESS, "Network address"}, + { CFM_CHASSIS_ID_INTERFACE_NAME, "Interface name"}, + { CFM_CHASSIS_ID_LOCAL, "Locally assigned"}, + { 0, NULL} +}; + + +int +cfm_mgmt_addr_print(register const u_char *tptr) { + + u_int mgmt_addr_type; + u_int hexdump = FALSE; + + /* + * Altough AFIs are tpically 2 octects wide, + * 802.1ab specifies that this field width + * is only once octet + */ + mgmt_addr_type = *tptr; + printf("\n\t Management Address Type %s (%u)", + tok2str(af_values, "Unknown", mgmt_addr_type), + mgmt_addr_type); + + /* + * Resolve the passed in Address. + */ + switch(mgmt_addr_type) { + case AFNUM_INET: + printf(", %s", ipaddr_string(tptr + 1)); + break; + +#ifdef INET6 + case AFNUM_INET6: + printf(", %s", ip6addr_string(tptr + 1)); + break; +#endif + + default: + hexdump = TRUE; + break; + } + + return hexdump; +} + +/* + * The egress-ID string is a 16-Bit string plus a MAC address. + */ +const char * +cfm_egress_id_string(register const u_char *tptr) { + static char egress_id_buffer[80]; + + snprintf(egress_id_buffer, sizeof(egress_id_buffer), + "MAC %0x4x-%s", + EXTRACT_16BITS(tptr), + etheraddr_string(tptr+2)); + + return egress_id_buffer; +} + +void +cfm_print(register const u_char *pptr, register u_int length) { + + const struct cfm_common_header_t *cfm_common_header; + const struct cfm_tlv_header_t *cfm_tlv_header; + const u_int8_t *tptr, *tlv_ptr, *ma_name, *ma_nameformat, *ma_namelength; + u_int hexdump, tlen, cfm_tlv_len, cfm_tlv_type, ccm_interval; + + + union { + const struct cfm_ccm_t *cfm_ccm; + const struct cfm_lbm_t *cfm_lbm; + const struct cfm_ltm_t *cfm_ltm; + const struct cfm_ltr_t *cfm_ltr; + } msg_ptr; + + tptr=pptr; + cfm_common_header = (const struct cfm_common_header_t *)pptr; + TCHECK(*cfm_common_header); + + /* + * Sanity checking of the header. + */ + if (CFM_EXTRACT_VERSION(cfm_common_header->mdlevel_version) != CFM_VERSION) { + printf("CFMv%u not supported, length %u", + CFM_EXTRACT_VERSION(cfm_common_header->mdlevel_version), length); + return; + } + + printf("CFMv%u %s, MD Level %u, length %u", + CFM_EXTRACT_VERSION(cfm_common_header->mdlevel_version), + tok2str(cfm_opcode_values, "unknown (%u)", cfm_common_header->opcode), + CFM_EXTRACT_MD_LEVEL(cfm_common_header->mdlevel_version), + length); + + /* + * In non-verbose mode just print the opcode and md-level. + */ + if (vflag < 1) { + return; + } + + printf("\n\tFirst TLV offset %u", cfm_common_header->first_tlv_offset); + + tptr += sizeof(const struct cfm_common_header_t); + tlen = length - sizeof(struct cfm_common_header_t); + + switch (cfm_common_header->opcode) { + case CFM_OPCODE_CCM: + msg_ptr.cfm_ccm = (const struct cfm_ccm_t *)tptr; + + ccm_interval = CFM_EXTRACT_CCM_INTERVAL(cfm_common_header->flags); + printf(", Flags [CCM Interval %u%s]", + ccm_interval, + cfm_common_header->flags & CFM_CCM_RDI_FLAG ? + ", RDI" : ""); + + /* + * Resolve the CCM interval field. + */ + if (ccm_interval) { + printf("\n\t CCM Interval %.3fs" + ", min CCM Lifetime %.3fs, max CCM Lifetime %.3fs", + ccm_interval_base[ccm_interval], + ccm_interval_base[ccm_interval] * CCM_INTERVAL_MIN_MULTIPLIER, + ccm_interval_base[ccm_interval] * CCM_INTERVAL_MAX_MULTIPLIER); + } + + printf("\n\t Sequence Number 0x%08x, MA-End-Point-ID 0x%04x", + EXTRACT_32BITS(msg_ptr.cfm_ccm->sequence), + EXTRACT_16BITS(msg_ptr.cfm_ccm->ma_epi)); + + + /* + * Resolve the MD fields. + */ + printf("\n\t MD Name Format %s (%u), MD Name length %u", + tok2str(cfm_md_nameformat_values, "Unknown", + msg_ptr.cfm_ccm->md_nameformat), + msg_ptr.cfm_ccm->md_nameformat, + msg_ptr.cfm_ccm->md_namelength); + + if (msg_ptr.cfm_ccm->md_nameformat != CFM_CCM_MD_FORMAT_NONE) { + printf("\n\t MD Name: "); + switch (msg_ptr.cfm_ccm->md_nameformat) { + case CFM_CCM_MD_FORMAT_DNS: + case CFM_CCM_MD_FORMAT_CHAR: + safeputs((const char *)msg_ptr.cfm_ccm->md_name, msg_ptr.cfm_ccm->md_namelength); + break; + + case CFM_CCM_MD_FORMAT_MAC: + printf("\n\t MAC %s", etheraddr_string( + msg_ptr.cfm_ccm->md_name)); + break; + + /* FIXME add printers for those MD formats - hexdump for now */ + case CFM_CCM_MA_FORMAT_8021: + default: + print_unknown_data(msg_ptr.cfm_ccm->md_name, "\n\t ", + msg_ptr.cfm_ccm->md_namelength); + } + } + + + /* + * Resolve the MA fields. + */ + ma_nameformat = msg_ptr.cfm_ccm->md_name + msg_ptr.cfm_ccm->md_namelength; + ma_namelength = msg_ptr.cfm_ccm->md_name + msg_ptr.cfm_ccm->md_namelength + 1; + ma_name = msg_ptr.cfm_ccm->md_name + msg_ptr.cfm_ccm->md_namelength + 2; + + printf("\n\t MA Name-Format %s (%u), MA name length %u", + tok2str(cfm_ma_nameformat_values, "Unknown", + *ma_nameformat), + *ma_nameformat, + *ma_namelength); + + printf("\n\t MA Name: "); + switch (*ma_nameformat) { + case CFM_CCM_MA_FORMAT_CHAR: + safeputs((const char *)ma_name, *ma_namelength); + break; + + /* FIXME add printers for those MA formats - hexdump for now */ + case CFM_CCM_MA_FORMAT_8021: + case CFM_CCM_MA_FORMAT_VID: + case CFM_CCM_MA_FORMAT_INT: + case CFM_CCM_MA_FORMAT_VPN: + default: + print_unknown_data(ma_name, "\n\t ", *ma_namelength); + } + break; + + case CFM_OPCODE_LTM: + printf(", Flags [%s]", + bittok2str(cfm_ltm_flag_values, "none", cfm_common_header->flags)); + + printf("\n\t Transaction-ID 0x%08x, Egress-ID %s, ttl %u", + EXTRACT_32BITS(msg_ptr.cfm_ltm->transaction_id), + cfm_egress_id_string(msg_ptr.cfm_ltm->egress_id), + msg_ptr.cfm_ltm->ttl); + + printf("\n\t Original-MAC %s, Target-MAC %s", + etheraddr_string(msg_ptr.cfm_ltm->original_mac), + etheraddr_string(msg_ptr.cfm_ltm->target_mac)); + break; + + case CFM_OPCODE_LTR: + printf(", Flags [%s]", + bittok2str(cfm_ltr_flag_values, "none", cfm_common_header->flags)); + + printf("\n\t Transaction-ID 0x%08x, Last-Egress-ID %s", + EXTRACT_32BITS(msg_ptr.cfm_ltr->transaction_id), + cfm_egress_id_string(msg_ptr.cfm_ltr->last_egress_id)); + + printf("\n\t Next-Egress-ID %s, ttl %u", + cfm_egress_id_string(msg_ptr.cfm_ltr->next_egress_id), + msg_ptr.cfm_ltr->ttl); + + printf("\n\t Replay-Action %s (%u)", + tok2str(cfm_ltr_replay_action_values, + "Unknown", + msg_ptr.cfm_ltr->replay_action), + msg_ptr.cfm_ltr->replay_action); + break; + + /* + * No message decoder yet. + * Hexdump everything up until the start of the TLVs + */ + case CFM_OPCODE_LBR: + case CFM_OPCODE_LBM: + default: + if (tlen > cfm_common_header->first_tlv_offset) { + print_unknown_data(tptr, "\n\t ", + tlen - cfm_common_header->first_tlv_offset); + } + break; + } + + /* + * Sanity check for not walking off. + */ + if (tlen <= cfm_common_header->first_tlv_offset) { + return; + } + + tptr += cfm_common_header->first_tlv_offset; + tlen -= cfm_common_header->first_tlv_offset; + + while (tlen > 0) { + cfm_tlv_header = (const struct cfm_tlv_header_t *)tptr; + + /* Enough to read the tlv type ? */ + TCHECK2(*tptr, 1); + cfm_tlv_type=cfm_tlv_header->type; + + if (cfm_tlv_type != CFM_TLV_END) { + /* did we capture enough for fully decoding the object header ? */ + TCHECK2(*tptr, sizeof(struct cfm_tlv_header_t)); + cfm_tlv_len=EXTRACT_16BITS(&cfm_tlv_header->length); + } else { + cfm_tlv_len = 0; + } + + printf("\n\t%s TLV (0x%02x), length %u", + tok2str(cfm_tlv_values, "Unknown", cfm_tlv_type), + cfm_tlv_type, + cfm_tlv_len); + + /* sanity check for not walking off and infinite loop check. */ + if ((cfm_tlv_type != CFM_TLV_END) && + ((cfm_tlv_len + sizeof(struct cfm_tlv_header_t) > tlen) || + (!cfm_tlv_len))) { + print_unknown_data(tptr,"\n\t ",tlen); + return; + } + + tptr += sizeof(struct cfm_tlv_header_t); + tlen -= sizeof(struct cfm_tlv_header_t); + tlv_ptr = tptr; + + /* did we capture enough for fully decoding the object ? */ + if (cfm_tlv_type != CFM_TLV_END) { + TCHECK2(*tptr, cfm_tlv_len); + } + hexdump = FALSE; + + switch(cfm_tlv_type) { + case CFM_TLV_END: + /* we are done - bail out */ + return; + + case CFM_TLV_PORT_STATUS: + printf(", Status: %s (%u)", + tok2str(cfm_tlv_port_status_values, "Unknown", *tptr), + *tptr); + break; + + case CFM_TLV_INTERFACE_STATUS: + printf(", Status: %s (%u)", + tok2str(cfm_tlv_interface_status_values, "Unknown", *tptr), + *tptr); + break; + + case CFM_TLV_PRIVATE: + printf(", Vendor: %s (%u), Sub-Type %u", + tok2str(oui_values,"Unknown", EXTRACT_24BITS(tptr)), + EXTRACT_24BITS(tptr), + *(tptr+3)); + hexdump = TRUE; + break; + + case CFM_TLV_SENDER_ID: + { + u_int chassis_id_type, chassis_id_length; + u_int mgmt_addr_length; + + /* + * Check if there is a Chassis-ID. + */ + chassis_id_length = *tptr; + if (chassis_id_length > tlen) { + hexdump = TRUE; + break; + } + + tptr++; + tlen--; + + if (chassis_id_length) { + chassis_id_type = *tptr; + printf("\n\t Chassis-ID Type %s (%u), Chassis-ID length %u", + tok2str(cfm_tlv_senderid_chassisid_values, + "Unknown", + chassis_id_type), + chassis_id_type, + chassis_id_length); + + switch (chassis_id_type) { + case CFM_CHASSIS_ID_MAC_ADDRESS: + printf("\n\t MAC %s", etheraddr_string(tptr+1)); + break; + + case CFM_CHASSIS_ID_NETWORK_ADDRESS: + hexdump |= cfm_mgmt_addr_print(tptr); + break; + + case CFM_CHASSIS_ID_INTERFACE_NAME: /* fall through */ + case CFM_CHASSIS_ID_INTERFACE_ALIAS: + case CFM_CHASSIS_ID_LOCAL: + case CFM_CHASSIS_ID_CHASSIS_COMPONENT: + case CFM_CHASSIS_ID_PORT_COMPONENT: + safeputs((const char *)tptr+1, chassis_id_length); + break; + + default: + hexdump = TRUE; + break; + } + } + + tptr += chassis_id_length; + tlen -= chassis_id_length; + + /* + * Check if there is a Management Address. + */ + mgmt_addr_length = *tptr; + if (mgmt_addr_length > tlen) { + hexdump = TRUE; + break; + } + + tptr++; + tlen--; + + if (mgmt_addr_length) { + hexdump |= cfm_mgmt_addr_print(tptr); + } + + tptr += mgmt_addr_length; + tlen -= mgmt_addr_length; + + } + break; + + /* + * FIXME those are the defined TLVs that lack a decoder + * you are welcome to contribute code ;-) + */ + + case CFM_TLV_DATA: + case CFM_TLV_REPLY_INGRESS: + case CFM_TLV_REPLY_EGRESS: + default: + hexdump = TRUE; + break; + } + /* do we want to see an additional hexdump ? */ + if (hexdump || vflag > 1) + print_unknown_data(tlv_ptr, "\n\t ", cfm_tlv_len); + + tptr+=cfm_tlv_len; + tlen-=cfm_tlv_len; + } + return; +trunc: + printf("\n\t\t packet exceeded snapshot"); +} diff --git a/print-chdlc.c b/print-chdlc.c index b7654f5c658b..238e91a98ce1 100644 --- a/print-chdlc.c +++ b/print-chdlc.c @@ -21,7 +21,7 @@ #ifndef lint static const char rcsid[] _U_ = - "@(#) $Header: /tcpdump/master/tcpdump/print-chdlc.c,v 1.32.2.11 2005/11/29 08:57:10 hannes Exp $ (LBL)"; + "@(#) $Header: /tcpdump/master/tcpdump/print-chdlc.c,v 1.43 2005-11-29 08:56:19 hannes Exp $ (LBL)"; #endif #ifdef HAVE_CONFIG_H diff --git a/print-cip.c b/print-cip.c index 774b7002378b..e9d672fe761b 100644 --- a/print-cip.c +++ b/print-cip.c @@ -22,7 +22,7 @@ #ifndef lint static const char rcsid[] _U_ = - "@(#) $Header: /tcpdump/master/tcpdump/print-cip.c,v 1.25.2.1 2005/07/07 01:24:34 guy Exp $ (LBL)"; + "@(#) $Header: /tcpdump/master/tcpdump/print-cip.c,v 1.26 2005-07-07 01:22:17 guy Exp $ (LBL)"; #endif #ifdef HAVE_CONFIG_H diff --git a/print-cnfp.c b/print-cnfp.c index 9fdfbd4d06c7..86d71282963a 100644 --- a/print-cnfp.c +++ b/print-cnfp.c @@ -34,7 +34,7 @@ #ifndef lint static const char rcsid[] _U_ = - "@(#) $Header: /tcpdump/master/tcpdump/print-cnfp.c,v 1.16.2.1 2005/04/20 20:53:39 guy Exp $"; + "@(#) $Header: /tcpdump/master/tcpdump/print-cnfp.c,v 1.17 2005-04-20 20:53:18 guy Exp $"; #endif #ifdef HAVE_CONFIG_H diff --git a/print-dccp.c b/print-dccp.c index e6bfca61af94..b7377cf91540 100644 --- a/print-dccp.c +++ b/print-dccp.c @@ -9,7 +9,7 @@ #ifndef lint static const char rcsid[] _U_ = - "@(#) $Header: /tcpdump/master/tcpdump/print-dccp.c,v 1.1.2.6 2006/02/19 05:08:44 guy Exp $ (LBL)"; + "@(#) $Header: /tcpdump/master/tcpdump/print-dccp.c,v 1.7.2.1 2007-11-09 00:45:16 guy Exp $ (LBL)"; #endif #ifdef HAVE_CONFIG_H @@ -60,9 +60,20 @@ static const char *dccp_feature_nums[] = { "check data checksum", }; +static inline int dccp_csum_coverage(const struct dccp_hdr* dh, u_int len) +{ + u_int cov; + + if (DCCPH_CSCOV(dh) == 0) + return len; + cov = (dh->dccph_doff + DCCPH_CSCOV(dh) - 1) * sizeof(u_int32_t); + return (cov > len)? len : cov; +} + static int dccp_cksum(const struct ip *ip, const struct dccp_hdr *dh, u_int len) { + int cov = dccp_csum_coverage(dh, len); union phu { struct phdr { u_int32_t src; @@ -86,15 +97,15 @@ static int dccp_cksum(const struct ip *ip, phu.ph.dst = ip_finddst(ip); sp = &phu.pa[0]; - return in_cksum((u_short *)dh, len, sp[0]+sp[1]+sp[2]+sp[3]+sp[4]+sp[5]); + return in_cksum((u_short *)dh, cov, sp[0]+sp[1]+sp[2]+sp[3]+sp[4]+sp[5]); } #ifdef INET6 static int dccp6_cksum(const struct ip6_hdr *ip6, const struct dccp_hdr *dh, u_int len) { size_t i; - const u_int16_t *sp; - u_int32_t sum; + u_int32_t sum = 0; + int cov = dccp_csum_coverage(dh, len); union { struct { struct in6_addr ph_src; @@ -113,23 +124,10 @@ static int dccp6_cksum(const struct ip6_hdr *ip6, const struct dccp_hdr *dh, u_i phu.ph.ph_len = htonl(len); phu.ph.ph_nxt = IPPROTO_DCCP; - sum = 0; for (i = 0; i < sizeof(phu.pa) / sizeof(phu.pa[0]); i++) sum += phu.pa[i]; - sp = (const u_int16_t *)dh; - - for (i = 0; i < (len & ~1); i += 2) - sum += *sp++; - - if (len & 1) - sum += htons((*(const u_int8_t *)sp) << 8); - - while (sum > 0xffff) - sum = (sum & 0xffff) + (sum >> 16); - sum = ~sum & 0xffff; - - return (sum); + return in_cksum((u_short *)dh, cov, sum); } #endif @@ -279,32 +277,21 @@ void dccp_print(const u_char *bp, const u_char *data2, u_int len) } /* checksum calculation */ + if (vflag && TTEST2(bp[0], len)) { + u_int16_t sum = 0, dccp_sum; + + dccp_sum = EXTRACT_16BITS(&dh->dccph_checksum); + (void)printf("cksum 0x%04x ", dccp_sum); + if (IP_V(ip) == 4) + sum = dccp_cksum(ip, dh, len); #ifdef INET6 - if (ip6) { - if (ip6->ip6_plen && vflag) { - u_int16_t sum, dccp_sum; - + else if (IP_V(ip) == 6) sum = dccp6_cksum(ip6, dh, len); - dccp_sum = EXTRACT_16BITS(&dh->dccph_checksum); - printf("cksum 0x%04x", dccp_sum); - if (sum != 0) { - (void)printf(" (incorrect (-> 0x%04x), ",in_cksum_shouldbe(dccp_sum, sum)); - } else - (void)printf(" (correct), "); - } - } else -#endif /* INET6 */ - if (vflag) - { - u_int16_t sum, dccp_sum; - - sum = dccp_cksum(ip, dh, len); - dccp_sum = EXTRACT_16BITS(&dh->dccph_checksum); - printf("cksum 0x%04x", dccp_sum); - if (sum != 0) { - (void)printf(" (incorrect (-> 0x%04x), ",in_cksum_shouldbe(dccp_sum, sum)); - } else - (void)printf(" (correct), "); +#endif + if (sum != 0) + (void)printf("(incorrect -> 0x%04x), ",in_cksum_shouldbe(dccp_sum, sum)); + else + (void)printf("(correct), "); } switch (DCCPH_TYPE(dh)) { diff --git a/print-decnet.c b/print-decnet.c index ae7ba5c4ea55..7fea582e8a00 100644 --- a/print-decnet.c +++ b/print-decnet.c @@ -21,7 +21,7 @@ #ifndef lint static const char rcsid[] _U_ = - "@(#) $Header: /tcpdump/master/tcpdump/print-decnet.c,v 1.38.2.1 2005/05/06 02:16:53 guy Exp $ (LBL)"; + "@(#) $Header: /tcpdump/master/tcpdump/print-decnet.c,v 1.39 2005-05-06 02:16:26 guy Exp $ (LBL)"; #endif #ifdef HAVE_CONFIG_H diff --git a/print-dhcp6.c b/print-dhcp6.c index 9f4999d70f62..ec0df763c0cf 100644 --- a/print-dhcp6.c +++ b/print-dhcp6.c @@ -40,7 +40,7 @@ #ifndef lint static const char rcsid[] _U_ = - "@(#) $Header: /tcpdump/master/tcpdump/print-dhcp6.c,v 1.35.2.1 2006/10/25 22:04:36 guy Exp $"; + "@(#) $Header: /tcpdump/master/tcpdump/print-dhcp6.c,v 1.36.2.1 2008-02-06 10:26:27 guy Exp $"; #endif #ifdef HAVE_CONFIG_H @@ -80,6 +80,8 @@ static const char rcsid[] _U_ = #define DH6_INFORM_REQ 11 #define DH6_RELAY_FORW 12 #define DH6_RELAY_REPLY 13 +#define DH6_LEASEQUERY 14 +#define DH6_LQ_REPLY 15 /* DHCP6 base packet format */ struct dhcp6 { @@ -130,6 +132,10 @@ struct dhcp6_relay { # define DH6OPT_STCODE_NOTONLINK 4 # define DH6OPT_STCODE_USEMULTICAST 5 # define DH6OPT_STCODE_NOPREFIXAVAIL 6 +# define DH6OPT_STCODE_UNKNOWNQUERYTYPE 7 +# define DH6OPT_STCODE_MALFORMEDQUERY 8 +# define DH6OPT_STCODE_NOTCONFIGURED 9 +# define DH6OPT_STCODE_NOTALLOWED 10 #define DH6OPT_RAPID_COMMIT 14 #define DH6OPT_USER_CLASS 15 #define DH6OPT_VENDOR_CLASS 16 @@ -155,6 +161,15 @@ struct dhcp6_relay { #define DH6OPT_REMOTE_ID 37 #define DH6OPT_SUBSCRIBER_ID 38 #define DH6OPT_CLIENT_FQDN 39 +#define DH6OPT_PANA_AGENT 40 +#define DH6OPT_NEW_POSIX_TIMEZONE 41 +#define DH6OPT_NEW_TZDB_TIMEZONE 42 +#define DH6OPT_ERO 43 +#define DH6OPT_LQ_QUERY 44 +#define DH6OPT_CLIENT_DATA 45 +#define DH6OPT_CLT_TIME 46 +#define DH6OPT_LQ_RELAY_DATA 47 +#define DH6OPT_LQ_CLIENT_LINK 48 struct dhcp6opt { u_int16_t dh6opt_type; @@ -280,6 +295,24 @@ dhcp6opt_name(int type) return "Subscriber ID"; case DH6OPT_CLIENT_FQDN: return "Client FQDN"; + case DH6OPT_PANA_AGENT: + return "PANA agent"; + case DH6OPT_NEW_POSIX_TIMEZONE: + return "POSIX timezone"; + case DH6OPT_NEW_TZDB_TIMEZONE: + return "POSIX tz database"; + case DH6OPT_ERO: + return "Echo request option"; + case DH6OPT_LQ_QUERY: + return "Lease query"; + case DH6OPT_CLIENT_DATA: + return "LQ client data"; + case DH6OPT_CLT_TIME: + return "Clt time"; + case DH6OPT_LQ_RELAY_DATA: + return "LQ relay data"; + case DH6OPT_LQ_CLIENT_LINK: + return "LQ client link"; default: snprintf(genstr, sizeof(genstr), "opt_%d", type); return(genstr); @@ -309,6 +342,14 @@ dhcp6stcode(int code) return "use multicast"; case DH6OPT_STCODE_NOPREFIXAVAIL: return "no prefixes"; + case DH6OPT_STCODE_UNKNOWNQUERYTYPE: + return "unknown query type"; + case DH6OPT_STCODE_MALFORMEDQUERY: + return "malformed query"; + case DH6OPT_STCODE_NOTCONFIGURED: + return "not configured"; + case DH6OPT_STCODE_NOTALLOWED: + return "not allowed"; default: snprintf(genstr, sizeof(genstr), "code%d", code); return(genstr); @@ -420,6 +461,7 @@ dhcp6opt_print(const u_char *cp, const u_char *ep) printf(")"); break; case DH6OPT_ORO: + case DH6OPT_ERO: if (optlen % 2) { printf(" ?)"); break; @@ -549,12 +591,15 @@ dhcp6opt_print(const u_char *cp, const u_char *ep) printf(")"); break; case DH6OPT_INTERFACE_ID: + case DH6OPT_SUBSCRIBER_ID: /* * Since we cannot predict the encoding, print hex dump * at most 10 characters. */ + printf(" "); for (i = 0; i < optlen && i < 10; i++) printf("%02x", ((u_char *)(dh6o + 1))[i]); + printf("...)"); break; case DH6OPT_RECONF_MSG: tp = (u_char *)(dh6o + 1); @@ -579,6 +624,8 @@ dhcp6opt_print(const u_char *cp, const u_char *ep) case DH6OPT_NIS_SERVERS: case DH6OPT_NISP_SERVERS: case DH6OPT_BCMCS_SERVER_A: + case DH6OPT_PANA_AGENT: + case DH6OPT_LQ_CLIENT_LINK: if (optlen % 16) { printf(" ?)"); break; @@ -618,6 +665,21 @@ dhcp6opt_print(const u_char *cp, const u_char *ep) } printf(")"); break; + case DH6OPT_IA_TA: + if (optlen < 4) { + printf(" ?)"); + break; + } + memcpy(&val32, dh6o + 1, sizeof(val32)); + val32 = ntohl(val32); + printf(" IAID:%lu", (unsigned long)val32); + if (optlen > 4) { + /* there are sub-options */ + dhcp6opt_print((u_char *)(dh6o + 1) + 4, + (u_char *)(dh6o + 1) + optlen); + } + printf(")"); + break; case DH6OPT_IA_PD_PREFIX: if (optlen < sizeof(ia_prefix) - 4) { printf(" ?)"); @@ -643,6 +705,7 @@ dhcp6opt_print(const u_char *cp, const u_char *ep) printf(")"); break; case DH6OPT_LIFETIME: + case DH6OPT_CLT_TIME: if (optlen != 4) { printf(" ?)"); break; @@ -651,6 +714,68 @@ dhcp6opt_print(const u_char *cp, const u_char *ep) val32 = ntohl(val32); printf(" %d)", (int)val32); break; + case DH6OPT_REMOTE_ID: + if (optlen < 4) { + printf(" ?)"); + break; + } + tp = (u_char *)(dh6o + 1); + memcpy(&val32, &tp[0], sizeof(val32)); + val32 = ntohl(val32); + printf(" %d ", (int)val32); + /* + * Print hex dump first 10 characters. + */ + for (i = 4; i < optlen && i < 14; i++) + printf("%02x", tp[i]); + printf("...)"); + break; + case DH6OPT_LQ_QUERY: + if (optlen < 17) { + printf(" ?)"); + break; + } + tp = (u_char *)(dh6o + 1); + switch (*tp) { + case 1: + printf(" by-address"); + break; + case 2: + printf(" by-clientID"); + break; + default: + printf(" type_%d", (int)*tp); + break; + } + printf(" %s", ip6addr_string(&tp[1])); + if (optlen > 17) { + /* there are query-options */ + dhcp6opt_print(tp + 17, tp + optlen); + } + printf(")"); + break; + case DH6OPT_CLIENT_DATA: + if (optlen > 0) { + /* there are encapsulated options */ + dhcp6opt_print((u_char *)(dh6o + 1), + (u_char *)(dh6o + 1) + optlen); + } + printf(")"); + break; + case DH6OPT_LQ_RELAY_DATA: + if (optlen < 16) { + printf(" ?)"); + break; + } + tp = (u_char *)(dh6o + 1); + printf(" %s ", ip6addr_string(&tp[0])); + /* + * Print hex dump first 10 characters. + */ + for (i = 16; i < optlen && i < 26; i++) + printf("%02x", tp[i]); + printf("...)"); + break; default: printf(")"); break; @@ -725,6 +850,12 @@ dhcp6_print(const u_char *cp, u_int length) case DH6_RELAY_REPLY: name= "relay-reply"; break; + case DH6_LEASEQUERY: + name= "leasequery"; + break; + case DH6_LQ_REPLY: + name= "leasequery-reply"; + break; default: name = NULL; break; diff --git a/print-domain.c b/print-domain.c index d4a35d8c8494..80b4b33d3d29 100644 --- a/print-domain.c +++ b/print-domain.c @@ -21,7 +21,7 @@ #ifndef lint static const char rcsid[] _U_ = - "@(#) $Header: /tcpdump/master/tcpdump/print-domain.c,v 1.89.2.8 2007/02/13 19:19:27 guy Exp $ (LBL)"; + "@(#) $Header: /tcpdump/master/tcpdump/print-domain.c,v 1.97.2.1 2007-12-09 01:51:12 guy Exp $ (LBL)"; #endif #ifdef HAVE_CONFIG_H @@ -387,13 +387,22 @@ ns_rprint(register const u_char *cp, register const u_char *bp, int is_mdns) printf(" (Cache flush)"); } - /* ignore ttl */ - cp += 2; - /* if T_OPT, save opt_flags */ - if (typ == T_OPT) + if (typ == T_OPT) { + /* get opt flags */ + cp += 2; opt_flags = EXTRACT_16BITS(cp); - /* ignore rest of ttl */ - cp += 2; + /* ignore rest of ttl field */ + cp += 2; + } else if (vflag > 2) { + /* print ttl */ + printf(" ["); + relts_print(EXTRACT_32BITS(cp)); + printf("]"); + cp += 4; + } else { + /* ignore ttl */ + cp += 4; + } len = EXTRACT_16BITS(cp); cp += 2; @@ -408,7 +417,7 @@ ns_rprint(register const u_char *cp, register const u_char *bp, int is_mdns) case T_A: if (!TTEST2(*cp, sizeof(struct in_addr))) return(NULL); - printf(" %s", ipaddr_string(cp)); + printf(" %s", intoa(htonl(EXTRACT_32BITS(cp)))); break; case T_NS: @@ -475,15 +484,24 @@ ns_rprint(register const u_char *cp, register const u_char *bp, int is_mdns) #ifdef INET6 case T_AAAA: + { + struct in6_addr addr; + char ntop_buf[INET6_ADDRSTRLEN]; + if (!TTEST2(*cp, sizeof(struct in6_addr))) return(NULL); - printf(" %s", ip6addr_string(cp)); + memcpy(&addr, cp, sizeof(struct in6_addr)); + printf(" %s", + inet_ntop(AF_INET6, &addr, ntop_buf, sizeof(ntop_buf))); + break; + } case T_A6: { struct in6_addr a; int pbit, pbyte; + char ntop_buf[INET6_ADDRSTRLEN]; if (!TTEST2(*cp, 1)) return(NULL); @@ -497,7 +515,8 @@ ns_rprint(register const u_char *cp, register const u_char *bp, int is_mdns) return(NULL); memset(&a, 0, sizeof(a)); memcpy(&a.s6_addr[pbyte], cp + 1, sizeof(a) - pbyte); - printf(" %u %s", pbit, ip6addr_string(&a)); + printf(" %u %s", pbit, + inet_ntop(AF_INET6, &a, ntop_buf, sizeof(ntop_buf))); } if (pbit > 0) { putchar(' '); diff --git a/print-dtp.c b/print-dtp.c new file mode 100644 index 000000000000..c358a8930743 --- /dev/null +++ b/print-dtp.c @@ -0,0 +1,123 @@ +/* + * 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. + * + * Dynamic Trunk Protocol (DTP) + * + * Original code by Carles Kishimoto + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include + +#include +#include + +#include "interface.h" +#include "addrtoname.h" +#include "extract.h" +#include "nlpid.h" + +#define DTP_HEADER_LEN 1 +#define DTP_DOMAIN_TLV 0x0001 +#define DTP_STATUS_TLV 0x0002 +#define DTP_DTP_TYPE_TLV 0x0003 +#define DTP_NEIGHBOR_TLV 0x0004 + +static struct tok dtp_tlv_values[] = { + { DTP_DOMAIN_TLV, "Domain TLV"}, + { DTP_STATUS_TLV, "Status TLV"}, + { DTP_DTP_TYPE_TLV, "DTP type TLV"}, + { DTP_NEIGHBOR_TLV, "Neighbor TLV"}, + { 0, NULL} +}; + +void +dtp_print (const u_char *pptr, u_int length) +{ + int type, len; + const u_char *tptr; + + if (length < DTP_HEADER_LEN) + goto trunc; + + tptr = pptr; + + if (!TTEST2(*tptr, DTP_HEADER_LEN)) + goto trunc; + + printf("DTPv%u, length %u", + (*tptr), + length); + + /* + * In non-verbose mode, just print version. + */ + if (vflag < 1) { + return; + } + + tptr += DTP_HEADER_LEN; + + while (tptr < (pptr+length)) { + + if (!TTEST2(*tptr, 4)) + goto trunc; + + type = EXTRACT_16BITS(tptr); + len = EXTRACT_16BITS(tptr+2); + + /* infinite loop check */ + if (type == 0 || len == 0) { + return; + } + + printf("\n\t%s (0x%04x) TLV, length %u", + tok2str(dtp_tlv_values, "Unknown", type), + type, len); + + switch (type) { + case DTP_DOMAIN_TLV: + printf(", %s", tptr+4); + break; + + case DTP_STATUS_TLV: + case DTP_DTP_TYPE_TLV: + printf(", 0x%x", *(tptr+4)); + break; + + case DTP_NEIGHBOR_TLV: + printf(", %s", etheraddr_string(tptr+4)); + break; + + default: + break; + } + tptr += len; + } + + return; + + trunc: + printf("[|dtp]"); +} + +/* + * Local Variables: + * c-style: whitesmith + * c-basic-offset: 4 + * End: + */ diff --git a/print-dvmrp.c b/print-dvmrp.c index 2c159bf94508..437e7160c7fa 100644 --- a/print-dvmrp.c +++ b/print-dvmrp.c @@ -21,7 +21,7 @@ #ifndef lint static const char rcsid[] _U_ = - "@(#) $Header: /tcpdump/master/tcpdump/print-dvmrp.c,v 1.27 2003/11/19 09:42:04 guy Exp $ (LBL)"; + "@(#) $Header: /tcpdump/master/tcpdump/print-dvmrp.c,v 1.27 2003-11-19 09:42:04 guy Exp $ (LBL)"; #endif #ifdef HAVE_CONFIG_H diff --git a/print-eap.c b/print-eap.c index fb39e76f89b9..9fb333ad86b1 100644 --- a/print-eap.c +++ b/print-eap.c @@ -17,12 +17,13 @@ * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. * - * Format and print bootp packets. + * Format and print EAP packets. + * */ #ifndef lint static const char rcsid[] _U_ = - "@(#) $Header: /tcpdump/master/tcpdump/print-eap.c,v 1.3 2004/04/23 19:03:39 mcr Exp $"; + "@(#) $Header: /tcpdump/master/tcpdump/print-eap.c,v 1.5 2007-10-04 16:41:33 hannes Exp $"; #endif #ifdef HAVE_CONFIG_H @@ -35,37 +36,272 @@ static const char rcsid[] _U_ = #include #include "netdissect.h" +#include "interface.h" #include "addrtoname.h" #include "extract.h" #include "ether.h" +#define EAP_FRAME_TYPE_PACKET 0 +#define EAP_FRAME_TYPE_START 1 +#define EAP_FRAME_TYPE_LOGOFF 2 +#define EAP_FRAME_TYPE_KEY 3 +#define EAP_FRAME_TYPE_ENCAP_ASF_ALERT 4 + +struct eap_frame_t { + unsigned char version; + unsigned char type; + unsigned char length[2]; +}; + +static const struct tok eap_frame_type_values[] = { + { EAP_FRAME_TYPE_PACKET, "EAP packet" }, + { EAP_FRAME_TYPE_START, "EAPOL start" }, + { EAP_FRAME_TYPE_LOGOFF, "EAPOL logoff" }, + { EAP_FRAME_TYPE_KEY, "EAPOL key" }, + { EAP_FRAME_TYPE_ENCAP_ASF_ALERT, "Encapsulated ASF alert" }, + { 0, NULL} +}; + +/* RFC 3748 */ struct eap_packet_t { - unsigned char code; - unsigned char id; - unsigned char length[2]; - unsigned char data[1]; + unsigned char code; + unsigned char id; + unsigned char length[2]; +}; + +#define EAP_REQUEST 1 +#define EAP_RESPONSE 2 +#define EAP_SUCCESS 3 +#define EAP_FAILURE 4 + +static const struct tok eap_code_values[] = { + { EAP_REQUEST, "Request" }, + { EAP_RESPONSE, "Response" }, + { EAP_SUCCESS, "Success" }, + { EAP_FAILURE, "Failure" }, + { 0, NULL} +}; + +#define EAP_TYPE_NO_PROPOSED 0 +#define EAP_TYPE_IDENTITY 1 +#define EAP_TYPE_NOTIFICATION 2 +#define EAP_TYPE_NAK 3 +#define EAP_TYPE_MD5_CHALLENGE 4 +#define EAP_TYPE_OTP 5 +#define EAP_TYPE_GTC 6 +#define EAP_TYPE_TLS 13 /* RFC 2716 */ +#define EAP_TYPE_SIM 18 /* RFC 4186 */ +#define EAP_TYPE_TTLS 21 /* draft-funk-eap-ttls-v0-01.txt */ +#define EAP_TYPE_AKA 23 /* RFC 4187 */ +#define EAP_TYPE_FAST 43 /* RFC 4851 */ +#define EAP_TYPE_EXPANDED_TYPES 254 +#define EAP_TYPE_EXPERIMENTAL 255 + +static const struct tok eap_type_values[] = { + { EAP_TYPE_NO_PROPOSED, "No proposed" }, + { EAP_TYPE_IDENTITY, "Identity" }, + { EAP_TYPE_NOTIFICATION, "Notification" }, + { EAP_TYPE_NAK, "Nak" }, + { EAP_TYPE_MD5_CHALLENGE, "MD5-challenge" }, + { EAP_TYPE_OTP, "OTP" }, + { EAP_TYPE_GTC, "GTC" }, + { EAP_TYPE_TLS, "TLS" }, + { EAP_TYPE_SIM, "SIM" }, + { EAP_TYPE_TTLS, "TTLS" }, + { EAP_TYPE_AKA, "AKA" }, + { EAP_TYPE_FAST, "FAST" }, + { EAP_TYPE_EXPANDED_TYPES, "Expanded types" }, + { EAP_TYPE_EXPERIMENTAL, "Experimental" }, + { 0, NULL} +}; + +#define EAP_TLS_EXTRACT_BIT_L(x) (((x)&0x80)>>7) + +/* RFC 2716 - EAP TLS bits */ +#define EAP_TLS_FLAGS_LEN_INCLUDED (1 << 7) +#define EAP_TLS_FLAGS_MORE_FRAGMENTS (1 << 6) +#define EAP_TLS_FLAGS_START (1 << 5) + +static const struct tok eap_tls_flags_values[] = { + { EAP_TLS_FLAGS_LEN_INCLUDED, "L bit" }, + { EAP_TLS_FLAGS_MORE_FRAGMENTS, "More fragments bit"}, + { EAP_TLS_FLAGS_START, "Start bit"}, + { 0, NULL} +}; + +#define EAP_TTLS_VERSION(x) ((x)&0x07) + +/* EAP-AKA and EAP-SIM - RFC 4187 */ +#define EAP_AKA_CHALLENGE 1 +#define EAP_AKA_AUTH_REJECT 2 +#define EAP_AKA_SYNC_FAILURE 4 +#define EAP_AKA_IDENTITY 5 +#define EAP_SIM_START 10 +#define EAP_SIM_CHALLENGE 11 +#define EAP_AKA_NOTIFICATION 12 +#define EAP_AKA_REAUTH 13 +#define EAP_AKA_CLIENT_ERROR 14 + +static const struct tok eap_aka_subtype_values[] = { + { EAP_AKA_CHALLENGE, "Challenge" }, + { EAP_AKA_AUTH_REJECT, "Auth reject" }, + { EAP_AKA_SYNC_FAILURE, "Sync failure" }, + { EAP_AKA_IDENTITY, "Identity" }, + { EAP_SIM_START, "Start" }, + { EAP_SIM_CHALLENGE, "Challenge" }, + { EAP_AKA_NOTIFICATION, "Notification" }, + { EAP_AKA_REAUTH, "Reauth" }, + { EAP_AKA_CLIENT_ERROR, "Client error" }, + { 0, NULL} }; /* - * Print bootp requests + * Print EAP requests / responses */ void -eap_print(netdissect_options *ndo, - register const u_char *cp, - u_int length _U_) +eap_print(netdissect_options *ndo _U_, + register const u_char *cp, + u_int length _U_) { - const struct eap_packet_t *eap; + const struct eap_frame_t *eap; + const u_char *tptr; + u_int tlen, type, subtype; + int count=0, len; + + tptr = cp; + tlen = length; + eap = (const struct eap_frame_t *)cp; + TCHECK(*eap); - eap = (const struct eap_packet_t *)cp; - ND_TCHECK(eap->data); + /* in non-verbose mode just lets print the basic info */ + if (vflag < 1) { + printf("%s (%u) v%u, len %u", + tok2str(eap_frame_type_values, "unknown", eap->type), + eap->type, + eap->version, + EXTRACT_16BITS(eap->length)); + return; + } + + printf("%s (%u) v%u, len %u", + tok2str(eap_frame_type_values, "unknown", eap->type), + eap->type, + eap->version, + EXTRACT_16BITS(eap->length)); - ND_PRINT((ndo, "EAP code=%u id=%u length=%u ", - eap->code, eap->id, (eap->length[0]<<8) + eap->length[1])); + tptr += sizeof(const struct eap_frame_t); + tlen -= sizeof(const struct eap_frame_t); - if (!ndo->ndo_vflag) - return; + switch (eap->type) { + case EAP_FRAME_TYPE_PACKET: + type = *(tptr); + len = EXTRACT_16BITS(tptr+2); + printf(", %s (%u), id %u, len %u", + tok2str(eap_code_values, "unknown", type), + type, + *(tptr+1), + len); -trunc: - ; + if (!TTEST2(*tptr, len)) + goto trunc; + + if (type <= 2) { /* For EAP_REQUEST and EAP_RESPONSE only */ + subtype = *(tptr+4); + printf("\n\t\t Type %s (%u)", + tok2str(eap_type_values, "unknown", *(tptr+4)), + *(tptr+4)); + + switch (subtype) { + case EAP_TYPE_IDENTITY: + if (len - 5 > 0) { + printf(", Identity: "); + safeputs((const char *)tptr+5, len-5); + } + break; + + case EAP_TYPE_NOTIFICATION: + if (len - 5 > 0) { + printf(", Notification: "); + safeputs((const char *)tptr+5, len-5); + } + break; + + case EAP_TYPE_NAK: + count = 5; + + /* + * one or more octets indicating + * the desired authentication + * type one octet per type + */ + while (count < len) { + printf(" %s (%u),", + tok2str(eap_type_values, "unknown", *(tptr+count)), + *(tptr+count)); + count++; + } + break; + + case EAP_TYPE_TTLS: + printf(" TTLSv%u", + EAP_TTLS_VERSION(*(tptr+5))); /* fall through */ + case EAP_TYPE_TLS: + printf(" flags [%s] 0x%02x,", + bittok2str(eap_tls_flags_values, "none", *(tptr+5)), + *(tptr+5)); + + if (EAP_TLS_EXTRACT_BIT_L(*(tptr+5))) { + printf(" len %u", EXTRACT_32BITS(tptr+6)); + } + break; + + case EAP_TYPE_FAST: + printf(" FASTv%u", + EAP_TTLS_VERSION(*(tptr+5))); + printf(" flags [%s] 0x%02x,", + bittok2str(eap_tls_flags_values, "none", *(tptr+5)), + *(tptr+5)); + + if (EAP_TLS_EXTRACT_BIT_L(*(tptr+5))) { + printf(" len %u", EXTRACT_32BITS(tptr+6)); + } + + /* FIXME - TLV attributes follow */ + break; + + case EAP_TYPE_AKA: + case EAP_TYPE_SIM: + printf(" subtype [%s] 0x%02x,", + tok2str(eap_aka_subtype_values, "unknown", *(tptr+5)), + *(tptr+5)); + + /* FIXME - TLV attributes follow */ + break; + + case EAP_TYPE_MD5_CHALLENGE: + case EAP_TYPE_OTP: + case EAP_TYPE_GTC: + case EAP_TYPE_EXPANDED_TYPES: + case EAP_TYPE_EXPERIMENTAL: + default: + break; + } + } + break; + + case EAP_FRAME_TYPE_LOGOFF: + case EAP_FRAME_TYPE_ENCAP_ASF_ALERT: + default: + break; + } + return; + + trunc: + printf("\n\t[|EAP]"); } +/* + * Local Variables: + * c-basic-offset: 4 + * End: + */ diff --git a/print-egp.c b/print-egp.c index e5a811d7dc8d..4a1d046531be 100644 --- a/print-egp.c +++ b/print-egp.c @@ -20,7 +20,7 @@ #ifndef lint static const char rcsid[] _U_ = - "@(#) $Header: /tcpdump/master/tcpdump/print-egp.c,v 1.37 2005/01/12 11:19:09 hannes Exp $ (LBL)"; + "@(#) $Header: /tcpdump/master/tcpdump/print-egp.c,v 1.38 2006-02-11 22:13:24 hannes Exp $ (LBL)"; #endif #ifdef HAVE_CONFIG_H @@ -226,13 +226,23 @@ egp_print(register const u_int8_t *bp, register u_int length) printf("[|egp]"); return; } - (void)printf("egp: "); + + if (!vflag) { + printf("EGPv%u, AS %u, seq %u, length %u", + egp->egp_version, + EXTRACT_16BITS(&egp->egp_as), + EXTRACT_16BITS(&egp->egp_sequence), + length); + return; + } else + printf("EGPv%u, length %u", + egp->egp_version, + length); if (egp->egp_version != EGP_VERSION) { printf("[version %d]", egp->egp_version); return; } - printf("as:%d seq:%d", EXTRACT_16BITS(&egp->egp_as), EXTRACT_16BITS(&egp->egp_sequence)); type = egp->egp_type; code = egp->egp_code; diff --git a/print-eigrp.c b/print-eigrp.c index 3168b3ca784c..2787bafb9d26 100644 --- a/print-eigrp.c +++ b/print-eigrp.c @@ -16,7 +16,7 @@ #ifndef lint static const char rcsid[] _U_ = - "@(#) $Header: /tcpdump/master/tcpdump/print-eigrp.c,v 1.5.2.2 2005/05/06 02:53:41 guy Exp $"; + "@(#) $Header: /tcpdump/master/tcpdump/print-eigrp.c,v 1.7 2005-05-06 02:53:26 guy Exp $"; #endif #ifdef HAVE_CONFIG_H diff --git a/print-enc.c b/print-enc.c index f9b871b351d8..9569534cbd70 100644 --- a/print-enc.c +++ b/print-enc.c @@ -23,7 +23,7 @@ #ifndef lint static const char rcsid[] _U_ = - "@(#) $Header: /tcpdump/master/tcpdump/print-enc.c,v 1.4 2005/04/06 21:32:39 mcr Exp $ (LBL)"; + "@(#) $Header: /tcpdump/master/tcpdump/print-enc.c,v 1.4.4.1 2008-02-06 10:34:15 guy Exp $ (LBL)"; #endif #ifdef HAVE_CONFIG_H @@ -70,8 +70,17 @@ enc_if_print(const struct pcap_pkthdr *h, register const u_char *p) printf("SPI 0x%08x: ", (u_int32_t)ntohl(hdr->spi)); length -= ENC_HDRLEN; - /* XXX - use the address family */ - ip_print(gndo, p + ENC_HDRLEN, length); + caplen -= ENC_HDRLEN; + p += ENC_HDRLEN; + + switch (hdr->af) { + case AF_INET: + ip_print(gndo, p, length); + break; + case AF_INET6: + ip6_print(p, length); + break; + } out: return (ENC_HDRLEN); diff --git a/print-esp.c b/print-esp.c index 3ccc899e9cf4..260fe8710e89 100644 --- a/print-esp.c +++ b/print-esp.c @@ -23,7 +23,7 @@ #ifndef lint static const char rcsid[] _U_ = - "@(#) $Header: /tcpdump/master/tcpdump/print-esp.c,v 1.55.2.1 2005/04/21 06:44:57 guy Exp $ (LBL)"; + "@(#) $Header: /tcpdump/master/tcpdump/print-esp.c,v 1.56 2005-04-21 06:44:40 guy Exp $ (LBL)"; #endif #ifdef HAVE_CONFIG_H diff --git a/print-ether.c b/print-ether.c index f71a7ccdca0f..b66e885c6bcd 100644 --- a/print-ether.c +++ b/print-ether.c @@ -20,7 +20,7 @@ */ #ifndef lint static const char rcsid[] _U_ = - "@(#) $Header: /tcpdump/master/tcpdump/print-ether.c,v 1.95.2.6 2006/02/20 18:15:03 hannes Exp $ (LBL)"; + "@(#) $Header: /tcpdump/master/tcpdump/print-ether.c,v 1.105.2.1 2008-02-06 10:49:22 guy Exp $ (LBL)"; #endif #ifdef HAVE_CONFIG_H @@ -65,14 +65,19 @@ const struct tok ethertype_values[] = { { ETHERTYPE_AARP, "Appletalk ARP" }, { ETHERTYPE_IPX, "IPX" }, { ETHERTYPE_PPP, "PPP" }, + { ETHERTYPE_MPCP, "MPCP" }, { ETHERTYPE_SLOW, "Slow Protocols" }, { ETHERTYPE_PPPOED, "PPPoE D" }, { ETHERTYPE_PPPOES, "PPPoE S" }, { ETHERTYPE_EAPOL, "EAPOL" }, + { ETHERTYPE_RRCP, "RRCP" }, { ETHERTYPE_JUMBO, "Jumbo" }, { ETHERTYPE_LOOPBACK, "Loopback" }, { ETHERTYPE_ISO, "OSI" }, { ETHERTYPE_GRE_ISO, "GRE-OSI" }, + { ETHERTYPE_CFM_OLD, "CFM (old)" }, + { ETHERTYPE_CFM, "CFM" }, + { ETHERTYPE_LLDP, "LLDP" }, { 0, NULL} }; @@ -291,6 +296,10 @@ ether_encap_print(u_short ether_type, const u_char *p, eap_print(gndo, p, length); return (1); + case ETHERTYPE_RRCP: + rrcp_print(gndo, p - 14 , length + 14); + return (1); + case ETHERTYPE_PPP: if (length) { printf(": "); @@ -298,10 +307,23 @@ ether_encap_print(u_short ether_type, const u_char *p, } return (1); + case ETHERTYPE_MPCP: + mpcp_print(p, length); + return (1); + case ETHERTYPE_SLOW: slow_print(p, length); return (1); + case ETHERTYPE_CFM: + case ETHERTYPE_CFM_OLD: + cfm_print(p, length); + return (1); + + case ETHERTYPE_LLDP: + lldp_print(p, length); + return (1); + case ETHERTYPE_LOOPBACK: return (1); diff --git a/print-fddi.c b/print-fddi.c index eeb7191b3feb..1e7d554ad710 100644 --- a/print-fddi.c +++ b/print-fddi.c @@ -21,7 +21,7 @@ #ifndef lint static const char rcsid[] _U_ = - "@(#) $Header: /tcpdump/master/tcpdump/print-fddi.c,v 1.64.2.2 2005/11/13 12:12:59 guy Exp $ (LBL)"; + "@(#) $Header: /tcpdump/master/tcpdump/print-fddi.c,v 1.66 2005-11-13 12:12:41 guy Exp $ (LBL)"; #endif #ifdef HAVE_CONFIG_H diff --git a/print-fr.c b/print-fr.c index b53a88bdc894..f71aee665273 100644 --- a/print-fr.c +++ b/print-fr.c @@ -21,7 +21,7 @@ #ifndef lint static const char rcsid[] _U_ = - "@(#)$Header: /tcpdump/master/tcpdump/print-fr.c,v 1.32.2.15 2006/02/01 14:39:56 hannes Exp $ (LBL)"; + "@(#)$Header: /tcpdump/master/tcpdump/print-fr.c,v 1.51 2006-06-23 22:20:32 hannes Exp $ (LBL)"; #endif #ifdef HAVE_CONFIG_H @@ -100,7 +100,7 @@ struct tok frf_flag_values[] = { /* Finds out Q.922 address length, DLCI and flags. Returns 0 on success * save the flags dep. on address length */ -static int parse_q922_addr(const u_char *p, u_int *dlci, u_int *sdlcore, +static int parse_q922_addr(const u_char *p, u_int *dlci, u_int *addr_len, u_int8_t *flags) { if ((p[0] & FR_EA_BIT)) @@ -130,14 +130,26 @@ static int parse_q922_addr(const u_char *p, u_int *dlci, u_int *sdlcore, flags[3] = p[0] & 0x02; - if (p[0] & 0x02) - *sdlcore = p[0] >> 2; - else - *dlci = (*dlci << 6) | (p[0] >> 2); + *dlci = (*dlci << 6) | (p[0] >> 2); return 0; } +char *q922_string(const u_char *p) { + + static u_int dlci, addr_len; + static u_int8_t flags[4]; + static char buffer[sizeof("DLCI xxxxxxxxxx")]; + memset(buffer, 0, sizeof(buffer)); + + if (parse_q922_addr(p, &dlci, &addr_len, flags) == 0){ + snprintf(buffer, sizeof(buffer), "DLCI %u", dlci); + } + + return buffer; +} + + /* Frame Relay packet structure, with flags and CRC removed +---------------------------+ @@ -222,13 +234,12 @@ fr_print(register const u_char *p, u_int length) { u_int16_t extracted_ethertype; u_int dlci; - u_int sdlcore; u_int addr_len; u_int16_t nlpid; u_int hdr_len; u_int8_t flags[4]; - if (parse_q922_addr(p, &dlci, &sdlcore, &addr_len, flags)) { + if (parse_q922_addr(p, &dlci, &addr_len, flags)) { printf("Q.922, invalid address"); return 0; } @@ -730,25 +741,29 @@ q933_print(const u_char *p, u_int length) codeset = p[2]&0x0f; /* extract the codeset */ - if (p[2] == MSG_ANSI_LOCKING_SHIFT) - is_ansi = 1; + if (p[2] == MSG_ANSI_LOCKING_SHIFT) { + is_ansi = 1; + } printf("%s", eflag ? "" : "Q.933, "); /* printing out header part */ printf("%s, codeset %u", is_ansi ? "ANSI" : "CCITT", codeset); - if (p[0]) - printf(", Call Ref: 0x%02x", p[0]); - - if (vflag) - printf(", %s (0x%02x), length %u", - tok2str(fr_q933_msg_values,"unknown message",p[1]), - p[1], - length); - else - printf(", %s", - tok2str(fr_q933_msg_values,"unknown message 0x%02x",p[1])); + if (p[0]) { + printf(", Call Ref: 0x%02x", p[0]); + } + if (vflag) { + printf(", %s (0x%02x), length %u", + tok2str(fr_q933_msg_values, + "unknown message", p[1]), + p[1], + length); + } else { + printf(", %s", + tok2str(fr_q933_msg_values, + "unknown message 0x%02x", p[1])); + } olen = length; /* preserve the original length for non verbose mode */ @@ -756,49 +771,57 @@ q933_print(const u_char *p, u_int length) printf("[|q.933]"); return; } - length -= 2 - is_ansi; + length -= 2 + is_ansi; ptemp += 2 + is_ansi; /* Loop through the rest of IE */ - while (length > sizeof(struct ie_tlv_header_t )) { + while (length > sizeof(struct ie_tlv_header_t)) { ie_p = (struct ie_tlv_header_t *)ptemp; - if (length < sizeof(struct ie_tlv_header_t ) || - length < sizeof(struct ie_tlv_header_t ) + ie_p->ie_len) { - if (vflag) /* not bark if there is just a trailer */ + if (length < sizeof(struct ie_tlv_header_t) || + length < sizeof(struct ie_tlv_header_t) + ie_p->ie_len) { + if (vflag) { /* not bark if there is just a trailer */ printf("\n[|q.933]"); - else + } else { printf(", length %u",olen); + } return; } /* lets do the full IE parsing only in verbose mode * however some IEs (DLCI Status, Link Verify) - * are also intereststing in non-verbose mode */ - if (vflag) + * are also interestting in non-verbose mode */ + if (vflag) { printf("\n\t%s IE (0x%02x), length %u: ", - tok2str(fr_q933_ie_codesets[codeset],"unknown",ie_p->ie_type), + tok2str(fr_q933_ie_codesets[codeset], + "unknown", ie_p->ie_type), ie_p->ie_type, ie_p->ie_len); - - /* sanity check */ - if (ie_p->ie_type == 0 || ie_p->ie_len == 0) - return; + } - if (fr_q933_print_ie_codeset[codeset] != NULL) + /* sanity check */ + if (ie_p->ie_type == 0 || ie_p->ie_len == 0) { + return; + } + + if (fr_q933_print_ie_codeset[codeset] != NULL) { ie_is_known = fr_q933_print_ie_codeset[codeset](ie_p, ptemp); - - if (vflag >= 1 && !ie_is_known) + } + + if (vflag >= 1 && !ie_is_known) { print_unknown_data(ptemp+2,"\n\t",ie_p->ie_len); + } /* do we want to see a hexdump of the IE ? */ - if (vflag> 1 && ie_is_known) + if (vflag> 1 && ie_is_known) { print_unknown_data(ptemp+2,"\n\t ",ie_p->ie_len); + } length = length - ie_p->ie_len - 2; ptemp = ptemp + ie_p->ie_len + 2; } - if (!vflag) + if (!vflag) { printf(", length %u",olen); + } } static int @@ -810,24 +833,27 @@ fr_q933_print_ie_codeset5(const struct ie_tlv_header_t *ie_p, const u_char *p) case FR_LMI_ANSI_REPORT_TYPE_IE: /* fall through */ case FR_LMI_CCITT_REPORT_TYPE_IE: - if (vflag) + if (vflag) { printf("%s (%u)", tok2str(fr_lmi_report_type_ie_values,"unknown",p[2]), p[2]); + } return 1; case FR_LMI_ANSI_LINK_VERIFY_IE: /* fall through */ case FR_LMI_CCITT_LINK_VERIFY_IE: case FR_LMI_ANSI_LINK_VERIFY_IE_91: - if (!vflag) + if (!vflag) { printf(", "); + } printf("TX Seq: %3d, RX Seq: %3d", p[2], p[3]); return 1; case FR_LMI_ANSI_PVC_STATUS_IE: /* fall through */ case FR_LMI_CCITT_PVC_STATUS_IE: - if (!vflag) + if (!vflag) { printf(", "); + } /* now parse the DLCI information element. */ if ((ie_p->ie_len < 3) || (p[2] & 0x80) || @@ -836,14 +862,17 @@ fr_q933_print_ie_codeset5(const struct ie_tlv_header_t *ie_p, const u_char *p) ((ie_p->ie_len == 5) && ((p[3] & 0x80) || (p[4] & 0x80) || !(p[5] & 0x80))) || (ie_p->ie_len > 5) || - !(p[ie_p->ie_len + 1] & 0x80)) + !(p[ie_p->ie_len + 1] & 0x80)) { printf("Invalid DLCI IE"); + } dlci = ((p[2] & 0x3F) << 4) | ((p[3] & 0x78) >> 3); - if (ie_p->ie_len == 4) + if (ie_p->ie_len == 4) { dlci = (dlci << 6) | ((p[4] & 0x7E) >> 1); - else if (ie_p->ie_len == 5) + } + else if (ie_p->ie_len == 5) { dlci = (dlci << 13) | (p[4] & 0x7F) | ((p[5] & 0x7E) >> 1); + } printf("DLCI %u: status %s%s", dlci, p[ie_p->ie_len + 1] & 0x8 ? "New, " : "", diff --git a/print-frag6.c b/print-frag6.c index 2c7788ba2600..e125bd3ef9d2 100644 --- a/print-frag6.c +++ b/print-frag6.c @@ -21,7 +21,7 @@ #ifndef lint static const char rcsid[] _U_ = - "@(#) $Header: /tcpdump/master/tcpdump/print-frag6.c,v 1.19.2.1 2005/04/20 22:33:21 guy Exp $"; + "@(#) $Header: /tcpdump/master/tcpdump/print-frag6.c,v 1.20 2005-04-20 22:33:06 guy Exp $"; #endif #ifdef HAVE_CONFIG_H diff --git a/print-gre.c b/print-gre.c index d739356ac818..55f0e9d16b33 100644 --- a/print-gre.c +++ b/print-gre.c @@ -38,7 +38,7 @@ #ifndef lint static const char rcsid[] _U_ = - "@(#) $Header: /tcpdump/master/tcpdump/print-gre.c,v 1.28 2005/04/06 21:32:39 mcr Exp $ (LBL)"; + "@(#) $Header: /tcpdump/master/tcpdump/print-gre.c,v 1.28 2005-04-06 21:32:39 mcr Exp $ (LBL)"; #endif #ifdef HAVE_CONFIG_H diff --git a/print-hsrp.c b/print-hsrp.c index 1d22247e8e84..06304fd5677b 100644 --- a/print-hsrp.c +++ b/print-hsrp.c @@ -31,7 +31,7 @@ #ifndef lint static const char rcsid[] _U_ = - "@(#) $Header: /tcpdump/master/tcpdump/print-hsrp.c,v 1.9.2.1 2005/05/06 07:57:17 guy Exp $"; + "@(#) $Header: /tcpdump/master/tcpdump/print-hsrp.c,v 1.10 2005-05-06 07:56:52 guy Exp $"; #endif #ifdef HAVE_CONFIG_H diff --git a/print-icmp.c b/print-icmp.c index e9e8459f41c6..36bff6a41214 100644 --- a/print-icmp.c +++ b/print-icmp.c @@ -21,7 +21,7 @@ #ifndef lint static const char rcsid[] _U_ = - "@(#) $Header: /tcpdump/master/tcpdump/print-icmp.c,v 1.81.2.6 2007/09/13 17:40:18 guy Exp $ (LBL)"; + "@(#) $Header: /tcpdump/master/tcpdump/print-icmp.c,v 1.87 2007-09-13 17:42:31 guy Exp $ (LBL)"; #endif #ifdef HAVE_CONFIG_H @@ -412,7 +412,7 @@ icmp_print(const u_char *bp, u_int plen, const u_char *bp2, int fragmented) case ICMP_UNREACH_NEEDFRAG: { register const struct mtu_discovery *mp; - mp = (struct mtu_discovery *)&dp->icmp_void; + mp = (struct mtu_discovery *)(u_char *)&dp->icmp_void; mtu = EXTRACT_16BITS(&mp->nexthopmtu); if (mtu) { (void)snprintf(buf, sizeof(buf), diff --git a/print-icmp6.c b/print-icmp6.c index c5039247af11..41d56b68da84 100644 --- a/print-icmp6.c +++ b/print-icmp6.c @@ -21,7 +21,7 @@ #ifndef lint static const char rcsid[] _U_ = - "@(#) $Header: /tcpdump/master/tcpdump/print-icmp6.c,v 1.79.2.6 2005/09/05 09:29:28 guy Exp $"; + "@(#) $Header: /tcpdump/master/tcpdump/print-icmp6.c,v 1.85.2.1 2008-02-05 19:36:58 guy Exp $"; #endif #ifdef HAVE_CONFIG_H @@ -1192,9 +1192,9 @@ icmp6_rrenum_print(const u_char *bp, const u_char *ep) F(ICMP6_RR_FLAGS_PREVDONE, "P")); } printf("seg=%u,", rr6->rr_segnum); - printf("maxdelay=%u", rr6->rr_maxdelay); + printf("maxdelay=%u", EXTRACT_16BITS(&rr6->rr_maxdelay)); if (rr6->rr_reserved) - printf("rsvd=0x%x", EXTRACT_16BITS(&rr6->rr_reserved)); + printf("rsvd=0x%x", EXTRACT_32BITS(&rr6->rr_reserved)); /*[*/ printf("]"); #undef F diff --git a/print-igmp.c b/print-igmp.c index c310d55b9dc0..a848562985d9 100644 --- a/print-igmp.c +++ b/print-igmp.c @@ -21,7 +21,7 @@ #ifndef lint static const char rcsid[] _U_ = - "@(#) $Header: /tcpdump/master/tcpdump/print-igmp.c,v 1.15 2004/03/24 00:59:16 guy Exp $ (LBL)"; + "@(#) $Header: /tcpdump/master/tcpdump/print-igmp.c,v 1.15 2004-03-24 00:59:16 guy Exp $ (LBL)"; #endif #ifdef HAVE_CONFIG_H diff --git a/print-igrp.c b/print-igrp.c index 898471d08f48..3cede7ec89da 100644 --- a/print-igrp.c +++ b/print-igrp.c @@ -23,7 +23,7 @@ #ifndef lint static const char rcsid[] _U_ = - "@(#) $Header: /tcpdump/master/tcpdump/print-igrp.c,v 1.20.2.1 2005/04/20 21:02:15 guy Exp $ (LBL)"; + "@(#) $Header: /tcpdump/master/tcpdump/print-igrp.c,v 1.21 2005-04-20 21:01:56 guy Exp $ (LBL)"; #endif #ifdef HAVE_CONFIG_H diff --git a/print-ip.c b/print-ip.c index 07238f51d569..8bdf5ebce3e2 100644 --- a/print-ip.c +++ b/print-ip.c @@ -21,7 +21,7 @@ #ifndef lint static const char rcsid[] _U_ = - "@(#) $Header: /tcpdump/master/tcpdump/print-ip.c,v 1.149.2.9 2007/09/14 01:30:02 guy Exp $ (LBL)"; + "@(#) $Header: /tcpdump/master/tcpdump/print-ip.c,v 1.159 2007-09-14 01:29:28 guy Exp $ (LBL)"; #endif #ifdef HAVE_CONFIG_H @@ -666,7 +666,7 @@ ip_print(netdissect_options *ndo, } } - printf(") "); + printf(")\n "); } /* diff --git a/print-ip6.c b/print-ip6.c index 29e5988b19e9..0758bb952ed0 100644 --- a/print-ip6.c +++ b/print-ip6.c @@ -21,7 +21,7 @@ #ifndef lint static const char rcsid[] _U_ = - "@(#) $Header: /tcpdump/master/tcpdump/print-ip6.c,v 1.47.2.5 2007/09/21 07:07:52 hannes Exp $"; + "@(#) $Header: /tcpdump/master/tcpdump/print-ip6.c,v 1.52 2007-09-21 07:05:33 hannes Exp $"; #endif #ifdef HAVE_CONFIG_H diff --git a/print-ip6opts.c b/print-ip6opts.c index 82163a261e1d..7a4bf5593a86 100644 --- a/print-ip6opts.c +++ b/print-ip6opts.c @@ -33,7 +33,7 @@ #ifndef lint static const char rcsid[] _U_ = - "@(#) $Header: /tcpdump/master/tcpdump/print-ip6opts.c,v 1.17.2.1 2005/04/20 22:19:06 guy Exp $"; + "@(#) $Header: /tcpdump/master/tcpdump/print-ip6opts.c,v 1.18 2005-04-20 22:18:50 guy Exp $"; #endif #ifdef INET6 diff --git a/print-ipcomp.c b/print-ipcomp.c index 099e5ad9b69e..89130a373c07 100644 --- a/print-ipcomp.c +++ b/print-ipcomp.c @@ -21,7 +21,7 @@ #ifndef lint static const char rcsid[] _U_ = - "@(#) $Header: /tcpdump/master/tcpdump/print-ipcomp.c,v 1.20 2003/11/19 00:36:08 guy Exp $"; + "@(#) $Header: /tcpdump/master/tcpdump/print-ipcomp.c,v 1.20 2003-11-19 00:36:08 guy Exp $"; #endif #ifdef HAVE_CONFIG_H diff --git a/print-ipfc.c b/print-ipfc.c index 6712e5f92a4c..c980765196b3 100644 --- a/print-ipfc.c +++ b/print-ipfc.c @@ -21,7 +21,7 @@ #ifndef lint static const char rcsid[] _U_ = - "@(#) $Header: /tcpdump/master/tcpdump/print-ipfc.c,v 1.7.2.2 2005/11/13 12:12:59 guy Exp $ (LBL)"; + "@(#) $Header: /tcpdump/master/tcpdump/print-ipfc.c,v 1.9 2005-11-13 12:12:42 guy Exp $ (LBL)"; #endif #ifdef HAVE_CONFIG_H diff --git a/print-ipx.c b/print-ipx.c index 5309aa47d123..604561c60845 100644 --- a/print-ipx.c +++ b/print-ipx.c @@ -24,7 +24,7 @@ #ifndef lint static const char rcsid[] _U_ = - "@(#) $Header: /tcpdump/master/tcpdump/print-ipx.c,v 1.40.2.2 2005/05/06 08:27:00 guy Exp $"; + "@(#) $Header: /tcpdump/master/tcpdump/print-ipx.c,v 1.42 2005-05-06 08:26:44 guy Exp $"; #endif #ifdef HAVE_CONFIG_H diff --git a/print-isakmp.c b/print-isakmp.c index 09972f0292b5..763f58aa5eb2 100644 --- a/print-isakmp.c +++ b/print-isakmp.c @@ -30,9 +30,10 @@ #ifndef lint static const char rcsid[] _U_ = - "@(#) $Header: /tcpdump/master/tcpdump/print-isakmp.c,v 1.51 2005/04/07 00:28:17 mcr Exp $ (LBL)"; + "@(#) $Header: /tcpdump/master/tcpdump/print-isakmp.c,v 1.56 2007-08-29 12:31:00 mcr Exp $ (LBL)"; #endif +#define NETDISSECT_REWORKED #ifdef HAVE_CONFIG_H #include "config.h" #endif @@ -59,39 +60,64 @@ static const char rcsid[] _U_ = #define sockaddr_storage sockaddr #endif -static const u_char *isakmp_sa_print(const struct isakmp_gen *, - u_int, const u_char *, u_int32_t, u_int32_t, u_int32_t, int); -static const u_char *isakmp_p_print(const struct isakmp_gen *, - u_int, const u_char *, u_int32_t, u_int32_t, u_int32_t, int); -static const u_char *isakmp_t_print(const struct isakmp_gen *, - u_int, const u_char *, u_int32_t, u_int32_t, u_int32_t, int); -static const u_char *isakmp_ke_print(const struct isakmp_gen *, - u_int, const u_char *, u_int32_t, u_int32_t, u_int32_t, int); -static const u_char *isakmp_id_print(const struct isakmp_gen *, - u_int, const u_char *, u_int32_t, u_int32_t, u_int32_t, int); -static const u_char *isakmp_cert_print(const struct isakmp_gen *, - u_int, const u_char *, u_int32_t, u_int32_t, u_int32_t, int); -static const u_char *isakmp_cr_print(const struct isakmp_gen *, - u_int, const u_char *, u_int32_t, u_int32_t, u_int32_t, int); -static const u_char *isakmp_sig_print(const struct isakmp_gen *, - u_int, const u_char *, u_int32_t, u_int32_t, u_int32_t, int); -static const u_char *isakmp_hash_print(const struct isakmp_gen *, - u_int, const u_char *, u_int32_t, u_int32_t, u_int32_t, int); -static const u_char *isakmp_nonce_print(const struct isakmp_gen *, - u_int, const u_char *, u_int32_t, u_int32_t, u_int32_t, int); -static const u_char *isakmp_n_print(const struct isakmp_gen *, - u_int, const u_char *, u_int32_t, u_int32_t, u_int32_t, int); -static const u_char *isakmp_d_print(const struct isakmp_gen *, - u_int, const u_char *, u_int32_t, u_int32_t, u_int32_t, int); -static const u_char *isakmp_vid_print(const struct isakmp_gen *, - u_int, const u_char *, u_int32_t, u_int32_t, u_int32_t, int); -static const u_char *isakmp_sub0_print(u_char, const struct isakmp_gen *, +#define DECLARE_PRINTER(func) static const u_char *ike##func##_print( \ + netdissect_options *ndo, u_char tpay, \ + const struct isakmp_gen *ext, \ + u_int item_len, \ + const u_char *end_pointer, \ + u_int32_t phase,\ + u_int32_t doi0, \ + u_int32_t proto0, int depth) + +DECLARE_PRINTER(v1_sa); +DECLARE_PRINTER(v1_p); +DECLARE_PRINTER(v1_t); +DECLARE_PRINTER(v1_ke); +DECLARE_PRINTER(v1_id); +DECLARE_PRINTER(v1_cert); +DECLARE_PRINTER(v1_cr); +DECLARE_PRINTER(v1_sig); +DECLARE_PRINTER(v1_hash); +DECLARE_PRINTER(v1_nonce); +DECLARE_PRINTER(v1_n); +DECLARE_PRINTER(v1_d); +DECLARE_PRINTER(v1_vid); + +DECLARE_PRINTER(v2_sa); +DECLARE_PRINTER(v2_ke); +DECLARE_PRINTER(v2_ID); +DECLARE_PRINTER(v2_cert); +DECLARE_PRINTER(v2_cr); +DECLARE_PRINTER(v2_auth); +DECLARE_PRINTER(v2_nonce); +DECLARE_PRINTER(v2_n); +DECLARE_PRINTER(v2_d); +DECLARE_PRINTER(v2_vid); +DECLARE_PRINTER(v2_TS); +DECLARE_PRINTER(v2_e); +DECLARE_PRINTER(v2_cp); +DECLARE_PRINTER(v2_eap); + +static const u_char *ike_sub0_print(netdissect_options *ndo,u_char, const struct isakmp_gen *, const u_char *, u_int32_t, u_int32_t, u_int32_t, int); -static const u_char *isakmp_sub_print(u_char, const struct isakmp_gen *, +static const u_char *ikev1_sub_print(netdissect_options *ndo,u_char, const struct isakmp_gen *, const u_char *, u_int32_t, u_int32_t, u_int32_t, int); + +static const u_char *ikev2_sub_print(netdissect_options *ndo, + u_char np, const struct isakmp_gen *ext, + const u_char *ep, u_int32_t phase, + u_int32_t doi, u_int32_t proto, + int depth); + + static char *numstr(int); static void safememcpy(void *, const void *, size_t); +static void +ikev1_print(netdissect_options *ndo, + const u_char *bp, u_int length, + const u_char *bp2, struct isakmp *base); + #define MAXINITIATORS 20 int ninitiator = 0; struct { @@ -107,36 +133,73 @@ static const char *protoidstr[] = { /* isakmp->np */ static const char *npstr[] = { - "none", "sa", "p", "t", "ke", "id", "cert", "cr", "hash", - "sig", "nonce", "n", "d", "vid" + "none", "sa", "p", "t", "ke", "id", "cert", "cr", "hash", /* 0 - 8 */ + "sig", "nonce", "n", "d", "vid", /* 9 - 13 */ + "pay14", "pay15", "pay16", "pay17", "pay18", /* 14- 18 */ + "pay19", "pay20", "pay21", "pay22", "pay23", /* 19- 23 */ + "pay24", "pay25", "pay26", "pay27", "pay28", /* 24- 28 */ + "pay29", "pay30", "pay31", "pay32", /* 29- 32 */ + "v2sa", "v2ke", "v2IDi", "v2IDr", "v2cert",/* 33- 37 */ + "v2cr", "v2auth","v2nonce", "v2n", "v2d", /* 38- 42 */ + "v2vid", "v2TSi", "v2TSr", "v2e", "v2cp", /* 43- 47 */ + "v2eap", /* 48 */ + }; /* isakmp->np */ -static const u_char *(*npfunc[])(const struct isakmp_gen *, u_int, - const u_char *, u_int32_t, u_int32_t, u_int32_t, int) = { +static const u_char *(*npfunc[])(netdissect_options *ndo, u_char tpay, + const struct isakmp_gen *ext, + u_int item_len, + const u_char *end_pointer, + u_int32_t phase, + u_int32_t doi0, + u_int32_t proto0, int depth) = { NULL, - isakmp_sa_print, - isakmp_p_print, - isakmp_t_print, - isakmp_ke_print, - isakmp_id_print, - isakmp_cert_print, - isakmp_cr_print, - isakmp_hash_print, - isakmp_sig_print, - isakmp_nonce_print, - isakmp_n_print, - isakmp_d_print, - isakmp_vid_print, + ikev1_sa_print, + ikev1_p_print, + ikev1_t_print, + ikev1_ke_print, + ikev1_id_print, + ikev1_cert_print, + ikev1_cr_print, + ikev1_hash_print, + ikev1_sig_print, + ikev1_nonce_print, + ikev1_n_print, + ikev1_d_print, + ikev1_vid_print, /* 13 */ + NULL, NULL, NULL, NULL, NULL, /* 14- 18 */ + NULL, NULL, NULL, NULL, NULL, /* 19- 23 */ + NULL, NULL, NULL, NULL, NULL, /* 24- 28 */ + NULL, NULL, NULL, NULL, /* 29- 32 */ + ikev2_sa_print, /* 33 */ + ikev2_ke_print, /* 34 */ + ikev2_ID_print, /* 35 */ + ikev2_ID_print, /* 36 */ + ikev2_cert_print, /* 37 */ + ikev2_cr_print, /* 38 */ + ikev2_auth_print, /* 39 */ + ikev2_nonce_print, /* 40 */ + ikev2_n_print, /* 41 */ + ikev2_d_print, /* 42 */ + ikev2_vid_print, /* 43 */ + ikev2_TS_print, /* 44 */ + ikev2_TS_print, /* 45 */ + ikev2_e_print, /* 46 */ + ikev2_cp_print, /* 47 */ + ikev2_eap_print, /* 48 */ }; /* isakmp->etype */ static const char *etypestr[] = { - "none", "base", "ident", "auth", "agg", "inf", NULL, NULL, - NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, - NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, - NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, - "oakley-quick", "oakley-newgroup", +/* IKEv1 exchange types */ + "none", "base", "ident", "auth", "agg", "inf", NULL, NULL, /* 0-7 */ + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, /* 8-15 */ + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, /* 16-23 */ + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, /* 24-31 */ + "oakley-quick", "oakley-newgroup", /* 32-33 */ +/* IKEv2 exchange types */ + "ikev2_init", "ikev2_auth", "child_sa", "inf2" /* 34-37 */ }; #define STR_OR_ID(x, tab) \ @@ -145,6 +208,13 @@ static const char *etypestr[] = { #define NPSTR(x) STR_OR_ID(x, npstr) #define ETYPESTR(x) STR_OR_ID(x, etypestr) +#define CHECKLEN(p, np) \ + if (ep < (u_char *)(p)) { \ + ND_PRINT((ndo," [|%s]", NPSTR(np))); \ + goto done; \ + } + + #define NPFUNC(x) \ (((x) < sizeof(npfunc)/sizeof(npfunc[0]) && npfunc[(x)]) \ ? npfunc[(x)] : NULL) @@ -322,21 +392,54 @@ cookie_sidecheck(int i, const u_char *bp2, int initiator) } static int -rawprint(caddr_t loc, size_t len) +rawprint(netdissect_options *ndo, caddr_t loc, size_t len) { static u_char *p; size_t i; - TCHECK2(*loc, len); + ND_TCHECK2(*loc, len); p = (u_char *)loc; for (i = 0; i < len; i++) - printf("%02x", p[i] & 0xff); + ND_PRINT((ndo,"%02x", p[i] & 0xff)); return 1; trunc: return 0; } +/* + * returns false if we run out of data buffer + */ +static int ike_show_somedata(struct netdissect_options *ndo, + const u_char *cp, const u_char *ep) +{ + /* there is too much data, just show some of it */ + const u_char *end = ep - 20; + int elen = 20; + int len = ep - cp; + if(len > 10) { + len = 10; + } + + /* really shouldn't happen because of above */ + if(end < cp + len) { + end = cp+len; + elen = ep - end; + } + + ND_PRINT((ndo," data=(")); + if(!rawprint(ndo, (caddr_t)(cp), len)) goto trunc; + ND_PRINT((ndo, "...")); + if(elen) { + if(!rawprint(ndo, (caddr_t)(end), elen)) goto trunc; + } + ND_PRINT((ndo,")")); + return 1; + +trunc: + return 0; +} + struct attrmap { const char *type; u_int nvalue; @@ -344,8 +447,9 @@ struct attrmap { }; static const u_char * -isakmp_attrmap_print(const u_char *p, const u_char *ep, - const struct attrmap *map, size_t nmap) +ikev1_attrmap_print(netdissect_options *ndo, + const u_char *p, const u_char *ep, + const struct attrmap *map, size_t nmap) { u_int16_t *q; int totlen; @@ -357,33 +461,33 @@ isakmp_attrmap_print(const u_char *p, const u_char *ep, else totlen = 4 + EXTRACT_16BITS(&q[1]); if (ep < p + totlen) { - printf("[|attr]"); + ND_PRINT((ndo,"[|attr]")); return ep + 1; } - printf("("); + ND_PRINT((ndo,"(")); t = EXTRACT_16BITS(&q[0]) & 0x7fff; if (map && t < nmap && map[t].type) - printf("type=%s ", map[t].type); + ND_PRINT((ndo,"type=%s ", map[t].type)); else - printf("type=#%d ", t); + ND_PRINT((ndo,"type=#%d ", t)); if (p[0] & 0x80) { - printf("value="); + ND_PRINT((ndo,"value=")); v = EXTRACT_16BITS(&q[1]); if (map && t < nmap && v < map[t].nvalue && map[t].value[v]) - printf("%s", map[t].value[v]); + ND_PRINT((ndo,"%s", map[t].value[v])); else - rawprint((caddr_t)&q[1], 2); + rawprint(ndo, (caddr_t)&q[1], 2); } else { - printf("len=%d value=", EXTRACT_16BITS(&q[1])); - rawprint((caddr_t)&p[4], EXTRACT_16BITS(&q[1])); + ND_PRINT((ndo,"len=%d value=", EXTRACT_16BITS(&q[1]))); + rawprint(ndo, (caddr_t)&p[4], EXTRACT_16BITS(&q[1])); } - printf(")"); + ND_PRINT((ndo,")")); return p + totlen; } static const u_char * -isakmp_attr_print(const u_char *p, const u_char *ep) +ikev1_attr_print(netdissect_options *ndo, const u_char *p, const u_char *ep) { u_int16_t *q; int totlen; @@ -395,129 +499,166 @@ isakmp_attr_print(const u_char *p, const u_char *ep) else totlen = 4 + EXTRACT_16BITS(&q[1]); if (ep < p + totlen) { - printf("[|attr]"); + ND_PRINT((ndo,"[|attr]")); return ep + 1; } - printf("("); + ND_PRINT((ndo,"(")); t = EXTRACT_16BITS(&q[0]) & 0x7fff; - printf("type=#%d ", t); + ND_PRINT((ndo,"type=#%d ", t)); if (p[0] & 0x80) { - printf("value="); + ND_PRINT((ndo,"value=")); t = q[1]; - rawprint((caddr_t)&q[1], 2); + rawprint(ndo, (caddr_t)&q[1], 2); } else { - printf("len=%d value=", EXTRACT_16BITS(&q[1])); - rawprint((caddr_t)&p[2], EXTRACT_16BITS(&q[1])); + ND_PRINT((ndo,"len=%d value=", EXTRACT_16BITS(&q[1]))); + rawprint(ndo, (caddr_t)&p[2], EXTRACT_16BITS(&q[1])); } - printf(")"); + ND_PRINT((ndo,")")); return p + totlen; } static const u_char * -isakmp_sa_print(const struct isakmp_gen *ext, +ikev1_sa_print(netdissect_options *ndo, u_char tpay _U_, + const struct isakmp_gen *ext, u_int item_len _U_, const u_char *ep, u_int32_t phase, u_int32_t doi0 _U_, u_int32_t proto0, int depth) { - const struct isakmp_pl_sa *p; - struct isakmp_pl_sa sa; + const struct ikev1_pl_sa *p; + struct ikev1_pl_sa sa; const u_int32_t *q; u_int32_t doi, sit, ident; const u_char *cp, *np; int t; - printf("%s:", NPSTR(ISAKMP_NPTYPE_SA)); + ND_PRINT((ndo,"%s:", NPSTR(ISAKMP_NPTYPE_SA))); - p = (struct isakmp_pl_sa *)ext; - TCHECK(*p); + p = (struct ikev1_pl_sa *)ext; + ND_TCHECK(*p); safememcpy(&sa, ext, sizeof(sa)); doi = ntohl(sa.doi); sit = ntohl(sa.sit); if (doi != 1) { - printf(" doi=%d", doi); - printf(" situation=%u", (u_int32_t)ntohl(sa.sit)); + ND_PRINT((ndo," doi=%d", doi)); + ND_PRINT((ndo," situation=%u", (u_int32_t)ntohl(sa.sit))); return (u_char *)(p + 1); } - printf(" doi=ipsec"); + ND_PRINT((ndo," doi=ipsec")); q = (u_int32_t *)&sa.sit; - printf(" situation="); + ND_PRINT((ndo," situation=")); t = 0; if (sit & 0x01) { - printf("identity"); + ND_PRINT((ndo,"identity")); t++; } if (sit & 0x02) { - printf("%ssecrecy", t ? "+" : ""); + ND_PRINT((ndo,"%ssecrecy", t ? "+" : "")); t++; } if (sit & 0x04) - printf("%sintegrity", t ? "+" : ""); + ND_PRINT((ndo,"%sintegrity", t ? "+" : "")); np = (u_char *)ext + sizeof(sa); if (sit != 0x01) { - TCHECK2(*(ext + 1), sizeof(ident)); + ND_TCHECK2(*(ext + 1), sizeof(ident)); safememcpy(&ident, ext + 1, sizeof(ident)); - printf(" ident=%u", (u_int32_t)ntohl(ident)); + ND_PRINT((ndo," ident=%u", (u_int32_t)ntohl(ident))); np += sizeof(ident); } ext = (struct isakmp_gen *)np; - TCHECK(*ext); + ND_TCHECK(*ext); - cp = isakmp_sub_print(ISAKMP_NPTYPE_P, ext, ep, phase, doi, proto0, + cp = ikev1_sub_print(ndo, ISAKMP_NPTYPE_P, ext, ep, phase, doi, proto0, depth); return cp; trunc: - printf(" [|%s]", NPSTR(ISAKMP_NPTYPE_SA)); + ND_PRINT((ndo," [|%s]", NPSTR(ISAKMP_NPTYPE_SA))); return NULL; } static const u_char * -isakmp_p_print(const struct isakmp_gen *ext, u_int item_len _U_, +ikev1_p_print(netdissect_options *ndo, u_char tpay _U_, + const struct isakmp_gen *ext, u_int item_len _U_, const u_char *ep, u_int32_t phase, u_int32_t doi0, u_int32_t proto0 _U_, int depth) { - const struct isakmp_pl_p *p; - struct isakmp_pl_p prop; + const struct ikev1_pl_p *p; + struct ikev1_pl_p prop; const u_char *cp; - printf("%s:", NPSTR(ISAKMP_NPTYPE_P)); + ND_PRINT((ndo,"%s:", NPSTR(ISAKMP_NPTYPE_P))); - p = (struct isakmp_pl_p *)ext; - TCHECK(*p); + p = (struct ikev1_pl_p *)ext; + ND_TCHECK(*p); safememcpy(&prop, ext, sizeof(prop)); - printf(" #%d protoid=%s transform=%d", - prop.p_no, PROTOIDSTR(prop.prot_id), prop.num_t); + ND_PRINT((ndo," #%d protoid=%s transform=%d", + prop.p_no, PROTOIDSTR(prop.prot_id), prop.num_t)); if (prop.spi_size) { - printf(" spi="); - if (!rawprint((caddr_t)(p + 1), prop.spi_size)) + ND_PRINT((ndo," spi=")); + if (!rawprint(ndo, (caddr_t)(p + 1), prop.spi_size)) goto trunc; } ext = (struct isakmp_gen *)((u_char *)(p + 1) + prop.spi_size); - TCHECK(*ext); - - cp = isakmp_sub_print(ISAKMP_NPTYPE_T, ext, ep, phase, doi0, - prop.prot_id, depth); - + ND_TCHECK(*ext); + + cp = ikev1_sub_print(ndo, ISAKMP_NPTYPE_T, ext, ep, phase, doi0, + prop.prot_id, depth); + return cp; trunc: - printf(" [|%s]", NPSTR(ISAKMP_NPTYPE_P)); + ND_PRINT((ndo," [|%s]", NPSTR(ISAKMP_NPTYPE_P))); return NULL; } -static const char *isakmp_p_map[] = { +static const char *ikev1_p_map[] = { NULL, "ike", }; +static const char *ikev2_t_type_map[]={ + NULL, "encr", "prf", "integ", "dh", "esn" +}; + static const char *ah_p_map[] = { NULL, "(reserved)", "md5", "sha", "1des", "sha2-256", "sha2-384", "sha2-512", }; +static const char *prf_p_map[] = { + NULL, "hmac-md5", "hmac-sha", "hmac-tiger", + "aes128_xcbc" +}; + +static const char *integ_p_map[] = { + NULL, "hmac-md5", "hmac-sha", "dec-mac", + "kpdk-md5", "aes-xcbc" +}; + +static const char *esn_p_map[] = { + "no-esn", "esn" +}; + +static const char *dh_p_map[] = { + NULL, "modp768", + "modp1024", /* group 2 */ + "EC2N 2^155", /* group 3 */ + "EC2N 2^185", /* group 4 */ + "modp1536", /* group 5 */ + "iana-grp06", "iana-grp07", /* reserved */ + "iana-grp08", "iana-grp09", + "iana-grp10", "iana-grp11", + "iana-grp12", "iana-grp13", + "modp2048", /* group 14 */ + "modp3072", /* group 15 */ + "modp4096", /* group 16 */ + "modp6144", /* group 17 */ + "modp8192", /* group 18 */ +}; + static const char *esp_p_map[] = { NULL, "1des-iv64", "1des", "3des", "rc5", "idea", "cast", "blowfish", "3idea", "1des-iv32", "rc4", "null", "aes" @@ -531,8 +672,21 @@ const struct attrmap ipsec_t_map[] = { { NULL, 0, { NULL } }, { "lifetype", 3, { NULL, "sec", "kb", }, }, { "life", 0, { NULL } }, - { "group desc", 5, { NULL, "modp768", "modp1024", "EC2N 2^155", - "EC2N 2^185", }, }, + { "group desc", 18, { NULL, "modp768", + "modp1024", /* group 2 */ + "EC2N 2^155", /* group 3 */ + "EC2N 2^185", /* group 4 */ + "modp1536", /* group 5 */ + "iana-grp06", "iana-grp07", /* reserved */ + "iana-grp08", "iana-grp09", + "iana-grp10", "iana-grp11", + "iana-grp12", "iana-grp13", + "modp2048", /* group 14 */ + "modp3072", /* group 15 */ + "modp4096", /* group 16 */ + "modp6144", /* group 17 */ + "modp8192", /* group 18 */ + }, }, { "enc mode", 3, { NULL, "tunnel", "transport", }, }, { "auth", 5, { NULL, "hmac-md5", "hmac-sha1", "1des-mac", "keyed", }, }, { "keylen", 0, { NULL } }, @@ -541,6 +695,17 @@ const struct attrmap ipsec_t_map[] = { { "privalg", 0, { NULL } }, }; +const struct attrmap encr_t_map[] = { + { NULL, 0, { NULL } }, { NULL, 0, { NULL } }, /* 0, 1 */ + { NULL, 0, { NULL } }, { NULL, 0, { NULL } }, /* 2, 3 */ + { NULL, 0, { NULL } }, { NULL, 0, { NULL } }, /* 4, 5 */ + { NULL, 0, { NULL } }, { NULL, 0, { NULL } }, /* 6, 7 */ + { NULL, 0, { NULL } }, { NULL, 0, { NULL } }, /* 8, 9 */ + { NULL, 0, { NULL } }, { NULL, 0, { NULL } }, /* 10,11*/ + { NULL, 0, { NULL } }, { NULL, 0, { NULL } }, /* 12,13*/ + { "keylen", 14, { NULL }}, +}; + const struct attrmap oakley_t_map[] = { { NULL, 0, { NULL } }, { "enc", 8, { NULL, "1des", "idea", "blowfish", "rc5", @@ -549,8 +714,21 @@ const struct attrmap oakley_t_map[] = { "sha2-256", "sha2-384", "sha2-512", }, }, { "auth", 6, { NULL, "preshared", "dss", "rsa sig", "rsa enc", "rsa enc revised", }, }, - { "group desc", 5, { NULL, "modp768", "modp1024", "EC2N 2^155", - "EC2N 2^185", }, }, + { "group desc", 18, { NULL, "modp768", + "modp1024", /* group 2 */ + "EC2N 2^155", /* group 3 */ + "EC2N 2^185", /* group 4 */ + "modp1536", /* group 5 */ + "iana-grp06", "iana-grp07", /* reserved */ + "iana-grp08", "iana-grp09", + "iana-grp10", "iana-grp11", + "iana-grp12", "iana-grp13", + "modp2048", /* group 14 */ + "modp3072", /* group 15 */ + "modp4096", /* group 16 */ + "modp6144", /* group 17 */ + "modp8192", /* group 18 */ + }, }, { "group type", 4, { NULL, "MODP", "ECP", "EC2N", }, }, { "group prime", 0, { NULL } }, { "group gen1", 0, { NULL } }, @@ -566,27 +744,28 @@ const struct attrmap oakley_t_map[] = { }; static const u_char * -isakmp_t_print(const struct isakmp_gen *ext, u_int item_len, - const u_char *ep, u_int32_t phase _U_, u_int32_t doi _U_, - u_int32_t proto, int depth _U_) +ikev1_t_print(netdissect_options *ndo, u_char tpay _U_, + const struct isakmp_gen *ext, u_int item_len, + const u_char *ep, u_int32_t phase _U_, u_int32_t doi _U_, + u_int32_t proto, int depth _U_) { - const struct isakmp_pl_t *p; - struct isakmp_pl_t t; + const struct ikev1_pl_t *p; + struct ikev1_pl_t t; const u_char *cp; const char *idstr; const struct attrmap *map; size_t nmap; const u_char *ep2; - printf("%s:", NPSTR(ISAKMP_NPTYPE_T)); + ND_PRINT((ndo,"%s:", NPSTR(ISAKMP_NPTYPE_T))); - p = (struct isakmp_pl_t *)ext; - TCHECK(*p); + p = (struct ikev1_pl_t *)ext; + ND_TCHECK(*p); safememcpy(&t, ext, sizeof(t)); switch (proto) { case 1: - idstr = STR_OR_ID(t.t_id, isakmp_p_map); + idstr = STR_OR_ID(t.t_id, ikev1_p_map); map = oakley_t_map; nmap = sizeof(oakley_t_map)/sizeof(oakley_t_map[0]); break; @@ -613,57 +792,59 @@ isakmp_t_print(const struct isakmp_gen *ext, u_int item_len, } if (idstr) - printf(" #%d id=%s ", t.t_no, idstr); + ND_PRINT((ndo," #%d id=%s ", t.t_no, idstr)); else - printf(" #%d id=%d ", t.t_no, t.t_id); + ND_PRINT((ndo," #%d id=%d ", t.t_no, t.t_id)); cp = (u_char *)(p + 1); ep2 = (u_char *)p + item_len; while (cp < ep && cp < ep2) { if (map && nmap) { - cp = isakmp_attrmap_print(cp, (ep < ep2) ? ep : ep2, + cp = ikev1_attrmap_print(ndo, cp, (ep < ep2) ? ep : ep2, map, nmap); } else - cp = isakmp_attr_print(cp, (ep < ep2) ? ep : ep2); + cp = ikev1_attr_print(ndo, cp, (ep < ep2) ? ep : ep2); } if (ep < ep2) - printf("..."); + ND_PRINT((ndo,"...")); return cp; trunc: - printf(" [|%s]", NPSTR(ISAKMP_NPTYPE_T)); + ND_PRINT((ndo," [|%s]", NPSTR(ISAKMP_NPTYPE_T))); return NULL; } static const u_char * -isakmp_ke_print(const struct isakmp_gen *ext, u_int item_len _U_, - const u_char *ep _U_, u_int32_t phase _U_, u_int32_t doi _U_, - u_int32_t proto _U_, int depth _U_) +ikev1_ke_print(netdissect_options *ndo, u_char tpay _U_, + const struct isakmp_gen *ext, u_int item_len _U_, + const u_char *ep _U_, u_int32_t phase _U_, u_int32_t doi _U_, + u_int32_t proto _U_, int depth _U_) { struct isakmp_gen e; - printf("%s:", NPSTR(ISAKMP_NPTYPE_KE)); + ND_PRINT((ndo,"%s:", NPSTR(ISAKMP_NPTYPE_KE))); - TCHECK(*ext); + ND_TCHECK(*ext); safememcpy(&e, ext, sizeof(e)); - printf(" key len=%d", ntohs(e.len) - 4); - if (2 < vflag && 4 < ntohs(e.len)) { - printf(" "); - if (!rawprint((caddr_t)(ext + 1), ntohs(e.len) - 4)) + ND_PRINT((ndo," key len=%d", ntohs(e.len) - 4)); + if (2 < ndo->ndo_vflag && 4 < ntohs(e.len)) { + ND_PRINT((ndo," ")); + if (!rawprint(ndo, (caddr_t)(ext + 1), ntohs(e.len) - 4)) goto trunc; } return (u_char *)ext + ntohs(e.len); trunc: - printf(" [|%s]", NPSTR(ISAKMP_NPTYPE_KE)); + ND_PRINT((ndo," [|%s]", NPSTR(ISAKMP_NPTYPE_KE))); return NULL; } static const u_char * -isakmp_id_print(const struct isakmp_gen *ext, u_int item_len _U_, - const u_char *ep _U_, u_int32_t phase, u_int32_t doi _U_, - u_int32_t proto _U_, int depth _U_) +ikev1_id_print(netdissect_options *ndo, u_char tpay _U_, + const struct isakmp_gen *ext, u_int item_len _U_, + const u_char *ep _U_, u_int32_t phase, u_int32_t doi _U_, + u_int32_t proto _U_, int depth _U_) { #define USE_IPSECDOI_IN_PHASE1 1 - const struct isakmp_pl_id *p; - struct isakmp_pl_id id; + const struct ikev1_pl_id *p; + struct ikev1_pl_id id; static const char *idtypestr[] = { "IPv4", "IPv4net", "IPv6", "IPv6net", }; @@ -675,10 +856,10 @@ isakmp_id_print(const struct isakmp_gen *ext, u_int item_len _U_, int len; const u_char *data; - printf("%s:", NPSTR(ISAKMP_NPTYPE_ID)); + ND_PRINT((ndo,"%s:", NPSTR(ISAKMP_NPTYPE_ID))); - p = (struct isakmp_pl_id *)ext; - TCHECK(*p); + p = (struct ikev1_pl_id *)ext; + ND_TCHECK(*p); safememcpy(&id, ext, sizeof(id)); if (sizeof(*p) < item_len) { data = (u_char *)(p + 1); @@ -689,16 +870,16 @@ isakmp_id_print(const struct isakmp_gen *ext, u_int item_len _U_, } #if 0 /*debug*/ - printf(" [phase=%d doi=%d proto=%d]", phase, doi, proto); + ND_PRINT((ndo," [phase=%d doi=%d proto=%d]", phase, doi, proto)); #endif switch (phase) { #ifndef USE_IPSECDOI_IN_PHASE1 case 1: #endif default: - printf(" idtype=%s", STR_OR_ID(id.d.id_type, idtypestr)); - printf(" doi_data=%u", - (u_int32_t)(ntohl(id.d.doi_data) & 0xffffff)); + ND_PRINT((ndo," idtype=%s", STR_OR_ID(id.d.id_type, idtypestr))); + ND_PRINT((ndo," doi_data=%u", + (u_int32_t)(ntohl(id.d.doi_data) & 0xffffff))); break; #ifdef USE_IPSECDOI_IN_PHASE1 @@ -711,42 +892,42 @@ isakmp_id_print(const struct isakmp_gen *ext, u_int item_len _U_, struct protoent *pe; p = (struct ipsecdoi_id *)ext; - TCHECK(*p); + ND_TCHECK(*p); safememcpy(&id, ext, sizeof(id)); - printf(" idtype=%s", STR_OR_ID(id.type, ipsecidtypestr)); + ND_PRINT((ndo," idtype=%s", STR_OR_ID(id.type, ipsecidtypestr))); if (id.proto_id) { #ifndef WIN32 setprotoent(1); #endif /* WIN32 */ pe = getprotobynumber(id.proto_id); if (pe) - printf(" protoid=%s", pe->p_name); + ND_PRINT((ndo," protoid=%s", pe->p_name)); #ifndef WIN32 endprotoent(); #endif /* WIN32 */ } else { /* it DOES NOT mean IPPROTO_IP! */ - printf(" protoid=%s", "0"); + ND_PRINT((ndo," protoid=%s", "0")); } - printf(" port=%d", ntohs(id.port)); + ND_PRINT((ndo," port=%d", ntohs(id.port))); if (!len) break; if (data == NULL) goto trunc; - TCHECK2(*data, len); + ND_TCHECK2(*data, len); switch (id.type) { case IPSECDOI_ID_IPV4_ADDR: if (len < 4) - printf(" len=%d [bad: < 4]", len); + ND_PRINT((ndo," len=%d [bad: < 4]", len)); else - printf(" len=%d %s", len, ipaddr_string(data)); + ND_PRINT((ndo," len=%d %s", len, ipaddr_string(data))); len = 0; break; case IPSECDOI_ID_FQDN: case IPSECDOI_ID_USER_FQDN: { int i; - printf(" len=%d ", len); + ND_PRINT((ndo," len=%d ", len)); for (i = 0; i < len; i++) safeputchar(data[i]); len = 0; @@ -756,12 +937,12 @@ isakmp_id_print(const struct isakmp_gen *ext, u_int item_len _U_, { const u_char *mask; if (len < 8) - printf(" len=%d [bad: < 8]", len); + ND_PRINT((ndo," len=%d [bad: < 8]", len)); else { mask = data + sizeof(struct in_addr); - printf(" len=%d %s/%u.%u.%u.%u", len, - ipaddr_string(data), - mask[0], mask[1], mask[2], mask[3]); + ND_PRINT((ndo," len=%d %s/%u.%u.%u.%u", len, + ipaddr_string(data), + mask[0], mask[1], mask[2], mask[3])); } len = 0; break; @@ -769,22 +950,22 @@ isakmp_id_print(const struct isakmp_gen *ext, u_int item_len _U_, #ifdef INET6 case IPSECDOI_ID_IPV6_ADDR: if (len < 16) - printf(" len=%d [bad: < 16]", len); + ND_PRINT((ndo," len=%d [bad: < 16]", len)); else - printf(" len=%d %s", len, ip6addr_string(data)); + ND_PRINT((ndo," len=%d %s", len, ip6addr_string(data))); len = 0; break; case IPSECDOI_ID_IPV6_ADDR_SUBNET: { const u_int32_t *mask; if (len < 20) - printf(" len=%d [bad: < 20]", len); + ND_PRINT((ndo," len=%d [bad: < 20]", len)); else { mask = (u_int32_t *)(data + sizeof(struct in6_addr)); /*XXX*/ - printf(" len=%d %s/0x%08x%08x%08x%08x", len, - ip6addr_string(data), - mask[0], mask[1], mask[2], mask[3]); + ND_PRINT((ndo," len=%d %s/0x%08x%08x%08x%08x", len, + ip6addr_string(data), + mask[0], mask[1], mask[2], mask[3])); } len = 0; break; @@ -792,22 +973,22 @@ isakmp_id_print(const struct isakmp_gen *ext, u_int item_len _U_, #endif /*INET6*/ case IPSECDOI_ID_IPV4_ADDR_RANGE: if (len < 8) - printf(" len=%d [bad: < 8]", len); + ND_PRINT((ndo," len=%d [bad: < 8]", len)); else { - printf(" len=%d %s-%s", len, - ipaddr_string(data), - ipaddr_string(data + sizeof(struct in_addr))); + ND_PRINT((ndo," len=%d %s-%s", len, + ipaddr_string(data), + ipaddr_string(data + sizeof(struct in_addr)))); } len = 0; break; #ifdef INET6 case IPSECDOI_ID_IPV6_ADDR_RANGE: if (len < 32) - printf(" len=%d [bad: < 32]", len); + ND_PRINT((ndo," len=%d [bad: < 32]", len)); else { - printf(" len=%d %s-%s", len, - ip6addr_string(data), - ip6addr_string(data + sizeof(struct in6_addr))); + ND_PRINT((ndo," len=%d %s-%s", len, + ip6addr_string(data), + ip6addr_string(data + sizeof(struct in6_addr)))); } len = 0; break; @@ -821,159 +1002,169 @@ isakmp_id_print(const struct isakmp_gen *ext, u_int item_len _U_, } } if (data && len) { - printf(" len=%d", len); - if (2 < vflag) { - printf(" "); - if (!rawprint((caddr_t)data, len)) + ND_PRINT((ndo," len=%d", len)); + if (2 < ndo->ndo_vflag) { + ND_PRINT((ndo," ")); + if (!rawprint(ndo, (caddr_t)data, len)) goto trunc; } } return (u_char *)ext + item_len; trunc: - printf(" [|%s]", NPSTR(ISAKMP_NPTYPE_ID)); + ND_PRINT((ndo," [|%s]", NPSTR(ISAKMP_NPTYPE_ID))); return NULL; } static const u_char * -isakmp_cert_print(const struct isakmp_gen *ext, u_int item_len _U_, - const u_char *ep _U_, u_int32_t phase _U_, - u_int32_t doi0 _U_, - u_int32_t proto0 _U_, int depth _U_) +ikev1_cert_print(netdissect_options *ndo, u_char tpay _U_, + const struct isakmp_gen *ext, u_int item_len _U_, + const u_char *ep _U_, u_int32_t phase _U_, + u_int32_t doi0 _U_, + u_int32_t proto0 _U_, int depth _U_) { - const struct isakmp_pl_cert *p; - struct isakmp_pl_cert cert; + const struct ikev1_pl_cert *p; + struct ikev1_pl_cert cert; static const char *certstr[] = { "none", "pkcs7", "pgp", "dns", "x509sign", "x509ke", "kerberos", "crl", "arl", "spki", "x509attr", }; - printf("%s:", NPSTR(ISAKMP_NPTYPE_CERT)); + ND_PRINT((ndo,"%s:", NPSTR(ISAKMP_NPTYPE_CERT))); - p = (struct isakmp_pl_cert *)ext; - TCHECK(*p); + p = (struct ikev1_pl_cert *)ext; + ND_TCHECK(*p); safememcpy(&cert, ext, sizeof(cert)); - printf(" len=%d", item_len - 4); - printf(" type=%s", STR_OR_ID((cert.encode), certstr)); - if (2 < vflag && 4 < item_len) { - printf(" "); - if (!rawprint((caddr_t)(ext + 1), item_len - 4)) + ND_PRINT((ndo," len=%d", item_len - 4)); + ND_PRINT((ndo," type=%s", STR_OR_ID((cert.encode), certstr))); + if (2 < ndo->ndo_vflag && 4 < item_len) { + ND_PRINT((ndo," ")); + if (!rawprint(ndo, (caddr_t)(ext + 1), item_len - 4)) goto trunc; } return (u_char *)ext + item_len; trunc: - printf(" [|%s]", NPSTR(ISAKMP_NPTYPE_CERT)); + ND_PRINT((ndo," [|%s]", NPSTR(ISAKMP_NPTYPE_CERT))); return NULL; } static const u_char * -isakmp_cr_print(const struct isakmp_gen *ext, u_int item_len _U_, - const u_char *ep _U_, u_int32_t phase _U_, u_int32_t doi0 _U_, - u_int32_t proto0 _U_, int depth _U_) +ikev1_cr_print(netdissect_options *ndo, u_char tpay _U_, + const struct isakmp_gen *ext, u_int item_len _U_, + const u_char *ep _U_, u_int32_t phase _U_, u_int32_t doi0 _U_, + u_int32_t proto0 _U_, int depth _U_) { - const struct isakmp_pl_cert *p; - struct isakmp_pl_cert cert; + const struct ikev1_pl_cert *p; + struct ikev1_pl_cert cert; static const char *certstr[] = { "none", "pkcs7", "pgp", "dns", "x509sign", "x509ke", "kerberos", "crl", "arl", "spki", "x509attr", }; - printf("%s:", NPSTR(ISAKMP_NPTYPE_CR)); + ND_PRINT((ndo,"%s:", NPSTR(ISAKMP_NPTYPE_CR))); - p = (struct isakmp_pl_cert *)ext; - TCHECK(*p); + p = (struct ikev1_pl_cert *)ext; + ND_TCHECK(*p); safememcpy(&cert, ext, sizeof(cert)); - printf(" len=%d", item_len - 4); - printf(" type=%s", STR_OR_ID((cert.encode), certstr)); - if (2 < vflag && 4 < item_len) { - printf(" "); - if (!rawprint((caddr_t)(ext + 1), item_len - 4)) + ND_PRINT((ndo," len=%d", item_len - 4)); + ND_PRINT((ndo," type=%s", STR_OR_ID((cert.encode), certstr))); + if (2 < ndo->ndo_vflag && 4 < item_len) { + ND_PRINT((ndo," ")); + if (!rawprint(ndo, (caddr_t)(ext + 1), item_len - 4)) goto trunc; } return (u_char *)ext + item_len; trunc: - printf(" [|%s]", NPSTR(ISAKMP_NPTYPE_CR)); + ND_PRINT((ndo," [|%s]", NPSTR(ISAKMP_NPTYPE_CR))); return NULL; } static const u_char * -isakmp_hash_print(const struct isakmp_gen *ext, u_int item_len _U_, - const u_char *ep _U_, u_int32_t phase _U_, u_int32_t doi _U_, - u_int32_t proto _U_, int depth _U_) -{ - struct isakmp_gen e; - - printf("%s:", NPSTR(ISAKMP_NPTYPE_HASH)); - - TCHECK(*ext); - safememcpy(&e, ext, sizeof(e)); - printf(" len=%d", ntohs(e.len) - 4); - if (2 < vflag && 4 < ntohs(e.len)) { - printf(" "); - if (!rawprint((caddr_t)(ext + 1), ntohs(e.len) - 4)) - goto trunc; - } - return (u_char *)ext + ntohs(e.len); -trunc: - printf(" [|%s]", NPSTR(ISAKMP_NPTYPE_HASH)); - return NULL; -} - -static const u_char * -isakmp_sig_print(const struct isakmp_gen *ext, u_int item_len _U_, +ikev1_hash_print(netdissect_options *ndo, u_char tpay _U_, + const struct isakmp_gen *ext, u_int item_len _U_, const u_char *ep _U_, u_int32_t phase _U_, u_int32_t doi _U_, u_int32_t proto _U_, int depth _U_) { struct isakmp_gen e; - printf("%s:", NPSTR(ISAKMP_NPTYPE_SIG)); + ND_PRINT((ndo,"%s:", NPSTR(ISAKMP_NPTYPE_HASH))); - TCHECK(*ext); + ND_TCHECK(*ext); safememcpy(&e, ext, sizeof(e)); - printf(" len=%d", ntohs(e.len) - 4); - if (2 < vflag && 4 < ntohs(e.len)) { - printf(" "); - if (!rawprint((caddr_t)(ext + 1), ntohs(e.len) - 4)) + ND_PRINT((ndo," len=%d", ntohs(e.len) - 4)); + if (2 < ndo->ndo_vflag && 4 < ntohs(e.len)) { + ND_PRINT((ndo," ")); + if (!rawprint(ndo, (caddr_t)(ext + 1), ntohs(e.len) - 4)) goto trunc; } return (u_char *)ext + ntohs(e.len); trunc: - printf(" [|%s]", NPSTR(ISAKMP_NPTYPE_SIG)); + ND_PRINT((ndo," [|%s]", NPSTR(ISAKMP_NPTYPE_HASH))); return NULL; } static const u_char * -isakmp_nonce_print(const struct isakmp_gen *ext, - u_int item_len _U_, - const u_char *ep _U_, - u_int32_t phase _U_, u_int32_t doi _U_, - u_int32_t proto _U_, int depth _U_) +ikev1_sig_print(netdissect_options *ndo, u_char tpay _U_, + const struct isakmp_gen *ext, u_int item_len _U_, + const u_char *ep _U_, u_int32_t phase _U_, u_int32_t doi _U_, + u_int32_t proto _U_, int depth _U_) { struct isakmp_gen e; - printf("%s:", NPSTR(ISAKMP_NPTYPE_NONCE)); + ND_PRINT((ndo,"%s:", NPSTR(ISAKMP_NPTYPE_SIG))); - TCHECK(*ext); + ND_TCHECK(*ext); safememcpy(&e, ext, sizeof(e)); - printf(" n len=%d", ntohs(e.len) - 4); - if (2 < vflag && 4 < ntohs(e.len)) { - printf(" "); - if (!rawprint((caddr_t)(ext + 1), ntohs(e.len) - 4)) + ND_PRINT((ndo," len=%d", ntohs(e.len) - 4)); + if (2 < ndo->ndo_vflag && 4 < ntohs(e.len)) { + ND_PRINT((ndo," ")); + if (!rawprint(ndo, (caddr_t)(ext + 1), ntohs(e.len) - 4)) goto trunc; } return (u_char *)ext + ntohs(e.len); trunc: - printf(" [|%s]", NPSTR(ISAKMP_NPTYPE_NONCE)); + ND_PRINT((ndo," [|%s]", NPSTR(ISAKMP_NPTYPE_SIG))); return NULL; } static const u_char * -isakmp_n_print(const struct isakmp_gen *ext, u_int item_len, - const u_char *ep, u_int32_t phase, u_int32_t doi0 _U_, - u_int32_t proto0 _U_, int depth) +ikev1_nonce_print(netdissect_options *ndo, u_char tpay _U_, + const struct isakmp_gen *ext, + u_int item_len _U_, + const u_char *ep _U_, + u_int32_t phase _U_, u_int32_t doi _U_, + u_int32_t proto _U_, int depth _U_) { - struct isakmp_pl_n *p, n; + struct isakmp_gen e; + + ND_PRINT((ndo,"%s:", NPSTR(ISAKMP_NPTYPE_NONCE))); + + ND_TCHECK(*ext); + safememcpy(&e, ext, sizeof(e)); + ND_PRINT((ndo," n len=%d", ntohs(e.len) - 4)); + if (2 < ndo->ndo_vflag && 4 < ntohs(e.len)) { + ND_PRINT((ndo," ")); + if (!rawprint(ndo, (caddr_t)(ext + 1), ntohs(e.len) - 4)) + goto trunc; + } else if (1 < ndo->ndo_vflag && 4 < ntohs(e.len)) { + ND_PRINT((ndo," ")); + if (!ike_show_somedata(ndo, (u_char *)(caddr_t)(ext + 1), ep)) + goto trunc; + } + return (u_char *)ext + ntohs(e.len); +trunc: + ND_PRINT((ndo," [|%s]", NPSTR(ISAKMP_NPTYPE_NONCE))); + return NULL; +} + +static const u_char * +ikev1_n_print(netdissect_options *ndo, u_char tpay _U_, + const struct isakmp_gen *ext, u_int item_len, + const u_char *ep, u_int32_t phase, u_int32_t doi0 _U_, + u_int32_t proto0 _U_, int depth) +{ + struct ikev1_pl_n *p, n; const u_char *cp; u_char *ep2; u_int32_t doi; @@ -1024,47 +1215,47 @@ isakmp_n_print(const struct isakmp_gen *ext, u_int item_len, #define IPSEC_NOTIFY_STATUS_STR(x) \ STR_OR_ID((u_int)((x) - 24576), ipsec_notify_status_str) - printf("%s:", NPSTR(ISAKMP_NPTYPE_N)); + ND_PRINT((ndo,"%s:", NPSTR(ISAKMP_NPTYPE_N))); - p = (struct isakmp_pl_n *)ext; - TCHECK(*p); + p = (struct ikev1_pl_n *)ext; + ND_TCHECK(*p); safememcpy(&n, ext, sizeof(n)); doi = ntohl(n.doi); proto = n.prot_id; if (doi != 1) { - printf(" doi=%d", doi); - printf(" proto=%d", proto); + ND_PRINT((ndo," doi=%d", doi)); + ND_PRINT((ndo," proto=%d", proto)); if (ntohs(n.type) < 8192) - printf(" type=%s", NOTIFY_ERROR_STR(ntohs(n.type))); + ND_PRINT((ndo," type=%s", NOTIFY_ERROR_STR(ntohs(n.type)))); else if (ntohs(n.type) < 16384) - printf(" type=%s", numstr(ntohs(n.type))); + ND_PRINT((ndo," type=%s", numstr(ntohs(n.type)))); else if (ntohs(n.type) < 24576) - printf(" type=%s", NOTIFY_STATUS_STR(ntohs(n.type))); + ND_PRINT((ndo," type=%s", NOTIFY_STATUS_STR(ntohs(n.type)))); else - printf(" type=%s", numstr(ntohs(n.type))); + ND_PRINT((ndo," type=%s", numstr(ntohs(n.type)))); if (n.spi_size) { - printf(" spi="); - if (!rawprint((caddr_t)(p + 1), n.spi_size)) + ND_PRINT((ndo," spi=")); + if (!rawprint(ndo, (caddr_t)(p + 1), n.spi_size)) goto trunc; } return (u_char *)(p + 1) + n.spi_size; } - printf(" doi=ipsec"); - printf(" proto=%s", PROTOIDSTR(proto)); + ND_PRINT((ndo," doi=ipsec")); + ND_PRINT((ndo," proto=%s", PROTOIDSTR(proto))); if (ntohs(n.type) < 8192) - printf(" type=%s", NOTIFY_ERROR_STR(ntohs(n.type))); + ND_PRINT((ndo," type=%s", NOTIFY_ERROR_STR(ntohs(n.type)))); else if (ntohs(n.type) < 16384) - printf(" type=%s", IPSEC_NOTIFY_ERROR_STR(ntohs(n.type))); + ND_PRINT((ndo," type=%s", IPSEC_NOTIFY_ERROR_STR(ntohs(n.type)))); else if (ntohs(n.type) < 24576) - printf(" type=%s", NOTIFY_STATUS_STR(ntohs(n.type))); + ND_PRINT((ndo," type=%s", NOTIFY_STATUS_STR(ntohs(n.type)))); else if (ntohs(n.type) < 32768) - printf(" type=%s", IPSEC_NOTIFY_STATUS_STR(ntohs(n.type))); + ND_PRINT((ndo," type=%s", IPSEC_NOTIFY_STATUS_STR(ntohs(n.type)))); else - printf(" type=%s", numstr(ntohs(n.type))); + ND_PRINT((ndo," type=%s", numstr(ntohs(n.type)))); if (n.spi_size) { - printf(" spi="); - if (!rawprint((caddr_t)(p + 1), n.spi_size)) + ND_PRINT((ndo," spi=")); + if (!rawprint(ndo, (caddr_t)(p + 1), n.spi_size)) goto trunc; } @@ -1072,119 +1263,712 @@ isakmp_n_print(const struct isakmp_gen *ext, u_int item_len, ep2 = (u_char *)p + item_len; if (cp < ep) { - printf(" orig=("); + ND_PRINT((ndo," orig=(")); switch (ntohs(n.type)) { case IPSECDOI_NTYPE_RESPONDER_LIFETIME: { const struct attrmap *map = oakley_t_map; size_t nmap = sizeof(oakley_t_map)/sizeof(oakley_t_map[0]); while (cp < ep && cp < ep2) { - cp = isakmp_attrmap_print(cp, + cp = ikev1_attrmap_print(ndo, cp, (ep < ep2) ? ep : ep2, map, nmap); } break; } case IPSECDOI_NTYPE_REPLAY_STATUS: - printf("replay detection %sabled", - (*(u_int32_t *)cp) ? "en" : "dis"); + ND_PRINT((ndo,"replay detection %sabled", + (*(u_int32_t *)cp) ? "en" : "dis")); break; case ISAKMP_NTYPE_NO_PROPOSAL_CHOSEN: - if (isakmp_sub_print(ISAKMP_NPTYPE_SA, - (struct isakmp_gen *)cp, ep, phase, doi, proto, - depth) == NULL) + if (ikev1_sub_print(ndo, ISAKMP_NPTYPE_SA, + (struct isakmp_gen *)cp, ep, phase, doi, proto, + depth) == NULL) return NULL; break; default: /* NULL is dummy */ - isakmp_print(gndo, cp, + isakmp_print(ndo, cp, item_len - sizeof(*p) - n.spi_size, NULL); } - printf(")"); + ND_PRINT((ndo,")")); } return (u_char *)ext + item_len; trunc: - printf(" [|%s]", NPSTR(ISAKMP_NPTYPE_N)); + ND_PRINT((ndo," [|%s]", NPSTR(ISAKMP_NPTYPE_N))); return NULL; } static const u_char * -isakmp_d_print(const struct isakmp_gen *ext, u_int item_len _U_, - const u_char *ep _U_, u_int32_t phase _U_, u_int32_t doi0 _U_, - u_int32_t proto0 _U_, int depth _U_) +ikev1_d_print(netdissect_options *ndo, u_char tpay _U_, + const struct isakmp_gen *ext, u_int item_len _U_, + const u_char *ep _U_, u_int32_t phase _U_, u_int32_t doi0 _U_, + u_int32_t proto0 _U_, int depth _U_) { - const struct isakmp_pl_d *p; - struct isakmp_pl_d d; + const struct ikev1_pl_d *p; + struct ikev1_pl_d d; const u_int8_t *q; u_int32_t doi; u_int32_t proto; int i; - printf("%s:", NPSTR(ISAKMP_NPTYPE_D)); + ND_PRINT((ndo,"%s:", NPSTR(ISAKMP_NPTYPE_D))); - p = (struct isakmp_pl_d *)ext; - TCHECK(*p); + p = (struct ikev1_pl_d *)ext; + ND_TCHECK(*p); safememcpy(&d, ext, sizeof(d)); doi = ntohl(d.doi); proto = d.prot_id; if (doi != 1) { - printf(" doi=%u", doi); - printf(" proto=%u", proto); + ND_PRINT((ndo," doi=%u", doi)); + ND_PRINT((ndo," proto=%u", proto)); } else { - printf(" doi=ipsec"); - printf(" proto=%s", PROTOIDSTR(proto)); + ND_PRINT((ndo," doi=ipsec")); + ND_PRINT((ndo," proto=%s", PROTOIDSTR(proto))); } - printf(" spilen=%u", d.spi_size); - printf(" nspi=%u", ntohs(d.num_spi)); - printf(" spi="); + ND_PRINT((ndo," spilen=%u", d.spi_size)); + ND_PRINT((ndo," nspi=%u", ntohs(d.num_spi))); + ND_PRINT((ndo," spi=")); q = (u_int8_t *)(p + 1); for (i = 0; i < ntohs(d.num_spi); i++) { if (i != 0) - printf(","); - if (!rawprint((caddr_t)q, d.spi_size)) + ND_PRINT((ndo,",")); + if (!rawprint(ndo, (caddr_t)q, d.spi_size)) goto trunc; q += d.spi_size; } return q; trunc: - printf(" [|%s]", NPSTR(ISAKMP_NPTYPE_D)); + ND_PRINT((ndo," [|%s]", NPSTR(ISAKMP_NPTYPE_D))); return NULL; } static const u_char * -isakmp_vid_print(const struct isakmp_gen *ext, - u_int item_len _U_, const u_char *ep _U_, - u_int32_t phase _U_, u_int32_t doi _U_, - u_int32_t proto _U_, int depth _U_) +ikev1_vid_print(netdissect_options *ndo, u_char tpay _U_, + const struct isakmp_gen *ext, + u_int item_len _U_, const u_char *ep _U_, + u_int32_t phase _U_, u_int32_t doi _U_, + u_int32_t proto _U_, int depth _U_) { struct isakmp_gen e; - printf("%s:", NPSTR(ISAKMP_NPTYPE_VID)); + ND_PRINT((ndo,"%s:", NPSTR(ISAKMP_NPTYPE_VID))); - TCHECK(*ext); + ND_TCHECK(*ext); safememcpy(&e, ext, sizeof(e)); - printf(" len=%d", ntohs(e.len) - 4); - if (2 < vflag && 4 < ntohs(e.len)) { - printf(" "); - if (!rawprint((caddr_t)(ext + 1), ntohs(e.len) - 4)) + ND_PRINT((ndo," len=%d", ntohs(e.len) - 4)); + if (2 < ndo->ndo_vflag && 4 < ntohs(e.len)) { + ND_PRINT((ndo," ")); + if (!rawprint(ndo, (caddr_t)(ext + 1), ntohs(e.len) - 4)) goto trunc; } return (u_char *)ext + ntohs(e.len); trunc: - printf(" [|%s]", NPSTR(ISAKMP_NPTYPE_VID)); + ND_PRINT((ndo," [|%s]", NPSTR(ISAKMP_NPTYPE_VID))); + return NULL; +} + +/************************************************************/ +/* */ +/* IKE v2 - rfc4306 - dissector */ +/* */ +/************************************************************/ + +static void +ikev2_pay_print(netdissect_options *ndo, const char *payname, int critical) +{ + ND_PRINT((ndo,"%s%s:", payname, critical&0x80 ? "[C]" : "")); +} + +static const u_char * +ikev2_gen_print(netdissect_options *ndo, u_char tpay, + const struct isakmp_gen *ext) +{ + struct isakmp_gen e; + + ND_TCHECK(*ext); + safememcpy(&e, ext, sizeof(e)); + ikev2_pay_print(ndo, NPSTR(tpay), e.critical); + + ND_PRINT((ndo," len=%d", ntohs(e.len) - 4)); + if (2 < ndo->ndo_vflag && 4 < ntohs(e.len)) { + ND_PRINT((ndo," ")); + if (!rawprint(ndo, (caddr_t)(ext + 1), ntohs(e.len) - 4)) + goto trunc; + } + return (u_char *)ext + ntohs(e.len); +trunc: + ND_PRINT((ndo," [|%s]", NPSTR(tpay))); return NULL; } static const u_char * -isakmp_sub0_print(u_char np, const struct isakmp_gen *ext, const u_char *ep, - u_int32_t phase, u_int32_t doi, u_int32_t proto, int depth) +ikev2_t_print(netdissect_options *ndo, u_char tpay _U_, int pcount, + const struct isakmp_gen *ext, u_int item_len, + const u_char *ep, u_int32_t phase _U_, u_int32_t doi _U_, + u_int32_t proto _U_, int depth _U_) +{ + const struct ikev2_t *p; + struct ikev2_t t; + u_int16_t t_id; + const u_char *cp; + const char *idstr; + const struct attrmap *map; + size_t nmap; + const u_char *ep2; + + p = (struct ikev2_t *)ext; + ND_TCHECK(*p); + safememcpy(&t, ext, sizeof(t)); + ikev2_pay_print(ndo, NPSTR(ISAKMP_NPTYPE_T), t.h.critical); + + t_id = ntohs(t.t_id); + + map = NULL; + nmap = 0; + + switch (t.t_type) { + case IV2_T_ENCR: + idstr = STR_OR_ID(t_id, esp_p_map); + map = encr_t_map; + nmap = sizeof(encr_t_map)/sizeof(encr_t_map[0]); + break; + + case IV2_T_PRF: + idstr = STR_OR_ID(t_id, prf_p_map); + break; + + case IV2_T_INTEG: + idstr = STR_OR_ID(t_id, integ_p_map); + break; + + case IV2_T_DH: + idstr = STR_OR_ID(t_id, dh_p_map); + break; + + case IV2_T_ESN: + idstr = STR_OR_ID(t_id, esn_p_map); + break; + + default: + idstr = NULL; + break; + } + + if (idstr) + ND_PRINT((ndo," #%u type=%s id=%s ", pcount, + STR_OR_ID(t.t_type, ikev2_t_type_map), + idstr)); + else + ND_PRINT((ndo," #%u type=%s id=%u ", pcount, + STR_OR_ID(t.t_type, ikev2_t_type_map), + t.t_id)); + cp = (u_char *)(p + 1); + ep2 = (u_char *)p + item_len; + while (cp < ep && cp < ep2) { + if (map && nmap) { + cp = ikev1_attrmap_print(ndo, cp, (ep < ep2) ? ep : ep2, + map, nmap); + } else + cp = ikev1_attr_print(ndo, cp, (ep < ep2) ? ep : ep2); + } + if (ep < ep2) + ND_PRINT((ndo,"...")); + return cp; +trunc: + ND_PRINT((ndo," [|%s]", NPSTR(ISAKMP_NPTYPE_T))); + return NULL; +} + +static const u_char * +ikev2_p_print(netdissect_options *ndo, u_char tpay _U_, int pcount _U_, + const struct isakmp_gen *ext, u_int item_len _U_, + const u_char *ep, u_int32_t phase, u_int32_t doi0, + u_int32_t proto0 _U_, int depth) +{ + const struct ikev2_p *p; + struct ikev2_p prop; + const u_char *cp; + + p = (struct ikev2_p *)ext; + ND_TCHECK(*p); + safememcpy(&prop, ext, sizeof(prop)); + ikev2_pay_print(ndo, NPSTR(ISAKMP_NPTYPE_P), prop.h.critical); + + ND_PRINT((ndo," #%u protoid=%s transform=%d", + prop.p_no, PROTOIDSTR(prop.prot_id), prop.num_t)); + if (prop.spi_size) { + ND_PRINT((ndo," spi=")); + if (!rawprint(ndo, (caddr_t)(p + 1), prop.spi_size)) + goto trunc; + } + + ext = (struct isakmp_gen *)((u_char *)(p + 1) + prop.spi_size); + ND_TCHECK(*ext); + + cp = ikev2_sub_print(ndo, ISAKMP_NPTYPE_T, ext, ep, phase, doi0, + prop.prot_id, depth); + + return cp; +trunc: + ND_PRINT((ndo," [|%s]", NPSTR(ISAKMP_NPTYPE_P))); + return NULL; +} + +static const u_char * +ikev2_sa_print(netdissect_options *ndo, u_char tpay, + const struct isakmp_gen *ext1, + u_int item_len _U_, const u_char *ep _U_, + u_int32_t phase _U_, u_int32_t doi _U_, + u_int32_t proto _U_, int depth _U_) +{ + struct isakmp_gen e; + int osa_len, sa_len; + + ND_TCHECK(*ext1); + safememcpy(&e, ext1, sizeof(e)); + ikev2_pay_print(ndo, "sa", e.critical); + + osa_len= ntohs(e.len); + sa_len = osa_len - 4; + ND_PRINT((ndo," len=%d", sa_len)); + + ikev2_sub_print(ndo, ISAKMP_NPTYPE_P, + ext1+1, ep, + 0, 0, 0, depth); + + return (u_char *)ext1 + osa_len; +trunc: + ND_PRINT((ndo," [|%s]", NPSTR(tpay))); + return NULL; +} + +static const u_char * +ikev2_ke_print(netdissect_options *ndo, u_char tpay, + const struct isakmp_gen *ext, + u_int item_len _U_, const u_char *ep _U_, + u_int32_t phase _U_, u_int32_t doi _U_, + u_int32_t proto _U_, int depth _U_) +{ + struct ikev2_ke ke; + struct ikev2_ke *k; + + k = (struct ikev2_ke *)ext; + ND_TCHECK(*ext); + safememcpy(&ke, ext, sizeof(ke)); + ikev2_pay_print(ndo, NPSTR(tpay), ke.h.critical); + + ND_PRINT((ndo," len=%u group=%s", ntohs(ke.h.len) - 8, + STR_OR_ID(ntohs(ke.ke_group), dh_p_map))); + + if (2 < ndo->ndo_vflag && 8 < ntohs(ke.h.len)) { + ND_PRINT((ndo," ")); + if (!rawprint(ndo, (caddr_t)(k + 1), ntohs(ke.h.len) - 8)) + goto trunc; + } + return (u_char *)ext + ntohs(ke.h.len); +trunc: + ND_PRINT((ndo," [|%s]", NPSTR(tpay))); + return NULL; +} + +static const u_char * +ikev2_ID_print(netdissect_options *ndo, u_char tpay, + const struct isakmp_gen *ext, + u_int item_len _U_, const u_char *ep _U_, + u_int32_t phase _U_, u_int32_t doi _U_, + u_int32_t proto _U_, int depth _U_) +{ + return ikev2_gen_print(ndo, tpay, ext); +} + +static const u_char * +ikev2_cert_print(netdissect_options *ndo, u_char tpay, + const struct isakmp_gen *ext, + u_int item_len _U_, const u_char *ep _U_, + u_int32_t phase _U_, u_int32_t doi _U_, + u_int32_t proto _U_, int depth _U_) +{ + return ikev2_gen_print(ndo, tpay, ext); +} + +static const u_char * +ikev2_cr_print(netdissect_options *ndo, u_char tpay, + const struct isakmp_gen *ext, + u_int item_len _U_, const u_char *ep _U_, + u_int32_t phase _U_, u_int32_t doi _U_, + u_int32_t proto _U_, int depth _U_) +{ + return ikev2_gen_print(ndo, tpay, ext); +} + +static const u_char * +ikev2_auth_print(netdissect_options *ndo, u_char tpay, + const struct isakmp_gen *ext, + u_int item_len _U_, const u_char *ep _U_, + u_int32_t phase _U_, u_int32_t doi _U_, + u_int32_t proto _U_, int depth _U_) +{ + struct ikev2_auth e; + const char *v2_auth[]={ "invalid", "rsasig", + "shared-secret", "dsssig" }; + + ND_TCHECK(*ext); + safememcpy(&e, ext, sizeof(e)); + ikev2_pay_print(ndo, NPSTR(tpay), e.h.critical); + + ND_PRINT((ndo," len=%d method=%s", ntohs(e.h.len) - 4, + STR_OR_ID(e.auth_method, v2_auth))); + + if (1 < ndo->ndo_vflag && 4 < ntohs(e.h.len)) { + ND_PRINT((ndo," authdata=(")); + if (!rawprint(ndo, (caddr_t)(ext + 1), ntohs(e.h.len) - 4)) + goto trunc; + ND_PRINT((ndo,") ")); + } else if(ndo->ndo_vflag && 4 < ntohs(e.h.len)) { + if(!ike_show_somedata(ndo, (const u_char *)(ext+1), ep)) goto trunc; + } + + return (u_char *)ext + ntohs(e.h.len); +trunc: + ND_PRINT((ndo," [|%s]", NPSTR(tpay))); + return NULL; +} + +static const u_char * +ikev2_nonce_print(netdissect_options *ndo, u_char tpay, + const struct isakmp_gen *ext, + u_int item_len _U_, const u_char *ep _U_, + u_int32_t phase _U_, u_int32_t doi _U_, + u_int32_t proto _U_, int depth _U_) +{ + struct isakmp_gen e; + + ND_TCHECK(*ext); + safememcpy(&e, ext, sizeof(e)); + ikev2_pay_print(ndo, "nonce", e.critical); + + ND_PRINT((ndo," len=%d", ntohs(e.len) - 4)); + if (1 < ndo->ndo_vflag && 4 < ntohs(e.len)) { + ND_PRINT((ndo," nonce=(")); + if (!rawprint(ndo, (caddr_t)(ext + 1), ntohs(e.len) - 4)) + goto trunc; + ND_PRINT((ndo,") ")); + } else if(ndo->ndo_vflag && 4 < ntohs(e.len)) { + if(!ike_show_somedata(ndo, (const u_char *)(ext+1), ep)) goto trunc; + } + + return (u_char *)ext + ntohs(e.len); +trunc: + ND_PRINT((ndo," [|%s]", NPSTR(tpay))); + return NULL; +} + +/* notify payloads */ +static const u_char * +ikev2_n_print(netdissect_options *ndo, u_char tpay _U_, + const struct isakmp_gen *ext, + u_int item_len _U_, const u_char *ep _U_, + u_int32_t phase _U_, u_int32_t doi _U_, + u_int32_t proto _U_, int depth _U_) +{ + struct ikev2_n *p, n; + const u_char *cp; + u_char *ep2; + u_char showspi, showdata, showsomedata; + const char *notify_name; + u_int32_t type; + + p = (struct ikev2_n *)ext; + ND_TCHECK(*p); + safememcpy(&n, ext, sizeof(n)); + ikev2_pay_print(ndo, NPSTR(ISAKMP_NPTYPE_N), n.h.critical); + + showspi = 1; + showdata = 0; + showsomedata=0; + notify_name=NULL; + + ND_PRINT((ndo," prot_id=%s", PROTOIDSTR(n.prot_id))); + + type = ntohs(n.type); + + /* notify space is annoying sparse */ + switch(type) { + case IV2_NOTIFY_UNSUPPORTED_CRITICAL_PAYLOAD: + notify_name = "unsupported_critical_payload"; + showspi = 0; + break; + + case IV2_NOTIFY_INVALID_IKE_SPI: + notify_name = "invalid_ike_spi"; + showspi = 1; + break; + + case IV2_NOTIFY_INVALID_MAJOR_VERSION: + notify_name = "invalid_major_version"; + showspi = 0; + break; + + case IV2_NOTIFY_INVALID_SYNTAX: + notify_name = "invalid_syntax"; + showspi = 1; + break; + + case IV2_NOTIFY_INVALID_MESSAGE_ID: + notify_name = "invalid_message_id"; + showspi = 1; + break; + + case IV2_NOTIFY_INVALID_SPI: + notify_name = "invalid_spi"; + showspi = 1; + break; + + case IV2_NOTIFY_NO_PROPOSAL_CHOSEN: + notify_name = "no_protocol_chosen"; + showspi = 1; + break; + + case IV2_NOTIFY_INVALID_KE_PAYLOAD: + notify_name = "invalid_ke_payload"; + showspi = 1; + break; + + case IV2_NOTIFY_AUTHENTICATION_FAILED: + notify_name = "authentication_failed"; + showspi = 1; + break; + + case IV2_NOTIFY_SINGLE_PAIR_REQUIRED: + notify_name = "single_pair_required"; + showspi = 1; + break; + + case IV2_NOTIFY_NO_ADDITIONAL_SAS: + notify_name = "no_additional_sas"; + showspi = 0; + break; + + case IV2_NOTIFY_INTERNAL_ADDRESS_FAILURE: + notify_name = "internal_address_failure"; + showspi = 0; + break; + + case IV2_NOTIFY_FAILED_CP_REQUIRED: + notify_name = "failed:cp_required"; + showspi = 0; + break; + + case IV2_NOTIFY_INVALID_SELECTORS: + notify_name = "invalid_selectors"; + showspi = 0; + break; + + case IV2_NOTIFY_INITIAL_CONTACT: + notify_name = "initial_contact"; + showspi = 0; + break; + + case IV2_NOTIFY_SET_WINDOW_SIZE: + notify_name = "set_window_size"; + showspi = 0; + break; + + case IV2_NOTIFY_ADDITIONAL_TS_POSSIBLE: + notify_name = "additional_ts_possible"; + showspi = 0; + break; + + case IV2_NOTIFY_IPCOMP_SUPPORTED: + notify_name = "ipcomp_supported"; + showspi = 0; + break; + + case IV2_NOTIFY_NAT_DETECTION_SOURCE_IP: + notify_name = "nat_detection_source_ip"; + showspi = 1; + break; + + case IV2_NOTIFY_NAT_DETECTION_DESTINATION_IP: + notify_name = "nat_detection_destination_ip"; + showspi = 1; + break; + + case IV2_NOTIFY_COOKIE: + notify_name = "cookie"; + showspi = 1; + showsomedata= 1; + showdata= 0; + break; + + case IV2_NOTIFY_USE_TRANSPORT_MODE: + notify_name = "use_transport_mode"; + showspi = 0; + break; + + case IV2_NOTIFY_HTTP_CERT_LOOKUP_SUPPORTED: + notify_name = "http_cert_lookup_supported"; + showspi = 0; + break; + + case IV2_NOTIFY_REKEY_SA: + notify_name = "rekey_sa"; + showspi = 1; + break; + + case IV2_NOTIFY_ESP_TFC_PADDING_NOT_SUPPORTED: + notify_name = "tfc_padding_not_supported"; + showspi = 0; + break; + + case IV2_NOTIFY_NON_FIRST_FRAGMENTS_ALSO: + notify_name = "non_first_fragment_also"; + showspi = 0; + break; + + default: + if (type < 8192) { + notify_name="error"; + } else if(type < 16384) { + notify_name="private-error"; + } else if(type < 40960) { + notify_name="status"; + } else { + notify_name="private-status"; + } + } + + if(notify_name) { + ND_PRINT((ndo," type=%u(%s)", type, notify_name)); + } + + + if (showspi && n.spi_size) { + ND_PRINT((ndo," spi=")); + if (!rawprint(ndo, (caddr_t)(p + 1), n.spi_size)) + goto trunc; + } + + cp = (u_char *)(p + 1) + n.spi_size; + ep2 = (u_char *)p + item_len; + + if(3 < ndo->ndo_vflag) { + showdata = 1; + } + + if ((showdata || (showsomedata && ep-cp < 30)) && cp < ep) { + ND_PRINT((ndo," data=(")); + if (!rawprint(ndo, (caddr_t)(cp), ep - cp)) + goto trunc; + + ND_PRINT((ndo,")")); + + } else if(showsomedata && cp < ep) { + if(!ike_show_somedata(ndo, cp, ep)) goto trunc; + } + + return (u_char *)ext + item_len; +trunc: + ND_PRINT((ndo," [|%s]", NPSTR(ISAKMP_NPTYPE_N))); + return NULL; +} + +static const u_char * +ikev2_d_print(netdissect_options *ndo, u_char tpay, + const struct isakmp_gen *ext, + u_int item_len _U_, const u_char *ep _U_, + u_int32_t phase _U_, u_int32_t doi _U_, + u_int32_t proto _U_, int depth _U_) +{ + return ikev2_gen_print(ndo, tpay, ext); +} + +static const u_char * +ikev2_vid_print(netdissect_options *ndo, u_char tpay, + const struct isakmp_gen *ext, + u_int item_len _U_, const u_char *ep _U_, + u_int32_t phase _U_, u_int32_t doi _U_, + u_int32_t proto _U_, int depth _U_) +{ + struct isakmp_gen e; + const u_char *vid; + int i, len; + + ND_TCHECK(*ext); + safememcpy(&e, ext, sizeof(e)); + ikev2_pay_print(ndo, NPSTR(tpay), e.critical); + ND_PRINT((ndo," len=%d vid=", ntohs(e.len) - 4)); + + vid = (const u_char *)(ext+1); + len = ntohs(e.len) - 4; + ND_TCHECK2(*vid, len); + for(i=0; indo_vflag && 4 < len) { + ND_PRINT((ndo," ")); + if (!rawprint(ndo, (caddr_t)(ext + 1), ntohs(e.len) - 4)) + goto trunc; + } + return (u_char *)ext + ntohs(e.len); +trunc: + ND_PRINT((ndo," [|%s]", NPSTR(tpay))); + return NULL; +} + +static const u_char * +ikev2_TS_print(netdissect_options *ndo, u_char tpay, + const struct isakmp_gen *ext, + u_int item_len _U_, const u_char *ep _U_, + u_int32_t phase _U_, u_int32_t doi _U_, + u_int32_t proto _U_, int depth _U_) +{ + return ikev2_gen_print(ndo, tpay, ext); +} + +static const u_char * +ikev2_e_print(netdissect_options *ndo, u_char tpay, + const struct isakmp_gen *ext, + u_int item_len _U_, const u_char *ep _U_, + u_int32_t phase _U_, u_int32_t doi _U_, + u_int32_t proto _U_, int depth _U_) +{ + return ikev2_gen_print(ndo, tpay, ext); +} + +static const u_char * +ikev2_cp_print(netdissect_options *ndo, u_char tpay, + const struct isakmp_gen *ext, + u_int item_len _U_, const u_char *ep _U_, + u_int32_t phase _U_, u_int32_t doi _U_, + u_int32_t proto _U_, int depth _U_) +{ + return ikev2_gen_print(ndo, tpay, ext); +} + +static const u_char * +ikev2_eap_print(netdissect_options *ndo, u_char tpay, + const struct isakmp_gen *ext, + u_int item_len _U_, const u_char *ep _U_, + u_int32_t phase _U_, u_int32_t doi _U_, + u_int32_t proto _U_, int depth _U_) +{ + return ikev2_gen_print(ndo, tpay, ext); +} + +static const u_char * +ike_sub0_print(netdissect_options *ndo, + u_char np, const struct isakmp_gen *ext, const u_char *ep, + u_int32_t phase, u_int32_t doi, u_int32_t proto, int depth) { const u_char *cp; struct isakmp_gen e; u_int item_len; cp = (u_char *)ext; - TCHECK(*ext); + ND_TCHECK(*ext); safememcpy(&e, ext, sizeof(e)); /* @@ -1202,21 +1986,22 @@ isakmp_sub0_print(u_char np, const struct isakmp_gen *ext, const u_char *ep, * XXX - what if item_len is too short, or too long, * for this payload type? */ - cp = (*npfunc[np])(ext, item_len, ep, phase, doi, proto, depth); + cp = (*npfunc[np])(ndo, np, ext, item_len, ep, phase, doi, proto, depth); } else { - printf("%s", NPSTR(np)); + ND_PRINT((ndo,"%s", NPSTR(np))); cp += item_len; } return cp; trunc: - printf(" [|isakmp]"); + ND_PRINT((ndo," [|isakmp]")); return NULL; } static const u_char * -isakmp_sub_print(u_char np, const struct isakmp_gen *ext, const u_char *ep, - u_int32_t phase, u_int32_t doi, u_int32_t proto, int depth) +ikev1_sub_print(netdissect_options *ndo, + u_char np, const struct isakmp_gen *ext, const u_char *ep, + u_int32_t phase, u_int32_t doi, u_int32_t proto, int depth) { const u_char *cp; int i; @@ -1225,19 +2010,19 @@ isakmp_sub_print(u_char np, const struct isakmp_gen *ext, const u_char *ep, cp = (const u_char *)ext; while (np) { - TCHECK(*ext); + ND_TCHECK(*ext); safememcpy(&e, ext, sizeof(e)); - TCHECK2(*ext, ntohs(e.len)); + ND_TCHECK2(*ext, ntohs(e.len)); depth++; - printf("\n"); + ND_PRINT((ndo,"\n")); for (i = 0; i < depth; i++) - printf(" "); - printf("("); - cp = isakmp_sub0_print(np, ext, ep, phase, doi, proto, depth); - printf(")"); + ND_PRINT((ndo," ")); + ND_PRINT((ndo,"(")); + cp = ike_sub0_print(ndo, np, ext, ep, phase, doi, proto, depth); + ND_PRINT((ndo,")")); depth--; if (cp == NULL) { @@ -1250,7 +2035,7 @@ isakmp_sub_print(u_char np, const struct isakmp_gen *ext, const u_char *ep, } return cp; trunc: - printf(" [|%s]", NPSTR(np)); + ND_PRINT((ndo," [|%s]", NPSTR(np))); return NULL; } @@ -1273,6 +2058,233 @@ safememcpy(void *p, const void *q, size_t l) memcpy(p, q, l); } +void +ikev1_print(netdissect_options *ndo, + const u_char *bp, u_int length, + const u_char *bp2, struct isakmp *base) +{ + const struct isakmp *p; + const u_char *ep; + u_char np; + int i; + int phase; + + p = (const struct isakmp *)bp; + ep = ndo->ndo_snapend; + + phase = (*(u_int32_t *)base->msgid == 0) ? 1 : 2; + if (phase == 1) + ND_PRINT((ndo," phase %d", phase)); + else + ND_PRINT((ndo," phase %d/others", phase)); + + i = cookie_find(&base->i_ck); + if (i < 0) { + if (iszero((u_char *)&base->r_ck, sizeof(base->r_ck))) { + /* the first packet */ + ND_PRINT((ndo," I")); + if (bp2) + cookie_record(&base->i_ck, bp2); + } else + ND_PRINT((ndo," ?")); + } else { + if (bp2 && cookie_isinitiator(i, bp2)) + ND_PRINT((ndo," I")); + else if (bp2 && cookie_isresponder(i, bp2)) + ND_PRINT((ndo," R")); + else + ND_PRINT((ndo," ?")); + } + + ND_PRINT((ndo," %s", ETYPESTR(base->etype))); + if (base->flags) { + ND_PRINT((ndo,"[%s%s]", base->flags & ISAKMP_FLAG_E ? "E" : "", + base->flags & ISAKMP_FLAG_C ? "C" : "")); + } + + if (ndo->ndo_vflag) { + const struct isakmp_gen *ext; + int nparen; + + ND_PRINT((ndo,":")); + + /* regardless of phase... */ + if (base->flags & ISAKMP_FLAG_E) { + /* + * encrypted, nothing we can do right now. + * we hope to decrypt the packet in the future... + */ + ND_PRINT((ndo," [encrypted %s]", NPSTR(base->np))); + goto done; + } + + nparen = 0; + CHECKLEN(p + 1, base->np); + np = base->np; + ext = (struct isakmp_gen *)(p + 1); + ikev1_sub_print(ndo, np, ext, ep, phase, 0, 0, 0); + } + +done: + if (ndo->ndo_vflag) { + if (ntohl(base->len) != length) { + ND_PRINT((ndo," (len mismatch: isakmp %u/ip %u)", + (u_int32_t)ntohl(base->len), length)); + } + } +} + +static const u_char * +ikev2_sub0_print(netdissect_options *ndo, u_char np, int pcount, + const struct isakmp_gen *ext, const u_char *ep, + u_int32_t phase, u_int32_t doi, u_int32_t proto, int depth) +{ + const u_char *cp; + struct isakmp_gen e; + u_int item_len; + + cp = (u_char *)ext; + ND_TCHECK(*ext); + safememcpy(&e, ext, sizeof(e)); + + /* + * Since we can't have a payload length of less than 4 bytes, + * we need to bail out here if the generic header is nonsensical + * or truncated, otherwise we could loop forever processing + * zero-length items or otherwise misdissect the packet. + */ + item_len = ntohs(e.len); + if (item_len <= 4) + return NULL; + + if(np == ISAKMP_NPTYPE_P) { + cp = ikev2_p_print(ndo, np, pcount, ext, item_len, + ep, phase, doi, proto, depth); + } else if(np == ISAKMP_NPTYPE_T) { + cp = ikev2_t_print(ndo, np, pcount, ext, item_len, + ep, phase, doi, proto, depth); + } else if (NPFUNC(np)) { + /* + * XXX - what if item_len is too short, or too long, + * for this payload type? + */ + cp = (*npfunc[np])(ndo, np, /*pcount,*/ ext, item_len, + ep, phase, doi, proto, depth); + } else { + ND_PRINT((ndo,"%s", NPSTR(np))); + cp += item_len; + } + + return cp; +trunc: + ND_PRINT((ndo," [|isakmp]")); + return NULL; +} + +static const u_char * +ikev2_sub_print(netdissect_options *ndo, + u_char np, const struct isakmp_gen *ext, const u_char *ep, + u_int32_t phase, u_int32_t doi, u_int32_t proto, int depth) +{ + const u_char *cp; + int i; + int pcount; + struct isakmp_gen e; + + cp = (const u_char *)ext; + pcount = 0; + while (np) { + pcount++; + ND_TCHECK(*ext); + + safememcpy(&e, ext, sizeof(e)); + + ND_TCHECK2(*ext, ntohs(e.len)); + + depth++; + ND_PRINT((ndo,"\n")); + for (i = 0; i < depth; i++) + ND_PRINT((ndo," ")); + ND_PRINT((ndo,"(")); + cp = ikev2_sub0_print(ndo, np, pcount, + ext, ep, phase, doi, proto, depth); + ND_PRINT((ndo,")")); + depth--; + + if (cp == NULL) { + /* Zero-length subitem */ + return NULL; + } + + np = e.np; + ext = (struct isakmp_gen *)cp; + } + return cp; +trunc: + ND_PRINT((ndo," [|%s]", NPSTR(np))); + return NULL; +} + +static void +ikev2_print(netdissect_options *ndo, + const u_char *bp, u_int length, + const u_char *bp2 _U_, struct isakmp *base) +{ + const struct isakmp *p; + const u_char *ep; + u_char np; + int phase; + + p = (const struct isakmp *)bp; + ep = ndo->ndo_snapend; + + phase = (*(u_int32_t *)base->msgid == 0) ? 1 : 2; + if (phase == 1) + ND_PRINT((ndo, " parent_sa")); + else + ND_PRINT((ndo, " child_sa ")); + + ND_PRINT((ndo, " %s", ETYPESTR(base->etype))); + if (base->flags) { + ND_PRINT((ndo, "[%s%s]", + base->flags & ISAKMP_FLAG_I ? "I" : "", + base->flags & ISAKMP_FLAG_V ? "V" : "", + base->flags & ISAKMP_FLAG_R ? "R" : "")); + } + + if (ndo->ndo_vflag) { + const struct isakmp_gen *ext; + int nparen; + + ND_PRINT((ndo, ":")); + + /* regardless of phase... */ + if (base->flags & ISAKMP_FLAG_E) { + /* + * encrypted, nothing we can do right now. + * we hope to decrypt the packet in the future... + */ + ND_PRINT((ndo, " [encrypted %s]", NPSTR(base->np))); + goto done; + } + + nparen = 0; + CHECKLEN(p + 1, base->np) + + np = base->np; + ext = (struct isakmp_gen *)(p + 1); + ikev2_sub_print(ndo, np, ext, ep, phase, 0, 0, 0); + } + +done: + if (ndo->ndo_vflag) { + if (ntohl(base->len) != length) { + ND_PRINT((ndo, " (len mismatch: isakmp %u/ip %u)", + (u_int32_t)ntohl(base->len), length)); + } + } +} + void isakmp_print(netdissect_options *ndo, const u_char *bp, u_int length, @@ -1281,109 +2293,49 @@ isakmp_print(netdissect_options *ndo, const struct isakmp *p; struct isakmp base; const u_char *ep; - u_char np; - int i; - int phase; int major, minor; p = (const struct isakmp *)bp; ep = ndo->ndo_snapend; if ((struct isakmp *)ep < p + 1) { - printf("[|isakmp]"); + ND_PRINT((ndo,"[|isakmp]")); return; } safememcpy(&base, p, sizeof(base)); - printf("isakmp"); - if (vflag) { - major = (base.vers & ISAKMP_VERS_MAJOR) - >> ISAKMP_VERS_MAJOR_SHIFT; - minor = (base.vers & ISAKMP_VERS_MINOR) - >> ISAKMP_VERS_MINOR_SHIFT; - printf(" %d.%d", major, minor); + ND_PRINT((ndo,"isakmp")); + major = (base.vers & ISAKMP_VERS_MAJOR) + >> ISAKMP_VERS_MAJOR_SHIFT; + minor = (base.vers & ISAKMP_VERS_MINOR) + >> ISAKMP_VERS_MINOR_SHIFT; + + if (ndo->ndo_vflag) { + ND_PRINT((ndo," %d.%d", major, minor)); } - if (vflag) { - printf(" msgid "); - rawprint((caddr_t)&base.msgid, sizeof(base.msgid)); + if (ndo->ndo_vflag) { + ND_PRINT((ndo," msgid ")); + rawprint(ndo, (caddr_t)&base.msgid, sizeof(base.msgid)); } - if (1 < vflag) { - printf(" cookie "); - rawprint((caddr_t)&base.i_ck, sizeof(base.i_ck)); - printf("->"); - rawprint((caddr_t)&base.r_ck, sizeof(base.r_ck)); + if (1 < ndo->ndo_vflag) { + ND_PRINT((ndo," cookie ")); + rawprint(ndo, (caddr_t)&base.i_ck, sizeof(base.i_ck)); + ND_PRINT((ndo,"->")); + rawprint(ndo, (caddr_t)&base.r_ck, sizeof(base.r_ck)); } - printf(":"); + ND_PRINT((ndo,":")); - phase = (*(u_int32_t *)base.msgid == 0) ? 1 : 2; - if (phase == 1) - printf(" phase %d", phase); - else - printf(" phase %d/others", phase); + switch(major) { + case IKEv1_MAJOR_VERSION: + ikev1_print(ndo, bp, length, bp2, &base); + break; - i = cookie_find(&base.i_ck); - if (i < 0) { - if (iszero((u_char *)&base.r_ck, sizeof(base.r_ck))) { - /* the first packet */ - printf(" I"); - if (bp2) - cookie_record(&base.i_ck, bp2); - } else - printf(" ?"); - } else { - if (bp2 && cookie_isinitiator(i, bp2)) - printf(" I"); - else if (bp2 && cookie_isresponder(i, bp2)) - printf(" R"); - else - printf(" ?"); - } - - printf(" %s", ETYPESTR(base.etype)); - if (base.flags) { - printf("[%s%s]", base.flags & ISAKMP_FLAG_E ? "E" : "", - base.flags & ISAKMP_FLAG_C ? "C" : ""); - } - - if (vflag) { - const struct isakmp_gen *ext; - int nparen; - -#define CHECKLEN(p, np) \ - if (ep < (u_char *)(p)) { \ - printf(" [|%s]", NPSTR(np)); \ - goto done; \ - } - - printf(":"); - - /* regardless of phase... */ - if (base.flags & ISAKMP_FLAG_E) { - /* - * encrypted, nothing we can do right now. - * we hope to decrypt the packet in the future... - */ - printf(" [encrypted %s]", NPSTR(base.np)); - goto done; - } - - nparen = 0; - CHECKLEN(p + 1, base.np) - - np = base.np; - ext = (struct isakmp_gen *)(p + 1); - isakmp_sub_print(np, ext, ep, phase, 0, 0, 0); - } - -done: - if (vflag) { - if (ntohl(base.len) != length) { - printf(" (len mismatch: isakmp %u/ip %u)", - (u_int32_t)ntohl(base.len), length); - } + case IKEv2_MAJOR_VERSION: + ikev2_print(ndo, bp, length, bp2, &base); + break; } } @@ -1403,7 +2355,7 @@ isakmp_rfc3948_print(netdissect_options *ndo, if(length < 4) { goto trunc; } - + /* * see if this is an IKE packet */ @@ -1433,7 +2385,7 @@ isakmp_rfc3948_print(netdissect_options *ndo, } trunc: - printf("[|isakmp]"); + ND_PRINT((ndo,"[|isakmp]")); return; } diff --git a/print-isoclns.c b/print-isoclns.c index d3935fc41196..4f8c347b8113 100644 --- a/print-isoclns.c +++ b/print-isoclns.c @@ -26,7 +26,7 @@ #ifndef lint static const char rcsid[] _U_ = - "@(#) $Header: /tcpdump/master/tcpdump/print-isoclns.c,v 1.133.2.25 2007/03/02 09:20:27 hannes Exp $ (LBL)"; + "@(#) $Header: /tcpdump/master/tcpdump/print-isoclns.c,v 1.163 2007-03-02 09:16:19 hannes Exp $ (LBL)"; #endif #ifdef HAVE_CONFIG_H @@ -47,9 +47,6 @@ static const char rcsid[] _U_ = #include "gmpls.h" #include "oui.h" -#define IPV4 1 /* AFI value */ -#define IPV6 2 /* AFI value */ - /* * IS-IS is defined in ISO 10589. Look there for protocol definitions. */ @@ -338,7 +335,7 @@ static struct tok clnp_option_qos_global_values[] = { }; #define ISIS_SUBTLV_EXT_IS_REACH_ADMIN_GROUP 3 /* draft-ietf-isis-traffic-05 */ -#define ISIS_SUBTLV_EXT_IS_REACH_LINK_LOCAL_REMOTE_ID 4 /* draft-ietf-isis-gmpls-extensions */ +#define ISIS_SUBTLV_EXT_IS_REACH_LINK_LOCAL_REMOTE_ID 4 /* rfc4205 */ #define ISIS_SUBTLV_EXT_IS_REACH_LINK_REMOTE_ID 5 /* draft-ietf-isis-traffic-05 */ #define ISIS_SUBTLV_EXT_IS_REACH_IPV4_INTF_ADDR 6 /* draft-ietf-isis-traffic-05 */ #define ISIS_SUBTLV_EXT_IS_REACH_IPV4_NEIGHBOR_ADDR 8 /* draft-ietf-isis-traffic-05 */ @@ -347,8 +344,9 @@ static struct tok clnp_option_qos_global_values[] = { #define ISIS_SUBTLV_EXT_IS_REACH_UNRESERVED_BW 11 /* rfc4124 */ #define ISIS_SUBTLV_EXT_IS_REACH_BW_CONSTRAINTS_OLD 12 /* draft-ietf-tewg-diff-te-proto-06 */ #define ISIS_SUBTLV_EXT_IS_REACH_TE_METRIC 18 /* draft-ietf-isis-traffic-05 */ -#define ISIS_SUBTLV_EXT_IS_REACH_LINK_PROTECTION_TYPE 20 /* draft-ietf-isis-gmpls-extensions */ -#define ISIS_SUBTLV_EXT_IS_REACH_INTF_SW_CAP_DESCR 21 /* draft-ietf-isis-gmpls-extensions */ +#define ISIS_SUBTLV_EXT_IS_REACH_LINK_ATTRIBUTE 19 /* draft-ietf-isis-link-attr-01 */ +#define ISIS_SUBTLV_EXT_IS_REACH_LINK_PROTECTION_TYPE 20 /* rfc4205 */ +#define ISIS_SUBTLV_EXT_IS_REACH_INTF_SW_CAP_DESCR 21 /* rfc4205 */ #define ISIS_SUBTLV_EXT_IS_REACH_BW_CONSTRAINTS 22 /* rfc4124 */ static struct tok isis_ext_is_reach_subtlv_values[] = { @@ -361,6 +359,7 @@ static struct tok isis_ext_is_reach_subtlv_values[] = { { ISIS_SUBTLV_EXT_IS_REACH_RESERVABLE_BW, "Reservable link bandwidth" }, { ISIS_SUBTLV_EXT_IS_REACH_UNRESERVED_BW, "Unreserved bandwidth" }, { ISIS_SUBTLV_EXT_IS_REACH_TE_METRIC, "Traffic Engineering Metric" }, + { ISIS_SUBTLV_EXT_IS_REACH_LINK_ATTRIBUTE, "Link Attribute" }, { ISIS_SUBTLV_EXT_IS_REACH_LINK_PROTECTION_TYPE, "Link Protection Type" }, { ISIS_SUBTLV_EXT_IS_REACH_INTF_SW_CAP_DESCR, "Interface Switching Capability" }, { ISIS_SUBTLV_EXT_IS_REACH_BW_CONSTRAINTS_OLD, "Bandwidth Constraints (old)" }, @@ -385,6 +384,13 @@ static struct tok isis_ext_ip_reach_subtlv_values[] = { { 0, NULL } }; +static struct tok isis_subtlv_link_attribute_values[] = { + { 0x01, "Local Protection Available" }, + { 0x02, "Link excluded from local protection path" }, + { 0x04, "Local maintenance required"}, + { 0, NULL } +}; + #define ISIS_SUBTLV_AUTH_SIMPLE 1 #define ISIS_SUBTLV_AUTH_MD5 54 #define ISIS_SUBTLV_AUTH_MD5_LEN 16 @@ -502,7 +508,8 @@ struct isis_tlv_ptp_adj { u_int8_t neighbor_extd_local_circuit_id[4]; }; -static int osi_cksum(const u_int8_t *, u_int); +static void osi_print_cksum(const u_int8_t *pptr, u_int16_t checksum, + u_int checksum_offset, u_int length); static int clnp_print(const u_int8_t *, u_int); static void esis_print(const u_int8_t *, u_int); static int isis_print(const u_int8_t *, u_int); @@ -765,7 +772,7 @@ static int clnp_print (const u_int8_t *pptr, u_int length) } printf("%slength %u",eflag ? "" : ", ",length); - printf("\n\t%s PDU, hlen: %u, v: %u, lifetime: %u.%us, Segment PDU length: %u, checksum: 0x%04x ", + printf("\n\t%s PDU, hlen: %u, v: %u, lifetime: %u.%us, Segment PDU length: %u, checksum: 0x%04x", tok2str(clnp_pdu_values, "unknown (%u)",clnp_pdu_type), clnp_header->length_indicator, clnp_header->version, @@ -774,10 +781,8 @@ static int clnp_print (const u_int8_t *pptr, u_int length) EXTRACT_16BITS(clnp_header->segment_length), EXTRACT_16BITS(clnp_header->cksum)); - /* do not attempt to verify the checksum if it is zero */ - if (EXTRACT_16BITS(clnp_header->cksum) == 0) - printf("(unverified)"); - else printf("(%s)", osi_cksum(optr, clnp_header->length_indicator) ? "incorrect" : "correct"); + osi_print_cksum(optr, EXTRACT_16BITS(clnp_header->cksum), 7, + clnp_header->length_indicator); printf("\n\tFlags [%s]", bittok2str(clnp_flag_values,"none",clnp_flags)); @@ -1031,12 +1036,9 @@ esis_print(const u_int8_t *pptr, u_int length) esis_pdu_type); printf(", v: %u%s", esis_header->version, esis_header->version == ESIS_VERSION ? "" : "unsupported" ); - printf(", checksum: 0x%04x ", EXTRACT_16BITS(esis_header->cksum)); - /* do not attempt to verify the checksum if it is zero */ - if (EXTRACT_16BITS(esis_header->cksum) == 0) - printf("(unverified)"); - else - printf("(%s)", osi_cksum(pptr, li) ? "incorrect" : "correct"); + printf(", checksum: 0x%04x", EXTRACT_16BITS(esis_header->cksum)); + + osi_print_cksum(pptr, EXTRACT_16BITS(esis_header->cksum), 7, li); printf(", holding time: %us, length indicator: %u",EXTRACT_16BITS(esis_header->holdtime),li); @@ -1411,7 +1413,7 @@ isis_print_ip_reach_subtlv (const u_int8_t *tptr,int subt,int subl,const char *i static int isis_print_is_reach_subtlv (const u_int8_t *tptr,u_int subt,u_int subl,const char *ident) { - u_int te_class,priority_level; + u_int te_class,priority_level,gmpls_switch_cap; union { /* int to float conversion buffer for several subTLVs */ float f; u_int32_t i; @@ -1435,7 +1437,7 @@ isis_print_is_reach_subtlv (const u_int8_t *tptr,u_int subt,u_int subl,const cha case ISIS_SUBTLV_EXT_IS_REACH_LINK_REMOTE_ID: if (subl >= 4) { printf(", 0x%08x", EXTRACT_32BITS(tptr)); - if (subl == 8) /* draft-ietf-isis-gmpls-extensions */ + if (subl == 8) /* rfc4205 */ printf(", 0x%08x", EXTRACT_32BITS(tptr+4)); } break; @@ -1484,6 +1486,15 @@ isis_print_is_reach_subtlv (const u_int8_t *tptr,u_int subt,u_int subl,const cha if (subl >= 3) printf(", %u", EXTRACT_24BITS(tptr)); break; + case ISIS_SUBTLV_EXT_IS_REACH_LINK_ATTRIBUTE: + if (subl == 2) { + printf(", [ %s ] (0x%04x)", + bittok2str(isis_subtlv_link_attribute_values, + "Unknown", + EXTRACT_16BITS(tptr)), + EXTRACT_16BITS(tptr)); + } + break; case ISIS_SUBTLV_EXT_IS_REACH_LINK_PROTECTION_TYPE: if (subl >= 2) { printf(", %s, Priority %u", @@ -1493,9 +1504,10 @@ isis_print_is_reach_subtlv (const u_int8_t *tptr,u_int subt,u_int subl,const cha break; case ISIS_SUBTLV_EXT_IS_REACH_INTF_SW_CAP_DESCR: if (subl >= 36) { + gmpls_switch_cap = *tptr; printf("%s Interface Switching Capability:%s", ident, - tok2str(gmpls_switch_cap_values, "Unknown", *(tptr))); + tok2str(gmpls_switch_cap_values, "Unknown", gmpls_switch_cap)); printf(", LSP Encoding: %s", tok2str(gmpls_encoding_values, "Unknown", *(tptr+1))); tptr+=4; @@ -1509,12 +1521,29 @@ isis_print_is_reach_subtlv (const u_int8_t *tptr,u_int subt,u_int subl,const cha tptr+=4; } subl-=36; - /* there is some optional stuff left to decode but this is as of yet - not specified so just lets hexdump what is left */ - if(subl>0){ - if(!print_unknown_data(tptr,"\n\t\t ", - subl)) + switch (gmpls_switch_cap) { + case GMPLS_PSC1: + case GMPLS_PSC2: + case GMPLS_PSC3: + case GMPLS_PSC4: + bw.i = EXTRACT_32BITS(tptr); + printf("%s Min LSP Bandwidth: %.3f Mbps", ident, bw.f*8/1000000); + printf("%s Interface MTU: %u", ident, EXTRACT_16BITS(tptr+4)); + break; + case GMPLS_TSC: + bw.i = EXTRACT_32BITS(tptr); + printf("%s Min LSP Bandwidth: %.3f Mbps", ident, bw.f*8/1000000); + printf("%s Indication %s", ident, + tok2str(gmpls_switch_cap_tsc_indication_values, "Unknown (%u)", *(tptr+4))); + break; + default: + /* there is some optional stuff left to decode but this is as of yet + not specified so just lets hexdump what is left */ + if(subl>0){ + if(!print_unknown_data(tptr,"\n\t\t ", + subl)) return(0); + } } } break; @@ -1629,7 +1658,7 @@ isis_print_extd_ip_reach (const u_int8_t *tptr, const char *ident, u_int16_t afi processed=4; tptr+=4; - if (afi == IPV4) { + if (afi == AF_INET) { if (!TTEST2(*tptr, 1)) /* fetch status byte */ return (0); status_byte=*(tptr++); @@ -1642,7 +1671,7 @@ isis_print_extd_ip_reach (const u_int8_t *tptr, const char *ident, u_int16_t afi } processed++; #ifdef INET6 - } else if (afi == IPV6) { + } else if (afi == AF_INET6) { if (!TTEST2(*tptr, 1)) /* fetch status & prefix_len byte */ return (0); status_byte=*(tptr++); @@ -1667,13 +1696,13 @@ isis_print_extd_ip_reach (const u_int8_t *tptr, const char *ident, u_int16_t afi tptr+=byte_length; processed+=byte_length; - if (afi == IPV4) + if (afi == AF_INET) printf("%sIPv4 prefix: %15s/%u", ident, ipaddr_string(prefix), bit_length); #ifdef INET6 - if (afi == IPV6) + if (afi == AF_INET6) printf("%sIPv6 prefix: %s/%u", ident, ip6addr_string(prefix), @@ -1684,17 +1713,20 @@ isis_print_extd_ip_reach (const u_int8_t *tptr, const char *ident, u_int16_t afi ISIS_MASK_TLV_EXTD_IP_UPDOWN(status_byte) ? "down" : "up", metric); - if (afi == IPV4 && ISIS_MASK_TLV_EXTD_IP_SUBTLV(status_byte)) + if (afi == AF_INET && ISIS_MASK_TLV_EXTD_IP_SUBTLV(status_byte)) printf(", sub-TLVs present"); #ifdef INET6 - if (afi == IPV6) + if (afi == AF_INET6) printf(", %s%s", ISIS_MASK_TLV_EXTD_IP6_IE(status_byte) ? "External" : "Internal", ISIS_MASK_TLV_EXTD_IP6_SUBTLV(status_byte) ? ", sub-TLVs present" : ""); #endif - if ((ISIS_MASK_TLV_EXTD_IP_SUBTLV(status_byte) && afi == IPV4) || - (ISIS_MASK_TLV_EXTD_IP6_SUBTLV(status_byte) && afi == IPV6)) { + if ((afi == AF_INET && ISIS_MASK_TLV_EXTD_IP_SUBTLV(status_byte)) +#ifdef INET6 + || (afi == AF_INET6 && ISIS_MASK_TLV_EXTD_IP6_SUBTLV(status_byte)) +#endif + ) { /* assume that one prefix can hold more than one subTLV - therefore the first byte must reflect the aggregate bytecount of the subTLVs for this prefix @@ -1977,15 +2009,9 @@ static int isis_print (const u_int8_t *p, u_int length) EXTRACT_16BITS(header_lsp->remaining_lifetime), EXTRACT_16BITS(header_lsp->checksum)); - /* if this is a purge do not attempt to verify the checksum */ - if ( EXTRACT_16BITS(header_lsp->remaining_lifetime) == 0 && - EXTRACT_16BITS(header_lsp->checksum) == 0) - printf(" (purged)"); - else - /* verify the checksum - - * checking starts at the lsp-id field at byte position [12] - * hence the length needs to be reduced by 12 bytes */ - printf(" (%s)", (osi_cksum((u_int8_t *)header_lsp->lsp_id, length-12)) ? "incorrect" : "correct"); + + osi_print_cksum((u_int8_t *)header_lsp->lsp_id, + EXTRACT_16BITS(header_lsp->checksum), 12, length-12); printf(", PDU length: %u, Flags: [ %s", pdu_len, @@ -2238,7 +2264,7 @@ static int isis_print (const u_int8_t *p, u_int length) case ISIS_TLV_EXTD_IP_REACH: while (tmp>0) { - ext_ip_len = isis_print_extd_ip_reach(tptr, "\n\t ", IPV4); + ext_ip_len = isis_print_extd_ip_reach(tptr, "\n\t ", AF_INET); if (ext_ip_len == 0) /* did something go wrong ? */ goto trunctlv; tptr+=ext_ip_len; @@ -2255,7 +2281,7 @@ static int isis_print (const u_int8_t *p, u_int length) tmp-=mt_len; while (tmp>0) { - ext_ip_len = isis_print_extd_ip_reach(tptr, "\n\t ", IPV4); + ext_ip_len = isis_print_extd_ip_reach(tptr, "\n\t ", AF_INET); if (ext_ip_len == 0) /* did something go wrong ? */ goto trunctlv; tptr+=ext_ip_len; @@ -2266,7 +2292,7 @@ static int isis_print (const u_int8_t *p, u_int length) #ifdef INET6 case ISIS_TLV_IP6_REACH: while (tmp>0) { - ext_ip_len = isis_print_extd_ip_reach(tptr, "\n\t ", IPV6); + ext_ip_len = isis_print_extd_ip_reach(tptr, "\n\t ", AF_INET6); if (ext_ip_len == 0) /* did something go wrong ? */ goto trunctlv; tptr+=ext_ip_len; @@ -2283,7 +2309,7 @@ static int isis_print (const u_int8_t *p, u_int length) tmp-=mt_len; while (tmp>0) { - ext_ip_len = isis_print_extd_ip_reach(tptr, "\n\t ", IPV6); + ext_ip_len = isis_print_extd_ip_reach(tptr, "\n\t ", AF_INET6); if (ext_ip_len == 0) /* did something go wrong ? */ goto trunctlv; tptr+=ext_ip_len; @@ -2488,9 +2514,7 @@ static int isis_print (const u_int8_t *p, u_int length) * to avoid conflicts the checksum TLV is zeroed. * see rfc3358 for details */ - if (EXTRACT_16BITS(tptr) == 0) - printf("(unverified)"); - else printf("(%s)", osi_cksum(optr, length) ? "incorrect" : "correct"); + osi_print_cksum(optr, EXTRACT_16BITS(tptr), tptr-optr, length); break; case ISIS_TLV_MT_SUPPORTED: @@ -2682,25 +2706,25 @@ static int isis_print (const u_int8_t *p, u_int length) return(1); } -/* - * Verify the checksum. See 8473-1, Appendix C, section C.4. - */ - -static int -osi_cksum(const u_int8_t *tptr, u_int len) +static void +osi_print_cksum (const u_int8_t *pptr, u_int16_t checksum, + u_int checksum_offset, u_int length) { - int32_t c0 = 0, c1 = 0; + u_int16_t calculated_checksum; - while ((int)--len >= 0) { - c0 += *tptr++; - c0 %= 255; - c1 += c0; - c1 %= 255; - } - return (c0 | c1); + /* do not attempt to verify the checksum if it is zero */ + if (!checksum) { + printf("(unverified)"); + } else { + calculated_checksum = create_osi_cksum(pptr, checksum_offset, length); + if (checksum == calculated_checksum) { + printf(" (correct)"); + } else { + printf(" (incorrect should be 0x%04x)", calculated_checksum); + } + } } - /* * Local Variables: * c-style: whitesmith diff --git a/print-juniper.c b/print-juniper.c index b5837e378573..08a929f1e269 100644 --- a/print-juniper.c +++ b/print-juniper.c @@ -1,3 +1,5 @@ +/* NetBSD: print-juniper.c,v 1.2 2007/07/24 11:53:45 drochner Exp */ + /* * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that: (1) source code @@ -15,7 +17,9 @@ #ifndef lint static const char rcsid[] _U_ = - "@(#) $Header: /tcpdump/master/tcpdump/print-juniper.c,v 1.8.2.22 2006/05/10 22:42:46 guy Exp $ (LBL)"; + "@(#) $Header: /tcpdump/master/tcpdump/print-juniper.c,v 1.34 2007-08-29 02:31:44 mcr Exp $ (LBL)"; +#else +__RCSID("NetBSD: print-juniper.c,v 1.3 2007/07/25 06:31:32 dogcow Exp "); #endif #ifdef HAVE_CONFIG_H @@ -40,6 +44,8 @@ static const char rcsid[] _U_ = #define JUNIPER_BPF_IN 1 /* Incoming packet */ #define JUNIPER_BPF_PKT_IN 0x1 /* Incoming packet */ #define JUNIPER_BPF_NO_L2 0x2 /* L2 header stripped */ +#define JUNIPER_BPF_IIF 0x4 /* IIF is valid */ +#define JUNIPER_BPF_FILTER 0x40 /* BPF filtering is supported */ #define JUNIPER_BPF_EXT 0x80 /* extensions present */ #define JUNIPER_MGC_NUMBER 0x4d4743 /* = "MGC" */ @@ -74,6 +80,291 @@ static struct tok juniper_direction_values[] = { { 0, NULL} }; +/* codepoints for encoding extensions to a .pcap file */ +enum { + JUNIPER_EXT_TLV_IFD_IDX = 1, + JUNIPER_EXT_TLV_IFD_NAME = 2, + JUNIPER_EXT_TLV_IFD_MEDIATYPE = 3, + JUNIPER_EXT_TLV_IFL_IDX = 4, + JUNIPER_EXT_TLV_IFL_UNIT = 5, + JUNIPER_EXT_TLV_IFL_ENCAPS = 6, + JUNIPER_EXT_TLV_TTP_IFD_MEDIATYPE = 7, + JUNIPER_EXT_TLV_TTP_IFL_ENCAPS = 8 +}; + +/* 1 byte type and 1-byte length */ +#define JUNIPER_EXT_TLV_OVERHEAD 2 + +struct tok jnx_ext_tlv_values[] = { + { JUNIPER_EXT_TLV_IFD_IDX, "Device Interface Index" }, + { JUNIPER_EXT_TLV_IFD_NAME,"Device Interface Name" }, + { JUNIPER_EXT_TLV_IFD_MEDIATYPE, "Device Media Type" }, + { JUNIPER_EXT_TLV_IFL_IDX, "Logical Interface Index" }, + { JUNIPER_EXT_TLV_IFL_UNIT,"Logical Unit Number" }, + { JUNIPER_EXT_TLV_IFL_ENCAPS, "Logical Interface Encapsulation" }, + { JUNIPER_EXT_TLV_TTP_IFD_MEDIATYPE, "TTP derived Device Media Type" }, + { JUNIPER_EXT_TLV_TTP_IFL_ENCAPS, "TTP derived Logical Interface Encapsulation" }, + { 0, NULL } +}; + +struct tok jnx_flag_values[] = { + { JUNIPER_BPF_EXT, "Ext" }, + { JUNIPER_BPF_FILTER, "Filter" }, + { JUNIPER_BPF_IIF, "IIF" }, + { JUNIPER_BPF_NO_L2, "no-L2" }, + { JUNIPER_BPF_PKT_IN, "In" }, + { 0, NULL } +}; + +#define JUNIPER_IFML_ETHER 1 +#define JUNIPER_IFML_FDDI 2 +#define JUNIPER_IFML_TOKENRING 3 +#define JUNIPER_IFML_PPP 4 +#define JUNIPER_IFML_FRAMERELAY 5 +#define JUNIPER_IFML_CISCOHDLC 6 +#define JUNIPER_IFML_SMDSDXI 7 +#define JUNIPER_IFML_ATMPVC 8 +#define JUNIPER_IFML_PPP_CCC 9 +#define JUNIPER_IFML_FRAMERELAY_CCC 10 +#define JUNIPER_IFML_IPIP 11 +#define JUNIPER_IFML_GRE 12 +#define JUNIPER_IFML_PIM 13 +#define JUNIPER_IFML_PIMD 14 +#define JUNIPER_IFML_CISCOHDLC_CCC 15 +#define JUNIPER_IFML_VLAN_CCC 16 +#define JUNIPER_IFML_MLPPP 17 +#define JUNIPER_IFML_MLFR 18 +#define JUNIPER_IFML_ML 19 +#define JUNIPER_IFML_LSI 20 +#define JUNIPER_IFML_DFE 21 +#define JUNIPER_IFML_ATM_CELLRELAY_CCC 22 +#define JUNIPER_IFML_CRYPTO 23 +#define JUNIPER_IFML_GGSN 24 +#define JUNIPER_IFML_LSI_PPP 25 +#define JUNIPER_IFML_LSI_CISCOHDLC 26 +#define JUNIPER_IFML_PPP_TCC 27 +#define JUNIPER_IFML_FRAMERELAY_TCC 28 +#define JUNIPER_IFML_CISCOHDLC_TCC 29 +#define JUNIPER_IFML_ETHERNET_CCC 30 +#define JUNIPER_IFML_VT 31 +#define JUNIPER_IFML_EXTENDED_VLAN_CCC 32 +#define JUNIPER_IFML_ETHER_OVER_ATM 33 +#define JUNIPER_IFML_MONITOR 34 +#define JUNIPER_IFML_ETHERNET_TCC 35 +#define JUNIPER_IFML_VLAN_TCC 36 +#define JUNIPER_IFML_EXTENDED_VLAN_TCC 37 +#define JUNIPER_IFML_CONTROLLER 38 +#define JUNIPER_IFML_MFR 39 +#define JUNIPER_IFML_LS 40 +#define JUNIPER_IFML_ETHERNET_VPLS 41 +#define JUNIPER_IFML_ETHERNET_VLAN_VPLS 42 +#define JUNIPER_IFML_ETHERNET_EXTENDED_VLAN_VPLS 43 +#define JUNIPER_IFML_LT 44 +#define JUNIPER_IFML_SERVICES 45 +#define JUNIPER_IFML_ETHER_VPLS_OVER_ATM 46 +#define JUNIPER_IFML_FR_PORT_CCC 47 +#define JUNIPER_IFML_FRAMERELAY_EXT_CCC 48 +#define JUNIPER_IFML_FRAMERELAY_EXT_TCC 49 +#define JUNIPER_IFML_FRAMERELAY_FLEX 50 +#define JUNIPER_IFML_GGSNI 51 +#define JUNIPER_IFML_ETHERNET_FLEX 52 +#define JUNIPER_IFML_COLLECTOR 53 +#define JUNIPER_IFML_AGGREGATOR 54 +#define JUNIPER_IFML_LAPD 55 +#define JUNIPER_IFML_PPPOE 56 +#define JUNIPER_IFML_PPP_SUBORDINATE 57 +#define JUNIPER_IFML_CISCOHDLC_SUBORDINATE 58 +#define JUNIPER_IFML_DFC 59 +#define JUNIPER_IFML_PICPEER 60 + +struct tok juniper_ifmt_values[] = { + { JUNIPER_IFML_ETHER, "Ethernet" }, + { JUNIPER_IFML_FDDI, "FDDI" }, + { JUNIPER_IFML_TOKENRING, "Token-Ring" }, + { JUNIPER_IFML_PPP, "PPP" }, + { JUNIPER_IFML_PPP_SUBORDINATE, "PPP-Subordinate" }, + { JUNIPER_IFML_FRAMERELAY, "Frame-Relay" }, + { JUNIPER_IFML_CISCOHDLC, "Cisco-HDLC" }, + { JUNIPER_IFML_SMDSDXI, "SMDS-DXI" }, + { JUNIPER_IFML_ATMPVC, "ATM-PVC" }, + { JUNIPER_IFML_PPP_CCC, "PPP-CCC" }, + { JUNIPER_IFML_FRAMERELAY_CCC, "Frame-Relay-CCC" }, + { JUNIPER_IFML_FRAMERELAY_EXT_CCC, "Extended FR-CCC" }, + { JUNIPER_IFML_IPIP, "IP-over-IP" }, + { JUNIPER_IFML_GRE, "GRE" }, + { JUNIPER_IFML_PIM, "PIM-Encapsulator" }, + { JUNIPER_IFML_PIMD, "PIM-Decapsulator" }, + { JUNIPER_IFML_CISCOHDLC_CCC, "Cisco-HDLC-CCC" }, + { JUNIPER_IFML_VLAN_CCC, "VLAN-CCC" }, + { JUNIPER_IFML_EXTENDED_VLAN_CCC, "Extended-VLAN-CCC" }, + { JUNIPER_IFML_MLPPP, "Multilink-PPP" }, + { JUNIPER_IFML_MLFR, "Multilink-FR" }, + { JUNIPER_IFML_MFR, "Multilink-FR-UNI-NNI" }, + { JUNIPER_IFML_ML, "Multilink" }, + { JUNIPER_IFML_LS, "LinkService" }, + { JUNIPER_IFML_LSI, "LSI" }, + { JUNIPER_IFML_ATM_CELLRELAY_CCC, "ATM-CCC-Cell-Relay" }, + { JUNIPER_IFML_CRYPTO, "IPSEC-over-IP" }, + { JUNIPER_IFML_GGSN, "GGSN" }, + { JUNIPER_IFML_PPP_TCC, "PPP-TCC" }, + { JUNIPER_IFML_FRAMERELAY_TCC, "Frame-Relay-TCC" }, + { JUNIPER_IFML_FRAMERELAY_EXT_TCC, "Extended FR-TCC" }, + { JUNIPER_IFML_CISCOHDLC_TCC, "Cisco-HDLC-TCC" }, + { JUNIPER_IFML_ETHERNET_CCC, "Ethernet-CCC" }, + { JUNIPER_IFML_VT, "VPN-Loopback-tunnel" }, + { JUNIPER_IFML_ETHER_OVER_ATM, "Ethernet-over-ATM" }, + { JUNIPER_IFML_ETHER_VPLS_OVER_ATM, "Ethernet-VPLS-over-ATM" }, + { JUNIPER_IFML_MONITOR, "Monitor" }, + { JUNIPER_IFML_ETHERNET_TCC, "Ethernet-TCC" }, + { JUNIPER_IFML_VLAN_TCC, "VLAN-TCC" }, + { JUNIPER_IFML_EXTENDED_VLAN_TCC, "Extended-VLAN-TCC" }, + { JUNIPER_IFML_CONTROLLER, "Controller" }, + { JUNIPER_IFML_ETHERNET_VPLS, "VPLS" }, + { JUNIPER_IFML_ETHERNET_VLAN_VPLS, "VLAN-VPLS" }, + { JUNIPER_IFML_ETHERNET_EXTENDED_VLAN_VPLS, "Extended-VLAN-VPLS" }, + { JUNIPER_IFML_LT, "Logical-tunnel" }, + { JUNIPER_IFML_SERVICES, "General-Services" }, + { JUNIPER_IFML_PPPOE, "PPPoE" }, + { JUNIPER_IFML_ETHERNET_FLEX, "Flexible-Ethernet-Services" }, + { JUNIPER_IFML_FRAMERELAY_FLEX, "Flexible-FrameRelay" }, + { JUNIPER_IFML_COLLECTOR, "Flow-collection" }, + { JUNIPER_IFML_PICPEER, "PIC Peer" }, + { JUNIPER_IFML_DFC, "Dynamic-Flow-Capture" }, + {0, NULL} +}; + +#define JUNIPER_IFLE_ATM_SNAP 2 +#define JUNIPER_IFLE_ATM_NLPID 3 +#define JUNIPER_IFLE_ATM_VCMUX 4 +#define JUNIPER_IFLE_ATM_LLC 5 +#define JUNIPER_IFLE_ATM_PPP_VCMUX 6 +#define JUNIPER_IFLE_ATM_PPP_LLC 7 +#define JUNIPER_IFLE_ATM_PPP_FUNI 8 +#define JUNIPER_IFLE_ATM_CCC 9 +#define JUNIPER_IFLE_FR_NLPID 10 +#define JUNIPER_IFLE_FR_SNAP 11 +#define JUNIPER_IFLE_FR_PPP 12 +#define JUNIPER_IFLE_FR_CCC 13 +#define JUNIPER_IFLE_ENET2 14 +#define JUNIPER_IFLE_IEEE8023_SNAP 15 +#define JUNIPER_IFLE_IEEE8023_LLC 16 +#define JUNIPER_IFLE_PPP 17 +#define JUNIPER_IFLE_CISCOHDLC 18 +#define JUNIPER_IFLE_PPP_CCC 19 +#define JUNIPER_IFLE_IPIP_NULL 20 +#define JUNIPER_IFLE_PIM_NULL 21 +#define JUNIPER_IFLE_GRE_NULL 22 +#define JUNIPER_IFLE_GRE_PPP 23 +#define JUNIPER_IFLE_PIMD_DECAPS 24 +#define JUNIPER_IFLE_CISCOHDLC_CCC 25 +#define JUNIPER_IFLE_ATM_CISCO_NLPID 26 +#define JUNIPER_IFLE_VLAN_CCC 27 +#define JUNIPER_IFLE_MLPPP 28 +#define JUNIPER_IFLE_MLFR 29 +#define JUNIPER_IFLE_LSI_NULL 30 +#define JUNIPER_IFLE_AGGREGATE_UNUSED 31 +#define JUNIPER_IFLE_ATM_CELLRELAY_CCC 32 +#define JUNIPER_IFLE_CRYPTO 33 +#define JUNIPER_IFLE_GGSN 34 +#define JUNIPER_IFLE_ATM_TCC 35 +#define JUNIPER_IFLE_FR_TCC 36 +#define JUNIPER_IFLE_PPP_TCC 37 +#define JUNIPER_IFLE_CISCOHDLC_TCC 38 +#define JUNIPER_IFLE_ETHERNET_CCC 39 +#define JUNIPER_IFLE_VT 40 +#define JUNIPER_IFLE_ATM_EOA_LLC 41 +#define JUNIPER_IFLE_EXTENDED_VLAN_CCC 42 +#define JUNIPER_IFLE_ATM_SNAP_TCC 43 +#define JUNIPER_IFLE_MONITOR 44 +#define JUNIPER_IFLE_ETHERNET_TCC 45 +#define JUNIPER_IFLE_VLAN_TCC 46 +#define JUNIPER_IFLE_EXTENDED_VLAN_TCC 47 +#define JUNIPER_IFLE_MFR 48 +#define JUNIPER_IFLE_ETHERNET_VPLS 49 +#define JUNIPER_IFLE_ETHERNET_VLAN_VPLS 50 +#define JUNIPER_IFLE_ETHERNET_EXTENDED_VLAN_VPLS 51 +#define JUNIPER_IFLE_SERVICES 52 +#define JUNIPER_IFLE_ATM_ETHER_VPLS_ATM_LLC 53 +#define JUNIPER_IFLE_FR_PORT_CCC 54 +#define JUNIPER_IFLE_ATM_MLPPP_LLC 55 +#define JUNIPER_IFLE_ATM_EOA_CCC 56 +#define JUNIPER_IFLE_LT_VLAN 57 +#define JUNIPER_IFLE_COLLECTOR 58 +#define JUNIPER_IFLE_AGGREGATOR 59 +#define JUNIPER_IFLE_LAPD 60 +#define JUNIPER_IFLE_ATM_PPPOE_LLC 61 +#define JUNIPER_IFLE_ETHERNET_PPPOE 62 +#define JUNIPER_IFLE_PPPOE 63 +#define JUNIPER_IFLE_PPP_SUBORDINATE 64 +#define JUNIPER_IFLE_CISCOHDLC_SUBORDINATE 65 +#define JUNIPER_IFLE_DFC 66 +#define JUNIPER_IFLE_PICPEER 67 + +struct tok juniper_ifle_values[] = { + { JUNIPER_IFLE_AGGREGATOR, "Aggregator" }, + { JUNIPER_IFLE_ATM_CCC, "CCC over ATM" }, + { JUNIPER_IFLE_ATM_CELLRELAY_CCC, "ATM CCC Cell Relay" }, + { JUNIPER_IFLE_ATM_CISCO_NLPID, "CISCO compatible NLPID" }, + { JUNIPER_IFLE_ATM_EOA_CCC, "Ethernet over ATM CCC" }, + { JUNIPER_IFLE_ATM_EOA_LLC, "Ethernet over ATM LLC" }, + { JUNIPER_IFLE_ATM_ETHER_VPLS_ATM_LLC, "Ethernet VPLS over ATM LLC" }, + { JUNIPER_IFLE_ATM_LLC, "ATM LLC" }, + { JUNIPER_IFLE_ATM_MLPPP_LLC, "MLPPP over ATM LLC" }, + { JUNIPER_IFLE_ATM_NLPID, "ATM NLPID" }, + { JUNIPER_IFLE_ATM_PPPOE_LLC, "PPPoE over ATM LLC" }, + { JUNIPER_IFLE_ATM_PPP_FUNI, "PPP over FUNI" }, + { JUNIPER_IFLE_ATM_PPP_LLC, "PPP over ATM LLC" }, + { JUNIPER_IFLE_ATM_PPP_VCMUX, "PPP over ATM VCMUX" }, + { JUNIPER_IFLE_ATM_SNAP, "ATM SNAP" }, + { JUNIPER_IFLE_ATM_SNAP_TCC, "ATM SNAP TCC" }, + { JUNIPER_IFLE_ATM_TCC, "ATM VCMUX TCC" }, + { JUNIPER_IFLE_ATM_VCMUX, "ATM VCMUX" }, + { JUNIPER_IFLE_CISCOHDLC, "C-HDLC" }, + { JUNIPER_IFLE_CISCOHDLC_CCC, "C-HDLC CCC" }, + { JUNIPER_IFLE_CISCOHDLC_SUBORDINATE, "C-HDLC via dialer" }, + { JUNIPER_IFLE_CISCOHDLC_TCC, "C-HDLC TCC" }, + { JUNIPER_IFLE_COLLECTOR, "Collector" }, + { JUNIPER_IFLE_CRYPTO, "Crypto" }, + { JUNIPER_IFLE_ENET2, "Ethernet" }, + { JUNIPER_IFLE_ETHERNET_CCC, "Ethernet CCC" }, + { JUNIPER_IFLE_ETHERNET_EXTENDED_VLAN_VPLS, "Extended VLAN VPLS" }, + { JUNIPER_IFLE_ETHERNET_PPPOE, "PPPoE over Ethernet" }, + { JUNIPER_IFLE_ETHERNET_TCC, "Ethernet TCC" }, + { JUNIPER_IFLE_ETHERNET_VLAN_VPLS, "VLAN VPLS" }, + { JUNIPER_IFLE_ETHERNET_VPLS, "VPLS" }, + { JUNIPER_IFLE_EXTENDED_VLAN_CCC, "Extended VLAN CCC" }, + { JUNIPER_IFLE_EXTENDED_VLAN_TCC, "Extended VLAN TCC" }, + { JUNIPER_IFLE_FR_CCC, "FR CCC" }, + { JUNIPER_IFLE_FR_NLPID, "FR NLPID" }, + { JUNIPER_IFLE_FR_PORT_CCC, "FR CCC" }, + { JUNIPER_IFLE_FR_PPP, "FR PPP" }, + { JUNIPER_IFLE_FR_SNAP, "FR SNAP" }, + { JUNIPER_IFLE_FR_TCC, "FR TCC" }, + { JUNIPER_IFLE_GGSN, "GGSN" }, + { JUNIPER_IFLE_GRE_NULL, "GRE NULL" }, + { JUNIPER_IFLE_GRE_PPP, "PPP over GRE" }, + { JUNIPER_IFLE_IPIP_NULL, "IPIP" }, + { JUNIPER_IFLE_LAPD, "LAPD" }, + { JUNIPER_IFLE_LSI_NULL, "LSI Null" }, + { JUNIPER_IFLE_LT_VLAN, "LT VLAN" }, + { JUNIPER_IFLE_MFR, "MFR" }, + { JUNIPER_IFLE_MLFR, "MLFR" }, + { JUNIPER_IFLE_MLPPP, "MLPPP" }, + { JUNIPER_IFLE_MONITOR, "Monitor" }, + { JUNIPER_IFLE_PIMD_DECAPS, "PIMd" }, + { JUNIPER_IFLE_PIM_NULL, "PIM Null" }, + { JUNIPER_IFLE_PPP, "PPP" }, + { JUNIPER_IFLE_PPPOE, "PPPoE" }, + { JUNIPER_IFLE_PPP_CCC, "PPP CCC" }, + { JUNIPER_IFLE_PPP_SUBORDINATE, "" }, + { JUNIPER_IFLE_PPP_TCC, "PPP TCC" }, + { JUNIPER_IFLE_SERVICES, "General Services" }, + { JUNIPER_IFLE_VLAN_CCC, "VLAN CCC" }, + { JUNIPER_IFLE_VLAN_TCC, "VLAN TCC" }, + { JUNIPER_IFLE_VT, "VT" }, + {0, NULL} +}; + struct juniper_cookie_table_t { u_int32_t pictype; /* pic type */ u_int8_t cookie_len; /* cookie len */ @@ -128,6 +419,7 @@ struct juniper_l2info_t { u_int8_t cookie[8]; u_int8_t bundle; u_int16_t proto; + u_int8_t flags; }; #define LS_COOKIE_ID 0x54 @@ -156,6 +448,7 @@ static struct tok juniper_protocol_values[] = { int ip_heuristic_guess(register const u_char *, u_int); int juniper_ppp_heuristic_guess(register const u_char *, u_int); +int juniper_read_tlv_value(const u_char *, u_int, u_int); static int juniper_parse_header (const u_char *, const struct pcap_pkthdr *, struct juniper_l2info_t *); #ifdef DLT_JUNIPER_GGSN @@ -178,13 +471,14 @@ juniper_ggsn_print(const struct pcap_pkthdr *h, register const u_char *p) return l2info.header_len; p+=l2info.header_len; - gh = (struct juniper_ggsn_header *)p; + gh = (struct juniper_ggsn_header *)&l2info.cookie; - if (eflag) + if (eflag) { printf("proto %s (%u), vlan %u: ", tok2str(juniper_protocol_values,"Unknown",gh->proto), gh->proto, EXTRACT_16BITS(&gh->vlan_id[0])); + } switch (gh->proto) { case JUNIPER_PROTO_IPV4: @@ -256,8 +550,8 @@ juniper_es_print(const struct pcap_pkthdr *h, register const u_char *p) tok2str(juniper_ipsec_type_values,"Unknown",ih->type), ih->type, EXTRACT_32BITS(&ih->spi), - ipaddr_string(EXTRACT_32BITS(&ih->src_ip)), - ipaddr_string(EXTRACT_32BITS(&ih->dst_ip)), + ipaddr_string(&ih->src_ip), + ipaddr_string(&ih->dst_ip), l2info.length); } else { printf("ES SA, index %u, ttl %u type %s (%u), length %u\n", @@ -790,14 +1084,63 @@ ip_heuristic_guess(register const u_char *p, u_int length) { return 1; /* we printed an v4/v6 packet */ } +int +juniper_read_tlv_value(const u_char *p, u_int tlv_type, u_int tlv_len) { + + int tlv_value; + + /* TLVs < 128 are little endian encoded */ + if (tlv_type < 128) { + switch (tlv_len) { + case 1: + tlv_value = *p; + break; + case 2: + tlv_value = EXTRACT_LE_16BITS(p); + break; + case 3: + tlv_value = EXTRACT_LE_24BITS(p); + break; + case 4: + tlv_value = EXTRACT_LE_32BITS(p); + break; + default: + tlv_value = -1; + break; + } + } else { + /* TLVs >= 128 are big endian encoded */ + switch (tlv_len) { + case 1: + tlv_value = *p; + break; + case 2: + tlv_value = EXTRACT_16BITS(p); + break; + case 3: + tlv_value = EXTRACT_24BITS(p); + break; + case 4: + tlv_value = EXTRACT_32BITS(p); + break; + default: + tlv_value = -1; + break; + } + } + return tlv_value; +} + static int juniper_parse_header (const u_char *p, const struct pcap_pkthdr *h, struct juniper_l2info_t *l2info) { struct juniper_cookie_table_t *lp = juniper_cookie_table; - u_int idx, offset; -#ifdef DLT_JUNIPER_ATM2 + u_int idx, jnx_ext_len, jnx_header_len = 0; + u_int8_t tlv_type,tlv_len; u_int32_t control_word; -#endif + int tlv_value; + const u_char *tptr; + l2info->header_len = 0; l2info->cookie_len = 0; @@ -806,9 +1149,10 @@ juniper_parse_header (const u_char *p, const struct pcap_pkthdr *h, struct junip l2info->length = h->len; l2info->caplen = h->caplen; + TCHECK2(p[0],4); + l2info->flags = p[3]; l2info->direction = p[3]&JUNIPER_BPF_PKT_IN; - TCHECK2(p[0],4); if (EXTRACT_24BITS(p) != JUNIPER_MGC_NUMBER) { /* magic number found ? */ printf("no magic-number found!"); return 0; @@ -817,15 +1161,92 @@ juniper_parse_header (const u_char *p, const struct pcap_pkthdr *h, struct junip if (eflag) /* print direction */ printf("%3s ",tok2str(juniper_direction_values,"---",l2info->direction)); - /* extensions present ? - calculate how much bytes to skip */ - if ((p[3] & JUNIPER_BPF_EXT ) == JUNIPER_BPF_EXT ) { - offset = 6 + EXTRACT_16BITS(p+4); - if (eflag>1) - printf("ext-len %u, ",EXTRACT_16BITS(p+4)); - } else - offset = 4; + /* magic number + flags */ + jnx_header_len = 4; - if ((p[3] & JUNIPER_BPF_NO_L2 ) == JUNIPER_BPF_NO_L2 ) { + if (vflag>1) + printf("\n\tJuniper PCAP Flags [%s]", + bittok2str(jnx_flag_values, "none", l2info->flags)); + + /* extensions present ? - calculate how much bytes to skip */ + if ((l2info->flags & JUNIPER_BPF_EXT ) == JUNIPER_BPF_EXT ) { + + tptr = p+jnx_header_len; + + /* ok to read extension length ? */ + TCHECK2(tptr[0], 2); + jnx_ext_len = EXTRACT_16BITS(tptr); + jnx_header_len += 2; + tptr +=2; + + /* nail up the total length - + * just in case something goes wrong + * with TLV parsing */ + jnx_header_len += jnx_ext_len; + + if (vflag>1) + printf(", PCAP Extension(s) total length %u", + jnx_ext_len); + + TCHECK2(tptr[0], jnx_ext_len); + while (jnx_ext_len > JUNIPER_EXT_TLV_OVERHEAD) { + tlv_type = *(tptr++); + tlv_len = *(tptr++); + tlv_value = 0; + + /* sanity check */ + if (tlv_type == 0 || tlv_len == 0) + break; + + if (vflag>1) + printf("\n\t %s Extension TLV #%u, length %u, value ", + tok2str(jnx_ext_tlv_values,"Unknown",tlv_type), + tlv_type, + tlv_len); + + tlv_value = juniper_read_tlv_value(tptr, tlv_type, tlv_len); + switch (tlv_type) { + case JUNIPER_EXT_TLV_IFD_NAME: + /* FIXME */ + break; + case JUNIPER_EXT_TLV_IFD_MEDIATYPE: + case JUNIPER_EXT_TLV_TTP_IFD_MEDIATYPE: + if (tlv_value != -1) { + if (vflag>1) + printf("%s (%u)", + tok2str(juniper_ifmt_values, "Unknown", tlv_value), + tlv_value); + } + break; + case JUNIPER_EXT_TLV_IFL_ENCAPS: + case JUNIPER_EXT_TLV_TTP_IFL_ENCAPS: + if (tlv_value != -1) { + if (vflag>1) + printf("%s (%u)", + tok2str(juniper_ifle_values, "Unknown", tlv_value), + tlv_value); + } + break; + case JUNIPER_EXT_TLV_IFL_IDX: /* fall through */ + case JUNIPER_EXT_TLV_IFL_UNIT: + case JUNIPER_EXT_TLV_IFD_IDX: + default: + if (tlv_value != -1) { + if (vflag>1) + printf("%u",tlv_value); + } + break; + } + + tptr+=tlv_len; + jnx_ext_len -= tlv_len+JUNIPER_EXT_TLV_OVERHEAD; + } + + if (vflag>1) + printf("\n\t-----original packet-----\n\t"); + } + + if ((l2info->flags & JUNIPER_BPF_NO_L2 ) == JUNIPER_BPF_NO_L2 ) { if (eflag) printf("no-L2-hdr, "); @@ -833,15 +1254,15 @@ juniper_parse_header (const u_char *p, const struct pcap_pkthdr *h, struct junip * perform the v4/v6 heuristics * to figure out what it is */ - TCHECK2(p[offset+4],1); - if(ip_heuristic_guess(p+offset+4,l2info->length-(offset+4)) == 0) + TCHECK2(p[jnx_header_len+4],1); + if(ip_heuristic_guess(p+jnx_header_len+4,l2info->length-(jnx_header_len+4)) == 0) printf("no IP-hdr found!"); - l2info->header_len=offset+4; + l2info->header_len=jnx_header_len+4; return 0; /* stop parsing the output further */ } - l2info->header_len = offset; + l2info->header_len = jnx_header_len; p+=l2info->header_len; l2info->length -= l2info->header_len; l2info->caplen -= l2info->header_len; @@ -988,6 +1409,10 @@ juniper_parse_header (const u_char *p, const struct pcap_pkthdr *h, struct junip } break; #endif +#ifdef DLT_JUNIPER_GGSN + case DLT_JUNIPER_GGSN: + break; +#endif #ifdef DLT_JUNIPER_ATM1 case DLT_JUNIPER_ATM1: break; diff --git a/print-krb.c b/print-krb.c index d6c8e14f4f7f..213db642db63 100644 --- a/print-krb.c +++ b/print-krb.c @@ -23,7 +23,7 @@ #ifndef lint static const char rcsid[] _U_ = - "@(#) $Header: /tcpdump/master/tcpdump/print-krb.c,v 1.23 2003/11/16 09:36:26 guy Exp $"; + "@(#) $Header: /tcpdump/master/tcpdump/print-krb.c,v 1.23 2003-11-16 09:36:26 guy Exp $"; #endif #ifdef HAVE_CONFIG_H diff --git a/print-l2tp.c b/print-l2tp.c index 6ceab43e75f6..55c2125174ee 100644 --- a/print-l2tp.c +++ b/print-l2tp.c @@ -23,7 +23,7 @@ #ifndef lint static const char rcsid[] _U_ = - "@(#) $Header: /tcpdump/master/tcpdump/print-l2tp.c,v 1.17.2.3 2006/06/23 02:07:27 hannes Exp $"; + "@(#) $Header: /tcpdump/master/tcpdump/print-l2tp.c,v 1.20 2006-06-23 02:03:09 hannes Exp $"; #endif #ifdef HAVE_CONFIG_H diff --git a/print-lane.c b/print-lane.c index 1c3c2c21639f..33723aaa4751 100644 --- a/print-lane.c +++ b/print-lane.c @@ -22,7 +22,7 @@ #ifndef lint static const char rcsid[] _U_ = - "@(#) $Header: /tcpdump/master/tcpdump/print-lane.c,v 1.23.2.2 2005/11/13 12:12:59 guy Exp $ (LBL)"; + "@(#) $Header: /tcpdump/master/tcpdump/print-lane.c,v 1.25 2005-11-13 12:12:42 guy Exp $ (LBL)"; #endif #ifdef HAVE_CONFIG_H diff --git a/print-lcp.c b/print-lcp.c deleted file mode 100644 index ddea9c6053c7..000000000000 --- a/print-lcp.c +++ /dev/null @@ -1,216 +0,0 @@ -/* - * Copyright (c) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997 - * The Regents of the University of California. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that: (1) source code distributions - * retain the above copyright notice and this paragraph in its entirety, (2) - * distributions including binary code include the above copyright notice and - * this paragraph in its entirety in the documentation or other materials - * provided with the distribution, and (3) all advertising materials mentioning - * features or use of this software display the following acknowledgement: - * ``This product includes software developed by the University of California, - * Lawrence Berkeley Laboratory and its contributors.'' Neither the name of - * the University nor the names of its contributors may be used to endorse - * or promote products derived from this software without specific prior - * written permission. - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - */ - -#ifndef lint -static const char rcsid[] = -"@(#) $Header: /tcpdump/master/tcpdump/print-lcp.c,v 1.9 2000/10/06 04:23:12 guy Exp $ (LBL)"; -#endif - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include -#include -#include - -#include - -#include -#include - -#include "interface.h" -#include "addrtoname.h" -#include "extract.h" /* must come after interface.h */ -#include "ppp.h" - -/* Codes */ -enum { - LCP_CONFREQ = 1, - LCP_CONFACK = 2, - LCP_CONFNAK = 3, - LCP_CONFREJ = 4, - LCP_TERMREQ = 5, - LCP_TERMACK = 6, - LCP_CODEREJ = 7, - LCP_PROTREJ = 8, - LCP_ECHOREQ = 9, - LCP_ECHOREP = 10, - LCP_DISCARD = 11 -}; - -static struct tok lcpcode2str[] = { - { LCP_CONFREQ, "ConfReq" }, - { LCP_CONFACK, "ConfAck" }, - { LCP_CONFNAK, "ConfNak" }, - { LCP_CONFREJ, "ConfRej" }, - { LCP_TERMREQ, "TermReq" }, - { LCP_TERMACK, "TermAck" }, - { LCP_CODEREJ, "CodeRej" }, - { LCP_PROTREJ, "ProtRej" }, - { LCP_ECHOREQ, "EchoReq" }, - { LCP_ECHOREP, "EchoRep" }, - { LCP_DISCARD, "Discard" }, - { 0, NULL } -}; - - -enum { - LCP_RESERVED = 0, - LCP_MRU = 1, - LCP_ASYNCMAP = 2, - LCP_AUTHPROTO = 3, - LCP_QUALPROTO = 4, - LCP_MAGICNUM = 5, - LCP_PCOMP = 7, - LCP_ACFCOMP = 8, - LCP_CALLBACK = 13 -}; - -static struct tok lcpoption2str[] = { - { LCP_RESERVED, "reserved"}, - { LCP_MRU, "mru"}, - { LCP_ASYNCMAP, "asyncmap"}, - { LCP_AUTHPROTO, "auth"}, - { LCP_QUALPROTO, "qual"}, - { LCP_MAGICNUM, "magic"}, - { LCP_PCOMP, "pcomp"}, - { LCP_ACFCOMP, "acfcomp"}, - { LCP_CALLBACK, "callback"}, - { 0, NULL } -}; - -static struct tok lcpauth2str[] = { - {0xc023, "PAP"}, - {0xc223, "CHAP"}, - { 0, NULL } -}; - -static struct tok lcpqual2str[] = { - {0xc025, "LQR"}, - { 0, NULL } -}; - -static struct tok lcpchap2str[] = { - {0x05, "MD5"}, - {0x80, "MS"}, - { 0, NULL } -}; - -void -lcp_print(register const u_char *bp, u_int length) -{ - u_short lcp_code, lcp_id, lcp_length; - const u_char *lcp_data; - - lcp_data = bp+4; - - if (snapend < lcp_data) { - printf(" [LCP|]"); - return; - } - - lcp_code = bp[0]; - lcp_id = bp[1]; - lcp_length = EXTRACT_16BITS(bp+2); - - printf("LCP %s id=0x%x", tok2str(lcpcode2str, "LCP-#%d", lcp_code), lcp_id); - - switch (lcp_code) { - case LCP_CONFREQ: - case LCP_CONFACK: - case LCP_CONFNAK: - case LCP_CONFREJ: - /* Print Options */ - { - u_char lcpopt_type, lcpopt_length; - const u_char *p=lcp_data; - while (p+2 < lcp_data+lcp_length && p+2 < snapend) { - lcpopt_type = p[0]; - lcpopt_length = p[1]; - p+=2; - printf(" <%s ",tok2str(lcpoption2str, "option-#%d", lcpopt_type)); - if (lcpopt_length) - switch (lcpopt_type) { - case LCP_MRU: - if (snapend < p+2) return; - printf("%d",ntohs(*(u_short*)p)); - if (lcpopt_length != 4) printf(" len=%d!",lcpopt_length); - break; - case LCP_AUTHPROTO: - if (snapend < p+2) return; - printf("%s",tok2str(lcpauth2str, "AUTH-%#x", ntohs(*(u_short*)p))); - if (lcpopt_length < 4) printf(" len=%d!",lcpopt_length); - if (lcpopt_length >= 5 && p < snapend) - printf(" %s",tok2str(lcpchap2str, "%#x", p[0])); - break; - case LCP_QUALPROTO: - if (snapend < p+2) return; - printf("%s",tok2str(lcpqual2str, "QUAL-%#x", ntohs(*(u_short*)p))); - if (lcpopt_length < 4) printf(" len=%d!",lcpopt_length); - /* Print data field of auth? */ - break; - case LCP_ASYNCMAP: - case LCP_MAGICNUM: - if (snapend < p+4) return; - printf("%#x", (unsigned)ntohl(*(u_long*)p)); - if (lcpopt_length != 6) printf(" len=%d!",lcpopt_length); - break; - case LCP_PCOMP: - case LCP_ACFCOMP: - case LCP_RESERVED: - if (lcpopt_length != 2) printf(" len=%d!",lcpopt_length); - break; - default: - if (lcpopt_length != 2) printf(" len=%d",lcpopt_length); - break; - } - printf(">"); - p+=lcpopt_length-2; - } - } - break; - case LCP_ECHOREQ: - case LCP_ECHOREP: - case LCP_DISCARD: - if (snapend < lcp_data+4) return; - printf(" magic=%#x", (unsigned)ntohl(*(u_long *) lcp_data)); - lcp_data +=4; - break; - case LCP_PROTREJ: - if (snapend < lcp_data+2) return; - printf(" prot=%s", tok2str(ppptype2str, "PROT-%#x", ntohs(*(u_short *) lcp_data))); - /* TODO print rejected packet too ? */ - break; - case LCP_CODEREJ: - if (snapend < lcp_data+4) return; - printf(" "); - lcp_print(lcp_data, (lcp_length+lcp_data > snapend ? snapend-lcp_data : lcp_length)); - break; - case LCP_TERMREQ: - case LCP_TERMACK: - break; - default: - break; - } - - return; -} diff --git a/print-ldp.c b/print-ldp.c index 3280d8ca2a86..de3b34e5b54f 100644 --- a/print-ldp.c +++ b/print-ldp.c @@ -16,7 +16,7 @@ #ifndef lint static const char rcsid[] _U_ = - "@(#) $Header: /tcpdump/master/tcpdump/print-ldp.c,v 1.8.2.10 2007/02/26 13:31:33 hannes Exp $"; + "@(#) $Header: /tcpdump/master/tcpdump/print-ldp.c,v 1.20 2006-06-23 02:03:09 hannes Exp $"; #endif #ifdef HAVE_CONFIG_H @@ -33,9 +33,9 @@ static const char rcsid[] _U_ = #include "decode_prefix.h" #include "extract.h" #include "addrtoname.h" -#include "af.h" #include "l2vpn.h" +#include "af.h" /* * ldp common header @@ -131,6 +131,7 @@ static const struct tok ldp_msg_values[] = { #define LDP_TLV_FEC 0x0100 #define LDP_TLV_ADDRESS_LIST 0x0101 +#define LDP_TLV_ADDRESS_LIST_AFNUM_LEN 2 #define LDP_TLV_HOP_COUNT 0x0103 #define LDP_TLV_PATH_VECTOR 0x0104 #define LDP_TLV_GENERIC_LABEL 0x0200 @@ -149,6 +150,7 @@ static const struct tok ldp_msg_values[] = { #define LDP_TLV_FR_SESSION_PARM 0x0502 #define LDP_TLV_FT_SESSION 0x0503 #define LDP_TLV_LABEL_REQUEST_MSG_ID 0x0600 +#define LDP_TLV_MTU 0x0601 /* rfc 3988 */ static const struct tok ldp_tlv_values[] = { { LDP_TLV_FEC, "FEC" }, @@ -171,6 +173,7 @@ static const struct tok ldp_tlv_values[] = { { LDP_TLV_FR_SESSION_PARM, "Frame-Relay Session Parameters" }, { LDP_TLV_FT_SESSION, "Fault-Tolerant Session Parameters" }, { LDP_TLV_LABEL_REQUEST_MSG_ID, "Label Request Message ID" }, + { LDP_TLV_MTU, "MTU" }, { 0, NULL} }; @@ -215,8 +218,6 @@ static const struct tok ldp_fec_martini_ifparm_vccv_cv_values[] = { { 0, NULL} }; -#define AFNUM_LEN 2 - int ldp_msg_print(register const u_char *); int ldp_tlv_print(register const u_char *); @@ -292,27 +293,31 @@ ldp_tlv_print(register const u_char *tptr) { case LDP_TLV_ADDRESS_LIST: af = EXTRACT_16BITS(tptr); - tptr+=AFNUM_LEN; - tlv_tlen -= AFNUM_LEN; - printf("\n\t Address Family: "); - if (af == AFNUM_INET) { - printf("IPv4, addresses:"); + tptr+=LDP_TLV_ADDRESS_LIST_AFNUM_LEN; + tlv_tlen -= LDP_TLV_ADDRESS_LIST_AFNUM_LEN; + printf("\n\t Address Family: %s, addresses", + tok2str(af_values, "Unknown (%u)", af)); + switch (af) { + case AFNUM_INET: while(tlv_tlen >= sizeof(struct in_addr)) { printf(" %s",ipaddr_string(tptr)); tlv_tlen-=sizeof(struct in_addr); tptr+=sizeof(struct in_addr); } - } + break; #ifdef INET6 - else if (af == AFNUM_INET6) { - printf("IPv6, addresses:"); + case AFNUM_INET6: while(tlv_tlen >= sizeof(struct in6_addr)) { printf(" %s",ip6addr_string(tptr)); tlv_tlen-=sizeof(struct in6_addr); tptr+=sizeof(struct in6_addr); } - } + break; #endif + default: + /* unknown AF */ + break; + } break; case LDP_TLV_COMMON_SESSION: @@ -450,6 +455,10 @@ ldp_tlv_print(register const u_char *tptr) { printf(", Recovery Time: %ums", ui); break; + case LDP_TLV_MTU: + printf("\n\t MTU: %u", EXTRACT_16BITS(tptr)); + break; + /* * FIXME those are the defined TLVs that lack a decoder diff --git a/print-llc.c b/print-llc.c index bc4198501ab7..0c8259fbb6b8 100644 --- a/print-llc.c +++ b/print-llc.c @@ -24,7 +24,7 @@ #ifndef lint static const char rcsid[] _U_ = - "@(#) $Header: /tcpdump/master/tcpdump/print-llc.c,v 1.61.2.10 2007/02/08 07:07:51 guy Exp $"; + "@(#) $Header: /tcpdump/master/tcpdump/print-llc.c,v 1.75 2007-04-13 09:43:11 hannes Exp $"; #endif #ifdef HAVE_CONFIG_H @@ -105,6 +105,8 @@ static const struct tok cisco_values[] = { { PID_CISCO_CDP, "CDP" }, { PID_CISCO_VTP, "VTP" }, { PID_CISCO_DTP, "DTP" }, + { PID_CISCO_UDLD, "UDLD" }, + { PID_CISCO_PVST, "PVST" }, { 0, NULL } }; @@ -441,11 +443,25 @@ snap_print(const u_char *p, u_int length, u_int caplen, break; case OUI_CISCO: - if (et == PID_CISCO_CDP) { - cdp_print(p, length, caplen); - return (1); - } - break; + switch (et) { + case PID_CISCO_CDP: + cdp_print(p, length, caplen); + return (1); + case PID_CISCO_DTP: + dtp_print(p, length); + return (1); + case PID_CISCO_UDLD: + udld_print(p, length); + return (1); + case PID_CISCO_VTP: + vtp_print(p, length); + return (1); + case PID_CISCO_PVST: + stp_print(p, length); + return (1); + default: + break; + } case OUI_RFC2684: switch (et) { diff --git a/print-lldp.c b/print-lldp.c new file mode 100644 index 000000000000..36b99343ec82 --- /dev/null +++ b/print-lldp.c @@ -0,0 +1,1107 @@ +/* + * 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. + * + * support for the IEEE Link Discovery Protocol as per 802.1ab + * + * Original code by Hannes Gredler (hannes@juniper.net) + * IEEE and TIA extensions by Carles Kishimoto + */ + +#ifndef lint +static const char rcsid[] _U_ = +"@(#) $Header: /tcpdump/master/tcpdump/print-lldp.c,v 1.7.2.3 2008-03-20 09:33:52 hannes Exp $"; +#endif + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include + +#include +#include +#include + +#include "interface.h" +#include "extract.h" +#include "addrtoname.h" +#include "af.h" +#include "oui.h" + +#define LLDP_EXTRACT_TYPE(x) (((x)&0xfe00)>>9) +#define LLDP_EXTRACT_LEN(x) ((x)&0x01ff) + +/* + * TLV type codes + */ +#define LLDP_END_TLV 0 +#define LLDP_CHASSIS_ID_TLV 1 +#define LLDP_PORT_ID_TLV 2 +#define LLDP_TTL_TLV 3 +#define LLDP_PORT_DESCR_TLV 4 +#define LLDP_SYSTEM_NAME_TLV 5 +#define LLDP_SYSTEM_DESCR_TLV 6 +#define LLDP_SYSTEM_CAP_TLV 7 +#define LLDP_MGMT_ADDR_TLV 8 +#define LLDP_PRIVATE_TLV 127 + +static const struct tok lldp_tlv_values[] = { + { LLDP_END_TLV, "End" }, + { LLDP_CHASSIS_ID_TLV, "Chassis ID" }, + { LLDP_PORT_ID_TLV, "Port ID" }, + { LLDP_TTL_TLV, "Time to Live" }, + { LLDP_PORT_DESCR_TLV, "Port Description" }, + { LLDP_SYSTEM_NAME_TLV, "System Name" }, + { LLDP_SYSTEM_DESCR_TLV, "System Description" }, + { LLDP_SYSTEM_CAP_TLV, "System Capabilities" }, + { LLDP_MGMT_ADDR_TLV, "Management Address" }, + { LLDP_PRIVATE_TLV, "Organization specific" }, + { 0, NULL} +}; + +/* + * Chassis ID subtypes + */ +#define LLDP_CHASSIS_CHASSIS_COMP_SUBTYPE 1 +#define LLDP_CHASSIS_INTF_ALIAS_SUBTYPE 2 +#define LLDP_CHASSIS_PORT_COMP_SUBTYPE 3 +#define LLDP_CHASSIS_MAC_ADDR_SUBTYPE 4 +#define LLDP_CHASSIS_NETWORK_ADDR_SUBTYPE 5 +#define LLDP_CHASSIS_INTF_NAME_SUBTYPE 6 +#define LLDP_CHASSIS_LOCAL_SUBTYPE 7 + +static const struct tok lldp_chassis_subtype_values[] = { + { LLDP_CHASSIS_CHASSIS_COMP_SUBTYPE, "Chassis component"}, + { LLDP_CHASSIS_INTF_ALIAS_SUBTYPE, "Interface alias"}, + { LLDP_CHASSIS_PORT_COMP_SUBTYPE, "Port component"}, + { LLDP_CHASSIS_MAC_ADDR_SUBTYPE, "MAC address"}, + { LLDP_CHASSIS_NETWORK_ADDR_SUBTYPE, "Network address"}, + { LLDP_CHASSIS_INTF_NAME_SUBTYPE, "Interface name"}, + { LLDP_CHASSIS_LOCAL_SUBTYPE, "Local"}, + { 0, NULL} +}; + +/* + * Port ID subtypes + */ +#define LLDP_PORT_INTF_ALIAS_SUBTYPE 1 +#define LLDP_PORT_PORT_COMP_SUBTYPE 2 +#define LLDP_PORT_MAC_ADDR_SUBTYPE 3 +#define LLDP_PORT_NETWORK_ADDR_SUBTYPE 4 +#define LLDP_PORT_INTF_NAME_SUBTYPE 5 +#define LLDP_PORT_AGENT_CIRC_ID_SUBTYPE 6 +#define LLDP_PORT_LOCAL_SUBTYPE 7 + +static const struct tok lldp_port_subtype_values[] = { + { LLDP_PORT_INTF_ALIAS_SUBTYPE, "Interface alias"}, + { LLDP_PORT_PORT_COMP_SUBTYPE, "Port component"}, + { LLDP_PORT_MAC_ADDR_SUBTYPE, "MAC address"}, + { LLDP_PORT_NETWORK_ADDR_SUBTYPE, "Network Address"}, + { LLDP_PORT_INTF_NAME_SUBTYPE, "Interface Name"}, + { LLDP_PORT_AGENT_CIRC_ID_SUBTYPE, "Agent circuit ID"}, + { LLDP_PORT_LOCAL_SUBTYPE, "Local"}, + { 0, NULL} +}; + +/* + * System Capabilities + */ +#define LLDP_CAP_OTHER (1 << 0) +#define LLDP_CAP_REPEATER (1 << 1) +#define LLDP_CAP_BRIDGE (1 << 2) +#define LLDP_CAP_WLAN_AP (1 << 3) +#define LLDP_CAP_ROUTER (1 << 4) +#define LLDP_CAP_PHONE (1 << 5) +#define LLDP_CAP_DOCSIS (1 << 6) +#define LLDP_CAP_STATION_ONLY (1 << 7) + +static const struct tok lldp_cap_values[] = { + { LLDP_CAP_OTHER, "Other"}, + { LLDP_CAP_REPEATER, "Repeater"}, + { LLDP_CAP_BRIDGE, "Bridge"}, + { LLDP_CAP_WLAN_AP, "WLAN AP"}, + { LLDP_CAP_ROUTER, "Router"}, + { LLDP_CAP_PHONE, "Telephone"}, + { LLDP_CAP_DOCSIS, "Docsis"}, + { LLDP_CAP_STATION_ONLY, "Station Only"}, + { 0, NULL} +}; + +#define LLDP_PRIVATE_8021_SUBTYPE_PORT_VLAN_ID 1 +#define LLDP_PRIVATE_8021_SUBTYPE_PROTOCOL_VLAN_ID 2 +#define LLDP_PRIVATE_8021_SUBTYPE_VLAN_NAME 3 +#define LLDP_PRIVATE_8021_SUBTYPE_PROTOCOL_IDENTITY 4 + +static const struct tok lldp_8021_subtype_values[] = { + { LLDP_PRIVATE_8021_SUBTYPE_PORT_VLAN_ID, "Port VLAN Id"}, + { LLDP_PRIVATE_8021_SUBTYPE_PROTOCOL_VLAN_ID, "Port and Protocol VLAN ID"}, + { LLDP_PRIVATE_8021_SUBTYPE_VLAN_NAME, "VLAN name"}, + { LLDP_PRIVATE_8021_SUBTYPE_PROTOCOL_IDENTITY, "Protocol Identity"}, + { 0, NULL} +}; + +#define LLDP_8021_PORT_PROTOCOL_VLAN_SUPPORT (1 << 1) +#define LLDP_8021_PORT_PROTOCOL_VLAN_STATUS (1 << 2) + +static const struct tok lldp_8021_port_protocol_id_values[] = { + { LLDP_8021_PORT_PROTOCOL_VLAN_SUPPORT, "supported"}, + { LLDP_8021_PORT_PROTOCOL_VLAN_STATUS, "enabled"}, + { 0, NULL} +}; + +#define LLDP_PRIVATE_8023_SUBTYPE_MACPHY 1 +#define LLDP_PRIVATE_8023_SUBTYPE_MDIPOWER 2 +#define LLDP_PRIVATE_8023_SUBTYPE_LINKAGGR 3 +#define LLDP_PRIVATE_8023_SUBTYPE_MTU 4 + +static const struct tok lldp_8023_subtype_values[] = { + { LLDP_PRIVATE_8023_SUBTYPE_MACPHY, "MAC/PHY configuration/status"}, + { LLDP_PRIVATE_8023_SUBTYPE_MDIPOWER, "Power via MDI"}, + { LLDP_PRIVATE_8023_SUBTYPE_LINKAGGR, "Link aggregation"}, + { LLDP_PRIVATE_8023_SUBTYPE_MTU, "Max frame size"}, + { 0, NULL} +}; + +#define LLDP_PRIVATE_TIA_SUBTYPE_CAPABILITIES 1 +#define LLDP_PRIVATE_TIA_SUBTYPE_NETWORK_POLICY 2 +#define LLDP_PRIVATE_TIA_SUBTYPE_LOCAL_ID 3 +#define LLDP_PRIVATE_TIA_SUBTYPE_EXTENDED_POWER_MDI 4 +#define LLDP_PRIVATE_TIA_SUBTYPE_INVENTORY_HARDWARE_REV 5 +#define LLDP_PRIVATE_TIA_SUBTYPE_INVENTORY_FIRMWARE_REV 6 +#define LLDP_PRIVATE_TIA_SUBTYPE_INVENTORY_SOFTWARE_REV 7 +#define LLDP_PRIVATE_TIA_SUBTYPE_INVENTORY_SERIAL_NUMBER 8 +#define LLDP_PRIVATE_TIA_SUBTYPE_INVENTORY_MANUFACTURER_NAME 9 +#define LLDP_PRIVATE_TIA_SUBTYPE_INVENTORY_MODEL_NAME 10 +#define LLDP_PRIVATE_TIA_SUBTYPE_INVENTORY_ASSET_ID 11 + +static const struct tok lldp_tia_subtype_values[] = { + { LLDP_PRIVATE_TIA_SUBTYPE_CAPABILITIES, "LLDP-MED Capabilities" }, + { LLDP_PRIVATE_TIA_SUBTYPE_NETWORK_POLICY, "Network policy" }, + { LLDP_PRIVATE_TIA_SUBTYPE_LOCAL_ID, "Location identification" }, + { LLDP_PRIVATE_TIA_SUBTYPE_EXTENDED_POWER_MDI, "Extended power-via-MDI" }, + { LLDP_PRIVATE_TIA_SUBTYPE_INVENTORY_HARDWARE_REV, "Inventory - hardware revision" }, + { LLDP_PRIVATE_TIA_SUBTYPE_INVENTORY_FIRMWARE_REV, "Inventory - firmware revision" }, + { LLDP_PRIVATE_TIA_SUBTYPE_INVENTORY_SOFTWARE_REV, "Inventory - software revision" }, + { LLDP_PRIVATE_TIA_SUBTYPE_INVENTORY_SERIAL_NUMBER, "Inventory - serial number" }, + { LLDP_PRIVATE_TIA_SUBTYPE_INVENTORY_MANUFACTURER_NAME, "Inventory - manufacturer name" }, + { LLDP_PRIVATE_TIA_SUBTYPE_INVENTORY_MODEL_NAME, "Inventory - model name" }, + { LLDP_PRIVATE_TIA_SUBTYPE_INVENTORY_ASSET_ID, "Inventory - asset ID" }, + { 0, NULL} +}; + +#define LLDP_PRIVATE_TIA_LOCATION_ALTITUDE_METERS 1 +#define LLDP_PRIVATE_TIA_LOCATION_ALTITUDE_FLOORS 2 + +static const struct tok lldp_tia_location_altitude_type_values[] = { + { LLDP_PRIVATE_TIA_LOCATION_ALTITUDE_METERS, "meters"}, + { LLDP_PRIVATE_TIA_LOCATION_ALTITUDE_FLOORS, "floors"}, + { 0, NULL} +}; + +/* ANSI/TIA-1057 - Annex B */ +#define LLDP_PRIVATE_TIA_LOCATION_LCI_CATYPE_A1 1 +#define LLDP_PRIVATE_TIA_LOCATION_LCI_CATYPE_A2 2 +#define LLDP_PRIVATE_TIA_LOCATION_LCI_CATYPE_A3 3 +#define LLDP_PRIVATE_TIA_LOCATION_LCI_CATYPE_A4 4 +#define LLDP_PRIVATE_TIA_LOCATION_LCI_CATYPE_A5 5 +#define LLDP_PRIVATE_TIA_LOCATION_LCI_CATYPE_A6 6 + +static const struct tok lldp_tia_location_lci_catype_values[] = { + { LLDP_PRIVATE_TIA_LOCATION_LCI_CATYPE_A1, "national subdivisions (state,canton,region,province,prefecture)"}, + { LLDP_PRIVATE_TIA_LOCATION_LCI_CATYPE_A2, "county, parish, gun, district"}, + { LLDP_PRIVATE_TIA_LOCATION_LCI_CATYPE_A3, "city, township, shi"}, + { LLDP_PRIVATE_TIA_LOCATION_LCI_CATYPE_A4, "city division, borough, city district, ward chou"}, + { LLDP_PRIVATE_TIA_LOCATION_LCI_CATYPE_A5, "neighborhood, block"}, + { LLDP_PRIVATE_TIA_LOCATION_LCI_CATYPE_A6, "street"}, + { 0, NULL} +}; + +static const struct tok lldp_tia_location_lci_what_values[] = { + { 0, "location of DHCP server"}, + { 1, "location of the network element believed to be closest to the client"}, + { 2, "location of the client"}, + { 0, NULL} +}; + +/* + * From RFC 3636 - dot3MauType + */ +#define LLDP_MAU_TYPE_UNKNOWN 0 +#define LLDP_MAU_TYPE_AUI 1 +#define LLDP_MAU_TYPE_10BASE_5 2 +#define LLDP_MAU_TYPE_FOIRL 3 +#define LLDP_MAU_TYPE_10BASE_2 4 +#define LLDP_MAU_TYPE_10BASE_T 5 +#define LLDP_MAU_TYPE_10BASE_FP 6 +#define LLDP_MAU_TYPE_10BASE_FB 7 +#define LLDP_MAU_TYPE_10BASE_FL 8 +#define LLDP_MAU_TYPE_10BROAD36 9 +#define LLDP_MAU_TYPE_10BASE_T_HD 10 +#define LLDP_MAU_TYPE_10BASE_T_FD 11 +#define LLDP_MAU_TYPE_10BASE_FL_HD 12 +#define LLDP_MAU_TYPE_10BASE_FL_FD 13 +#define LLDP_MAU_TYPE_100BASE_T4 14 +#define LLDP_MAU_TYPE_100BASE_TX_HD 15 +#define LLDP_MAU_TYPE_100BASE_TX_FD 16 +#define LLDP_MAU_TYPE_100BASE_FX_HD 17 +#define LLDP_MAU_TYPE_100BASE_FX_FD 18 +#define LLDP_MAU_TYPE_100BASE_T2_HD 19 +#define LLDP_MAU_TYPE_100BASE_T2_FD 20 +#define LLDP_MAU_TYPE_1000BASE_X_HD 21 +#define LLDP_MAU_TYPE_1000BASE_X_FD 22 +#define LLDP_MAU_TYPE_1000BASE_LX_HD 23 +#define LLDP_MAU_TYPE_1000BASE_LX_FD 24 +#define LLDP_MAU_TYPE_1000BASE_SX_HD 25 +#define LLDP_MAU_TYPE_1000BASE_SX_FD 26 +#define LLDP_MAU_TYPE_1000BASE_CX_HD 27 +#define LLDP_MAU_TYPE_1000BASE_CX_FD 28 +#define LLDP_MAU_TYPE_1000BASE_T_HD 29 +#define LLDP_MAU_TYPE_1000BASE_T_FD 30 +#define LLDP_MAU_TYPE_10GBASE_X 31 +#define LLDP_MAU_TYPE_10GBASE_LX4 32 +#define LLDP_MAU_TYPE_10GBASE_R 33 +#define LLDP_MAU_TYPE_10GBASE_ER 34 +#define LLDP_MAU_TYPE_10GBASE_LR 35 +#define LLDP_MAU_TYPE_10GBASE_SR 36 +#define LLDP_MAU_TYPE_10GBASE_W 37 +#define LLDP_MAU_TYPE_10GBASE_EW 38 +#define LLDP_MAU_TYPE_10GBASE_LW 39 +#define LLDP_MAU_TYPE_10GBASE_SW 40 + +static const struct tok lldp_mau_types_values[] = { + { LLDP_MAU_TYPE_UNKNOWN, "Unknown"}, + { LLDP_MAU_TYPE_AUI, "AUI"}, + { LLDP_MAU_TYPE_10BASE_5, "10BASE_5"}, + { LLDP_MAU_TYPE_FOIRL, "FOIRL"}, + { LLDP_MAU_TYPE_10BASE_2, "10BASE2"}, + { LLDP_MAU_TYPE_10BASE_T, "10BASET duplex mode unknown"}, + { LLDP_MAU_TYPE_10BASE_FP, "10BASEFP"}, + { LLDP_MAU_TYPE_10BASE_FB, "10BASEFB"}, + { LLDP_MAU_TYPE_10BASE_FL, "10BASEFL duplex mode unknown"}, + { LLDP_MAU_TYPE_10BROAD36, "10BROAD36"}, + { LLDP_MAU_TYPE_10BASE_T_HD, "10BASET hdx"}, + { LLDP_MAU_TYPE_10BASE_T_FD, "10BASET fdx"}, + { LLDP_MAU_TYPE_10BASE_FL_HD, "10BASEFL hdx"}, + { LLDP_MAU_TYPE_10BASE_FL_FD, "10BASEFL fdx"}, + { LLDP_MAU_TYPE_100BASE_T4, "100BASET4"}, + { LLDP_MAU_TYPE_100BASE_TX_HD, "100BASETX hdx"}, + { LLDP_MAU_TYPE_100BASE_TX_FD, "100BASETX fdx"}, + { LLDP_MAU_TYPE_100BASE_FX_HD, "100BASEFX hdx"}, + { LLDP_MAU_TYPE_100BASE_FX_FD, "100BASEFX fdx"}, + { LLDP_MAU_TYPE_100BASE_T2_HD, "100BASET2 hdx"}, + { LLDP_MAU_TYPE_100BASE_T2_FD, "100BASET2 fdx"}, + { LLDP_MAU_TYPE_1000BASE_X_HD, "1000BASEX hdx"}, + { LLDP_MAU_TYPE_1000BASE_X_FD, "1000BASEX fdx"}, + { LLDP_MAU_TYPE_1000BASE_LX_HD, "1000BASELX hdx"}, + { LLDP_MAU_TYPE_1000BASE_LX_FD, "1000BASELX fdx"}, + { LLDP_MAU_TYPE_1000BASE_SX_HD, "1000BASESX hdx"}, + { LLDP_MAU_TYPE_1000BASE_SX_FD, "1000BASESX fdx"}, + { LLDP_MAU_TYPE_1000BASE_CX_HD, "1000BASECX hdx"}, + { LLDP_MAU_TYPE_1000BASE_CX_FD, "1000BASECX fdx"}, + { LLDP_MAU_TYPE_1000BASE_T_HD, "1000BASET hdx"}, + { LLDP_MAU_TYPE_1000BASE_T_FD, "1000BASET fdx"}, + { LLDP_MAU_TYPE_10GBASE_X, "10GBASEX"}, + { LLDP_MAU_TYPE_10GBASE_LX4, "10GBASELX4"}, + { LLDP_MAU_TYPE_10GBASE_R, "10GBASER"}, + { LLDP_MAU_TYPE_10GBASE_ER, "10GBASEER"}, + { LLDP_MAU_TYPE_10GBASE_LR, "10GBASELR"}, + { LLDP_MAU_TYPE_10GBASE_SR, "10GBASESR"}, + { LLDP_MAU_TYPE_10GBASE_W, "10GBASEW"}, + { LLDP_MAU_TYPE_10GBASE_EW, "10GBASEEW"}, + { LLDP_MAU_TYPE_10GBASE_LW, "10GBASELW"}, + { LLDP_MAU_TYPE_10GBASE_SW, "10GBASESW"}, + { 0, NULL} +}; + +#define LLDP_8023_AUTONEGOTIATION_SUPPORT (1 << 0) +#define LLDP_8023_AUTONEGOTIATION_STATUS (1 << 1) + +static const struct tok lldp_8023_autonegotiation_values[] = { + { LLDP_8023_AUTONEGOTIATION_SUPPORT, "supported"}, + { LLDP_8023_AUTONEGOTIATION_STATUS, "enabled"}, + { 0, NULL} +}; + +#define LLDP_TIA_CAPABILITY_MED (1 << 0) +#define LLDP_TIA_CAPABILITY_NETWORK_POLICY (1 << 1) +#define LLDP_TIA_CAPABILITY_LOCATION_IDENTIFICATION (1 << 2) +#define LLDP_TIA_CAPABILITY_EXTENDED_POWER_MDI_PSE (1 << 3) +#define LLDP_TIA_CAPABILITY_EXTENDED_POWER_MDI_PD (1 << 4) +#define LLDP_TIA_CAPABILITY_INVENTORY (1 << 5) + +static const struct tok lldp_tia_capabilities_values[] = { + { LLDP_TIA_CAPABILITY_MED, "LLDP-MED capabilities"}, + { LLDP_TIA_CAPABILITY_NETWORK_POLICY, "network policy"}, + { LLDP_TIA_CAPABILITY_LOCATION_IDENTIFICATION, "location identification"}, + { LLDP_TIA_CAPABILITY_EXTENDED_POWER_MDI_PSE, "extended power via MDI-PSE"}, + { LLDP_TIA_CAPABILITY_EXTENDED_POWER_MDI_PD, "extended power via MDI-PD"}, + { LLDP_TIA_CAPABILITY_INVENTORY, "Inventory"}, + { 0, NULL} +}; + +#define LLDP_TIA_DEVICE_TYPE_ENDPOINT_CLASS_1 1 +#define LLDP_TIA_DEVICE_TYPE_ENDPOINT_CLASS_2 2 +#define LLDP_TIA_DEVICE_TYPE_ENDPOINT_CLASS_3 3 +#define LLDP_TIA_DEVICE_TYPE_NETWORK_CONNECTIVITY 4 + +static const struct tok lldp_tia_device_type_values[] = { + { LLDP_TIA_DEVICE_TYPE_ENDPOINT_CLASS_1, "endpoint class 1"}, + { LLDP_TIA_DEVICE_TYPE_ENDPOINT_CLASS_2, "endpoint class 2"}, + { LLDP_TIA_DEVICE_TYPE_ENDPOINT_CLASS_3, "endpoint class 3"}, + { LLDP_TIA_DEVICE_TYPE_NETWORK_CONNECTIVITY, "network connectivity"}, + { 0, NULL} +}; + +#define LLDP_TIA_APPLICATION_TYPE_VOICE 1 +#define LLDP_TIA_APPLICATION_TYPE_VOICE_SIGNALING 2 +#define LLDP_TIA_APPLICATION_TYPE_GUEST_VOICE 3 +#define LLDP_TIA_APPLICATION_TYPE_GUEST_VOICE_SIGNALING 4 +#define LLDP_TIA_APPLICATION_TYPE_SOFTPHONE_VOICE 5 +#define LLDP_TIA_APPLICATION_TYPE_VIDEO_CONFERENCING 6 +#define LLDP_TIA_APPLICATION_TYPE_STREAMING_VIDEO 7 +#define LLDP_TIA_APPLICATION_TYPE_VIDEO_SIGNALING 8 + +static const struct tok lldp_tia_application_type_values[] = { + { LLDP_TIA_APPLICATION_TYPE_VOICE, "voice"}, + { LLDP_TIA_APPLICATION_TYPE_VOICE_SIGNALING, "voice signaling"}, + { LLDP_TIA_APPLICATION_TYPE_GUEST_VOICE, "guest voice"}, + { LLDP_TIA_APPLICATION_TYPE_GUEST_VOICE_SIGNALING, "guest voice signaling"}, + { LLDP_TIA_APPLICATION_TYPE_SOFTPHONE_VOICE, "softphone voice"}, + { LLDP_TIA_APPLICATION_TYPE_VIDEO_CONFERENCING, "video conferencing"}, + { LLDP_TIA_APPLICATION_TYPE_STREAMING_VIDEO, "streaming video"}, + { LLDP_TIA_APPLICATION_TYPE_VIDEO_SIGNALING, "video signaling"}, + { 0, NULL} +}; + +#define LLDP_TIA_NETWORK_POLICY_U_BIT (1 << 5) +#define LLDP_TIA_NETWORK_POLICY_T_BIT (1 << 6) +#define LLDP_TIA_NETWORK_POLICY_X_BIT (1 << 7) + +static const struct tok lldp_tia_network_policy_bits_values[] = { + { LLDP_TIA_NETWORK_POLICY_U_BIT, "Unknown"}, + { LLDP_TIA_NETWORK_POLICY_T_BIT, "Tagged"}, + { LLDP_TIA_NETWORK_POLICY_X_BIT, "reserved"}, + { 0, NULL} +}; + +#define LLDP_EXTRACT_NETWORK_POLICY_VLAN(x) (((x)&0x1ffe)>>1) +#define LLDP_EXTRACT_NETWORK_POLICY_L2_PRIORITY(x) (((x)&0x01ff)>>6) +#define LLDP_EXTRACT_NETWORK_POLICY_DSCP(x) ((x)&0x003f) + +#define LLDP_TIA_LOCATION_DATA_FORMAT_COORDINATE_BASED 1 +#define LLDP_TIA_LOCATION_DATA_FORMAT_CIVIC_ADDRESS 2 +#define LLDP_TIA_LOCATION_DATA_FORMAT_ECS_ELIN 3 + +static const struct tok lldp_tia_location_data_format_values[] = { + { LLDP_TIA_LOCATION_DATA_FORMAT_COORDINATE_BASED, "coordinate-based LCI"}, + { LLDP_TIA_LOCATION_DATA_FORMAT_CIVIC_ADDRESS, "civic address LCI"}, + { LLDP_TIA_LOCATION_DATA_FORMAT_ECS_ELIN, "ECS ELIN"}, + { 0, NULL} +}; + +#define LLDP_TIA_LOCATION_DATUM_WGS_84 1 +#define LLDP_TIA_LOCATION_DATUM_NAD_83_NAVD_88 2 +#define LLDP_TIA_LOCATION_DATUM_NAD_83_MLLW 3 + +static const struct tok lldp_tia_location_datum_type_values[] = { + { LLDP_TIA_LOCATION_DATUM_WGS_84, "World Geodesic System 1984"}, + { LLDP_TIA_LOCATION_DATUM_NAD_83_NAVD_88, "North American Datum 1983 (NAVD88)"}, + { LLDP_TIA_LOCATION_DATUM_NAD_83_MLLW, "North American Datum 1983 (MLLW)"}, + { 0, NULL} +}; + +#define LLDP_TIA_POWER_SOURCE_PSE 1 +#define LLDP_TIA_POWER_SOURCE_LOCAL 2 +#define LLDP_TIA_POWER_SOURCE_PSE_AND_LOCAL 3 + +static const struct tok lldp_tia_power_source_values[] = { + { LLDP_TIA_POWER_SOURCE_PSE, "PSE - primary power source"}, + { LLDP_TIA_POWER_SOURCE_LOCAL, "local - backup power source"}, + { LLDP_TIA_POWER_SOURCE_PSE_AND_LOCAL, "PSE+local - reserved"}, + { 0, NULL} +}; + +#define LLDP_TIA_POWER_PRIORITY_CRITICAL 1 +#define LLDP_TIA_POWER_PRIORITY_HIGH 2 +#define LLDP_TIA_POWER_PRIORITY_LOW 3 + +static const struct tok lldp_tia_power_priority_values[] = { + { LLDP_TIA_POWER_PRIORITY_CRITICAL, "critical"}, + { LLDP_TIA_POWER_PRIORITY_HIGH, "high"}, + { LLDP_TIA_POWER_PRIORITY_LOW, "low"}, + { 0, NULL} +}; + +#define LLDP_TIA_POWER_VAL_MAX 1024 + +static const struct tok lldp_tia_inventory_values[] = { + { LLDP_PRIVATE_TIA_SUBTYPE_INVENTORY_HARDWARE_REV, "Hardware revision" }, + { LLDP_PRIVATE_TIA_SUBTYPE_INVENTORY_FIRMWARE_REV, "Firmware revision" }, + { LLDP_PRIVATE_TIA_SUBTYPE_INVENTORY_SOFTWARE_REV, "Software revision" }, + { LLDP_PRIVATE_TIA_SUBTYPE_INVENTORY_SERIAL_NUMBER, "Serial number" }, + { LLDP_PRIVATE_TIA_SUBTYPE_INVENTORY_MANUFACTURER_NAME, "Manufacturer name" }, + { LLDP_PRIVATE_TIA_SUBTYPE_INVENTORY_MODEL_NAME, "Model name" }, + { LLDP_PRIVATE_TIA_SUBTYPE_INVENTORY_ASSET_ID, "Asset ID" }, + { 0, NULL} +}; + +/* + * From RFC 3636 - ifMauAutoNegCapAdvertisedBits + */ +#define LLDP_MAU_PMD_OTHER (1 << 15) +#define LLDP_MAU_PMD_10BASE_T (1 << 14) +#define LLDP_MAU_PMD_10BASE_T_FD (1 << 13) +#define LLDP_MAU_PMD_100BASE_T4 (1 << 12) +#define LLDP_MAU_PMD_100BASE_TX (1 << 11) +#define LLDP_MAU_PMD_100BASE_TX_FD (1 << 10) +#define LLDP_MAU_PMD_100BASE_T2 (1 << 9) +#define LLDP_MAU_PMD_100BASE_T2_FD (1 << 8) +#define LLDP_MAU_PMD_FDXPAUSE (1 << 7) +#define LLDP_MAU_PMD_FDXAPAUSE (1 << 6) +#define LLDP_MAU_PMD_FDXSPAUSE (1 << 5) +#define LLDP_MAU_PMD_FDXBPAUSE (1 << 4) +#define LLDP_MAU_PMD_1000BASE_X (1 << 3) +#define LLDP_MAU_PMD_1000BASE_X_FD (1 << 2) +#define LLDP_MAU_PMD_1000BASE_T (1 << 1) +#define LLDP_MAU_PMD_1000BASE_T_FD (1 << 0) + +static const struct tok lldp_pmd_capability_values[] = { + { LLDP_MAU_PMD_10BASE_T, "10BASE-T hdx"}, + { LLDP_MAU_PMD_10BASE_T_FD, "10BASE-T fdx"}, + { LLDP_MAU_PMD_100BASE_T4, "100BASE-T4"}, + { LLDP_MAU_PMD_100BASE_TX, "100BASE-TX hdx"}, + { LLDP_MAU_PMD_100BASE_TX_FD, "100BASE-TX fdx"}, + { LLDP_MAU_PMD_100BASE_T2, "100BASE-T2 hdx"}, + { LLDP_MAU_PMD_100BASE_T2_FD, "100BASE-T2 fdx"}, + { LLDP_MAU_PMD_FDXPAUSE, "Pause for fdx links"}, + { LLDP_MAU_PMD_FDXAPAUSE, "Asym PAUSE for fdx"}, + { LLDP_MAU_PMD_FDXSPAUSE, "Sym PAUSE for fdx"}, + { LLDP_MAU_PMD_FDXBPAUSE, "Asym and Sym PAUSE for fdx"}, + { LLDP_MAU_PMD_1000BASE_X, "1000BASE-{X LX SX CX} hdx"}, + { LLDP_MAU_PMD_1000BASE_X_FD, "1000BASE-{X LX SX CX} fdx"}, + { LLDP_MAU_PMD_1000BASE_T, "1000BASE-T hdx"}, + { LLDP_MAU_PMD_1000BASE_T_FD, "1000BASE-T fdx"}, + { 0, NULL} +}; + +#define LLDP_MDI_PORT_CLASS (1 << 0) +#define LLDP_MDI_POWER_SUPPORT (1 << 1) +#define LLDP_MDI_POWER_STATE (1 << 2) +#define LLDP_MDI_PAIR_CONTROL_ABILITY (1 << 3) + +static const struct tok lldp_mdi_values[] = { + { LLDP_MDI_PORT_CLASS, "PSE"}, + { LLDP_MDI_POWER_SUPPORT, "supported"}, + { LLDP_MDI_POWER_STATE, "enabled"}, + { LLDP_MDI_PAIR_CONTROL_ABILITY, "can be controlled"}, + { 0, NULL} +}; + +#define LLDP_MDI_PSE_PORT_POWER_PAIRS_SIGNAL 1 +#define LLDP_MDI_PSE_PORT_POWER_PAIRS_SPARE 2 + +static const struct tok lldp_mdi_power_pairs_values[] = { + { LLDP_MDI_PSE_PORT_POWER_PAIRS_SIGNAL, "signal"}, + { LLDP_MDI_PSE_PORT_POWER_PAIRS_SPARE, "spare"}, + { 0, NULL} +}; + +#define LLDP_MDI_POWER_CLASS0 1 +#define LLDP_MDI_POWER_CLASS1 2 +#define LLDP_MDI_POWER_CLASS2 3 +#define LLDP_MDI_POWER_CLASS3 4 +#define LLDP_MDI_POWER_CLASS4 5 + +static const struct tok lldp_mdi_power_class_values[] = { + { LLDP_MDI_POWER_CLASS0, "class0"}, + { LLDP_MDI_POWER_CLASS1, "class1"}, + { LLDP_MDI_POWER_CLASS2, "class2"}, + { LLDP_MDI_POWER_CLASS3, "class3"}, + { LLDP_MDI_POWER_CLASS4, "class4"}, + { 0, NULL} +}; + +#define LLDP_AGGREGATION_CAPABILTIY (1 << 0) +#define LLDP_AGGREGATION_STATUS (1 << 1) + +static const struct tok lldp_aggregation_values[] = { + { LLDP_AGGREGATION_CAPABILTIY, "supported"}, + { LLDP_AGGREGATION_STATUS, "enabled"}, + { 0, NULL} +}; + +/* + * Interface numbering subtypes. + */ +#define LLDP_INTF_NUMB_IFX_SUBTYPE 2 +#define LLDP_INTF_NUMB_SYSPORT_SUBTYPE 3 + +static const struct tok lldp_intf_numb_subtype_values[] = { + { LLDP_INTF_NUMB_IFX_SUBTYPE, "Interface Index" }, + { LLDP_INTF_NUMB_SYSPORT_SUBTYPE, "System Port Number" }, + { 0, NULL} +}; + +#define LLDP_INTF_NUM_LEN 5 + +/* + * Print IEEE private extensions. (802.1 annex F) + */ +static int +lldp_private_8021_print(const u_char *tptr) +{ + int subtype, hexdump = FALSE; + + subtype = *(tptr+3); + + printf("\n\t %s Subtype (%u)", + tok2str(lldp_8021_subtype_values, "unknown", subtype), + subtype); + + switch (subtype) { + case LLDP_PRIVATE_8021_SUBTYPE_PORT_VLAN_ID: + printf("\n\t port vlan id (PVID): %u", + EXTRACT_16BITS(tptr+4)); + break; + case LLDP_PRIVATE_8021_SUBTYPE_PROTOCOL_VLAN_ID: + printf("\n\t port and protocol vlan id (PPVID): %u, flags [%s] (0x%02x)", + EXTRACT_16BITS(tptr+5), + bittok2str(lldp_8021_port_protocol_id_values, "none", *(tptr+4)), + *(tptr+4)); + break; + case LLDP_PRIVATE_8021_SUBTYPE_VLAN_NAME: + printf("\n\t vlan id (VID): %u", + EXTRACT_16BITS(tptr+4)); + printf("\n\t vlan name: "); + safeputs((const char *)tptr+7, *(tptr+6)); + break; + case LLDP_PRIVATE_8021_SUBTYPE_PROTOCOL_IDENTITY: + printf("\n\t protocol identity: "); + safeputs((const char *)tptr+5, *(tptr+4)); + break; + + default: + hexdump = TRUE; + break; + } + + return hexdump; +} + +/* + * Print IEEE private extensions. (802.3) + */ +static int +lldp_private_8023_print(const u_char *tptr) +{ + int subtype, hexdump = FALSE; + + subtype = *(tptr+3); + + printf("\n\t %s Subtype (%u)", + tok2str(lldp_8023_subtype_values, "unknown", subtype), + subtype); + + switch (subtype) { + case LLDP_PRIVATE_8023_SUBTYPE_MACPHY: + printf("\n\t autonegotiation [%s] (0x%02x)", + bittok2str(lldp_8023_autonegotiation_values, "none", *(tptr+4)), + *(tptr+4)); + printf("\n\t PMD autoneg capability [%s] (0x%04x)", + bittok2str(lldp_pmd_capability_values,"unknown", EXTRACT_16BITS(tptr+5)), + EXTRACT_16BITS(tptr+5)); + printf("\n\t MAU type %s (0x%04x)", + tok2str(lldp_mau_types_values, "unknown", EXTRACT_16BITS(tptr+7)), + EXTRACT_16BITS(tptr+7)); + break; + + case LLDP_PRIVATE_8023_SUBTYPE_MDIPOWER: + printf("\n\t MDI power support [%s], power pair %s, power class %s", + bittok2str(lldp_mdi_values, "none", *(tptr+4)), + tok2str(lldp_mdi_power_pairs_values, "unknown", *(tptr+5)), + tok2str(lldp_mdi_power_class_values, "unknown", *(tptr+6))); + break; + + case LLDP_PRIVATE_8023_SUBTYPE_LINKAGGR: + printf("\n\t aggregation status [%s], aggregation port ID %u", + bittok2str(lldp_aggregation_values, "none", *(tptr+4)), + EXTRACT_32BITS(tptr+5)); + break; + + case LLDP_PRIVATE_8023_SUBTYPE_MTU: + printf("\n\t MTU size %u", EXTRACT_16BITS(tptr+4)); + break; + + default: + hexdump = TRUE; + break; + } + + return hexdump; +} + +/* + * Extract 34bits of latitude/longitude coordinates. + */ +static u_int64_t +lldp_extract_latlon(const u_char *tptr) +{ + u_int64_t latlon; + + latlon = *tptr & 0x3; + latlon = (latlon << 32) | EXTRACT_32BITS(tptr+1); + + return latlon; +} + +/* + * Print private TIA extensions. + */ +static int +lldp_private_tia_print(const u_char *tptr, u_int tlv_len) +{ + int subtype, hexdump = FALSE; + u_int8_t location_format; + u_int16_t power_val; + u_int8_t lci_len, ca_type, ca_len; + + subtype = *(tptr+3); + + printf("\n\t %s Subtype (%u)", + tok2str(lldp_tia_subtype_values, "unknown", subtype), + subtype); + + switch (subtype) { + case LLDP_PRIVATE_TIA_SUBTYPE_CAPABILITIES: + printf("\n\t Media capabilities [%s] (0x%04x)", + bittok2str(lldp_tia_capabilities_values, "none", + EXTRACT_16BITS(tptr+4)), EXTRACT_16BITS(tptr+4)); + printf("\n\t Device type [%s] (0x%02x)", + tok2str(lldp_tia_device_type_values, "unknown", *(tptr+6)), + *(tptr+6)); + break; + + case LLDP_PRIVATE_TIA_SUBTYPE_NETWORK_POLICY: + printf("\n\t Application type [%s] (0x%02x)", + tok2str(lldp_tia_application_type_values, "none", *(tptr+4)), + *(tptr+4)); + printf(", Flags [%s]", bittok2str( + lldp_tia_network_policy_bits_values, "none", *(tptr+5))); + printf("\n\t Vlan id %u", + LLDP_EXTRACT_NETWORK_POLICY_VLAN(EXTRACT_16BITS(tptr+5))); + printf(", L2 priority %u", + LLDP_EXTRACT_NETWORK_POLICY_L2_PRIORITY(EXTRACT_16BITS(tptr+6))); + printf(", DSCP value %u", + LLDP_EXTRACT_NETWORK_POLICY_DSCP(EXTRACT_16BITS(tptr+6))); + break; + + case LLDP_PRIVATE_TIA_SUBTYPE_LOCAL_ID: + location_format = *(tptr+4); + printf("\n\t Location data format %s (0x%02x)", + tok2str(lldp_tia_location_data_format_values, "unknown", location_format), + location_format); + + switch (location_format) { + case LLDP_TIA_LOCATION_DATA_FORMAT_COORDINATE_BASED: + printf("\n\t Latitude resolution %u, latitude value %" PRIu64, + (*(tptr+5)>>2), lldp_extract_latlon(tptr+5)); + printf("\n\t Longitude resolution %u, longitude value %" PRIu64, + (*(tptr+10)>>2), lldp_extract_latlon(tptr+10)); + printf("\n\t Altitude type %s (%u)", + tok2str(lldp_tia_location_altitude_type_values, "unknown",(*(tptr+15)>>4)), + (*(tptr+15)>>4)); + printf("\n\t Altitude resolution %u, altitude value 0x%x", + (EXTRACT_16BITS(tptr+15)>>6)&0x3f, + ((EXTRACT_32BITS(tptr+16)&0x3fffffff))); + printf("\n\t Datum %s (0x%02x)", + tok2str(lldp_tia_location_datum_type_values, "unknown", *(tptr+20)), + *(tptr+20)); + break; + + case LLDP_TIA_LOCATION_DATA_FORMAT_CIVIC_ADDRESS: + lci_len = *(tptr+5); + printf("\n\t LCI length %u, LCI what %s (0x%02x), Country-code ", + lci_len, + tok2str(lldp_tia_location_lci_what_values, "unknown", *(tptr+6)), + *(tptr+6)); + + /* Country code */ + safeputs((const char *)(tptr+7), 2); + + lci_len = lci_len-3; + tptr = tptr + 9; + + /* Decode each civic address element */ + while (lci_len > 0) { + ca_type = *(tptr); + ca_len = *(tptr+1); + + tptr += 2; + lci_len -= 2; + + printf("\n\t CA type \'%s\' (%u), length %u: ", + tok2str(lldp_tia_location_lci_catype_values, "unknown", ca_type), + ca_type, ca_len); + + /* basic sanity check */ + if ( ca_type == 0 || ca_len == 0) { + return hexdump; + } + + safeputs((const char *)tptr, ca_len); + tptr += ca_len; + lci_len -= ca_len; + } + break; + + case LLDP_TIA_LOCATION_DATA_FORMAT_ECS_ELIN: + printf("\n\t ECS ELIN id "); + safeputs((const char *)tptr+5, tlv_len-5); + break; + + default: + printf("\n\t Location ID "); + print_unknown_data(tptr+5, "\n\t ", tlv_len-5); + } + break; + + case LLDP_PRIVATE_TIA_SUBTYPE_EXTENDED_POWER_MDI: + printf("\n\t Power type [%s]", + (*(tptr+4)&0xC0>>6) ? "PD device" : "PSE device"); + printf(", Power source [%s]", + tok2str(lldp_tia_power_source_values, "none", (*(tptr+4)&0x30)>>4)); + printf("\n\t Power priority [%s] (0x%02x)", + tok2str(lldp_tia_power_priority_values, "none", *(tptr+4)&0x0f), + *(tptr+4)&0x0f); + power_val = EXTRACT_16BITS(tptr+5); + if (power_val < LLDP_TIA_POWER_VAL_MAX) { + printf(", Power %.1f Watts", ((float)power_val)/10); + } else { + printf(", Power %u (Reserved)", power_val); + } + break; + + case LLDP_PRIVATE_TIA_SUBTYPE_INVENTORY_HARDWARE_REV: + case LLDP_PRIVATE_TIA_SUBTYPE_INVENTORY_FIRMWARE_REV: + case LLDP_PRIVATE_TIA_SUBTYPE_INVENTORY_SOFTWARE_REV: + case LLDP_PRIVATE_TIA_SUBTYPE_INVENTORY_SERIAL_NUMBER: + case LLDP_PRIVATE_TIA_SUBTYPE_INVENTORY_MANUFACTURER_NAME: + case LLDP_PRIVATE_TIA_SUBTYPE_INVENTORY_MODEL_NAME: + case LLDP_PRIVATE_TIA_SUBTYPE_INVENTORY_ASSET_ID: + printf("\n\t %s ", + tok2str(lldp_tia_inventory_values, "unknown", subtype)); + safeputs((const char *)tptr+4, tlv_len-4); + break; + + default: + hexdump = TRUE; + break; + } + + return hexdump; +} + +static char * +lldp_network_addr_print(const u_char *tptr) { + + u_int8_t af; + static char buf[BUFSIZE]; + const char * (*pfunc)(const u_char *); + + af = *tptr; + switch (af) { + case AFNUM_INET: + pfunc = getname; + break; +#ifdef INET6 + case AFNUM_INET6: + pfunc = getname6; + break; +#endif + case AFNUM_802: + pfunc = etheraddr_string; + break; + default: + pfunc = NULL; + break; + } + + if (!pfunc) { + snprintf(buf, sizeof(buf), "AFI %s (%u), no AF printer !", + tok2str(af_values, "Unknown", af), af); + } else { + snprintf(buf, sizeof(buf), "AFI %s (%u): %s", + tok2str(af_values, "Unknown", af), af, (*pfunc)(tptr+1)); + } + + return buf; +} + +static int +lldp_mgmt_addr_tlv_print(const u_char *pptr, u_int len) { + + u_int8_t mgmt_addr_len, intf_num_subtype, oid_len; + const u_char *tptr; + u_int tlen; + + tlen = len; + tptr = pptr; + + mgmt_addr_len = *tptr++; + tlen--; + + if (tlen < mgmt_addr_len) { + return 0; + } + + printf("\n\t Management Address length %u, %s", + mgmt_addr_len, + lldp_network_addr_print(tptr)); + tptr += mgmt_addr_len; + tlen -= mgmt_addr_len; + + if (tlen < LLDP_INTF_NUM_LEN) { + return 0; + } + + intf_num_subtype = *tptr; + printf("\n\t %s Interface Numbering (%u): %u", + tok2str(lldp_intf_numb_subtype_values, "Unknown", intf_num_subtype), + intf_num_subtype, + EXTRACT_32BITS(tptr+1)); + + tptr += LLDP_INTF_NUM_LEN; + tlen -= LLDP_INTF_NUM_LEN; + + /* + * The OID is optional. + */ + if (tlen) { + oid_len = *tptr; + + if (oid_len) { + printf("\n\t OID length %u", oid_len); + safeputs((const char *)tptr+1, oid_len); + } + } + + return 1; +} + +void +lldp_print(register const u_char *pptr, register u_int len) { + + u_int8_t subtype; + u_int16_t tlv, cap, ena_cap; + u_int oui, tlen, hexdump, tlv_type, tlv_len; + const u_char *tptr; + + tptr = pptr; + tlen = len; + + if (vflag) { + printf("LLDP, length %u", len); + } + + while (tlen >= sizeof(tlv)) { + + TCHECK2(*tptr, sizeof(tlv)); + + tlv = EXTRACT_16BITS(tptr); + + tlv_type = LLDP_EXTRACT_TYPE(tlv); + tlv_len = LLDP_EXTRACT_LEN(tlv); + hexdump = FALSE; + + tlen -= sizeof(tlv); + tptr += sizeof(tlv); + + if (vflag) { + printf("\n\t%s TLV (%u), length %u", + tok2str(lldp_tlv_values, "Unknown", tlv_type), + tlv_type, tlv_len); + } + + /* infinite loop check */ + if (!tlv_type || !tlv_len) { + break; + } + + TCHECK2(*tptr, tlv_len); + + switch (tlv_type) { + case LLDP_TTL_TLV: + if (vflag) { + printf(": TTL %us", EXTRACT_16BITS(tptr)); + } + break; + + case LLDP_SYSTEM_NAME_TLV: + + /* + * The system name is also print in non-verbose mode + * similar to the CDP printer. + */ + if (vflag) { + printf(": "); + safeputs((const char *)tptr, tlv_len); + } else { + printf("LLDP, name "); + safeputs((const char *)tptr, tlv_len); + printf(", length %u", len); + } + break; + + case LLDP_PORT_DESCR_TLV: + if (vflag) { + printf(": "); + safeputs((const char *)tptr, tlv_len); + } + break; + + case LLDP_SYSTEM_DESCR_TLV: + if (vflag) { + printf("\n\t "); + safeputs((const char *)tptr, tlv_len); + } + break; + + + case LLDP_CHASSIS_ID_TLV: + if (vflag) { + subtype = *tptr; + printf("\n\t Subtype %s (%u): ", + tok2str(lldp_chassis_subtype_values, "Unknown", subtype), + subtype); + + switch (subtype) { + case LLDP_CHASSIS_MAC_ADDR_SUBTYPE: + printf("%s", etheraddr_string(tptr+1)); + break; + + case LLDP_CHASSIS_INTF_NAME_SUBTYPE: /* fall through */ + case LLDP_CHASSIS_LOCAL_SUBTYPE: + case LLDP_CHASSIS_CHASSIS_COMP_SUBTYPE: + case LLDP_CHASSIS_INTF_ALIAS_SUBTYPE: + case LLDP_CHASSIS_PORT_COMP_SUBTYPE: + safeputs((const char *)tptr+1, tlv_len-1); + break; + + case LLDP_CHASSIS_NETWORK_ADDR_SUBTYPE: + printf("%s", lldp_network_addr_print(tptr+1)); + break; + + default: + hexdump = TRUE; + break; + } + } + break; + + case LLDP_PORT_ID_TLV: + if (vflag) { + subtype = *tptr; + printf("\n\t Subtype %s (%u): ", + tok2str(lldp_port_subtype_values, "Unknown", subtype), + subtype); + + switch (subtype) { + case LLDP_PORT_MAC_ADDR_SUBTYPE: + printf("%s", etheraddr_string(tptr+1)); + break; + + case LLDP_PORT_INTF_NAME_SUBTYPE: /* fall through */ + case LLDP_PORT_LOCAL_SUBTYPE: + case LLDP_PORT_AGENT_CIRC_ID_SUBTYPE: + case LLDP_PORT_INTF_ALIAS_SUBTYPE: + case LLDP_PORT_PORT_COMP_SUBTYPE: + safeputs((const char *)tptr+1, tlv_len-1); + break; + + case LLDP_PORT_NETWORK_ADDR_SUBTYPE: + printf("%s", lldp_network_addr_print(tptr+1)); + break; + + default: + hexdump = TRUE; + break; + } + } + break; + + case LLDP_PRIVATE_TLV: + if (vflag) { + oui = EXTRACT_24BITS(tptr); + printf(": OUI %s (0x%06x)", tok2str(oui_values, "Unknown", oui), oui); + + switch (oui) { + case OUI_IEEE_8021_PRIVATE: + hexdump = lldp_private_8021_print(tptr); + break; + case OUI_IEEE_8023_PRIVATE: + hexdump = lldp_private_8023_print(tptr); + break; + case OUI_TIA: + hexdump = lldp_private_tia_print(tptr, tlv_len); + break; + default: + hexdump = TRUE; + break; + } + } + break; + + case LLDP_SYSTEM_CAP_TLV: + if (vflag) { + cap = EXTRACT_16BITS(tptr); + ena_cap = EXTRACT_16BITS(tptr+2); + printf("\n\t System Capabilities [%s] (0x%04x)", + bittok2str(lldp_cap_values, "none", cap), cap); + printf("\n\t Enabled Capabilities [%s] (0x%04x)", + bittok2str(lldp_cap_values, "none", ena_cap), ena_cap); + } + break; + + case LLDP_MGMT_ADDR_TLV: + if (vflag) { + if (!lldp_mgmt_addr_tlv_print(tptr, tlen)) { + goto trunc; + } + } + break; + + default: + hexdump = TRUE; + break; + } + + /* do we also want to see a hex dump ? */ + if (vflag > 1 || (vflag && hexdump)) { + print_unknown_data(tptr,"\n\t ", tlv_len); + } + + tlen -= tlv_len; + tptr += tlv_len; + } + return; + trunc: + printf("\n\t[|LLDP]"); +} + +/* + * Local Variables: + * c-style: whitesmith + * c-basic-offset: 4 + * End: + */ diff --git a/print-lmp.c b/print-lmp.c index 84d166f5c18e..556db173e49b 100644 --- a/print-lmp.c +++ b/print-lmp.c @@ -10,6 +10,8 @@ * LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS * FOR A PARTICULAR PURPOSE. * + * Support for the Link Management Protocol as per rfc 4204. + * * Original code by Hannes Gredler (hannes@juniper.net) * Support for LMP service discovery extensions (defined by UNI 1.0) added * by Manu Pathak (mapathak@cisco.com), May 2005 @@ -17,7 +19,7 @@ #ifndef lint static const char rcsid[] _U_ = - "@(#) $Header: /tcpdump/master/tcpdump/print-lmp.c,v 1.5.2.4 2006/06/23 02:07:27 hannes Exp $"; + "@(#) $Header: /tcpdump/master/tcpdump/print-lmp.c,v 1.11 2007-08-02 17:32:49 hannes Exp $"; #endif #ifdef HAVE_CONFIG_H @@ -91,21 +93,21 @@ static const struct tok lmp_obj_begin_verify_flag_values[] = { }; static const struct tok lmp_obj_begin_verify_error_values[] = { - { 0x01, "\n\t\tLink Verification Procedure Not supported"}, - { 0x02, "\n\t\tUnwilling to verify"}, - { 0x04, "\n\t\tUnsupported verification transport mechanism"}, - { 0x08, "\n\t\tLink_Id configuration error"}, - { 0x10, "\n\t\tUnknown object c-type"}, + { 0x01, "Link Verification Procedure Not supported"}, + { 0x02, "Unwilling to verify"}, + { 0x04, "Unsupported verification transport mechanism"}, + { 0x08, "Link-Id configuration error"}, + { 0x10, "Unknown object c-type"}, { 0, NULL} }; static const struct tok lmp_obj_link_summary_error_values[] = { - { 0x01, "\n\t\tUnacceptable non-negotiable LINK_SUMMARY parameters"}, - { 0x02, "\n\t\tRenegotiate LINK_SUMMARY parameters"}, - { 0x04, "\n\t\tInvalid TE-LINK Object"}, - { 0x08, "\n\t\tInvalid DATA-LINK Object"}, - { 0x10, "\n\t\tUnknown TE-LINK Object c-type"}, - { 0x20, "\n\t\tUnknown DATA-LINK Object c-type"}, + { 0x01, "Unacceptable non-negotiable LINK-SUMMARY parameters"}, + { 0x02, "Renegotiate LINK-SUMMARY parameters"}, + { 0x04, "Invalid TE-LINK Object"}, + { 0x08, "Invalid DATA-LINK Object"}, + { 0x10, "Unknown TE-LINK Object c-type"}, + { 0x20, "Unknown DATA-LINK Object c-type"}, { 0, NULL} }; @@ -532,7 +534,7 @@ lmp_print(register const u_char *pptr, register u_int len) { case LMP_OBJ_HELLO: switch(lmp_obj_ctype) { case LMP_CTYPE_HELLO: - printf("\n\t TxSeqNum: %u\n\t RcvSeqNum: %u", + printf("\n\t Tx Seq: %u, Rx Seq: %u", EXTRACT_32BITS(obj_tptr), EXTRACT_32BITS(obj_tptr+4)); break; diff --git a/print-lspping.c b/print-lspping.c index a80cdc6d0c8d..f47a9004859c 100644 --- a/print-lspping.c +++ b/print-lspping.c @@ -15,7 +15,7 @@ #ifndef lint static const char rcsid[] _U_ = - "@(#) $Header: /tcpdump/master/tcpdump/print-lspping.c,v 1.12.2.6 2006/06/23 02:07:27 hannes Exp $"; + "@(#) $Header: /tcpdump/master/tcpdump/print-lspping.c,v 1.18.2.1 2008-01-28 13:48:16 hannes Exp $"; #endif #ifdef HAVE_CONFIG_H @@ -574,10 +574,11 @@ lspping_print(register const u_char *pptr, register u_int len) { lspping_tlv_type=EXTRACT_16BITS(lspping_tlv_header->type); lspping_tlv_len=EXTRACT_16BITS(lspping_tlv_header->length); - if (lspping_tlv_len == 0) + /* some little sanity checking */ + if (lspping_tlv_type == 0 || lspping_tlv_len == 0) return; - if(lspping_tlv_len % 4 || lspping_tlv_len < 4) { /* aligned to four octet boundary */ + if(lspping_tlv_len < 4) { printf("\n\t ERROR: TLV %u bogus size %u",lspping_tlv_type,lspping_tlv_len); return; } @@ -858,6 +859,12 @@ lspping_print(register const u_char *pptr, register u_int len) { print_unknown_data(tptr+sizeof(sizeof(struct lspping_tlv_header)),"\n\t ", lspping_tlv_len); + + /* All TLVs are aligned to four octet boundary */ + if (lspping_tlv_len % 4) { + lspping_tlv_len += (4 - lspping_tlv_len % 4); + } + tptr+=lspping_tlv_len+sizeof(struct lspping_tlv_header); tlen-=lspping_tlv_len+sizeof(struct lspping_tlv_header); } diff --git a/print-lwapp.c b/print-lwapp.c new file mode 100644 index 000000000000..984ebaa3044b --- /dev/null +++ b/print-lwapp.c @@ -0,0 +1,360 @@ +/* + * 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. + * + * Support for the Light Weight Access Point Protocol as per draft-ohara-capwap-lwapp-04 + * + * Original code by Carles Kishimoto + */ + +#ifndef lint +static const char rcsid[] _U_ = +"@(#) $Header: /tcpdump/master/tcpdump/print-lwapp.c,v 1.1 2007-07-24 16:07:30 hannes Exp $"; +#endif + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include + +#include +#include +#include + +#include "interface.h" +#include "extract.h" +#include "addrtoname.h" + +/* + * LWAPP transport (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 + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * |VER| RID |C|F|L| Frag ID | Length | + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * | Status/WLANs | Payload... | + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * + */ + +struct lwapp_transport_header { + u_int8_t version; + u_int8_t frag_id; + u_int8_t length[2]; + u_int16_t status; +}; + +/* + * LWAPP control 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 + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * | Message Type | Seq Num | Msg Element Length | + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * | Session ID | + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * | Msg Element [0..N] | + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + */ + +struct lwapp_control_header { + u_int8_t msg_type; + u_int8_t seq_num; + u_int8_t len[2]; + u_int8_t session_id[4]; +}; + +#define LWAPP_VERSION 0 +#define LWAPP_EXTRACT_VERSION(x) (((x)&0xC0)>>6) +#define LWAPP_EXTRACT_RID(x) (((x)&0x38)>>3) +#define LWAPP_EXTRACT_CONTROL_BIT(x) (((x)&0x04)>>2) + +static const struct tok lwapp_header_bits_values[] = { + { 0x01, "Last Fragment Bit"}, + { 0x02, "Fragment Bit"}, + { 0x04, "Control Bit"}, + { 0, NULL} +}; + +#define LWAPP_MSGTYPE_DISCOVERY_REQUEST 1 +#define LWAPP_MSGTYPE_DISCOVERY_RESPONSE 2 +#define LWAPP_MSGTYPE_JOIN_REQUEST 3 +#define LWAPP_MSGTYPE_JOIN_RESPONSE 4 +#define LWAPP_MSGTYPE_JOIN_ACK 5 +#define LWAPP_MSGTYPE_JOIN_CONFIRM 6 +#define LWAPP_MSGTYPE_CONFIGURE_REQUEST 10 +#define LWAPP_MSGTYPE_CONFIGURE_RESPONSE 11 +#define LWAPP_MSGTYPE_CONF_UPDATE_REQUEST 12 +#define LWAPP_MSGTYPE_CONF_UPDATE_RESPONSE 13 +#define LWAPP_MSGTYPE_WTP_EVENT_REQUEST 14 +#define LWAPP_MSGTYPE_WTP_EVENT_RESPONSE 15 +#define LWAPP_MSGTYPE_CHANGE_STATE_EVENT_REQUEST 16 +#define LWAPP_MSGTYPE_CHANGE_STATE_EVENT_RESPONSE 17 +#define LWAPP_MSGTYPE_ECHO_REQUEST 22 +#define LWAPP_MSGTYPE_ECHO_RESPONSE 23 +#define LWAPP_MSGTYPE_IMAGE_DATA_REQUEST 24 +#define LWAPP_MSGTYPE_IMAGE_DATA_RESPONSE 25 +#define LWAPP_MSGTYPE_RESET_REQUEST 26 +#define LWAPP_MSGTYPE_RESET_RESPONSE 27 +#define LWAPP_MSGTYPE_KEY_UPDATE_REQUEST 30 +#define LWAPP_MSGTYPE_KEY_UPDATE_RESPONSE 31 +#define LWAPP_MSGTYPE_PRIMARY_DISCOVERY_REQUEST 32 +#define LWAPP_MSGTYPE_PRIMARY_DISCOVERY_RESPONSE 33 +#define LWAPP_MSGTYPE_DATA_TRANSFER_REQUEST 34 +#define LWAPP_MSGTYPE_DATA_TRANSFER_RESPONSE 35 +#define LWAPP_MSGTYPE_CLEAR_CONFIG_INDICATION 36 +#define LWAPP_MSGTYPE_WLAN_CONFIG_REQUEST 37 +#define LWAPP_MSGTYPE_WLAN_CONFIG_RESPONSE 38 +#define LWAPP_MSGTYPE_MOBILE_CONFIG_REQUEST 39 +#define LWAPP_MSGTYPE_MOBILE_CONFIG_RESPONSE 40 + +static const struct tok lwapp_msg_type_values[] = { + { LWAPP_MSGTYPE_DISCOVERY_REQUEST, "Discovery req"}, + { LWAPP_MSGTYPE_DISCOVERY_RESPONSE, "Discovery resp"}, + { LWAPP_MSGTYPE_JOIN_REQUEST, "Join req"}, + { LWAPP_MSGTYPE_JOIN_RESPONSE, "Join resp"}, + { LWAPP_MSGTYPE_JOIN_ACK, "Join ack"}, + { LWAPP_MSGTYPE_JOIN_CONFIRM, "Join confirm"}, + { LWAPP_MSGTYPE_CONFIGURE_REQUEST, "Configure req"}, + { LWAPP_MSGTYPE_CONFIGURE_RESPONSE, "Configure resp"}, + { LWAPP_MSGTYPE_CONF_UPDATE_REQUEST, "Update req"}, + { LWAPP_MSGTYPE_CONF_UPDATE_RESPONSE, "Update resp"}, + { LWAPP_MSGTYPE_WTP_EVENT_REQUEST, "WTP event req"}, + { LWAPP_MSGTYPE_WTP_EVENT_RESPONSE, "WTP event resp"}, + { LWAPP_MSGTYPE_CHANGE_STATE_EVENT_REQUEST, "Change state event req"}, + { LWAPP_MSGTYPE_CHANGE_STATE_EVENT_RESPONSE, "Change state event resp"}, + { LWAPP_MSGTYPE_ECHO_REQUEST, "Echo req"}, + { LWAPP_MSGTYPE_ECHO_RESPONSE, "Echo resp"}, + { LWAPP_MSGTYPE_IMAGE_DATA_REQUEST, "Image data req"}, + { LWAPP_MSGTYPE_IMAGE_DATA_RESPONSE, "Image data resp"}, + { LWAPP_MSGTYPE_RESET_REQUEST, "Channel status req"}, + { LWAPP_MSGTYPE_RESET_RESPONSE, "Channel status resp"}, + { LWAPP_MSGTYPE_KEY_UPDATE_REQUEST, "Key update req"}, + { LWAPP_MSGTYPE_KEY_UPDATE_RESPONSE, "Key update resp"}, + { LWAPP_MSGTYPE_PRIMARY_DISCOVERY_REQUEST, "Primary discovery req"}, + { LWAPP_MSGTYPE_PRIMARY_DISCOVERY_RESPONSE, "Primary discovery resp"}, + { LWAPP_MSGTYPE_DATA_TRANSFER_REQUEST, "Data transfer req"}, + { LWAPP_MSGTYPE_DATA_TRANSFER_RESPONSE, "Data transfer resp"}, + { LWAPP_MSGTYPE_CLEAR_CONFIG_INDICATION, "Clear config ind"}, + { LWAPP_MSGTYPE_WLAN_CONFIG_REQUEST, "Wlan config req"}, + { LWAPP_MSGTYPE_WLAN_CONFIG_RESPONSE, "Wlan config resp"}, + { LWAPP_MSGTYPE_MOBILE_CONFIG_REQUEST, "Mobile config req"}, + { LWAPP_MSGTYPE_MOBILE_CONFIG_RESPONSE, "Mobile config resp"}, + { 0, NULL} +}; + +/* + * LWAPP message elements + * + * 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 + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * | Type | Length | Value ... | + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + */ +struct lwapp_message_header { + u_int8_t type; + u_int8_t length[2]; +}; + +void +lwapp_control_print(const u_char *pptr, u_int len, int has_ap_ident) { + + const struct lwapp_transport_header *lwapp_trans_header; + const struct lwapp_control_header *lwapp_control_header; + const u_char *tptr; + int hexdump,tlen; + int msg_tlen; + + tptr=pptr; + + if (has_ap_ident) { + /* check if enough bytes for AP identity */ + if (!TTEST2(*tptr, 6)) + goto trunc; + lwapp_trans_header = (const struct lwapp_transport_header *)(pptr+6); + } else { + lwapp_trans_header = (const struct lwapp_transport_header *)pptr; + } + TCHECK(*lwapp_trans_header); + + /* + * Sanity checking of the header. + */ + if (LWAPP_EXTRACT_VERSION(lwapp_trans_header->version) != LWAPP_VERSION) { + printf("LWAPP version %u packet not supported", + LWAPP_EXTRACT_VERSION(lwapp_trans_header->version)); + return; + } + + /* non-verbose */ + if (vflag < 1) { + printf("LWAPPv%u, %s frame, Flags [%s], length %u", + LWAPP_EXTRACT_VERSION(lwapp_trans_header->version), + LWAPP_EXTRACT_CONTROL_BIT(lwapp_trans_header->version) ? "Control" : "Data", + bittok2str(lwapp_header_bits_values,"none",(lwapp_trans_header->version)&0x07), + len); + return; + } + + /* ok they seem to want to know everything - lets fully decode it */ + tlen=EXTRACT_16BITS(lwapp_trans_header->length); + + printf("LWAPPv%u, %s frame, Radio-id %u, Flags [%s], Frag-id %u, length %u", + LWAPP_EXTRACT_VERSION(lwapp_trans_header->version), + LWAPP_EXTRACT_CONTROL_BIT(lwapp_trans_header->version) ? "Control" : "Data", + LWAPP_EXTRACT_RID(lwapp_trans_header->version), + bittok2str(lwapp_header_bits_values,"none",(lwapp_trans_header->version)&0x07), + lwapp_trans_header->frag_id, + tlen); + + if (has_ap_ident) { + printf("\n\tAP identity: %s", + etheraddr_string(tptr)); + tptr+=sizeof(const struct lwapp_transport_header)+6; + } else { + tptr+=sizeof(const struct lwapp_transport_header); + } + + while(tlen>0) { + + /* did we capture enough for fully decoding the object header ? */ + if (!TTEST2(*tptr, sizeof(struct lwapp_control_header))) + goto trunc; + + lwapp_control_header = (const struct lwapp_control_header *)tptr; + msg_tlen = EXTRACT_16BITS(lwapp_control_header->len); + + /* print message header */ + printf("\n\t Msg type: %s (%u), Seqnum: %u, Msg len: %d, Session: 0x%08x", + tok2str(lwapp_msg_type_values,"Unknown",lwapp_control_header->msg_type), + lwapp_control_header->msg_type, + lwapp_control_header->seq_num, + msg_tlen, + EXTRACT_32BITS(lwapp_control_header->session_id)); + + /* did we capture enough for fully decoding the message */ + if (!TTEST2(*tptr, msg_tlen)) + goto trunc; + hexdump=FALSE; + + /* XXX - Decode sub messages for each message */ + switch(lwapp_control_header->msg_type) { + case LWAPP_MSGTYPE_DISCOVERY_REQUEST: + case LWAPP_MSGTYPE_DISCOVERY_RESPONSE: + case LWAPP_MSGTYPE_JOIN_REQUEST: + case LWAPP_MSGTYPE_JOIN_RESPONSE: + case LWAPP_MSGTYPE_JOIN_ACK: + case LWAPP_MSGTYPE_JOIN_CONFIRM: + case LWAPP_MSGTYPE_CONFIGURE_REQUEST: + case LWAPP_MSGTYPE_CONFIGURE_RESPONSE: + case LWAPP_MSGTYPE_CONF_UPDATE_REQUEST: + case LWAPP_MSGTYPE_CONF_UPDATE_RESPONSE: + case LWAPP_MSGTYPE_WTP_EVENT_REQUEST: + case LWAPP_MSGTYPE_WTP_EVENT_RESPONSE: + case LWAPP_MSGTYPE_CHANGE_STATE_EVENT_REQUEST: + case LWAPP_MSGTYPE_CHANGE_STATE_EVENT_RESPONSE: + case LWAPP_MSGTYPE_ECHO_REQUEST: + case LWAPP_MSGTYPE_ECHO_RESPONSE: + case LWAPP_MSGTYPE_IMAGE_DATA_REQUEST: + case LWAPP_MSGTYPE_IMAGE_DATA_RESPONSE: + case LWAPP_MSGTYPE_RESET_REQUEST: + case LWAPP_MSGTYPE_RESET_RESPONSE: + case LWAPP_MSGTYPE_KEY_UPDATE_REQUEST: + case LWAPP_MSGTYPE_KEY_UPDATE_RESPONSE: + case LWAPP_MSGTYPE_PRIMARY_DISCOVERY_REQUEST: + case LWAPP_MSGTYPE_PRIMARY_DISCOVERY_RESPONSE: + case LWAPP_MSGTYPE_DATA_TRANSFER_REQUEST: + case LWAPP_MSGTYPE_DATA_TRANSFER_RESPONSE: + case LWAPP_MSGTYPE_CLEAR_CONFIG_INDICATION: + case LWAPP_MSGTYPE_WLAN_CONFIG_REQUEST: + case LWAPP_MSGTYPE_WLAN_CONFIG_RESPONSE: + case LWAPP_MSGTYPE_MOBILE_CONFIG_REQUEST: + case LWAPP_MSGTYPE_MOBILE_CONFIG_RESPONSE: + default: + break; + } + + tptr += sizeof(struct lwapp_control_header) + msg_tlen; + tlen -= sizeof(struct lwapp_control_header) + msg_tlen; + } + return; + + trunc: + printf("\n\t\t packet exceeded snapshot"); +} + +void +lwapp_data_print(const u_char *pptr, u_int len) { + + const struct lwapp_transport_header *lwapp_trans_header; + const u_char *tptr; + int tlen; + + tptr=pptr; + + /* check if enough bytes for AP identity */ + if (!TTEST2(*tptr, 6)) + goto trunc; + lwapp_trans_header = (const struct lwapp_transport_header *)pptr; + TCHECK(*lwapp_trans_header); + + /* + * Sanity checking of the header. + */ + if (LWAPP_EXTRACT_VERSION(lwapp_trans_header->version) != LWAPP_VERSION) { + printf("LWAPP version %u packet not supported", + LWAPP_EXTRACT_VERSION(lwapp_trans_header->version)); + return; + } + + /* non-verbose */ + if (vflag < 1) { + printf("LWAPPv%u, %s frame, Flags [%s], length %u", + LWAPP_EXTRACT_VERSION(lwapp_trans_header->version), + LWAPP_EXTRACT_CONTROL_BIT(lwapp_trans_header->version) ? "Control" : "Data", + bittok2str(lwapp_header_bits_values,"none",(lwapp_trans_header->version)&0x07), + len); + return; + } + + /* ok they seem to want to know everything - lets fully decode it */ + tlen=EXTRACT_16BITS(lwapp_trans_header->length); + + printf("LWAPPv%u, %s frame, Radio-id %u, Flags [%s], Frag-id %u, length %u", + LWAPP_EXTRACT_VERSION(lwapp_trans_header->version), + LWAPP_EXTRACT_CONTROL_BIT(lwapp_trans_header->version) ? "Control" : "Data", + LWAPP_EXTRACT_RID(lwapp_trans_header->version), + bittok2str(lwapp_header_bits_values,"none",(lwapp_trans_header->version)&0x07), + lwapp_trans_header->frag_id, + tlen); + + tptr+=sizeof(const struct lwapp_transport_header); + tlen-=sizeof(const struct lwapp_transport_header); + + /* FIX - An IEEE 802.11 frame follows - hexdump for now */ + print_unknown_data(tptr, "\n\t", tlen); + + return; + + trunc: + printf("\n\t\t packet exceeded snapshot"); +} + +/* + * Local Variables: + * c-style: whitesmith + * c-basic-offset: 8 + * End: + */ diff --git a/print-lwres.c b/print-lwres.c index d0d6fe1cddfa..aad4eee3843b 100644 --- a/print-lwres.c +++ b/print-lwres.c @@ -29,7 +29,7 @@ #ifndef lint static const char rcsid[] _U_ = - "@(#) $Header: /tcpdump/master/tcpdump/print-lwres.c,v 1.13 2004/03/24 01:54:29 guy Exp $ (LBL)"; + "@(#) $Header: /tcpdump/master/tcpdump/print-lwres.c,v 1.13 2004-03-24 01:54:29 guy Exp $ (LBL)"; #endif #ifdef HAVE_CONFIG_H diff --git a/print-mobile.c b/print-mobile.c index fe6f013fa690..816ffd6e6585 100644 --- a/print-mobile.c +++ b/print-mobile.c @@ -42,7 +42,7 @@ #ifndef lint static const char rcsid[] _U_ = - "@(#) $Header: /tcpdump/master/tcpdump/print-mobile.c,v 1.15 2004/03/24 01:58:14 guy Exp $"; + "@(#) $Header: /tcpdump/master/tcpdump/print-mobile.c,v 1.15 2004-03-24 01:58:14 guy Exp $"; #endif #include diff --git a/print-mobility.c b/print-mobility.c index 8f9cbee708b9..1490b72e721c 100644 --- a/print-mobility.c +++ b/print-mobility.c @@ -33,7 +33,7 @@ #ifndef lint static const char rcsid[] _U_ = - "@(#) $Header: /tcpdump/master/tcpdump/print-mobility.c,v 1.11.2.1 2005/04/20 22:21:16 guy Exp $"; + "@(#) $Header: /tcpdump/master/tcpdump/print-mobility.c,v 1.12 2005-04-20 22:21:00 guy Exp $"; #endif #ifdef INET6 diff --git a/print-mpcp.c b/print-mpcp.c new file mode 100644 index 000000000000..244f2802bb44 --- /dev/null +++ b/print-mpcp.c @@ -0,0 +1,274 @@ +/* + * 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. + * + * support for the IEEE MPCP protocol as per 802.3ah + * + * Original code by Hannes Gredler (hannes@juniper.net) + */ + +#ifndef lint +static const char rcsid[] _U_ = + "@(#) $Header: /tcpdump/master/tcpdump/print-mpcp.c,v 1.2 2006-02-10 17:24:55 hannes Exp $"; +#endif + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include + +#include +#include +#include + +#include "interface.h" +#include "extract.h" +#include "addrtoname.h" +#include "ether.h" + +#define MPCP_TIMESTAMP_LEN 4 +#define MPCP_TIMESTAMP_DURATION_LEN 2 + +struct mpcp_common_header_t { + u_int8_t opcode[2]; + u_int8_t timestamp[MPCP_TIMESTAMP_LEN]; +}; + +#define MPCP_OPCODE_PAUSE 0x0001 +#define MPCP_OPCODE_GATE 0x0002 +#define MPCP_OPCODE_REPORT 0x0003 +#define MPCP_OPCODE_REG_REQ 0x0004 +#define MPCP_OPCODE_REG 0x0005 +#define MPCP_OPCODE_REG_ACK 0x0006 + +static const struct tok mpcp_opcode_values[] = { + { MPCP_OPCODE_PAUSE, "Pause" }, + { MPCP_OPCODE_GATE, "Gate" }, + { MPCP_OPCODE_REPORT, "Report" }, + { MPCP_OPCODE_REG_REQ, "Register Request" }, + { MPCP_OPCODE_REG, "Register" }, + { MPCP_OPCODE_REG_ACK, "Register ACK" }, + { 0, NULL} +}; + +#define MPCP_GRANT_NUMBER_LEN 1 +#define MPCP_GRANT_NUMBER_MASK 0x7 +static const struct tok mpcp_grant_flag_values[] = { + { 0x08, "Discovery" }, + { 0x10, "Force Grant #1" }, + { 0x20, "Force Grant #2" }, + { 0x40, "Force Grant #3" }, + { 0x80, "Force Grant #4" }, + { 0, NULL} +}; + +struct mpcp_grant_t { + u_int8_t starttime[MPCP_TIMESTAMP_LEN]; + u_int8_t duration[MPCP_TIMESTAMP_DURATION_LEN]; +}; + +struct mpcp_reg_req_t { + u_int8_t flags; + u_int8_t pending_grants; +}; + + +static const struct tok mpcp_reg_req_flag_values[] = { + { 1, "Register" }, + { 3, "De-Register" }, + { 0, NULL} +}; + +struct mpcp_reg_t { + u_int8_t assigned_port[2]; + u_int8_t flags; + u_int8_t sync_time[MPCP_TIMESTAMP_DURATION_LEN]; + u_int8_t echoed_pending_grants; +}; + +static const struct tok mpcp_reg_flag_values[] = { + { 1, "Re-Register" }, + { 2, "De-Register" }, + { 3, "ACK" }, + { 4, "NACK" }, + { 0, NULL} +}; + +#define MPCP_REPORT_QUEUESETS_LEN 1 +#define MPCP_REPORT_REPORTBITMAP_LEN 1 +static const struct tok mpcp_report_bitmap_values[] = { + { 0x01, "Q0" }, + { 0x02, "Q1" }, + { 0x04, "Q2" }, + { 0x08, "Q3" }, + { 0x10, "Q4" }, + { 0x20, "Q5" }, + { 0x40, "Q6" }, + { 0x80, "Q7" }, + { 0, NULL} +}; + +struct mpcp_reg_ack_t { + u_int8_t flags; + u_int8_t echoed_assigned_port[2]; + u_int8_t echoed_sync_time[MPCP_TIMESTAMP_DURATION_LEN]; +}; + +static const struct tok mpcp_reg_ack_flag_values[] = { + { 0, "NACK" }, + { 1, "ACK" }, + { 0, NULL} +}; + +void +mpcp_print(register const u_char *pptr, register u_int length) { + + union { + const struct mpcp_common_header_t *common_header; + const struct mpcp_grant_t *grant; + const struct mpcp_reg_req_t *reg_req; + const struct mpcp_reg_t *reg; + const struct mpcp_reg_ack_t *reg_ack; + } mpcp; + + + const u_char *tptr; + u_int16_t opcode; + u_int8_t grant_numbers, grant; + u_int8_t queue_sets, queue_set, report_bitmap, report; + + tptr=pptr; + mpcp.common_header = (const struct mpcp_common_header_t *)pptr; + + if (!TTEST2(*tptr, sizeof(const struct mpcp_common_header_t))) + goto trunc; + opcode = EXTRACT_16BITS(mpcp.common_header->opcode); + printf("MPCP, Opcode %s", tok2str(mpcp_opcode_values, "Unknown (%u)", opcode)); + if (opcode != MPCP_OPCODE_PAUSE) { + printf(", Timestamp %u ticks", EXTRACT_32BITS(mpcp.common_header->timestamp)); + } + printf(", length %u", length); + + if (!vflag) + return; + + tptr += sizeof(const struct mpcp_common_header_t); + + switch (opcode) { + case MPCP_OPCODE_PAUSE: + break; + + case MPCP_OPCODE_GATE: + if (!TTEST2(*tptr, MPCP_GRANT_NUMBER_LEN)) + goto trunc; + grant_numbers = *tptr & MPCP_GRANT_NUMBER_MASK; + printf("\n\tGrant Numbers %u, Flags [ %s ]", + grant_numbers, + bittok2str(mpcp_grant_flag_values, + "?", + *tptr &~ MPCP_GRANT_NUMBER_MASK)); + tptr++; + + for (grant = 1; grant <= grant_numbers; grant++) { + if (!TTEST2(*tptr, sizeof(const struct mpcp_grant_t))) + goto trunc; + mpcp.grant = (const struct mpcp_grant_t *)tptr; + printf("\n\tGrant #%u, Start-Time %u ticks, duration %u ticks", + grant, + EXTRACT_32BITS(mpcp.grant->starttime), + EXTRACT_16BITS(mpcp.grant->duration)); + tptr += sizeof(const struct mpcp_grant_t); + } + + if (!TTEST2(*tptr, MPCP_TIMESTAMP_DURATION_LEN)) + goto trunc; + printf("\n\tSync-Time %u ticks", EXTRACT_16BITS(tptr)); + break; + + + case MPCP_OPCODE_REPORT: + if (!TTEST2(*tptr, MPCP_REPORT_QUEUESETS_LEN)) + goto trunc; + queue_sets = *tptr; + tptr+=MPCP_REPORT_QUEUESETS_LEN; + printf("\n\tTotal Queue-Sets %u", queue_sets); + + for (queue_set = 1; queue_set < queue_sets; queue_set++) { + if (!TTEST2(*tptr, MPCP_REPORT_REPORTBITMAP_LEN)) + goto trunc; + report_bitmap = *(tptr); + printf("\n\t Queue-Set #%u, Report-Bitmap [ %s ]", + queue_sets, + bittok2str(mpcp_report_bitmap_values, "Unknown", report_bitmap)); + tptr++; + + report=1; + while (report_bitmap != 0) { + if (report_bitmap & 1) { + if (!TTEST2(*tptr, MPCP_TIMESTAMP_DURATION_LEN)) + goto trunc; + printf("\n\t Q%u Report, Duration %u ticks", + report, + EXTRACT_16BITS(tptr)); + tptr+=MPCP_TIMESTAMP_DURATION_LEN; + } + report++; + report_bitmap = report_bitmap >> 1; + } + } + break; + + case MPCP_OPCODE_REG_REQ: + if (!TTEST2(*tptr, sizeof(const struct mpcp_reg_req_t))) + goto trunc; + mpcp.reg_req = (const struct mpcp_reg_req_t *)tptr; + printf("\n\tFlags [ %s ], Pending-Grants %u", + bittok2str(mpcp_reg_req_flag_values, "Reserved", mpcp.reg_req->flags), + mpcp.reg_req->pending_grants); + break; + + case MPCP_OPCODE_REG: + if (!TTEST2(*tptr, sizeof(const struct mpcp_reg_t))) + goto trunc; + mpcp.reg = (const struct mpcp_reg_t *)tptr; + printf("\n\tAssigned-Port %u, Flags [ %s ]" \ + "\n\tSync-Time %u ticks, Echoed-Pending-Grants %u", + EXTRACT_16BITS(mpcp.reg->assigned_port), + bittok2str(mpcp_reg_flag_values, "Reserved", mpcp.reg->flags), + EXTRACT_16BITS(mpcp.reg->sync_time), + mpcp.reg->echoed_pending_grants); + break; + + case MPCP_OPCODE_REG_ACK: + if (!TTEST2(*tptr, sizeof(const struct mpcp_reg_ack_t))) + goto trunc; + mpcp.reg_ack = (const struct mpcp_reg_ack_t *)tptr; + printf("\n\tEchoed-Assigned-Port %u, Flags [ %s ]" \ + "\n\tEchoed-Sync-Time %u ticks", + EXTRACT_16BITS(mpcp.reg_ack->echoed_assigned_port), + bittok2str(mpcp_reg_ack_flag_values, "Reserved", mpcp.reg_ack->flags), + EXTRACT_16BITS(mpcp.reg_ack->echoed_sync_time)); + break; + + default: + /* unknown opcode - hexdump for now */ + print_unknown_data(pptr, "\n\t", length); + break; + } + + return; + +trunc: + printf("\n\t[|MPCP]"); +} diff --git a/print-mpls.c b/print-mpls.c index 9d545677cc8c..c6b0814ffefc 100644 --- a/print-mpls.c +++ b/print-mpls.c @@ -28,7 +28,7 @@ #ifndef lint static const char rcsid[] _U_ = - "@(#) $Header: /tcpdump/master/tcpdump/print-mpls.c,v 1.13.2.1 2005/07/05 09:39:29 hannes Exp $ (LBL)"; + "@(#) $Header: /tcpdump/master/tcpdump/print-mpls.c,v 1.14 2005-07-05 09:38:19 hannes Exp $ (LBL)"; #endif #ifdef HAVE_CONFIG_H diff --git a/print-msdp.c b/print-msdp.c index 3f79b68b1ac0..a228ab7cec53 100644 --- a/print-msdp.c +++ b/print-msdp.c @@ -17,7 +17,7 @@ */ #ifndef lint static const char rcsid[] _U_ = - "@(#) $Header: /tcpdump/master/tcpdump/print-msdp.c,v 1.7 2005/04/06 21:32:41 mcr Exp $"; + "@(#) $Header: /tcpdump/master/tcpdump/print-msdp.c,v 1.7 2005-04-06 21:32:41 mcr Exp $"; #endif #ifdef HAVE_CONFIG_H diff --git a/print-netbios.c b/print-netbios.c index 419953cb5c63..c92eb9e6b144 100644 --- a/print-netbios.c +++ b/print-netbios.c @@ -24,7 +24,7 @@ #ifndef lint static const char rcsid[] _U_ = - "@(#) $Header: /tcpdump/master/tcpdump/print-netbios.c,v 1.20 2003/11/16 09:36:29 guy Exp $"; + "@(#) $Header: /tcpdump/master/tcpdump/print-netbios.c,v 1.20 2003-11-16 09:36:29 guy Exp $"; #endif #ifdef HAVE_CONFIG_H diff --git a/print-nfs.c b/print-nfs.c index 45e886978be8..fb09e30843e6 100644 --- a/print-nfs.c +++ b/print-nfs.c @@ -21,7 +21,7 @@ #ifndef lint static const char rcsid[] _U_ = - "@(#) $Header: /tcpdump/master/tcpdump/print-nfs.c,v 1.106.2.4 2007/06/15 23:17:40 guy Exp $ (LBL)"; + "@(#) $Header: /tcpdump/master/tcpdump/print-nfs.c,v 1.110.2.1 2007-12-22 03:08:45 guy Exp $ (LBL)"; #endif #ifdef HAVE_CONFIG_H @@ -49,7 +49,7 @@ static const char rcsid[] _U_ = #include "rpc_msg.h" static void nfs_printfh(const u_int32_t *, const u_int); -static void xid_map_enter(const struct sunrpc_msg *, const u_char *); +static int xid_map_enter(const struct sunrpc_msg *, const u_char *); static int32_t xid_map_find(const struct sunrpc_msg *, const u_char *, u_int32_t *, u_int32_t *); static void interp_reply(const struct sunrpc_msg *, u_int32_t, u_int32_t, int); @@ -297,6 +297,7 @@ nfsreply_print(register const u_char *bp, u_int length, nfserr = 0; /* assume no error */ rp = (const struct sunrpc_msg *)bp; + TCHECK(rp->rm_xid); if (!nflag) { strlcpy(srcid, "nfs", sizeof(srcid)); snprintf(dstid, sizeof(dstid), "%u", @@ -307,6 +308,7 @@ nfsreply_print(register const u_char *bp, u_int length, EXTRACT_32BITS(&rp->rm_xid)); } print_nfsaddr(bp2, srcid, dstid); + TCHECK(rp->rm_reply.rp_stat); reply_stat = EXTRACT_32BITS(&rp->rm_reply.rp_stat); switch (reply_stat) { @@ -318,10 +320,12 @@ nfsreply_print(register const u_char *bp, u_int length, case SUNRPC_MSG_DENIED: (void)printf("reply ERR %u: ", length); + TCHECK(rp->rm_reply.rp_reject.rj_stat); rstat = EXTRACT_32BITS(&rp->rm_reply.rp_reject.rj_stat); switch (rstat) { case SUNRPC_RPC_MISMATCH: + TCHECK(rp->rm_reply.rp_reject.rj_vers.high); rlow = EXTRACT_32BITS(&rp->rm_reply.rp_reject.rj_vers.low); rhigh = EXTRACT_32BITS(&rp->rm_reply.rp_reject.rj_vers.high); (void)printf("RPC Version mismatch (%u-%u)", @@ -329,6 +333,7 @@ nfsreply_print(register const u_char *bp, u_int length, break; case SUNRPC_AUTH_ERROR: + TCHECK(rp->rm_reply.rp_reject.rj_why); rwhy = EXTRACT_32BITS(&rp->rm_reply.rp_reject.rj_why); (void)printf("Auth "); switch (rwhy) { @@ -384,6 +389,11 @@ nfsreply_print(register const u_char *bp, u_int length, reply_stat, length); break; } + return; + +trunc: + if (!nfserr) + fputs(" [|nfs]", stdout); } /* @@ -503,6 +513,8 @@ nfsreq_print(register const u_char *bp, u_int length, nfserr = 0; /* assume no error */ rp = (const struct sunrpc_msg *)bp; + + TCHECK(rp->rm_xid); if (!nflag) { snprintf(srcid, sizeof(srcid), "%u", EXTRACT_32BITS(&rp->rm_xid)); @@ -515,7 +527,8 @@ nfsreq_print(register const u_char *bp, u_int length, print_nfsaddr(bp2, srcid, dstid); (void)printf("%d", length); - xid_map_enter(rp, bp2); /* record proc number for later on */ + if (!xid_map_enter(rp, bp2)) /* record proc number for later on */ + goto trunc; v3 = (EXTRACT_32BITS(&rp->rm_call.cb_vers) == NFS_VER3); proc = EXTRACT_32BITS(&rp->rm_call.cb_proc); @@ -886,7 +899,7 @@ struct xid_map_entry xid_map[XIDMAPSIZE]; int xid_map_next = 0; int xid_map_hint = 0; -static void +static int xid_map_enter(const struct sunrpc_msg *rp, const u_char *bp) { struct ip *ip = NULL; @@ -895,6 +908,8 @@ xid_map_enter(const struct sunrpc_msg *rp, const u_char *bp) #endif struct xid_map_entry *xmep; + if (!TTEST(rp->rm_call.cb_vers)) + return (0); switch (IP_V((struct ip *)bp)) { case 4: ip = (struct ip *)bp; @@ -905,7 +920,7 @@ xid_map_enter(const struct sunrpc_msg *rp, const u_char *bp) break; #endif default: - return; + return (1); } xmep = &xid_map[xid_map_next]; @@ -928,6 +943,7 @@ xid_map_enter(const struct sunrpc_msg *rp, const u_char *bp) #endif xmep->proc = EXTRACT_32BITS(&rp->rm_call.cb_proc); xmep->vers = EXTRACT_32BITS(&rp->rm_call.cb_vers); + return (1); } /* diff --git a/print-ntp.c b/print-ntp.c index 606a654de10a..4960dc829c50 100644 --- a/print-ntp.c +++ b/print-ntp.c @@ -25,7 +25,7 @@ #ifndef lint static const char rcsid[] _U_ = - "@(#) $Header: /tcpdump/master/tcpdump/print-ntp.c,v 1.41.2.1 2005/05/06 07:57:18 guy Exp $ (LBL)"; + "@(#) $Header: /tcpdump/master/tcpdump/print-ntp.c,v 1.42 2005-05-06 07:56:53 guy Exp $ (LBL)"; #endif #ifdef HAVE_CONFIG_H diff --git a/print-null.c b/print-null.c index 3d203da4f249..a69997da12e3 100644 --- a/print-null.c +++ b/print-null.c @@ -21,7 +21,7 @@ #ifndef lint static const char rcsid[] _U_ = - "@(#) $Header: /tcpdump/master/tcpdump/print-null.c,v 1.53.2.4 2007/02/26 13:31:33 hannes Exp $ (LBL)"; + "@(#) $Header: /tcpdump/master/tcpdump/print-null.c,v 1.57 2006-03-23 14:58:44 hannes Exp $ (LBL)"; #endif #ifdef HAVE_CONFIG_H @@ -36,12 +36,12 @@ static const char rcsid[] _U_ = #include "interface.h" #include "addrtoname.h" -#include "af.h" #include "ip.h" #ifdef INET6 #include "ip6.h" #endif +#include "af.h" /* * The DLT_NULL packet header is 4 bytes long. It contains a host-byte-order @@ -55,7 +55,6 @@ static const char rcsid[] _U_ = */ #define NULL_HDRLEN 4 - /* * Byte-swap a 32-bit number. * ("htonl()" or "ntohl()" won't work - we want to byte-swap even on diff --git a/print-ospf.c b/print-ospf.c index fd8f111a3c4e..4490496468ea 100644 --- a/print-ospf.c +++ b/print-ospf.c @@ -23,7 +23,7 @@ #ifndef lint static const char rcsid[] _U_ = - "@(#) $Header: /tcpdump/master/tcpdump/print-ospf.c,v 1.56.2.4 2006/12/13 08:24:27 hannes Exp $ (LBL)"; + "@(#) $Header: /tcpdump/master/tcpdump/print-ospf.c,v 1.66 2007-10-08 07:53:21 hannes Exp $ (LBL)"; #endif #ifdef HAVE_CONFIG_H @@ -44,11 +44,11 @@ static const char rcsid[] _U_ = #include "ip.h" static struct tok ospf_option_values[] = { - { OSPF_OPTION_T, "TOS" }, + { OSPF_OPTION_T, "MultiTopology" }, /* draft-ietf-ospf-mt-09 */ { OSPF_OPTION_E, "External" }, { OSPF_OPTION_MC, "Multicast" }, { OSPF_OPTION_NP, "NSSA" }, - { OSPF_OPTION_EA, "Advertise External" }, + { OSPF_OPTION_L, "LLS" }, { OSPF_OPTION_DC, "Demand Circuit" }, { OSPF_OPTION_O, "Opaque" }, { OSPF_OPTION_DN, "Up/Down" }, @@ -98,6 +98,7 @@ static struct tok ospf_dd_flag_values[] = { { OSPF_DB_INIT, "Init" }, { OSPF_DB_MORE, "More" }, { OSPF_DB_MASTER, "Master" }, + { OSPF_DB_RESYNC, "OOBResync" }, { 0, NULL } }; @@ -172,7 +173,19 @@ static struct tok lsa_opaque_ri_tlv_cap_values[] = { { 0, NULL } }; -static char tstr[] = " [|ospf]"; +static struct tok ospf_lls_tlv_values[] = { + { OSPF_LLS_EO, "Extended Options" }, + { OSPF_LLS_MD5, "MD5 Authentication" }, + { 0, NULL } +}; + +static struct tok ospf_lls_eo_options[] = { + { OSPF_LLS_EO_LR, "LSDB resync" }, + { OSPF_LLS_EO_RS, "Restart" }, + { 0, NULL } +}; + +static char tstr[] = " [|ospf2]"; #ifdef WIN32 #define inline __inline @@ -181,6 +194,274 @@ static char tstr[] = " [|ospf]"; static int ospf_print_lshdr(const struct lsa_hdr *); static const u_char *ospf_print_lsa(const struct lsa *); static int ospf_decode_v2(const struct ospfhdr *, const u_char *); +static int ospf_decode_lls(const struct ospfhdr *, register u_int); + +int +ospf_print_grace_lsa (u_int8_t *tptr, u_int ls_length) { + + u_int tlv_type, tlv_length; + + + while (ls_length > 0) { + TCHECK2(*tptr, 4); + if (ls_length < 4) { + printf("\n\t Remaining LS length %u < 4", ls_length); + return -1; + } + tlv_type = EXTRACT_16BITS(tptr); + tlv_length = EXTRACT_16BITS(tptr+2); + tptr+=4; + ls_length-=4; + + printf("\n\t %s TLV (%u), length %u, value: ", + tok2str(lsa_opaque_grace_tlv_values,"unknown",tlv_type), + tlv_type, + tlv_length); + + if (tlv_length > ls_length) { + printf("\n\t Bogus length %u > %u", tlv_length, + ls_length); + return -1; + } + + /* Infinite loop protection. */ + if (tlv_type == 0 || tlv_length ==0) { + return -1; + } + + TCHECK2(*tptr, tlv_length); + switch(tlv_type) { + + case LS_OPAQUE_GRACE_TLV_PERIOD: + if (tlv_length != 4) { + printf("\n\t Bogus length %u != 4", tlv_length); + return -1; + } + printf("%us",EXTRACT_32BITS(tptr)); + break; + + case LS_OPAQUE_GRACE_TLV_REASON: + if (tlv_length != 1) { + printf("\n\t Bogus length %u != 1", tlv_length); + return -1; + } + printf("%s (%u)", + tok2str(lsa_opaque_grace_tlv_reason_values, "Unknown", *tptr), + *tptr); + break; + + case LS_OPAQUE_GRACE_TLV_INT_ADDRESS: + if (tlv_length != 4) { + printf("\n\t Bogus length %u != 4", tlv_length); + return -1; + } + printf("%s", ipaddr_string(tptr)); + break; + + default: + if (vflag <= 1) { + if(!print_unknown_data(tptr,"\n\t ",tlv_length)) + return -1; + } + break; + + } + /* in OSPF everything has to be 32-bit aligned, including TLVs */ + if (tlv_length%4 != 0) + tlv_length+=4-(tlv_length%4); + ls_length-=tlv_length; + tptr+=tlv_length; + } + + return 0; +trunc: + return -1; +} + +int +ospf_print_te_lsa (u_int8_t *tptr, u_int ls_length) { + + u_int tlv_type, tlv_length, subtlv_type, subtlv_length; + u_int priority_level, te_class, count_srlg; + union { /* int to float conversion buffer for several subTLVs */ + float f; + u_int32_t i; + } bw; + + while (ls_length != 0) { + TCHECK2(*tptr, 4); + if (ls_length < 4) { + printf("\n\t Remaining LS length %u < 4", ls_length); + return -1; + } + tlv_type = EXTRACT_16BITS(tptr); + tlv_length = EXTRACT_16BITS(tptr+2); + tptr+=4; + ls_length-=4; + + printf("\n\t %s TLV (%u), length: %u", + tok2str(lsa_opaque_te_tlv_values,"unknown",tlv_type), + tlv_type, + tlv_length); + + if (tlv_length > ls_length) { + printf("\n\t Bogus length %u > %u", tlv_length, + ls_length); + return -1; + } + + /* Infinite loop protection. */ + if (tlv_type == 0 || tlv_length ==0) { + return -1; + } + + switch(tlv_type) { + case LS_OPAQUE_TE_TLV_LINK: + while (tlv_length >= sizeof(subtlv_type) + sizeof(subtlv_length)) { + if (tlv_length < 4) { + printf("\n\t Remaining TLV length %u < 4", + tlv_length); + return -1; + } + TCHECK2(*tptr, 4); + subtlv_type = EXTRACT_16BITS(tptr); + subtlv_length = EXTRACT_16BITS(tptr+2); + tptr+=4; + tlv_length-=4; + + printf("\n\t %s subTLV (%u), length: %u", + tok2str(lsa_opaque_te_link_tlv_subtlv_values,"unknown",subtlv_type), + subtlv_type, + subtlv_length); + + TCHECK2(*tptr, subtlv_length); + switch(subtlv_type) { + case LS_OPAQUE_TE_LINK_SUBTLV_ADMIN_GROUP: + printf(", 0x%08x", EXTRACT_32BITS(tptr)); + break; + case LS_OPAQUE_TE_LINK_SUBTLV_LINK_ID: + case LS_OPAQUE_TE_LINK_SUBTLV_LINK_LOCAL_REMOTE_ID: + printf(", %s (0x%08x)", + ipaddr_string(tptr), + EXTRACT_32BITS(tptr)); + if (subtlv_length == 8) /* rfc4203 */ + printf(", %s (0x%08x)", + ipaddr_string(tptr+4), + EXTRACT_32BITS(tptr+4)); + break; + case LS_OPAQUE_TE_LINK_SUBTLV_LOCAL_IP: + case LS_OPAQUE_TE_LINK_SUBTLV_REMOTE_IP: + printf(", %s", ipaddr_string(tptr)); + break; + case LS_OPAQUE_TE_LINK_SUBTLV_MAX_BW: + case LS_OPAQUE_TE_LINK_SUBTLV_MAX_RES_BW: + bw.i = EXTRACT_32BITS(tptr); + printf(", %.3f Mbps", bw.f*8/1000000 ); + break; + case LS_OPAQUE_TE_LINK_SUBTLV_UNRES_BW: + for (te_class = 0; te_class < 8; te_class++) { + bw.i = EXTRACT_32BITS(tptr+te_class*4); + printf("\n\t\tTE-Class %u: %.3f Mbps", + te_class, + bw.f*8/1000000 ); + } + break; + case LS_OPAQUE_TE_LINK_SUBTLV_BW_CONSTRAINTS: + printf("\n\t\tBandwidth Constraints Model ID: %s (%u)", + tok2str(diffserv_te_bc_values, "unknown", *tptr), + *tptr); + /* decode BCs until the subTLV ends */ + for (te_class = 0; te_class < (subtlv_length-4)/4; te_class++) { + bw.i = EXTRACT_32BITS(tptr+4+te_class*4); + printf("\n\t\t Bandwidth constraint CT%u: %.3f Mbps", + te_class, + bw.f*8/1000000 ); + } + break; + case LS_OPAQUE_TE_LINK_SUBTLV_TE_METRIC: + printf(", Metric %u", EXTRACT_32BITS(tptr)); + break; + case LS_OPAQUE_TE_LINK_SUBTLV_LINK_PROTECTION_TYPE: + printf(", %s, Priority %u", + bittok2str(gmpls_link_prot_values, "none", *tptr), + *(tptr+1)); + break; + case LS_OPAQUE_TE_LINK_SUBTLV_INTF_SW_CAP_DESCR: + printf("\n\t\tInterface Switching Capability: %s", + tok2str(gmpls_switch_cap_values, "Unknown", *(tptr))); + printf("\n\t\tLSP Encoding: %s\n\t\tMax LSP Bandwidth:", + tok2str(gmpls_encoding_values, "Unknown", *(tptr+1))); + for (priority_level = 0; priority_level < 8; priority_level++) { + bw.i = EXTRACT_32BITS(tptr+4+(priority_level*4)); + printf("\n\t\t priority level %d: %.3f Mbps", + priority_level, + bw.f*8/1000000 ); + } + break; + case LS_OPAQUE_TE_LINK_SUBTLV_LINK_TYPE: + printf(", %s (%u)", + tok2str(lsa_opaque_te_tlv_link_type_sub_tlv_values,"unknown",*tptr), + *tptr); + break; + + case LS_OPAQUE_TE_LINK_SUBTLV_SHARED_RISK_GROUP: + count_srlg = subtlv_length / 4; + if (count_srlg != 0) + printf("\n\t\t Shared risk group: "); + while (count_srlg > 0) { + bw.i = EXTRACT_32BITS(tptr); + printf("%d",bw.i); + tptr+=4; + count_srlg--; + if (count_srlg > 0) + printf(", "); + } + break; + + default: + if (vflag <= 1) { + if(!print_unknown_data(tptr,"\n\t\t",subtlv_length)) + return -1; + } + break; + } + /* in OSPF everything has to be 32-bit aligned, including subTLVs */ + if (subtlv_length%4 != 0) + subtlv_length+=4-(subtlv_length%4); + + tlv_length-=subtlv_length; + tptr+=subtlv_length; + + } + break; + + case LS_OPAQUE_TE_TLV_ROUTER: + if (tlv_length < 4) { + printf("\n\t TLV length %u < 4", tlv_length); + return -1; + } + TCHECK2(*tptr, 4); + printf(", %s", ipaddr_string(tptr)); + break; + + default: + if (vflag <= 1) { + if(!print_unknown_data(tptr,"\n\t ",tlv_length)) + return -1; + } + break; + } + /* in OSPF everything has to be 32-bit aligned, including TLVs */ + if (tlv_length%4 != 0) + tlv_length+=4-(tlv_length%4); + ls_length-=tlv_length; + tptr+=tlv_length; + } + return 0; +trunc: + return -1; +} + static int ospf_print_lshdr(register const struct lsa_hdr *lshp) @@ -190,13 +471,13 @@ ospf_print_lshdr(register const struct lsa_hdr *lshp) TCHECK(lshp->ls_length); ls_length = EXTRACT_16BITS(&lshp->ls_length); if (ls_length < sizeof(struct lsa_hdr)) { - printf("\n\t Bogus length %u < %lu", ls_length, + printf("\n\t Bogus length %u < header (%lu)", ls_length, (unsigned long)sizeof(struct lsa_hdr)); return(-1); } TCHECK(lshp->ls_seq); /* XXX - ls_length check checked this */ - printf("\n\t Advertising Router: %s, seq 0x%08x, age %us, length: %u", + printf("\n\t Advertising Router %s, seq 0x%08x, age %us, length %u", ipaddr_string(&lshp->ls_router), EXTRACT_32BITS(&lshp->ls_seq), EXTRACT_16BITS(&lshp->ls_age), @@ -208,7 +489,7 @@ ospf_print_lshdr(register const struct lsa_hdr *lshp) case LS_TYPE_OPAQUE_LL: case LS_TYPE_OPAQUE_AL: case LS_TYPE_OPAQUE_DW: - printf("\n\t %s LSA (%d), Opaque-Type: %s LSA (%u), Opaque-ID: %u", + printf("\n\t %s LSA (%d), Opaque-Type %s LSA (%u), Opaque-ID %u", tok2str(lsa_values,"unknown",lshp->ls_type), lshp->ls_type, @@ -238,6 +519,41 @@ ospf_print_lshdr(register const struct lsa_hdr *lshp) return (-1); } +/* draft-ietf-ospf-mt-09 */ +static struct tok ospf_topology_values[] = { + { 0, "default " }, + { 1, "multicast " }, + { 2, "management " }, + { 0, NULL } +}; + +/* + * Print all the per-topology metrics. + */ +static void +ospf_print_tos_metrics(const union un_tos *tos) +{ + int metric_count; + int toscount; + + toscount = tos->link.link_tos_count+1; + metric_count = 0; + + /* + * All but the first metric contain a valid topology id. + */ + while (toscount) { + printf("\n\t\ttopology %s(%u), metric %u", + tok2str(ospf_topology_values, "", + metric_count ? tos->metrics.tos_type : 0), + metric_count ? tos->metrics.tos_type : 0, + EXTRACT_16BITS(&tos->metrics.tos_metric)); + metric_count++; + tos++; + toscount--; + } +} + /* * Print a single link state advertisement. If truncated or if LSA length * field is less than the length of the LSA header, return NULl, else @@ -248,19 +564,13 @@ ospf_print_lsa(register const struct lsa *lsap) { register const u_int8_t *ls_end; register const struct rlalink *rlp; - register const struct tos_metric *tosp; register const struct in_addr *ap; register const struct aslametric *almp; register const struct mcla *mcp; register const u_int32_t *lp; - register int j, k, tlv_type, tlv_length, subtlv_type, subtlv_length, priority_level, te_class; + register int j, tlv_type, tlv_length, topology; register int ls_length; const u_int8_t *tptr; - int count_srlg; - union { /* int to float conversion buffer for several subTLVs */ - float f; - u_int32_t i; - } bw; tptr = (u_int8_t *)lsap->lsa_un.un_unknown; /* squelch compiler warnings */ ls_length = ospf_print_lshdr(&lsap->ls_hdr); @@ -281,7 +591,7 @@ ospf_print_lsa(register const struct lsa *lsap) rlp = lsap->lsa_un.un_rla.rla_link; while (j--) { TCHECK(*rlp); - switch (rlp->link_type) { + switch (rlp->un_tos.link.link_type) { case RLA_TYPE_VIRTUAL: printf("\n\t Virtual Link: Neighbor Router-ID: %s, Interface Address: %s", @@ -309,20 +619,14 @@ ospf_print_lsa(register const struct lsa *lsap) default: printf("\n\t Unknown Router Link Type (%u)", - rlp->link_type); + rlp->un_tos.link.link_type); return (ls_end); } - printf(", tos 0, metric: %d", EXTRACT_16BITS(&rlp->link_tos0metric)); - tosp = (struct tos_metric *) - ((sizeof rlp->link_tos0metric) + (u_char *) rlp); - for (k = 0; k < (int) rlp->link_toscount; ++k, ++tosp) { - TCHECK(*tosp); - printf(", tos %d, metric: %d", - tosp->tos_type, - EXTRACT_16BITS(&tosp->tos_metric)); - } + + ospf_print_tos_metrics(&rlp->un_tos); + rlp = (struct rlalink *)((u_char *)(rlp + 1) + - ((rlp->link_toscount) * sizeof(*tosp))); + ((rlp->un_tos.link.link_tos_count) * sizeof(union un_tos))); } break; @@ -344,19 +648,16 @@ ospf_print_lsa(register const struct lsa *lsap) ipaddr_string(&lsap->lsa_un.un_sla.sla_mask)); TCHECK(lsap->lsa_un.un_sla.sla_tosmetric); lp = lsap->lsa_un.un_sla.sla_tosmetric; - /* suppress tos if its not supported */ - if(!((lsap->ls_hdr.ls_options)&OSPF_OPTION_T)) { - printf(", metric: %u", EXTRACT_32BITS(lp)&SLA_MASK_METRIC); - break; - } while ((u_char *)lp < ls_end) { register u_int32_t ul; TCHECK(*lp); ul = EXTRACT_32BITS(lp); - printf(", tos %d metric %d", - (ul & SLA_MASK_TOS) >> SLA_SHIFT_TOS, - ul & SLA_MASK_METRIC); + topology = (ul & SLA_MASK_TOS) >> SLA_SHIFT_TOS; + printf("\n\t\ttopology %s(%u) metric %d", + tok2str(ospf_topology_values, "", topology), + topology, + ul & SLA_MASK_METRIC); ++lp; } break; @@ -364,19 +665,16 @@ ospf_print_lsa(register const struct lsa *lsap) case LS_TYPE_SUM_ABR: TCHECK(lsap->lsa_un.un_sla.sla_tosmetric); lp = lsap->lsa_un.un_sla.sla_tosmetric; - /* suppress tos if its not supported */ - if(!((lsap->ls_hdr.ls_options)&OSPF_OPTION_T)) { - printf(", metric: %u", EXTRACT_32BITS(lp)&SLA_MASK_METRIC); - break; - } while ((u_char *)lp < ls_end) { register u_int32_t ul; TCHECK(*lp); ul = EXTRACT_32BITS(lp); - printf(", tos %d metric %d", - (ul & SLA_MASK_TOS) >> SLA_SHIFT_TOS, - ul & SLA_MASK_METRIC); + topology = (ul & SLA_MASK_TOS) >> SLA_SHIFT_TOS; + printf("\n\t\ttopology %s(%u) metric %d", + tok2str(ospf_topology_values, "", topology), + topology, + ul & SLA_MASK_METRIC); ++lp; } break; @@ -394,9 +692,11 @@ ospf_print_lsa(register const struct lsa *lsap) TCHECK(almp->asla_tosmetric); ul = EXTRACT_32BITS(&almp->asla_tosmetric); - printf(", type %d, tos %d metric:", - (ul & ASLA_FLAG_EXTERNAL) ? 2 : 1, - (ul & ASLA_MASK_TOS) >> ASLA_SHIFT_TOS); + topology = ((ul & ASLA_MASK_TOS) >> ASLA_SHIFT_TOS); + printf("\n\t\ttopology %s(%u), type %d, metric", + tok2str(ospf_topology_values, "", topology), + topology, + (ul & ASLA_FLAG_EXTERNAL) ? 2 : 1); if ((ul & ASLA_MASK_METRIC)==0xffffff) printf(" infinite"); else @@ -471,7 +771,6 @@ ospf_print_lsa(register const struct lsa *lsap) ls_length); return(ls_end); } - ls_length-=tlv_length; TCHECK2(*tptr, tlv_length); switch(tlv_type) { @@ -492,245 +791,32 @@ ospf_print_lsa(register const struct lsa *lsap) } tptr+=tlv_length; + ls_length-=tlv_length; } - break; + case LS_OPAQUE_TYPE_GRACE: - tptr = (u_int8_t *)(&lsap->lsa_un.un_grace_tlv.type); - - while (ls_length != 0) { - TCHECK2(*tptr, 4); - if (ls_length < 4) { - printf("\n\t Remaining LS length %u < 4", ls_length); - return(ls_end); - } - tlv_type = EXTRACT_16BITS(tptr); - tlv_length = EXTRACT_16BITS(tptr+2); - tptr+=4; - ls_length-=4; - - printf("\n\t %s TLV (%u), length: %u, value: ", - tok2str(lsa_opaque_grace_tlv_values,"unknown",tlv_type), - tlv_type, - tlv_length); - - if (tlv_length > ls_length) { - printf("\n\t Bogus length %u > %u", tlv_length, - ls_length); - return(ls_end); - } - ls_length-=tlv_length; - TCHECK2(*tptr, tlv_length); - switch(tlv_type) { - - case LS_OPAQUE_GRACE_TLV_PERIOD: - if (tlv_length != 4) { - printf("\n\t Bogus length %u != 4", tlv_length); - return(ls_end); - } - printf("%us",EXTRACT_32BITS(tptr)); - break; - case LS_OPAQUE_GRACE_TLV_REASON: - if (tlv_length != 1) { - printf("\n\t Bogus length %u != 1", tlv_length); - return(ls_end); - } - printf("%s (%u)", - tok2str(lsa_opaque_grace_tlv_reason_values, "Unknown", *tptr), - *tptr); - break; - case LS_OPAQUE_GRACE_TLV_INT_ADDRESS: - if (tlv_length != 4) { - printf("\n\t Bogus length %u != 4", tlv_length); - return(ls_end); - } - printf("%s", ipaddr_string(tptr)); - break; - default: - if (vflag <= 1) { - if(!print_unknown_data(tptr,"\n\t ",tlv_length)) - return(ls_end); - } - break; - - } - tptr+=tlv_length; - } - - break; - case LS_OPAQUE_TYPE_TE: - tptr = (u_int8_t *)(&lsap->lsa_un.un_te_lsa_tlv.type); - - while (ls_length != 0) { - TCHECK2(*tptr, 4); - if (ls_length < 4) { - printf("\n\t Remaining LS length %u < 4", ls_length); - return(ls_end); - } - tlv_type = EXTRACT_16BITS(tptr); - tlv_length = EXTRACT_16BITS(tptr+2); - tptr+=4; - ls_length-=4; - - printf("\n\t %s TLV (%u), length: %u", - tok2str(lsa_opaque_te_tlv_values,"unknown",tlv_type), - tlv_type, - tlv_length); - - if (tlv_length > ls_length) { - printf("\n\t Bogus length %u > %u", tlv_length, - ls_length); - return(ls_end); - } - ls_length-=tlv_length; - switch(tlv_type) { - case LS_OPAQUE_TE_TLV_LINK: - while (tlv_length != 0) { - if (tlv_length < 4) { - printf("\n\t Remaining TLV length %u < 4", - tlv_length); - return(ls_end); - } - TCHECK2(*tptr, 4); - subtlv_type = EXTRACT_16BITS(tptr); - subtlv_length = EXTRACT_16BITS(tptr+2); - tptr+=4; - tlv_length-=4; - - printf("\n\t %s subTLV (%u), length: %u", - tok2str(lsa_opaque_te_link_tlv_subtlv_values,"unknown",subtlv_type), - subtlv_type, - subtlv_length); - - TCHECK2(*tptr, subtlv_length); - switch(subtlv_type) { - case LS_OPAQUE_TE_LINK_SUBTLV_ADMIN_GROUP: - printf(", 0x%08x", EXTRACT_32BITS(tptr)); - break; - case LS_OPAQUE_TE_LINK_SUBTLV_LINK_ID: - case LS_OPAQUE_TE_LINK_SUBTLV_LINK_LOCAL_REMOTE_ID: - printf(", %s (0x%08x)", - ipaddr_string(tptr), - EXTRACT_32BITS(tptr)); - if (subtlv_length == 8) /* draft-ietf-ccamp-ospf-gmpls-extensions */ - printf(", %s (0x%08x)", - ipaddr_string(tptr+4), - EXTRACT_32BITS(tptr+4)); - break; - case LS_OPAQUE_TE_LINK_SUBTLV_LOCAL_IP: - case LS_OPAQUE_TE_LINK_SUBTLV_REMOTE_IP: - printf(", %s", ipaddr_string(tptr)); - break; - case LS_OPAQUE_TE_LINK_SUBTLV_MAX_BW: - case LS_OPAQUE_TE_LINK_SUBTLV_MAX_RES_BW: - bw.i = EXTRACT_32BITS(tptr); - printf(", %.3f Mbps", bw.f*8/1000000 ); - break; - case LS_OPAQUE_TE_LINK_SUBTLV_UNRES_BW: - for (te_class = 0; te_class < 8; te_class++) { - bw.i = EXTRACT_32BITS(tptr+te_class*4); - printf("\n\t\tTE-Class %u: %.3f Mbps", - te_class, - bw.f*8/1000000 ); - } - break; - case LS_OPAQUE_TE_LINK_SUBTLV_BW_CONSTRAINTS: - printf("\n\t\tBandwidth Constraints Model ID: %s (%u)", - tok2str(diffserv_te_bc_values, "unknown", *tptr), - *tptr); - /* decode BCs until the subTLV ends */ - for (te_class = 0; te_class < (subtlv_length-4)/4; te_class++) { - bw.i = EXTRACT_32BITS(tptr+4+te_class*4); - printf("\n\t\t Bandwidth constraint CT%u: %.3f Mbps", - te_class, - bw.f*8/1000000 ); - } - break; - case LS_OPAQUE_TE_LINK_SUBTLV_TE_METRIC: - printf(", Metric %u", EXTRACT_32BITS(tptr)); - break; - case LS_OPAQUE_TE_LINK_SUBTLV_LINK_PROTECTION_TYPE: - printf(", %s, Priority %u", - bittok2str(gmpls_link_prot_values, "none", *tptr), - *(tptr+1)); - break; - case LS_OPAQUE_TE_LINK_SUBTLV_INTF_SW_CAP_DESCR: - printf("\n\t\tInterface Switching Capability: %s", - tok2str(gmpls_switch_cap_values, "Unknown", *(tptr))); - printf("\n\t\tLSP Encoding: %s\n\t\tMax LSP Bandwidth:", - tok2str(gmpls_encoding_values, "Unknown", *(tptr+1))); - for (priority_level = 0; priority_level < 8; priority_level++) { - bw.i = EXTRACT_32BITS(tptr+4+(priority_level*4)); - printf("\n\t\t priority level %d: %.3f Mbps", - priority_level, - bw.f*8/1000000 ); - } - break; - case LS_OPAQUE_TE_LINK_SUBTLV_LINK_TYPE: - printf(", %s (%u)", - tok2str(lsa_opaque_te_tlv_link_type_sub_tlv_values,"unknown",*tptr), - *tptr); - break; - - case LS_OPAQUE_TE_LINK_SUBTLV_SHARED_RISK_GROUP: - count_srlg = subtlv_length / 4; - if (count_srlg != 0) - printf("\n\t\t Shared risk group: "); - while (count_srlg > 0) { - bw.i = EXTRACT_32BITS(tptr); - printf("%d",bw.i); - tptr+=4; - count_srlg--; - if (count_srlg > 0) - printf(", "); - } - break; - - default: - if (vflag <= 1) { - if(!print_unknown_data(tptr,"\n\t\t",subtlv_length)) - return(ls_end); - } - break; - } - /* in OSPF everything has to be 32-bit aligned, including TLVs */ - if (subtlv_length%4 != 0) - subtlv_length+=4-(subtlv_length%4); - - tlv_length-=subtlv_length; - tptr+=subtlv_length; - - } - break; - - case LS_OPAQUE_TE_TLV_ROUTER: - if (tlv_length < 4) { - printf("\n\t TLV length %u < 4", tlv_length); - return(ls_end); - } - TCHECK2(*tptr, 4); - printf(", %s", ipaddr_string(tptr)); - break; - - default: - if (vflag <= 1) { - if(!print_unknown_data(tptr,"\n\t ",tlv_length)) - return(ls_end); - } - break; - } - tptr+=tlv_length; - } - break; - } - break; - default: - if (vflag <= 1) { - if(!print_unknown_data((u_int8_t *)lsap->lsa_un.un_unknown, - "\n\t ", ls_length)) + if (ospf_print_grace_lsa((u_int8_t *)(&lsap->lsa_un.un_grace_tlv.type), + ls_length) == -1) { return(ls_end); - } - break; + } + break; + + case LS_OPAQUE_TYPE_TE: + if (ospf_print_te_lsa((u_int8_t *)(&lsap->lsa_un.un_te_lsa_tlv.type), + ls_length) == -1) { + return(ls_end); + } + break; + + default: + if (vflag <= 1) { + if(!print_unknown_data((u_int8_t *)lsap->lsa_un.un_unknown, + "\n\t ", ls_length)) + return(ls_end); + } + break; + } } /* do we want to see an additionally hexdump ? */ @@ -745,6 +831,98 @@ ospf_print_lsa(register const struct lsa *lsap) return (NULL); } +static int +ospf_decode_lls(register const struct ospfhdr *op, + register u_int length) +{ + register const u_char *dptr; + register const u_char *dataend; + register u_int length2; + register u_int16_t lls_type, lls_len; + register u_int32_t lls_flags; + + switch (op->ospf_type) { + + case OSPF_TYPE_HELLO: + if (!(op->ospf_hello.hello_options & OSPF_OPTION_L)) + return (0); + break; + + case OSPF_TYPE_DD: + if (!(op->ospf_db.db_options & OSPF_OPTION_L)) + return (0); + break; + + default: + return (0); + } + + /* dig deeper if LLS data is available; see RFC4813 */ + length2 = EXTRACT_16BITS(&op->ospf_len); + dptr = (u_char *)op + length2; + dataend = (u_char *)op + length; + + if (EXTRACT_16BITS(&op->ospf_authtype) == OSPF_AUTH_MD5) { + dptr = dptr + op->ospf_authdata[3]; + length2 += op->ospf_authdata[3]; + } + if (length2 >= length) { + printf("\n\t[LLS truncated]"); + return (1); + } + TCHECK2(*dptr, 2); + printf("\n\t LLS: checksum: 0x%04x", (u_int)EXTRACT_16BITS(dptr)); + + dptr += 2; + TCHECK2(*dptr, 2); + length2 = EXTRACT_16BITS(dptr); + printf(", length: %u", length2); + + dptr += 2; + TCHECK(*dptr); + while (dptr < dataend) { + TCHECK2(*dptr, 2); + lls_type = EXTRACT_16BITS(dptr); + printf("\n\t %s (%u)", + tok2str(ospf_lls_tlv_values,"Unknown TLV",lls_type), + lls_type); + dptr += 2; + TCHECK2(*dptr, 2); + lls_len = EXTRACT_16BITS(dptr); + printf(", length: %u", lls_len); + dptr += 2; + switch (lls_type) { + + case OSPF_LLS_EO: + if (lls_len != 4) { + printf(" [should be 4]"); + lls_len = 4; + } + TCHECK2(*dptr, 4); + lls_flags = EXTRACT_32BITS(dptr); + printf("\n\t Options: 0x%08x [%s]", lls_flags, + bittok2str(ospf_lls_eo_options,"?",lls_flags)); + + break; + + case OSPF_LLS_MD5: + if (lls_len != 20) { + printf(" [should be 20]"); + lls_len = 20; + } + TCHECK2(*dptr, 4); + printf("\n\t Sequence number: 0x%08x", EXTRACT_32BITS(dptr)); + break; + } + + dptr += lls_len; + } + + return (0); +trunc: + return (1); +} + static int ospf_decode_v2(register const struct ospfhdr *op, register const u_char *dataend) @@ -765,11 +943,11 @@ ospf_decode_v2(register const struct ospfhdr *op, break; case OSPF_TYPE_HELLO: - printf("\n\tOptions: [%s]", + printf("\n\tOptions [%s]", bittok2str(ospf_option_values,"none",op->ospf_hello.hello_options)); TCHECK(op->ospf_hello.hello_deadint); - printf("\n\t Hello Timer: %us, Dead Timer %us, Mask: %s, Priority: %u", + printf("\n\t Hello Timer %us, Dead Timer %us, Mask %s, Priority %u", EXTRACT_16BITS(&op->ospf_hello.hello_helloint), EXTRACT_32BITS(&op->ospf_hello.hello_deadint), ipaddr_string(&op->ospf_hello.hello_mask), @@ -797,19 +975,23 @@ ospf_decode_v2(register const struct ospfhdr *op, case OSPF_TYPE_DD: TCHECK(op->ospf_db.db_options); - printf("\n\tOptions: [%s]", + printf("\n\tOptions [%s]", bittok2str(ospf_option_values,"none",op->ospf_db.db_options)); TCHECK(op->ospf_db.db_flags); - printf(", DD Flags: [%s]", + printf(", DD Flags [%s]", bittok2str(ospf_dd_flag_values,"none",op->ospf_db.db_flags)); + TCHECK(op->ospf_db.db_ifmtu); + if (op->ospf_db.db_ifmtu) { + printf(", MTU: %u", ntohs(op->ospf_db.db_ifmtu)); + } + TCHECK(op->ospf_db.db_seq); + printf(", Sequence: 0x%08x", EXTRACT_32BITS(&op->ospf_db.db_seq)); - if (vflag) { - /* Print all the LS adv's */ - lshp = op->ospf_db.db_lshdr; - while (ospf_print_lshdr(lshp) != -1) { - ++lshp; - } - } + /* Print all the LS adv's */ + lshp = op->ospf_db.db_lshdr; + while (((u_char *)lshp < dataend) && ospf_print_lshdr(lshp) != -1) { + ++lshp; + } break; case OSPF_TYPE_LS_REQ: @@ -863,7 +1045,6 @@ ospf_decode_v2(register const struct ospfhdr *op, break; default: - printf("v2 type (%d)", op->ospf_type); break; } return (0); @@ -892,25 +1073,30 @@ ospf_print(register const u_char *bp, register u_int length, /* value. If it's not valid, say so and return */ TCHECK(op->ospf_type); cp = tok2str(type2str, "unknown LS-type", op->ospf_type); - printf("OSPFv%u, %s, length: %u", + printf("OSPFv%u, %s, length %u", op->ospf_version, cp, length); if (*cp == 'u') return; - if(!vflag) /* non verbose - so lets bail out here */ + if(!vflag) { /* non verbose - so lets bail out here */ return; + } TCHECK(op->ospf_len); if (length != EXTRACT_16BITS(&op->ospf_len)) { printf(" [len %d]", EXTRACT_16BITS(&op->ospf_len)); - return; } - dataend = bp + length; + + if (length > EXTRACT_16BITS(&op->ospf_len)) { + dataend = bp + EXTRACT_16BITS(&op->ospf_len); + } else { + dataend = bp + length; + } TCHECK(op->ospf_routerid); - printf("\n\tRouter-ID: %s", ipaddr_string(&op->ospf_routerid)); + printf("\n\tRouter-ID %s", ipaddr_string(&op->ospf_routerid)); TCHECK(op->ospf_areaid); if (op->ospf_areaid.s_addr != 0) @@ -933,7 +1119,7 @@ ospf_print(register const u_char *bp, register u_int length, case OSPF_AUTH_SIMPLE: printf("\n\tSimple text password: "); - safeputs(op->ospf_authdata, OSPF_AUTH_SIMPLE_LEN); + safeputs((const char *)op->ospf_authdata, OSPF_AUTH_SIMPLE_LEN); break; case OSPF_AUTH_MD5: @@ -954,6 +1140,10 @@ ospf_print(register const u_char *bp, register u_int length, /* ospf version 2 */ if (ospf_decode_v2(op, dataend)) goto trunc; + if (length > EXTRACT_16BITS(&op->ospf_len)) { + if (ospf_decode_lls(op, length)) + goto trunc; + } break; default: diff --git a/print-ospf6.c b/print-ospf6.c index 6325a2192025..11004856705b 100644 --- a/print-ospf6.c +++ b/print-ospf6.c @@ -23,7 +23,7 @@ #ifndef lint static const char rcsid[] _U_ = - "@(#) $Header: /tcpdump/master/tcpdump/print-ospf6.c,v 1.13 2003/11/16 09:36:31 guy Exp $ (LBL)"; + "@(#) $Header: /tcpdump/master/tcpdump/print-ospf6.c,v 1.15 2006-09-13 06:31:11 guy Exp $ (LBL)"; #endif #ifdef HAVE_CONFIG_H @@ -39,188 +39,120 @@ static const char rcsid[] _U_ = #include "addrtoname.h" #include "extract.h" +#include "ospf.h" #include "ospf6.h" -struct bits { - u_int32_t bit; - const char *str; -}; - -static const struct bits ospf6_option_bits[] = { +static const struct tok ospf6_option_values[] = { { OSPF6_OPTION_V6, "V6" }, - { OSPF6_OPTION_E, "E" }, - { OSPF6_OPTION_MC, "MC" }, - { OSPF6_OPTION_N, "N" }, - { OSPF6_OPTION_R, "R" }, - { OSPF6_OPTION_DC, "DC" }, + { OSPF6_OPTION_E, "External" }, + { OSPF6_OPTION_MC, "Multicast" }, + { OSPF6_OPTION_N, "NSSA" }, + { OSPF6_OPTION_R, "Router" }, + { OSPF6_OPTION_DC, "Demand Circuit" }, { 0, NULL } }; -static const struct bits ospf6_rla_flag_bits[] = { - { RLA_FLAG_B, "B" }, - { RLA_FLAG_E, "E" }, - { RLA_FLAG_V, "V" }, - { RLA_FLAG_W, "W" }, +static const struct tok ospf6_rla_flag_values[] = { + { RLA_FLAG_B, "ABR" }, + { RLA_FLAG_E, "External" }, + { RLA_FLAG_V, "Virtual-Link Endpoint" }, + { RLA_FLAG_W, "Wildcard Receiver" }, + { RLA_FLAG_N, "NSSA Translator" }, { 0, NULL } }; -static const struct bits ospf6_asla_flag_bits[] = { - { ASLA_FLAG_EXTERNAL, "E" }, - { ASLA_FLAG_FWDADDR, "F" }, - { ASLA_FLAG_ROUTETAG, "T" }, +static const struct tok ospf6_asla_flag_values[] = { + { ASLA_FLAG_EXTERNAL, "External Type 2" }, + { ASLA_FLAG_FWDADDR, "Fforwarding" }, + { ASLA_FLAG_ROUTETAG, "Tag" }, { 0, NULL } }; -static struct tok type2str[] = { - { OSPF_TYPE_UMD, "umd" }, - { OSPF_TYPE_HELLO, "hello" }, - { OSPF_TYPE_DB, "dd" }, - { OSPF_TYPE_LSR, "ls_req" }, - { OSPF_TYPE_LSU, "ls_upd" }, - { OSPF_TYPE_LSA, "ls_ack" }, +static struct tok ospf6_type_values[] = { + { OSPF_TYPE_HELLO, "Hello" }, + { OSPF_TYPE_DD, "Database Description" }, + { OSPF_TYPE_LS_REQ, "LS-Request" }, + { OSPF_TYPE_LS_UPDATE, "LS-Update" }, + { OSPF_TYPE_LS_ACK, "LS-Ack" }, { 0, NULL } }; -static char tstr[] = " [|ospf]"; +static struct tok ospf6_lsa_values[] = { + { LS_TYPE_ROUTER, "Router" }, + { LS_TYPE_NETWORK, "Network" }, + { LS_TYPE_INTER_AP, "Inter-Area Prefix" }, + { LS_TYPE_INTER_AR, "Inter-Area Router" }, + { LS_TYPE_ASE, "External" }, + { LS_TYPE_GROUP, "Multicast Group" }, + { LS_TYPE_NSSA, "NSSA" }, + { LS_TYPE_LINK, "Link" }, + { LS_TYPE_INTRA_AP, "Intra-Area Prefix" }, + { LS_TYPE_INTRA_ATE, "Intra-Area TE" }, + { LS_TYPE_GRACE, "Grace" }, + { 0, NULL } +}; + +static struct tok ospf6_ls_scope_values[] = { + { LS_SCOPE_LINKLOCAL, "Link Local" }, + { LS_SCOPE_AREA, "Area Local" }, + { LS_SCOPE_AS, "Domain Wide" }, + { 0, NULL } +}; + +static struct tok ospf6_dd_flag_values[] = { + { OSPF6_DB_INIT, "Init" }, + { OSPF6_DB_MORE, "More" }, + { OSPF6_DB_MASTER, "Master" }, + { 0, NULL } +}; + +static struct tok ospf6_lsa_prefix_option_values[] = { + { LSA_PREFIX_OPT_NU, "No Unicast" }, + { LSA_PREFIX_OPT_LA, "Local address" }, + { LSA_PREFIX_OPT_MC, "Multicast" }, + { LSA_PREFIX_OPT_P, "Propagate" }, + { LSA_PREFIX_OPT_DN, "Down" }, + { 0, NULL } +}; + +static char tstr[] = " [|ospf3]"; #ifdef WIN32 #define inline __inline #endif /* WIN32 */ /* Forwards */ -static inline void ospf6_print_seqage(u_int32_t, time_t); -static inline void ospf6_print_bits(const struct bits *, u_char); -static void ospf6_print_ls_type(u_int, const rtrid_t *, - const rtrid_t *, const char *); -static int ospf6_print_lshdr(const struct lsa_hdr *); -static int ospf6_print_lsa(const struct lsa *); +static void ospf6_print_ls_type(u_int, const rtrid_t *); +static int ospf6_print_lshdr(const struct lsa6_hdr *); +static int ospf6_print_lsa(const struct lsa6 *); static int ospf6_decode_v3(const struct ospf6hdr *, const u_char *); -static inline void -ospf6_print_seqage(register u_int32_t seq, register time_t us) -{ - register time_t sec = us % 60; - register time_t mins = (us / 60) % 60; - register time_t hour = us / 3600; - - printf(" S %X age ", seq); - if (hour) - printf("%u:%02u:%02u", - (u_int32_t) hour, (u_int32_t) mins, (u_int32_t) sec); - else if (mins) - printf("%u:%02u", (u_int32_t) mins, (u_int32_t) sec); - else - printf("%u", (u_int32_t) sec); -} - - -static inline void -ospf6_print_bits(register const struct bits *bp, register u_char options) -{ - register char sep = ' '; - - do { - if (options & bp->bit) { - printf("%c%s", sep, bp->str); - sep = '/'; - } - } while ((++bp)->bit); -} static void -ospf6_print_ls_type(register u_int ls_type, - register const rtrid_t *ls_stateid, - register const rtrid_t *ls_router, register const char *fmt) +ospf6_print_ls_type(register u_int ls_type, register const rtrid_t *ls_stateid) { - const char *scope; - - switch (ls_type & LS_SCOPE_MASK) { - case LS_SCOPE_LINKLOCAL: - scope = "linklocal-"; - break; - case LS_SCOPE_AREA: - scope = "area-"; - break; - case LS_SCOPE_AS: - scope = "AS-"; - break; - default: - scope = ""; - break; - } - - switch (ls_type & LS_TYPE_MASK) { - case LS_TYPE_ROUTER: - printf(" %srtr %s", scope, ipaddr_string(ls_router)); - break; - - case LS_TYPE_NETWORK: - printf(" %snet dr %s if %s", scope, - ipaddr_string(ls_router), - ipaddr_string(ls_stateid)); - break; - - case LS_TYPE_INTER_AP: - printf(" %sinter-area-prefix %s abr %s", scope, - ipaddr_string(ls_stateid), - ipaddr_string(ls_router)); - break; - - case LS_TYPE_INTER_AR: - printf(" %sinter-area-router %s rtr %s", scope, - ipaddr_string(ls_router), - ipaddr_string(ls_stateid)); - break; - - case LS_TYPE_ASE: - printf(" %sase %s asbr %s", scope, - ipaddr_string(ls_stateid), - ipaddr_string(ls_router)); - break; - - case LS_TYPE_GROUP: - printf(" %sgroup %s rtr %s", scope, - ipaddr_string(ls_stateid), - ipaddr_string(ls_router)); - break; - - case LS_TYPE_TYPE7: - printf(" %stype7 %s rtr %s", scope, - ipaddr_string(ls_stateid), - ipaddr_string(ls_router)); - break; - - case LS_TYPE_LINK: - printf(" %slink %s rtr %s", scope, - ipaddr_string(ls_stateid), - ipaddr_string(ls_router)); - break; - - case LS_TYPE_INTRA_AP: - printf(" %sintra-area-prefix %s rtr %s", scope, - ipaddr_string(ls_stateid), - ipaddr_string(ls_router)); - break; - - default: - printf(" %s", scope); - printf(fmt, ls_type); - break; - } - + printf("\n\t %s LSA (%d), %s Scope%s, LSA-ID %s", + tok2str(ospf6_lsa_values, "Unknown", ls_type & LS_TYPE_MASK), + ls_type & LS_TYPE_MASK, + tok2str(ospf6_ls_scope_values, "Unknown", ls_type & LS_SCOPE_MASK), + ls_type &0x8000 ? ", transitive" : "", /* U-bit */ + ipaddr_string(ls_stateid)); } static int -ospf6_print_lshdr(register const struct lsa_hdr *lshp) +ospf6_print_lshdr(register const struct lsa6_hdr *lshp) { TCHECK(lshp->ls_type); - printf(" {"); /* } (ctags) */ - TCHECK(lshp->ls_seq); - ospf6_print_seqage(EXTRACT_32BITS(&lshp->ls_seq), EXTRACT_16BITS(&lshp->ls_age)); - ospf6_print_ls_type(EXTRACT_16BITS(&lshp->ls_type), &lshp->ls_stateid, - &lshp->ls_router, "ls_type %d"); + + printf("\n\t Advertising Router %s, seq 0x%08x, age %us, length %u", + ipaddr_string(&lshp->ls_router), + EXTRACT_32BITS(&lshp->ls_seq), + EXTRACT_16BITS(&lshp->ls_age), + EXTRACT_16BITS(&lshp->ls_length)-(u_int)sizeof(struct lsa6_hdr)); + + ospf6_print_ls_type(EXTRACT_16BITS(&lshp->ls_type), &lshp->ls_stateid); return (0); trunc: @@ -228,26 +160,28 @@ ospf6_print_lshdr(register const struct lsa_hdr *lshp) } static int -ospf6_print_lsaprefix(register const struct lsa_prefix *lsapp) +ospf6_print_lsaprefix(register const struct lsa6_prefix *lsapp) { - u_int k; + u_int wordlen; struct in6_addr prefix; TCHECK(*lsapp); - k = (lsapp->lsa_p_len + 31) / 32; - if (k * 4 > sizeof(struct in6_addr)) { - printf("??prefixlen %d??", lsapp->lsa_p_len); + wordlen = (lsapp->lsa_p_len + 31) / 32; + if (wordlen * 4 > sizeof(struct in6_addr)) { + printf(" bogus prefixlen /%d", lsapp->lsa_p_len); goto trunc; } memset(&prefix, 0, sizeof(prefix)); - memcpy(&prefix, lsapp->lsa_p_prefix, k * 4); - printf(" %s/%d", ip6addr_string(&prefix), + memcpy(&prefix, lsapp->lsa_p_prefix, wordlen * 4); + printf("\n\t\t%s/%d", ip6addr_string(&prefix), lsapp->lsa_p_len); - if (lsapp->lsa_p_opt) - printf("(opt=%x)", lsapp->lsa_p_opt); - if (lsapp->lsa_p_mbz) - printf("(mbz=%x)", EXTRACT_16BITS(&lsapp->lsa_p_mbz)); /* XXX */ - return sizeof(*lsapp) - 4 + k * 4; + if (lsapp->lsa_p_opt) { + printf(", Options [%s]", + bittok2str(ospf6_lsa_prefix_option_values, + "none", lsapp->lsa_p_opt)); + } + printf(", metric %u", EXTRACT_16BITS(&lsapp->lsa_p_metric)); + return sizeof(*lsapp) - 4 + wordlen * 4; trunc: return -1; @@ -258,10 +192,10 @@ ospf6_print_lsaprefix(register const struct lsa_prefix *lsapp) * Print a single link state advertisement. If truncated return 1, else 0. */ static int -ospf6_print_lsa(register const struct lsa *lsap) +ospf6_print_lsa(register const struct lsa6 *lsap) { register const u_char *ls_end, *ls_opt; - register const struct rlalink *rlp; + register const struct rlalink6 *rlp; #if 0 register const struct tos_metric *tosp; #endif @@ -271,102 +205,115 @@ ospf6_print_lsa(register const struct lsa *lsap) register const struct mcla *mcp; #endif register const struct llsa *llsap; - register const struct lsa_prefix *lsapp; + register const struct lsa6_prefix *lsapp; #if 0 register const u_int32_t *lp; #endif - register u_int j; - register int k; + register u_int prefixes; + register int bytelen, length, lsa_length; u_int32_t flags32; + u_int8_t *tptr; if (ospf6_print_lshdr(&lsap->ls_hdr)) return (1); TCHECK(lsap->ls_hdr.ls_length); - ls_end = (u_char *)lsap + EXTRACT_16BITS(&lsap->ls_hdr.ls_length); + length = EXTRACT_16BITS(&lsap->ls_hdr.ls_length); + lsa_length = length - sizeof(struct lsa6_hdr); + ls_end = (u_char *)lsap + length; + tptr = (u_int8_t *)lsap+sizeof(struct lsa6_hdr); + switch (EXTRACT_16BITS(&lsap->ls_hdr.ls_type)) { case LS_TYPE_ROUTER | LS_SCOPE_AREA: - TCHECK(lsap->lsa_un.un_rla.rla_flags); - ospf6_print_bits(ospf6_rla_flag_bits, - lsap->lsa_un.un_rla.rla_flags); TCHECK(lsap->lsa_un.un_rla.rla_options); - ospf6_print_bits(ospf6_option_bits, - EXTRACT_32BITS(&lsap->lsa_un.un_rla.rla_options)); + printf("\n\t Options [%s]", + bittok2str(ospf6_option_values, "none", + EXTRACT_32BITS(&lsap->lsa_un.un_rla.rla_options))); + + TCHECK(lsap->lsa_un.un_rla.rla_flags); + printf(", RLA-Flags [%s]", + bittok2str(ospf6_rla_flag_values, "none", + lsap->lsa_un.un_rla.rla_flags)); + TCHECK(lsap->lsa_un.un_rla.rla_link); rlp = lsap->lsa_un.un_rla.rla_link; - while (rlp + sizeof(*rlp) <= (struct rlalink *)ls_end) { + while (rlp + 1 <= (struct rlalink6 *)ls_end) { TCHECK(*rlp); - printf(" {"); /* } (ctags) */ switch (rlp->link_type) { case RLA_TYPE_VIRTUAL: - printf(" virt"); - /* Fall through */ + printf("\n\t Virtual Link: Neighbor Router-ID %s" + "\n\t Neighbor Interface-ID %s, Interface %s", + ipaddr_string(&rlp->link_nrtid), + ipaddr_string(&rlp->link_nifid), + ipaddr_string(&rlp->link_ifid)); + break; case RLA_TYPE_ROUTER: - printf(" nbrid %s nbrif %s if %s", - ipaddr_string(&rlp->link_nrtid), - ipaddr_string(&rlp->link_nifid), - ipaddr_string(&rlp->link_ifid)); + printf("\n\t Neighbor Router-ID %s" + "\n\t Neighbor Interface-ID %s, Interface %s", + ipaddr_string(&rlp->link_nrtid), + ipaddr_string(&rlp->link_nifid), + ipaddr_string(&rlp->link_ifid)); break; case RLA_TYPE_TRANSIT: - printf(" dr %s drif %s if %s", + printf("\n\t Neighbor Network-ID %s" + "\n\t Neighbor Interface-ID %s, Interface %s", ipaddr_string(&rlp->link_nrtid), ipaddr_string(&rlp->link_nifid), ipaddr_string(&rlp->link_ifid)); break; default: - /* { (ctags) */ - printf(" ??RouterLinksType 0x%02x?? }", + printf("\n\t Unknown Router Links Type 0x%02x", rlp->link_type); return (0); } - printf(" metric %d", EXTRACT_16BITS(&rlp->link_metric)); - /* { (ctags) */ - printf(" }"); + printf(", metric %d", EXTRACT_16BITS(&rlp->link_metric)); rlp++; } break; case LS_TYPE_NETWORK | LS_SCOPE_AREA: TCHECK(lsap->lsa_un.un_nla.nla_options); - ospf6_print_bits(ospf6_option_bits, - EXTRACT_32BITS(&lsap->lsa_un.un_nla.nla_options)); - printf(" rtrs"); + printf("\n\t Options [%s]", + bittok2str(ospf6_option_values, "none", + EXTRACT_32BITS(&lsap->lsa_un.un_nla.nla_options))); + printf("\n\t Connected Routers:"); ap = lsap->lsa_un.un_nla.nla_router; while ((u_char *)ap < ls_end) { TCHECK(*ap); - printf(" %s", ipaddr_string(ap)); + printf("\n\t\t%s", ipaddr_string(ap)); ++ap; } break; case LS_TYPE_INTER_AP | LS_SCOPE_AREA: TCHECK(lsap->lsa_un.un_inter_ap.inter_ap_metric); - printf(" metric %u", + printf(", metric %u", EXTRACT_32BITS(&lsap->lsa_un.un_inter_ap.inter_ap_metric) & SLA_MASK_METRIC); lsapp = lsap->lsa_un.un_inter_ap.inter_ap_prefix; - while (lsapp + sizeof(lsapp) <= (struct lsa_prefix *)ls_end) { - k = ospf6_print_lsaprefix(lsapp); - if (k) + while (lsapp + sizeof(lsapp) <= (struct lsa6_prefix *)ls_end) { + bytelen = ospf6_print_lsaprefix(lsapp); + if (bytelen) goto trunc; - lsapp = (struct lsa_prefix *)(((u_char *)lsapp) + k); + lsapp = (struct lsa6_prefix *)(((u_char *)lsapp) + bytelen); } break; case LS_SCOPE_AS | LS_TYPE_ASE: TCHECK(lsap->lsa_un.un_asla.asla_metric); flags32 = EXTRACT_32BITS(&lsap->lsa_un.un_asla.asla_metric); - ospf6_print_bits(ospf6_asla_flag_bits, flags32); + printf("\n\t Flags [%s]", + bittok2str(ospf6_asla_flag_values, "none", flags32)); printf(" metric %u", EXTRACT_32BITS(&lsap->lsa_un.un_asla.asla_metric) & ASLA_MASK_METRIC); lsapp = lsap->lsa_un.un_asla.asla_prefix; - k = ospf6_print_lsaprefix(lsapp); - if (k < 0) + bytelen = ospf6_print_lsaprefix(lsapp); + if (bytelen < 0) goto trunc; - if ((ls_opt = (u_char *)(((u_char *)lsapp) + k)) < ls_end) { + if ((ls_opt = (u_char *)(((u_char *)lsapp) + bytelen)) < ls_end) { struct in6_addr *fwdaddr6; if ((flags32 & ASLA_FLAG_FWDADDR) != 0) { @@ -386,7 +333,7 @@ ospf6_print_lsa(register const struct lsa *lsap) ls_opt += sizeof(u_int32_t); } - if (lsapp->lsa_p_mbz) { + if (lsapp->lsa_p_metric) { TCHECK(*(u_int32_t *)ls_opt); printf(" RefLSID: %s", ipaddr_string((u_int32_t *)ls_opt)); @@ -395,64 +342,30 @@ ospf6_print_lsa(register const struct lsa *lsap) } } break; -#if 0 - case LS_TYPE_SUM_ABR: - TCHECK(lsap->lsa_un.un_sla.sla_tosmetric); - lp = lsap->lsa_un.un_sla.sla_tosmetric; - while ((u_char *)lp < ls_end) { - register u_int32_t ul; - - TCHECK(*lp); - ul = EXTRACT_32BITS(lp); - printf(" tos %d metric %d", - (ul & SLA_MASK_TOS) >> SLA_SHIFT_TOS, - ul & SLA_MASK_METRIC); - ++lp; - } - break; - - case LS_TYPE_GROUP: - /* Multicast extensions as of 23 July 1991 */ - mcp = lsap->lsa_un.un_mcla; - while ((u_char *)mcp < ls_end) { - TCHECK(mcp->mcla_vid); - switch (EXTRACT_32BITS(&mcp->mcla_vtype)) { - - case MCLA_VERTEX_ROUTER: - printf(" rtr rtrid %s", - ipaddr_string(&mcp->mcla_vid)); - break; - - case MCLA_VERTEX_NETWORK: - printf(" net dr %s", - ipaddr_string(&mcp->mcla_vid)); - break; - - default: - printf(" ??VertexType %u??", - EXTRACT_32BITS(&mcp->mcla_vtype)); - break; - } - ++mcp; - } -#endif case LS_TYPE_LINK: /* Link LSA */ llsap = &lsap->lsa_un.un_llsa; TCHECK(llsap->llsa_options); - ospf6_print_bits(ospf6_option_bits, EXTRACT_32BITS(&llsap->llsa_options)); + printf("\n\t Options [%s]", + bittok2str(ospf6_option_values, "none", + EXTRACT_32BITS(&llsap->llsa_options))); TCHECK(llsap->llsa_nprefix); - printf(" pri %d lladdr %s npref %d", llsap->llsa_priority, - ip6addr_string(&llsap->llsa_lladdr), - EXTRACT_32BITS(&llsap->llsa_nprefix)); - lsapp = llsap->llsa_prefix; - for (j = 0; j < EXTRACT_32BITS(&llsap->llsa_nprefix); j++) { - k = ospf6_print_lsaprefix(lsapp); - if (k) - goto trunc; - lsapp = (struct lsa_prefix *)(((u_char *)lsapp) + k); - } + prefixes = EXTRACT_32BITS(&llsap->llsa_nprefix); + printf("\n\t Priority %d, Link-local address %s, Prefixes %d:", + llsap->llsa_priority, + ip6addr_string(&llsap->llsa_lladdr), + prefixes); + + tptr = (u_int8_t *)llsap->llsa_prefix; + while (prefixes > 0) { + lsapp = (struct lsa6_prefix *)tptr; + if ((bytelen = ospf6_print_lsaprefix(lsapp)) == -1) { + goto trunc; + } + prefixes--; + tptr += bytelen; + } break; case LS_TYPE_INTRA_AP | LS_SCOPE_AREA: @@ -460,34 +373,46 @@ ospf6_print_lsa(register const struct lsa *lsap) TCHECK(lsap->lsa_un.un_intra_ap.intra_ap_rtid); ospf6_print_ls_type( EXTRACT_16BITS(&lsap->lsa_un.un_intra_ap.intra_ap_lstype), - &lsap->lsa_un.un_intra_ap.intra_ap_lsid, - &lsap->lsa_un.un_intra_ap.intra_ap_rtid, - "LinkStateType %d"); + &lsap->lsa_un.un_intra_ap.intra_ap_lsid); TCHECK(lsap->lsa_un.un_intra_ap.intra_ap_nprefix); - printf(" npref %d", - EXTRACT_16BITS(&lsap->lsa_un.un_intra_ap.intra_ap_nprefix)); + prefixes = EXTRACT_16BITS(&lsap->lsa_un.un_intra_ap.intra_ap_nprefix); + printf("\n\t Prefixes %d:", prefixes); - lsapp = lsap->lsa_un.un_intra_ap.intra_ap_prefix; - for (j = 0; - j < EXTRACT_16BITS(&lsap->lsa_un.un_intra_ap.intra_ap_nprefix); - j++) { - k = ospf6_print_lsaprefix(lsapp); - if (k) - goto trunc; - lsapp = (struct lsa_prefix *)(((u_char *)lsapp) + k); - } + tptr = (u_int8_t *)lsap->lsa_un.un_intra_ap.intra_ap_prefix; + + while (prefixes > 0) { + lsapp = (struct lsa6_prefix *)tptr; + if ((bytelen = ospf6_print_lsaprefix(lsapp)) == -1) { + goto trunc; + } + prefixes--; + tptr += bytelen; + } break; + case LS_TYPE_GRACE | LS_SCOPE_LINKLOCAL: + if (ospf_print_grace_lsa(tptr, lsa_length) == -1) { + return 1; + } + + break; + + case LS_TYPE_INTRA_ATE | LS_SCOPE_LINKLOCAL: + if (ospf_print_te_lsa(tptr, lsa_length) == -1) { + return 1; + } + break; + default: - printf(" ??LinkStateType 0x%04x??", - EXTRACT_16BITS(&lsap->ls_hdr.ls_type)); + if(!print_unknown_data(tptr, + "\n\t ", + lsa_length)) { + return (1); + } } - /* { (ctags) */ - fputs(" }", stdout); return (0); trunc: - fputs(" }", stdout); return (1); } @@ -496,103 +421,80 @@ ospf6_decode_v3(register const struct ospf6hdr *op, register const u_char *dataend) { register const rtrid_t *ap; - register const struct lsr *lsrp; - register const struct lsa_hdr *lshp; - register const struct lsa *lsap; - register char sep; + register const struct lsr6 *lsrp; + register const struct lsa6_hdr *lshp; + register const struct lsa6 *lsap; register int i; switch (op->ospf6_type) { - case OSPF_TYPE_UMD: - /* - * Rob Coltun's special monitoring packets; - * do nothing - */ - break; - case OSPF_TYPE_HELLO: - if (vflag) { - TCHECK(op->ospf6_hello.hello_deadint); - ospf6_print_bits(ospf6_option_bits, - EXTRACT_32BITS(&op->ospf6_hello.hello_options)); - printf(" ifid %s pri %d int %d dead %u", - ipaddr_string(&op->ospf6_hello.hello_ifid), - op->ospf6_hello.hello_priority, - EXTRACT_16BITS(&op->ospf6_hello.hello_helloint), - EXTRACT_16BITS(&op->ospf6_hello.hello_deadint)); - } + printf("\n\tOptions [%s]", + bittok2str(ospf6_option_values, "none", + EXTRACT_32BITS(&op->ospf6_hello.hello_options))); + + TCHECK(op->ospf6_hello.hello_deadint); + printf("\n\t Hello Timer %us, Dead Timer %us, Interface-ID %s, Priority %u", + EXTRACT_16BITS(&op->ospf6_hello.hello_helloint), + EXTRACT_16BITS(&op->ospf6_hello.hello_deadint), + ipaddr_string(&op->ospf6_hello.hello_ifid), + op->ospf6_hello.hello_priority); + TCHECK(op->ospf6_hello.hello_dr); if (op->ospf6_hello.hello_dr != 0) - printf(" dr %s", + printf("\n\t Designated Router %s", ipaddr_string(&op->ospf6_hello.hello_dr)); TCHECK(op->ospf6_hello.hello_bdr); if (op->ospf6_hello.hello_bdr != 0) - printf(" bdr %s", + printf(", Backup Designated Router %s", ipaddr_string(&op->ospf6_hello.hello_bdr)); if (vflag) { - printf(" nbrs"); + printf("\n\t Neighbor List:"); ap = op->ospf6_hello.hello_neighbor; while ((u_char *)ap < dataend) { TCHECK(*ap); - printf(" %s", ipaddr_string(ap)); + printf("\n\t %s", ipaddr_string(ap)); ++ap; } } break; /* HELLO */ - case OSPF_TYPE_DB: + case OSPF_TYPE_DD: TCHECK(op->ospf6_db.db_options); - ospf6_print_bits(ospf6_option_bits, - EXTRACT_32BITS(&op->ospf6_db.db_options)); - sep = ' '; + printf("\n\tOptions [%s]", + bittok2str(ospf6_option_values, "none", + EXTRACT_32BITS(&op->ospf6_db.db_options))); TCHECK(op->ospf6_db.db_flags); - if (op->ospf6_db.db_flags & OSPF6_DB_INIT) { - printf("%cI", sep); - sep = '/'; - } - if (op->ospf6_db.db_flags & OSPF6_DB_MORE) { - printf("%cM", sep); - sep = '/'; - } - if (op->ospf6_db.db_flags & OSPF6_DB_MASTER) { - printf("%cMS", sep); - sep = '/'; - } + printf(", DD Flags [%s]", + bittok2str(ospf6_dd_flag_values,"none",op->ospf6_db.db_flags)); + TCHECK(op->ospf6_db.db_seq); - printf(" mtu %u S %X", EXTRACT_16BITS(&op->ospf6_db.db_mtu), - EXTRACT_32BITS(&op->ospf6_db.db_seq)); + printf(", MTU %u, DD-Sequence 0x%08x", + EXTRACT_16BITS(&op->ospf6_db.db_mtu), + EXTRACT_32BITS(&op->ospf6_db.db_seq)); - if (vflag) { - /* Print all the LS adv's */ - lshp = op->ospf6_db.db_lshdr; - - while (!ospf6_print_lshdr(lshp)) { - /* { (ctags) */ - printf(" }"); - ++lshp; - } - } + /* Print all the LS adv's */ + lshp = op->ospf6_db.db_lshdr; + while (!ospf6_print_lshdr(lshp)) { + ++lshp; + } break; - case OSPF_TYPE_LSR: + case OSPF_TYPE_LS_REQ: if (vflag) { lsrp = op->ospf6_lsr; while ((u_char *)lsrp < dataend) { TCHECK(*lsrp); - printf(" {"); /* } (ctags) */ + printf("\n\t Advertising Router %s", + ipaddr_string(&lsrp->ls_router)); ospf6_print_ls_type(EXTRACT_16BITS(&lsrp->ls_type), - &lsrp->ls_stateid, - &lsrp->ls_router, - "LinkStateType %d"); - /* { (ctags) */ - printf(" }"); + &lsrp->ls_stateid); ++lsrp; } } break; - case OSPF_TYPE_LSU: + case OSPF_TYPE_LS_UPDATE: if (vflag) { lsap = op->ospf6_lsu.lsu_lsa; TCHECK(op->ospf6_lsu.lsu_count); @@ -600,27 +502,24 @@ ospf6_decode_v3(register const struct ospf6hdr *op, while (i--) { if (ospf6_print_lsa(lsap)) goto trunc; - lsap = (struct lsa *)((u_char *)lsap + + lsap = (struct lsa6 *)((u_char *)lsap + EXTRACT_16BITS(&lsap->ls_hdr.ls_length)); } } break; - case OSPF_TYPE_LSA: + case OSPF_TYPE_LS_ACK: if (vflag) { lshp = op->ospf6_lsa.lsa_lshdr; while (!ospf6_print_lshdr(lshp)) { - /* { (ctags) */ - printf(" }"); ++lshp; } } break; default: - printf("v3 type %d", op->ospf6_type); break; } return (0); @@ -640,10 +539,15 @@ ospf6_print(register const u_char *bp, register u_int length) /* If the type is valid translate it, or just print the type */ /* value. If it's not valid, say so and return */ TCHECK(op->ospf6_type); - cp = tok2str(type2str, "type%d", op->ospf6_type); - printf("OSPFv%d-%s %d:", op->ospf6_version, cp, length); - if (*cp == 't') + cp = tok2str(ospf6_type_values, "unknown LS-type", op->ospf6_type); + printf("OSPFv%u, %s, length %d", op->ospf6_version, cp, length); + if (*cp == 'u') { return; + } + + if(!vflag) { /* non verbose - so lets bail out here */ + return; + } TCHECK(op->ospf6_len); if (length != EXTRACT_16BITS(&op->ospf6_len)) { @@ -654,16 +558,16 @@ ospf6_print(register const u_char *bp, register u_int length) /* Print the routerid if it is not the same as the source */ TCHECK(op->ospf6_routerid); - printf(" rtrid %s", ipaddr_string(&op->ospf6_routerid)); + printf("\n\tRouter-ID %s", ipaddr_string(&op->ospf6_routerid)); TCHECK(op->ospf6_areaid); if (op->ospf6_areaid != 0) - printf(" area %s", ipaddr_string(&op->ospf6_areaid)); + printf(", Area %s", ipaddr_string(&op->ospf6_areaid)); else - printf(" backbone"); + printf(", Backbone Area"); TCHECK(op->ospf6_instanceid); if (op->ospf6_instanceid) - printf(" instance %u", op->ospf6_instanceid); + printf(", Instance %u", op->ospf6_instanceid); /* Do rest according to version. */ switch (op->ospf6_version) { diff --git a/print-pflog.c b/print-pflog.c index dd9ba495e9b6..972cb4b1328c 100644 --- a/print-pflog.c +++ b/print-pflog.c @@ -21,7 +21,7 @@ #ifndef lint static const char rcsid[] _U_ = - "@(#) $Header: /tcpdump/master/tcpdump/print-pflog.c,v 1.13.2.4 2007/09/13 17:18:10 gianluca Exp $ (LBL)"; + "@(#) $Header: /tcpdump/master/tcpdump/print-pflog.c,v 1.16 2007-09-12 19:36:18 guy Exp $ (LBL)"; #endif #ifdef HAVE_CONFIG_H @@ -31,17 +31,12 @@ static const char rcsid[] _U_ = #ifndef HAVE_NET_PFVAR_H #error "No pf headers available" #endif - #include -#ifndef WIN32 #include -#endif #include #include #include - - #include #include diff --git a/print-pgm.c b/print-pgm.c index edaf93333e74..73a42914c7bd 100644 --- a/print-pgm.c +++ b/print-pgm.c @@ -15,7 +15,7 @@ #ifndef lint static const char rcsid[] _U_ = - "@(#) $Header: /tcpdump/master/tcpdump/print-pgm.c,v 1.1.2.5 2005/06/07 22:06:16 guy Exp $"; + "@(#) $Header: /tcpdump/master/tcpdump/print-pgm.c,v 1.5 2005-06-07 22:05:58 guy Exp $"; #endif #ifdef HAVE_CONFIG_H diff --git a/print-pim.c b/print-pim.c index 39c4e4d73835..774096e2f934 100644 --- a/print-pim.c +++ b/print-pim.c @@ -21,7 +21,7 @@ #ifndef lint static const char rcsid[] _U_ = - "@(#) $Header: /tcpdump/master/tcpdump/print-pim.c,v 1.45.2.4 2006/02/13 01:32:34 hannes Exp $ (LBL)"; + "@(#) $Header: /tcpdump/master/tcpdump/print-pim.c,v 1.49 2006-02-13 01:31:35 hannes Exp $ (LBL)"; #endif #ifdef HAVE_CONFIG_H diff --git a/print-ppp.c b/print-ppp.c index 1e99c15f1885..708e934fd829 100644 --- a/print-ppp.c +++ b/print-ppp.c @@ -31,7 +31,7 @@ #ifndef lint static const char rcsid[] _U_ = - "@(#) $Header: /tcpdump/master/tcpdump/print-ppp.c,v 1.108.2.6 2005/12/05 11:40:36 hannes Exp $ (LBL)"; + "@(#) $Header: /tcpdump/master/tcpdump/print-ppp.c,v 1.114 2005-12-05 11:35:58 hannes Exp $ (LBL)"; #endif #ifdef HAVE_CONFIG_H diff --git a/print-pppoe.c b/print-pppoe.c index 229b5eef60af..7abc787832e3 100644 --- a/print-pppoe.c +++ b/print-pppoe.c @@ -23,7 +23,7 @@ #ifndef lint static const char rcsid[] _U_ = -"@(#) $Header: /tcpdump/master/tcpdump/print-pppoe.c,v 1.30.2.1 2005/04/26 19:48:56 guy Exp $ (LBL)"; +"@(#) $Header: /tcpdump/master/tcpdump/print-pppoe.c,v 1.31 2005-04-26 19:48:38 guy Exp $ (LBL)"; #endif #ifdef HAVE_CONFIG_H diff --git a/print-pptp.c b/print-pptp.c index d400589300f7..2fbba6211e24 100644 --- a/print-pptp.c +++ b/print-pptp.c @@ -24,7 +24,7 @@ #ifndef lint static const char rcsid[] _U_ = - "@(#) $Header: /tcpdump/master/tcpdump/print-pptp.c,v 1.11.2.1 2006/06/23 02:07:27 hannes Exp $"; + "@(#) $Header: /tcpdump/master/tcpdump/print-pptp.c,v 1.12 2006-06-23 02:03:09 hannes Exp $"; #endif #ifdef HAVE_CONFIG_H diff --git a/print-radius.c b/print-radius.c index 203c50bd06ab..44f0c7fce9ce 100644 --- a/print-radius.c +++ b/print-radius.c @@ -44,7 +44,7 @@ #ifndef lint static const char rcsid[] _U_ = - "$Id: print-radius.c,v 1.27.2.1 2005/09/26 01:02:40 guy Exp $"; + "$Id: print-radius.c,v 1.28 2005-09-26 01:01:55 guy Exp $"; #endif #ifdef HAVE_CONFIG_H diff --git a/print-raw.c b/print-raw.c index 0fe6dd1947b3..8e376ce52ccc 100644 --- a/print-raw.c +++ b/print-raw.c @@ -21,7 +21,7 @@ #ifndef lint static const char rcsid[] _U_ = - "@(#) $Header: /tcpdump/master/tcpdump/print-raw.c,v 1.41 2003/11/16 09:36:34 guy Exp $ (LBL)"; + "@(#) $Header: /tcpdump/master/tcpdump/print-raw.c,v 1.41 2003-11-16 09:36:34 guy Exp $ (LBL)"; #endif #ifdef HAVE_CONFIG_H diff --git a/print-rip.c b/print-rip.c index 772a2e056c7e..27446a682363 100644 --- a/print-rip.c +++ b/print-rip.c @@ -21,7 +21,7 @@ #ifndef lint static const char rcsid[] _U_ = - "@(#) $Header: /tcpdump/master/tcpdump/print-rip.c,v 1.57 2003/11/16 09:36:34 guy Exp $ (LBL)"; + "@(#) $Header: /tcpdump/master/tcpdump/print-rip.c,v 1.59 2006-03-23 14:58:44 hannes Exp $ (LBL)"; #endif #ifdef HAVE_CONFIG_H @@ -37,6 +37,8 @@ static const char rcsid[] _U_ = #include "addrtoname.h" #include "extract.h" /* must come after interface.h */ +#include "af.h" + struct rip { u_int8_t rip_cmd; /* request/response */ u_int8_t rip_vers; /* protocol version # */ @@ -100,8 +102,8 @@ rip_entry_print_v1(register const struct rip_netinfo *ni) /* RFC 1058 */ family = EXTRACT_16BITS(&ni->rip_family); - if (family != AF_INET) { - printf("\n\t AFI: %u:", family); + if (family != BSD_AFNUM_INET) { + printf("\n\t AFI %s, ", tok2str(bsd_af_values, "Unknown (%u)", family)); print_unknown_data((u_int8_t *)&ni->rip_family,"\n\t ",RIP_ROUTELEN); return; } @@ -111,7 +113,7 @@ rip_entry_print_v1(register const struct rip_netinfo *ni) /* MBZ fields not zero */ print_unknown_data((u_int8_t *)&ni->rip_family,"\n\t ",RIP_ROUTELEN); return; - } /* AF_INET */ + } /* BSD_AFNUM_INET */ printf("\n\t %s, metric: %u", ipaddr_string(&ni->rip_dest), EXTRACT_32BITS(&ni->rip_metric)); @@ -139,12 +141,13 @@ rip_entry_print_v2(register const struct rip_netinfo *ni) EXTRACT_16BITS(&ni->rip_tag)); print_unknown_data((u_int8_t *)&ni->rip_dest,"\n\t ",RIP_AUTHLEN); } - } else if (family != AF_INET) { - printf("\n\t AFI: %u", family); + } else if (family != BSD_AFNUM_INET) { + printf("\n\t AFI %s", tok2str(bsd_af_values, "Unknown (%u)", family)); print_unknown_data((u_int8_t *)&ni->rip_tag,"\n\t ",RIP_ROUTELEN-2); return; - } else { /* AF_INET */ - printf("\n\t AFI: IPv4: %15s/%-2d, tag 0x%04x, metric: %u, next-hop: ", + } else { /* BSD_AFNUM_INET */ + printf("\n\t AFI %s, %15s/%-2d, tag 0x%04x, metric: %u, next-hop: ", + tok2str(bsd_af_values, "Unknown (%u)", family), ipaddr_string(&ni->rip_dest), mask2plen(EXTRACT_32BITS(&ni->rip_dest_mask)), EXTRACT_16BITS(&ni->rip_tag), diff --git a/print-ripng.c b/print-ripng.c index 5e7a02ecc413..cef39daf1e0c 100644 --- a/print-ripng.c +++ b/print-ripng.c @@ -21,7 +21,7 @@ #ifndef lint static const char rcsid[] _U_ = - "@(#) $Header: /tcpdump/master/tcpdump/print-ripng.c,v 1.18 2005/01/04 00:15:54 guy Exp $"; + "@(#) $Header: /tcpdump/master/tcpdump/print-ripng.c,v 1.18 2005-01-04 00:15:54 guy Exp $"; #endif #ifdef HAVE_CONFIG_H diff --git a/print-rrcp.c b/print-rrcp.c new file mode 100644 index 000000000000..dc3045793be9 --- /dev/null +++ b/print-rrcp.c @@ -0,0 +1,137 @@ +/* + * Copyright (c) 2007 - Andrey "nording" Chernyak + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that: (1) source code distributions + * retain the above copyright notice and this paragraph in its entirety, (2) + * distributions including binary code include the above copyright notice and + * this paragraph in its entirety in the documentation or other materials + * provided with the distribution, and (3) all advertising materials mentioning + * features or use of this software display the following acknowledgement: + * ``This product includes software developed by the University of California, + * Lawrence Berkeley Laboratory and its contributors.'' Neither the name of + * the University nor the names of its contributors may be used to endorse + * or promote products derived from this software without specific prior + * written permission. + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * Format and print Realtek Remote Control Protocol (RRCP) + * and Realtek Echo Protocol (RRCP-REP) packets. + */ + +#ifndef lint +static const char rcsid[] _U_ = + "@(#) $Header: /tcpdump/master/tcpdump/print-rrcp.c,v 1.1.2.2 2008-04-11 17:00:00 gianluca Exp $"; +#endif + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include + +#include +#include + +#include "netdissect.h" +#include "addrtoname.h" +#include "extract.h" +#include "ether.h" + +#ifndef ETH_ALEN +#define ETH_ALEN 6 +#endif + +struct rrcp_packet_t +{ + u_int16_t rrcp_ethertype; /* 0x8899 */ + u_int8_t rrcp_proto; /* must be 0x01 */ + u_int8_t rrcp_opcode:7; /* 0x00 = hello, 0x01 = get, 0x02 = set */ + u_int8_t rrcp_isreply:1; /* 0 = request to switch, 1 = reply from switch */ + u_int16_t rrcp_authkey; /* 0x2379 by default */ + u_int16_t rrcp_reg_addr; /* register address */ + u_int32_t rrcp_reg_data; /* register data */ + u_int32_t cookie1; + u_int32_t cookie2; +}; + +struct rrcp_helloreply_packet_t +{ + u_int16_t rrcp_ethertype; /* 0x8899 */ + u_int8_t rrcp_proto; /* must be 0x01 */ + u_int8_t rrcp_opcode:7; /* 0x00 = hello, 0x01 = get, 0x02 = set */ + u_int8_t rrcp_isreply:1; /* 0 = request to switch, 1 = reply from switch */ + u_int16_t rrcp_authkey; /* 0x2379 by default */ + u_int8_t rrcp_downlink_port; /* */ + u_int8_t rrcp_uplink_port; /* */ + u_int8_t rrcp_uplink_mac[ETH_ALEN]; /* */ + u_int16_t rrcp_chip_id; /* */ + u_int32_t rrcp_vendor_id; /* */ +}; + + +/* + * Print RRCP requests + */ +void +rrcp_print(netdissect_options *ndo, + register const u_char *cp, + u_int length _U_) +{ + const struct rrcp_packet_t *rrcp; + const struct rrcp_helloreply_packet_t *rrcp_hello; + register const struct ether_header *ep; + char proto_str[16]; + char opcode_str[32]; + + ep = (const struct ether_header *)cp; + rrcp = (const struct rrcp_packet_t *)(cp+12); + rrcp_hello = (const struct rrcp_helloreply_packet_t *)(cp+12); + + if (rrcp->rrcp_proto==1){ + strcpy(proto_str,"RRCP"); + }else if ( rrcp->rrcp_proto==2 ){ + strcpy(proto_str,"RRCP-REP"); + }else{ + sprintf(proto_str,"RRCP-0x%02d",rrcp->rrcp_proto); + } + if (rrcp->rrcp_opcode==0){ + strcpy(opcode_str,"hello"); + }else if ( rrcp->rrcp_opcode==1 ){ + strcpy(opcode_str,"get"); + }else if ( rrcp->rrcp_opcode==2 ){ + strcpy(opcode_str,"set"); + }else{ + sprintf(opcode_str,"unknown opcode (0x%02d)",rrcp->rrcp_opcode); + } + ND_PRINT((ndo, "%s > %s, %s %s", + etheraddr_string(ESRC(ep)), + etheraddr_string(EDST(ep)), + proto_str, rrcp->rrcp_isreply ? "reply" : "query")); + if (rrcp->rrcp_proto==1){ + ND_PRINT((ndo, ": %s", opcode_str)); + } + if (rrcp->rrcp_opcode==1 || rrcp->rrcp_opcode==2){ + ND_PRINT((ndo, " addr=0x%04x, data=0x%04x", + rrcp->rrcp_reg_addr, rrcp->rrcp_reg_data, rrcp->rrcp_authkey)); + } + if (rrcp->rrcp_proto==1){ + ND_PRINT((ndo, ", auth=0x%04x", + ntohs(rrcp->rrcp_authkey))); + } + if (rrcp->rrcp_proto==1 && rrcp->rrcp_opcode==0 && rrcp->rrcp_isreply){ + ND_PRINT((ndo, " downlink_port=%d, uplink_port=%d, uplink_mac=%s, vendor_id=%08x ,chip_id=%04x ", + rrcp_hello->rrcp_downlink_port, + rrcp_hello->rrcp_uplink_port, + etheraddr_string(rrcp_hello->rrcp_uplink_mac), + rrcp_hello->rrcp_vendor_id, + rrcp_hello->rrcp_chip_id)); + }else if (rrcp->rrcp_opcode==1 || rrcp->rrcp_opcode==2 || rrcp->rrcp_proto==2){ + ND_PRINT((ndo, ", cookie=0x%08x%08x ", + rrcp->cookie2, rrcp->cookie1)); + } + if (!ndo->ndo_vflag) + return; +} diff --git a/print-rsvp.c b/print-rsvp.c index ad519305fa81..5ed731c3dec0 100644 --- a/print-rsvp.c +++ b/print-rsvp.c @@ -17,7 +17,7 @@ #ifndef lint static const char rcsid[] _U_ = - "@(#) $Header: /tcpdump/master/tcpdump/print-rsvp.c,v 1.33.2.15 2007/09/13 17:33:54 guy Exp $"; + "@(#) $Header: /tcpdump/master/tcpdump/print-rsvp.c,v 1.48 2007-09-13 17:29:50 guy Exp $"; #endif #ifdef HAVE_CONFIG_H diff --git a/print-rt6.c b/print-rt6.c index 39e22aeaa278..dc196b4e766a 100644 --- a/print-rt6.c +++ b/print-rt6.c @@ -21,7 +21,7 @@ #ifndef lint static const char rcsid[] _U_ = - "@(#) $Header: /tcpdump/master/tcpdump/print-rt6.c,v 1.26.2.1 2005/04/20 22:35:11 guy Exp $"; + "@(#) $Header: /tcpdump/master/tcpdump/print-rt6.c,v 1.27 2005-04-20 22:34:57 guy Exp $"; #endif #ifdef HAVE_CONFIG_H diff --git a/print-rx.c b/print-rx.c index d99106660ee7..3812a120fc69 100644 --- a/print-rx.c +++ b/print-rx.c @@ -34,7 +34,7 @@ #ifndef lint static const char rcsid[] _U_ = - "@(#) $Header: /tcpdump/master/tcpdump/print-rx.c,v 1.37.2.2 2007/06/15 19:43:15 guy Exp $"; + "@(#) $Header: /tcpdump/master/tcpdump/print-rx.c,v 1.39.2.3 2008-07-01 07:45:09 guy Exp $"; #endif #ifdef HAVE_CONFIG_H @@ -118,6 +118,12 @@ static struct tok fs_req[] = { { 162, "dfs-flushcps" }, { 163, "dfs-symlink" }, { 220, "residency" }, + { 65536, "inline-bulk-status" }, + { 65537, "fetch-data-64" }, + { 65538, "store-data-64" }, + { 65539, "give-up-all-cbs" }, + { 65540, "get-caps" }, + { 65541, "cb-rx-conn-addr" }, { 0, NULL }, }; @@ -137,6 +143,9 @@ static struct tok cb_req[] = { { 216, "getcellservdb" }, { 217, "getlocalcell" }, { 218, "getcacheconf" }, + { 65536, "getce64" }, + { 65537, "getcellbynum" }, + { 65538, "tellmeaboutyourself" }, { 0, NULL }, }; @@ -163,6 +172,7 @@ static struct tok pt_req[] = { { 519, "get-host-cps" }, { 520, "update-entry" }, { 521, "list-entries" }, + { 530, "list-super-groups" }, { 0, NULL }, }; @@ -256,6 +266,9 @@ static struct tok vol_req[] = { { 126, "set-info" }, { 127, "x-list-partitions" }, { 128, "forward-multiple" }, + { 65536, "convert-ro" }, + { 65537, "get-size" }, + { 65538, "dump-v2" }, { 0, NULL }, }; @@ -307,6 +320,8 @@ static struct tok ubik_req[] = { { 10003, "vote-getsyncsite" }, { 10004, "vote-debug" }, { 10005, "vote-sdebug" }, + { 10006, "vote-xdebug" }, + { 10007, "vote-xsdebug" }, { 20000, "disk-begin" }, { 20001, "disk-commit" }, { 20002, "disk-lock" }, @@ -325,7 +340,7 @@ static struct tok ubik_req[] = { }; #define VOTE_LOW 10000 -#define VOTE_HIGH 10005 +#define VOTE_HIGH 10007 #define DISK_LOW 20000 #define DISK_HIGH 20013 @@ -688,6 +703,13 @@ rx_cache_find(const struct rx_header *rxh, const struct ip *ip, int sport, printf(" %lu", i); \ } +#define UINT64OUT() { u_int64_t i; \ + TCHECK2(bp[0], sizeof(u_int64_t)); \ + i = EXTRACT_64BITS(bp); \ + bp += sizeof(u_int64_t); \ + printf(" %" PRIu64, i); \ + } + #define DATEOUT() { time_t t; struct tm *tm; char str[256]; \ TCHECK2(bp[0], sizeof(int32_t)); \ t = (time_t) EXTRACT_32BITS(bp); \ @@ -763,6 +785,17 @@ rx_cache_find(const struct rx_header *rxh, const struct ip *ip, int sport, printf("\""); \ } +#define DESTSERVEROUT() { unsigned long n1, n2, n3; \ + TCHECK2(bp[0], sizeof(int32_t) * 3); \ + n1 = EXTRACT_32BITS(bp); \ + bp += sizeof(int32_t); \ + n2 = EXTRACT_32BITS(bp); \ + bp += sizeof(int32_t); \ + n3 = EXTRACT_32BITS(bp); \ + bp += sizeof(int32_t); \ + printf(" server %d:%d:%d", (int) n1, (int) n2, (int) n3); \ + } + /* * Handle calls to the AFS file service (fs) */ @@ -890,6 +923,7 @@ fs_print(register const u_char *bp, int length) STROUT(AFSNAMEMAX); break; case 155: /* Bulk stat */ + case 65536: /* Inline bulk stat */ { unsigned long j; TCHECK2(bp[0], 4); @@ -904,6 +938,26 @@ fs_print(register const u_char *bp, int length) if (j == 0) printf(" "); } + case 65537: /* Fetch data 64 */ + FIDOUT(); + printf(" offset"); + UINT64OUT(); + printf(" length"); + UINT64OUT(); + break; + case 65538: /* Store data 64 */ + FIDOUT(); + STOREATTROUT(); + printf(" offset"); + UINT64OUT(); + printf(" length"); + UINT64OUT(); + printf(" flen"); + UINT64OUT(); + break; + case 65541: /* CallBack rx conn address */ + printf(" addr"); + UINTOUT(); default: ; } @@ -1267,6 +1321,7 @@ prot_print(register const u_char *bp, int length) case 517: /* List owned */ case 518: /* Get CPS2 */ case 519: /* Get host CPS */ + case 530: /* List super groups */ printf(" id"); INTOUT(); break; @@ -1915,13 +1970,176 @@ vol_print(register const u_char *bp, int length) printf(" vol call %s", tok2str(vol_req, "op#%d", vol_op)); - /* - * Normally there would be a switch statement here to decode the - * arguments to the AFS call, but since I don't have access to - * an AFS server (yet) and I'm not an AFS admin, I can't - * test any of these calls. Leave this blank for now. - */ + bp += sizeof(struct rx_header) + 4; + switch (vol_op) { + case 100: /* Create volume */ + printf(" partition"); + UINTOUT(); + printf(" name"); + STROUT(AFSNAMEMAX); + printf(" type"); + UINTOUT(); + printf(" parent"); + UINTOUT(); + break; + case 101: /* Delete volume */ + case 107: /* Get flags */ + printf(" trans"); + UINTOUT(); + break; + case 102: /* Restore */ + printf(" totrans"); + UINTOUT(); + printf(" flags"); + UINTOUT(); + break; + case 103: /* Forward */ + printf(" fromtrans"); + UINTOUT(); + printf(" fromdate"); + DATEOUT(); + DESTSERVEROUT(); + printf(" desttrans"); + INTOUT(); + break; + case 104: /* End trans */ + printf(" trans"); + UINTOUT(); + break; + case 105: /* Clone */ + printf(" trans"); + UINTOUT(); + printf(" purgevol"); + UINTOUT(); + printf(" newtype"); + UINTOUT(); + printf(" newname"); + STROUT(AFSNAMEMAX); + break; + case 106: /* Set flags */ + printf(" trans"); + UINTOUT(); + printf(" flags"); + UINTOUT(); + break; + case 108: /* Trans create */ + printf(" vol"); + UINTOUT(); + printf(" partition"); + UINTOUT(); + printf(" flags"); + UINTOUT(); + break; + case 109: /* Dump */ + case 655537: /* Get size */ + printf(" fromtrans"); + UINTOUT(); + printf(" fromdate"); + DATEOUT(); + break; + case 110: /* Get n-th volume */ + printf(" index"); + UINTOUT(); + break; + case 111: /* Set forwarding */ + printf(" tid"); + UINTOUT(); + printf(" newsite"); + UINTOUT(); + break; + case 112: /* Get name */ + case 113: /* Get status */ + printf(" tid"); + break; + case 114: /* Signal restore */ + printf(" name"); + STROUT(AFSNAMEMAX); + printf(" type"); + UINTOUT(); + printf(" pid"); + UINTOUT(); + printf(" cloneid"); + UINTOUT(); + break; + case 116: /* List volumes */ + printf(" partition"); + UINTOUT(); + printf(" flags"); + UINTOUT(); + break; + case 117: /* Set id types */ + printf(" tid"); + UINTOUT(); + printf(" name"); + STROUT(AFSNAMEMAX); + printf(" type"); + UINTOUT(); + printf(" pid"); + UINTOUT(); + printf(" clone"); + UINTOUT(); + printf(" backup"); + UINTOUT(); + break; + case 119: /* Partition info */ + printf(" name"); + STROUT(AFSNAMEMAX); + break; + case 120: /* Reclone */ + printf(" tid"); + UINTOUT(); + break; + case 121: /* List one volume */ + case 122: /* Nuke volume */ + case 124: /* Extended List volumes */ + case 125: /* Extended List one volume */ + case 65536: /* Convert RO to RW volume */ + printf(" partid"); + UINTOUT(); + printf(" volid"); + UINTOUT(); + break; + case 123: /* Set date */ + printf(" tid"); + UINTOUT(); + printf(" date"); + DATEOUT(); + break; + case 126: /* Set info */ + printf(" tid"); + UINTOUT(); + break; + case 128: /* Forward multiple */ + printf(" fromtrans"); + UINTOUT(); + printf(" fromdate"); + DATEOUT(); + { + unsigned long i, j; + TCHECK2(bp[0], 4); + j = EXTRACT_32BITS(bp); + bp += sizeof(int32_t); + for (i = 0; i < j; i++) { + DESTSERVEROUT(); + if (i != j - 1) + printf(","); + } + if (j == 0) + printf(" "); + } + break; + case 65538: /* Dump version 2 */ + printf(" fromtrans"); + UINTOUT(); + printf(" fromdate"); + DATEOUT(); + printf(" flags"); + UINTOUT(); + break; + default: + ; + } return; trunc: @@ -1955,10 +2173,100 @@ vol_reply_print(register const u_char *bp, int length, int32_t opcode) * If it was a data packet, interpret the response. */ - if (rxh->type == RX_PACKET_TYPE_DATA) - /* Well, no, not really. Leave this for later */ - ; - else { + if (rxh->type == RX_PACKET_TYPE_DATA) { + switch (opcode) { + case 100: /* Create volume */ + printf(" volid"); + UINTOUT(); + printf(" trans"); + UINTOUT(); + break; + case 104: /* End transaction */ + UINTOUT(); + break; + case 105: /* Clone */ + printf(" newvol"); + UINTOUT(); + break; + case 107: /* Get flags */ + UINTOUT(); + break; + case 108: /* Transaction create */ + printf(" trans"); + UINTOUT(); + break; + case 110: /* Get n-th volume */ + printf(" volume"); + UINTOUT(); + printf(" partition"); + UINTOUT(); + break; + case 112: /* Get name */ + STROUT(AFSNAMEMAX); + break; + case 113: /* Get status */ + printf(" volid"); + UINTOUT(); + printf(" nextuniq"); + UINTOUT(); + printf(" type"); + UINTOUT(); + printf(" parentid"); + UINTOUT(); + printf(" clone"); + UINTOUT(); + printf(" backup"); + UINTOUT(); + printf(" restore"); + UINTOUT(); + printf(" maxquota"); + UINTOUT(); + printf(" minquota"); + UINTOUT(); + printf(" owner"); + UINTOUT(); + printf(" create"); + DATEOUT(); + printf(" access"); + DATEOUT(); + printf(" update"); + DATEOUT(); + printf(" expire"); + DATEOUT(); + printf(" backup"); + DATEOUT(); + printf(" copy"); + DATEOUT(); + break; + case 115: /* Old list partitions */ + break; + case 116: /* List volumes */ + case 121: /* List one volume */ + { + unsigned long i, j; + TCHECK2(bp[0], 4); + j = EXTRACT_32BITS(bp); + bp += sizeof(int32_t); + for (i = 0; i < j; i++) { + printf(" name"); + VECOUT(32); + printf(" volid"); + UINTOUT(); + printf(" type"); + bp += sizeof(int32_t) * 21; + if (i != j - 1) + printf(","); + } + if (j == 0) + printf(" "); + } + break; + + + default: + ; + } + } else { /* * Otherwise, just print out the return code */ diff --git a/print-sctp.c b/print-sctp.c index 7a1897812b19..05c753a52e6c 100644 --- a/print-sctp.c +++ b/print-sctp.c @@ -35,7 +35,7 @@ #ifndef lint static const char rcsid[] _U_ = -"@(#) $Header: /tcpdump/master/tcpdump/print-sctp.c,v 1.16.2.5 2007/09/13 18:04:58 guy Exp $ (NETLAB/PEL)"; +"@(#) $Header: /tcpdump/master/tcpdump/print-sctp.c,v 1.21 2007-09-13 18:03:49 guy Exp $ (NETLAB/PEL)"; #endif #ifdef HAVE_CONFIG_H diff --git a/print-sflow.c b/print-sflow.c new file mode 100644 index 000000000000..baa55300b66a --- /dev/null +++ b/print-sflow.c @@ -0,0 +1,577 @@ +/* + * 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. + * + * The SFLOW protocol as per http://www.sflow.org/developers/specifications.php + * + * Original code by Carles Kishimoto + */ + +#ifndef lint +static const char rcsid[] _U_ = +"@(#) $Header: /tcpdump/master/tcpdump/print-sflow.c,v 1.1 2007-08-08 17:20:58 hannes Exp $"; +#endif + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include + +#include +#include +#include + +#include "interface.h" +#include "extract.h" +#include "addrtoname.h" + +/* + * sFlow datagram + * + * 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 + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * | Sflow version (2,4,5) | + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * | IP version (1 for IPv4 | 2 for IPv6) | + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * | IP Address AGENT (4 or 16 bytes) | + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * | Sub agent ID | + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * | Datagram sequence number | + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * | Switch uptime in ms | + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * | num samples in datagram | + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * + */ + +struct sflow_datagram_t { + u_int8_t version[4]; + u_int8_t ip_version[4]; + u_int8_t agent[4]; + u_int8_t agent_id[4]; + u_int8_t seqnum[4]; + u_int8_t uptime[4]; + u_int8_t samples[4]; +}; + +struct sflow_sample_header { + u_int8_t format[4]; + u_int8_t len[4]; +}; + +#define SFLOW_FLOW_SAMPLE 1 +#define SFLOW_COUNTER_SAMPLE 2 +#define SFLOW_EXPANDED_FLOW_SAMPLE 3 +#define SFLOW_EXPANDED_COUNTER_SAMPLE 4 + +static const struct tok sflow_format_values[] = { + { SFLOW_FLOW_SAMPLE, "flow sample" }, + { SFLOW_COUNTER_SAMPLE, "counter sample" }, + { SFLOW_EXPANDED_FLOW_SAMPLE, "expanded flow sample" }, + { SFLOW_EXPANDED_COUNTER_SAMPLE, "expanded counter sample" }, + { 0, NULL} +}; + +struct sflow_expanded_flow_sample_t { + u_int8_t seqnum[4]; + u_int8_t type[4]; + u_int8_t index[4]; + u_int8_t rate[4]; + u_int8_t pool[4]; + u_int8_t drops[4]; + u_int8_t in_interface_format[4]; + u_int8_t in_interface_value[4]; + u_int8_t out_interface_format[4]; + u_int8_t out_interface_value[4]; + u_int8_t records[4]; +}; + +#define SFLOW_FLOW_RAW_PACKET 1 +#define SFLOW_FLOW_ETHERNET_FRAME 2 +#define SFLOW_FLOW_IPV4_DATA 3 +#define SFLOW_FLOW_IPV6_DATA 4 +#define SFLOW_FLOW_EXTENDED_SWITCH_DATA 1001 +#define SFLOW_FLOW_EXTENDED_ROUTER_DATA 1002 +#define SFLOW_FLOW_EXTENDED_GATEWAY_DATA 1003 +#define SFLOW_FLOW_EXTENDED_USER_DATA 1004 +#define SFLOW_FLOW_EXTENDED_URL_DATA 1005 +#define SFLOW_FLOW_EXTENDED_MPLS_DATA 1006 +#define SFLOW_FLOW_EXTENDED_NAT_DATA 1007 +#define SFLOW_FLOW_EXTENDED_MPLS_TUNNEL 1008 +#define SFLOW_FLOW_EXTENDED_MPLS_VC 1009 +#define SFLOW_FLOW_EXTENDED_MPLS_FEC 1010 +#define SFLOW_FLOW_EXTENDED_MPLS_LVP_FEC 1011 +#define SFLOW_FLOW_EXTENDED_VLAN_TUNNEL 1012 + +static const struct tok sflow_flow_type_values[] = { + { SFLOW_FLOW_RAW_PACKET, "Raw packet"}, + { SFLOW_FLOW_ETHERNET_FRAME, "Ethernet frame"}, + { SFLOW_FLOW_IPV4_DATA, "IPv4 Data"}, + { SFLOW_FLOW_IPV6_DATA, "IPv6 Data"}, + { SFLOW_FLOW_EXTENDED_SWITCH_DATA, "Extended Switch data"}, + { SFLOW_FLOW_EXTENDED_ROUTER_DATA, "Extended Router data"}, + { SFLOW_FLOW_EXTENDED_GATEWAY_DATA, "Extended Gateway data"}, + { SFLOW_FLOW_EXTENDED_USER_DATA, "Extended User data"}, + { SFLOW_FLOW_EXTENDED_URL_DATA, "Extended URL data"}, + { SFLOW_FLOW_EXTENDED_MPLS_DATA, "Extended MPLS data"}, + { SFLOW_FLOW_EXTENDED_NAT_DATA, "Extended NAT data"}, + { SFLOW_FLOW_EXTENDED_MPLS_TUNNEL, "Extended MPLS tunnel"}, + { SFLOW_FLOW_EXTENDED_MPLS_VC, "Extended MPLS VC"}, + { SFLOW_FLOW_EXTENDED_MPLS_FEC, "Extended MPLS FEC"}, + { SFLOW_FLOW_EXTENDED_MPLS_LVP_FEC, "Extended MPLS LVP FEC"}, + { SFLOW_FLOW_EXTENDED_VLAN_TUNNEL, "Extended VLAN Tunnel"}, + { 0, NULL} +}; + +#define SFLOW_HEADER_PROTOCOL_ETHERNET 1 +#define SFLOW_HEADER_PROTOCOL_IPV4 11 +#define SFLOW_HEADER_PROTOCOL_IPV6 12 + +static const struct tok sflow_flow_raw_protocol_values[] = { + { SFLOW_HEADER_PROTOCOL_ETHERNET, "Ethernet"}, + { SFLOW_HEADER_PROTOCOL_IPV4, "IPv4"}, + { SFLOW_HEADER_PROTOCOL_IPV6, "IPv6"}, + { 0, NULL} +}; + +struct sflow_expanded_flow_raw_t { + u_int8_t protocol[4]; + u_int8_t length[4]; + u_int8_t stripped_bytes[4]; + u_int8_t header_size[4]; +}; + +struct sflow_expanded_counter_sample_t { + u_int8_t seqnum[4]; + u_int8_t type[4]; + u_int8_t index[4]; + u_int8_t records[4]; +}; + +#define SFLOW_COUNTER_GENERIC 1 +#define SFLOW_COUNTER_ETHERNET 2 +#define SFLOW_COUNTER_TOKEN_RING 3 +#define SFLOW_COUNTER_BASEVG 4 +#define SFLOW_COUNTER_VLAN 5 +#define SFLOW_COUNTER_PROCESSOR 1001 + +static const struct tok sflow_counter_type_values[] = { + { SFLOW_COUNTER_GENERIC, "Generic counter"}, + { SFLOW_COUNTER_ETHERNET, "Ethernet counter"}, + { SFLOW_COUNTER_TOKEN_RING, "Token ring counter"}, + { SFLOW_COUNTER_BASEVG, "100 BaseVG counter"}, + { SFLOW_COUNTER_VLAN, "Vlan counter"}, + { SFLOW_COUNTER_PROCESSOR, "Processor counter"}, + { 0, NULL} +}; + +#define SFLOW_IFACE_DIRECTION_UNKNOWN 0 +#define SFLOW_IFACE_DIRECTION_FULLDUPLEX 1 +#define SFLOW_IFACE_DIRECTION_HALFDUPLEX 2 +#define SFLOW_IFACE_DIRECTION_IN 3 +#define SFLOW_IFACE_DIRECTION_OUT 4 + +static const struct tok sflow_iface_direction_values[] = { + { SFLOW_IFACE_DIRECTION_UNKNOWN, "unknown"}, + { SFLOW_IFACE_DIRECTION_FULLDUPLEX, "full-duplex"}, + { SFLOW_IFACE_DIRECTION_HALFDUPLEX, "half-duplex"}, + { SFLOW_IFACE_DIRECTION_IN, "in"}, + { SFLOW_IFACE_DIRECTION_OUT, "out"}, + { 0, NULL} +}; + +struct sflow_generic_counter_t { + u_int8_t ifindex[4]; + u_int8_t iftype[4]; + u_int8_t ifspeed[8]; + u_int8_t ifdirection[4]; + u_int8_t ifstatus[4]; + u_int8_t ifinoctets[8]; + u_int8_t ifinunicastpkts[4]; + u_int8_t ifinmulticastpkts[4]; + u_int8_t ifinbroadcastpkts[4]; + u_int8_t ifindiscards[4]; + u_int8_t ifinerrors[4]; + u_int8_t ifinunkownprotos[4]; + u_int8_t ifoutoctets[8]; + u_int8_t ifoutunicastpkts[4]; + u_int8_t ifoutmulticastpkts[4]; + u_int8_t ifoutbroadcastpkts[4]; + u_int8_t ifoutdiscards[4]; + u_int8_t ifouterrors[4]; + u_int8_t ifpromiscmode[4]; +}; + +struct sflow_ethernet_counter_t { + u_int8_t alignerrors[4]; + u_int8_t fcserrors[4]; + u_int8_t single_collision_frames[4]; + u_int8_t multiple_collision_frames[4]; + u_int8_t test_errors[4]; + u_int8_t deferred_transmissions[4]; + u_int8_t late_collisions[4]; + u_int8_t excessive_collisions[4]; + u_int8_t mac_transmit_errors[4]; + u_int8_t carrier_sense_errors[4]; + u_int8_t frame_too_longs[4]; + u_int8_t mac_receive_errors[4]; + u_int8_t symbol_errors[4]; +}; + +struct sflow_100basevg_counter_t { + u_int8_t in_highpriority_frames[4]; + u_int8_t in_highpriority_octets[8]; + u_int8_t in_normpriority_frames[4]; + u_int8_t in_normpriority_octets[8]; + u_int8_t in_ipmerrors[4]; + u_int8_t in_oversized[4]; + u_int8_t in_data_errors[4]; + u_int8_t in_null_addressed_frames[4]; + u_int8_t out_highpriority_frames[4]; + u_int8_t out_highpriority_octets[8]; + u_int8_t transitioninto_frames[4]; + u_int8_t hc_in_highpriority_octets[8]; + u_int8_t hc_in_normpriority_octets[8]; + u_int8_t hc_out_highpriority_octets[8]; +}; + +struct sflow_vlan_counter_t { + u_int8_t vlan_id[4]; + u_int8_t octets[8]; + u_int8_t unicast_pkt[4]; + u_int8_t multicast_pkt[4]; + u_int8_t broadcast_pkt[4]; + u_int8_t discards[4]; +}; + +void +sflow_print(const u_char *pptr, u_int len) { + + const struct sflow_datagram_t *sflow_datagram; + const struct sflow_sample_header *sflow_sample; + const struct sflow_expanded_flow_sample_t *sflow_expanded_flow_sample; + const struct sflow_expanded_flow_raw_t *sflow_flow_raw; + const struct sflow_expanded_counter_sample_t *sflow_expanded_counter_sample; + const struct sflow_generic_counter_t *sflow_gen_counter; + const struct sflow_ethernet_counter_t *sflow_eth_counter; + const struct sflow_100basevg_counter_t *sflow_100basevg_counter; + const struct sflow_vlan_counter_t *sflow_vlan_counter; + const u_char *tptr; + int tlen; + u_int32_t sflow_sample_type, sflow_sample_len; + int nsamples, nrecords, counter_len, counter_type, flow_len, flow_type; + + tptr=pptr; + tlen = len; + sflow_datagram = (const struct sflow_datagram_t *)pptr; + TCHECK(*sflow_datagram); + + /* + * Sanity checking of the header. + */ + if (EXTRACT_32BITS(sflow_datagram->version) != 5) { + printf("sFlow version %u packet not supported", + EXTRACT_32BITS(sflow_datagram->version)); + return; + } + + if (vflag < 1) { + printf("sFlowv%u, %s agent %s, agent-id %u, length %u", + EXTRACT_32BITS(sflow_datagram->version), + EXTRACT_32BITS(sflow_datagram->ip_version) == 1 ? "IPv4" : "IPv6", + ipaddr_string(sflow_datagram->agent), + EXTRACT_32BITS(sflow_datagram->samples), + len); + return; + } + + /* ok they seem to want to know everything - lets fully decode it */ + nsamples=EXTRACT_32BITS(sflow_datagram->samples); + printf("sFlowv%u, %s agent %s, agent-id %u, seqnum %u, uptime %u, samples %u, length %u", + EXTRACT_32BITS(sflow_datagram->version), + EXTRACT_32BITS(sflow_datagram->ip_version) == 1 ? "IPv4" : "IPv6", + ipaddr_string(sflow_datagram->agent), + EXTRACT_32BITS(sflow_datagram->agent_id), + EXTRACT_32BITS(sflow_datagram->seqnum), + EXTRACT_32BITS(sflow_datagram->uptime), + nsamples, + len); + + /* skip Common header */ + tptr+=sizeof(const struct sflow_datagram_t); + tlen-=sizeof(const struct sflow_datagram_t); + + while (nsamples > 0 && tlen > 0) { + sflow_sample = (const struct sflow_sample_header *)tptr; + sflow_sample_type = (EXTRACT_32BITS(sflow_sample->format)&0x0FFF); + sflow_sample_len = EXTRACT_32BITS(sflow_sample->len); + + tptr+=sizeof(struct sflow_sample_header); + tlen-=sizeof(struct sflow_sample_header); + + printf("\n\t%s (%u), length %u,", + tok2str(sflow_format_values, "Unknown", sflow_sample_type), + sflow_sample_type, + sflow_sample_len); + + /* basic sanity check */ + if (sflow_sample_type == 0 || sflow_sample_len ==0) { + return; + } + + /* did we capture enough for fully decoding the sample ? */ + if (!TTEST2(*tptr, sflow_sample_len)) + goto trunc; + + switch(sflow_sample_type) { + case SFLOW_FLOW_SAMPLE: /* XXX */ + break; + + case SFLOW_COUNTER_SAMPLE: /* XXX */ + break; + + case SFLOW_EXPANDED_FLOW_SAMPLE: + sflow_expanded_flow_sample = (const struct sflow_expanded_flow_sample_t *)tptr; + nrecords = EXTRACT_32BITS(sflow_expanded_flow_sample->records); + + printf(" seqnum %u, type %u, idx %u, rate %u, pool %u, drops %u, records %u", + EXTRACT_32BITS(sflow_expanded_flow_sample->seqnum), + EXTRACT_32BITS(sflow_expanded_flow_sample->type), + EXTRACT_32BITS(sflow_expanded_flow_sample->index), + EXTRACT_32BITS(sflow_expanded_flow_sample->rate), + EXTRACT_32BITS(sflow_expanded_flow_sample->pool), + EXTRACT_32BITS(sflow_expanded_flow_sample->drops), + EXTRACT_32BITS(sflow_expanded_flow_sample->records)); + + tptr+= sizeof(struct sflow_expanded_flow_sample_t); + tlen-= sizeof(struct sflow_expanded_flow_sample_t); + + while ( nrecords > 0 && tlen > 0) { + + /* decode Flow record - 2 bytes */ + flow_type = EXTRACT_32BITS(tptr)&0x0FFF; + flow_len = EXTRACT_32BITS(tptr+4); + printf("\n\t %s (%u) length %u", + tok2str(sflow_flow_type_values,"Unknown",flow_type), + flow_type, + flow_len); + + tptr += 8; + tlen -= 8; + + /* did we capture enough for fully decoding the flow ? */ + if (!TTEST2(*tptr, flow_len)) + goto trunc; + + switch(flow_type) { + case SFLOW_FLOW_RAW_PACKET: + sflow_flow_raw = (const struct sflow_expanded_flow_raw_t *)tptr; + printf("\n\t protocol %s (%u), length %u, stripped bytes %u, header_size %u", + tok2str(sflow_flow_raw_protocol_values,"Unknown",EXTRACT_32BITS(sflow_flow_raw->protocol)), + EXTRACT_32BITS(sflow_flow_raw->protocol), + EXTRACT_32BITS(sflow_flow_raw->length), + EXTRACT_32BITS(sflow_flow_raw->stripped_bytes), + EXTRACT_32BITS(sflow_flow_raw->header_size)); + break; + + /* + * FIXME those are the defined flow types that lack a decoder + */ + case SFLOW_FLOW_ETHERNET_FRAME: + case SFLOW_FLOW_IPV4_DATA: + case SFLOW_FLOW_IPV6_DATA: + case SFLOW_FLOW_EXTENDED_SWITCH_DATA: + case SFLOW_FLOW_EXTENDED_ROUTER_DATA: + case SFLOW_FLOW_EXTENDED_GATEWAY_DATA: + case SFLOW_FLOW_EXTENDED_USER_DATA: + case SFLOW_FLOW_EXTENDED_URL_DATA: + case SFLOW_FLOW_EXTENDED_MPLS_DATA: + case SFLOW_FLOW_EXTENDED_NAT_DATA: + case SFLOW_FLOW_EXTENDED_MPLS_TUNNEL: + case SFLOW_FLOW_EXTENDED_MPLS_VC: + case SFLOW_FLOW_EXTENDED_MPLS_FEC: + case SFLOW_FLOW_EXTENDED_MPLS_LVP_FEC: + case SFLOW_FLOW_EXTENDED_VLAN_TUNNEL: + break; + default: + if (vflag <= 1) + print_unknown_data(tptr, "\n\t ", flow_len); + break; + + } + tptr += flow_len; + tlen -= flow_len; + nrecords--; + } + break; + + case SFLOW_EXPANDED_COUNTER_SAMPLE: + sflow_expanded_counter_sample = (const struct sflow_expanded_counter_sample_t *)tptr; + nrecords = EXTRACT_32BITS(sflow_expanded_counter_sample->records); + + printf(" seqnum %u, type %u, idx %u, records %u", + EXTRACT_32BITS(sflow_expanded_counter_sample->seqnum), + EXTRACT_32BITS(sflow_expanded_counter_sample->type), + EXTRACT_32BITS(sflow_expanded_counter_sample->index), + nrecords); + + tptr+= sizeof(struct sflow_expanded_counter_sample_t); + tlen-= sizeof(struct sflow_expanded_counter_sample_t); + + while ( nrecords > 0 && tlen > 0) { + + /* decode counter record - 2 bytes */ + counter_type = EXTRACT_32BITS(tptr)&0x0FFF; + counter_len = EXTRACT_32BITS(tptr+4); + printf("\n\t %s (%u) length %u", + tok2str(sflow_counter_type_values,"Unknown",counter_type), + counter_type, + counter_len); + + tptr += 8; + tlen -= 8; + + /* did we capture enough for fully decoding the counter ? */ + if (!TTEST2(*tptr, counter_len)) + goto trunc; + + switch(counter_type) { + case SFLOW_COUNTER_GENERIC: + sflow_gen_counter = (const struct sflow_generic_counter_t *)tptr; + printf("\n\t ifindex %u, iftype %u, ifspeed %u, ifdirection %u (%s)", + EXTRACT_32BITS(sflow_gen_counter->ifindex), + EXTRACT_32BITS(sflow_gen_counter->iftype), + EXTRACT_32BITS(sflow_gen_counter->ifspeed), + EXTRACT_32BITS(sflow_gen_counter->ifdirection), + tok2str(sflow_iface_direction_values, "Unknown", + EXTRACT_32BITS(sflow_gen_counter->ifdirection))); + printf("\n\t ifstatus %u, adminstatus: %s, operstatus: %s", + EXTRACT_32BITS(sflow_gen_counter->ifstatus), + EXTRACT_32BITS(sflow_gen_counter->ifstatus)&1 ? "up" : "down", + (EXTRACT_32BITS(sflow_gen_counter->ifstatus)>>1)&1 ? "up" : "down"); + printf("\n\t In octets %" PRIu64 + ", unicast pkts %u, multicast pkts %u, broadcast pkts %u, discards %u", + EXTRACT_64BITS(sflow_gen_counter->ifinoctets), + EXTRACT_32BITS(sflow_gen_counter->ifinunicastpkts), + EXTRACT_32BITS(sflow_gen_counter->ifinmulticastpkts), + EXTRACT_32BITS(sflow_gen_counter->ifinbroadcastpkts), + EXTRACT_32BITS(sflow_gen_counter->ifindiscards)); + printf("\n\t In errors %u, unknown protos %u", + EXTRACT_32BITS(sflow_gen_counter->ifinerrors), + EXTRACT_32BITS(sflow_gen_counter->ifinunkownprotos)); + printf("\n\t Out octets %" PRIu64 + ", unicast pkts %u, multicast pkts %u, broadcast pkts %u, discards %u", + EXTRACT_64BITS(sflow_gen_counter->ifoutoctets), + EXTRACT_32BITS(sflow_gen_counter->ifoutunicastpkts), + EXTRACT_32BITS(sflow_gen_counter->ifoutmulticastpkts), + EXTRACT_32BITS(sflow_gen_counter->ifoutbroadcastpkts), + EXTRACT_32BITS(sflow_gen_counter->ifoutdiscards)); + printf("\n\t Out errors %u, promisc mode %u", + EXTRACT_32BITS(sflow_gen_counter->ifouterrors), + EXTRACT_32BITS(sflow_gen_counter->ifpromiscmode)); + break; + case SFLOW_COUNTER_ETHERNET: + sflow_eth_counter = (const struct sflow_ethernet_counter_t *)tptr; + printf("\n\t align errors %u, fcs errors %u, single collision %u, multiple collision %u, test error %u", + EXTRACT_32BITS(sflow_eth_counter->alignerrors), + EXTRACT_32BITS(sflow_eth_counter->fcserrors), + EXTRACT_32BITS(sflow_eth_counter->single_collision_frames), + EXTRACT_32BITS(sflow_eth_counter->multiple_collision_frames), + EXTRACT_32BITS(sflow_eth_counter->test_errors)); + printf("\n\t deferred %u, late collision %u, excessive collision %u, mac trans error %u", + EXTRACT_32BITS(sflow_eth_counter->deferred_transmissions), + EXTRACT_32BITS(sflow_eth_counter->late_collisions), + EXTRACT_32BITS(sflow_eth_counter->excessive_collisions), + EXTRACT_32BITS(sflow_eth_counter->mac_transmit_errors)); + printf("\n\t carrier error %u, frames too long %u, mac receive errors %u, symbol errors %u", + EXTRACT_32BITS(sflow_eth_counter->carrier_sense_errors), + EXTRACT_32BITS(sflow_eth_counter->frame_too_longs), + EXTRACT_32BITS(sflow_eth_counter->mac_receive_errors), + EXTRACT_32BITS(sflow_eth_counter->symbol_errors)); + break; + case SFLOW_COUNTER_TOKEN_RING: /* XXX */ + break; + case SFLOW_COUNTER_BASEVG: + sflow_100basevg_counter = (const struct sflow_100basevg_counter_t *)tptr; + printf("\n\t in high prio frames %u, in high prio octets %" PRIu64, + EXTRACT_32BITS(sflow_100basevg_counter->in_highpriority_frames), + EXTRACT_64BITS(sflow_100basevg_counter->in_highpriority_octets)); + printf("\n\t in norm prio frames %u, in norm prio octets %" PRIu64, + EXTRACT_32BITS(sflow_100basevg_counter->in_normpriority_frames), + EXTRACT_64BITS(sflow_100basevg_counter->in_normpriority_octets)); + printf("\n\t in ipm errors %u, oversized %u, in data errors %u, null addressed frames %u", + EXTRACT_32BITS(sflow_100basevg_counter->in_ipmerrors), + EXTRACT_32BITS(sflow_100basevg_counter->in_oversized), + EXTRACT_32BITS(sflow_100basevg_counter->in_data_errors), + EXTRACT_32BITS(sflow_100basevg_counter->in_null_addressed_frames)); + printf("\n\t out high prio frames %u, out high prio octets %" PRIu64 + ", trans into frames %u", + EXTRACT_32BITS(sflow_100basevg_counter->out_highpriority_frames), + EXTRACT_64BITS(sflow_100basevg_counter->out_highpriority_octets), + EXTRACT_32BITS(sflow_100basevg_counter->transitioninto_frames)); + printf("\n\t in hc high prio octets %" PRIu64 + ", in hc norm prio octets %" PRIu64 + ", out hc high prio octets %" PRIu64, + EXTRACT_64BITS(sflow_100basevg_counter->hc_in_highpriority_octets), + EXTRACT_64BITS(sflow_100basevg_counter->hc_in_normpriority_octets), + EXTRACT_64BITS(sflow_100basevg_counter->hc_out_highpriority_octets)); + break; + case SFLOW_COUNTER_VLAN: + sflow_vlan_counter = (const struct sflow_vlan_counter_t *)tptr; + printf("\n\t vlan_id %u, octets %" PRIu64 + ", unicast_pkt %u, multicast_pkt %u, broadcast_pkt %u, discards %u", + EXTRACT_32BITS(sflow_vlan_counter->vlan_id), + EXTRACT_64BITS(sflow_vlan_counter->octets), + EXTRACT_32BITS(sflow_vlan_counter->unicast_pkt), + EXTRACT_32BITS(sflow_vlan_counter->multicast_pkt), + EXTRACT_32BITS(sflow_vlan_counter->broadcast_pkt), + EXTRACT_32BITS(sflow_vlan_counter->discards)); + break; + case SFLOW_COUNTER_PROCESSOR: /* XXX */ + break; + default: + if (vflag <= 1) + print_unknown_data(tptr, "\n\t\t", counter_len); + break; + } + tptr += counter_len; + tlen -= counter_len; + nrecords--; + } + break; + default: + if (vflag <= 1) + print_unknown_data(tptr, "\n\t ", sflow_sample_len); + break; + } + tptr += sflow_sample_len; + tlen -= sflow_sample_len; + nsamples--; + } + return; + + trunc: + printf("[|SFLOW]"); +} + +/* + * Local Variables: + * c-style: whitesmith + * c-basic-offset: 4 + * End: + */ diff --git a/print-sip.c b/print-sip.c index b4d13b132fe8..48562f8c38bc 100644 --- a/print-sip.c +++ b/print-sip.c @@ -15,7 +15,7 @@ #ifndef lint static const char rcsid[] _U_ = - "@(#) $Header: /tcpdump/master/tcpdump/print-sip.c,v 1.1 2004/07/27 17:04:20 hannes Exp $"; + "@(#) $Header: /tcpdump/master/tcpdump/print-sip.c,v 1.1 2004-07-27 17:04:20 hannes Exp $"; #endif #ifdef HAVE_CONFIG_H diff --git a/print-sl.c b/print-sl.c index f28a21a407a3..f00d3943d320 100644 --- a/print-sl.c +++ b/print-sl.c @@ -21,7 +21,7 @@ #ifndef lint static const char rcsid[] _U_ = - "@(#) $Header: /tcpdump/master/tcpdump/print-sl.c,v 1.65 2005/04/06 21:32:42 mcr Exp $ (LBL)"; + "@(#) $Header: /tcpdump/master/tcpdump/print-sl.c,v 1.65 2005-04-06 21:32:42 mcr Exp $ (LBL)"; #endif #ifdef HAVE_CONFIG_H diff --git a/print-sll.c b/print-sll.c index 1735f65095ca..d96b3de29ee2 100644 --- a/print-sll.c +++ b/print-sll.c @@ -20,7 +20,7 @@ */ #ifndef lint static const char rcsid[] _U_ = - "@(#) $Header: /tcpdump/master/tcpdump/print-sll.c,v 1.16.2.3 2005/11/13 12:13:00 guy Exp $ (LBL)"; + "@(#) $Header: /tcpdump/master/tcpdump/print-sll.c,v 1.19 2005-11-13 12:12:43 guy Exp $ (LBL)"; #endif #ifdef HAVE_CONFIG_H diff --git a/print-slow.c b/print-slow.c index 96099221b9f7..eaf94ed9bbbc 100644 --- a/print-slow.c +++ b/print-slow.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998-2005 The TCPDUMP project + * 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 @@ -13,13 +13,14 @@ * FOR A PARTICULAR PURPOSE. * * support for the IEEE "slow protocols" LACP, MARKER as per 802.3ad + * OAM as per 802.3ah * * Original code by Hannes Gredler (hannes@juniper.net) */ #ifndef lint static const char rcsid[] _U_ = - "@(#) $Header: /tcpdump/master/tcpdump/print-slow.c,v 1.1.2.1 2005/07/10 14:47:56 hannes Exp $"; + "@(#) $Header: /tcpdump/master/tcpdump/print-slow.c,v 1.8 2006-10-12 05:44:33 hannes Exp $"; #endif #ifdef HAVE_CONFIG_H @@ -36,14 +37,16 @@ static const char rcsid[] _U_ = #include "extract.h" #include "addrtoname.h" #include "ether.h" +#include "oui.h" -struct slow_common_header { +struct slow_common_header_t { u_int8_t proto_subtype; u_int8_t version; }; #define SLOW_PROTO_LACP 1 #define SLOW_PROTO_MARKER 2 +#define SLOW_PROTO_OAM 3 #define LACP_VERSION 1 #define MARKER_VERSION 1 @@ -51,6 +54,137 @@ struct slow_common_header { static const struct tok slow_proto_values[] = { { SLOW_PROTO_LACP, "LACP" }, { SLOW_PROTO_MARKER, "MARKER" }, + { SLOW_PROTO_OAM, "OAM" }, + { 0, NULL} +}; + +static const struct tok slow_oam_flag_values[] = { + { 0x0001, "Link Fault" }, + { 0x0002, "Dying Gasp" }, + { 0x0004, "Critical Event" }, + { 0x0008, "Local Evaluating" }, + { 0x0010, "Local Stable" }, + { 0x0020, "Remote Evaluating" }, + { 0x0040, "Remote Stable" }, + { 0, NULL} +}; + +#define SLOW_OAM_CODE_INFO 0x00 +#define SLOW_OAM_CODE_EVENT_NOTIF 0x01 +#define SLOW_OAM_CODE_VAR_REQUEST 0x02 +#define SLOW_OAM_CODE_VAR_RESPONSE 0x03 +#define SLOW_OAM_CODE_LOOPBACK_CTRL 0x04 +#define SLOW_OAM_CODE_PRIVATE 0xfe + +static const struct tok slow_oam_code_values[] = { + { SLOW_OAM_CODE_INFO, "Information" }, + { SLOW_OAM_CODE_EVENT_NOTIF, "Event Notification" }, + { SLOW_OAM_CODE_VAR_REQUEST, "Variable Request" }, + { SLOW_OAM_CODE_VAR_RESPONSE, "Variable Response" }, + { SLOW_OAM_CODE_LOOPBACK_CTRL, "Loopback Control" }, + { SLOW_OAM_CODE_PRIVATE, "Vendor Private" }, + { 0, NULL} +}; + +struct slow_oam_info_t { + u_int8_t info_type; + u_int8_t info_length; + u_int8_t oam_version; + u_int8_t revision[2]; + u_int8_t state; + u_int8_t oam_config; + u_int8_t oam_pdu_config[2]; + u_int8_t oui[3]; + u_int8_t vendor_private[4]; +}; + +#define SLOW_OAM_INFO_TYPE_END_OF_TLV 0x00 +#define SLOW_OAM_INFO_TYPE_LOCAL 0x01 +#define SLOW_OAM_INFO_TYPE_REMOTE 0x02 +#define SLOW_OAM_INFO_TYPE_ORG_SPECIFIC 0xfe + +static const struct tok slow_oam_info_type_values[] = { + { SLOW_OAM_INFO_TYPE_END_OF_TLV, "End of TLV marker" }, + { SLOW_OAM_INFO_TYPE_LOCAL, "Local" }, + { SLOW_OAM_INFO_TYPE_REMOTE, "Remote" }, + { SLOW_OAM_INFO_TYPE_ORG_SPECIFIC, "Organization specific" }, + { 0, NULL} +}; + +#define OAM_INFO_TYPE_PARSER_MASK 0x3 +static const struct tok slow_oam_info_type_state_parser_values[] = { + { 0x00, "forwarding" }, + { 0x01, "looping back" }, + { 0x02, "discarding" }, + { 0x03, "reserved" }, + { 0, NULL} +}; + +#define OAM_INFO_TYPE_MUX_MASK 0x4 +static const struct tok slow_oam_info_type_state_mux_values[] = { + { 0x00, "forwarding" }, + { 0x04, "discarding" }, + { 0, NULL} +}; + +static const struct tok slow_oam_info_type_oam_config_values[] = { + { 0x01, "Active" }, + { 0x02, "Unidirectional" }, + { 0x04, "Remote-Loopback" }, + { 0x08, "Link-Events" }, + { 0x10, "Variable-Retrieval" }, + { 0, NULL} +}; + +/* 11 Bits */ +#define OAM_INFO_TYPE_PDU_SIZE_MASK 0x7ff + +#define SLOW_OAM_LINK_EVENT_END_OF_TLV 0x00 +#define SLOW_OAM_LINK_EVENT_ERR_SYM_PER 0x01 +#define SLOW_OAM_LINK_EVENT_ERR_FRM 0x02 +#define SLOW_OAM_LINK_EVENT_ERR_FRM_PER 0x03 +#define SLOW_OAM_LINK_EVENT_ERR_FRM_SUMM 0x04 +#define SLOW_OAM_LINK_EVENT_ORG_SPECIFIC 0xfe + +static const struct tok slow_oam_link_event_values[] = { + { SLOW_OAM_LINK_EVENT_END_OF_TLV, "End of TLV marker" }, + { SLOW_OAM_LINK_EVENT_ERR_SYM_PER, "Errored Symbol Period Event" }, + { SLOW_OAM_LINK_EVENT_ERR_FRM, "Errored Frame Event" }, + { SLOW_OAM_LINK_EVENT_ERR_FRM_PER, "Errored Frame Period Event" }, + { SLOW_OAM_LINK_EVENT_ERR_FRM_SUMM, "Errored Frame Seconds Summary Event" }, + { SLOW_OAM_LINK_EVENT_ORG_SPECIFIC, "Organization specific" }, + { 0, NULL} +}; + +struct slow_oam_link_event_t { + u_int8_t event_type; + u_int8_t event_length; + u_int8_t time_stamp[2]; + u_int8_t window[8]; + u_int8_t threshold[8]; + u_int8_t errors[8]; + u_int8_t errors_running_total[8]; + u_int8_t event_running_total[4]; +}; + +struct slow_oam_variablerequest_t { + u_int8_t branch; + u_int8_t leaf[2]; +}; + +struct slow_oam_variableresponse_t { + u_int8_t branch; + u_int8_t leaf[2]; + u_int8_t length; +}; + +struct slow_oam_loopbackctrl_t { + u_int8_t command; +}; + +static const struct tok slow_oam_loopbackctrl_cmd_values[] = { + { 0x01, "Enable OAM Remote Loopback" }, + { 0x02, "Disable OAM Remote Loopback" }, { 0, NULL} }; @@ -116,13 +250,98 @@ struct lacp_marker_tlv_terminator_t { u_int8_t pad[50]; }; +void slow_marker_lacp_print(register const u_char *, register u_int); +void slow_oam_print(register const u_char *, register u_int); + +const struct slow_common_header_t *slow_com_header; + void slow_print(register const u_char *pptr, register u_int len) { - const struct slow_common_header *slow_com_header; + int print_version; + + slow_com_header = (const struct slow_common_header_t *)pptr; + TCHECK(*slow_com_header); + + /* + * Sanity checking of the header. + */ + switch (slow_com_header->proto_subtype) { + case SLOW_PROTO_LACP: + if (slow_com_header->version != LACP_VERSION) { + printf("LACP version %u packet not supported",slow_com_header->version); + return; + } + print_version = 1; + break; + + case SLOW_PROTO_MARKER: + if (slow_com_header->version != MARKER_VERSION) { + printf("MARKER version %u packet not supported",slow_com_header->version); + return; + } + print_version = 1; + break; + + case SLOW_PROTO_OAM: /* fall through */ + print_version = 0; + break; + + default: + /* print basic information and exit */ + print_version = -1; + break; + } + + if (print_version) { + printf("%sv%u, length %u", + tok2str(slow_proto_values, "unknown (%u)",slow_com_header->proto_subtype), + slow_com_header->version, + len); + } else { + /* some slow protos don't have a version number in the header */ + printf("%s, length %u", + tok2str(slow_proto_values, "unknown (%u)",slow_com_header->proto_subtype), + len); + } + + /* unrecognized subtype */ + if (print_version == -1) { + print_unknown_data(pptr, "\n\t", len); + return; + } + + if (!vflag) + return; + + switch (slow_com_header->proto_subtype) { + default: /* should not happen */ + break; + + case SLOW_PROTO_OAM: + /* skip proto_subtype */ + slow_oam_print(pptr+1, len-1); + break; + + case SLOW_PROTO_LACP: /* LACP and MARKER share the same semantics */ + case SLOW_PROTO_MARKER: + /* skip slow_common_header */ + len -= sizeof(const struct slow_common_header_t); + pptr += sizeof(const struct slow_common_header_t); + slow_marker_lacp_print(pptr, len); + break; + } + return; + +trunc: + printf("\n\t\t packet exceeded snapshot"); +} + +void slow_marker_lacp_print(register const u_char *tptr, register u_int tlen) { + const struct tlv_header_t *tlv_header; - const u_char *tptr,*tlv_tptr; - u_int tlv_len,tlen,tlv_tlen; + const u_char *tlv_tptr; + u_int tlv_len, tlv_tlen; union { const struct lacp_marker_tlv_terminator_t *lacp_marker_tlv_terminator; @@ -130,44 +349,14 @@ slow_print(register const u_char *pptr, register u_int len) { const struct lacp_tlv_collector_info_t *lacp_tlv_collector_info; const struct marker_tlv_marker_info_t *marker_tlv_marker_info; } tlv_ptr; - - tptr=pptr; - slow_com_header = (const struct slow_common_header *)pptr; - TCHECK(*slow_com_header); - - /* - * Sanity checking of the header. - */ - if (slow_com_header->proto_subtype == SLOW_PROTO_LACP && - slow_com_header->version != LACP_VERSION) { - printf("LACP version %u packet not supported",slow_com_header->version); - return; - } - if (slow_com_header->proto_subtype == SLOW_PROTO_MARKER && - slow_com_header->version != MARKER_VERSION) { - printf("MARKER version %u packet not supported",slow_com_header->version); - return; - } - - printf("%sv%u, length: %u", - tok2str(slow_proto_values, "unknown (%u)",slow_com_header->proto_subtype), - slow_com_header->version, - len); - - if (!vflag) - return; - - /* ok they seem to want to know everything - lets fully decode it */ - tlen=len-sizeof(struct slow_common_header); - tptr+=sizeof(const struct slow_common_header); - + while(tlen>0) { /* did we capture enough for fully decoding the tlv header ? */ TCHECK2(*tptr, sizeof(struct tlv_header_t)); tlv_header = (const struct tlv_header_t *)tptr; tlv_len = tlv_header->length; - printf("\n\t%s TLV (0x%02x), length: %u", + printf("\n\t%s TLV (0x%02x), length %u", tok2str(slow_tlv_values, "Unknown", (slow_com_header->proto_subtype << 8) + tlv_header->type), @@ -250,10 +439,11 @@ slow_print(register const u_char *pptr, register u_int len) { print_unknown_data(tlv_tptr,"\n\t ",tlv_tlen); break; } - /* do we want to see an additionally hexdump ? */ - if (vflag > 1) + /* do we want to see an additional hexdump ? */ + if (vflag > 1) { print_unknown_data(tptr+sizeof(sizeof(struct tlv_header_t)),"\n\t ", tlv_len-sizeof(struct tlv_header_t)); + } tptr+=tlv_len; tlen-=tlv_len; @@ -262,3 +452,210 @@ slow_print(register const u_char *pptr, register u_int len) { trunc: printf("\n\t\t packet exceeded snapshot"); } + +void slow_oam_print(register const u_char *tptr, register u_int tlen) { + + u_int hexdump; + + struct slow_oam_common_header_t { + u_int8_t flags[2]; + u_int8_t code; + }; + + struct slow_oam_tlv_header_t { + u_int8_t type; + u_int8_t length; + }; + + union { + const struct slow_oam_common_header_t *slow_oam_common_header; + const struct slow_oam_tlv_header_t *slow_oam_tlv_header; + } ptr; + + union { + const struct slow_oam_info_t *slow_oam_info; + const struct slow_oam_link_event_t *slow_oam_link_event; + const struct slow_oam_variablerequest_t *slow_oam_variablerequest; + const struct slow_oam_variableresponse_t *slow_oam_variableresponse; + const struct slow_oam_loopbackctrl_t *slow_oam_loopbackctrl; + } tlv; + + ptr.slow_oam_common_header = (struct slow_oam_common_header_t *)tptr; + tptr += sizeof(struct slow_oam_common_header_t); + tlen -= sizeof(struct slow_oam_common_header_t); + + printf("\n\tCode %s OAM PDU, Flags [%s]", + tok2str(slow_oam_code_values, "Unknown (%u)", ptr.slow_oam_common_header->code), + bittok2str(slow_oam_flag_values, + "none", + EXTRACT_16BITS(&ptr.slow_oam_common_header->flags))); + + switch (ptr.slow_oam_common_header->code) { + case SLOW_OAM_CODE_INFO: + while (tlen > 0) { + ptr.slow_oam_tlv_header = (const struct slow_oam_tlv_header_t *)tptr; + printf("\n\t %s Information Type (%u), length %u", + tok2str(slow_oam_info_type_values, "Reserved", + ptr.slow_oam_tlv_header->type), + ptr.slow_oam_tlv_header->type, + ptr.slow_oam_tlv_header->length); + + hexdump = FALSE; + switch (ptr.slow_oam_tlv_header->type) { + case SLOW_OAM_INFO_TYPE_END_OF_TLV: + if (ptr.slow_oam_tlv_header->length != 0) { + printf("\n\t ERROR: illegal length - should be 0"); + } + return; + + case SLOW_OAM_INFO_TYPE_LOCAL: /* identical format - fall through */ + case SLOW_OAM_INFO_TYPE_REMOTE: + tlv.slow_oam_info = (const struct slow_oam_info_t *)tptr; + + if (tlv.slow_oam_info->info_length != + sizeof(struct slow_oam_info_t)) { + printf("\n\t ERROR: illegal length - should be %lu", + (unsigned long) sizeof(struct slow_oam_info_t)); + return; + } + + printf("\n\t OAM-Version %u, Revision %u", + tlv.slow_oam_info->oam_version, + EXTRACT_16BITS(&tlv.slow_oam_info->revision)); + + printf("\n\t State-Parser-Action %s, State-MUX-Action %s", + tok2str(slow_oam_info_type_state_parser_values, "Reserved", + tlv.slow_oam_info->state & OAM_INFO_TYPE_PARSER_MASK), + tok2str(slow_oam_info_type_state_mux_values, "Reserved", + tlv.slow_oam_info->state & OAM_INFO_TYPE_MUX_MASK)); + printf("\n\t OAM-Config Flags [%s], OAM-PDU-Config max-PDU size %u", + bittok2str(slow_oam_info_type_oam_config_values, "none", + tlv.slow_oam_info->oam_config), + EXTRACT_16BITS(&tlv.slow_oam_info->oam_pdu_config) & + OAM_INFO_TYPE_PDU_SIZE_MASK); + printf("\n\t OUI %s (0x%06x), Vendor-Private 0x%08x", + tok2str(oui_values, "Unknown", + EXTRACT_24BITS(&tlv.slow_oam_info->oui)), + EXTRACT_24BITS(&tlv.slow_oam_info->oui), + EXTRACT_32BITS(&tlv.slow_oam_info->vendor_private)); + break; + + case SLOW_OAM_INFO_TYPE_ORG_SPECIFIC: + hexdump = TRUE; + break; + + default: + hexdump = TRUE; + break; + } + + /* infinite loop check */ + if (!ptr.slow_oam_tlv_header->length) { + return; + } + + /* do we also want to see a hex dump ? */ + if (vflag > 1 || hexdump==TRUE) { + print_unknown_data(tptr,"\n\t ", + ptr.slow_oam_tlv_header->length); + } + + tlen -= ptr.slow_oam_tlv_header->length; + tptr += ptr.slow_oam_tlv_header->length; + } + break; + + case SLOW_OAM_CODE_EVENT_NOTIF: + while (tlen > 0) { + ptr.slow_oam_tlv_header = (const struct slow_oam_tlv_header_t *)tptr; + printf("\n\t %s Link Event Type (%u), length %u", + tok2str(slow_oam_link_event_values, "Reserved", + ptr.slow_oam_tlv_header->type), + ptr.slow_oam_tlv_header->type, + ptr.slow_oam_tlv_header->length); + + hexdump = FALSE; + switch (ptr.slow_oam_tlv_header->type) { + case SLOW_OAM_LINK_EVENT_END_OF_TLV: + if (ptr.slow_oam_tlv_header->length != 0) { + printf("\n\t ERROR: illegal length - should be 0"); + } + return; + + case SLOW_OAM_LINK_EVENT_ERR_SYM_PER: /* identical format - fall through */ + case SLOW_OAM_LINK_EVENT_ERR_FRM: + case SLOW_OAM_LINK_EVENT_ERR_FRM_PER: + case SLOW_OAM_LINK_EVENT_ERR_FRM_SUMM: + tlv.slow_oam_link_event = (const struct slow_oam_link_event_t *)tptr; + + if (tlv.slow_oam_link_event->event_length != + sizeof(struct slow_oam_link_event_t)) { + printf("\n\t ERROR: illegal length - should be %lu", + (unsigned long) sizeof(struct slow_oam_link_event_t)); + return; + } + + printf("\n\t Timestamp %u ms, Errored Window %" PRIu64 + "\n\t Errored Threshold %" PRIu64 + "\n\t Errors %" PRIu64 + "\n\t Error Running Total %" PRIu64 + "\n\t Event Running Total %u", + EXTRACT_16BITS(&tlv.slow_oam_link_event->time_stamp)*100, + EXTRACT_64BITS(&tlv.slow_oam_link_event->window), + EXTRACT_64BITS(&tlv.slow_oam_link_event->threshold), + EXTRACT_64BITS(&tlv.slow_oam_link_event->errors), + EXTRACT_64BITS(&tlv.slow_oam_link_event->errors_running_total), + EXTRACT_32BITS(&tlv.slow_oam_link_event->event_running_total)); + break; + + case SLOW_OAM_LINK_EVENT_ORG_SPECIFIC: + hexdump = TRUE; + break; + + default: + hexdump = TRUE; + break; + } + + /* infinite loop check */ + if (!ptr.slow_oam_tlv_header->length) { + return; + } + + /* do we also want to see a hex dump ? */ + if (vflag > 1 || hexdump==TRUE) { + print_unknown_data(tptr,"\n\t ", + ptr.slow_oam_tlv_header->length); + } + + tlen -= ptr.slow_oam_tlv_header->length; + tptr += ptr.slow_oam_tlv_header->length; + } + break; + + case SLOW_OAM_CODE_LOOPBACK_CTRL: + tlv.slow_oam_loopbackctrl = (const struct slow_oam_loopbackctrl_t *)tptr; + printf("\n\t Command %s (%u)", + tok2str(slow_oam_loopbackctrl_cmd_values, + "Unknown", + tlv.slow_oam_loopbackctrl->command), + tlv.slow_oam_loopbackctrl->command); + tptr ++; + tlen --; + break; + + /* + * FIXME those are the defined codes that lack a decoder + * you are welcome to contribute code ;-) + */ + case SLOW_OAM_CODE_VAR_REQUEST: + case SLOW_OAM_CODE_VAR_RESPONSE: + case SLOW_OAM_CODE_PRIVATE: + default: + if (vflag <= 1) { + print_unknown_data(tptr,"\n\t ", tlen); + } + break; + } + return; +} diff --git a/print-smb.c b/print-smb.c index 5b963de94bd1..391f1860c6d9 100644 --- a/print-smb.c +++ b/print-smb.c @@ -12,7 +12,7 @@ #ifndef lint static const char rcsid[] _U_ = - "@(#) $Header: /tcpdump/master/tcpdump/print-smb.c,v 1.41.2.4 2007/07/14 22:29:05 guy Exp $"; + "@(#) $Header: /tcpdump/master/tcpdump/print-smb.c,v 1.46.2.1 2007-12-09 00:31:35 guy Exp $"; #endif #include @@ -1244,7 +1244,47 @@ nbt_udp137_print(const u_char *data, int length) return; } +/* + * Print an SMB-over-TCP packet received across tcp on port 445 + */ +void +smb_tcp_print (const u_char * data, int length) +{ + int caplen; + u_int smb_len; + const u_char *maxbuf; + if (length < 4) + goto trunc; + if (snapend < data) + goto trunc; + caplen = snapend - data; + if (caplen < 4) + goto trunc; + maxbuf = data + caplen; + smb_len = EXTRACT_24BITS(data + 1); + length -= 4; + caplen -= 4; + + startbuf = data; + data += 4; + + if (smb_len >= 4 && caplen >= 4 && memcmp(data,"\377SMB",4) == 0) { + if ((int)smb_len > caplen) { + if ((int)smb_len > length) + printf("WARNING: Packet is continued in later TCP segments\n"); + else + printf("WARNING: Short packet. Try increasing the snap length by %d\n", + smb_len - caplen); + } + print_smb(data, maxbuf > data + smb_len ? data + smb_len : maxbuf); + } else + printf("SMB-over-TCP packet:(raw data or continuation?)\n"); + return; +trunc: + printf("[|SMB]"); + return; +} /* * print a NBT packet received across udp on port 138 @@ -1459,8 +1499,7 @@ ipx_netbios_print(const u_char *data, u_int length) break; if (memcmp(&data[i], "\377SMB", 4) == 0) { smb_fdata(data, "\n>>> IPX transport ", &data[i], 0); - if (data != NULL) - print_smb(&data[i], maxbuf); + print_smb(&data[i], maxbuf); printf("\n"); fflush(stdout); break; diff --git a/print-snmp.c b/print-snmp.c index 0686b6223074..728da6beb79e 100644 --- a/print-snmp.c +++ b/print-snmp.c @@ -58,7 +58,7 @@ #ifndef lint static const char rcsid[] _U_ = - "@(#) $Header: /tcpdump/master/tcpdump/print-snmp.c,v 1.62.2.2 2005/05/06 07:57:19 guy Exp $ (LBL)"; + "@(#) $Header: /tcpdump/master/tcpdump/print-snmp.c,v 1.64 2005-05-06 07:56:53 guy Exp $ (LBL)"; #endif #ifdef HAVE_CONFIG_H diff --git a/print-stp.c b/print-stp.c index 4308ae01b94b..8822c3046d0b 100644 --- a/print-stp.c +++ b/print-stp.c @@ -11,7 +11,7 @@ #ifndef lint static const char rcsid[] _U_ = -"@(#) $Header: /tcpdump/master/tcpdump/print-stp.c,v 1.13.2.7 2007/03/18 17:12:36 hannes Exp $"; +"@(#) $Header: /tcpdump/master/tcpdump/print-stp.c,v 1.20 2007-03-18 17:11:46 hannes Exp $"; #endif #ifdef HAVE_CONFIG_H diff --git a/print-sunatm.c b/print-sunatm.c index acd38bf7eeb8..e6f19e8586f1 100644 --- a/print-sunatm.c +++ b/print-sunatm.c @@ -31,7 +31,7 @@ */ #ifndef lint static const char rcsid[] _U_ = - "@(#) $Header: /tcpdump/master/tcpdump/print-sunatm.c,v 1.8 2004/03/17 23:24:38 guy Exp $ (LBL)"; + "@(#) $Header: /tcpdump/master/tcpdump/print-sunatm.c,v 1.8 2004-03-17 23:24:38 guy Exp $ (LBL)"; #endif #ifdef HAVE_CONFIG_H diff --git a/print-sunrpc.c b/print-sunrpc.c index 03e28a489b0e..bfb2fe9a7910 100644 --- a/print-sunrpc.c +++ b/print-sunrpc.c @@ -21,7 +21,7 @@ #ifndef lint static const char rcsid[] _U_ = - "@(#) $Header: /tcpdump/master/tcpdump/print-sunrpc.c,v 1.46.2.1 2005/04/27 21:44:06 guy Exp $ (LBL)"; + "@(#) $Header: /tcpdump/master/tcpdump/print-sunrpc.c,v 1.47 2005-04-27 21:43:48 guy Exp $ (LBL)"; #endif #ifdef HAVE_CONFIG_H diff --git a/print-symantec.c b/print-symantec.c index eb72180850f1..ebb62cd4d135 100644 --- a/print-symantec.c +++ b/print-symantec.c @@ -20,7 +20,7 @@ */ #ifndef lint static const char rcsid[] _U_ = - "@(#) $Header: /tcpdump/master/tcpdump/print-symantec.c,v 1.4.2.1 2005/07/07 01:24:39 guy Exp $ (LBL)"; + "@(#) $Header: /tcpdump/master/tcpdump/print-symantec.c,v 1.5 2005-07-07 01:22:21 guy Exp $ (LBL)"; #endif #ifdef HAVE_CONFIG_H diff --git a/print-syslog.c b/print-syslog.c index 099d027b2580..3685d62042a0 100755 --- a/print-syslog.c +++ b/print-syslog.c @@ -16,7 +16,7 @@ #ifndef lint static const char rcsid[] _U_ = - "@(#) $Header: /tcpdump/master/tcpdump/print-syslog.c,v 1.1 2004/10/29 11:42:53 hannes Exp $"; + "@(#) $Header: /tcpdump/master/tcpdump/print-syslog.c,v 1.1 2004-10-29 11:42:53 hannes Exp $"; #endif #ifdef HAVE_CONFIG_H diff --git a/print-tcp.c b/print-tcp.c index 11bd6b7ab46f..5b0a7969a583 100644 --- a/print-tcp.c +++ b/print-tcp.c @@ -1,3 +1,5 @@ +/* $NetBSD: print-tcp.c,v 1.9 2007/07/26 18:15:12 plunky Exp $ */ + /* * Copyright (c) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997 * The Regents of the University of California. All rights reserved. @@ -23,7 +25,9 @@ #ifndef lint static const char rcsid[] _U_ = - "@(#) $Header: /tcpdump/master/tcpdump/print-tcp.c,v 1.120.2.3 2005/10/16 06:05:46 guy Exp $ (LBL)"; +"@(#) $Header: /tcpdump/master/tcpdump/print-tcp.c,v 1.130.2.3 2007-12-22 03:08:45 guy Exp $ (LBL)"; + #else +__RCSID("$NetBSD: print-tcp.c,v 1.8 2007/07/24 11:53:48 drochner Exp $"); #endif #ifdef HAVE_CONFIG_H @@ -60,7 +64,7 @@ static const char rcsid[] _U_ = #define CANT_CHECK_SIGNATURE 2 static int tcp_verify_signature(const struct ip *ip, const struct tcphdr *tp, - const u_char *data, int length, const u_char *rcvsig); + const u_char *data, int length, const u_char *rcvsig); #endif static void print_tcp_rst_data(register const u_char *sp, u_int length); @@ -70,20 +74,20 @@ static void print_tcp_rst_data(register const u_char *sp, u_int length); struct tha { #ifndef INET6 - struct in_addr src; - struct in_addr dst; + struct in_addr src; + struct in_addr dst; #else - struct in6_addr src; - struct in6_addr dst; + struct in6_addr src; + struct in6_addr dst; #endif /*INET6*/ - u_int port; + u_int port; }; struct tcp_seq_hash { - struct tcp_seq_hash *nxt; - struct tha addr; - tcp_seq seq; - tcp_seq ack; + struct tcp_seq_hash *nxt; + struct tha addr; + tcp_seq seq; + tcp_seq ack; }; #define TSEQ_HASHSIZE 919 @@ -93,97 +97,95 @@ struct tcp_seq_hash { static struct tcp_seq_hash tcp_seq_hash[TSEQ_HASHSIZE]; +struct tok tcp_flag_values[] = { + { TH_FIN, "F" }, + { TH_SYN, "S" }, + { TH_RST, "R" }, + { TH_PUSH, "P" }, + { TH_ACK, "." }, + { TH_URG, "U" }, + { TH_ECNECHO, "E" }, + { TH_CWR, "W" }, + { 0, NULL } +}; -#ifndef TELNET_PORT -#define TELNET_PORT 23 -#endif -#ifndef BGP_PORT -#define BGP_PORT 179 -#endif -#define NETBIOS_SSN_PORT 139 -#ifndef PPTP_PORT -#define PPTP_PORT 1723 -#endif -#define BEEP_PORT 10288 -#ifndef NFS_PORT -#define NFS_PORT 2049 -#endif -#define MSDP_PORT 639 -#define LDP_PORT 646 +struct tok tcp_option_values[] = { + { TCPOPT_EOL, "eol" }, + { TCPOPT_NOP, "nop" }, + { TCPOPT_MAXSEG, "mss" }, + { TCPOPT_WSCALE, "wscale" }, + { TCPOPT_SACKOK, "sackOK" }, + { TCPOPT_SACK, "sack" }, + { TCPOPT_ECHO, "echo" }, + { TCPOPT_ECHOREPLY, "echoreply" }, + { TCPOPT_TIMESTAMP, "TS" }, + { TCPOPT_CC, "cc" }, + { TCPOPT_CCNEW, "ccnew" }, + { TCPOPT_CCECHO, "" }, + { TCPOPT_SIGNATURE, "md5" }, + { TCPOPT_AUTH, "enhanced auth" }, + { 0, NULL } +}; static int tcp_cksum(register const struct ip *ip, register const struct tcphdr *tp, register u_int len) { - union phu { - struct phdr { - u_int32_t src; - u_int32_t dst; - u_char mbz; - u_char proto; - u_int16_t len; - } ph; - u_int16_t pa[6]; - } phu; - const u_int16_t *sp; + union phu { + struct phdr { + u_int32_t src; + u_int32_t dst; + u_char mbz; + u_char proto; + u_int16_t len; + } ph; + u_int16_t pa[6]; + } phu; + const u_int16_t *sp; - /* pseudo-header.. */ - phu.ph.len = htons((u_int16_t)len); - phu.ph.mbz = 0; - phu.ph.proto = IPPROTO_TCP; - memcpy(&phu.ph.src, &ip->ip_src.s_addr, sizeof(u_int32_t)); - if (IP_HL(ip) == 5) - memcpy(&phu.ph.dst, &ip->ip_dst.s_addr, sizeof(u_int32_t)); - else - phu.ph.dst = ip_finddst(ip); + /* pseudo-header.. */ + phu.ph.len = htons((u_int16_t)len); + phu.ph.mbz = 0; + phu.ph.proto = IPPROTO_TCP; + memcpy(&phu.ph.src, &ip->ip_src.s_addr, sizeof(u_int32_t)); + if (IP_HL(ip) == 5) + memcpy(&phu.ph.dst, &ip->ip_dst.s_addr, sizeof(u_int32_t)); + else + phu.ph.dst = ip_finddst(ip); - sp = &phu.pa[0]; - return in_cksum((u_short *)tp, len, - sp[0]+sp[1]+sp[2]+sp[3]+sp[4]+sp[5]); + sp = &phu.pa[0]; + return in_cksum((u_short *)tp, len, + sp[0]+sp[1]+sp[2]+sp[3]+sp[4]+sp[5]); } #ifdef INET6 static int tcp6_cksum(const struct ip6_hdr *ip6, const struct tcphdr *tp, - u_int len) + u_int len) { - size_t i; - register const u_int16_t *sp; - u_int32_t sum; - union { - struct { - struct in6_addr ph_src; - struct in6_addr ph_dst; - u_int32_t ph_len; - u_int8_t ph_zero[3]; - u_int8_t ph_nxt; - } ph; - u_int16_t pa[20]; - } phu; + size_t i; + u_int32_t sum = 0; + union { + struct { + struct in6_addr ph_src; + struct in6_addr ph_dst; + u_int32_t ph_len; + u_int8_t ph_zero[3]; + u_int8_t ph_nxt; + } ph; + u_int16_t pa[20]; + } phu; - /* pseudo-header */ - memset(&phu, 0, sizeof(phu)); - phu.ph.ph_src = ip6->ip6_src; - phu.ph.ph_dst = ip6->ip6_dst; - phu.ph.ph_len = htonl(len); - phu.ph.ph_nxt = IPPROTO_TCP; + /* pseudo-header */ + memset(&phu, 0, sizeof(phu)); + phu.ph.ph_src = ip6->ip6_src; + phu.ph.ph_dst = ip6->ip6_dst; + phu.ph.ph_len = htonl(len); + phu.ph.ph_nxt = IPPROTO_TCP; - sum = 0; - for (i = 0; i < sizeof(phu.pa) / sizeof(phu.pa[0]); i++) - sum += phu.pa[i]; + for (i = 0; i < sizeof(phu.pa) / sizeof(phu.pa[0]); i++) + sum += phu.pa[i]; - sp = (const u_int16_t *)tp; - - for (i = 0; i < (len & ~1); i += 2) - sum += *sp++; - - if (len & 1) - sum += htons((*(const u_int8_t *)sp) << 8); - - while (sum > 0xffff) - sum = (sum & 0xffff) + (sum >> 16); - sum = ~sum & 0xffff; - - return (sum); + return in_cksum((u_short *)tp, len, sum); } #endif @@ -191,507 +193,509 @@ void tcp_print(register const u_char *bp, register u_int length, register const u_char *bp2, int fragmented) { - register const struct tcphdr *tp; - register const struct ip *ip; - register u_char flags; - register u_int hlen; - register char ch; - u_int16_t sport, dport, win, urp; - u_int32_t seq, ack, thseq, thack; - int threv; + register const struct tcphdr *tp; + register const struct ip *ip; + register u_char flags; + register u_int hlen; + register char ch; + u_int16_t sport, dport, win, urp; + u_int32_t seq, ack, thseq, thack; + int threv; #ifdef INET6 - register const struct ip6_hdr *ip6; + register const struct ip6_hdr *ip6; #endif - tp = (struct tcphdr *)bp; - ip = (struct ip *)bp2; + tp = (struct tcphdr *)bp; + ip = (struct ip *)bp2; #ifdef INET6 - if (IP_V(ip) == 6) - ip6 = (struct ip6_hdr *)bp2; - else - ip6 = NULL; + if (IP_V(ip) == 6) + ip6 = (struct ip6_hdr *)bp2; + else + ip6 = NULL; #endif /*INET6*/ - ch = '\0'; - if (!TTEST(tp->th_dport)) { - (void)printf("%s > %s: [|tcp]", - ipaddr_string(&ip->ip_src), - ipaddr_string(&ip->ip_dst)); - return; - } + ch = '\0'; + if (!TTEST(tp->th_dport)) { + (void)printf("%s > %s: [|tcp]", + ipaddr_string(&ip->ip_src), + ipaddr_string(&ip->ip_dst)); + return; + } - sport = EXTRACT_16BITS(&tp->th_sport); - dport = EXTRACT_16BITS(&tp->th_dport); + sport = EXTRACT_16BITS(&tp->th_sport); + dport = EXTRACT_16BITS(&tp->th_dport); - hlen = TH_OFF(tp) * 4; + hlen = TH_OFF(tp) * 4; - /* + /* * If data present, header length valid, and NFS port used, * assume NFS. * Pass offset of data plus 4 bytes for RPC TCP msg length * to NFS print routines. */ - if (!qflag && hlen >= sizeof(*tp) && hlen <= length) { - if ((u_char *)tp + 4 + sizeof(struct sunrpc_msg) <= snapend && - dport == NFS_PORT) { - nfsreq_print((u_char *)tp + hlen + 4, length - hlen, - (u_char *)ip); - return; - } else if ((u_char *)tp + 4 + sizeof(struct sunrpc_msg) - <= snapend && - sport == NFS_PORT) { - nfsreply_print((u_char *)tp + hlen + 4, length - hlen, - (u_char *)ip); - return; - } - } + if (!qflag && hlen >= sizeof(*tp) && hlen <= length && + (length - hlen) >= 4) { + u_char *fraglenp; + u_int32_t fraglen; + register struct sunrpc_msg *rp; + enum sunrpc_msg_type direction; + + fraglenp = (u_char *)tp + hlen; + if (TTEST2(*fraglenp, 4)) { + fraglen = EXTRACT_32BITS(fraglenp) & 0x7FFFFFFF; + if (fraglen > (length - hlen) - 4) + fraglen = (length - hlen) - 4; + rp = (struct sunrpc_msg *)(fraglenp + 4); + if (TTEST(rp->rm_direction)) { + direction = (enum sunrpc_msg_type)EXTRACT_32BITS(&rp->rm_direction); + if (dport == NFS_PORT && + direction == SUNRPC_CALL) { + nfsreq_print((u_char *)rp, fraglen, + (u_char *)ip); + return; + } + if (sport == NFS_PORT && + direction == SUNRPC_REPLY) { + nfsreply_print((u_char *)rp, fraglen, + (u_char *)ip); + return; + } + } + } + } #ifdef INET6 - if (ip6) { - if (ip6->ip6_nxt == IPPROTO_TCP) { - (void)printf("%s.%s > %s.%s: ", - ip6addr_string(&ip6->ip6_src), - tcpport_string(sport), - ip6addr_string(&ip6->ip6_dst), - tcpport_string(dport)); - } else { - (void)printf("%s > %s: ", - tcpport_string(sport), tcpport_string(dport)); - } - } else + if (ip6) { + if (ip6->ip6_nxt == IPPROTO_TCP) { + (void)printf("%s.%s > %s.%s: ", + ip6addr_string(&ip6->ip6_src), + tcpport_string(sport), + ip6addr_string(&ip6->ip6_dst), + tcpport_string(dport)); + } else { + (void)printf("%s > %s: ", + tcpport_string(sport), tcpport_string(dport)); + } + } else #endif /*INET6*/ - { - if (ip->ip_p == IPPROTO_TCP) { - (void)printf("%s.%s > %s.%s: ", - ipaddr_string(&ip->ip_src), - tcpport_string(sport), - ipaddr_string(&ip->ip_dst), - tcpport_string(dport)); - } else { - (void)printf("%s > %s: ", - tcpport_string(sport), tcpport_string(dport)); - } - } + { + if (ip->ip_p == IPPROTO_TCP) { + (void)printf("%s.%s > %s.%s: ", + ipaddr_string(&ip->ip_src), + tcpport_string(sport), + ipaddr_string(&ip->ip_dst), + tcpport_string(dport)); + } else { + (void)printf("%s > %s: ", + tcpport_string(sport), tcpport_string(dport)); + } + } - if (hlen < sizeof(*tp)) { - (void)printf(" tcp %d [bad hdr length %u - too short, < %lu]", - length - hlen, hlen, (unsigned long)sizeof(*tp)); - return; - } + if (hlen < sizeof(*tp)) { + (void)printf(" tcp %d [bad hdr length %u - too short, < %lu]", + length - hlen, hlen, (unsigned long)sizeof(*tp)); + return; + } - TCHECK(*tp); + TCHECK(*tp); - seq = EXTRACT_32BITS(&tp->th_seq); - ack = EXTRACT_32BITS(&tp->th_ack); - win = EXTRACT_16BITS(&tp->th_win); - urp = EXTRACT_16BITS(&tp->th_urp); + seq = EXTRACT_32BITS(&tp->th_seq); + ack = EXTRACT_32BITS(&tp->th_ack); + win = EXTRACT_16BITS(&tp->th_win); + urp = EXTRACT_16BITS(&tp->th_urp); - if (qflag) { - (void)printf("tcp %d", length - hlen); - if (hlen > length) { - (void)printf(" [bad hdr length %u - too long, > %u]", - hlen, length); - } - return; - } - if ((flags = tp->th_flags) & (TH_SYN|TH_FIN|TH_RST|TH_PUSH| - TH_ECNECHO|TH_CWR)) { - if (flags & TH_SYN) - putchar('S'); - if (flags & TH_FIN) - putchar('F'); - if (flags & TH_RST) - putchar('R'); - if (flags & TH_PUSH) - putchar('P'); - if (flags & TH_CWR) - putchar('W'); /* congestion _W_indow reduced (ECN) */ - if (flags & TH_ECNECHO) - putchar('E'); /* ecn _E_cho sent (ECN) */ - } else - putchar('.'); + if (qflag) { + (void)printf("tcp %d", length - hlen); + if (hlen > length) { + (void)printf(" [bad hdr length %u - too long, > %u]", + hlen, length); + } + return; + } - if (!Sflag && (flags & TH_ACK)) { - register struct tcp_seq_hash *th; - const void *src, *dst; - register int rev; - struct tha tha; - /* - * Find (or record) the initial sequence numbers for - * this conversation. (we pick an arbitrary - * collating order so there's only one entry for - * both directions). - */ + flags = tp->th_flags; + printf("Flags [%s]", bittok2str_nosep(tcp_flag_values, "none", flags)); + + if (!Sflag && (flags & TH_ACK)) { + register struct tcp_seq_hash *th; + const void *src, *dst; + register int rev; + struct tha tha; + /* + * Find (or record) the initial sequence numbers for + * this conversation. (we pick an arbitrary + * collating order so there's only one entry for + * both directions). + */ #ifdef INET6 - memset(&tha, 0, sizeof(tha)); - rev = 0; - if (ip6) { - src = &ip6->ip6_src; - dst = &ip6->ip6_dst; - if (sport > dport) - rev = 1; - else if (sport == dport) { - if (memcmp(src, dst, sizeof ip6->ip6_dst) > 0) - rev = 1; - } - if (rev) { - memcpy(&tha.src, dst, sizeof ip6->ip6_dst); - memcpy(&tha.dst, src, sizeof ip6->ip6_src); - tha.port = dport << 16 | sport; - } else { - memcpy(&tha.dst, dst, sizeof ip6->ip6_dst); - memcpy(&tha.src, src, sizeof ip6->ip6_src); - tha.port = sport << 16 | dport; - } - } else { - src = &ip->ip_src; - dst = &ip->ip_dst; - if (sport > dport) - rev = 1; - else if (sport == dport) { - if (memcmp(src, dst, sizeof ip->ip_dst) > 0) - rev = 1; - } - if (rev) { - memcpy(&tha.src, dst, sizeof ip->ip_dst); - memcpy(&tha.dst, src, sizeof ip->ip_src); - tha.port = dport << 16 | sport; - } else { - memcpy(&tha.dst, dst, sizeof ip->ip_dst); - memcpy(&tha.src, src, sizeof ip->ip_src); - tha.port = sport << 16 | dport; - } - } + memset(&tha, 0, sizeof(tha)); + rev = 0; + if (ip6) { + src = &ip6->ip6_src; + dst = &ip6->ip6_dst; + if (sport > dport) + rev = 1; + else if (sport == dport) { + if (memcmp(src, dst, sizeof ip6->ip6_dst) > 0) + rev = 1; + } + if (rev) { + memcpy(&tha.src, dst, sizeof ip6->ip6_dst); + memcpy(&tha.dst, src, sizeof ip6->ip6_src); + tha.port = dport << 16 | sport; + } else { + memcpy(&tha.dst, dst, sizeof ip6->ip6_dst); + memcpy(&tha.src, src, sizeof ip6->ip6_src); + tha.port = sport << 16 | dport; + } + } else { + src = &ip->ip_src; + dst = &ip->ip_dst; + if (sport > dport) + rev = 1; + else if (sport == dport) { + if (memcmp(src, dst, sizeof ip->ip_dst) > 0) + rev = 1; + } + if (rev) { + memcpy(&tha.src, dst, sizeof ip->ip_dst); + memcpy(&tha.dst, src, sizeof ip->ip_src); + tha.port = dport << 16 | sport; + } else { + memcpy(&tha.dst, dst, sizeof ip->ip_dst); + memcpy(&tha.src, src, sizeof ip->ip_src); + tha.port = sport << 16 | dport; + } + } #else - rev = 0; - src = &ip->ip_src; - dst = &ip->ip_dst; - if (sport > dport) - rev = 1; - else if (sport == dport) { - if (memcmp(src, dst, sizeof ip->ip_dst) > 0) - rev = 1; - } - if (rev) { - memcpy(&tha.src, dst, sizeof ip->ip_dst); - memcpy(&tha.dst, src, sizeof ip->ip_src); - tha.port = dport << 16 | sport; - } else { - memcpy(&tha.dst, dst, sizeof ip->ip_dst); - memcpy(&tha.src, src, sizeof ip->ip_src); - tha.port = sport << 16 | dport; - } + rev = 0; + src = &ip->ip_src; + dst = &ip->ip_dst; + if (sport > dport) + rev = 1; + else if (sport == dport) { + if (memcmp(src, dst, sizeof ip->ip_dst) > 0) + rev = 1; + } + if (rev) { + memcpy(&tha.src, dst, sizeof ip->ip_dst); + memcpy(&tha.dst, src, sizeof ip->ip_src); + tha.port = dport << 16 | sport; + } else { + memcpy(&tha.dst, dst, sizeof ip->ip_dst); + memcpy(&tha.src, src, sizeof ip->ip_src); + tha.port = sport << 16 | dport; + } #endif - threv = rev; - for (th = &tcp_seq_hash[tha.port % TSEQ_HASHSIZE]; - th->nxt; th = th->nxt) - if (memcmp((char *)&tha, (char *)&th->addr, - sizeof(th->addr)) == 0) - break; + threv = rev; + for (th = &tcp_seq_hash[tha.port % TSEQ_HASHSIZE]; + th->nxt; th = th->nxt) + if (memcmp((char *)&tha, (char *)&th->addr, + sizeof(th->addr)) == 0) + break; - if (!th->nxt || (flags & TH_SYN)) { - /* didn't find it or new conversation */ - if (th->nxt == NULL) { - th->nxt = (struct tcp_seq_hash *) - calloc(1, sizeof(*th)); - if (th->nxt == NULL) - error("tcp_print: calloc"); - } - th->addr = tha; - if (rev) - th->ack = seq, th->seq = ack - 1; - else - th->seq = seq, th->ack = ack - 1; - } else { - if (rev) - seq -= th->ack, ack -= th->seq; - else - seq -= th->seq, ack -= th->ack; - } + if (!th->nxt || (flags & TH_SYN)) { + /* didn't find it or new conversation */ + if (th->nxt == NULL) { + th->nxt = (struct tcp_seq_hash *) + calloc(1, sizeof(*th)); + if (th->nxt == NULL) + error("tcp_print: calloc"); + } + th->addr = tha; + if (rev) + th->ack = seq, th->seq = ack - 1; + else + th->seq = seq, th->ack = ack - 1; + } else { + if (rev) + seq -= th->ack, ack -= th->seq; + else + seq -= th->seq, ack -= th->ack; + } - thseq = th->seq; - thack = th->ack; - } else { - /*fool gcc*/ - thseq = thack = threv = 0; - } - if (hlen > length) { - (void)printf(" [bad hdr length %u - too long, > %u]", - hlen, length); - return; - } + thseq = th->seq; + thack = th->ack; + } else { + /*fool gcc*/ + thseq = thack = threv = 0; + } + if (hlen > length) { + (void)printf(" [bad hdr length %u - too long, > %u]", + hlen, length); + return; + } - if (IP_V(ip) == 4 && vflag && !fragmented) { - u_int16_t sum, tcp_sum; - if (TTEST2(tp->th_sport, length)) { - sum = tcp_cksum(ip, tp, length); + if (IP_V(ip) == 4 && vflag && !Kflag && !fragmented) { + u_int16_t sum, tcp_sum; + if (TTEST2(tp->th_sport, length)) { + sum = tcp_cksum(ip, tp, length); (void)printf(", cksum 0x%04x",EXTRACT_16BITS(&tp->th_sum)); - if (sum != 0) { - tcp_sum = EXTRACT_16BITS(&tp->th_sum); - (void)printf(" (incorrect (-> 0x%04x),",in_cksum_shouldbe(tcp_sum, sum)); - } else - (void)printf(" (correct),"); - } - } + if (sum != 0) { + tcp_sum = EXTRACT_16BITS(&tp->th_sum); + (void)printf(" (incorrect -> 0x%04x)",in_cksum_shouldbe(tcp_sum, sum)); + } else + (void)printf(" (correct)"); + } + } #ifdef INET6 - if (IP_V(ip) == 6 && ip6->ip6_plen && vflag && !fragmented) { - u_int16_t sum,tcp_sum; - if (TTEST2(tp->th_sport, length)) { - sum = tcp6_cksum(ip6, tp, length); + if (IP_V(ip) == 6 && ip6->ip6_plen && vflag && !Kflag && !fragmented) { + u_int16_t sum,tcp_sum; + if (TTEST2(tp->th_sport, length)) { + sum = tcp6_cksum(ip6, tp, length); (void)printf(", cksum 0x%04x",EXTRACT_16BITS(&tp->th_sum)); - if (sum != 0) { - tcp_sum = EXTRACT_16BITS(&tp->th_sum); - (void)printf(" (incorrect (-> 0x%04x),",in_cksum_shouldbe(tcp_sum, sum)); - } else - (void)printf(" (correct),"); + if (sum != 0) { + tcp_sum = EXTRACT_16BITS(&tp->th_sum); + (void)printf(" (incorrect -> 0x%04x)",in_cksum_shouldbe(tcp_sum, sum)); + } else + (void)printf(" (correct)"); - } - } + } + } #endif - length -= hlen; - if (vflag > 1 || length > 0 || flags & (TH_SYN | TH_FIN | TH_RST)) - (void)printf(" %u:%u(%u)", seq, seq + length, length); - if (flags & TH_ACK) - (void)printf(" ack %u", ack); + length -= hlen; + if (vflag > 1 || flags & (TH_SYN | TH_FIN | TH_RST)) { + (void)printf(", seq %u", seq); - (void)printf(" win %d", win); + if (length > 0) { + (void)printf(":%u", seq + length); + } + } - if (flags & TH_URG) - (void)printf(" urg %d", urp); - /* - * Handle any options. - */ - if (hlen > sizeof(*tp)) { - register const u_char *cp; - register u_int i, opt, datalen; - register u_int len; + if (flags & TH_ACK) { + (void)printf(", ack %u", ack); + } - hlen -= sizeof(*tp); - cp = (const u_char *)tp + sizeof(*tp); - putchar(' '); - ch = '<'; - while (hlen > 0) { - putchar(ch); - TCHECK(*cp); - opt = *cp++; - if (ZEROLENOPT(opt)) - len = 1; - else { - TCHECK(*cp); - len = *cp++; /* total including type, len */ - if (len < 2 || len > hlen) - goto bad; - --hlen; /* account for length byte */ - } - --hlen; /* account for type byte */ - datalen = 0; + (void)printf(", win %d", win); + + if (flags & TH_URG) + (void)printf(", urg %d", urp); + /* + * Handle any options. + */ + if (hlen > sizeof(*tp)) { + register const u_char *cp; + register u_int i, opt, datalen; + register u_int len; + + hlen -= sizeof(*tp); + cp = (const u_char *)tp + sizeof(*tp); + printf(", options ["); + while (hlen > 0) { + if (ch != '\0') + putchar(ch); + TCHECK(*cp); + opt = *cp++; + if (ZEROLENOPT(opt)) + len = 1; + else { + TCHECK(*cp); + len = *cp++; /* total including type, len */ + if (len < 2 || len > hlen) + goto bad; + --hlen; /* account for length byte */ + } + --hlen; /* account for type byte */ + datalen = 0; /* Bail if "l" bytes of data are not left or were not captured */ #define LENCHECK(l) { if ((l) > hlen) goto bad; TCHECK2(*cp, l); } - switch (opt) { - case TCPOPT_MAXSEG: - (void)printf("mss"); - datalen = 2; - LENCHECK(datalen); - (void)printf(" %u", EXTRACT_16BITS(cp)); + printf("%s", tok2str(tcp_option_values, "Unknown Option %u", opt)); - break; + switch (opt) { - case TCPOPT_EOL: - (void)printf("eol"); - break; + case TCPOPT_MAXSEG: + datalen = 2; + LENCHECK(datalen); + (void)printf(" %u", EXTRACT_16BITS(cp)); + break; - case TCPOPT_NOP: - (void)printf("nop"); - break; + case TCPOPT_WSCALE: + datalen = 1; + LENCHECK(datalen); + (void)printf(" %u", *cp); + break; - case TCPOPT_WSCALE: - (void)printf("wscale"); - datalen = 1; - LENCHECK(datalen); - (void)printf(" %u", *cp); - break; + case TCPOPT_SACK: + datalen = len - 2; + if (datalen % 8 != 0) { + (void)printf("malformed sack"); + } else { + u_int32_t s, e; - case TCPOPT_SACKOK: - (void)printf("sackOK"); - break; + (void)printf(" %d ", datalen / 8); + for (i = 0; i < datalen; i += 8) { + LENCHECK(i + 4); + s = EXTRACT_32BITS(cp + i); + LENCHECK(i + 8); + e = EXTRACT_32BITS(cp + i + 4); + if (threv) { + s -= thseq; + e -= thseq; + } else { + s -= thack; + e -= thack; + } + (void)printf("{%u:%u}", s, e); + } + } + break; - case TCPOPT_SACK: - datalen = len - 2; - if (datalen % 8 != 0) { - (void)printf("malformed sack"); - } else { - u_int32_t s, e; + case TCPOPT_CC: + case TCPOPT_CCNEW: + case TCPOPT_CCECHO: + case TCPOPT_ECHO: + case TCPOPT_ECHOREPLY: - (void)printf("sack %d ", datalen / 8); - for (i = 0; i < datalen; i += 8) { - LENCHECK(i + 4); - s = EXTRACT_32BITS(cp + i); - LENCHECK(i + 8); - e = EXTRACT_32BITS(cp + i + 4); - if (threv) { - s -= thseq; - e -= thseq; - } else { - s -= thack; - e -= thack; - } - (void)printf("{%u:%u}", s, e); - } - } - break; + /* + * those options share their semantics. + * fall through + */ + datalen = 4; + LENCHECK(datalen); + (void)printf(" %u", EXTRACT_32BITS(cp)); + break; - case TCPOPT_ECHO: - (void)printf("echo"); - datalen = 4; - LENCHECK(datalen); - (void)printf(" %u", EXTRACT_32BITS(cp)); - break; + case TCPOPT_TIMESTAMP: + datalen = 8; + LENCHECK(datalen); + (void)printf(" val %u ecr %u", + EXTRACT_32BITS(cp), + EXTRACT_32BITS(cp + 4)); + break; - case TCPOPT_ECHOREPLY: - (void)printf("echoreply"); - datalen = 4; - LENCHECK(datalen); - (void)printf(" %u", EXTRACT_32BITS(cp)); - break; - - case TCPOPT_TIMESTAMP: - (void)printf("timestamp"); - datalen = 8; - LENCHECK(4); - (void)printf(" %u", EXTRACT_32BITS(cp)); - LENCHECK(datalen); - (void)printf(" %u", EXTRACT_32BITS(cp + 4)); - break; - - case TCPOPT_CC: - (void)printf("cc"); - datalen = 4; - LENCHECK(datalen); - (void)printf(" %u", EXTRACT_32BITS(cp)); - break; - - case TCPOPT_CCNEW: - (void)printf("ccnew"); - datalen = 4; - LENCHECK(datalen); - (void)printf(" %u", EXTRACT_32BITS(cp)); - break; - - case TCPOPT_CCECHO: - (void)printf("ccecho"); - datalen = 4; - LENCHECK(datalen); - (void)printf(" %u", EXTRACT_32BITS(cp)); - break; - - case TCPOPT_SIGNATURE: - (void)printf("md5:"); - datalen = TCP_SIGLEN; - LENCHECK(datalen); + case TCPOPT_SIGNATURE: + datalen = TCP_SIGLEN; + LENCHECK(datalen); #ifdef HAVE_LIBCRYPTO - switch (tcp_verify_signature(ip, tp, - bp + TH_OFF(tp) * 4, length, cp)) { + switch (tcp_verify_signature(ip, tp, + bp + TH_OFF(tp) * 4, length, cp)) { - case SIGNATURE_VALID: - (void)printf("valid"); - break; + case SIGNATURE_VALID: + (void)printf("valid"); + break; - case SIGNATURE_INVALID: - (void)printf("invalid"); - break; + case SIGNATURE_INVALID: + (void)printf("invalid"); + break; - case CANT_CHECK_SIGNATURE: - (void)printf("can't check - "); - for (i = 0; i < TCP_SIGLEN; ++i) - (void)printf("%02x", cp[i]); - break; - } + case CANT_CHECK_SIGNATURE: + (void)printf("can't check - "); + for (i = 0; i < TCP_SIGLEN; ++i) + (void)printf("%02x", cp[i]); + break; + } #else - for (i = 0; i < TCP_SIGLEN; ++i) - (void)printf("%02x", cp[i]); + for (i = 0; i < TCP_SIGLEN; ++i) + (void)printf("%02x", cp[i]); #endif - break; + break; - default: - (void)printf("opt-%u:", opt); - datalen = len - 2; - for (i = 0; i < datalen; ++i) { - LENCHECK(i); - (void)printf("%02x", cp[i]); - } - break; - } + case TCPOPT_AUTH: + (void)printf("keyid %d", *cp++); + datalen = len - 3; + for (i = 0; i < datalen; ++i) { + LENCHECK(i); + (void)printf("%02x", cp[i]); + } + break; - /* Account for data printed */ - cp += datalen; - hlen -= datalen; - /* Check specification against observed length */ - ++datalen; /* option octet */ - if (!ZEROLENOPT(opt)) - ++datalen; /* size octet */ - if (datalen != len) - (void)printf("[len %d]", len); - ch = ','; - if (opt == TCPOPT_EOL) - break; - } - putchar('>'); - } + case TCPOPT_EOL: + case TCPOPT_NOP: + case TCPOPT_SACKOK: + /* + * Nothing interesting. + * fall through + */ + break; - if (length <= 0) - return; + default: + datalen = len - 2; + for (i = 0; i < datalen; ++i) { + LENCHECK(i); + (void)printf("%02x", cp[i]); + } + break; + } - /* - * Decode payload if necessary. - */ - bp += TH_OFF(tp) * 4; - if (flags & TH_RST) { - if (vflag) - print_tcp_rst_data(bp, length); - } else { - if (sport == TELNET_PORT || dport == TELNET_PORT) { - if (!qflag && vflag) - telnet_print(bp, length); - } else if (sport == BGP_PORT || dport == BGP_PORT) - bgp_print(bp, length); - else if (sport == PPTP_PORT || dport == PPTP_PORT) - pptp_print(bp); + /* Account for data printed */ + cp += datalen; + hlen -= datalen; + + /* Check specification against observed length */ + ++datalen; /* option octet */ + if (!ZEROLENOPT(opt)) + ++datalen; /* size octet */ + if (datalen != len) + (void)printf("[len %d]", len); + ch = ','; + if (opt == TCPOPT_EOL) + break; + } + putchar(']'); + } + + /* + * Print length field before crawling down the stack. + */ + printf(", length %u", length); + + if (length <= 0) + return; + + /* + * Decode payload if necessary. + */ + bp += TH_OFF(tp) * 4; + if ((flags & TH_RST) && vflag) { + print_tcp_rst_data(bp, length); + return; + } + + if (sport == TELNET_PORT || dport == TELNET_PORT) { + if (!qflag && vflag) + telnet_print(bp, length); + } else if (sport == BGP_PORT || dport == BGP_PORT) + bgp_print(bp, length); + else if (sport == PPTP_PORT || dport == PPTP_PORT) + pptp_print(bp); #ifdef TCPDUMP_DO_SMB - else if (sport == NETBIOS_SSN_PORT || dport == NETBIOS_SSN_PORT) - nbt_tcp_print(bp, length); + else if (sport == NETBIOS_SSN_PORT || dport == NETBIOS_SSN_PORT) + nbt_tcp_print(bp, length); + else if (sport == SMB_PORT || dport == SMB_PORT) + smb_tcp_print(bp, length); #endif - else if (sport == BEEP_PORT || dport == BEEP_PORT) - beep_print(bp, length); - else if (length > 2 && - (sport == NAMESERVER_PORT || dport == NAMESERVER_PORT || - sport == MULTICASTDNS_PORT || dport == MULTICASTDNS_PORT)) { - /* - * TCP DNS query has 2byte length at the head. - * XXX packet could be unaligned, it can go strange - */ - ns_print(bp + 2, length - 2, 0); - } else if (sport == MSDP_PORT || dport == MSDP_PORT) { - msdp_print(bp, length); - } - else if (length > 0 && (sport == LDP_PORT || dport == LDP_PORT)) { - ldp_print(bp, length); - } - } - return; -bad: - fputs("[bad opt]", stdout); - if (ch != '\0') - putchar('>'); - return; -trunc: - fputs("[|tcp]", stdout); - if (ch != '\0') - putchar('>'); + else if (sport == BEEP_PORT || dport == BEEP_PORT) + beep_print(bp, length); + else if (length > 2 && + (sport == NAMESERVER_PORT || dport == NAMESERVER_PORT || + sport == MULTICASTDNS_PORT || dport == MULTICASTDNS_PORT)) { + /* + * TCP DNS query has 2byte length at the head. + * XXX packet could be unaligned, it can go strange + */ + ns_print(bp + 2, length - 2, 0); + } else if (sport == MSDP_PORT || dport == MSDP_PORT) { + msdp_print(bp, length); + } + else if (length > 0 && (sport == LDP_PORT || dport == LDP_PORT)) { + ldp_print(bp, length); + } + + return; + bad: + fputs("[bad opt]", stdout); + if (ch != '\0') + putchar('>'); + return; + trunc: + fputs("[|tcp]", stdout); + if (ch != '\0') + putchar('>'); } /* @@ -712,96 +716,103 @@ tcp_print(register const u_char *bp, register u_int length, static void print_tcp_rst_data(register const u_char *sp, u_int length) { - int c; + int c; - if (TTEST2(*sp, length)) - printf(" [RST"); - else - printf(" [!RST"); - if (length > MAX_RST_DATA_LEN) { - length = MAX_RST_DATA_LEN; /* can use -X for longer */ - putchar('+'); /* indicate we truncate */ - } - putchar(' '); - while (length-- && sp <= snapend) { - c = *sp++; - safeputchar(c); - } - putchar(']'); + if (TTEST2(*sp, length)) + printf(" [RST"); + else + printf(" [!RST"); + if (length > MAX_RST_DATA_LEN) { + length = MAX_RST_DATA_LEN; /* can use -X for longer */ + putchar('+'); /* indicate we truncate */ + } + putchar(' '); + while (length-- && sp <= snapend) { + c = *sp++; + safeputchar(c); + } + putchar(']'); } #ifdef HAVE_LIBCRYPTO static int tcp_verify_signature(const struct ip *ip, const struct tcphdr *tp, - const u_char *data, int length, const u_char *rcvsig) + const u_char *data, int length, const u_char *rcvsig) { struct tcphdr tp1; - u_char sig[TCP_SIGLEN]; - char zero_proto = 0; - MD5_CTX ctx; - u_int16_t savecsum, tlen; + u_char sig[TCP_SIGLEN]; + char zero_proto = 0; + MD5_CTX ctx; + u_int16_t savecsum, tlen; #ifdef INET6 - struct ip6_hdr *ip6; + struct ip6_hdr *ip6; + u_int32_t len32; + u_int8_t nxt; #endif - u_int32_t len32; - u_int8_t nxt; - tp1 = *tp; + tp1 = *tp; - if (tcpmd5secret == NULL) - return (CANT_CHECK_SIGNATURE); + if (tcpmd5secret == NULL) + return (CANT_CHECK_SIGNATURE); - MD5_Init(&ctx); - /* - * Step 1: Update MD5 hash with IP pseudo-header. - */ - if (IP_V(ip) == 4) { - MD5_Update(&ctx, (char *)&ip->ip_src, sizeof(ip->ip_src)); - MD5_Update(&ctx, (char *)&ip->ip_dst, sizeof(ip->ip_dst)); - MD5_Update(&ctx, (char *)&zero_proto, sizeof(zero_proto)); - MD5_Update(&ctx, (char *)&ip->ip_p, sizeof(ip->ip_p)); - tlen = EXTRACT_16BITS(&ip->ip_len) - IP_HL(ip) * 4; - tlen = htons(tlen); - MD5_Update(&ctx, (char *)&tlen, sizeof(tlen)); + MD5_Init(&ctx); + /* + * Step 1: Update MD5 hash with IP pseudo-header. + */ + if (IP_V(ip) == 4) { + MD5_Update(&ctx, (char *)&ip->ip_src, sizeof(ip->ip_src)); + MD5_Update(&ctx, (char *)&ip->ip_dst, sizeof(ip->ip_dst)); + MD5_Update(&ctx, (char *)&zero_proto, sizeof(zero_proto)); + MD5_Update(&ctx, (char *)&ip->ip_p, sizeof(ip->ip_p)); + tlen = EXTRACT_16BITS(&ip->ip_len) - IP_HL(ip) * 4; + tlen = htons(tlen); + MD5_Update(&ctx, (char *)&tlen, sizeof(tlen)); #ifdef INET6 - } else if (IP_V(ip) == 6) { - ip6 = (struct ip6_hdr *)ip; - MD5_Update(&ctx, (char *)&ip6->ip6_src, sizeof(ip6->ip6_src)); - MD5_Update(&ctx, (char *)&ip6->ip6_dst, sizeof(ip6->ip6_dst)); - len32 = htonl(ntohs(ip6->ip6_plen)); - MD5_Update(&ctx, (char *)&len32, sizeof(len32)); - nxt = 0; - MD5_Update(&ctx, (char *)&nxt, sizeof(nxt)); - MD5_Update(&ctx, (char *)&nxt, sizeof(nxt)); - MD5_Update(&ctx, (char *)&nxt, sizeof(nxt)); - nxt = IPPROTO_TCP; - MD5_Update(&ctx, (char *)&nxt, sizeof(nxt)); + } else if (IP_V(ip) == 6) { + ip6 = (struct ip6_hdr *)ip; + MD5_Update(&ctx, (char *)&ip6->ip6_src, sizeof(ip6->ip6_src)); + MD5_Update(&ctx, (char *)&ip6->ip6_dst, sizeof(ip6->ip6_dst)); + len32 = htonl(ntohs(ip6->ip6_plen)); + MD5_Update(&ctx, (char *)&len32, sizeof(len32)); + nxt = 0; + MD5_Update(&ctx, (char *)&nxt, sizeof(nxt)); + MD5_Update(&ctx, (char *)&nxt, sizeof(nxt)); + MD5_Update(&ctx, (char *)&nxt, sizeof(nxt)); + nxt = IPPROTO_TCP; + MD5_Update(&ctx, (char *)&nxt, sizeof(nxt)); #endif - } else - return (CANT_CHECK_SIGNATURE); + } else + return (CANT_CHECK_SIGNATURE); - /* - * Step 2: Update MD5 hash with TCP header, excluding options. - * The TCP checksum must be set to zero. - */ - savecsum = tp1.th_sum; - tp1.th_sum = 0; - MD5_Update(&ctx, (char *)&tp1, sizeof(struct tcphdr)); - tp1.th_sum = savecsum; - /* - * Step 3: Update MD5 hash with TCP segment data, if present. - */ - if (length > 0) - MD5_Update(&ctx, data, length); - /* - * Step 4: Update MD5 hash with shared secret. - */ - MD5_Update(&ctx, tcpmd5secret, strlen(tcpmd5secret)); - MD5_Final(sig, &ctx); + /* + * Step 2: Update MD5 hash with TCP header, excluding options. + * The TCP checksum must be set to zero. + */ + savecsum = tp1.th_sum; + tp1.th_sum = 0; + MD5_Update(&ctx, (char *)&tp1, sizeof(struct tcphdr)); + tp1.th_sum = savecsum; + /* + * Step 3: Update MD5 hash with TCP segment data, if present. + */ + if (length > 0) + MD5_Update(&ctx, data, length); + /* + * Step 4: Update MD5 hash with shared secret. + */ + MD5_Update(&ctx, tcpmd5secret, strlen(tcpmd5secret)); + MD5_Final(sig, &ctx); - if (memcmp(rcvsig, sig, TCP_SIGLEN) == 0) - return (SIGNATURE_VALID); - else - return (SIGNATURE_INVALID); + if (memcmp(rcvsig, sig, TCP_SIGLEN) == 0) + return (SIGNATURE_VALID); + else + return (SIGNATURE_INVALID); } #endif /* HAVE_LIBCRYPTO */ + +/* + * Local Variables: + * c-style: whitesmith + * c-basic-offset: 8 + * End: + */ diff --git a/print-telnet.c b/print-telnet.c index 78887278bfa2..4911e5caf238 100644 --- a/print-telnet.c +++ b/print-telnet.c @@ -51,7 +51,7 @@ #ifndef lint static const char rcsid[] _U_ = - "@(#) $Header: /tcpdump/master/tcpdump/print-telnet.c,v 1.24 2003/12/29 11:05:10 hannes Exp $"; + "@(#) $Header: /tcpdump/master/tcpdump/print-telnet.c,v 1.24 2003-12-29 11:05:10 hannes Exp $"; #endif #include diff --git a/print-tftp.c b/print-tftp.c index b517898b1372..c4fc7ea2afbe 100644 --- a/print-tftp.c +++ b/print-tftp.c @@ -23,7 +23,7 @@ #ifndef lint static const char rcsid[] _U_ = - "@(#) $Header: /tcpdump/master/tcpdump/print-tftp.c,v 1.37.2.1 2007/09/14 01:03:12 guy Exp $ (LBL)"; + "@(#) $Header: /tcpdump/master/tcpdump/print-tftp.c,v 1.38.2.1 2008-04-11 16:44:17 gianluca Exp $ (LBL)"; #endif #ifdef HAVE_CONFIG_H @@ -50,7 +50,7 @@ static struct tok op2str[] = { { WRQ, "WRQ" }, /* write request */ { DATA, "DATA" }, /* data packet */ { ACK, "ACK" }, /* acknowledgement */ - { ERROR, "ERROR" }, /* error code */ + { TFTP_ERROR, "ERROR" }, /* error code */ { OACK, "OACK" }, /* option acknowledgement */ { 0, NULL } }; @@ -137,7 +137,7 @@ tftp_print(register const u_char *bp, u_int length) printf(" block %d", EXTRACT_16BITS(&tp->th_block)); break; - case ERROR: + case TFTP_ERROR: /* Print error code string */ TCHECK(tp->th_code); printf(" %s \"", tok2str(err2str, "tftp-err-#%d \"", diff --git a/print-timed.c b/print-timed.c index 3df224129f74..55fbb39eaed7 100644 --- a/print-timed.c +++ b/print-timed.c @@ -21,7 +21,7 @@ #ifndef lint static const char rcsid[] _U_ = - "@(#) $Header: /tcpdump/master/tcpdump/print-timed.c,v 1.9 2003/11/16 09:36:40 guy Exp $"; + "@(#) $Header: /tcpdump/master/tcpdump/print-timed.c,v 1.9 2003-11-16 09:36:40 guy Exp $"; #endif #ifdef HAVE_CONFIG_H diff --git a/print-token.c b/print-token.c index 47fcca63ab61..04defa9921b6 100644 --- a/print-token.c +++ b/print-token.c @@ -25,7 +25,7 @@ */ #ifndef lint static const char rcsid[] _U_ = - "@(#) $Header: /tcpdump/master/tcpdump/print-token.c,v 1.25.2.2 2005/11/13 12:13:01 guy Exp $"; + "@(#) $Header: /tcpdump/master/tcpdump/print-token.c,v 1.27 2005-11-13 12:12:43 guy Exp $"; #endif #ifdef HAVE_CONFIG_H diff --git a/print-udld.c b/print-udld.c new file mode 100644 index 000000000000..a5488dda451f --- /dev/null +++ b/print-udld.c @@ -0,0 +1,173 @@ +/* + * 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. + * + * UNIDIRECTIONAL LINK DETECTION (UDLD) as per + * http://www.ietf.org/internet-drafts/draft-foschiano-udld-02.txt + * + * Original code by Carles Kishimoto + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include + +#include +#include + +#include "interface.h" +#include "addrtoname.h" +#include "extract.h" +#include "nlpid.h" + +#define UDLD_HEADER_LEN 4 +#define UDLD_DEVICE_ID_TLV 0x0001 +#define UDLD_PORT_ID_TLV 0x0002 +#define UDLD_ECHO_TLV 0x0003 +#define UDLD_MESSAGE_INTERVAL_TLV 0x0004 +#define UDLD_TIMEOUT_INTERVAL_TLV 0x0005 +#define UDLD_DEVICE_NAME_TLV 0x0006 +#define UDLD_SEQ_NUMBER_TLV 0x0007 + +static struct tok udld_tlv_values[] = { + { UDLD_DEVICE_ID_TLV, "Device-ID TLV"}, + { UDLD_PORT_ID_TLV, "Port-ID TLV"}, + { UDLD_ECHO_TLV, "Echo TLV"}, + { UDLD_MESSAGE_INTERVAL_TLV, "Message Interval TLV"}, + { UDLD_TIMEOUT_INTERVAL_TLV, "Timeout Interval TLV"}, + { UDLD_DEVICE_NAME_TLV, "Device Name TLV"}, + { UDLD_SEQ_NUMBER_TLV,"Sequence Number TLV"}, + { 0, NULL} +}; + +static struct tok udld_code_values[] = { + { 0x00, "Reserved"}, + { 0x01, "Probe message"}, + { 0x02, "Echo message"}, + { 0x03, "Flush message"}, + { 0, NULL} +}; + +static struct tok udld_flags_values[] = { + { 0x00, "RT"}, + { 0x01, "RSY"}, + { 0, NULL} +}; + +/* + * + * 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 + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * | Ver | Opcode | Flags | Checksum | + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * | List of TLVs (variable length list) | + * | ... | + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * + */ + +#define UDLD_EXTRACT_VERSION(x) (((x)&0xe0)>>5) +#define UDLD_EXTRACT_OPCODE(x) ((x)&0x1f) + +void +udld_print (const u_char *pptr, u_int length) +{ + int code, type, len; + const u_char *tptr; + + if (length < UDLD_HEADER_LEN) + goto trunc; + + tptr = pptr; + + if (!TTEST2(*tptr, UDLD_HEADER_LEN)) + goto trunc; + + code = UDLD_EXTRACT_OPCODE(*tptr); + + printf("UDLDv%u, Code %s (%x), Flags [%s] (0x%02x), length %u", + UDLD_EXTRACT_VERSION(*tptr), + tok2str(udld_code_values, "Reserved", code), + code, + bittok2str(udld_flags_values, "none", *(tptr+1)), + *(tptr+1), + length); + + /* + * In non-verbose mode, just print version and opcode type + */ + if (vflag < 1) { + return; + } + + printf("\n\tChecksum 0x%04x (unverified)", EXTRACT_16BITS(tptr+2)); + + tptr += UDLD_HEADER_LEN; + + while (tptr < (pptr+length)) { + + if (!TTEST2(*tptr, 4)) + goto trunc; + + type = EXTRACT_16BITS(tptr); + len = EXTRACT_16BITS(tptr+2); + len -= 4; + tptr += 4; + + /* infinite loop check */ + if (type == 0 || len == 0) { + return; + } + + printf("\n\t%s (0x%04x) TLV, length %u", + tok2str(udld_tlv_values, "Unknown", type), + type, len); + + switch (type) { + case UDLD_DEVICE_ID_TLV: + case UDLD_PORT_ID_TLV: + case UDLD_ECHO_TLV: + case UDLD_DEVICE_NAME_TLV: + printf(", %s", tptr); + break; + + case UDLD_MESSAGE_INTERVAL_TLV: + case UDLD_TIMEOUT_INTERVAL_TLV: + printf(", %us", (*tptr)); + break; + + case UDLD_SEQ_NUMBER_TLV: + printf(", %u", EXTRACT_32BITS(tptr)); + break; + + default: + break; + } + tptr += len; + } + + return; + + trunc: + printf("[|udld]"); +} + +/* + * Local Variables: + * c-style: whitesmith + * c-basic-offset: 4 + * End: + */ diff --git a/print-udp.c b/print-udp.c index 3f08a1c20b13..f534c1bb459e 100644 --- a/print-udp.c +++ b/print-udp.c @@ -21,7 +21,7 @@ #ifndef lint static const char rcsid[] _U_ = - "@(#) $Header: /tcpdump/master/tcpdump/print-udp.c,v 1.138.2.1 2007/03/28 07:45:46 hannes Exp $ (LBL)"; + "@(#) $Header: /tcpdump/master/tcpdump/print-udp.c,v 1.142 2007-08-08 17:20:58 hannes Exp $ (LBL)"; #endif #ifdef HAVE_CONFIG_H @@ -683,6 +683,16 @@ udp_print(register const u_char *bp, u_int length, bfd_print((const u_char *)(up+1), length, dport); else if (ISPORT(LMP_PORT)) lmp_print((const u_char *)(up + 1), length); + else if (ISPORT(VQP_PORT)) + vqp_print((const u_char *)(up + 1), length); + else if (ISPORT(SFLOW_PORT)) + sflow_print((const u_char *)(up + 1), length); + else if (dport == LWAPP_CONTROL_PORT) + lwapp_control_print((const u_char *)(up + 1), length, 1); + else if (sport == LWAPP_CONTROL_PORT) + lwapp_control_print((const u_char *)(up + 1), length, 0); + else if (ISPORT(LWAPP_DATA_PORT)) + lwapp_data_print((const u_char *)(up + 1), length); else if (ISPORT(SIP_PORT)) sip_print((const u_char *)(up + 1), length); else if (ISPORT(SYSLOG_PORT)) diff --git a/print-vjc.c b/print-vjc.c index 55b7d08b26f9..2dc89aa5f989 100644 --- a/print-vjc.c +++ b/print-vjc.c @@ -25,7 +25,7 @@ #ifndef lint static const char rcsid[] _U_ = - "@(#) $Header: /tcpdump/master/tcpdump/print-vjc.c,v 1.15 2004/03/25 03:31:17 mcr Exp $ (LBL)"; + "@(#) $Header: /tcpdump/master/tcpdump/print-vjc.c,v 1.15 2004-03-25 03:31:17 mcr Exp $ (LBL)"; #endif #include diff --git a/print-vqp.c b/print-vqp.c new file mode 100644 index 000000000000..2d9e8e1f969b --- /dev/null +++ b/print-vqp.c @@ -0,0 +1,209 @@ +/* + * 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. + * + * support for the Cisco prop. VQP Protocol + * + * Original code by Carles Kishimoto + */ + +#ifndef lint +static const char rcsid[] _U_ = + "@(#) $Header: /tcpdump/master/tcpdump/print-vqp.c,v 1.3 2006-08-19 06:51:13 guy Exp $"; +#endif + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include + +#include +#include +#include + +#include "interface.h" +#include "extract.h" +#include "addrtoname.h" + +#define VQP_VERSION 1 +#define VQP_EXTRACT_VERSION(x) ((x)&0xFF) + +/* + * VQP 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 + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * | Constant | Packet type | Error Code | nitems | + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * | Packet Sequence Number (4 bytes) | + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + */ + +struct vqp_common_header_t { + u_int8_t version; + u_int8_t msg_type; + u_int8_t error_code; + u_int8_t nitems; + u_int8_t sequence[4]; +}; + +struct vqp_obj_tlv_t { + u_int8_t obj_type[4]; + u_int8_t obj_length[2]; +}; + +#define VQP_OBJ_REQ_JOIN_PORT 0x01 +#define VQP_OBJ_RESP_VLAN 0x02 +#define VQP_OBJ_REQ_RECONFIRM 0x03 +#define VQP_OBJ_RESP_RECONFIRM 0x04 + +static const struct tok vqp_msg_type_values[] = { + { VQP_OBJ_REQ_JOIN_PORT, "Request, Join Port"}, + { VQP_OBJ_RESP_VLAN, "Response, VLAN"}, + { VQP_OBJ_REQ_RECONFIRM, "Request, Reconfirm"}, + { VQP_OBJ_RESP_RECONFIRM, "Response, Reconfirm"}, + { 0, NULL} +}; + +static const struct tok vqp_error_code_values[] = { + { 0x00, "No error"}, + { 0x03, "Access denied"}, + { 0x04, "Shutdown port"}, + { 0x05, "Wrong VTP domain"}, + { 0, NULL} +}; + +/* FIXME the heading 0x0c looks ugly - those must be flags etc. */ +#define VQP_OBJ_IP_ADDRESS 0x0c01 +#define VQP_OBJ_PORT_NAME 0x0c02 +#define VQP_OBJ_VLAN_NAME 0x0c03 +#define VQP_OBJ_VTP_DOMAIN 0x0c04 +#define VQP_OBJ_ETHERNET_PKT 0x0c05 +#define VQP_OBJ_MAC_NULL 0x0c06 +#define VQP_OBJ_MAC_ADDRESS 0x0c08 + +static const struct tok vqp_obj_values[] = { + { VQP_OBJ_IP_ADDRESS, "Client IP Address" }, + { VQP_OBJ_PORT_NAME, "Port Name" }, + { VQP_OBJ_VLAN_NAME, "VLAN Name" }, + { VQP_OBJ_VTP_DOMAIN, "VTP Domain" }, + { VQP_OBJ_ETHERNET_PKT, "Ethernet Packet" }, + { VQP_OBJ_MAC_NULL, "MAC Null" }, + { VQP_OBJ_MAC_ADDRESS, "MAC Address" }, + { 0, NULL} +}; + +void +vqp_print(register const u_char *pptr, register u_int len) +{ + const struct vqp_common_header_t *vqp_common_header; + const struct vqp_obj_tlv_t *vqp_obj_tlv; + + const u_char *tptr; + u_int16_t vqp_obj_len; + u_int32_t vqp_obj_type; + int tlen; + u_int8_t nitems; + + tptr=pptr; + tlen = len; + vqp_common_header = (const struct vqp_common_header_t *)pptr; + TCHECK(*vqp_common_header); + + /* + * Sanity checking of the header. + */ + if (VQP_EXTRACT_VERSION(vqp_common_header->version) != VQP_VERSION) { + printf("VQP version %u packet not supported", + VQP_EXTRACT_VERSION(vqp_common_header->version)); + return; + } + + /* in non-verbose mode just lets print the basic Message Type */ + if (vflag < 1) { + printf("VQPv%u %s Message, error-code %s (%u), length %u", + VQP_EXTRACT_VERSION(vqp_common_header->version), + tok2str(vqp_msg_type_values, "unknown (%u)",vqp_common_header->msg_type), + tok2str(vqp_error_code_values, "unknown (%u)",vqp_common_header->error_code), + vqp_common_header->error_code, + len); + return; + } + + /* ok they seem to want to know everything - lets fully decode it */ + nitems = vqp_common_header->nitems; + printf("\n\tVQPv%u, %s Message, error-code %s (%u), seq 0x%08x, items %u, length %u", + VQP_EXTRACT_VERSION(vqp_common_header->version), + tok2str(vqp_msg_type_values, "unknown (%u)",vqp_common_header->msg_type), + tok2str(vqp_error_code_values, "unknown (%u)",vqp_common_header->error_code), + vqp_common_header->error_code, + EXTRACT_32BITS(&vqp_common_header->sequence), + nitems, + len); + + /* skip VQP Common header */ + tptr+=sizeof(const struct vqp_common_header_t); + tlen-=sizeof(const struct vqp_common_header_t); + + while (nitems > 0 && tlen > 0) { + + vqp_obj_tlv = (const struct vqp_obj_tlv_t *)tptr; + vqp_obj_type = EXTRACT_32BITS(vqp_obj_tlv->obj_type); + vqp_obj_len = EXTRACT_16BITS(vqp_obj_tlv->obj_length); + tptr+=sizeof(struct vqp_obj_tlv_t); + tlen-=sizeof(struct vqp_obj_tlv_t); + + printf("\n\t %s Object (0x%08x), length %u, value: ", + tok2str(vqp_obj_values, "Unknown", vqp_obj_type), + vqp_obj_type, vqp_obj_len); + + /* basic sanity check */ + if (vqp_obj_type == 0 || vqp_obj_len ==0) { + return; + } + + /* did we capture enough for fully decoding the object ? */ + if (!TTEST2(*tptr, vqp_obj_len)) + goto trunc; + + switch(vqp_obj_type) { + case VQP_OBJ_IP_ADDRESS: + printf("%s (0x%08x)", ipaddr_string(tptr), EXTRACT_32BITS(tptr)); + break; + /* those objects have similar semantics - fall through */ + case VQP_OBJ_PORT_NAME: + case VQP_OBJ_VLAN_NAME: + case VQP_OBJ_VTP_DOMAIN: + case VQP_OBJ_ETHERNET_PKT: + safeputs((const char *)tptr, vqp_obj_len); + break; + /* those objects have similar semantics - fall through */ + case VQP_OBJ_MAC_ADDRESS: + case VQP_OBJ_MAC_NULL: + printf("%s", etheraddr_string(tptr)); + break; + default: + if (vflag <= 1) + print_unknown_data(tptr, "\n\t ", vqp_obj_len); + break; + } + tptr += vqp_obj_len; + tlen -= vqp_obj_len; + nitems--; + } + return; +trunc: + printf("\n\t[|VQP]"); +} diff --git a/print-vrrp.c b/print-vrrp.c index 1e87a5003a17..899542dac429 100644 --- a/print-vrrp.c +++ b/print-vrrp.c @@ -25,7 +25,7 @@ #ifndef lint static const char rcsid[] _U_ = - "@(#) $Header: /tcpdump/master/tcpdump/print-vrrp.c,v 1.9.2.1 2005/05/06 07:57:20 guy Exp $"; + "@(#) $Header: /tcpdump/master/tcpdump/print-vrrp.c,v 1.10 2005-05-06 07:56:54 guy Exp $"; #endif #ifdef HAVE_CONFIG_H diff --git a/print-vtp.c b/print-vtp.c new file mode 100644 index 000000000000..7631c6f61842 --- /dev/null +++ b/print-vtp.c @@ -0,0 +1,378 @@ +/* + * 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. + * + * VLAN TRUNKING PROTOCOL (VTP) + * + * Reference documentation: + * http://www.cisco.com/en/US/tech/tk389/tk689/technologies_tech_note09186a0080094c52.shtml + * http://www.cisco.com/warp/public/473/21.html + * http://www.cisco.com/univercd/cc/td/doc/product/lan/trsrb/frames.htm + * + * Original code ode by Carles Kishimoto + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include + +#include +#include + +#include "interface.h" +#include "addrtoname.h" +#include "extract.h" +#include "nlpid.h" + +#define VTP_HEADER_LEN 36 +#define VTP_DOMAIN_NAME_LEN 32 +#define VTP_MD5_DIGEST_LEN 16 +#define VTP_UPDATE_TIMESTAMP_LEN 12 +#define VTP_VLAN_INFO_OFFSET 12 + +#define VTP_SUMMARY_ADV 0x01 +#define VTP_SUBSET_ADV 0x02 +#define VTP_ADV_REQUEST 0x03 +#define VTP_JOIN_MESSAGE 0x04 + +struct vtp_vlan_ { + u_int8_t len; + u_int8_t status; + u_int8_t type; + u_int8_t name_len; + u_int16_t vlanid; + u_int16_t mtu; + u_int32_t index; +}; + +static struct tok vtp_message_type_values[] = { + { VTP_SUMMARY_ADV, "Summary advertisement"}, + { VTP_SUBSET_ADV, "Subset advertisement"}, + { VTP_ADV_REQUEST, "Advertisement request"}, + { VTP_JOIN_MESSAGE, "Join message"}, + { 0, NULL } +}; + +static struct tok vtp_header_values[] = { + { 0x01, "Followers"}, /* On Summary advertisement, 3rd byte is Followers */ + { 0x02, "Seq number"}, /* On Subset advertisement, 3rd byte is Sequence number */ + { 0x03, "Rsvd"}, /* On Adver. requests 3rd byte is Rsvd */ + { 0x04, "Rsvd"}, /* On Adver. requests 3rd byte is Rsvd */ + { 0, NULL } +}; + +static struct tok vtp_vlan_type_values[] = { + { 0x01, "Ethernet"}, + { 0x02, "FDDI"}, + { 0x03, "TrCRF"}, + { 0x04, "FDDI-net"}, + { 0x05, "TrBRF"}, + { 0, NULL } +}; + +static struct tok vtp_vlan_status[] = { + { 0x00, "Operational"}, + { 0x01, "Suspended"}, + { 0, NULL } +}; + +#define VTP_VLAN_SOURCE_ROUTING_RING_NUMBER 0x01 +#define VTP_VLAN_SOURCE_ROUTING_BRIDGE_NUMBER 0x02 +#define VTP_VLAN_STP_TYPE 0x03 +#define VTP_VLAN_PARENT_VLAN 0x04 +#define VTP_VLAN_TRANS_BRIDGED_VLAN 0x05 +#define VTP_VLAN_PRUNING 0x06 +#define VTP_VLAN_BRIDGE_TYPE 0x07 +#define VTP_VLAN_ARP_HOP_COUNT 0x08 +#define VTP_VLAN_STE_HOP_COUNT 0x09 +#define VTP_VLAN_BACKUP_CRF_MODE 0x0A + +static struct tok vtp_vlan_tlv_values[] = { + { VTP_VLAN_SOURCE_ROUTING_RING_NUMBER, "Source-Routing Ring Number TLV"}, + { VTP_VLAN_SOURCE_ROUTING_BRIDGE_NUMBER, "Source-Routing Bridge Number TLV"}, + { VTP_VLAN_STP_TYPE, "STP type TLV"}, + { VTP_VLAN_PARENT_VLAN, "Parent VLAN TLV"}, + { VTP_VLAN_TRANS_BRIDGED_VLAN, "Translationally bridged VLANs TLV"}, + { VTP_VLAN_PRUNING, "Pruning TLV"}, + { VTP_VLAN_BRIDGE_TYPE, "Bridge Type TLV"}, + { VTP_VLAN_ARP_HOP_COUNT, "Max ARP Hop Count TLV"}, + { VTP_VLAN_STE_HOP_COUNT, "Max STE Hop Count TLV"}, + { VTP_VLAN_BACKUP_CRF_MODE, "Backup CRF Mode TLV"}, + { 0, NULL } +}; + +static struct tok vtp_stp_type_values[] = { + { 1, "SRT"}, + { 2, "SRB"}, + { 3, "Auto"}, + { 0, NULL } +}; + +void +vtp_print (const u_char *pptr, u_int length) +{ + int type, len, tlv_len, tlv_value; + const u_char *tptr; + const struct vtp_vlan_ *vtp_vlan; + + if (length < VTP_HEADER_LEN) + goto trunc; + + tptr = pptr; + + if (!TTEST2(*tptr, VTP_HEADER_LEN)) + goto trunc; + + type = *(tptr+1); + printf("VTPv%u, Message %s (0x%02x), length %u", + *tptr, + tok2str(vtp_message_type_values,"Unknown message type", type), + *(tptr+1), + length); + + /* In non-verbose mode, just print version and message type */ + if (vflag < 1) { + return; + } + + /* verbose mode print all fields */ + printf("\n\tDomain name: %s, %s: %u", + (tptr+4), + tok2str(vtp_header_values,"Unknown",*(tptr+1)), + *(tptr+2)); + + tptr += VTP_HEADER_LEN; + + switch (type) { + + case VTP_SUMMARY_ADV: + + /* + * SUMMARY ADVERTISEMENT + * + * 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 + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * | Version | Code | Followers | MmgtD Len | + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * | Management Domain Name | + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * | Configuration revision number | + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * | Updater Identity IP address | + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * | Update Timestamp (12 bytes) | + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * | MD5 digest (16 bytes) | + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * + */ + + printf("\n\t Config Rev %x, Updater %s", + EXTRACT_32BITS(tptr), + ipaddr_string(tptr+4)); + tptr += 8; + printf(", Timestamp 0x%08x 0x%08x 0x%08x", + EXTRACT_32BITS(tptr), + EXTRACT_32BITS(tptr + 4), + EXTRACT_32BITS(tptr + 8)); + tptr += VTP_UPDATE_TIMESTAMP_LEN; + printf(", MD5 digest: %08x%08x%08x%08x", + EXTRACT_32BITS(tptr), + EXTRACT_32BITS(tptr + 4), + EXTRACT_32BITS(tptr + 8), + EXTRACT_32BITS(tptr + 12)); + tptr += VTP_MD5_DIGEST_LEN; + break; + + case VTP_SUBSET_ADV: + + /* + * SUBSET ADVERTISEMENT + * + * 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 + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * | Version | Code | Seq number | MmgtD Len | + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * | Management Domain Name | + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * | Configuration revision number | + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * | VLAN info field 1 | + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * | ................ | + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * | VLAN info field N | + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * + */ + + printf(", Config Rev %x", EXTRACT_32BITS(tptr)); + + /* + * VLAN INFORMATION + * 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 + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * | V info len | Status | VLAN type | VLAN name len | + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * | ISL vlan id | MTU size | + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * | 802.10 index (SAID) | + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * | VLAN name | + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * + */ + + tptr += 4; + while (tptr < (pptr+length)) { + + len = *tptr; + if (len == 0) + break; + + if (!TTEST2(*tptr, len)) + goto trunc; + + vtp_vlan = (struct vtp_vlan_*)tptr; + printf("\n\tVLAN info status %s, type %s, VLAN-id %u, MTU %u, SAID 0x%08x, Name %s", + tok2str(vtp_vlan_status,"Unknown",vtp_vlan->status), + tok2str(vtp_vlan_type_values,"Unknown",vtp_vlan->type), + EXTRACT_16BITS(&vtp_vlan->vlanid), + EXTRACT_16BITS(&vtp_vlan->mtu), + EXTRACT_32BITS(&vtp_vlan->index), + (tptr + VTP_VLAN_INFO_OFFSET)); + + /* + * Vlan names are aligned to 32-bit boundaries. + */ + len -= VTP_VLAN_INFO_OFFSET + 4*((vtp_vlan->name_len + 3)/4); + tptr += VTP_VLAN_INFO_OFFSET + 4*((vtp_vlan->name_len + 3)/4); + + /* TLV information follows */ + + while (len > 0) { + + /* + * Cisco specs says 2 bytes for type + 2 bytes for length, take only 1 + * See: http://www.cisco.com/univercd/cc/td/doc/product/lan/trsrb/frames.htm + */ + type = *tptr; + tlv_len = *(tptr+1); + + printf("\n\t\t%s (0x%04x) TLV", + tok2str(vtp_vlan_tlv_values, "Unknown", type), + type); + + /* + * infinite loop check + */ + if (type == 0 || tlv_len == 0) { + return; + } + + if (!TTEST2(*tptr, tlv_len*2 +2)) + goto trunc; + + tlv_value = EXTRACT_16BITS(tptr+2); + + switch (type) { + case VTP_VLAN_STE_HOP_COUNT: + printf(", %u", tlv_value); + break; + + case VTP_VLAN_PRUNING: + printf(", %s (%u)", + tlv_value == 1 ? "Enabled" : "Disabled", + tlv_value); + break; + + case VTP_VLAN_STP_TYPE: + printf(", %s (%u)", + tok2str(vtp_stp_type_values, "Unknown", tlv_value), + tlv_value); + break; + + case VTP_VLAN_BRIDGE_TYPE: + printf(", %s (%u)", + tlv_value == 1 ? "SRB" : "SRT", + tlv_value); + break; + + case VTP_VLAN_BACKUP_CRF_MODE: + printf(", %s (%u)", + tlv_value == 1 ? "Backup" : "Not backup", + tlv_value); + break; + + /* + * FIXME those are the defined TLVs that lack a decoder + * you are welcome to contribute code ;-) + */ + + case VTP_VLAN_SOURCE_ROUTING_RING_NUMBER: + case VTP_VLAN_SOURCE_ROUTING_BRIDGE_NUMBER: + case VTP_VLAN_PARENT_VLAN: + case VTP_VLAN_TRANS_BRIDGED_VLAN: + case VTP_VLAN_ARP_HOP_COUNT: + default: + print_unknown_data(tptr, "\n\t\t ", 2 + tlv_len*2); + break; + } + len -= 2 + tlv_len*2; + tptr += 2 + tlv_len*2; + } + } + break; + + case VTP_ADV_REQUEST: + + /* + * ADVERTISEMENT REQUEST + * + * 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 + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * | Version | Code | Reserved | MmgtD Len | + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * | Management Domain Name | + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * | Start value | + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * + */ + + printf("\n\tStart value: %u", EXTRACT_32BITS(tptr)); + break; + + case VTP_JOIN_MESSAGE: + + /* FIXME - Could not find message format */ + break; + + default: + break; + } + + return; + + trunc: + printf("[|vtp]"); +} + +/* + * Local Variables: + * c-style: whitesmith + * c-basic-offset: 4 + * End: + */ diff --git a/print-wb.c b/print-wb.c index e28697a6bb3a..3ae604ffed0b 100644 --- a/print-wb.c +++ b/print-wb.c @@ -21,7 +21,7 @@ #ifndef lint static const char rcsid[] _U_ = - "@(#) $Header: /tcpdump/master/tcpdump/print-wb.c,v 1.33 2004/03/24 04:06:28 guy Exp $ (LBL)"; + "@(#) $Header: /tcpdump/master/tcpdump/print-wb.c,v 1.33 2004-03-24 04:06:28 guy Exp $ (LBL)"; #endif #ifdef HAVE_CONFIG_H diff --git a/print-zephyr.c b/print-zephyr.c index 698faa2f5b46..7c52e6540658 100644 --- a/print-zephyr.c +++ b/print-zephyr.c @@ -22,7 +22,7 @@ #ifndef lint static const char rcsid[] _U_ = - "@(#) $Header: /tcpdump/master/tcpdump/print-zephyr.c,v 1.8.2.1 2005/04/21 06:51:24 guy Exp $"; + "@(#) $Header: /tcpdump/master/tcpdump/print-zephyr.c,v 1.10 2007-08-09 18:47:27 hannes Exp $"; #endif #ifdef HAVE_CONFIG_H @@ -140,6 +140,15 @@ zephyr_print(const u_char *cp, int length) char *s; int lose = 0; + /* squelch compiler warnings */ + + z.kind = 0; + z.class = 0; + z.inst = 0; + z.opcode = 0; + z.sender = 0; + z.recipient = 0; + #define PARSE_STRING \ s = parse_field(&parse, &parselen); \ if (!s) lose = 1; diff --git a/route6d.h b/route6d.h index ee0033148c0c..53953fdb6d31 100644 --- a/route6d.h +++ b/route6d.h @@ -27,7 +27,7 @@ * SUCH DAMAGE. */ /* - * $Header: /tcpdump/master/tcpdump/route6d.h,v 1.5 2002/12/11 07:14:10 guy Exp $ + * $Header: /tcpdump/master/tcpdump/route6d.h,v 1.5 2002-12-11 07:14:10 guy Exp $ */ #define RIP6_VERSION 1 diff --git a/rpc_auth.h b/rpc_auth.h index b6fa11e29e5f..fe9a40b262bc 100644 --- a/rpc_auth.h +++ b/rpc_auth.h @@ -1,4 +1,4 @@ -/* @(#) $Header: /tcpdump/master/tcpdump/rpc_auth.h,v 1.1.2.1 2005/04/27 21:44:07 guy Exp $ (LBL) */ +/* @(#) $Header: /tcpdump/master/tcpdump/rpc_auth.h,v 1.2 2005-04-27 21:43:48 guy Exp $ (LBL) */ /* * Sun RPC is a product of Sun Microsystems, Inc. and is provided for * unrestricted use provided that this legend is included on all tape @@ -29,7 +29,7 @@ * * from: @(#)auth.h 1.17 88/02/08 SMI * from: @(#)auth.h 2.3 88/08/07 4.0 RPCSRC - * $FreeBSD: vendor/tcpdump/dist/contrib/tcpdump/rpc_auth.h 147899 2005-07-11 03:54:22Z sam $ + * $FreeBSD: src/include/rpc/auth.h,v 1.14.2.1 1999/08/29 14:39:02 peter Exp $ */ /* diff --git a/rpc_msg.h b/rpc_msg.h index 93cb8c109cf4..3e79ac716b7a 100644 --- a/rpc_msg.h +++ b/rpc_msg.h @@ -1,4 +1,4 @@ -/* @(#) $Header: /tcpdump/master/tcpdump/rpc_msg.h,v 1.1.2.1 2005/04/27 21:44:07 guy Exp $ (LBL) */ +/* @(#) $Header: /tcpdump/master/tcpdump/rpc_msg.h,v 1.2 2005-04-27 21:43:48 guy Exp $ (LBL) */ /* * Sun RPC is a product of Sun Microsystems, Inc. and is provided for * unrestricted use provided that this legend is included on all tape @@ -29,7 +29,7 @@ * * from: @(#)rpc_msg.h 1.7 86/07/16 SMI * from: @(#)rpc_msg.h 2.1 88/07/29 4.0 RPCSRC - * $FreeBSD: vendor/tcpdump/dist/contrib/tcpdump/rpc_msg.h 147899 2005-07-11 03:54:22Z sam $ + * $FreeBSD: src/include/rpc/rpc_msg.h,v 1.11.2.1 1999/08/29 14:39:07 peter Exp $ */ /* diff --git a/rx.h b/rx.h index 1912e51ae33c..b79dd30cde0d 100644 --- a/rx.h +++ b/rx.h @@ -23,7 +23,7 @@ /* * Rx protocol format * - * $Id: rx.h,v 1.8 2002/12/11 07:14:11 guy Exp $ + * $Id: rx.h,v 1.8 2002-12-11 07:14:11 guy Exp $ */ #define FS_RX_PORT 7000 diff --git a/savestr.c b/savestr.c deleted file mode 100644 index a81227c9e6d0..000000000000 --- a/savestr.c +++ /dev/null @@ -1,68 +0,0 @@ -/* - * Copyright (c) 1997 - * The Regents of the University of California. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that: (1) source code distributions - * retain the above copyright notice and this paragraph in its entirety, (2) - * distributions including binary code include the above copyright notice and - * this paragraph in its entirety in the documentation or other materials - * provided with the distribution, and (3) all advertising materials mentioning - * features or use of this software display the following acknowledgement: - * ``This product includes software developed by the University of California, - * Lawrence Berkeley Laboratory and its contributors.'' Neither the name of - * the University nor the names of its contributors may be used to endorse - * or promote products derived from this software without specific prior - * written permission. - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - */ - -#ifndef lint -static const char rcsid[] = - "@(#) $Header: /tcpdump/master/tcpdump/Attic/savestr.c,v 1.6 2000/07/11 00:49:02 assar Exp $ (LBL)"; -#endif - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include - -#include -#include -#include - -#ifdef HAVE_OS_PROTO_H -#include "os-proto.h" -#endif - -#include "savestr.h" - -/* A replacement for strdup() that cuts down on malloc() overhead */ -char * -savestr(register const char *str) -{ - register u_int size; - register char *p; - static char *strptr = NULL; - static u_int strsize = 0; - - size = strlen(str) + 1; - if (size > strsize) { - strsize = 1024; - if (strsize < size) - strsize = size; - strptr = (char *)malloc(strsize); - if (strptr == NULL) { - fprintf(stderr, "savestr: malloc\n"); - exit(1); - } - } - (void)strcpy(strptr, str); - p = strptr; - strptr += size; - strsize -= size; - return (p); -} diff --git a/savestr.h b/savestr.h deleted file mode 100644 index 8fe995eb21fb..000000000000 --- a/savestr.h +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright (c) 1997 - * The Regents of the University of California. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that: (1) source code distributions - * retain the above copyright notice and this paragraph in its entirety, (2) - * distributions including binary code include the above copyright notice and - * this paragraph in its entirety in the documentation or other materials - * provided with the distribution, and (3) all advertising materials mentioning - * features or use of this software display the following acknowledgement: - * ``This product includes software developed by the University of California, - * Lawrence Berkeley Laboratory and its contributors.'' Neither the name of - * the University nor the names of its contributors may be used to endorse - * or promote products derived from this software without specific prior - * written permission. - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - * - * @(#) $Header: /tcpdump/master/tcpdump/Attic/savestr.h,v 1.1.1.1 1999/10/07 23:47:12 mcr Exp $ (LBL) - */ - -extern char *savestr(const char *); diff --git a/sctpConstants.h b/sctpConstants.h index f70226b62402..ac28a151d0e8 100644 --- a/sctpConstants.h +++ b/sctpConstants.h @@ -1,4 +1,4 @@ -/* @(#) $Header: /tcpdump/master/tcpdump/sctpConstants.h,v 1.4 2003/06/03 23:49:23 guy Exp $ (LBL) */ +/* @(#) $Header: /tcpdump/master/tcpdump/sctpConstants.h,v 1.4 2003-06-03 23:49:23 guy Exp $ (LBL) */ /* SCTP reference Implementation Copyright (C) 1999 Cisco And Motorola * diff --git a/sctpHeader.h b/sctpHeader.h index 3b26094c1b82..63f30b5d834a 100644 --- a/sctpHeader.h +++ b/sctpHeader.h @@ -1,4 +1,4 @@ -/* @(#) $Header: /tcpdump/master/tcpdump/sctpHeader.h,v 1.6 2002/12/11 07:14:11 guy Exp $ (LBL) */ +/* @(#) $Header: /tcpdump/master/tcpdump/sctpHeader.h,v 1.6 2002-12-11 07:14:11 guy Exp $ (LBL) */ /* SCTP reference Implementation Copyright (C) 1999 Cisco And Motorola * diff --git a/setsignal.c b/setsignal.c index dbb8678182fb..a4b59cefe1bb 100644 --- a/setsignal.c +++ b/setsignal.c @@ -21,7 +21,7 @@ #ifndef lint static const char rcsid[] _U_ = - "@(#) $Header: /tcpdump/master/tcpdump/setsignal.c,v 1.11 2003/11/16 09:36:42 guy Exp $ (LBL)"; + "@(#) $Header: /tcpdump/master/tcpdump/setsignal.c,v 1.11 2003-11-16 09:36:42 guy Exp $ (LBL)"; #endif #ifdef HAVE_CONFIG_H diff --git a/setsignal.h b/setsignal.h index a7fb2a7481bd..cc8e86c24292 100644 --- a/setsignal.h +++ b/setsignal.h @@ -18,7 +18,7 @@ * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. * - * @(#) $Header: /tcpdump/master/tcpdump/setsignal.h,v 1.2.1.1 1999/10/07 23:47:13 mcr Exp $ (LBL) + * @(#) $Header: /tcpdump/master/tcpdump/setsignal.h,v 1.2.1.1 1999-10-07 23:47:13 mcr Exp $ (LBL) */ #ifndef setsignal_h #define setsignal_h diff --git a/slcompress.h b/slcompress.h index d8a596cf5290..d10243a9fd78 100644 --- a/slcompress.h +++ b/slcompress.h @@ -1,7 +1,7 @@ /* * Definitions for tcp compression routines. * - * @(#) $Header: /tcpdump/master/tcpdump/slcompress.h,v 1.2 2000/10/09 02:03:44 guy Exp $ (LBL) + * @(#) $Header: /tcpdump/master/tcpdump/slcompress.h,v 1.2 2000-10-09 02:03:44 guy Exp $ (LBL) * * Copyright (c) 1989, 1990, 1992, 1993 Regents of the University of * California. All rights reserved. diff --git a/slip.h b/slip.h index e64f3015ac3e..aa6402c3b109 100644 --- a/slip.h +++ b/slip.h @@ -2,7 +2,7 @@ * Definitions that user level programs might need to know to interact * with serial line IP (slip) lines. * - * @(#) $Header: /tcpdump/master/tcpdump/slip.h,v 1.1 2000/10/09 01:53:21 guy Exp $ + * @(#) $Header: /tcpdump/master/tcpdump/slip.h,v 1.1 2000-10-09 01:53:21 guy Exp $ * * Copyright (c) 1990 Regents of the University of California. * All rights reserved. diff --git a/sll.h b/sll.h index 693f05efa496..bad31e27a49f 100644 --- a/sll.h +++ b/sll.h @@ -35,7 +35,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * @(#) $Header: /tcpdump/master/tcpdump/sll.h,v 1.7 2002/12/11 07:14:11 guy Exp $ (LBL) + * @(#) $Header: /tcpdump/master/tcpdump/sll.h,v 1.7.6.1 2008-05-30 01:38:21 guy Exp $ (LBL) */ /* @@ -64,8 +64,8 @@ * DO NOT change the layout of this structure, or change any of the * LINUX_SLL_ values below. If you must change the link-layer header * for a "cooked" Linux capture, introduce a new DLT_ type (ask - * "tcpdump-workers@tcpdump.org" for one, so that you don't give it a - * value that collides with a value already being used), and use the + * "tcpdump-workers@lists.tcpdump.org" for one, so that you don't give it + * a value that collides with a value already being used), and use the * new header in captures of that type, so that programs that can * handle DLT_LINUX_SLL captures will continue to handle them correctly * without any change, and so that capture files with different headers diff --git a/smb.h b/smb.h index bb05227f1d52..8eeb303f91a0 100644 --- a/smb.h +++ b/smb.h @@ -1,4 +1,4 @@ -/* @(#) $Header: /tcpdump/master/tcpdump/smb.h,v 1.9 2004/12/28 22:29:44 guy Exp $ (LBL) */ +/* @(#) $Header: /tcpdump/master/tcpdump/smb.h,v 1.9 2004-12-28 22:29:44 guy Exp $ (LBL) */ /* * Copyright (C) Andrew Tridgell 1995-1999 * diff --git a/smbutil.c b/smbutil.c index 86bcb4c93cc8..ba7ec31a9868 100644 --- a/smbutil.c +++ b/smbutil.c @@ -12,7 +12,7 @@ #ifndef lint static const char rcsid[] _U_ = - "@(#) $Header: /tcpdump/master/tcpdump/smbutil.c,v 1.36.2.3 2007/07/15 19:08:25 guy Exp $"; + "@(#) $Header: /tcpdump/master/tcpdump/smbutil.c,v 1.39 2007-07-15 19:07:39 guy Exp $"; #endif #include diff --git a/strcasecmp.c b/strcasecmp.c index aa6d0074219b..f19ccf547d1a 100644 --- a/strcasecmp.c +++ b/strcasecmp.c @@ -16,7 +16,7 @@ #ifndef lint static const char rcsid[] _U_ = - "@(#) $Header: /tcpdump/master/tcpdump/strcasecmp.c,v 1.6 2003/11/16 09:36:43 guy Exp $"; + "@(#) $Header: /tcpdump/master/tcpdump/strcasecmp.c,v 1.6 2003-11-16 09:36:43 guy Exp $"; #endif #include diff --git a/tcp.h b/tcp.h index 5934cd632e92..db7dd44775e6 100644 --- a/tcp.h +++ b/tcp.h @@ -1,4 +1,4 @@ -/* @(#) $Header: /tcpdump/master/tcpdump/tcp.h,v 1.11.2.1 2005/11/29 09:09:26 hannes Exp $ (LBL) */ +/* @(#) $Header: /tcpdump/master/tcpdump/tcp.h,v 1.13.2.1 2007-12-09 00:31:35 guy Exp $ (LBL) */ /* * Copyright (c) 1982, 1986, 1993 * The Regents of the University of California. All rights reserved. @@ -45,21 +45,25 @@ struct tcphdr { tcp_seq th_seq; /* sequence number */ tcp_seq th_ack; /* acknowledgement number */ u_int8_t th_offx2; /* data offset, rsvd */ -#define TH_OFF(th) (((th)->th_offx2 & 0xf0) >> 4) u_int8_t th_flags; -#define TH_FIN 0x01 -#define TH_SYN 0x02 -#define TH_RST 0x04 -#define TH_PUSH 0x08 -#define TH_ACK 0x10 -#define TH_URG 0x20 -#define TH_ECNECHO 0x40 /* ECN Echo */ -#define TH_CWR 0x80 /* ECN Cwnd Reduced */ u_int16_t th_win; /* window */ u_int16_t th_sum; /* checksum */ u_int16_t th_urp; /* urgent pointer */ }; +#define TH_OFF(th) (((th)->th_offx2 & 0xf0) >> 4) + +/* TCP flags */ +#define TH_FIN 0x01 +#define TH_SYN 0x02 +#define TH_RST 0x04 +#define TH_PUSH 0x08 +#define TH_ACK 0x10 +#define TH_URG 0x20 +#define TH_ECNECHO 0x40 /* ECN Echo */ +#define TH_CWR 0x80 /* ECN Cwnd Reduced */ + + #define TCPOPT_EOL 0 #define TCPOPT_NOP 1 #define TCPOPT_MAXSEG 2 @@ -82,3 +86,23 @@ struct tcphdr { #define TCPOPT_TSTAMP_HDR \ (TCPOPT_NOP<<24|TCPOPT_NOP<<16|TCPOPT_TIMESTAMP<<8|TCPOLEN_TIMESTAMP) + +#ifndef TELNET_PORT +#define TELNET_PORT 23 +#endif +#ifndef BGP_PORT +#define BGP_PORT 179 +#endif +#define NETBIOS_SSN_PORT 139 +#ifndef PPTP_PORT +#define PPTP_PORT 1723 +#endif +#define BEEP_PORT 10288 +#ifndef NFS_PORT +#define NFS_PORT 2049 +#endif +#define MSDP_PORT 639 +#define LDP_PORT 646 +#ifndef SMB_PORT +#define SMB_PORT 445 +#endif diff --git a/tcpdump-stdinc.h b/tcpdump-stdinc.h index cd04d09df9b7..30d42fcd507b 100644 --- a/tcpdump-stdinc.h +++ b/tcpdump-stdinc.h @@ -29,7 +29,7 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * - * @(#) $Header: /tcpdump/master/tcpdump/tcpdump-stdinc.h,v 1.12.2.5 2006/06/23 02:07:27 hannes Exp $ (LBL) + * @(#) $Header: /tcpdump/master/tcpdump/tcpdump-stdinc.h,v 1.17 2006-05-19 17:55:34 hannes Exp $ (LBL) */ /* diff --git a/tcpdump.1 b/tcpdump.1 index d13b4de6f982..50efc31c5621 100644 --- a/tcpdump.1 +++ b/tcpdump.1 @@ -1,4 +1,4 @@ -.\" @(#) $Header: /tcpdump/master/tcpdump/tcpdump.1,v 1.167.2.11 2007/06/15 20:13:49 guy Exp $ (LBL) +.\" @(#) $Header: /tcpdump/master/tcpdump/tcpdump.1,v 1.185.2.6 2008-05-30 01:38:21 guy Exp $ (LBL) .\" .\" $NetBSD: tcpdump.8,v 1.9 2003/03/31 00:18:17 perry Exp $ .\" @@ -22,14 +22,17 @@ .\" WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF .\" MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. .\" -.TH TCPDUMP 1 "18 April 2005" +.TH TCPDUMP 1 "07 January 2008" .SH NAME tcpdump \- dump traffic on a network .SH SYNOPSIS .na .B tcpdump [ -.B \-AdDeflLnNOpqRStuUvxX +.B \-AdDefIKlLnNOpqRStuUvxX +] [ +.B \-B +.I buffer_size ] [ .B \-c .I count @@ -40,6 +43,9 @@ tcpdump \- dump traffic on a network .B \-C .I file_size ] [ +.B \-G +.I rotate_seconds +] [ .B \-F .I file ] @@ -94,6 +100,10 @@ tcpdump \- dump traffic on a network .I datalinktype ] [ +.B \-z +.I postrotate-command +] +[ .B \-Z .I user ] @@ -171,87 +181,19 @@ default, so you must set it with in order to use it) and will continue capturing packets. .LP Reading packets from a network interface may require that you have -special privileges: -.TP -.B Under SunOS 3.x or 4.x with NIT or BPF: -You must have read access to -.I /dev/nit -or -.IR /dev/bpf* . -.TP -.B Under Solaris with DLPI: -You must have read/write access to the network pseudo device, e.g. -.IR /dev/le . -On at least some versions of Solaris, however, this is not sufficient to -allow -.I tcpdump -to capture in promiscuous mode; on those versions of Solaris, you must -be root, or -.I tcpdump -must be installed setuid to root, in order to capture in promiscuous -mode. Note that, on many (perhaps all) interfaces, if you don't capture -in promiscuous mode, you will not see any outgoing packets, so a capture -not done in promiscuous mode may not be very useful. -.TP -.B Under HP-UX with DLPI: -You must be root or -.I tcpdump -must be installed setuid to root. -.TP -.B Under IRIX with snoop: -You must be root or -.I tcpdump -must be installed setuid to root. -.TP -.B Under Linux: -You must be root or -.I tcpdump -must be installed setuid to root (unless your distribution has a kernel -that supports capability bits such as CAP_NET_RAW and code to allow -those capability bits to be given to particular accounts and to cause -those bits to be set on a user's initial processes when they log in, in -which case you must have CAP_NET_RAW in order to capture and -CAP_NET_ADMIN to enumerate network devices with, for example, the -.B \-D -flag). -.TP -.B Under ULTRIX and Digital UNIX/Tru64 UNIX: -Any user may capture network traffic with -.IR tcpdump . -However, no user (not even the super-user) can capture in promiscuous -mode on an interface unless the super-user has enabled promiscuous-mode -operation on that interface using -.IR pfconfig (8), -and no user (not even the super-user) can capture unicast traffic -received by or sent by the machine on an interface unless the super-user -has enabled copy-all-mode operation on that interface using -.IR pfconfig , -so -.I useful -packet capture on an interface probably requires that either -promiscuous-mode or copy-all-mode operation, or both modes of -operation, be enabled on that interface. -.TP -.B Under BSD (this includes Mac OS X): -You must have read access to -.I /dev/bpf* -on systems that don't have a cloning BPF device, or to -.I /dev/bpf -on systems that do. -On BSDs with a devfs (this includes Mac OS X), this might involve more -than just having somebody with super-user access setting the ownership -or permissions on the BPF devices - it might involve configuring devfs -to set the ownership or permissions every time the system is booted, -if the system even supports that; if it doesn't support that, you might -have to find some other way to make that happen at boot time. -.LP -Reading a saved packet file doesn't require special privileges. +special privileges; see the +.B pcap (3PCAP) +man page for details. Reading a saved packet file doesn't require +special privileges. .SH OPTIONS .TP .B \-A Print each packet (minus its link level header) in ASCII. Handy for capturing web pages. .TP +.B \-B +Set the operating system capture buffer size to \fIbuffer_size\fP. +.TP .B \-c Exit after receiving \fIcount\fP packets. .TP @@ -359,6 +301,20 @@ correctly. Use \fIfile\fP as input for the filter expression. An additional expression given on the command line is ignored. .TP +.B \-G +If specified, rotates the dump file specified with the +.B \-w +option every \fIrotate_seconds\fP seconds. +Savefiles will have the name specified by +.B \-w +which should include a time format as defined by +.BR strftime (3). +If no time format is specified, each new file will overwrite the previous. +.IP +If used in conjunction with the +.B \-C +option, filenames will take the form of `\fIfile\fP'. +.TP .B \-i Listen on \fIinterface\fP. If unspecified, \fItcpdump\fP searches the system interface list for the @@ -378,6 +334,22 @@ used as the .I interface argument. .TP +.B \-I +Put the interface in "monitor mode"; this is supported only on IEEE +802.11 Wi-Fi interfaces, and supported only on some operating systems. +.IP +Note that in monitor mode the adapter might disassociate from the +network with which it's associated, so that you will not be able to use +any wireless networks with that adapter. This could prevent accessing +files on a network server, or resolving host names or network addresses, +if you are capturing in monitor mode and are not connected to another +network with another adapter. +.TP +.B \-K +Don't attempt to verify TCP checksums. This is useful for interfaces +that perform the TCP checksum calculation in hardware; otherwise, +all outgoing TCP checksums will be flagged as bad. +.TP .B \-l Make stdout line buffered. Useful if you want to see the data @@ -481,12 +453,16 @@ and Print an unformatted timestamp on each dump line. .TP .B \-ttt -Print a delta (in micro-seconds) between current and previous line +Print a delta (micro-second resolution) between current and previous line on each dump line. .TP .B \-tttt Print a timestamp in default format proceeded by date on each dump line. .TP +.B \-ttttt +Print a delta (micro-second resolution) between current and first line +on each dump line. +.TP .B \-u Print undecoded NFS handles. .TP @@ -547,6 +523,13 @@ from the beginning, thus creating a 'rotating' buffer. In addition, it will name the files with enough leading 0s to support the maximum number of files, allowing them to sort correctly. +.IP +Used in conjunction with the +.B \-G +option, this will limit the number of rotated dump files that get +created, exiting with status 0 when reaching the limit. If used with +.B \-C +as well, the behavior will result in cyclical files per timeslice. .TP .B \-x When parsing and printing, @@ -582,6 +565,31 @@ its link level header, in hex and ASCII. .B \-y Set the data link type to use while capturing packets to \fIdatalinktype\fP. .TP +.B \-z +Used in conjunction with the +.B -C +or +.B -G +options, this will make +.I tcpdump +run " +.I command file +" where +.I file +is the savefile being closed after each rotation. For example, specifying +.B \-z gzip +or +.B \-z bzip2 +will compress each savefile using gzip or bzip2. +.IP +Note that tcpdump will run the command in parallel to the capture, using +the lowest priority so that this doesn't disturb the capture process. +.IP +And in case you would like to use a command that itself takes flags or +different arguments, you can always write a shell script that will take the +savefile name as the only argument, make the flags & arguments arrangements +and execute the command that you want. +.TP .B \-Z Drops privileges (if root) and changes user ID to .I user @@ -597,678 +605,8 @@ is given, all packets on the net will be dumped. Otherwise, only packets for which \fIexpression\fP is `true' will be dumped. .LP -The \fIexpression\fP consists of one or more -.I primitives. -Primitives usually consist of an -.I id -(name or number) preceded by one or more qualifiers. -There are three -different kinds of qualifier: -.IP \fItype\fP -qualifiers say what kind of thing the id name or number refers to. -Possible types are -.BR host , -.B net , -.B port -and -.BR portrange . -E.g., `host foo', `net 128.3', `port 20', `portrange 6000-6008'. -If there is no type -qualifier, -.B host -is assumed. -.IP \fIdir\fP -qualifiers specify a particular transfer direction to and/or from -.IR id . -Possible directions are -.BR src , -.BR dst , -.B "src or dst" -and -.B "src and" -.BR dst . -E.g., `src foo', `dst net 128.3', `src or dst port ftp-data'. -If -there is no dir qualifier, -.B "src or dst" -is assumed. -For some link layers, such as SLIP and the ``cooked'' Linux capture mode -used for the ``any'' device and for some other device types, the -.B inbound -and -.B outbound -qualifiers can be used to specify a desired direction. -.IP \fIproto\fP -qualifiers restrict the match to a particular protocol. -Possible -protos are: -.BR ether , -.BR fddi , -.BR tr , -.BR wlan , -.BR ip , -.BR ip6 , -.BR arp , -.BR rarp , -.BR decnet , -.B tcp -and -.BR udp . -E.g., `ether src foo', `arp net 128.3', `tcp port 21', `udp portrange -7000-7009'. -If there is -no proto qualifier, all protocols consistent with the type are -assumed. -E.g., `src foo' means `(ip or arp or rarp) src foo' -(except the latter is not legal syntax), `net bar' means `(ip or -arp or rarp) net bar' and `port 53' means `(tcp or udp) port 53'. -.LP -[`fddi' is actually an alias for `ether'; the parser treats them -identically as meaning ``the data link level used on the specified -network interface.'' FDDI headers contain Ethernet-like source -and destination addresses, and often contain Ethernet-like packet -types, so you can filter on these FDDI fields just as with the -analogous Ethernet fields. -FDDI headers also contain other fields, -but you cannot name them explicitly in a filter expression. -.LP -Similarly, `tr' and `wlan' are aliases for `ether'; the previous -paragraph's statements about FDDI headers also apply to Token Ring -and 802.11 wireless LAN headers. For 802.11 headers, the destination -address is the DA field and the source address is the SA field; the -BSSID, RA, and TA fields aren't tested.] -.LP -In addition to the above, there are some special `primitive' keywords -that don't follow the pattern: -.BR gateway , -.BR broadcast , -.BR less , -.B greater -and arithmetic expressions. -All of these are described below. -.LP -More complex filter expressions are built up by using the words -.BR and , -.B or -and -.B not -to combine primitives. -E.g., `host foo and not port ftp and not port ftp-data'. -To save typing, identical qualifier lists can be omitted. -E.g., -`tcp dst port ftp or ftp-data or domain' is exactly the same as -`tcp dst port ftp or tcp dst port ftp-data or tcp dst port domain'. -.LP -Allowable primitives are: -.IP "\fBdst host \fIhost\fR" -True if the IPv4/v6 destination field of the packet is \fIhost\fP, -which may be either an address or a name. -.IP "\fBsrc host \fIhost\fR" -True if the IPv4/v6 source field of the packet is \fIhost\fP. -.IP "\fBhost \fIhost\fP -True if either the IPv4/v6 source or destination of the packet is \fIhost\fP. -.IP -Any of the above host expressions can be prepended with the keywords, -\fBip\fP, \fBarp\fP, \fBrarp\fP, or \fBip6\fP as in: -.in +.5i -.nf -\fBip host \fIhost\fR -.fi -.in -.5i -which is equivalent to: -.in +.5i -.nf -\fBether proto \fI\\ip\fB and host \fIhost\fR -.fi -.in -.5i -If \fIhost\fR is a name with multiple IP addresses, each address will -be checked for a match. -.IP "\fBether dst \fIehost\fP -True if the Ethernet destination address is \fIehost\fP. -\fIEhost\fP -may be either a name from /etc/ethers or a number (see -.IR ethers (3N) -for numeric format). -.IP "\fBether src \fIehost\fP -True if the Ethernet source address is \fIehost\fP. -.IP "\fBether host \fIehost\fP -True if either the Ethernet source or destination address is \fIehost\fP. -.IP "\fBgateway\fP \fIhost\fP -True if the packet used \fIhost\fP as a gateway. -I.e., the Ethernet -source or destination address was \fIhost\fP but neither the IP source -nor the IP destination was \fIhost\fP. -\fIHost\fP must be a name and -must be found both by the machine's host-name-to-IP-address resolution -mechanisms (host name file, DNS, NIS, etc.) and by the machine's -host-name-to-Ethernet-address resolution mechanism (/etc/ethers, etc.). -(An equivalent expression is -.in +.5i -.nf -\fBether host \fIehost \fBand not host \fIhost\fR -.fi -.in -.5i -which can be used with either names or numbers for \fIhost / ehost\fP.) -This syntax does not work in IPv6-enabled configuration at this moment. -.IP "\fBdst net \fInet\fR" -True if the IPv4/v6 destination address of the packet has a network -number of \fInet\fP. -\fINet\fP may be either a name from the networks database -(/etc/networks, etc.) or a network number. -An IPv4 network number can be written as a dotted quad (e.g., 192.168.1.0), -dotted triple (e.g., 192.168.1), dotted pair (e.g, 172.16), or single -number (e.g., 10); the netmask is 255.255.255.255 for a dotted quad -(which means that it's really a host match), 255.255.255.0 for a dotted -triple, 255.255.0.0 for a dotted pair, or 255.0.0.0 for a single number. -An IPv6 network number must be written out fully; the netmask is -ff:ff:ff:ff:ff:ff:ff:ff, so IPv6 "network" matches are really always -host matches, and a network match requires a netmask length. -.IP "\fBsrc net \fInet\fR" -True if the IPv4/v6 source address of the packet has a network -number of \fInet\fP. -.IP "\fBnet \fInet\fR" -True if either the IPv4/v6 source or destination address of the packet has a network -number of \fInet\fP. -.IP "\fBnet \fInet\fR \fBmask \fInetmask\fR" -True if the IPv4 address matches \fInet\fR with the specific \fInetmask\fR. -May be qualified with \fBsrc\fR or \fBdst\fR. -Note that this syntax is not valid for IPv6 \fInet\fR. -.IP "\fBnet \fInet\fR/\fIlen\fR" -True if the IPv4/v6 address matches \fInet\fR with a netmask \fIlen\fR -bits wide. -May be qualified with \fBsrc\fR or \fBdst\fR. -.IP "\fBdst port \fIport\fR" -True if the packet is ip/tcp, ip/udp, ip6/tcp or ip6/udp and has a -destination port value of \fIport\fP. -The \fIport\fP can be a number or a name used in /etc/services (see -.IR tcp (4P) -and -.IR udp (4P)). -If a name is used, both the port -number and protocol are checked. -If a number or ambiguous name is used, -only the port number is checked (e.g., \fBdst port 513\fR will print both -tcp/login traffic and udp/who traffic, and \fBport domain\fR will print -both tcp/domain and udp/domain traffic). -.IP "\fBsrc port \fIport\fR" -True if the packet has a source port value of \fIport\fP. -.IP "\fBport \fIport\fR" -True if either the source or destination port of the packet is \fIport\fP. -.IP "\fBdst portrange \fIport1\fB-\fIport2\fR" -True if the packet is ip/tcp, ip/udp, ip6/tcp or ip6/udp and has a -destination port value between \fIport1\fP and \fIport2\fP. -.I port1 -and -.I port2 -are interpreted in the same fashion as the -.I port -parameter for -.BR port . -.IP "\fBsrc portrange \fIport1\fB-\fIport2\fR" -True if the packet has a source port value between \fIport1\fP and -\fIport2\fP. -.IP "\fBportrange \fIport1\fB-\fIport2\fR" -True if either the source or destination port of the packet is between -\fIport1\fP and \fIport2\fP. -.IP -Any of the above port or port range expressions can be prepended with -the keywords, \fBtcp\fP or \fBudp\fP, as in: -.in +.5i -.nf -\fBtcp src port \fIport\fR -.fi -.in -.5i -which matches only tcp packets whose source port is \fIport\fP. -.IP "\fBless \fIlength\fR" -True if the packet has a length less than or equal to \fIlength\fP. -This is equivalent to: -.in +.5i -.nf -\fBlen <= \fIlength\fP. -.fi -.in -.5i -.IP "\fBgreater \fIlength\fR" -True if the packet has a length greater than or equal to \fIlength\fP. -This is equivalent to: -.in +.5i -.nf -\fBlen >= \fIlength\fP. -.fi -.in -.5i -.IP "\fBip proto \fIprotocol\fR" -True if the packet is an IPv4 packet (see -.IR ip (4P)) -of protocol type \fIprotocol\fP. -\fIProtocol\fP can be a number or one of the names -\fBicmp\fP, \fBicmp6\fP, \fBigmp\fP, \fBigrp\fP, \fBpim\fP, \fBah\fP, -\fBesp\fP, \fBvrrp\fP, \fBudp\fP, or \fBtcp\fP. -Note that the identifiers \fBtcp\fP, \fBudp\fP, and \fBicmp\fP are also -keywords and must be escaped via backslash (\\), which is \\\\ in the C-shell. -Note that this primitive does not chase the protocol header chain. -.IP "\fBip6 proto \fIprotocol\fR" -True if the packet is an IPv6 packet of protocol type \fIprotocol\fP. -Note that this primitive does not chase the protocol header chain. -.IP "\fBip6 protochain \fIprotocol\fR" -True if the packet is IPv6 packet, -and contains protocol header with type \fIprotocol\fR -in its protocol header chain. -For example, -.in +.5i -.nf -\fBip6 protochain 6\fR -.fi -.in -.5i -matches any IPv6 packet with TCP protocol header in the protocol header chain. -The packet may contain, for example, -authentication header, routing header, or hop-by-hop option header, -between IPv6 header and TCP header. -The BPF code emitted by this primitive is complex and -cannot be optimized by BPF optimizer code in \fItcpdump\fP, -so this can be somewhat slow. -.IP "\fBip protochain \fIprotocol\fR" -Equivalent to \fBip6 protochain \fIprotocol\fR, but this is for IPv4. -.IP "\fBether broadcast\fR" -True if the packet is an Ethernet broadcast packet. -The \fIether\fP -keyword is optional. -.IP "\fBip broadcast\fR" -True if the packet is an IPv4 broadcast packet. -It checks for both the all-zeroes and all-ones broadcast conventions, -and looks up the subnet mask on the interface on which the capture is -being done. -.IP -If the subnet mask of the interface on which the capture is being done -is not available, either because the interface on which capture is being -done has no netmask or because the capture is being done on the Linux -"any" interface, which can capture on more than one interface, this -check will not work correctly. -.IP "\fBether multicast\fR" -True if the packet is an Ethernet multicast packet. -The \fBether\fP -keyword is optional. -This is shorthand for `\fBether[0] & 1 != 0\fP'. -.IP "\fBip multicast\fR" -True if the packet is an IPv4 multicast packet. -.IP "\fBip6 multicast\fR" -True if the packet is an IPv6 multicast packet. -.IP "\fBether proto \fIprotocol\fR" -True if the packet is of ether type \fIprotocol\fR. -\fIProtocol\fP can be a number or one of the names -\fBip\fP, \fBip6\fP, \fBarp\fP, \fBrarp\fP, \fBatalk\fP, \fBaarp\fP, -\fBdecnet\fP, \fBsca\fP, \fBlat\fP, \fBmopdl\fP, \fBmoprc\fP, -\fBiso\fP, \fBstp\fP, \fBipx\fP, or \fBnetbeui\fP. -Note these identifiers are also keywords -and must be escaped via backslash (\\). -.IP -[In the case of FDDI (e.g., `\fBfddi protocol arp\fR'), Token Ring -(e.g., `\fBtr protocol arp\fR'), and IEEE 802.11 wireless LANS (e.g., -`\fBwlan protocol arp\fR'), for most of those protocols, the -protocol identification comes from the 802.2 Logical Link Control (LLC) -header, which is usually layered on top of the FDDI, Token Ring, or -802.11 header. -.IP -When filtering for most protocol identifiers on FDDI, Token Ring, or -802.11, \fItcpdump\fR checks only the protocol ID field of an LLC header -in so-called SNAP format with an Organizational Unit Identifier (OUI) of -0x000000, for encapsulated Ethernet; it doesn't check whether the packet -is in SNAP format with an OUI of 0x000000. -The exceptions are: -.RS -.TP -\fBiso\fP -\fItcpdump\fR checks the DSAP (Destination Service Access Point) and -SSAP (Source Service Access Point) fields of the LLC header; -.TP -\fBstp\fP and \fBnetbeui\fP -\fItcpdump\fR checks the DSAP of the LLC header; -.TP -\fBatalk\fP -\fItcpdump\fR checks for a SNAP-format packet with an OUI of 0x080007 -and the AppleTalk etype. -.RE -.IP -In the case of Ethernet, \fItcpdump\fR checks the Ethernet type field -for most of those protocols. The exceptions are: -.RS -.TP -\fBiso\fP, \fBstp\fP, and \fBnetbeui\fP -\fItcpdump\fR checks for an 802.3 frame and then checks the LLC header as -it does for FDDI, Token Ring, and 802.11; -.TP -\fBatalk\fP -\fItcpdump\fR checks both for the AppleTalk etype in an Ethernet frame and -for a SNAP-format packet as it does for FDDI, Token Ring, and 802.11; -.TP -\fBaarp\fP -\fItcpdump\fR checks for the AppleTalk ARP etype in either an Ethernet -frame or an 802.2 SNAP frame with an OUI of 0x000000; -.TP -\fBipx\fP -\fItcpdump\fR checks for the IPX etype in an Ethernet frame, the IPX -DSAP in the LLC header, the 802.3-with-no-LLC-header encapsulation of -IPX, and the IPX etype in a SNAP frame. -.RE -.IP "\fBdecnet src \fIhost\fR" -True if the DECNET source address is -.IR host , -which may be an address of the form ``10.123'', or a DECNET host -name. -[DECNET host name support is only available on ULTRIX systems -that are configured to run DECNET.] -.IP "\fBdecnet dst \fIhost\fR" -True if the DECNET destination address is -.IR host . -.IP "\fBdecnet host \fIhost\fR" -True if either the DECNET source or destination address is -.IR host . -.IP "\fBifname \fIinterface\fR" -True if the packet was logged as coming from the specified interface (applies -only to packets logged by OpenBSD's -.BR pf (4)). -.IP "\fBon \fIinterface\fR" -Synonymous with the -.B ifname -modifier. -.IP "\fBrnr \fInum\fR" -True if the packet was logged as matching the specified PF rule number -(applies only to packets logged by OpenBSD's -.BR pf (4)). -.IP "\fBrulenum \fInum\fR" -Synonomous with the -.B rnr -modifier. -.IP "\fBreason \fIcode\fR" -True if the packet was logged with the specified PF reason code. The known -codes are: -.BR match , -.BR bad-offset , -.BR fragment , -.BR short , -.BR normalize , -and -.B memory -(applies only to packets logged by OpenBSD's -.BR pf (4)). -.IP "\fBrset \fIname\fR" -True if the packet was logged as matching the specified PF ruleset -name of an anchored ruleset (applies only to packets logged by -.BR pf (4)). -.IP "\fBruleset \fIname\fR" -Synonomous with the -.B rset -modifier. -.IP "\fBsrnr \fInum\fR" -True if the packet was logged as matching the specified PF rule number -of an anchored ruleset (applies only to packets logged by -.BR pf (4)). -.IP "\fBsubrulenum \fInum\fR" -Synonomous with the -.B srnr -modifier. -.IP "\fBaction \fIact\fR" -True if PF took the specified action when the packet was logged. Known actions -are: -.B pass -and -.B block -(applies only to packets logged by OpenBSD's -.BR pf (4)). -.IP "\fBip\fR, \fBip6\fR, \fBarp\fR, \fBrarp\fR, \fBatalk\fR, \fBaarp\fR, \fBdecnet\fR, \fBiso\fR, \fBstp\fR, \fBipx\fR, \fInetbeui\fP" -Abbreviations for: -.in +.5i -.nf -\fBether proto \fIp\fR -.fi -.in -.5i -where \fIp\fR is one of the above protocols. -.IP "\fBlat\fR, \fBmoprc\fR, \fBmopdl\fR" -Abbreviations for: -.in +.5i -.nf -\fBether proto \fIp\fR -.fi -.in -.5i -where \fIp\fR is one of the above protocols. -Note that -\fItcpdump\fP does not currently know how to parse these protocols. -.IP "\fBvlan \fI[vlan_id]\fR" -True if the packet is an IEEE 802.1Q VLAN packet. -If \fI[vlan_id]\fR is specified, only true if the packet has the specified -\fIvlan_id\fR. -Note that the first \fBvlan\fR keyword encountered in \fIexpression\fR -changes the decoding offsets for the remainder of \fIexpression\fR on -the assumption that the packet is a VLAN packet. The \fBvlan -\fI[vlan_id]\fR expression may be used more than once, to filter on VLAN -hierarchies. Each use of that expression increments the filter offsets -by 4. -.IP -For example: -.in +.5i -.nf -\fBvlan 100 && vlan 200\fR -.fi -.in -.5i -filters on VLAN 200 encapsulated within VLAN 100, and -.in +.5i -.nf -\fBvlan && vlan 300 && ip\fR -.fi -.in -.5i -filters IPv4 protocols encapsulated in VLAN 300 encapsulated within any -higher order VLAN. -.IP "\fBmpls \fI[label_num]\fR" -True if the packet is an MPLS packet. -If \fI[label_num]\fR is specified, only true is the packet has the specified -\fIlabel_num\fR. -Note that the first \fBmpls\fR keyword encountered in \fIexpression\fR -changes the decoding offsets for the remainder of \fIexpression\fR on -the assumption that the packet is a MPLS-encapsulated IP packet. The -\fBmpls \fI[label_num]\fR expression may be used more than once, to -filter on MPLS hierarchies. Each use of that expression increments the -filter offsets by 4. -.IP -For example: -.in +.5i -.nf -\fBmpls 100000 && mpls 1024\fR -.fi -.in -.5i -filters packets with an outer label of 100000 and an inner label of -1024, and -.in +.5i -.nf -\fBmpls && mpls 1024 && host 192.9.200.1\fR -.fi -.in -.5i -filters packets to or from 192.9.200.1 with an inner label of 1024 and -any outer label. -.IP \fBpppoed\fP -True if the packet is a PPP-over-Ethernet Discovery packet (Ethernet -type 0x8863). -.IP \fBpppoes\fP -True if the packet is a PPP-over-Ethernet Session packet (Ethernet -type 0x8864). -Note that the first \fBpppoes\fR keyword encountered in \fIexpression\fR -changes the decoding offsets for the remainder of \fIexpression\fR on -the assumption that the packet is a PPPoE session packet. -.IP -For example: -.in +.5i -.nf -\fBpppoes && ip\fR -.fi -.in -.5i -filters IPv4 protocols encapsulated in PPPoE. -.IP "\fBtcp\fR, \fBudp\fR, \fBicmp\fR" -Abbreviations for: -.in +.5i -.nf -\fBip proto \fIp\fR\fB or ip6 proto \fIp\fR -.fi -.in -.5i -where \fIp\fR is one of the above protocols. -.IP "\fBiso proto \fIprotocol\fR" -True if the packet is an OSI packet of protocol type \fIprotocol\fP. -\fIProtocol\fP can be a number or one of the names -\fBclnp\fP, \fBesis\fP, or \fBisis\fP. -.IP "\fBclnp\fR, \fBesis\fR, \fBisis\fR" -Abbreviations for: -.in +.5i -.nf -\fBiso proto \fIp\fR -.fi -.in -.5i -where \fIp\fR is one of the above protocols. -.IP "\fBl1\fR, \fBl2\fR, \fBiih\fR, \fBlsp\fR, \fBsnp\fR, \fBcsnp\fR, \fBpsnp\fR" -Abbreviations for IS-IS PDU types. -.IP "\fBvpi\fP \fIn\fR -True if the packet is an ATM packet, for SunATM on Solaris, with a -virtual path identifier of -.IR n . -.IP "\fBvci\fP \fIn\fR -True if the packet is an ATM packet, for SunATM on Solaris, with a -virtual channel identifier of -.IR n . -.IP \fBlane\fP -True if the packet is an ATM packet, for SunATM on Solaris, and is -an ATM LANE packet. -Note that the first \fBlane\fR keyword encountered in \fIexpression\fR -changes the tests done in the remainder of \fIexpression\fR -on the assumption that the packet is either a LANE emulated Ethernet -packet or a LANE LE Control packet. If \fBlane\fR isn't specified, the -tests are done under the assumption that the packet is an -LLC-encapsulated packet. -.IP \fBllc\fP -True if the packet is an ATM packet, for SunATM on Solaris, and is -an LLC-encapsulated packet. -.IP \fBoamf4s\fP -True if the packet is an ATM packet, for SunATM on Solaris, and is -a segment OAM F4 flow cell (VPI=0 & VCI=3). -.IP \fBoamf4e\fP -True if the packet is an ATM packet, for SunATM on Solaris, and is -an end-to-end OAM F4 flow cell (VPI=0 & VCI=4). -.IP \fBoamf4\fP -True if the packet is an ATM packet, for SunATM on Solaris, and is -a segment or end-to-end OAM F4 flow cell (VPI=0 & (VCI=3 | VCI=4)). -.IP \fBoam\fP -True if the packet is an ATM packet, for SunATM on Solaris, and is -a segment or end-to-end OAM F4 flow cell (VPI=0 & (VCI=3 | VCI=4)). -.IP \fBmetac\fP -True if the packet is an ATM packet, for SunATM on Solaris, and is -on a meta signaling circuit (VPI=0 & VCI=1). -.IP \fBbcc\fP -True if the packet is an ATM packet, for SunATM on Solaris, and is -on a broadcast signaling circuit (VPI=0 & VCI=2). -.IP \fBsc\fP -True if the packet is an ATM packet, for SunATM on Solaris, and is -on a signaling circuit (VPI=0 & VCI=5). -.IP \fBilmic\fP -True if the packet is an ATM packet, for SunATM on Solaris, and is -on an ILMI circuit (VPI=0 & VCI=16). -.IP \fBconnectmsg\fP -True if the packet is an ATM packet, for SunATM on Solaris, and is -on a signaling circuit and is a Q.2931 Setup, Call Proceeding, Connect, -Connect Ack, Release, or Release Done message. -.IP \fBmetaconnect\fP -True if the packet is an ATM packet, for SunATM on Solaris, and is -on a meta signaling circuit and is a Q.2931 Setup, Call Proceeding, Connect, -Release, or Release Done message. -.IP "\fIexpr relop expr\fR" -True if the relation holds, where \fIrelop\fR is one of >, <, >=, <=, =, -!=, and \fIexpr\fR is an arithmetic expression composed of integer -constants (expressed in standard C syntax), the normal binary operators -[+, -, *, /, &, |, <<, >>], a length operator, and special packet data -accessors. Note that all comparisons are unsigned, so that, for example, -0x80000000 and 0xffffffff are > 0. -To access -data inside the packet, use the following syntax: -.in +.5i -.nf -\fIproto\fB [ \fIexpr\fB : \fIsize\fB ]\fR -.fi -.in -.5i -\fIProto\fR is one of \fBether, fddi, tr, wlan, ppp, slip, link, -ip, arp, rarp, tcp, udp, icmp, ip6\fR or \fBradio\fR, and -indicates the protocol layer for the index operation. -(\fBether, fddi, wlan, tr, ppp, slip\fR and \fBlink\fR all refer to the -link layer. \fBradio\fR refers to the "radio header" added to some -802.11 captures.) -Note that \fItcp, udp\fR and other upper-layer protocol types only -apply to IPv4, not IPv6 (this will be fixed in the future). -The byte offset, relative to the indicated protocol layer, is -given by \fIexpr\fR. -\fISize\fR is optional and indicates the number of bytes in the -field of interest; it can be either one, two, or four, and defaults to one. -The length operator, indicated by the keyword \fBlen\fP, gives the -length of the packet. - -For example, `\fBether[0] & 1 != 0\fP' catches all multicast traffic. -The expression `\fBip[0] & 0xf != 5\fP' -catches all IPv4 packets with options. -The expression -`\fBip[6:2] & 0x1fff = 0\fP' -catches only unfragmented IPv4 datagrams and frag zero of fragmented -IPv4 datagrams. -This check is implicitly applied to the \fBtcp\fP and \fBudp\fP -index operations. -For instance, \fBtcp[0]\fP always means the first -byte of the TCP \fIheader\fP, and never means the first byte of an -intervening fragment. - -Some offsets and field values may be expressed as names rather than -as numeric values. -The following protocol header field offsets are -available: \fBicmptype\fP (ICMP type field), \fBicmpcode\fP (ICMP -code field), and \fBtcpflags\fP (TCP flags field). - -The following ICMP type field values are available: \fBicmp-echoreply\fP, -\fBicmp-unreach\fP, \fBicmp-sourcequench\fP, \fBicmp-redirect\fP, -\fBicmp-echo\fP, \fBicmp-routeradvert\fP, \fBicmp-routersolicit\fP, -\fBicmp-timxceed\fP, \fBicmp-paramprob\fP, \fBicmp-tstamp\fP, -\fBicmp-tstampreply\fP, \fBicmp-ireq\fP, \fBicmp-ireqreply\fP, -\fBicmp-maskreq\fP, \fBicmp-maskreply\fP. - -The following TCP flags field values are available: \fBtcp-fin\fP, -\fBtcp-syn\fP, \fBtcp-rst\fP, \fBtcp-push\fP, -\fBtcp-ack\fP, \fBtcp-urg\fP. -.LP -Primitives may be combined using: -.IP -A parenthesized group of primitives and operators -(parentheses are special to the Shell and must be escaped). -.IP -Negation (`\fB!\fP' or `\fBnot\fP'). -.IP -Concatenation (`\fB&&\fP' or `\fBand\fP'). -.IP -Alternation (`\fB||\fP' or `\fBor\fP'). -.LP -Negation has highest precedence. -Alternation and concatenation have equal precedence and associate -left to right. -Note that explicit \fBand\fR tokens, not juxtaposition, -are now required for concatenation. -.LP -If an identifier is given without a keyword, the most recent keyword -is assumed. -For example, -.in +.5i -.nf -\fBnot host vs and ace\fR -.fi -.in -.5i -is short for -.in +.5i -.nf -\fBnot host vs and host ace\fR -.fi -.in -.5i -which should not be confused with -.in +.5i -.nf -\fBnot ( host vs or ace )\fR -.fi -.in -.5i +For the \fIexpression\fP syntax, see +.BR pcap-filter (4). .LP Expression arguments can be passed to \fItcpdump\fP as either a single argument or as multiple arguments, whichever is more convenient. @@ -2272,7 +1610,7 @@ is made to account for the time lag between when the Ethernet interface removed the packet from the wire and when the kernel serviced the `new packet' interrupt. .SH "SEE ALSO" -stty(1), pcap(3), bpf(4), nit(4P), pfconfig(8) +stty(1), pcap(3PCAP), pcap-filter(4), bpf(4), nit(4P) .SH AUTHORS The original authors are: .LP @@ -2296,18 +1634,13 @@ The original distribution is available via anonymous ftp: .RE .LP IPv6/IPsec support is added by WIDE/KAME project. -This program uses Eric Young's SSLeay library, under specific configuration. +This program uses Eric Young's SSLeay library, under specific configurations. .SH BUGS -Please send problems, bugs, questions, desirable enhancements, etc. to: +Please send problems, bugs, questions, desirable enhancements, patches +etc. to: .LP .RS -tcpdump-workers@tcpdump.org -.RE -.LP -Please send source code contributions, etc. to: -.LP -.RS -patches@tcpdump.org +tcpdump-workers@lists.tcpdump.org .RE .LP NIT doesn't let you watch your own outbound traffic, BPF will. diff --git a/tcpdump.c b/tcpdump.c index caf419ea8a14..4328b3049051 100644 --- a/tcpdump.c +++ b/tcpdump.c @@ -30,7 +30,7 @@ static const char copyright[] _U_ = "@(#) Copyright (c) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 2000\n\ The Regents of the University of California. All rights reserved.\n"; static const char rcsid[] _U_ = - "@(#) $Header: /tcpdump/master/tcpdump/tcpdump.c,v 1.253.2.13 2007/09/12 19:48:51 guy Exp $ (LBL)"; + "@(#) $Header: /tcpdump/master/tcpdump/tcpdump.c,v 1.271.2.11 2008-09-25 21:50:04 guy Exp $ (LBL)"; #endif /* @@ -65,12 +65,16 @@ extern int SIZE_BUF; #include #include #include +#include #ifndef WIN32 +#include +#include #include #include #include #endif /* WIN32 */ + #include "netdissect.h" #include "interface.h" #include "addrtoname.h" @@ -79,19 +83,16 @@ extern int SIZE_BUF; #include "gmt2local.h" #include "pcap-missing.h" +#ifndef NAME_MAX +#define NAME_MAX 255 +#endif + netdissect_options Gndo; netdissect_options *gndo = &Gndo; -/* - * Define the maximum number of files for the -C flag, and how many - * characters can be added to a filename for the -C flag (which - * should be enough to handle MAX_CFLAG - 1). - */ -#define MAX_CFLAG 1000000 -#define MAX_CFLAG_CHARS 6 - int dflag; /* print filter code */ int Lflag; /* list available data link types and exit */ +char *zflag = NULL; /* compress each savefile using a specified command (like gzip or bzip2) */ static int infodelay; static int infoprint; @@ -102,6 +103,7 @@ int32_t thiszone; /* seconds offset from gmt to local time */ /* Forwards */ static RETSIGTYPE cleanup(int); +static RETSIGTYPE child_cleanup(int); static void usage(void) __attribute__((noreturn)); static void show_dlts_and_exit(pcap_t *pd) __attribute__((noreturn)); @@ -220,6 +222,9 @@ static struct printer printers[] = { #ifdef DLT_APPLE_IP_OVER_IEEE1394 { ap1394_if_print, DLT_APPLE_IP_OVER_IEEE1394 }, #endif +#ifdef DLT_IEEE802_11_RADIO_AVS + { ieee802_11_radio_avs_if_print, DLT_IEEE802_11_RADIO_AVS }, +#endif #ifdef DLT_JUNIPER_ATM1 { juniper_atm1_print, DLT_JUNIPER_ATM1 }, #endif @@ -267,6 +272,9 @@ static struct printer printers[] = { #endif #ifdef DLT_MFR { mfr_if_print, DLT_MFR }, +#endif +#if defined(DLT_BLUETOOTH_HCI_H4_WITH_PHDR) && defined(HAVE_PCAP_BLUETOOTH_H) + { bt_if_print, DLT_BLUETOOTH_HCI_H4_WITH_PHDR}, #endif { NULL, 0 }, }; @@ -296,6 +304,7 @@ struct print_info { struct dump_info { char *WFileName; + char *CurrentFileName; pcap_t *pd; pcap_dumper_t *p; }; @@ -325,10 +334,10 @@ show_dlts_and_exit(pcap_t *pd) * OK, does tcpdump handle that type? */ if (lookup_printer(dlts[n_dlts]) == NULL) - (void) fprintf(stderr, " (not supported)"); + (void) fprintf(stderr, " (printing not supported)"); putchar('\n'); } else { - (void) fprintf(stderr, " DLT %d (not supported)\n", + (void) fprintf(stderr, " DLT %d (printing not supported)\n", dlts[n_dlts]); } } @@ -340,13 +349,19 @@ show_dlts_and_exit(pcap_t *pd) * Set up flags that might or might not be supported depending on the * version of libpcap we're using. */ -#ifdef WIN32 +#if defined(HAVE_PCAP_CREATE) || defined(WIN32) #define B_FLAG "B:" #define B_FLAG_USAGE " [ -B size ]" -#else /* WIN32 */ +#else /* defined(HAVE_PCAP_CREATE) || defined(WIN32) */ #define B_FLAG #define B_FLAG_USAGE -#endif /* WIN32 */ +#endif /* defined(HAVE_PCAP_CREATE) || defined(WIN32) */ + +#ifdef HAVE_PCAP_CREATE +#define I_FLAG "I" +#else /* HAVE_PCAP_CREATE */ +#define I_FLAG +#endif /* HAVE_PCAP_CREATE */ #ifdef HAVE_PCAP_FINDALLDEVS #ifndef HAVE_PCAP_IF_T @@ -423,10 +438,32 @@ getWflagChars(int x) static void MakeFilename(char *buffer, char *orig_name, int cnt, int max_chars) { + char *filename = malloc(NAME_MAX + 1); + + /* Process with strftime if Gflag is set. */ + if (Gflag != 0) { + struct tm *local_tm; + + /* Convert Gflag_time to a usable format */ + if ((local_tm = localtime(&Gflag_time)) == NULL) { + error("MakeTimedFilename: localtime"); + } + + /* There's no good way to detect an error in strftime since a return + * value of 0 isn't necessarily failure. + */ + strftime(filename, NAME_MAX, orig_name, local_tm); + } else { + strncpy(filename, orig_name, NAME_MAX); + } + if (cnt == 0 && max_chars == 0) - strcpy(buffer, orig_name); + strncpy(buffer, filename, NAME_MAX + 1); else - sprintf(buffer, "%s%0*d", orig_name, max_chars, cnt); + if (snprintf(buffer, NAME_MAX + 1, "%s%0*d", filename, max_chars, cnt) > NAME_MAX) + /* Report an error if the filename is too large */ + error("too many output files or filename is too long (> %d)", NAME_MAX); + free(filename); } static int tcpdump_printf(netdissect_options *ndo _U_, @@ -448,7 +485,7 @@ main(int argc, char **argv) { register int cnt, op, i; bpf_u_int32 localnet, netmask; - register char *cp, *infile, *cmdbuf, *device, *RFileName, *WFileName, *WFileNameAlt; + register char *cp, *infile, *cmdbuf, *device, *RFileName, *WFileName; pcap_handler callback; int type; struct bpf_program fcode; @@ -467,7 +504,6 @@ main(int argc, char **argv) #endif int status; #ifdef WIN32 - u_int UserBufferSize = 1000000; if(wsockinit() != 0) return 1; #endif /* WIN32 */ @@ -499,7 +535,7 @@ main(int argc, char **argv) opterr = 0; while ( - (op = getopt(argc, argv, "aA" B_FLAG "c:C:d" D_FLAG "eE:fF:i:lLm:M:nNOpqr:Rs:StT:u" U_FLAG "vw:W:xXy:YZ:")) != -1) + (op = getopt(argc, argv, "aA" B_FLAG "c:C:d" D_FLAG "eE:fF:G:i:" I_FLAG "KlLm:M:nNOpqr:Rs:StT:u" U_FLAG "vw:W:xXy:Yz:Z:")) != -1) switch (op) { case 'a': @@ -510,13 +546,13 @@ main(int argc, char **argv) ++Aflag; break; -#ifdef WIN32 +#if defined(HAVE_PCAP_CREATE) || defined(WIN32) case 'B': - UserBufferSize = atoi(optarg)*1024; - if (UserBufferSize < 0) + Bflag = atoi(optarg)*1024; + if (Bflag <= 0) error("invalid packet buffer size %s", optarg); break; -#endif /* WIN32 */ +#endif /* defined(HAVE_PCAP_CREATE) || defined(WIN32) */ case 'c': cnt = atoi(optarg); @@ -573,6 +609,21 @@ main(int argc, char **argv) infile = optarg; break; + case 'G': + Gflag = atoi(optarg); + if (Gflag < 0) + error("invalid number of seconds %s", optarg); + + /* We will create one file initially. */ + Gflag_count = 0; + + /* Grab the current time for rotation use. */ + if ((Gflag_time = time(NULL)) == (time_t)-1) { + error("main: can't get current time: %s", + pcap_strerror(errno)); + } + break; + case 'i': if (optarg[0] == '0' && optarg[1] == 0) error("Invalid adapter index"); @@ -608,6 +659,12 @@ main(int argc, char **argv) device = optarg; break; +#ifdef HAVE_PCAP_CREATE + case 'I': + ++Iflag; + break; +#endif /* HAVE_PCAP_CREATE */ + case 'l': #ifdef WIN32 /* @@ -629,19 +686,15 @@ main(int argc, char **argv) #endif /* WIN32 */ break; - case 'n': - ++nflag; - break; - - case 'N': - ++Nflag; + case 'K': + ++Kflag; break; case 'm': #ifdef LIBSMI - if (smiLoadModule(optarg) == 0) { + if (smiLoadModule(optarg) == 0) { error("could not load MIB module %s", optarg); - } + } sflag = 1; #else (void)fprintf(stderr, "%s: ignoring option `-m %s' ", @@ -658,6 +711,14 @@ main(int argc, char **argv) tcpmd5secret = optarg; break; + case 'n': + ++nflag; + break; + + case 'N': + ++Nflag; + break; + case 'O': Oflag = 0; break; @@ -779,6 +840,15 @@ main(int argc, char **argv) } break; #endif + case 'z': + if (optarg) { + zflag = strdup(optarg); + } else { + usage(); + /* NOTREACHED */ + } + break; + case 'Z': if (optarg) { username = strdup(optarg); @@ -804,10 +874,11 @@ main(int argc, char **argv) case 1: /* No time stamp */ case 2: /* Unix timeval style */ case 3: /* Microseconds since previous packet */ + case 5: /* Microseconds since first packet */ break; default: /* Not supported */ - error("only -t, -tt, -ttt, and -tttt are supported"); + error("only -t, -tt, -ttt, -tttt and -ttttt are supported"); break; } @@ -882,12 +953,74 @@ main(int argc, char **argv) fflush(stderr); #endif /* WIN32 */ +#ifdef HAVE_PCAP_CREATE + pd = pcap_create(device, ebuf); + if (pd == NULL) + error("%s", ebuf); + status = pcap_set_snaplen(pd, snaplen); + if (status != 0) + error("%s: pcap_set_snaplen failed: %s", + device, pcap_statustostr(status)); + status = pcap_set_promisc(pd, !pflag); + if (status != 0) + error("%s: pcap_set_promisc failed: %s", + device, pcap_statustostr(status)); + if (Iflag) { + status = pcap_set_rfmon(pd, 1); + if (status != 0) + error("%s: pcap_set_rfmon failed: %s", + device, pcap_statustostr(status)); + } + status = pcap_set_timeout(pd, 1000); + if (status != 0) + error("%s: pcap_set_timeout failed: %s", + device, pcap_statustostr(status)); + if (Bflag != 0) { + status = pcap_set_buffer_size(pd, Bflag); + if (status != 0) + error("%s: pcap_set_buffer_size failed: %s", + device, pcap_statustostr(status)); + } + status = pcap_activate(pd); + if (status < 0) { + /* + * pcap_activate() failed. + */ + cp = pcap_geterr(pd); + if (status == PCAP_ERROR) + error("%s", cp); + else if ((status == PCAP_ERROR_NO_SUCH_DEVICE || + status == PCAP_ERROR_PERM_DENIED) && + *cp != '\0') + error("%s: %s\n(%s)", device, + pcap_statustostr(status), cp); + else + error("%s: %s", device, + pcap_statustostr(status)); + } else if (status > 0) { + /* + * pcap_activate() succeeded, but it's warning us + * of a problem it had. + */ + cp = pcap_geterr(pd); + if (status == PCAP_WARNING) + warning("%s", cp); + else if (status == PCAP_WARNING_PROMISC_NOTSUP && + *cp != '\0') + warning("%s: %s\n(%s)", device, + pcap_statustostr(status), cp); + else + warning("%s: %s", device, + pcap_statustostr(status)); + } +#else *ebuf = '\0'; pd = pcap_open_live(device, snaplen, !pflag, 1000, ebuf); if (pd == NULL) error("%s", ebuf); else if (*ebuf) warning("%s", ebuf); +#endif /* HAVE_PCAP_CREATE */ /* * Let user own process after socket has been opened. */ @@ -895,12 +1028,12 @@ main(int argc, char **argv) if (setgid(getgid()) != 0 || setuid(getuid()) != 0) fprintf(stderr, "Warning: setgid/setuid failed !\n"); #endif /* WIN32 */ -#ifdef WIN32 - if(UserBufferSize != 1000000) - if(pcap_setbuff(pd, UserBufferSize)==-1){ +#if !defined(HAVE_PCAP_CREATE) && defined(WIN32) + if(Bflag != 0) + if(pcap_setbuff(pd, Bflag)==-1){ error("%s", pcap_geterr(pd)); } -#endif /* WIN32 */ +#endif /* !defined(HAVE_PCAP_CREATE) && defined(WIN32) */ if (Lflag) show_dlts_and_exit(pd); if (gndo->ndo_dlt >= 0) { @@ -919,7 +1052,7 @@ main(int argc, char **argv) } #endif (void)fprintf(stderr, "%s: data link type %s\n", - program_name, gndo->ndo_dltname); + program_name, gndo->ndo_dltname); (void)fflush(stderr); } i = pcap_snapshot(pd); @@ -946,12 +1079,14 @@ main(int argc, char **argv) exit(0); } init_addrtoname(localnet, netmask); + init_checksum(); #ifndef WIN32 (void)setsignal(SIGPIPE, cleanup); -#endif /* WIN32 */ (void)setsignal(SIGTERM, cleanup); (void)setsignal(SIGINT, cleanup); + (void)setsignal(SIGCHLD, child_cleanup); +#endif /* WIN32 */ /* Cooperate with nohup(1) */ #ifndef WIN32 if ((oldhandler = setsignal(SIGHUP, cleanup)) != SIG_DFL) @@ -962,15 +1097,22 @@ main(int argc, char **argv) error("%s", pcap_geterr(pd)); if (WFileName) { pcap_dumper_t *p; + /* Do not exceed the default NAME_MAX for files. */ + dumpinfo.CurrentFileName = (char *)malloc(NAME_MAX + 1); - WFileNameAlt = (char *)malloc(strlen(WFileName) + MAX_CFLAG_CHARS + 1); - if (WFileNameAlt == NULL) - error("malloc of WFileNameAlt"); - MakeFilename(WFileNameAlt, WFileName, 0, WflagChars); - p = pcap_dump_open(pd, WFileNameAlt); + if (dumpinfo.CurrentFileName == NULL) + error("malloc of dumpinfo.CurrentFileName"); + + /* We do not need numbering for dumpfiles if Cflag isn't set. */ + if (Cflag != 0) + MakeFilename(dumpinfo.CurrentFileName, WFileName, 0, WflagChars); + else + MakeFilename(dumpinfo.CurrentFileName, WFileName, 0, 0); + + p = pcap_dump_open(pd, dumpinfo.CurrentFileName); if (p == NULL) error("%s", pcap_geterr(pd)); - if (Cflag != 0) { + if (Cflag != 0 || Gflag != 0) { callback = dump_packet_and_trunc; dumpinfo.WFileName = WFileName; dumpinfo.pd = pd; @@ -1005,7 +1147,12 @@ main(int argc, char **argv) } #endif /* WIN32 */ #ifdef SIGINFO - (void)setsignal(SIGINFO, requestinfo); + /* + * We can't get statistics when reading from a file rather + * than capturing from a device. + */ + if (RFileName == NULL) + (void)setsignal(SIGINFO, requestinfo); #endif if (vflag > 0 && WFileName) { @@ -1123,6 +1270,18 @@ cleanup(int signo _U_) #endif } +/* + On windows, we do not use a fork, so we do not care less about + waiting a child processes to die + */ +#ifndef WIN32 +static RETSIGTYPE +child_cleanup(int signo _U_) +{ + wait(NULL); +} +#endif /* WIN32 */ + static void info(register int verbose) { @@ -1130,6 +1289,7 @@ info(register int verbose) if (pcap_stats(pd, &stat) < 0) { (void)fprintf(stderr, "pcap_stats: %s\n", pcap_geterr(pd)); + infoprint = 0; return; } @@ -1150,11 +1310,40 @@ info(register int verbose) infoprint = 0; } +#ifndef WIN32 +static void +compress_savefile(const char *filename) +{ + if (fork()) + return; + /* + * Set to lowest priority so that this doesn't disturb the capture + */ +#ifdef NZERO + setpriority(PRIO_PROCESS, 0, NZERO - 1); +#else + setpriority(PRIO_PROCESS, 0, 19); +#endif + if (execlp(zflag, zflag, filename, NULL) == -1) + fprintf(stderr, + "compress_savefile:execlp(%s, %s): %s\n", + zflag, + filename, + strerror(errno)); +} +#else /* WIN32 */ +static void +compress_savefile(const char *filename) +{ + fprintf(stderr, + "compress_savefile failed. Functionality not implemented under windows\n"); +} +#endif /* WIN32 */ + static void dump_packet_and_trunc(u_char *user, const struct pcap_pkthdr *h, const u_char *sp) { struct dump_info *dump_info; - char *name; ++packets_captured; @@ -1162,30 +1351,104 @@ dump_packet_and_trunc(u_char *user, const struct pcap_pkthdr *h, const u_char *s dump_info = (struct dump_info *)user; + /* + * XXX - this won't force the file to rotate on the specified time + * boundary, but it will rotate on the first packet received after the + * specified Gflag number of seconds. Note: if a Gflag time boundary + * and a Cflag size boundary coincide, the time rotation will occur + * first thereby cancelling the Cflag boundary (since the file should + * be 0). + */ + if (Gflag != 0) { + /* Check if it is time to rotate */ + time_t t; + + /* Get the current time */ + if ((t = time(NULL)) == (time_t)-1) { + error("dump_and_trunc_packet: can't get current_time: %s", + pcap_strerror(errno)); + } + + + /* If the time is greater than the specified window, rotate */ + if (t - Gflag_time >= Gflag) { + /* Update the Gflag_time */ + Gflag_time = t; + /* Update Gflag_count */ + Gflag_count++; + /* + * Close the current file and open a new one. + */ + pcap_dump_close(dump_info->p); + + /* + * Compress the file we just closed, if the user asked for it + */ + if (zflag != NULL) + compress_savefile(dump_info->CurrentFileName); + + /* + * Check to see if we've exceeded the Wflag (when + * not using Cflag). + */ + if (Cflag == 0 && Wflag > 0 && Gflag_count >= Wflag) { + (void)fprintf(stderr, "Maximum file limit reached: %d\n", + Wflag); + exit(0); + /* NOTREACHED */ + } + if (dump_info->CurrentFileName != NULL) + free(dump_info->CurrentFileName); + /* Allocate space for max filename + \0. */ + dump_info->CurrentFileName = (char *)malloc(NAME_MAX + 1); + if (dump_info->CurrentFileName == NULL) + error("dump_packet_and_trunc: malloc"); + /* + * This is always the first file in the Cflag + * rotation: e.g. 0 + * We also don't need numbering if Cflag is not set. + */ + if (Cflag != 0) + MakeFilename(dump_info->CurrentFileName, dump_info->WFileName, 0, + WflagChars); + else + MakeFilename(dump_info->CurrentFileName, dump_info->WFileName, 0, 0); + + dump_info->p = pcap_dump_open(dump_info->pd, dump_info->CurrentFileName); + if (dump_info->p == NULL) + error("%s", pcap_geterr(pd)); + } + } + /* * XXX - this won't prevent capture files from getting * larger than Cflag - the last packet written to the * file could put it over Cflag. */ - if (pcap_dump_ftell(dump_info->p) > Cflag) { + if (Cflag != 0 && pcap_dump_ftell(dump_info->p) > Cflag) { /* * Close the current file and open a new one. */ pcap_dump_close(dump_info->p); + + /* + * Compress the file we just closed, if the user asked for it + */ + if (zflag != NULL) + compress_savefile(dump_info->CurrentFileName); + Cflag_count++; if (Wflag > 0) { if (Cflag_count >= Wflag) Cflag_count = 0; - } else { - if (Cflag_count >= MAX_CFLAG) - error("too many output files"); } - name = (char *)malloc(strlen(dump_info->WFileName) + MAX_CFLAG_CHARS + 1); - if (name == NULL) + if (dump_info->CurrentFileName != NULL) + free(dump_info->CurrentFileName); + dump_info->CurrentFileName = (char *)malloc(NAME_MAX + 1); + if (dump_info->CurrentFileName == NULL) error("dump_packet_and_trunc: malloc"); - MakeFilename(name, dump_info->WFileName, Cflag_count, WflagChars); - dump_info->p = pcap_dump_open(dump_info->pd, name); - free(name); + MakeFilename(dump_info->CurrentFileName, dump_info->WFileName, Cflag_count, WflagChars); + dump_info->p = pcap_dump_open(dump_info->pd, dump_info->CurrentFileName); if (dump_info->p == NULL) error("%s", pcap_geterr(pd)); } @@ -1362,7 +1625,7 @@ RETSIGTYPE requestinfo(int signo _U_) */ #ifdef USE_WIN32_MM_TIMER void CALLBACK verbose_stats_dump (UINT timer_id _U_, UINT msg _U_, DWORD_PTR arg _U_, - DWORD_PTR dw1 _U_, DWORD_PTR dw2 _U_) + DWORD_PTR dw1 _U_, DWORD_PTR dw2 _U_) { struct pcap_stat stat; @@ -1409,13 +1672,15 @@ usage(void) #endif /* WIN32 */ #endif /* HAVE_PCAP_LIB_VERSION */ (void)fprintf(stderr, -"Usage: %s [-aAd" D_FLAG "eflLnNOpqRStu" U_FLAG "vxX]" B_FLAG_USAGE " [-c count] [ -C file_size ]\n", program_name); +"Usage: %s [-aAd" D_FLAG "ef" I_FLAG "KlLnNOpqRStu" U_FLAG "vxX]" B_FLAG_USAGE " [ -c count ]\n", program_name); (void)fprintf(stderr, -"\t\t[ -E algo:secret ] [ -F file ] [ -i interface ] [ -M secret ]\n"); +"\t\t[ -C file_size ] [ -E algo:secret ] [ -F file ] [ -G seconds ]\n"); (void)fprintf(stderr, -"\t\t[ -r file ] [ -s snaplen ] [ -T type ] [ -w file ]\n"); +"\t\t[ -i interface ] [ -M secret ] [ -r file ]\n"); (void)fprintf(stderr, -"\t\t[ -W filecount ] [ -y datalinktype ] [ -Z user ]\n"); +"\t\t[ -s snaplen ] [ -T type ] [ -w file ] [ -W filecount ]\n"); + (void)fprintf(stderr, +"\t\t[ -y datalinktype ] [ -z command ] [ -Z user ]\n"); (void)fprintf(stderr, "\t\t[ expression ]\n"); exit(1); @@ -1458,4 +1723,3 @@ ndo_warning(netdissect_options *ndo _U_, const char *fmt, ...) (void)fputc('\n', stderr); } } - diff --git a/telnet.h b/telnet.h index da11043019f1..33a07be9482e 100644 --- a/telnet.h +++ b/telnet.h @@ -1,6 +1,6 @@ -/* @(#) $Header: /tcpdump/master/tcpdump/telnet.h,v 1.4 2002/06/11 17:09:01 itojun Exp $ (LBL) */ +/* @(#) $Header: /tcpdump/master/tcpdump/telnet.h,v 1.5 2007-08-29 02:31:44 mcr Exp $ (LBL) */ -/* $NetBSD: telnet.h,v 1.9 2001/06/11 01:50:50 wiz Exp $ */ +/* NetBSD: telnet.h,v 1.9 2001/06/11 01:50:50 wiz Exp */ /* * Copyright (c) 1983, 1993 diff --git a/tests/.cvsignore b/tests/.cvsignore deleted file mode 100644 index f097c8a945c7..000000000000 --- a/tests/.cvsignore +++ /dev/null @@ -1,11 +0,0 @@ -*.new -*.pcap -02-sunrise-sunset-esp.pcap -08-sunrise-sunset-aes.pcap -08-sunrise-sunset-esp.pcap -08-sunrise-sunset-esp2.pcap -isakmp-delete-segfault.pcap -isakmp-identification-segfault.pcap -isakmp-pointer-loop.pcap -run1.pcap -run2.pcap diff --git a/tests/02-sunrise-sunset-esp.puu b/tests/02-sunrise-sunset-esp.puu deleted file mode 100644 index 0ceffc1c1c83..000000000000 --- a/tests/02-sunrise-sunset-esp.puu +++ /dev/null @@ -1,34 +0,0 @@ -begin 644 02-sunrise-sunset-esp.pcap -MU,.RH0(`!``````````````&```!``````````````"6````E@```!```&1D -M11```&1D(P@`10``B/]G``!`,O:5P`$"%\`!`BT2-%9X`````4P@12\\L)(1 -MTZ=(S>7($>.<3N@\_I:AY"K/TKAZJP719"NCKYP;PT(0+$"M%=]-X"`*8V.' -M-'$1A]02"3N#OZI#&1R]A*1;`G8S@YFQ]`````(:<$'CW)%VZ',2KQMB@CN?'"^GJ<=: -MD-0`+.V^J'2AK).'XQ_B"B8:[%A_+K[6KS2'XR[UN`,R"BJP?^].ZM#/[$)# -M17^!D"8_[BZ>GU4Z*$7I"N$U*>J47?C-4;I>#`%6+#0%]D75YC']*Z\````` -M`````)8```"6````$```9&1%$```9&0C"`!%``"(_VD``$`R]I/``0(7P`$" -M+1(T5G@````#7?C-4;I>#`%@W%89?QJ#$TJ,4G\FO&HO=F+,,%1E(]);XI]T -MV7W.RY$2=JZ1%!QCNX[;^.JD4W91;7)NJWV2MF4?7`=&_3OWW%V&6RIXKB75 -M#;2TWNL"A:MF!I@_5R^]L6;Z`L?E@1:T&71G``````````"6````E@```!`` -M`&1D11```&1D(P@`10``B/]J``!`,O:2P`$"%\`!`BT2-%9X````!*MF!I@_ -M5R^]%';9*Q:S_B]]O_8FV:2K1A!]/SQHI7>OS815*I?4%/:.=BBJUEGJ(X8\ -MP1E/@&P\9MR)DP3[UCWI@,MR%A$\CR]=G(("[CFB7AUN$AENZOO&\:7% -M2KLW<'NP,L(I=!;8=0``````````E@```)8````0``!D9$40``!D9",(`$4` -M`(C_:P``0#+VD<`!`A?``0(M$C16>`````5NZOO&\:7%2J12,9;LOK"-S,=$ -MO0]X+J(OJQED#PLBRY[\^352UZK&576,Z<:%73AWV3:;Y/:=@(` -M`````````)8```"6````$```9&1%$```9&0C"`!%``"(_VP``$`R]I#``0(7 -MP`$"+1(T5G@````&M,^T?7>6,Z=>N_YZQFV[H1^6\!/I*IMAOHZE\E0M.Z!X -M#[0EG3#>%]7`]*2F?@S4X2''TK09J@NG/.HEXCE./..K^'-@":X[\?0L+B`S -MQA\HTK\'J]:S]N6O`]\)NQD)9;H2P\K`^NX37`R5``````````"6````E@`` -M`!```&1D11```&1D(P@`10``B/]M``!`,O:/P`$"%\`!`BT2-%9X````!^6O -M`]\)NQD)>BYZ>`/DA=N;A2...3-7FZOK?:5KGXBN`/E?$\[-11-$G#E;(>N" -M+<$/YP'SM$>16LU18&Q]9)$]0)/M]:2Z#A6]-,SM*>FI/`X*K-*-:KS3IW<" -MO(>(P(K=:X::SJ;O[J>0K```````````E@```)8````0``!D9$40``!D9",( -M`$4``(C_;@``0#+VCL`!`A?``0(M$C16>`````C3IW<"O(>(P'-43;C[`MCD -M`BMZAX]F!?'Z$8Q"5HYMVDC9"8I^O(Z4!/)`/IVD-(ZK)_52-H2XK+,(-LR) -MM)K#XLF">KY0>C?\[MA%3F%$?ORJ@:>O]5H>?-$OQH)J:['.C0J(%P -MVF'>(TU6&*"9A,`,/KS\:>DH>O_L(51)_[YY"L9?8'?J4V:_.]B+6UR\T>39D+=NA;$``````````*8```"F````$``` -M9&1%$```9&0C"`!%``"8_.L``$`R^0'``0(7P`$"+=$C16<````";K2P<-=Q -MYE]@=^I39K\[V$1HDU9'L,6BVK.^B4]E6QY&:?3?T)G?"RSU;X!J]]7S)<`, -M*L!SYO^RUWR?!EIJMWU=5B406YL-I`]LK`^;-3%(NEY#R`ST=W40=:*[M$*8 -M#`GLTK(5ZCS"BC@``````````I@```*8````0 -M``!D9$40``!D9",(`$4``)C\[```0#+Y`,`!`A?``0(MT2-%9P````,-RO@E -M%F`X`Y3]7F3YK9N>=6-;U&'6">_4H80DMY^Z9E3ZL3[ONN*L<"Z@7(VO]XT^ -M/2JP<(/^8NTO-4\/B5AJEC4N;,\"7-&(;9AM_2G5A1C.[LBK3')P?AE;$I[) -M!8N&RC?OTD77ELURFXRD/JD(:@RER``````````"F````I@`` -M`!```&1D11```&1D(P@`10``F/SM``!`,OC_P`$"%\`!`BW1(T5G````!(;* -M-^_21=S8F&G50PJ5Y>5K%@R;)A(E<5YD'@86@GT"-&&MHP*.A=?%=:FDZH=4 -M*9":>]'G'CB4%2?PJ"2^H*51\8P!9T`X3#;F+H$[4Z$7ZL0<\S=S\%`:BW9U2'@U^@D,,:.P``````````*8```"F -M````$```9&1%$```9&0C"`!%``"8_.X``$`R^/[``0(7P`$"+=$C16<````% -M,2>GIY3H1?JQ!SS-W/P4!BW&*&A[$!XGK<^M^>_X193"G"1QTWG>Q"CO25$" -MPM+1+8[6&(17\EE\P:6-WVPT=911?@'-Z,,/UVZ2!QV(X4513U9]P62CJMS> -M^ODBGHU=%T.H2&Z<4,8(!4,2[&A4^H="L:+`=4G?*(7,2@``````````I@`` -M`*8````0``!D9$40``!D9",(`$4``)C\[P``0#+X_<`!`A?``0(MT2-%9P`` -M``870ZA(;IQ0Q@@%0Q+L:%3Z@*HQPZA]3STWDY#CYJGOJH)K>I' -MEHMF"X!^G,H@,YWT7^=60.3/$7?AYH)G9GBD%%#,D]!EDA]B*?UE>U96+"5\ -MK=""/.LO'__^;$NI`L#D]@&G?Z7B2O#GI?NDK -MF[7JPN,8V\H>%G+)'+%+FL*&\8+H2^KFWF5YQ:$4V!,1?G;=OYD;!,3YD'V( -MW[Y!I(U=X9[\:L)(5GBJ,B!-5N$.CGV$VLD^R?Z,KL[AMI(ZC-P````````` -M`*8```"F````$```9&1%$```9&0C"`!%``"8_/$``$`R^/O``0(7P`$"+=$C -M16<````(PDA6>*HR($U6X0Z.?83:R;Y0&'2065/"*M'ELXD?1%3\L3TC.UK -HKWB(C5O@78>9LQ^<0Z6]F=:<;@[>L^;/\-6WB81[GX)LGD@`` -` -end diff --git a/tests/08-sunrise-sunset-esp2.puu b/tests/08-sunrise-sunset-esp2.puu deleted file mode 100644 index 4785f2b808c9..000000000000 --- a/tests/08-sunrise-sunset-esp2.puu +++ /dev/null @@ -1,43 +0,0 @@ -begin 644 08-sunrise-sunset-esp2.pcap -MU,.RH0(`!``````````````&```!``````````````#.````S@```!```&1D -M11```&1D(P@`10``P"E-``!`,LQXP`$"%\`!`BT2-%9X`````4=!+\5+F8`+ -M[[NOU-#98*AO5\780X[VDXF@2W8<10:J!'!Z!-[7N4CFNRKIH;PUA1SL"Y9\ -M-?_3N_,W/@*T+C/"]=S[`;D!/;`SR5,3+><9K.^\9N><18TY9Z\!I\S./L8R -MFE53,S6Y5X_Z\(T)ZIUS?X$8>&(_MT1"!SV:VPP!\XU$[3S-5L)4-O"&>]`Z -M1:./61=%C6`6U1/65"A&KUE902]*``````````#.````S@```!```&1D11`` -M`&1D(P@`10``P"E/``!`,LQVP`$"%\`!`BT2-%9X`````CIU^SX%;G^!GUSP -MSA -ML7P6FM81),N>T/1Z'"P7H5;```````````#.````S@```!```&1D11```&1D -M(P@`10``P"E1``!`,LQTP`$"%\`!`BT2-%9X`````R4)-P&F>HPK/?_$MTFC -M^TOO=/L#W_APTK6MIH_BC*I7\L<,9(?/0M"HK3[T3F;(Y2V70$P5?D'7GFIB -MJZ/C",S/BD!9N8GV"\.;GVME[P!@!B1"DT=1W0_75FMI23H!T2^C);4GY>`I -M-2T^O_0_WU&$)&+/P)%[TQUQ-T7G%\RXYJT0HO[$=< -M`@@TL1#(Y980]E*/!^2@G`*&S9O^QMS1S?/`TL=5F9B(12?(145>Y2I+;+T? -MKWUD@&.7U36]K-$[.%9CB*FK^E8>N:K/)4#$]ZO/:=#;MRH-)_139\,W6M4T -M7SQ?BBX>,+A3#BB5^O=>+GKIC-4]5VBP)D-S7-)\W&;<@_J@,*!``````````#.````S@```!```&1D11```&1D(P@`10`` -MP"E5``!`,LQPP`$"%\`!`BT2-%9X````!0OIFA;,@2C4HF3>5!-C(0>5LR0" -M='1\OQ.!-?@D(U0!453"``````````#.````S@```!```&1D11```&1D(P@`10``P"E7 -M``!`,LQNP`$"%\`!`BT2-%9X````!I0M"-THEF=+!L=>A3N,\1+"'Z7(J?O0 -M.B?)(#X=/5F-.">%3.X'(=JKK:WZMN -M=B+^Q3"(KE\1299]=5E,'.&U(`H9N)+>9FS/`CA*>D^>AV.-C(S\)BM&)*XM -M^BF__^<_``````````#.````S@```!```&1D11```&1D(P@`10``P"E9``!` -M,LQLP`$"%\`!`BT2-%9X````!R"SQ'[6%(;Q>>O+]CS6D*+AD3IMC\^MMK8[ -M:T3)KM06!G^.H\>%UAT@)X6JL9\3V.HR"+_Q^_T-O$Y_S":_TP;V,LIV1O]H -M-G@DOL'V-5)O@%<%!#O$2V,AS@W7(&$IX.YKK]\K#>FITU)<>O42T2GKFW+^ -M\/[,>E4P[Q"+7O,Y1(R22LND[H+469(%3,SN&3:U:/I`'&R@<`HKGOV,^#L9,QF%)W^9!VFM -MXG'XY]CWI5VF33?7,*P?6:.PS'&[\N$7W<*==+;P*$./4*OH&=O,6G!JIN>I -M'ZDP*D&4K>SK-\/!7\Z&<&5J4%NU?NRM&25'*_"'UE3VH&?U]/V@932UYZT\ -` -end diff --git a/tests/alltests.sh b/tests/alltests.sh deleted file mode 100644 index 7df25991f1b6..000000000000 --- a/tests/alltests.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/sh - -for i in *.sh -do - if [ "X$i" = "Xalltests.sh" ] - then - continue; - fi - sh ./$i -done - - diff --git a/tests/bgp_vpn_attrset.out b/tests/bgp_vpn_attrset.out deleted file mode 100644 index 7fb12ae4b3e4..000000000000 --- a/tests/bgp_vpn_attrset.out +++ /dev/null @@ -1,18 +0,0 @@ -IP (tos 0xc0, ttl 62, id 58628, offset 0, flags [none], proto: TCP (6), length: 173) 12.4.4.4.2051 > 12.1.1.1.179: P, cksum 0xcf18 (correct), 3293077573:3293077694(121) ack 3348108582 win 16384 : BGP, length: 121 - Update Message (2), length: 121 - Origin (1), length: 1, Flags [T]: IGP - AS Path (2), length: 0, Flags [T]: empty - Local Preference (5), length: 4, Flags [T]: 100 - Extended Community (16), length: 8, Flags [OT]: - target (0x0002), Flags [none]: 300:0.0.1.44 - Attribute Set (128), length: 36, Flags [OT]: - Origin AS: 65001 - Origin (1), length: 1, Flags [T]: IGP - AS Path (2), length: 4, Flags [T]: 5555 - Local Preference (5), length: 4, Flags [T]: 44 - Originator ID (9), length: 4, Flags [O]: 22.5.5.5 - Cluster List (10), length: 4, Flags [O]: 22.5.5.5 - Multi-Protocol Reach NLRI (14), length: 30, Flags [OE]: - AFI: IPv4 (1), SAFI: labeled VPN Unicast (128) - nexthop: RD: 0:0.0.0.0, 12.4.4.4, nh-length: 12, no SNPA - RD: 500:0.0.1.244, 133.0.0.0/8, label:100208 (bottom) diff --git a/tests/bgp_vpn_attrset.sh b/tests/bgp_vpn_attrset.sh deleted file mode 100755 index c32872c83bea..000000000000 --- a/tests/bgp_vpn_attrset.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/sh - -echo -n test bgp_vpn_attrset... -if (../tcpdump -t -n -v -r bgp_vpn_attrset.pcap | diff -w - bgp_vpn_attrset.out) -then - echo passed. -else - echo failed. -fi - - diff --git a/tests/eapon1.gdbinit b/tests/eapon1.gdbinit deleted file mode 100644 index 37ad0bcd029e..000000000000 --- a/tests/eapon1.gdbinit +++ /dev/null @@ -1 +0,0 @@ -set args -r eapon1.pcap diff --git a/tests/eapon1.out b/tests/eapon1.out deleted file mode 100644 index c5042e3ff13f..000000000000 --- a/tests/eapon1.out +++ /dev/null @@ -1,114 +0,0 @@ -IP 192.168.1.249.netbios-dgm > 192.168.1.255.netbios-dgm: NBT UDP PACKET(138) -IP 192.168.1.249.netbios-dgm > 192.168.1.255.netbios-dgm: NBT UDP PACKET(138) -IP 192.168.1.249.netbios-dgm > 192.168.1.255.netbios-dgm: NBT UDP PACKET(138) -IP 192.168.1.249.netbios-ns > 192.168.1.255.netbios-ns: NBT UDP PACKET(137): QUERY; REQUEST; BROADCAST -IP 192.168.1.249.netbios-ns > 192.168.1.255.netbios-ns: NBT UDP PACKET(137): QUERY; REQUEST; BROADCAST -IP 192.168.1.249.netbios-ns > 192.168.1.255.netbios-ns: NBT UDP PACKET(137): QUERY; REQUEST; BROADCAST -IP 192.168.1.249.netbios-dgm > 192.168.1.255.netbios-dgm: NBT UDP PACKET(138) -IP 192.168.1.249.netbios-ns > 192.168.1.255.netbios-ns: NBT UDP PACKET(137): QUERY; REQUEST; BROADCAST -IP 192.168.1.249.netbios-ns > 192.168.1.255.netbios-ns: NBT UDP PACKET(137): QUERY; REQUEST; BROADCAST -IP 192.168.1.249.netbios-ns > 192.168.1.255.netbios-ns: NBT UDP PACKET(137): QUERY; REQUEST; BROADCAST -arp who-has 192.168.1.1 tell 192.168.1.249 -arp reply 192.168.1.1 is-at 00:0d:88:4f:25:91 (oui Unknown) -IP 192.168.1.249.bootpc > 192.168.1.1.bootps: BOOTP/DHCP, Request from 00:04:23:57:a5:7a (oui Unknown), length: 300 -EAP code=1 id=0 length=5 -IP 0.0.0.0.bootpc > 255.255.255.255.bootps: BOOTP/DHCP, Request from 00:04:23:57:a5:7a (oui Unknown), length: 300 -IP 0.0.0.0.bootpc > 255.255.255.255.bootps: BOOTP/DHCP, Request from 00:04:23:57:a5:7a (oui Unknown), length: 300 -EAP code=1 id=1 length=0 -EAP code=1 id=0 length=5 -EAP code=1 id=0 length=45 -EAP code=1 id=0 length=20 -EAP code=1 id=0 length=76 -EAP code=1 id=0 length=80 -EAP code=1 id=0 length=28 -EAP code=1 id=0 length=4 -EAP code=1 id=3 length=57 -EAP code=1 id=3 length=44 -IP 0.0.0.0.bootpc > 255.255.255.255.bootps: BOOTP/DHCP, Request from 00:04:23:57:a5:7a (oui Unknown), length: 300 -IP 0.0.0.0.bootpc > 255.255.255.255.bootps: BOOTP/DHCP, Request from 00:04:23:57:a5:7a (oui Unknown), length: 300 -IP 0.0.0.0.bootpc > 255.255.255.255.bootps: BOOTP/DHCP, Request from 00:04:23:57:a5:7a (oui Unknown), length: 300 -EAP code=1 id=1 length=0 -EAP code=1 id=0 length=5 -EAP code=1 id=0 length=45 -EAP code=1 id=0 length=20 -EAP code=1 id=0 length=76 -EAP code=1 id=0 length=80 -EAP code=1 id=0 length=28 -EAP code=1 id=0 length=4 -EAP code=1 id=3 length=57 -EAP code=1 id=3 length=44 -arp who-has 169.254.67.194 tell 169.254.67.194 -arp who-has 169.254.67.194 tell 169.254.67.194 -arp who-has 169.254.67.194 tell 169.254.67.194 -IP 169.254.67.194.4299 > 239.255.255.250.1900: UDP, length 133 -IP 169.254.67.194 > IGMP: igmp v3 report, 1 group record(s) -IP 169.254.67.194.netbios-ns > 169.254.255.255.netbios-ns: NBT UDP PACKET(137): REGISTRATION; REQUEST; BROADCAST -IP 169.254.67.194 > IGMP: igmp v3 report, 1 group record(s) -IP 169.254.67.194.netbios-ns > 169.254.255.255.netbios-ns: NBT UDP PACKET(137): REGISTRATION; REQUEST; BROADCAST -IP 169.254.67.194.netbios-ns > 169.254.255.255.netbios-ns: NBT UDP PACKET(137): REGISTRATION; REQUEST; BROADCAST -IP 0.0.0.0.bootpc > 255.255.255.255.bootps: BOOTP/DHCP, Request from 00:04:23:57:a5:7a (oui Unknown), length: 300 -IP 169.254.67.194.netbios-ns > 169.254.255.255.netbios-ns: NBT UDP PACKET(137): REGISTRATION; REQUEST; BROADCAST -IP 169.254.67.194.4299 > 239.255.255.250.1900: UDP, length 133 -IP 169.254.67.194.netbios-ns > 169.254.255.255.netbios-ns: NBT UDP PACKET(137): REGISTRATION; REQUEST; BROADCAST -EAP code=1 id=1 length=0 -EAP code=1 id=0 length=5 -EAP code=1 id=0 length=45 -EAP code=1 id=0 length=20 -IP 169.254.67.194.netbios-ns > 169.254.255.255.netbios-ns: NBT UDP PACKET(137): REGISTRATION; REQUEST; BROADCAST -IP 169.254.67.194.netbios-ns > 169.254.255.255.netbios-ns: NBT UDP PACKET(137): REGISTRATION; REQUEST; BROADCAST -EAP code=1 id=0 length=76 -EAP code=1 id=0 length=80 -IP 169.254.67.194.netbios-ns > 169.254.255.255.netbios-ns: NBT UDP PACKET(137): REGISTRATION; REQUEST; BROADCAST -EAP code=1 id=0 length=28 -EAP code=1 id=0 length=4 -EAP code=1 id=3 length=57 -EAP code=1 id=3 length=44 -IP 0.0.0.0.bootpc > 255.255.255.255.bootps: BOOTP/DHCP, Request from 00:04:23:57:a5:7a (oui Unknown), length: 300 -IP 169.254.67.194.4299 > 239.255.255.250.1900: UDP, length 133 -IP 169.254.67.194.netbios-ns > 169.254.255.255.netbios-ns: NBT UDP PACKET(137): REGISTRATION; REQUEST; BROADCAST -IP 169.254.67.194.netbios-ns > 169.254.255.255.netbios-ns: NBT UDP PACKET(137): REGISTRATION; REQUEST; BROADCAST -IP 169.254.67.194.netbios-ns > 169.254.255.255.netbios-ns: NBT UDP PACKET(137): REGISTRATION; REQUEST; BROADCAST -IP 169.254.67.194.netbios-ns > 169.254.255.255.netbios-ns: NBT UDP PACKET(137): REGISTRATION; REQUEST; BROADCAST -IP 169.254.67.194.netbios-ns > 169.254.255.255.netbios-ns: NBT UDP PACKET(137): REGISTRATION; REQUEST; BROADCAST -IP 169.254.67.194.netbios-ns > 169.254.255.255.netbios-ns: NBT UDP PACKET(137): REGISTRATION; REQUEST; BROADCAST -IP 169.254.67.194.netbios-ns > 169.254.255.255.netbios-ns: NBT UDP PACKET(137): REGISTRATION; REQUEST; BROADCAST -IP 169.254.67.194.netbios-ns > 169.254.255.255.netbios-ns: NBT UDP PACKET(137): REGISTRATION; REQUEST; BROADCAST -IP 169.254.67.194.netbios-dgm > 169.254.255.255.netbios-dgm: NBT UDP PACKET(138) -IP 169.254.67.194.netbios-dgm > 169.254.255.255.netbios-dgm: NBT UDP PACKET(138) -IP 169.254.67.194.netbios-dgm > 169.254.255.255.netbios-dgm: NBT UDP PACKET(138) -IP 169.254.67.194.netbios-dgm > 169.254.255.255.netbios-dgm: NBT UDP PACKET(138) -IP 169.254.67.194.netbios-dgm > 169.254.255.255.netbios-dgm: NBT UDP PACKET(138) -IP 0.0.0.0.bootpc > 255.255.255.255.bootps: BOOTP/DHCP, Request from 00:04:23:57:a5:7a (oui Unknown), length: 300 -IP 169.254.67.194.netbios-dgm > 169.254.255.255.netbios-dgm: NBT UDP PACKET(138) -IP 169.254.67.194.netbios-dgm > 169.254.255.255.netbios-dgm: NBT UDP PACKET(138) -IP 169.254.67.194.netbios-dgm > 169.254.255.255.netbios-dgm: NBT UDP PACKET(138) -IP 169.254.67.194.netbios-dgm > 169.254.255.255.netbios-dgm: NBT UDP PACKET(138) -IP 169.254.67.194.netbios-ns > 169.254.255.255.netbios-ns: NBT UDP PACKET(137): REGISTRATION; REQUEST; BROADCAST -IP 169.254.67.194.netbios-ns > 169.254.255.255.netbios-ns: NBT UDP PACKET(137): REGISTRATION; REQUEST; BROADCAST -IP 169.254.67.194.netbios-ns > 169.254.255.255.netbios-ns: NBT UDP PACKET(137): REGISTRATION; REQUEST; BROADCAST -IP 169.254.67.194.netbios-ns > 169.254.255.255.netbios-ns: NBT UDP PACKET(137): REGISTRATION; REQUEST; BROADCAST -IP 169.254.67.194.netbios-ns > 169.254.255.255.netbios-ns: NBT UDP PACKET(137): REGISTRATION; REQUEST; BROADCAST -IP 169.254.67.194.netbios-ns > 169.254.255.255.netbios-ns: NBT UDP PACKET(137): REGISTRATION; REQUEST; BROADCAST -IP 169.254.67.194.netbios-ns > 169.254.255.255.netbios-ns: NBT UDP PACKET(137): REGISTRATION; REQUEST; BROADCAST -IP 169.254.67.194.netbios-ns > 169.254.255.255.netbios-ns: NBT UDP PACKET(137): REGISTRATION; REQUEST; BROADCAST -IP 169.254.67.194.netbios-dgm > 169.254.255.255.netbios-dgm: NBT UDP PACKET(138) -IP 169.254.67.194.netbios-dgm > 169.254.255.255.netbios-dgm: NBT UDP PACKET(138) -IP 169.254.67.194.netbios-dgm > 169.254.255.255.netbios-dgm: NBT UDP PACKET(138) -IP 169.254.67.194.netbios-ns > 169.254.255.255.netbios-ns: NBT UDP PACKET(137): QUERY; REQUEST; BROADCAST -IP 169.254.67.194.netbios-ns > 169.254.255.255.netbios-ns: NBT UDP PACKET(137): QUERY; REQUEST; BROADCAST -IP 169.254.67.194.netbios-ns > 169.254.255.255.netbios-ns: NBT UDP PACKET(137): QUERY; REQUEST; BROADCAST -IP 169.254.67.194.netbios-ns > 169.254.255.255.netbios-ns: NBT UDP PACKET(137): QUERY; REQUEST; BROADCAST -IP 169.254.67.194.netbios-ns > 169.254.255.255.netbios-ns: NBT UDP PACKET(137): QUERY; REQUEST; BROADCAST -IP 169.254.67.194.netbios-ns > 169.254.255.255.netbios-ns: NBT UDP PACKET(137): QUERY; REQUEST; BROADCAST -IP 0.0.0.0.bootpc > 255.255.255.255.bootps: BOOTP/DHCP, Request from 00:04:23:57:a5:7a (oui Unknown), length: 300 -EAP code=1 id=1 length=0 -EAP code=1 id=0 length=5 -EAP code=1 id=0 length=45 -EAP code=1 id=0 length=20 -IP 169.254.67.194.netbios-dgm > 169.254.255.255.netbios-dgm: NBT UDP PACKET(138) -EAP code=1 id=0 length=76 -EAP code=1 id=0 length=80 -EAP code=1 id=0 length=28 -EAP code=1 id=0 length=4 -EAP code=1 id=3 length=57 -EAP code=1 id=3 length=44 diff --git a/tests/eapon1.puu b/tests/eapon1.puu deleted file mode 100644 index 25c14367780a..000000000000 --- a/tests/eapon1.puu +++ /dev/null @@ -1,368 +0,0 @@ -begin 644 eapon1.pcap -MU,.RH0(`!````````````/__```!````"%5@0)*@#@#=````W0```/______ -M_P`$(U>E>@@`10``SSB'``"`$7Q.P*@!^<"H`?\`B@"*`+M3[!$.B1W`J`'Y -M`(H`I0``($5%14M&041*1$9&1$1!14M#04-!0T%#04-!0T%#04%!`"!%0D9# -M14-%1D5*1D5&1$5(1D-&1D9!1D%%1D-!0T%!00#_4TU")0`````````````` -M`````````````````````!$```L```````````#H`P``````````"P!6``,` -M`0`!``(`'`!<34%)3%-,3U1<0E)/5U-%``(`1$I0.353,$H`"%5@0/2@#@#= -M````W0```/_______P`$(U>E>@@`10``SSB(``"`$7Q-P*@!^<"H`?\`B@"* -M`+L,\A$.B1[`J`'Y`(H`I0``($5%14M&041*1$9&1$1!14M#04-!0T%#04-! -M0T%#04%!`"!!0D%#1E!&4$5.1D1%0T9#15!&2$9$149&4$9004-!0@#_4TU" -M)0```````````````````````````````````!$```L```````````#H`P`` -M````````"P!6``,``0`!``(`'`!<34%)3%-,3U1<0E)/5U-%``(`1$I0.353 -M,$H`"%5@0("C#@#[````^P```/_______P`$(U>E>@@`10``[3B)``"`$7PN -MP*@!^<"H`?\`B@"*`-E#WA$.B1_`J`'Y`(H`PP``($5%14M&041*1$9&1$1! -M14M#04-!0T%#04-!0T%#04%!`"!!0D%#1E!&4$5.1D1%0T9#15!&2$9$149& -M4$9004-!0@#_4TU")0```````````````````````````````````!$``"D` -M``````````#H`P``````````*0!6``,``0`!``(`.@!<34%)3%-,3U1<0E)/ -M5U-%``P`8.H``$%20D5)5%-'4E504$4``0`#"@`0`(!,_@0#1$I0.353,$H` -M"%5@0/JI#@!<````7````/_______P`$(U>E>@@`10``3CB*``"`$7S,P*@! -M^<"H`?\`B0")`#J"=XDA`1```0```````"!%0D9#14-%1D5*1D5&1$5(1D-& -M1D9!1D%%1D-!0T%"3```(``!"55@0//8"@!<````7````/_______P`$(U>E -M>@@`10``3CB-``"`$7S)P*@!^<"H`?\`B0")`#J"=XDA`1```0```````"!% -M0D9#14-%1D5*1D5&1$5(1D-&1D9!1D%%1D-!0T%"3```(``!"E5@0+,)!P!< -M````7````/_______P`$(U>E>@@`10``3CB.``"`$7S(P*@!^<"H`?\`B0") -M`#J"=XDA`1```0```````"!%0D9#14-%1D5*1D5&1$5(1D-&1D9!1D%%1D-! -M0T%"3```(``!"E5@0,@N#`#S````\P```/_______P`$(U>E>@@`10``Y3B/ -M``"`$7PPP*@!^<"H`?\`B@"*`-'GIA$.B2+`J`'Y`(H`NP``($5%14M&041* -M1$9&1$1!14M#04-!0T%#04-!0T%#04-!`"!%0D9#14-%1D5*1D5&1$5(1D-& -M1D9!1D%%1D-!0T%"3P#_4TU")0`````````````````````````````````` -M`!$``"$```````````#H`P``````````(0!6``,``0````(`,@!<34%)3%-, -M3U1<0E)/5U-%``\`@/P*`$1*4#DU4S!*``!R`&\`10,`7````%P```#_______\`!"-7I7H( -M`$4``$XXE0``@!%\P<"H`?G`J`'_`(D`B0`Z@G")*`$0``$````````@14)& -M0T5#149%2D9%1D1%2$9#1D9&049!149#04-!0DP``"```0Y58$!0N`X`7``` -M`%P```#_______\`!"-7I7H(`$4``$XXE@``@!%\P,"H`?G`J`'_`(D`B0`Z -M@G")*`$0``$````````@14)&0T5#149%2D9%1D1%2$9#1D9&049!149#04-! -M0DP``"```0]58$#*.`<`*@```"H```#_______\`!"-7I7H(!@`!"``&!``! -M``0C5Z5ZP*@!^0```````,"H`0$/56!`%UD'`#P````\``````0C5Z5Z``V( -M3R61"`8``0@`!@0``@`-B$\ED<"H`0$`!"-7I7K`J`'Y```````````````` -M````````#U5@0"E9!P!6`0``5@$````-B$\ED0`$(U>E>@@`10`!2#B7``"` -M$7S#P*@!^<"H`0$`1`!#`31YVP$!!@#(+24]CP&``,"H`?D````````````` -M````!"-7I7H````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M````````````````````````````````````````8X)38S4!!S8$P*@!`3T' -M`0`$(U>E>O\````````````````````````````````````````````````` -M``````]58$`6@0D`/````#P`````!"-7I7H`#,Z(,9J(C@$```4!`0`%`0`` -M```````````````````````````````````````````````/56!`"BL*`%8! -M``!6`0``________``0C5Z5Z"`!%``%(.)\``(`1`0<`````_____P!$`$,! -M-,&K`0$&`)@7ASP````````````````````````````$(U>E>@`````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M``````````````````!C@E-C-0$!=`$!/0E>@@`10`!2#BA``"`$0$%`````/____\`1`!#`32. -MS0$!!@#5`WTN````````````````````````````!"-7I7H````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M````````````````8X)38S4!`70!`3T'`0`$(U>E>C($P*@!^0P(1$I0.353 -M,$H\"$U31E0@-2XP-PL!#P,&+"XO'R'Y*_\``````!!58$"$8P(`$P```!,` -M````#,Z(,9H`!"-7I7J(C@$!````$%5@0.IK`@`\````/``````$(U>E>@`, -MSH@QFHB.`0``!0$"``4!```````````````````````````````````````` -M`````````!%58$!>L`L`/P```#\`````#,Z(,9H`!"-7I7J(C@$``"T"`@`M -M`3$R.34P,C,X,C`P,#4S.3%`;6YC,#(S+FUC8S(Y-2YO=VQA;BYO````7@`````, -MSH@QF@`$(U>E>HB.`0``3`(0`$P2"@``#@L`*#$R.34P,C,X,C`P,#4S.3%` -M;6YC,#(S+FUC8S(Y-2YO=VQA;BYOL.*X:RH)3A8\F -M`ET1,5U'QWV%1Z`@V,N=24.:\=%3TKIE>@`,SH@QFHB.`0,`+`$`#0``0&!5$0"=&X[D=]]>4;W^,JD$U5@0*@!#0!6`0``5@$``/_______P`$(U>E -M>@@`10`!2#BG``"`$0#_`````/____\`1`!#`30ES`$!!@#5`WTN:0$````` -M````````````````````!"-7I7H````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M````````````````````````````````````````````````````````8X)3 -M8S4!`70!`3T'`0`$(U>E>C($P*@!^0P(1$I0.353,$H\"$U31E0@-2XP-PL! -M#P,&+"XO'R'Y*_\``````!I58$#O`@T`5@$``%8!``#_______\`!"-7I7H( -M`$4``4@XKP``@!$`]P````#_____`$0`0P$T)E>@`````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M``````````````````````````````````````````````````!C@E-C-0$! -M=`$!/0E>HB.`0$` -M```P56!`^J$*`#P````\``````0C5Z5Z``S.B#&:B(X!```%`0,`!0$````` -M````````````````````````````````````````````,%5@0)SA"@`_```` -M/P`````,SH@QF@`$(U>E>HB.`0``+0(#`"T!,3(Y-3`R,S@R,#`P-3,Y,4!M -M;F,P,C,N;6-C,CDU+F]W;&%N+F]R9S!58$#0!`P`/````#P`````!"-7I7H` -M#,Z(,9J(C@$``!0!+P`4$@H```\"``(``0``$0$!```````````````````` -M```````````R56!`-$(%`%X```!>``````S.B#&:``0C5Z5ZB(X!``!,`B\` -M3!(*```."P`H,3(Y-3`R,S@R,#`P-3,Y,4!M;F,P,C,N;6-C,CDU+F]W;&%N -M+F]R9P<%``#7H!![\\SE,P[&']$W6C<%$`$``3)58$#,.`<`8@```&(````` -M!"-7I7H`#,Z(,9J(C@$``%`!,`!0$@L```$-```P```````````````````` -M,0```````````````````#(````````````````````+!0``0WL?0G!%;49D -M0(DL@MD'#C-58$!S4P(`+@```"X`````#,Z(,9H`!"-7I7J(C@$``!P",``< -M$@L```L%``!%[_\P8H+&6U!$B#@$)T-",U5@0"'6`P`\````/``````$(U>E -M>@`,SH@QFHB.`0``!`,```0````````````````````````````````````` -M`````````````#-58$!=V@,`2P```$L`````!"-7I7H`#,Z(,9J(C@$#`#D! -M``T``$!@53$`G7]!<++?0.3Y>#A83O[YHHT"0T@&N\)FL/6P9NHATX%BIRI%B`S56!`F-T#`#X````^``````0C5Z5Z``S.B#&:B(X!`P`L -M`0`-``!`8%4Q`)[N$`!R;$K*.XLG`JO9N"A#@XK>5*[_:U"C]E[O?""IR!5+ -M56!`]Q(-`"H````J````________``0C5Z5Z"`8``0@`!@0``0`$(U>E>JG^ -M0\(```````"I_D/"2U5@0'&!#0`J````*@```/_______P`$(U>E>@@&``$( -M``8$``$`!"-7I7JI_D/"````````J?Y#PDQ58$`X@@T`*@```"H```#_____ -M__\`!"-7I7H(!@`!"``&!``!``0C5Z5ZJ?Y#P@```````*G^0\)-56!`*=H- -M`*\```"O`````0!>?__Z``0C5Z5Z"`!%``"A.+X```$1HM.I_D/"[___^A#+ -M!VP`C6+X32U314%20T@@*B!(5%10+S$N,0T*2&]S=#HR,SDN,C4U+C(U-2XR -M-3`Z,3DP,`T*4U0Z=7)N.G-C:&5M87,M=7!N<"UO41E=FEC93HQ#0I-86XZ(G-S9'`Z9&ES8V]V97(B#0I-6#HS -M#0H-"DU58$"\Y`T`-@```#8````!`%X``!8`!"-7I7H(`$8``"@XP````0(> -M.:G^0\+@```6E`0``"(`Z@,````!!````.____I-56!`OK4.`&X```!N```` -M________``0C5Z5Z"`!%``!@.,(``(`1:@RI_D/"J?[__P")`(D`3+4(B2XI -M$``!```````!($5%14M&041*1$9&1$1!14M#04-!0T%#04-!0T%#04%!```@ -M``'`#``@``$`!)/@``9@`*G^0\).56!`!H\*`#8````V`````0!>```6``0C -M5Z5Z"`!&```H.,0```$"'C6I_D/"X```%I0$```B`.H#`````00```#O___Z -M3E5@0!3E"@!N````;@```/_______P`$(U>E>@@`10``8#C%``"`$6H)J?Y# -MPJG^__\`B0")`$RU"(DN*1```0```````2!%145+1D%$2D1&1D1$045+0T%# -M04-!0T%#04-!0T%!00``(``!P`P`(``!``23X``&8`"I_D/"3U5@0#,6!P!N -M````;@```/_______P`$(U>E>@@`10``8#C&``"`$6H(J?Y#PJG^__\`B0") -M`$RU"(DN*1```0```````2!%145+1D%$2D1&1D1$045+0T%#04-!0T%#04-! -M0T%!00``(``!P`P`(``!``23X``&8`"I_D/"3U5@0*^U#0!6`0``5@$``/__ -M_____P`$(U>E>@@`10`!2#C'``"`$0#?`````/____\`1`!#`325:P$!!@"2 -M13E.``"`````````````````````````!"-7I7H````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M````````8X)38S4!`70!`3T'`0`$(U>E>C($P*@!^0P(1$I0.353,$H\"$U3 -M1E0@-2XP-PL!#P,&+"XO'R'Y*_\``````%!58$`T1P,`;@```&X```#_____ -M__\`!"-7I7H(`$4``&`XR```@!%J!JG^0\*I_O__`(D`B0!,M@B)+B@0``$` -M``````$@145%2T9!1$I$1D9$1$%%2T-!0T%#04-!0T%#04-!04$``"```<`, -M`"```0`$D^``!F``J?Y#PE!58$",WPT`KP```*\````!`%Y___H`!"-7I7H( -M`$4``*$XR@```1&BQZG^0\+O___Z$,L';`"-8OA-+5-%05)#2"`J($A45%`O -M,2XQ#0I(;W-T.C(S.2XR-34N,C4U+C(U,#HQ.3`P#0I35#IUE>@@`10``8#C,``"`$6H"J?Y#PJG^__\`B0")`$PP]8DO*1`` -M`0```````2!%0D9#14-%1D5*1D5&1$5(1D-&1D9!1D%%1D-!0T%!00``(``! -MP`P`(``!``23X``&X`"I_D/"455@0#/A`P`3````$P`````,SH@QF@`$(U>E -M>HB.`0$```!156!`8>D#`#P````\``````0C5Z5Z``S.B#&:B(X!```%`00` -M!0$`````````````````````````````````````````````````455@0+TU -M!``_````/P`````,SH@QF@`$(U>E>HB.`0``+0($`"T!,3(Y-3`R,S@R,#`P -M-3,Y,4!M;F,P,C,N;6-C,CDU+F]W;&%N+F]R9U%58$#Y[@4`/````#P````` -M!"-7I7H`#,Z(,9J(C@$``!0!4``4$@H```\"``(``0``$0$!```````````` -M``````````````````!156!`9.L*`&X```!N````________``0C5Z5Z"`!% -M``!@.,T``(`1:@&I_D/"J?[__P")`(D`3##UB2\I$``!```````!($5"1D-% -M0T5&14I&149$14A&0T9&1D%&045&0T%#04%!```@``'`#``@``$`!)/@``;@ -M`*G^0\)256!`71P'`&X```!N````________``0C5Z5Z"`!%``!@.,X``(`1 -M:@"I_D/"J?[__P")`(D`3##UB2\I$``!```````!($5"1D-%0T5&14I&149$ -M14A&0T9&1D%&045&0T%#04%!```@``'`#``@``$`!)/@``;@`*G^0\)256!` -M9[(.`%X```!>``````S.B#&:``0C5Z5ZB(X!``!,`E``3!(*```."P`H,3(Y -M-3`R,S@R,#`P-3,Y,4!M;F,P,C,N;6-C,CDU+F]W;&%N+F]R9P<%```Z)]TL -M?V'JYOR&8?J))U]%$`$``5)58$`"$P\`8@```&(`````!"-7I7H`#,Z(,9J( -MC@$``%`!40!0$@L```$-```P````````````````````,0`````````````` -M`````#(````````````````````+!0``*IFHOZ$\8[TX!>!F]%P6:%-58$!8 -M30,`;@```&X```#_______\`!"-7I7H(`$4``&`XSP``@!%I_ZG^0\*I_O__ -M`(D`B0!,,?6)+R@0``$```````$@14)&0T5#149%2D9%1D1%2$9#1D9&049! -M149#04-!04$``"```<`,`"```0`$D^``!N``J?Y#PE-58$#M3`H`+@```"X` -M````#,Z(,9H`!"-7I7J(C@$``!P"40`<$@L```L%``#BE(K>$<9]M,I(_@G, -MC).Y4U5@0`*="@`\````/``````$(U>E>@`,SH@QFHB.`0``!`,```0````` -M`````````````````````````````````````````````%-58$#CH`H`2P`` -M`$L`````!"-7I7H`#,Z(,9J(C@$#`#D!``T``$!@55(`GZN0MGOEA8[@4WO* -M&_11@$@"&2ZIH`.YHY==8)$_%6#R:U/Z"F'14BLDK,Z)I:%356!`&*0*`#X` -M```^``````0C5Z5Z``S.B#&:B(X!`P`L`0`-``!`8%52`*!&UK1?KE>@`````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M``!C@E-C-0$!=`$!/0E>@@`10``H3C2```!$:*_J?Y#PN____H0RP=L`(UB^$TM4T5!4D-(("H@ -M2%144"\Q+C$-"DAOE>@@`10``SSCF``"` -M$6EYJ?Y#PJG^__\`B@"*`+L)/1$.B3:I_D/"`(H`I0``($5%14M&041*1$9& -M1$1!14M#04-!0T%#04-!0T%#04%!`"!%0D9#14-%1D5*1D5&1$5(1D-&1D9! -M1D%%1D-!0T%"3@#_4TU")0```````````````````````````````````!$` -M``L```````````#H`P``````````"P!6``,``0`!``(`'`!<34%)3%-,3U1< -M0E)/5U-%``(`1$I0.353,$H`655@0.K0#@#=````W0```/_______P`$(U>E -M>@@`10``SSCG``"`$6EXJ?Y#PJG^__\`B@"*`+L)/!$.B3>I_D/"`(H`I0`` -M($5%14M&041*1$9&1$1!14M#04-!0T%#04-!0T%#04%!`"!%0D9#14-%1D5* -M1D5&1$5(1D-&1D9!1D%%1D-!0T%"3@#_4TU")0`````````````````````` -M`````````````!$```L```````````#H`P``````````"P!6``,``0`!``(` -M'`!<34%)3%-,3U1<0E)/5U-%``(`1$I0.353,$H`6U5@0-@R!P#=````W0`` -M`/_______P`$(U>E>@@`10``SSCH``"`$6EWJ?Y#PJG^__\`B@"*`+L).Q$. -MB3BI_D/"`(H`I0``($5%14M&041*1$9&1$1!14M#04-!0T%#04-!0T%#04%! -M`"!%0D9#14-%1D5*1D5&1$5(1D-&1D9!1D%%1D-!0T%"3@#_4TU")0`````` -M`````````````````````````````!$```L```````````#H`P`````````` -M"P!6``,``0`!``(`'`!<34%)3%-,3U1<0E)/5U-%``(`1$I0.353,$H`7%5@ -M0"2]#0!6`0``5@$``/_______P`$(U>E>@@`10`!2#CI``"`$0"]`````/__ -M__\`1`!#`31L:@$!!@"213E.*0&`````````````````````````!"-7I7H` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M````````````````````````````8X)38S4!`70!`3T'`0`$(U>E>C($P*@! -M^0P(1$I0.353,$H\"$U31E0@-2XP-PL!#P,&+"XO'R'Y*_\``````%Q58$`# -MUPX`Z0```.D```#_______\`!"-7I7H(`$4``-LXZ@``@!%I::G^0\*I_O__ -M`(H`B@#';@L1#HDYJ?Y#P@"*`+$``"!%145+1D%$2D1&1D1$045+0T%#04-! -M0T%#04-!0T%!00`@14)&0T5#149%2D9%1D1%2$9#1D9&049!149#04-!0D\` -M_U--0B4````````````````````````````````````1```7```````````` -MZ`,``````````!<`5@`#``$``0`"`"@`7$U!24Q33$]47$)23U=310`(`2`/ -M`1!9L1D5`````$1*4#DU4S!*`%U58$#/UPX`Z0```.D```#_______\`!"-7 -MI7H(`$4``-LXZP``@!%I:*G^0\*I_O__`(H`B@#';@H1#HDZJ?Y#P@"*`+$` -M`"!%145+1D%$2D1&1D1$045+0T%#04-!0T%#04-!0T%!00`@14)&0T5#149% -M2D9%1D1%2$9#1D9&049!149#04-!0D\`_U--0B4````````````````````` -M```````````````1```7````````````Z`,``````````!<`5@`#``$``0`" -M`"@`7$U!24Q33$]47$)23U=310`(`2`/`1!9L1D5`````$1*4#DU4S!*`%Y5 -M8$"+V`X`Z0```.D```#_______\`!"-7I7H(`$4``-LX[```@!%I9ZG^0\*I -M_O__`(H`B@#';@D1#HD[J?Y#P@"*`+$``"!%145+1D%$2D1&1D1$045+0T%# -M04-!0T%#04-!0T%!00`@14)&0T5#149%2D9%1D1%2$9#1D9&049!149#04-! -M0D\`_U--0B4````````````````````````````````````1```7```````` -M````Z`,``````````!<`5@`#``$``0`"`"@`7$U!24Q33$]47$)23U=310`( -M`2`/`1!9L1D5`````$1*4#DU4S!*`%]58$!)V0X`Z0```.D```#_______\` -M!"-7I7H(`$4``-LX[0``@!%I9JG^0\*I_O__`(H`B@#';@@1#HD\J?Y#P@"* -M`+$``"!%145+1D%$2D1&1D1$045+0T%#04-!0T%#04-!0T%!00`@14)&0T5# -M149%2D9%1D1%2$9#1D9&049!149#04-!0D\`_U--0B4````````````````` -M```````````````````1```7````````````Z`,``````````!<`5@`#``$` -M`0`"`"@`7$U!24Q33$]47$)23U=310`(`2`/`1!9L1D5`````$1*4#DU4S!* -M`&!58$"CV@X`;@```&X```#_______\`!"-7I7H(`$4``&`X[@``@!%IX*G^ -M0\*I_O__`(D`B0!,H^:)/2D0``$```````$@14)&0T5#149%2D9%1D1%2$9# -M1D9&049!149#04-!0DX``"```<`,`"```0`$D^``!F``J?Y#PF%58$#F"@L` -M;@```&X```#_______\`!"-7I7H(`$4``&`X[P``@!%IWZG^0\*I_O__`(D` -MB0!,H^:)/2D0``$```````$@14)&0T5#149%2D9%1D1%2$9#1D9&049!149# -M04-!0DX``"```<`,`"```0`$D^``!F``J?Y#PF)58$#?.P<`;@```&X```#_ -M______\`!"-7I7H(`$4``&`X\```@!%IWJG^0\*I_O__`(D`B0!,H^:)/2D0 -M``$```````$@14)&0T5#149%2D9%1D1%2$9#1D9&049!149#04-!0DX``"`` -M`<`,`"```0`$D^``!F``J?Y#PF-58$#9;`,`;@```&X```#_______\`!"-7 -MI7H(`$4``&`X\P``@!%IVZG^0\*I_O__`(D`B0!,I.:)/2@0``$```````$@ -M14)&0T5#149%2D9%1D1%2$9#1D9&049!149#04-!0DX``"```<`,`"```0`$ -MD^``!F``J?Y#PF-58$"'X`X`;@```&X```#_______\`!"-7I7H(`$4``&`X -M]```@!%IVJG^0\*I_O__`(D`B0!,Z>R)/BD0``$```````$@04)!0T901E!% -M3D9$14-&0T501DA&1$5&1E!&4$%#04(``"```<`,`"```0`$D^``!N``J?Y# -MPF158$`/$0L`;@```&X```#_______\`!"-7I7H(`$4``&`X]0``@!%IV:G^ -M0\*I_O__`(D`B0!,Z>R)/BD0``$```````$@04)!0T901E!%3D9$14-&0T50 -M1DA&1$5&1E!&4$%#04(``"```<`,`"```0`$D^``!N``J?Y#PF558$`&0@<` -M;@```&X```#_______\`!"-7I7H(`$4``&`X]@``@!%IV*G^0\*I_O__`(D` -MB0!,Z>R)/BD0``$```````$@04)!0T901E!%3D9$14-&0T501DA&1$5&1E!& -M4$%#04(``"```<`,`"```0`$D^``!N``J?Y#PF958$#^<@,`;@```&X```#_ -M______\`!"-7I7H(`$4``&`X]P``@!%IUZG^0\*I_O__`(D`B0!,ZNR)/B@0 -M``$```````$@04)!0T901E!%3D9$14-&0T501DA&1$5&1E!&4$%#04(``"`` -M`<`,`"```0`$D^``!N``J?Y#PF958$!_Y@X`W0```-T```#_______\`!"-7 -MI7H(`$4``,\X^```@!%I9ZG^0\*I_O__`(H`B@"[%C41#HD_J?Y#P@"*`*4` -M`"!%145+1D%$2D1&1D1$045+0T%#04-!0T%#04-!0T%!00`@14)&0T5#149% -M2D9%1D1%2$9#1D9&049!149#04-!04$`_U--0B4````````````````````` -M```````````````1```+````````````Z`,```````````L`5@`#``$``0`" -M`!P`7$U!24Q33$]47$)23U=310`"`$1*4#DU4S!*`&958$!AYPX`W0```-T` -M``#_______\`!"-7I7H(`$4``,\X^0``@!%I9JG^0\*I_O__`(H`B@"[SSH1 -M#HE`J?Y#P@"*`*4``"!%145+1D%$2D1&1D1$045+0T%#04-!0T%#04-!0T%! -M00`@04)!0T901E!%3D9$14-&0T501DA&1$5&1E!&4$%#04(`_U--0B4````` -M```````````````````````````````1```+````````````Z`,````````` -M``L`5@`#``$``0`"`!P`7$U!24Q33$]47$)23U=310`"`$1*4#DU4S!*`&95 -M8$!PZ@X`^P```/L```#_______\`!"-7I7H(`$4``.TX^@``@!%I1ZG^0\*I -M_O__`(H`B@#9)2,1#HE!J?Y#P@"*`,,``"!%145+1D%$2D1&1D1$045+0T%# -M04-!0T%#04-!0T%!00`@04)!0T901E!%3D9$14-&0T501DA&1$5&1E!&4$%# -M04(`_U--0B4````````````````````````````````````1```I```````` -M````Z`,``````````"D`5@`#``$``0`"`#H`7$U!24Q33$]47$)23U=310`, -M`&#J``!!4D)%25131U)54%!%``$``PH`$`"`;/[%!D1*4#DU4S!*`&958$"4 -M\`X`7````%P```#_______\`!"-7I7H(`$4``$XX^P``@!%IY:G^0\*I_O__ -M`(D`B0`Z;]^)0P$0``$````````@14)&0T5#149%2D9%1D1%2$9#1D9&049! -M149#04-!0DP``"```6=58$`('PL`7````%P```#_______\`!"-7I7H(`$4` -M`$XX_```@!%IY*G^0\*I_O__`(D`B0`Z;]^)0P$0``$````````@14)&0T5# -M149%2D9%1D1%2$9#1D9&049!149#04-!0DP``"```6A58$`&4`<`7````%P` -M``#_______\`!"-7I7H(`$4``$XX_0``@!%IXZG^0\*I_O__`(D`B0`Z;]^) -M0P$0``$````````@14)&0T5#149%2D9%1D1%2$9#1D9&049!149#04-!0DP` -M`"```6M58$"J6P<`7````%P```#_______\`!"-7I7H(`$4``$XY`0``@!%I -MWZG^0\*I_O__`(D`B0`Z;]N)1P$0``$````````@14)&0T5#149%2D9%1D1% -M2$9#1D9&049!149#04-!0DP``"```6Q58$`-BP,`7````%P```#_______\` -M!"-7I7H(`$4``$XY`@``@!%IWJG^0\*I_O__`(D`B0`Z;]N)1P$0``$````` -M```@14)&0T5#149%2D9%1D1%2$9#1D9&049!149#04-!0DP``"```6Q58$!% -M_@X`7````%P```#_______\`!"-7I7H(`$4``$XY!```@!%IW*G^0\*I_O__ -M`(D`B0`Z;]N)1P$0``$````````@14)&0T5#149%2D9%1D1%2$9#1D9&049! -M149#04-!0DP``"```6U58$`7O@T`5@$``%8!``#_______\`!"-7I7H(`$4` -M`4@Y!@``@!$`H`````#_____`$0`0P$T;&H!`08`DD4Y3BD!@``````````` -M``````````````0C5Z5Z```````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M`````````````````````````````````````````````````&."4V,U`0%T -M`0$]!P$`!"-7I7HR!,"H`?D,"$1*4#DU4S!*/`A-4T94(#4N,#<+`0\#!BPN -M+Q\A^2O_``````!Q56!`]:$*`!,````3``````S.B#&:``0C5Z5ZB(X!`0`` -M`'%58$!%P`H`/````#P`````!"-7I7H`#,Z(,9J(C@$```4!!0`%`0`````` -M``````````````````````````````````````````!Q56!`C?4*`#\````_ -M``````S.B#&:``0C5Z5ZB(X!```M`@4`+0$Q,CDU,#(S.#(P,#`U,SDQ0&UN -M8S`R,RYM8V,R.34N;W=L86XN;W)G<55@0/XV"P`\````/``````$(U>E>@`, -MSH@QFHB.`0``%`%P`!02"@``#P(``@`!```1`0$````````````````````` -M`````````')58$#=.0P`\P```/,```#_______\`!"-7I7H(`$4``.4Y#``` -M@!%I/:G^0\*I_O__`(H`B@#1\^D1#HE*J?Y#P@"*`+L``"!%145+1D%$2D1& -M1D1$045+0T%#04-!0T%#04-!0T%#00`@14)&0T5#149%2D9%1D1%2$9#1D9& -M049!149#04-!0D\`_U--0B4````````````````````````````````````1 -M```A````````````Z`,``````````"$`5@`#``$````"`#(`7$U!24Q33$]4 -M7$)23U=310`/`(#\"@!$2E`Y-5,P2@``60!<`%4`!0$#$`4`#P%5J@!S56!` -MJ'L$`%X```!>``````S.B#&:``0C5Z5ZB(X!``!,`G``3!(*```."P`H,3(Y -M-3`R,S@R,#`P-3,Y,4!M;F,P,C,N;6-C,CDU+F]W;&%N+F]R9P<%```)[DNV -M]E>@`,SH@QFHB.`0`` -M!`,```0``````````````````````````````````````````````````'15 -M8$`G6P``2P```$L`````!"-7I7H`#,Z(,9J(C@$#`#D!``T``$!@57(`H7=G -MF]` eapon1.new -if diff eapon1.new eapon1.out -then - echo passed. -else - echo failed. -fi - diff --git a/tests/eapon2.puu b/tests/eapon2.puu deleted file mode 100644 index 70abb23d6337..000000000000 --- a/tests/eapon2.puu +++ /dev/null @@ -1,66 +0,0 @@ -begin 644 eapon2.pcap -MU,.RH0(`!````````````&`````!````_E1@0(0`#`!"````0@`````+VY#] -M`@#@3UR$8`@`11``-"500``W!O$4U8'_>L&:EKBMN@`6*6Y2?^.:F>V`$/C@ -M9C@```$!"`H974FMBM15+Q!58$!QG`8`8````.L`````"]N0_0(`X$]@<4 -M5(X`:)P-"Q0`8$$!L&:EKA4C@<4`/I,<`$5`/+M5G/\`0<0G:=Q]S4< -MM*"$``/81;I[5@?]ZP9J6N%2.!Q0`RHLB`18`PB*WG4W^01LM]B4XN&`' -M6E(!*C$R.34P,C,X,C`P,#4S.3%`;6YC,#(S+FUC8S(Y-2YO$55@0!P&!0!@ -M````!@$`````#`>LA0`+VY#]`@@`10``^``"0`!`$0RDP9J6N-6!_WH'%%2. -M`.2>DP(6`-P04TN>&O"\WL%@,.`1V142"`;____^#`8```)`!@8````"&CH` -M``$W$32`+U<1;LS62B]58$!:H@8`8````.L`````"]N0_0(`X$]@M>A=G -MB0$J,3(Y-3`R,S@R,#`P-3,Y,4!M;F,P,C,N;6-C,CDU+F\O56!`G*<&`&`` -M``"*```````,!ZR%``O;D/T""`!%``!\``-``$`1#1_!FI:XU8'_>@<45(X` -M:#L&:EKA4C@<4`/H2$P$9`/)6HP7H8R0(O -M*"8``/81;IG5@?]ZP9J6N%2.!Q0`R@WC`1H`PCS/?&QHIT8SX.[2#=[S68H! -M*C$R.34P,C,X,C`P,#4S.3%`;6YC,#(S+FUC8S(Y-2YO,55@0#VS#0!@```` -M!@$`````#`>LA0`+VY#]`@@`10``^``%0`!`$0RAP9J6N-6!_WH'%%2.`.3B -MMP(:`-S*Z(?9H34)&AB0":D9@<45(X`:#0% -M"QL`8(N:^N5L(EK&#H6-':U$XV((!O____X,!@```D`&!@````)/%@%0`!02 -M"@``#P(``@`!455@0*VL"0!@````'`$````+VY#]`@#@3UR$8`@`10`!#B@I -M``#V$6YFU8'_>L&:EKA4C@<4`/KDFP$<`/+H$R8P9(B"W[^G<4!"HKQ+`2HQ -M,CDU,#(S.#(P,#`U,SDQ0&UN8S`R,RYM8V,R.34N;U%58$"ZL@D`8````,8` -M``````P'K(4`"]N0_0((`$4``+@`!T``0!$,W\&:EKC5@?]Z!Q14C@"DI=@+ -M'`";*!>&FY;C?2/)T74`@&_____@P&```"0`8&`````D]2`5$`4!(+ -M```!#0``,`!256!`@SL%`&````#L``````O;D/T"`.!/7(1@"`!%``#>*"H` -M`/81;I75@?]ZP9J6N%2.!Q0`RI"T`1T`PE:^P6JH@]U$D*!C#8CO0UP!*C$R -M.34P,C,X,C`P,#4S.3%`;6YC,#(S+FUC8S(Y-2YO4E5@0'M`!0!@````!@$` -M````#`>LA0`+VY#]`@@`10``^``(0`!`$0R>P9J6N-6!_WH'%%2.`.2<&@(= -M`-P&]WGHNB++Z0K&A"^B<2S/"`;____^#`8```)`!@8````"&CH```$W$32F -M=DT@&\D[/G!58$!OW04`8````.L`````"]N0_0(`X$]AS"W^P0$J,3(Y -M-3`R,S@R,#`P-3,Y,4!M;F,P,C,N;6-C,CDU+F]P56!`L>(%`&````"*```` -M```,!ZR%``O;D/T""`!%``!\``E``$`1#1G!FI:XU8'_>@<45(X`:`.V"QX` -M8+P/!*Y!RZ>(/:C.%/A62\((!O____X,!@```D`&!@````)/%@%P`!02"@`` -M#P(``@`!<55@0)*H#@!@````'`$````+VY#]`@#@3UR$8`@`10`!#B@L``#V -M$6YCU8'_>L&:EKA4C@<4`/JLH@$?`/*.M".D<>M4,KL=.(:"[-F;`2HQ,CDU -M,#(S.#(P,#`U,SDQ0&UN8S`R,RYM8V,R.34N;W%58$#$K@X`8````,8````` -M``P'K(4`"]N0_0((`$4``+@`"D``0!$,W,&:EKC5@?]Z!Q14C@"DK7D+'P"< -MMWVPJO:XC`JEY#15<5U0Z@@&_____@P&```"0`8&`````D]2`7$`4!(+```! -M#0``,`!R56!`S#4*`&````#L``````O;D/T"`.!/7(1@"`!%``#>*"T``/81 -M;I+5@?]ZP9J6N%2.!Q0`RE>1`2``PK+"]?UCV]G1I<-+X16?0+L!*C$R.34P -M,C,X,C`P,#4S.3%`;6YC,#(S+FUC8S(Y-2YOLA0`+VY#]`@@`10``^``+0`!`$0R;P9J6N-6!_WH'%%2.`.1M%P(@`-PJ -M=?H'6<1=UD&:FRVA,V+S"`;____^#`8```)`!@8````"&CH```$W$32RVRE= -$I%P\00`` -` -end diff --git a/tests/esp-secrets.txt b/tests/esp-secrets.txt deleted file mode 100644 index 81847a0e3e50..000000000000 --- a/tests/esp-secrets.txt +++ /dev/null @@ -1,5 +0,0 @@ -# a comment - -0x12345678@192.1.2.45 3des-cbc-hmac96:0x43434545464649494a4a4c4c4f4f51515252545457575840 -0xabcdabcd@192.0.1.1 3des-cbc-hmac96:0x434545464649494a4a4c4c4f4f5151525254545757584043 -0xd1234567@192.1.2.45 aes256-cbc-hmac96:0xaaaabbbbccccdddd4043434545464649494a4a4c4c4f4f515152525454575758 diff --git a/tests/esp0.out b/tests/esp0.out deleted file mode 100644 index a0ddf1b2dc71..000000000000 --- a/tests/esp0.out +++ /dev/null @@ -1,8 +0,0 @@ -IP 192.1.2.23 > 192.1.2.45: ESP(spi=0x12345678,seq=0x1), length 116 -IP 192.1.2.23 > 192.1.2.45: ESP(spi=0x12345678,seq=0x2), length 116 -IP 192.1.2.23 > 192.1.2.45: ESP(spi=0x12345678,seq=0x3), length 116 -IP 192.1.2.23 > 192.1.2.45: ESP(spi=0x12345678,seq=0x4), length 116 -IP 192.1.2.23 > 192.1.2.45: ESP(spi=0x12345678,seq=0x5), length 116 -IP 192.1.2.23 > 192.1.2.45: ESP(spi=0x12345678,seq=0x6), length 116 -IP 192.1.2.23 > 192.1.2.45: ESP(spi=0x12345678,seq=0x7), length 116 -IP 192.1.2.23 > 192.1.2.45: ESP(spi=0x12345678,seq=0x8), length 116 diff --git a/tests/esp0.sh b/tests/esp0.sh deleted file mode 100644 index daf407c441e5..000000000000 --- a/tests/esp0.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/sh - -echo -n test esp0... -uudecode 02-sunrise-sunset-esp.puu -if (../tcpdump -t -n -r 02-sunrise-sunset-esp.pcap | diff - esp0.out) -then - echo passed. -else - echo failed. -fi - - diff --git a/tests/esp1.gdbinit b/tests/esp1.gdbinit deleted file mode 100644 index 6c8ae890cbd5..000000000000 --- a/tests/esp1.gdbinit +++ /dev/null @@ -1 +0,0 @@ -set args -t -n -E "0x12345678@192.1.2.45 3des-cbc-hmac96:0x4043434545464649494a4a4c4c4f4f515152525454575758" -r 02-sunrise-sunset-esp.pcap diff --git a/tests/esp1.out b/tests/esp1.out deleted file mode 100644 index 61b2967639ad..000000000000 --- a/tests/esp1.out +++ /dev/null @@ -1,8 +0,0 @@ -IP 192.1.2.23 > 192.1.2.45: ESP(spi=0x12345678,seq=0x1), length 116: IP 192.0.2.1 > 192.0.1.1: ICMP echo request, id 28416, seq 1280, length 64 (ipip-proto-4) -IP 192.1.2.23 > 192.1.2.45: ESP(spi=0x12345678,seq=0x2), length 116: IP 192.0.2.1 > 192.0.1.1: ICMP echo request, id 28416, seq 1536, length 64 (ipip-proto-4) -IP 192.1.2.23 > 192.1.2.45: ESP(spi=0x12345678,seq=0x3), length 116: IP 192.0.2.1 > 192.0.1.1: ICMP echo request, id 28416, seq 1792, length 64 (ipip-proto-4) -IP 192.1.2.23 > 192.1.2.45: ESP(spi=0x12345678,seq=0x4), length 116: IP 192.0.2.1 > 192.0.1.1: ICMP echo request, id 28416, seq 2048, length 64 (ipip-proto-4) -IP 192.1.2.23 > 192.1.2.45: ESP(spi=0x12345678,seq=0x5), length 116: IP 192.0.2.1 > 192.0.1.1: ICMP echo request, id 28416, seq 2304, length 64 (ipip-proto-4) -IP 192.1.2.23 > 192.1.2.45: ESP(spi=0x12345678,seq=0x6), length 116: IP 192.0.2.1 > 192.0.1.1: ICMP echo request, id 28416, seq 2560, length 64 (ipip-proto-4) -IP 192.1.2.23 > 192.1.2.45: ESP(spi=0x12345678,seq=0x7), length 116: IP 192.0.2.1 > 192.0.1.1: ICMP echo request, id 28416, seq 2816, length 64 (ipip-proto-4) -IP 192.1.2.23 > 192.1.2.45: ESP(spi=0x12345678,seq=0x8), length 116: IP 192.0.2.1 > 192.0.1.1: ICMP echo request, id 28416, seq 3072, length 64 (ipip-proto-4) diff --git a/tests/esp1.sh b/tests/esp1.sh deleted file mode 100644 index 87ee3b92df1e..000000000000 --- a/tests/esp1.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/sh - -uudecode 02-sunrise-sunset-esp.puu - -echo -n test esp1... -../tcpdump -t -n -E "0x12345678@192.1.2.45 3des-cbc-hmac96:0x4043434545464649494a4a4c4c4f4f515152525454575758" -r 02-sunrise-sunset-esp.pcap >esp1.new -if diff esp1.new esp1.out -then - echo passed. -else - echo failed. -fi - diff --git a/tests/esp2.gdbinit b/tests/esp2.gdbinit deleted file mode 100644 index 7c1840758622..000000000000 --- a/tests/esp2.gdbinit +++ /dev/null @@ -1 +0,0 @@ -set args -t -n -E "0x12345678@192.1.2.45 3des-cbc-hmac96:0x43434545464649494a4a4c4c4f4f51515252545457575840,0xabcdabcd@192.0.1.1 3des-cbc-hmac96:0x434545464649494a4a4c4c4f4f5151525254545757584043" -r 08-sunrise-sunset-esp2.pcap diff --git a/tests/esp2.out b/tests/esp2.out deleted file mode 100644 index a829c8ea3390..000000000000 --- a/tests/esp2.out +++ /dev/null @@ -1,8 +0,0 @@ -IP 192.1.2.23 > 192.1.2.45: ESP(spi=0x12345678,seq=0x1), length 172: IP 192.1.2.23 > 192.0.1.1: ESP(spi=0xabcdabcd,seq=0x1), length 116: IP 192.0.2.1 > 192.0.1.1: ICMP echo request, id 28416, seq 1280, length 64 (ipip-proto-4) (ipip-proto-4) -IP 192.1.2.23 > 192.1.2.45: ESP(spi=0x12345678,seq=0x2), length 172: IP 192.1.2.23 > 192.0.1.1: ESP(spi=0xabcdabcd,seq=0x2), length 116: IP 192.0.2.1 > 192.0.1.1: ICMP echo request, id 28416, seq 1536, length 64 (ipip-proto-4) (ipip-proto-4) -IP 192.1.2.23 > 192.1.2.45: ESP(spi=0x12345678,seq=0x3), length 172: IP 192.1.2.23 > 192.0.1.1: ESP(spi=0xabcdabcd,seq=0x3), length 116: IP 192.0.2.1 > 192.0.1.1: ICMP echo request, id 28416, seq 1792, length 64 (ipip-proto-4) (ipip-proto-4) -IP 192.1.2.23 > 192.1.2.45: ESP(spi=0x12345678,seq=0x4), length 172: IP 192.1.2.23 > 192.0.1.1: ESP(spi=0xabcdabcd,seq=0x4), length 116: IP 192.0.2.1 > 192.0.1.1: ICMP echo request, id 28416, seq 2048, length 64 (ipip-proto-4) (ipip-proto-4) -IP 192.1.2.23 > 192.1.2.45: ESP(spi=0x12345678,seq=0x5), length 172: IP 192.1.2.23 > 192.0.1.1: ESP(spi=0xabcdabcd,seq=0x5), length 116: IP 192.0.2.1 > 192.0.1.1: ICMP echo request, id 28416, seq 2304, length 64 (ipip-proto-4) (ipip-proto-4) -IP 192.1.2.23 > 192.1.2.45: ESP(spi=0x12345678,seq=0x6), length 172: IP 192.1.2.23 > 192.0.1.1: ESP(spi=0xabcdabcd,seq=0x6), length 116: IP 192.0.2.1 > 192.0.1.1: ICMP echo request, id 28416, seq 2560, length 64 (ipip-proto-4) (ipip-proto-4) -IP 192.1.2.23 > 192.1.2.45: ESP(spi=0x12345678,seq=0x7), length 172: IP 192.1.2.23 > 192.0.1.1: ESP(spi=0xabcdabcd,seq=0x7), length 116: IP 192.0.2.1 > 192.0.1.1: ICMP echo request, id 28416, seq 2816, length 64 (ipip-proto-4) (ipip-proto-4) -IP 192.1.2.23 > 192.1.2.45: ESP(spi=0x12345678,seq=0x8), length 172: IP 192.1.2.23 > 192.0.1.1: ESP(spi=0xabcdabcd,seq=0x8), length 116: IP 192.0.2.1 > 192.0.1.1: ICMP echo request, id 28416, seq 3072, length 64 (ipip-proto-4) (ipip-proto-4) diff --git a/tests/esp2.sh b/tests/esp2.sh deleted file mode 100644 index 18a70833e05f..000000000000 --- a/tests/esp2.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/sh - -uudecode 08-sunrise-sunset-esp2.puu - -echo -n test esp2... -../tcpdump -t -n -E "0x12345678@192.1.2.45 3des-cbc-hmac96:0x43434545464649494a4a4c4c4f4f51515252545457575840,0xabcdabcd@192.0.1.1 3des-cbc-hmac96:0x434545464649494a4a4c4c4f4f5151525254545757584043" -r 08-sunrise-sunset-esp2.pcap >esp2.new -if diff esp2.new esp2.out -then - echo passed. -else - echo failed. -fi - diff --git a/tests/esp3.gdbinit b/tests/esp3.gdbinit deleted file mode 100644 index 71501187a220..000000000000 --- a/tests/esp3.gdbinit +++ /dev/null @@ -1 +0,0 @@ -set args -t -n -E "3des-cbc-hmac96:0x43434545464649494a4a4c4c4f4f51515252545457575840" -r 08-sunrise-sunset-esp2.pcap diff --git a/tests/esp3.sh b/tests/esp3.sh deleted file mode 100644 index 122beab97ede..000000000000 --- a/tests/esp3.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/sh - -uudecode 02-sunrise-sunset-esp.puu -echo -n test esp3... - ../tcpdump -t -n -E "3des-cbc-hmac96:0x4043434545464649494a4a4c4c4f4f515152525454575758" -r 02-sunrise-sunset-esp.pcap >esp3.new -if diff esp3.new esp1.out -then - echo passed. -else - echo failed. -fi - diff --git a/tests/esp4.gdbinit b/tests/esp4.gdbinit deleted file mode 100644 index 8007444b74e2..000000000000 --- a/tests/esp4.gdbinit +++ /dev/null @@ -1,2 +0,0 @@ -set args -t -n -E "file esp-secrets.txt" -r 08-sunrise-sunset-esp2.pcap - diff --git a/tests/esp4.sh b/tests/esp4.sh deleted file mode 100644 index bba26e722a86..000000000000 --- a/tests/esp4.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/sh - -uudecode 08-sunrise-sunset-esp2.puu - -echo -n test esp4... -../tcpdump -t -n -E "file esp-secrets.txt" -r 08-sunrise-sunset-esp2.pcap >esp4.new -if diff esp4.new esp2.out -then - echo passed. -else - echo failed. -fi - diff --git a/tests/esp5.gdbinit b/tests/esp5.gdbinit deleted file mode 100644 index 2f578e327042..000000000000 --- a/tests/esp5.gdbinit +++ /dev/null @@ -1,3 +0,0 @@ -set args -t -n -E "file esp-secrets.txt" -r 08-sunrise-sunset-aes.pcap - - diff --git a/tests/esp5.out b/tests/esp5.out deleted file mode 100644 index 73f35e0b2201..000000000000 --- a/tests/esp5.out +++ /dev/null @@ -1,8 +0,0 @@ -IP 192.1.2.23 > 192.1.2.45: ESP(spi=0xd1234567,seq=0x1), length 132: IP 192.0.2.1 > 192.0.1.1: ICMP echo request, id 28416, seq 1280, length 64 (ipip-proto-4) -IP 192.1.2.23 > 192.1.2.45: ESP(spi=0xd1234567,seq=0x2), length 132: IP 192.0.2.1 > 192.0.1.1: ICMP echo request, id 28416, seq 1536, length 64 (ipip-proto-4) -IP 192.1.2.23 > 192.1.2.45: ESP(spi=0xd1234567,seq=0x3), length 132: IP 192.0.2.1 > 192.0.1.1: ICMP echo request, id 28416, seq 1792, length 64 (ipip-proto-4) -IP 192.1.2.23 > 192.1.2.45: ESP(spi=0xd1234567,seq=0x4), length 132: IP 192.0.2.1 > 192.0.1.1: ICMP echo request, id 28416, seq 2048, length 64 (ipip-proto-4) -IP 192.1.2.23 > 192.1.2.45: ESP(spi=0xd1234567,seq=0x5), length 132: IP 192.0.2.1 > 192.0.1.1: ICMP echo request, id 28416, seq 2304, length 64 (ipip-proto-4) -IP 192.1.2.23 > 192.1.2.45: ESP(spi=0xd1234567,seq=0x6), length 132: IP 192.0.2.1 > 192.0.1.1: ICMP echo request, id 28416, seq 2560, length 64 (ipip-proto-4) -IP 192.1.2.23 > 192.1.2.45: ESP(spi=0xd1234567,seq=0x7), length 132: IP 192.0.2.1 > 192.0.1.1: ICMP echo request, id 28416, seq 2816, length 64 (ipip-proto-4) -IP 192.1.2.23 > 192.1.2.45: ESP(spi=0xd1234567,seq=0x8), length 132: IP 192.0.2.1 > 192.0.1.1: ICMP echo request, id 28416, seq 3072, length 64 (ipip-proto-4) diff --git a/tests/esp5.sh b/tests/esp5.sh deleted file mode 100644 index 405b677bf36e..000000000000 --- a/tests/esp5.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/sh - -uudecode 08-sunrise-sunset-aes.puu - -echo -n test esp5... -../tcpdump -t -n -E "file esp-secrets.txt" -r 08-sunrise-sunset-aes.pcap > esp5.new -if diff esp5.new esp5.out -then - echo passed. -else - echo failed. -fi - diff --git a/tests/espudp1.out b/tests/espudp1.out deleted file mode 100644 index 8999ff4d602b..000000000000 --- a/tests/espudp1.out +++ /dev/null @@ -1,8 +0,0 @@ -IP 192.1.2.23.4500 > 192.1.2.45.4500: UDP-encap: ESP(spi=0x12345678,seq=0x1), length 116 -IP 192.1.2.23.4500 > 192.1.2.45.4500: UDP-encap: ESP(spi=0x12345678,seq=0x2), length 116: ip-proto-227 49 -IP 192.1.2.23.4500 > 192.1.2.45.4500: UDP-encap: ESP(spi=0x12345678,seq=0x3), length 116: PIMv13, length: 10 -IP 192.1.2.23.4500 > 192.1.2.45.4500: UDP-encap: ESP(spi=0x12345678,seq=0x4), length 116 -IP 192.1.2.23.4500 > 192.1.2.45.4500: UDP-encap: ESP(spi=0x12345678,seq=0x5), length 116 -IP 192.1.2.23.4500 > 192.1.2.45.4500: UDP-encap: ESP(spi=0x12345678,seq=0x6), length 116: ip-proto-183 28 -IP 192.1.2.23.4500 > 192.1.2.45.4500: UDP-encap: ESP(spi=0x12345678,seq=0x7), length 116: ip-proto-72 34 -IP 192.1.2.23.4500 > 192.1.2.45.4500: UDP-encap: ESP(spi=0x12345678,seq=0x8), length 116: ip-proto-224 59 diff --git a/tests/espudp1.puu b/tests/espudp1.puu deleted file mode 100644 index 353c1c9c3d5e..000000000000 --- a/tests/espudp1.puu +++ /dev/null @@ -1,35 +0,0 @@ -begin 644 espudp1.pcap -MU,.RH0(`!``````````````&```!``````````````">````G@```!```&1D -M11```&1D(P@`10``D*8.``!`$5`(P`$"%\`!`BT1E!&4`'P``!(T5G@````! -MIQI1WARY*2.,3*N>\E4-MV0"Q0&B9RG\CH]Z?F.J2U2J6?9"%WHI),PCC4.T -MPHU1D2,KT6".3TG`1R:V$E7'FE[]PG%1#\!'O=1;9"P[#Q*U;DU12<9BO$:/ -M(AI2S*,BK5H_YVKC,]K'@[Y^``````````">````G@```!```&1D11```&1D -M(P@`10``D*8/``!`$5`'P`$"%\`!`BT1E!&4`'P``!(T5G@````"*3$H)*^K -MG65!9?U^[O>)/*D1"&WNUN@=BGJZV$;E12<$J$SGOAFJ!<5)O%=NY:HY\B$3 -M!*Q.N--U/:_F^;L-H0>[$9AU0\QP"`F5JD8GY307\SDD5=Y\G@%('76R5O`G -MA/2`=,$VWF]0[L\*``````````">````G@```!```&1D11```&1D(P@`10`` -MD*80``!`$5`&P`$"%\`!`BT1E!&4`'P``!(T5G@````#C]!\R;K$H/YX7>T6 -MZT6>/2I[+Q4&*]7A`VLB)[%A_/MKQMX-:R"-)DA.[G>)\5]KF#Z5:3L+JCMC -MXDHKBE%/Q%D1VV#=?\3JEZ?8)&[3[(4F"4*0W"B)."[.?0U(7!!Z2_69:0DV -M98H$8R%=``````````">````G@```!```&1D11```&1D(P@`10``D*81``!` -M$5`%P`$"%\`!`BT1E!&4`'P``!(T5G@````$FV8=\*GR(@_[&TF2&3'AZ9)Q -M*?@[(M!I:IE"@-?4W5TEZ-5@(F\613%V19L#%[XCJFJY^G4BVW"O\/*X\!A6 -M@1<[4J(5+60M8]9R>$=\TU>XX7AB7\T'1W1HAPX[(KPTVN"*NEC)E/7@5D_1 -M``````````">````G@```!```&1D11```&1D(P@`10``D*82``!`$5`$P`$" -M%\`!`BT1E!&4`'P``!(T5G@````%=@CRA49O0D;A1@T5[WR$Q5?Y(\M[>D@C -MRFK+$5I%Y8:85K`)&LZ.Q@G&N)8-RG@2;GNYJ\2OC9ZV?,IT7HJU7K&DM/1_ -M:K+-8KXY4?22*8=.1@O<,#R&;^R2P`>PAR9E7*>!>3*D24OK4*C1```````` -M``">````G@```!```&1D11```&1D(P@`10``D*83``!`$5`#P`$"%\`!`BT1 -ME!&4`'P``!(T5G@````&OTF+$=SM[Y.=U8E>9V&69R:M\.1&LA]$#9Q^:+E7 -MQE#E^)1R]--?O]SW!%7]KB<7\MLR56^WX)#?)/IJR<_@C91NG`(S^S``````````">```` -MG@```!```&1D11```&1D(P@`10``D*84``!`$5`"P`$"%\`!`BT1E!&4`'P` -M`!(T5G@````'!12933DTC1RSTN*./4ZCE%A8GGVL:;@`.%'8MEA.C7/6]D[S -MO1C([D/N6]%[?NISR>1W1EE,)=\I9&.PF-'Q*LXZQU71100.[\,-HK41G3/R -MG9DY$,].(M58U1\0XT\4R[<=RCCXM;_%AVM)``````````">````G@```!`` -M`&1D11```&1D(P@`10``D*85``!`$5`!P`$"%\`!`BT1E!&4`'P``!(T5G@` -M```(*_3L6&DE`65QQPA"@BAQ5FY@=%,+]@C9K+O)@],/GCI4%,MKI282(0M9 -M*<@/=L.DB"**EM":*2KJK`^H=0YM,$^[`=L%(RO,O_<4`MNKJ*:^9W8@1BP$ -59LK`-:)VQ/=2B;1'4FV3B?L]2;O! -` -end diff --git a/tests/espudp1.sh b/tests/espudp1.sh deleted file mode 100644 index 35dc0a880367..000000000000 --- a/tests/espudp1.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/sh - -uudecode espudp1.puu - -echo -n test espudp1... -../tcpdump -t -n -E "file esp-secrets.txt" -r espudp1.pcap >espudp1.new -if diff espudp1.new espudp1.out -then - echo passed. -else - echo failed. -fi - diff --git a/tests/isakmp-delete-segfault.puu b/tests/isakmp-delete-segfault.puu deleted file mode 100644 index 11512b128424..000000000000 --- a/tests/isakmp-delete-segfault.puu +++ /dev/null @@ -1,20 +0,0 @@ -begin 644 isakmp-delete-segfault.pcap -MU,.RH0(`!``````````````$```!````@"X```````"I`@``J0(``/______ -M_P$!`0$!`0@`10``I@`O0`!`$3PA?P```7\```$!]`'T`<@``!N3$,+\/7K^ -M3SF!FR'H6?T,OKXN&YH=5T,AEYH%R@(@71+C65#___\````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -!```` -` -end diff --git a/tests/isakmp-identification-segfault.puu b/tests/isakmp-identification-segfault.puu deleted file mode 100644 index 6f0ae0e8db38..000000000000 --- a/tests/isakmp-identification-segfault.puu +++ /dev/null @@ -1,11 +0,0 @@ -begin 644 isakmp-identification-segfault.pcap -MU,.RH0(`!````````````/__````````HV%@0"_*#@`\`0``/`$```(```!% -M``$XH&P``/\1'$9_```!?P```0'U`?0!)$KL)9EPC(1ZBP(```````````40 -M`@`````````!'````0`"```````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -I```````````````````````````````````````````````````````` -` -end diff --git a/tests/isakmp-pointer-loop.puu b/tests/isakmp-pointer-loop.puu deleted file mode 100644 index fc582482c1e7..000000000000 --- a/tests/isakmp-pointer-loop.puu +++ /dev/null @@ -1,6 +0,0 @@ -begin 644 isakmp-pointer-loop.pcap -MU,.RH0(`!````````````/__```!````DR;5/[_@!0!(````2``````$6D[H -ME``"+6_:]@@`10``.H=E0`#S$0HB@:KY?H&J^5 127.0.0.1.500: isakmp: phase 2/others ? #190[C] diff --git a/tests/isakmp1.sh b/tests/isakmp1.sh deleted file mode 100644 index ce2de7d1ba79..000000000000 --- a/tests/isakmp1.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/sh - -uudecode isakmp-delete-segfault.puu - -echo -n test isakmp1... -if (../tcpdump -t -n -r isakmp-delete-segfault.pcap | diff - isakmp1.out) -then - echo passed. -else - echo failed. -fi - diff --git a/tests/isakmp2.out b/tests/isakmp2.out deleted file mode 100644 index 44c28db87b15..000000000000 --- a/tests/isakmp2.out +++ /dev/null @@ -1 +0,0 @@ -IP 129.170.249.126.500 > 129.170.249.87.500: isakmp: phase 1 ? base diff --git a/tests/isakmp2.sh b/tests/isakmp2.sh deleted file mode 100644 index d0006a8feeee..000000000000 --- a/tests/isakmp2.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/sh - -uudecode isakmp-pointer-loop.puu - -echo -n test isakmp2... -if (../tcpdump -t -n -r isakmp-pointer-loop.pcap | diff - isakmp2.out) -then - echo passed. -else - echo failed. -fi - diff --git a/tests/isakmp3.out b/tests/isakmp3.out deleted file mode 100644 index 6b37b77af8ec..000000000000 --- a/tests/isakmp3.out +++ /dev/null @@ -1,2 +0,0 @@ -IP (tos 0x0, ttl 255, id 41068, offset 0, flags [none], proto: UDP (17), length: 312) 127.0.0.1.501 > 127.0.0.1.500: isakmp 1.0 msgid : phase 1 I ident: - (id: idtype=FQDN protoid=0 port=0 len=248 \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000) diff --git a/tests/isakmp3.sh b/tests/isakmp3.sh deleted file mode 100644 index e6003cc31fc8..000000000000 --- a/tests/isakmp3.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/sh - -uudecode isakmp-identification-segfault.puu - -echo -n test isakmp3... -../tcpdump -t -v -n -r isakmp-identification-segfault.pcap > isakmp3.new -if diff isakmp3.new isakmp3.out -then - echo passed. -else - echo failed. -fi - diff --git a/tests/isakmp4.out b/tests/isakmp4.out deleted file mode 100644 index 8c5b7daeb0d2..000000000000 --- a/tests/isakmp4.out +++ /dev/null @@ -1,35 +0,0 @@ -arp who-has 192.1.2.23 tell 192.1.2.254 -arp reply 192.1.2.23 is-at 10:00:00:64:64:23 -IP 192.1.2.254.500 > 192.1.2.23.500: isakmp: phase 1 I ident -IP 192.1.2.23.500 > 192.1.2.254.500: isakmp: phase 1 R ident -IP 192.1.2.254.500 > 192.1.2.23.500: isakmp: phase 1 I ident -IP 192.1.2.23.500 > 192.1.2.254.500: isakmp: phase 1 R ident -IP 192.1.2.254.4500 > 192.1.2.23.4500: NONESP-encap: isakmp: phase 1 I ident[E] -IP 192.1.2.23.4500 > 192.1.2.254.4500: NONESP-encap: isakmp: phase 1 R ident[E] -IP 192.1.2.254.4500 > 192.1.2.23.4500: NONESP-encap: isakmp: phase 2/others I oakley-quick[E] -IP 192.1.2.23.4500 > 192.1.2.254.4500: NONESP-encap: isakmp: phase 2/others R oakley-quick[E] -IP 192.1.2.254.4500 > 192.1.2.23.4500: NONESP-encap: isakmp: phase 2/others I oakley-quick[E] -IP 192.1.2.254.4500 > 192.1.2.23.4500: UDP-encap: ESP(spi=0xf4dc0ae5,seq=0x1), length 132 -arp who-has 192.1.2.254 tell 192.1.2.23 -arp reply 192.1.2.254 is-at 10:00:00:de:ad:ba -IP 192.1.2.23.4500 > 192.1.2.254.4500: NONESP-encap: isakmp: phase 2/others R oakley-quick[E] -IP 192.1.2.254.4500 > 192.1.2.23.4500: NONESP-encap: isakmp: phase 2/others I oakley-quick[E] -IP 192.1.2.254.4500 > 192.1.2.23.4500: UDP-encap: ESP(spi=0xf4dc0ae5,seq=0x2), length 132 -IP 192.1.2.254.4500 > 192.1.2.23.4500: isakmp-nat-keep-alive -IP 192.1.2.254.4500 > 192.1.2.23.4500: UDP-encap: ESP(spi=0xf4dc0ae5,seq=0x3), length 132 -IP 192.1.2.23.4500 > 192.1.2.254.4500: NONESP-encap: isakmp: phase 2/others R oakley-quick[E] -IP 192.1.2.254.4500 > 192.1.2.23.4500: NONESP-encap: isakmp: phase 2/others I oakley-quick[E] -IP 192.1.2.254.4500 > 192.1.2.23.4500: UDP-encap: ESP(spi=0xf4dc0ae5,seq=0x4), length 132 -IP 192.1.2.254.4500 > 192.1.2.23.4500: isakmp-nat-keep-alive -IP 192.1.2.254.4500 > 192.1.2.23.4500: UDP-encap: ESP(spi=0xf4dc0ae5,seq=0x5), length 132 -IP 192.1.2.254.4500 > 192.1.2.23.4500: UDP-encap: ESP(spi=0xf4dc0ae5,seq=0x6), length 132 -arp who-has 192.1.2.23 tell 192.1.2.254 -arp reply 192.1.2.23 is-at 10:00:00:64:64:23 -IP 192.1.2.254.4500 > 192.1.2.23.4500: isakmp-nat-keep-alive -IP 192.1.2.254.4500 > 192.1.2.23.4500: UDP-encap: ESP(spi=0xf4dc0ae5,seq=0x7), length 132 -IP 192.1.2.23.4500 > 192.1.2.254.4500: NONESP-encap: isakmp: phase 2/others R oakley-quick[E] -IP 192.1.2.254.4500 > 192.1.2.23.4500: UDP-encap: ESP(spi=0xf4dc0ae5,seq=0x8), length 132 -arp who-has 192.1.2.254 tell 192.1.2.23 -arp reply 192.1.2.254 is-at 10:00:00:de:ad:ba -IP 192.1.2.254.4500 > 192.1.2.23.4500: isakmp-nat-keep-alive -IP 192.1.2.23.4500 > 192.1.2.254.4500: NONESP-encap: isakmp: phase 2/others R inf[E] diff --git a/tests/isakmp4.sh b/tests/isakmp4.sh deleted file mode 100644 index dd7bf0780399..000000000000 --- a/tests/isakmp4.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/sh - -uudecode isakmp4500.puu - -echo -n test isakmp4... -../tcpdump -t -n -E "file esp-secrets.txt" -r isakmp4500.pcap >isakmp4.new -if diff isakmp4.new isakmp4.out -then - echo passed. -else - echo failed. -fi - diff --git a/tests/isakmp4500.puu b/tests/isakmp4500.puu deleted file mode 100644 index 0b55dccfde4a..000000000000 --- a/tests/isakmp4500.puu +++ /dev/null @@ -1,155 +0,0 @@ -begin 644 isakmp4500.pcap -MU,.RH0(`!``````````````&```!```````````````J````*@```/______ -M_Q```-ZMN@@&``$(``8$``$0``#>K;K``0+^````````P`$"%P`````````` -M*@```"H````0``#>K;H0``!D9",(!@`!"``&!``"$```9&0CP`$"%Q```-ZM -MNL`!`OX``````````$X!``!.`0``$```9&0C$```WJVZ"`!%``%```!``#\1 -MM97``0+^P`$"%P'T`?0!+)6LGHGR.(^0O!X```````````$0`@`````````! -M)`T``)0````!`````0```(@``0`$`P``(``!``"`"P`!@`P.$(`!``6``@`! -M@`,``X`$``4#```@`0$``(`+``&`#`X0@`$`!8`"``*``P`#@`0`!0,``"`" -M`0``@`L``8`,#A"``0`%@`(``H`#``.`!``"````(`,!``"`"P`!@`P.$(`! -M``6``@`!@`,``X`$``(-```03T5K4F)'6%)V;5!%#0``%*_*UQ-HH?'):X:6 -M_'=7`0`-```42A,<@0<#6$5<5RCR#I5%+PT``!1]E!FF4Q#*;RP7G9(54IU6 -M#0``%,U@1D,UWR'X?/VR_&BVI$@````41(45+1BVN\T+Z*A&E7G=S``````` -M````L@```+(````0``#>K;H0``!D9",(`$4``*0``$``0!&U,<`!`A?``0+^ -M`?0!]`"08%.>B?(XCY"\'@IT-7SCT:2_`1`"``````````"(#0``-`````$` -M```!````*``!``$````@``$``(`+``&`#`X0@`$`!8`"``&``P`#@`0`!0T` -M`!!/16M28D=84G9M4$4-```4K\K7$VBA\"G0U?./1I+\$$`(````` -M`````1P*``#$M]N'X4E&AEMT*7(UA)]?Z:M`RW>TPRPR/2V-U^-O'ST7,9K7 -MCQQFQ`#^2/PP0G^@]QHR=9!Y7?/EL'O(\L(I'#51V6N1?)1J+6P-A6&T0Y@" -M-KJ[,_WPC+W%H'KSV>J_(W#3`3A4&A^4Q*T^3Q*2'^M#9[XHW-IVWO.#J=M? -MDHTX?/DS#]CDJG;?BC_E:$W:3AD]N9+!U'[+6UU.`,)4^&ASH2SO\CU.=2!# -MH'UY(FI*395>I?Z@4```4 -M;OX2\$KY#?O/L5UQN$&[G@```!1$]1?@/[.!^`^$+14XS/^L``````````!& -M`0``1@$``!```-ZMNA```&1D(P@`10`!.```0`!`$;2=P`$"%\`!`OX!]`'T -M`20!UYZ)\CB/D+P>"G0U?./1I+\$$`(``````````1P*``#$YYI?^#V[%WO* -M+,?[XKU\"YVFZ0UCMOA'6Y:C93#4^M&/)'3",1Q/"&7*"D0_<1SX#@"KRZDV -M\_XCB4O9XNS0"_O8-'[C&AG5O;G^G_N*#?4,"OA'?R><"WN68Q(H<1EONM3! -MS3=]U]MRZ(4UBM]&:I\KW&3X;LQ%M[B0:,/"]DTM1^J8+8CESE'6JEFCE,,$ -M?$W5P,^5=1K1AT@YX0J-9%/E]`MY&<%C?*Y*K\'5X#2B5OD6+FTGJ)^V299# -M*>H6%```%&Q^7ZRJ16$T%<6UJE;P`` -M`!1N_A+P2OD-^\^Q77&X0;N>``````````!R`0``<@$``!```&1D(Q```-ZM -MN@@`10`!9```0``_$;5QP`$"_L`!`A<1E!&4`5!RH0````">B?(XCY"\'@IT -M-7SCT:2_!1`"`0````````%$H"1@W`ZTW:4&'Z=!K*`IRTNLK:3J/^$DD/B4 -M>Q,F?M5`3=(?!HGW$/M)`\W8Z/'FXK6$!(9!7BL9!@QV=(^E7><\)R8EVE3F -M6`.O^:2F!(>LD7%71N]`LA?B!/!0\*H2"YOJ0]_W9#9DJYZ).M/.;+8A?L[O -M`J-'HV_0*'&&^P\8:$'I^"13SN]VT%5\8O8;P2VV=`+&9+4]'MH+/&:'PR!H -M4O#,GI+1=+*MRN"5.-8D&$16)"G0U?./1I+\%$`(!`````````2S" -M8Z5]+<^-M8Q9P&X;^%JN2^*NYC1"AZ%4J-PIMZM611WA:Z$*6IBWC.3.9037)L`[ADSH`K&0*^[6)>")$E3;"4;U="I",2*`1TP_=5+%B"II3>( -M'@``````````V@$``-H!```0``!D9",0``#>K;H(`$4``4YQ5SAO`10)\84&I?],R2.?5M -MZ/Y^Y"#*%+0.<9KX(/Z$'&M,-)/2I7U^,!G,*G!E_O.D;7F_;D^V#&&*(R.+ -MH;YSI'1@I8GV%+\'*6,1(8`8D(VUP[,(R?PQ7#,5WQY3[HT+IFF"3?.+;(*M -M_?C;JQ#]O'9522*ZO7>'TEDYLLA`*L$8(XJ$!T>_HYS?G=WR11E($-021FMS -MB[NXAJ^CQVGO87[B@^I6THHW-%Z8%PTH&BCO^.[@K_NS8RVTE7CE&MA]6C@> -MEDIDM&T^.41?F(\X$Z-5[547$HC='*\>8``"[9.IHT)+[,^LZ?_6(6I\L32# -MF-JM7U".L4?X/8=G*KFA<>THJ-622W,;J`IW2^MLBI?_O<"G0U?./1I+\($"`!BWZ)1P```5RM:&N4 -MQ1;W19+;77%JE,,H'8&F6ITJM=R5O>KL1%[]#E/LJ#&./WFJ`#,3C!H=I_'* -M34/)_E+)(`!A&W00*T\"9O9JX0N">$#'(ZL<$'\P=GHB.0:\AXT/!^^*%U.'5#'2IX:7/2KZ$%^3W;%R4[&2T>'?2(@FF -M#T/=+2O[?Q4.(\@Q;]3V=L5Q2XFG)^E)0J:1AX`J4%E3_Y]^6='!R-ENY%9# -M3!XD:5K?/V&.!&X#>I_$96Y;P_!5']070(D3N#$47!AZ^VCW-?I?JT2AL5YOWBO5[D!"OV)46(FK)9" -M$C40GNJ7*A,SE6%6A(4>KPE(-$)=L6=2VQLO>Y12N8QBH3V%(90.\5YL`R,O -M1@``````````8@```&(````0``!D9",0``#>K;H(`$4``%0``$``/Q&V@<`! -M`O[``0(7$901E`!`KQ<`````GHGR.(^0O!X*=#5\X]&DOP@0(`&+?HE'```` -M-"4[,88.:.R$%:1S6K/XK;H(`$4``*"JM```/Q%+@<`!`O[``0(7$901E`",``#TW`KE```` -M`?SD"<11-X_=FBX7J&]'/C[B>;BA23X"^A;(BA/H;8_\0'U,E@M&;+=R&*LY -MAF.NT6/*J.SL[UR2)+H^A6#5<38R;!FY\:AV_6ZV)FQ2! -M1T\L:`GPK6U?_?TVHSK[6(WSF?Q"XF5K/0U,A.Y+D\RP]G(``````````"H` -M```J````$```WJVZ$```9&0C"`8``0@`!@0``1```&1D(\`!`A<```````#` -M`0+^```````````J````*@```!```&1D(Q```-ZMN@@&``$(``8$``(0``#> -MK;K``0+^$```9&0CP`$"%P``````````B@$``(H!```0``#>K;H0``!D9",( -M`$4``7P``$``0!&T6<`!`A?``0+^$901E`%HRNX`````GHGR.(^0O!X*=#5\ -MX]&DOP@0(`&+?HE'```!7*UH:Y3%%O=%DMM=<6J4PR@=@:9:G2JUW)6]ZNQ$ -M7OT.4^RH,8X_>:H`,Q.,&AVG\B(Y!KR'C0\'[XIS!(%P&'QX74X=4,=*GAS%MDNE:?+;+?\O0S-Y -MI<]*OH07Y/=L7)3L9+1X=](B":8/0]TM*_M_%0XCR#%OU/9VQ7%+B:*]7N0$*_8E18B:LED(2-1">ZIB?(XCY"\ -M'@IT-7SCT:2_"!`@`8M^B4<````T)3LQA@YH[(05I'-:L_AR6CWGJ@DY)*0" -M``````````"N````K@```!```&1D(Q```-ZMN@@`10``H*JU```_$4N`P`$" -M_L`!`A<1E!&4`(P``/3<"N4````";5_]_3:C.OM8C?.9_$+B9;KU/R+D"U^- -MLGB)>"40ZCMW:+^A4%UI1Y)\.O4B]`44T(2XS\S=2[[[X.6A-PCDZP*3XFAD -M294>+W:M%%+\`)?XP#[:6]NHG>#;FFF-RMAA7D"KQ-&OX3Z5S'CBYC"740``````````*P```"L````0``!D9",0``#>K;H(`$4``!T` -M`$``/Q&VN,`!`O[``0(7$901E``)6)O_``````````"N````K@```!```&1D -M(Q```-ZMN@@`10``H*JV```_$4M_P`$"_L`!`A<1E!&4`(P``/3<"N4````# -M7D"KQ-&OX1F0#F$^I@1V5E>.`*!H=Z?(&*,.MS]E4H#P+2"^MMG?%@Y3*L%D'7$>LLOA,HUEB3IB;87,\:-0``````````B@$` -M`(H!```0``#>K;H0``!D9",(`$4``7P``$``0!&T6<`!`A?``0+^$901E`%H -MRNX`````GHGR.(^0O!X*=#5\X]&DOP@0(`&+?HE'```!7*UH:Y3%%O=%DMM= -M<6J4PR@=@:9:G2JUW)6]ZNQ$7OT.4^RH,8X_>:H`,Q.,&AVG\B(Y!KR'C0\'[XIS!(%P&'QX74X= -M4,=*GAS%MDNE:?+;+?\O0S-YI<]*OH07Y/=L7)3L9+1X=](B":8/0]TM*_M_ -M%0XCR#%OU/9VQ7%+B:*]7N0$*_8E18B:LED(2-1">ZIB?(XCY"\'@IT-7SCT:2_"!`@`8M^B4<````T)3LQA@YH -M[(05I'-:L_AR6CWGJ@DY)*0"``````````"N````K@```!```&1D(Q```-ZM -MN@@`10``H*JW```_$4M^P`$"_L`!`A<1E!&4`(P``/3<"N4````$"^MMG?%@ -MY3*L%D'7$>LLOHFXH,6B3<'M/]A_UT%X.MP;F`ZT@=\62*]W'/Y5@1,(8+`W -MTIZ(C;8G'VC<"+'VM:$K/=:VI -MD#:KB^/G$BB@:+=TSV\S)T5-E#UOBKZ"E5_,%P``````````*P```"L````0 -M``!D9",0``#>K;H(`$4``!T``$``/Q&VN,`!`O[``0(7$901E``)6)O_```` -M``````"N````K@```!```&1D(Q```-ZMN@@`10``H*JX```_$4M]P`$"_L`! -M`A<1E!&4`(P``/3<"N4````%D#:KB^/G$BB@:+=TSV\S)XZ>X,YAOI/W1_BS -M7:N%MO?3J+1\I=>O-36N1GBDD+HMR]D8U)G(OJ] -MMX!><$3'U0``````````K@```*X````0``!D9",0``#>K;H(`$4``*"JN0`` -M/Q%+?,`!`O[``0(7$901E`",``#TW`KE````!HUKYV'DUKD9XI)"Z+@>3:9638^IH_2\8CVE-BL2&43,3ZAY3'1@3Z:+\)XSXDSO]L,@? -MCOL6@]+&+X^#H(D.X>B;)<%[E4:S:#.D70:!#<8Q\QZFH`K;H(`$4``!T``$``/Q&VN,`!`O[` -M`0(7$901E``)6)O_``````````"N````K@```!```&1D(Q```-ZMN@@`10`` -MH*JZ```_$4M[P`$"_L`!`A<1E!&4`(P``/3<"N4````'$-QC'S'J:@!R,;Z< -M<"K%#ST!-8\O2;F**R/9Z%HAZ`2#KQIW*9'HI9C067ZK-G^XAL^O0I7Z/'H( -M<.`7P@/P'/E0@``````````B@$``(H!```0``#>K;H0 -M``!D9",(`$4``7P``$``0!&T6<`!`A?``0+^$901E`%HRNX`````GHGR.(^0 -MO!X*=#5\X]&DOP@0(`&+?HE'```!7*UH:Y3%%O=%DMM=<6J4PR@=@:9:G2JU -MW)6]ZNQ$7OT.4^RH,8X_>:H`,Q.,&AVG\B(Y!KR'C0\'[XIS!(%P&'QX74X=4,=*GAS%MDNE:?+; -M+?\O0S-YI<]*OH07Y/=L7)3L9+1X=](B":8/0]TM*_M_%0XCR#%OU/9VQ7%+ -MB:*]7N0$*_8E18B:LED(2-1">ZIGVJ+F -M#M/G_FP&NANM[W@`)Y9\\Z?F4SX%'E.^2BCP\9+!/`25PK%+G'U@$&1+=@%( -M#9RV^U"B8-5,EXJ0-QZTLOJ/L^F\).BC@++XQGOL8JC_`L;'=``````````` -M*@```"H````0``#>K;H0``!D9",(!@`!"``&!``!$```9&0CP`$"%P`````` -M`,`!`OX``````````"H````J````$```9&0C$```WJVZ"`8``0@`!@0``A`` -M`-ZMNL`!`OX0``!D9"/``0(7```````````K````*P```!```&1D(Q```-ZM -MN@@`10``'0``0``_$;:XP`$"_L`!`A<1E!&4``E8F_\``````````'H```!Z -M````$```WJVZ$```9&0C"`!%``!L``!``$`1M6G``0(7P`$"_A&4$90`6,G# -M`````)Z)\CB/D+P>"G0U?./1I+\($`4!`KW&3P```$S_T\^1(\?(IVCQDA]J -C20SF@.^<&]2'1D(_3FHHKW7PKQJ'!!.01QV>?]$9K_EN`N<` -` -end diff --git a/tests/lmp.out b/tests/lmp.out deleted file mode 100644 index ee37bca05923..000000000000 --- a/tests/lmp.out +++ /dev/null @@ -1,191 +0,0 @@ -IP (tos 0x0, ttl 1, id 44530, offset 0, flags [none], proto: UDP (17), length: 84) 10.0.12.1.49998 > 10.0.12.2.49998: - LMPv1, msg-type: Begin Verify, Flags: [Control Channel Down], length: 56 - Link ID Object (3), Class-Type: IPv4 Local (1) Flags: [non-negotiable], length: 8 - IPv4 Link ID: 1.0.0.0 (0x01000000) - Message ID Object (5), Class-Type: 1 (1) Flags: [non-negotiable], length: 8 - Message ID: 3 (0x00000003) - Link ID Object (3), Class-Type: IPv4 Remote (2) Flags: [non-negotiable], length: 8 - IPv4 Link ID: 1.0.0.0 (0x01000000) - Verify Begin Object (8), Class-Type: 1 (1) Flags: [negotiable], length: 24 - Flags: none - Verify Interval: 20 - Data links: 30 - Encoding type: Lambda (photonic) - Verify Tranport Mechanism: 32768 (0x8000) - Transmission Rate: 100.000 Mbps - Wavelength: 8 -IP (tos 0x0, ttl 1, id 44531, offset 0, flags [none], proto: UDP (17), length: 56) 10.0.12.1.49998 > 10.0.12.2.49998: - LMPv1, msg-type: Hello, Flags: [Control Channel Down], length: 28 - Control Channel ID Object (1), Class-Type: Local (1) Flags: [non-negotiable], length: 8 - Control Channel ID: 1 (0x00000001) - Hello Object (7), Class-Type: 1 (1) Flags: [non-negotiable], length: 12 - TxSeqNum: 50 - RcvSeqNum: 60 -IP (tos 0x0, ttl 1, id 44532, offset 0, flags [none], proto: UDP (17), length: 84) 10.0.12.1.49998 > 10.0.12.2.49998: - LMPv1, msg-type: Config NACK, Flags: [Control Channel Down], length: 56 - Control Channel ID Object (1), Class-Type: Local (1) Flags: [non-negotiable], length: 8 - Control Channel ID: 1 (0x00000001) - Node ID Object (2), Class-Type: Local (1) Flags: [non-negotiable], length: 8 - Node ID: 10.0.50.1 (0x0a003201) - Control Channel ID Object (1), Class-Type: Remote (2) Flags: [non-negotiable], length: 8 - Control Channel ID: 2 (0x00000002) - Message ID Object (5), Class-Type: 2 (2) Flags: [non-negotiable], length: 8 - Message ID Ack: 3 (0x00000003) - Node ID Object (2), Class-Type: Remote (2) Flags: [non-negotiable], length: 8 - Node ID: 10.0.50.2 (0x0a003202) - Configuration Object (6), Class-Type: 1 (1) Flags: [negotiable], length: 8 - Hello Interval: 5 - Hello Dead Interval: 15 -IP (tos 0x0, ttl 1, id 44533, offset 0, flags [none], proto: UDP (17), length: 76) 10.0.12.1.49998 > 10.0.12.2.49998: - LMPv1, msg-type: Config ACK, Flags: [Control Channel Down], length: 48 - Control Channel ID Object (1), Class-Type: Local (1) Flags: [non-negotiable], length: 8 - Control Channel ID: 1 (0x00000001) - Node ID Object (2), Class-Type: Local (1) Flags: [non-negotiable], length: 8 - Node ID: 10.0.50.1 (0x0a003201) - Control Channel ID Object (1), Class-Type: Remote (2) Flags: [non-negotiable], length: 8 - Control Channel ID: 2 (0x00000002) - Message ID Object (5), Class-Type: 2 (2) Flags: [non-negotiable], length: 8 - Message ID Ack: 3 (0x00000003) - Node ID Object (2), Class-Type: Remote (2) Flags: [non-negotiable], length: 8 - Node ID: 10.0.50.2 (0x0a003202) -IP (tos 0x0, ttl 1, id 44534, offset 0, flags [none], proto: UDP (17), length: 68) 10.0.12.1.49998 > 10.0.12.2.49998: - LMPv1, msg-type: Config, Flags: [Control Channel Down], length: 40 - Control Channel ID Object (1), Class-Type: Local (1) Flags: [non-negotiable], length: 8 - Control Channel ID: 1 (0x00000001) - Message ID Object (5), Class-Type: 1 (1) Flags: [non-negotiable], length: 8 - Message ID: 3 (0x00000003) - Node ID Object (2), Class-Type: Local (1) Flags: [non-negotiable], length: 8 - Node ID: 10.0.50.1 (0x0a003201) - Configuration Object (6), Class-Type: 1 (1) Flags: [negotiable], length: 8 - Hello Interval: 5 - Hello Dead Interval: 15 -IP (tos 0x0, ttl 1, id 44535, offset 0, flags [none], proto: UDP (17), length: 44) 10.0.12.1.49998 > 10.0.12.2.49998: - LMPv1, msg-type: Link Summary ACK, Flags: [Control Channel Down], length: 16 - Message ID Object (5), Class-Type: 2 (2) Flags: [non-negotiable], length: 8 - Message ID Ack: 1 (0x00000001) -IP (tos 0x0, ttl 1, id 44536, offset 0, flags [none], proto: UDP (17), length: 124) 10.0.12.1.49998 > 10.0.12.2.49998: - LMPv1, msg-type: Link Summary NACK, Flags: [Control Channel Down], length: 96 - Message ID Object (5), Class-Type: 2 (2) Flags: [non-negotiable], length: 8 - Message ID Ack: 1 (0x00000001) - Error Code Object (20), Class-Type: 2 (2) Flags: [non-negotiable], length: 8 - Error Code: - Unacceptable non-negotiable LINK_SUMMARY parameters, - Renegotiate LINK_SUMMARY parameters, - Invalid DATA-LINK Object, - Unknown TE-LINK Object c-type, - Unknown DATA-LINK Object c-type - Data Link Object (12), Class-Type: IPv4 (1) Flags: [non-negotiable], length: 36 - Flags: [none] - Local Interface ID: 192.168.1.1 (0xc0a80101) - Remote Interface ID: 192.168.1.2 (0xc0a80102) - Subobject, Type: Interface Switching Type (1), Length: 12 - Switching Type: Lambda-Switch Capable (150) - Encoding Type: Lambda (photonic) (8) - Min Reservable Bandwidth: 100.000 Mbps - Max Reservable Bandwidth: 100.000 Mbps - Subobject, Type: Wavelength (2), Length: 8 - Wavelength: 6 - Data Link Object (12), Class-Type: IPv4 (1) Flags: [non-negotiable], length: 36 - Flags: [none] - Local Interface ID: 10.1.1.1 (0x0a010101) - Remote Interface ID: 10.1.1.2 (0x0a010102) - Subobject, Type: Interface Switching Type (1), Length: 12 - Switching Type: Lambda-Switch Capable (150) - Encoding Type: ANSI/ETSI PDH (3) - Min Reservable Bandwidth: 1234736768.000 Mbps - Max Reservable Bandwidth: 1290693376.000 Mbps - Subobject, Type: Wavelength (2), Length: 8 - Wavelength: 353 -IP (tos 0x0, ttl 1, id 44537, offset 0, flags [none], proto: UDP (17), length: 68) 10.0.12.1.49998 > 10.0.12.2.49998: - LMPv1, msg-type: Begin Verify ACK, Flags: [Control Channel Down], length: 40 - Link ID Object (3), Class-Type: IPv4 Local (1) Flags: [non-negotiable], length: 8 - IPv4 Link ID: 1.0.0.0 (0x01000000) - Message ID Object (5), Class-Type: 2 (2) Flags: [non-negotiable], length: 8 - Message ID Ack: 1 (0x00000001) - Verify Begin ACK Object (9), Class-Type: 1 (1) Flags: [negotiable], length: 8 - Verify Dead Interval: 50 - Verify Transport Response: 100 - Verify ID Object (10), Class-Type: 1 (1) Flags: [non-negotiable], length: 8 - Verify ID: 5 -IP (tos 0x0, ttl 1, id 44538, offset 0, flags [none], proto: UDP (17), length: 60) 10.0.12.1.49998 > 10.0.12.2.49998: - LMPv1, msg-type: Begin Verify NACK, Flags: [Control Channel Down], length: 32 - Link ID Object (3), Class-Type: IPv4 Local (1) Flags: [non-negotiable], length: 8 - IPv4 Link ID: 10.0.0.0 (0x0a000000) - Message ID Object (5), Class-Type: 2 (2) Flags: [non-negotiable], length: 8 - Message ID Ack: 3 (0x00000003) - Error Code Object (20), Class-Type: 1 (1) Flags: [non-negotiable], length: 8 - Error Code: - Link Verification Procedure Not supported, - Unwilling to verify, - Unsupported verification transport mechanism -IP (tos 0x0, ttl 1, id 44539, offset 0, flags [none], proto: UDP (17), length: 52) 10.0.12.1.49998 > 10.0.12.2.49998: - LMPv1, msg-type: End Verify, Flags: [Control Channel Down], length: 24 - Message ID Object (5), Class-Type: 1 (1) Flags: [non-negotiable], length: 8 - Message ID: 3 (0x00000003) - Verify ID Object (10), Class-Type: 1 (1) Flags: [non-negotiable], length: 8 - Verify ID: 5 -IP (tos 0x0, ttl 1, id 44540, offset 0, flags [none], proto: UDP (17), length: 52) 10.0.12.1.49998 > 10.0.12.2.49998: - LMPv1, msg-type: End Verify ACK, Flags: [Control Channel Down], length: 24 - Message ID Object (5), Class-Type: 2 (2) Flags: [non-negotiable], length: 8 - Message ID Ack: 3 (0x00000003) - Verify ID Object (10), Class-Type: 1 (1) Flags: [non-negotiable], length: 8 - Verify ID: 5 -IP (tos 0x0, ttl 1, id 44541, offset 0, flags [none], proto: UDP (17), length: 52) 10.0.12.1.49998 > 10.0.12.2.49998: - LMPv1, msg-type: Test, Flags: [Control Channel Down], length: 24 - Interface ID Object (4), Class-Type: IPv4 Local (1) Flags: [non-negotiable], length: 8 - IPv4 Link ID: 1.0.0.0 (0x01000000) - Verify ID Object (10), Class-Type: 1 (1) Flags: [non-negotiable], length: 8 - Verify ID: 5 -IP (tos 0x0, ttl 1, id 44542, offset 0, flags [none], proto: UDP (17), length: 52) 10.0.12.1.49998 > 10.0.12.2.49998: - LMPv1, msg-type: Test Status Failure, Flags: [Control Channel Down], length: 24 - Message ID Object (5), Class-Type: 1 (1) Flags: [non-negotiable], length: 8 - Message ID: 1 (0x00000001) - Verify ID Object (10), Class-Type: 1 (1) Flags: [non-negotiable], length: 8 - Verify ID: 5 -IP (tos 0x0, ttl 1, id 44543, offset 0, flags [none], proto: UDP (17), length: 52) 10.0.12.1.49998 > 10.0.12.2.49998: - LMPv1, msg-type: Test Status ACK, Flags: [Control Channel Down], length: 24 - Message ID Object (5), Class-Type: 2 (2) Flags: [non-negotiable], length: 8 - Message ID Ack: 1 (0x00000001) - Verify ID Object (10), Class-Type: 1 (1) Flags: [non-negotiable], length: 8 - Verify ID: 5 -IP (tos 0x0, ttl 1, id 44544, offset 0, flags [none], proto: UDP (17), length: 44) 10.0.12.1.49998 > 10.0.12.2.49998: - LMPv1, msg-type: Channel Status ACK, Flags: [Control Channel Down], length: 16 - Message ID Object (5), Class-Type: 2 (2) Flags: [non-negotiable], length: 8 - Message ID Ack: 3 (0x00000003) -IP (tos 0x0, ttl 1, id 44545, offset 0, flags [none], proto: UDP (17), length: 64) 10.0.12.1.49998 > 10.0.12.2.49998: - LMPv1, msg-type: Channel Status Request, Flags: [Control Channel Down], length: 36 - Link ID Object (3), Class-Type: IPv4 Local (1) Flags: [non-negotiable], length: 8 - IPv4 Link ID: 1.0.0.0 (0x01000000) - Message ID Object (5), Class-Type: 1 (1) Flags: [non-negotiable], length: 8 - Message ID: 3 (0x00000003) - Channel Status Request Object (14), Class-Type: IPv4 (1) Flags: [non-negotiable], length: 12 - Interface ID: 2.0.0.0 (0x02000000) - Interface ID: 2.0.0.0 (0x02000000) -IP (tos 0x0, ttl 1, id 44546, offset 0, flags [none], proto: UDP (17), length: 72) 10.0.12.1.49998 > 10.0.12.2.49998: - LMPv1, msg-type: Channel Status, Flags: [Control Channel Down], length: 44 - Link ID Object (3), Class-Type: IPv4 Local (1) Flags: [non-negotiable], length: 8 - IPv4 Link ID: 1.0.0.0 (0x01000000) - Message ID Object (5), Class-Type: 1 (1) Flags: [non-negotiable], length: 8 - Message ID: 3 (0x00000003) - Channel Status Object (13), Class-Type: IPv4 (1) Flags: [non-negotiable], length: 20 - Interface ID: 1.0.0.0 (0x01000000) - Active: Allocated (1) - Direction: Transmit (1) - Channel Status: Signal Fail (3) - Interface ID: 1.0.0.0 (0x01000000) - Active: Allocated (1) - Direction: Receive (0) - Channel Status: Signal Degraded (2) -IP (tos 0x0, ttl 1, id 44547, offset 0, flags [none], proto: UDP (17), length: 64) 10.0.12.1.49998 > 10.0.12.2.49998: - LMPv1, msg-type: Channel Status Response, Flags: [Control Channel Down], length: 36 - Message ID Object (5), Class-Type: 2 (2) Flags: [non-negotiable], length: 8 - Message ID Ack: 3 (0x00000003) - Channel Status Object (13), Class-Type: IPv4 (1) Flags: [non-negotiable], length: 20 - Interface ID: 1.0.0.0 (0x01000000) - Active: Allocated (1) - Direction: Transmit (1) - Channel Status: Signal Degraded (2) - Interface ID: 1.0.0.0 (0x01000000) - Active: Allocated (1) - Direction: Transmit (1) - Channel Status: Signal Okay (1) diff --git a/tests/lmp.puu b/tests/lmp.puu deleted file mode 100644 index c14cd560c96c..000000000000 --- a/tests/lmp.puu +++ /dev/null @@ -1,42 +0,0 @@ -begin 644 lmp.pcap -MU,.RH0(`!````````````/__```!````I!J-0&;J``!B````8@`````%75SJ -MQ@`$=="&2@@`10``5*WR```!$=^D"@`,`0H`#`+#3L-.`$```!````4`.``` -M`0,`"`$````!!0`(`````P(#``@!````@0@`&````!0````>")*``$+(```` -M```(I!J-0#SQ``!&````1@`````%75SJQ@`$=="&2@@`10``.*WS```!$=^_ -M"@`,`0H`#`+#3L-.`"0``!````0`'````0$`"`````$!!P`,````,@```#RD -M&HU`@/(``&(```!B``````5=7.K&``1UT(9*"`!%``!4K?0```$1WZ(*``P! -M"@`,`L-.PTX`0```$````P`X```!`0`(`````0$"``@*`#(!`@$`"`````(" -M!0`(`````P("``@*`#("@08`"``%``^D&HU`?_,``%H```!:``````5=7.K& -M``1UT(9*"`!%``!,K?4```$1WZD*``P!"@`,`L-.PTX`.```$````@`P```! -M`0`(`````0$"``@*`#(!`@$`"`````("!0`(`````P("``@*`#("I!J-0'+T -M``!2````4@`````%75SJQ@`$=="&2@@`10``1*WV```!$=^P"@`,`0H`#`+# -M3L-.`#```!````$`*````0$`"`````$!!0`(`````P$"``@*`#(!@08`"``% -M``^D&HU`0_4``#H````Z``````5=7.K&``1UT(9*"`!%```LK?<```$1W\<* -M``P!"@`,`L-.PTX`&```$```#P`0```"!0`(`````:0:C4"E]P``B@```(H` -M````!5Ulmp.new -if diff lmp.new lmp.out -then - echo passed. -else - echo failed. -fi - - diff --git a/tests/mpls-ldp-hello.out b/tests/mpls-ldp-hello.out deleted file mode 100644 index fa621ca4c080..000000000000 --- a/tests/mpls-ldp-hello.out +++ /dev/null @@ -1,9 +0,0 @@ -IP (tos 0xc0, ttl 1, id 15579, offset 0, flags [none], proto: UDP (17), length: 70) 10.1.1.3.646 > 224.0.0.2.646: - LDP, Label-Space-ID: 10.1.0.2:0, pdu-length: 38 - Hello Message (0x0100), length: 28, Message ID: 0x00011970, Flags: [ignore if unknown] - Common Hello Parameters TLV (0x0400), length: 4, Flags: [ignore and don't forward if unknown] - Hold Time: 15s, Flags: [Link Hello] - IPv4 Transport Address TLV (0x0401), length: 4, Flags: [ignore and don't forward if unknown] - IPv4 Transport Address: 10.1.0.2 - Configuration Sequence Number TLV (0x0402), length: 4, Flags: [ignore and don't forward if unknown] - Sequence Number: 1 diff --git a/tests/mpls-ldp-hello.puu b/tests/mpls-ldp-hello.puu deleted file mode 100644 index b7f3b625b34e..000000000000 --- a/tests/mpls-ldp-hello.puu +++ /dev/null @@ -1,6 +0,0 @@ -begin 644 mpls-ldp-hello.pcap -MU,.RH0(`!````````````.H%```)````1UFZ/E2'#`!*````2@```/\#`"%% -MP`!&/-L```$1D08*`0$#X````@*&`H8`,M2>``$`)@H!``(```$``!P``1EP -8!```!``/```$`0`$"@$``@0"``0````! -` -end diff --git a/tests/mpls-ldp-hello.sh b/tests/mpls-ldp-hello.sh deleted file mode 100755 index b1a5b1941705..000000000000 --- a/tests/mpls-ldp-hello.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/sh - -uudecode mpls-ldp-hello.puu - -echo -n test mpls-ldp-hello ... -../tcpdump -t -n -v -r mpls-ldp-hello.pcap >mpls-ldp-hello.new -if diff mpls-ldp-hello.new mpls-ldp-hello.out -then - echo passed. -else - echo failed. -fi - - diff --git a/tests/ospf-gmpls.out b/tests/ospf-gmpls.out deleted file mode 100644 index 965affc2773a..000000000000 --- a/tests/ospf-gmpls.out +++ /dev/null @@ -1,83 +0,0 @@ -IP (tos 0xc0, ttl 1, id 4052, offset 0, flags [none], proto: OSPF (89), length: 172) 40.35.1.2 > 224.0.0.5: OSPFv2, LS-Update, length: 152 - Router-ID: 10.255.245.35, Backbone Area, Authentication Type: none (0), 1 LSA - LSA #1 - Advertising Router: 10.255.245.37, seq 0x80000002, age 9s, length: 104 - Area Local Opaque LSA (10), Opaque-Type: Traffic Engineering LSA (1), Opaque-ID: 8 - Options: [External] - Link TLV (2), length: 100 - Link Type subTLV (1), length: 1, Point-to-point (1) - Link ID subTLV (2), length: 4, 10.255.245.69 (0x0afff545) - Local Interface IP address subTLV (3), length: 4, 10.9.142.1 - Remote Interface IP address subTLV (4), length: 4, 10.9.142.2 - Traffic Engineering Metric subTLV (5), length: 4, Metric 63 - Maximum Bandwidth subTLV (6), length: 4, 622.080 Mbps - Maximum Reservable Bandwidth subTLV (7), length: 4, 622.080 Mbps - Unreserved Bandwidth subTLV (8), length: 32 - TE-Class 0: 622.080 Mbps - TE-Class 1: 622.080 Mbps - TE-Class 2: 622.080 Mbps - TE-Class 3: 622.080 Mbps - TE-Class 4: 622.080 Mbps - TE-Class 5: 622.080 Mbps - TE-Class 6: 622.080 Mbps - TE-Class 7: 622.080 Mbps - Administrative Group subTLV (9), length: 4, 0x00000000 -IP (tos 0xc0, ttl 1, id 4106, offset 0, flags [none], proto: OSPF (89), length: 172) 40.35.1.2 > 224.0.0.5: OSPFv2, LS-Update, length: 152 - Router-ID: 10.255.245.35, Backbone Area, Authentication Type: none (0), 1 LSA - LSA #1 - Advertising Router: 10.255.245.37, seq 0x80000002, age 9s, length: 104 - Area Local Opaque LSA (10), Opaque-Type: Traffic Engineering LSA (1), Opaque-ID: 9 - Options: [External] - Link TLV (2), length: 100 - Link Type subTLV (1), length: 1, Point-to-point (1) - Link ID subTLV (2), length: 4, 10.255.245.69 (0x0afff545) - Local Interface IP address subTLV (3), length: 4, 10.9.143.1 - Remote Interface IP address subTLV (4), length: 4, 10.9.143.2 - Traffic Engineering Metric subTLV (5), length: 4, Metric 63 - Maximum Bandwidth subTLV (6), length: 4, 622.080 Mbps - Maximum Reservable Bandwidth subTLV (7), length: 4, 622.080 Mbps - Unreserved Bandwidth subTLV (8), length: 32 - TE-Class 0: 622.080 Mbps - TE-Class 1: 622.080 Mbps - TE-Class 2: 622.080 Mbps - TE-Class 3: 622.080 Mbps - TE-Class 4: 622.080 Mbps - TE-Class 5: 622.080 Mbps - TE-Class 6: 622.080 Mbps - TE-Class 7: 622.080 Mbps - Administrative Group subTLV (9), length: 4, 0x00000000 -IP (tos 0xc0, ttl 1, id 4160, offset 0, flags [none], proto: OSPF (89), length: 212) 40.35.1.2 > 224.0.0.5: OSPFv2, LS-Update, length: 192 - Router-ID: 10.255.245.35, Backbone Area, Authentication Type: none (0), 1 LSA - LSA #1 - Advertising Router: 10.255.245.35, seq 0x80000003, age 3s, length: 144 - Area Local Opaque LSA (10), Opaque-Type: Traffic Engineering LSA (1), Opaque-ID: 3 - Options: [External] - Link TLV (2), length: 140 - Link Type subTLV (1), length: 1, Point-to-point (1) - Link ID subTLV (2), length: 4, 10.255.245.40 (0x0afff528) - Local Interface IP address subTLV (3), length: 4, 10.40.35.14 - Remote Interface IP address subTLV (4), length: 4, 10.40.35.13 - Traffic Engineering Metric subTLV (5), length: 4, Metric 1 - Maximum Bandwidth subTLV (6), length: 4, 100.000 Mbps - Maximum Reservable Bandwidth subTLV (7), length: 4, 100.000 Mbps - Unreserved Bandwidth subTLV (8), length: 32 - TE-Class 0: 0.000 Mbps - TE-Class 1: 0.000 Mbps - TE-Class 2: 0.000 Mbps - TE-Class 3: 0.000 Mbps - TE-Class 4: 0.000 Mbps - TE-Class 5: 0.000 Mbps - TE-Class 6: 0.000 Mbps - TE-Class 7: 0.000 Mbps - Interface Switching Capability subTLV (15), length: 44 - Interface Switching Capability: Packet-Switch Capable-1 - LSP Encoding: Ethernet V2/DIX - Max LSP Bandwidth: - priority level 0: 0.000 Mbps - priority level 1: 0.000 Mbps - priority level 2: 0.000 Mbps - priority level 3: 0.000 Mbps - priority level 4: 0.000 Mbps - priority level 5: 0.000 Mbps - priority level 6: 0.000 Mbps - priority level 7: 0.000 Mbps diff --git a/tests/ospf-gmpls.puu b/tests/ospf-gmpls.puu deleted file mode 100644 index 691e38e9f54e..000000000000 --- a/tests/ospf-gmpls.puu +++ /dev/null @@ -1,18 +0,0 @@ -begin 644 ospf-gmpls.pcap -MU,.RH0(`!````````````'81````````KME#X`?``"`&0``0`!`0`````"``0*__5%``,` -M!`H)C@$`!``$"@F.`@`%``0````_``8`!$R44,``!P`$3)10P``(`"!,E%#` -M3)10P$R44,!,E%#`3)10P$R44,!,E%#`3)10P``)``0`````Y-E ospf-gmpls.new -if diff ospf-gmpls.new ospf-gmpls.out -then - echo passed. -else - echo failed. -fi - - diff --git a/tests/print-A.out b/tests/print-A.out deleted file mode 100644 index 107ffcbb1d0f..000000000000 --- a/tests/print-A.out +++ /dev/null @@ -1,193 +0,0 @@ -23:57:35.938066 IP 127.0.0.1.55920 > 127.0.0.1.80: S 928549246:928549246(0) win 32767 -E..<.h@.@.!R.........p.P7X.~.........!....@.... -M........... -23:57:35.938122 IP 127.0.0.1.80 > 127.0.0.1.55920: S 930778609:930778609(0) ack 928549247 win 32767 -E..<..@.@.<..........P.p7z..7X......n.....@.... -M...M....... -23:57:35.938167 IP 127.0.0.1.55920 > 127.0.0.1.80: . ack 1 win 8192 -E..4.j@.@.!X.........p.P7X..7z.... .7...... -M...M... -23:57:35.939423 IP 127.0.0.1.55920 > 127.0.0.1.80: P 1:203(202) ack 1 win 8192 -E....l@.@. ..........p.P7X..7z.... ........ -M...M...GET / HTTP/1.1 -Host: localhost -User-Agent: ELinks/0.10.4-7-debian (textmode; Linux 2.6.11-1-686-smp i686; 132x56-2) -Accept: */* -Accept-Encoding: gzip -Accept-Language: en -Connection: Keep-Alive - - -23:57:35.940474 IP 127.0.0.1.80 > 127.0.0.1.55920: . ack 203 win 8192 -E..4..@.@............P.p7z..7X.I.. .7...... -M...M... -23:57:35.941232 IP 127.0.0.1.80 > 127.0.0.1.55920: P 1:5560(5559) ack 203 win 8192 -E.....@.@..%.........P.p7z..7X.I.. ........ -M...M...HTTP/1.1 200 OK -Date: Wed, 06 Jul 2005 03:57:35 GMT -Server: Apache/1.3.33 -Last-Modified: Sun, 15 Aug 2004 00:43:41 GMT -ETag: "6e80f0-148a-411eb1bd" -Accept-Ranges: bytes -Content-Length: 5258 -Keep-Alive: timeout=15, max=100 -Connection: Keep-Alive -Content-Type: text/html; charset=iso-8859-1 - - - - - - - Placeholder page - - - -

Placeholder page

-

If you are just browsing the web

- -

The owner of this web site has not put up any web pages yet. -Please come back later.

- -

Move along, nothing to see here... :-)

- -

If you are trying to locate the administrator of this machine

- -

If you want to report something about this host's behavior, please -contact the Internet Service Provider (ISP) involved directly.

- -

See the Network Abuse -Clearinghouse for how to do this.

- -

If you are the administrator of this machine

- -

The initial installation of Debian's -apache web server package was successful.

- -

You should replace this page with your own web pages as -soon as possible.

- -

Unless you changed its configuration, your new server is configured as follows: -

    -
  • -Configuration files can be found in /etc/apache.
  • - -
  • -The DocumentRoot, which is the directory under which all your -HTML files should exist, is set to /var/www.
  • - -
  • -CGI scripts are looked for in /usr/lib/cgi-bin, which is where -Debian packages will place their scripts.
  • - -
  • -Log files are placed in /var/log/apache, and will be rotated -weekly. The frequency of rotation can be easily changed by editing -/etc/logrotate.d/apache.
  • - -
  • -The default directory index is index.html, meaning that requests -for a directory /foo/bar/ will give the contents of the file /var/www/foo/bar/index.html -if it exists (assuming that /var/www is your DocumentRoot).
  • - -
  • -User directories are enabled, and user documents will be looked for -in the public_html directory of the users' homes. These dirs -should be under /home, and users will not be able to symlink -to files they don't own.
  • - -
-All the standard apache modules are available with this release and are -now managed with debconf. Type dpkg-reconfigure apache to -select which modules you want enabled. Many other modules are available -through the Debian package system with the names libapache-mod-*. -If you need to compile a module yourself, you will need to install the -apache-dev package. - -

More documentation on Apache can be found on: -

- -

You can also consult the list of World -Wide Web Frequently Asked Questions for information. - -

Let other people know about this server

- -Netcraft provides an interesting free -service for web site monitoring and statistic collection. -You can let them know about your server using their -interface. -Enabling the monitoring of your server will provide a better global overview -of who is using what and where, and it would give Debian a better -overview of the apache package usage. - -

About this page

- - - -

This is a placeholder page installed by the Debian -release of the apache Web server package. - -

This computer has installed the Debian GNU/Linux operating system, -but it has nothing to do with the Debian -Project. Please do not contact the Debian -Project about it.

- -

If you find a bug in this apache package, or in Apache itself, -please file a bug report on it. Instructions on doing this, and the -list of known bugs of this -package, can be found in the -Debian Bug Tracking System. - -

Thanks for using this package, and congratulations for your choice of -a Debian system!

- -
- -Debian - - -Apache - -
- - - - - - -23:57:35.941260 IP 127.0.0.1.55920 > 127.0.0.1.80: . ack 5560 win 12383 -E..4.n@.@.!T.........p.P7X.I7z....0_....... -M...M... -23:57:37.229575 IP 127.0.0.1.55920 > 127.0.0.1.80: F 203:203(0) ack 5560 win 12383 -E..4.p@.@.!R.........p.P7X.I7z....0_....... -M..!M... -23:57:37.230839 IP 127.0.0.1.80 > 127.0.0.1.55920: F 5560:5560(0) ack 204 win 8192 -E..4..@.@............P.p7z..7X.J.. ..5..... -M..#M..! -23:57:37.230900 IP 127.0.0.1.55920 > 127.0.0.1.80: . ack 5561 win 12383 -E..4.r@.@.!P.........p.P7X.J7z....0_....... -M..#M..# diff --git a/tests/print-AA.out b/tests/print-AA.out deleted file mode 100644 index 52c0a7751549..000000000000 --- a/tests/print-AA.out +++ /dev/null @@ -1,193 +0,0 @@ -23:57:35.938066 IP 127.0.0.1.55920 > 127.0.0.1.80: S 928549246:928549246(0) win 32767 -..............E..<.h@.@.!R.........p.P7X.~.........!....@.... -M........... -23:57:35.938122 IP 127.0.0.1.80 > 127.0.0.1.55920: S 930778609:930778609(0) ack 928549247 win 32767 -..............E..<..@.@.<..........P.p7z..7X......n.....@.... -M...M....... -23:57:35.938167 IP 127.0.0.1.55920 > 127.0.0.1.80: . ack 1 win 8192 -..............E..4.j@.@.!X.........p.P7X..7z.... .7...... -M...M... -23:57:35.939423 IP 127.0.0.1.55920 > 127.0.0.1.80: P 1:203(202) ack 1 win 8192 -..............E....l@.@. ..........p.P7X..7z.... ........ -M...M...GET / HTTP/1.1 -Host: localhost -User-Agent: ELinks/0.10.4-7-debian (textmode; Linux 2.6.11-1-686-smp i686; 132x56-2) -Accept: */* -Accept-Encoding: gzip -Accept-Language: en -Connection: Keep-Alive - - -23:57:35.940474 IP 127.0.0.1.80 > 127.0.0.1.55920: . ack 203 win 8192 -..............E..4..@.@............P.p7z..7X.I.. .7...... -M...M... -23:57:35.941232 IP 127.0.0.1.80 > 127.0.0.1.55920: P 1:5560(5559) ack 203 win 8192 -..............E.....@.@..%.........P.p7z..7X.I.. ........ -M...M...HTTP/1.1 200 OK -Date: Wed, 06 Jul 2005 03:57:35 GMT -Server: Apache/1.3.33 -Last-Modified: Sun, 15 Aug 2004 00:43:41 GMT -ETag: "6e80f0-148a-411eb1bd" -Accept-Ranges: bytes -Content-Length: 5258 -Keep-Alive: timeout=15, max=100 -Connection: Keep-Alive -Content-Type: text/html; charset=iso-8859-1 - - - - - - - Placeholder page - - - -

Placeholder page

-

If you are just browsing the web

- -

The owner of this web site has not put up any web pages yet. -Please come back later.

- -

Move along, nothing to see here... :-)

- -

If you are trying to locate the administrator of this machine

- -

If you want to report something about this host's behavior, please -contact the Internet Service Provider (ISP) involved directly.

- -

See the Network Abuse -Clearinghouse for how to do this.

- -

If you are the administrator of this machine

- -

The initial installation of Debian's -apache web server package was successful.

- -

You should replace this page with your own web pages as -soon as possible.

- -

Unless you changed its configuration, your new server is configured as follows: -

    -
  • -Configuration files can be found in /etc/apache.
  • - -
  • -The DocumentRoot, which is the directory under which all your -HTML files should exist, is set to /var/www.
  • - -
  • -CGI scripts are looked for in /usr/lib/cgi-bin, which is where -Debian packages will place their scripts.
  • - -
  • -Log files are placed in /var/log/apache, and will be rotated -weekly. The frequency of rotation can be easily changed by editing -/etc/logrotate.d/apache.
  • - -
  • -The default directory index is index.html, meaning that requests -for a directory /foo/bar/ will give the contents of the file /var/www/foo/bar/index.html -if it exists (assuming that /var/www is your DocumentRoot).
  • - -
  • -User directories are enabled, and user documents will be looked for -in the public_html directory of the users' homes. These dirs -should be under /home, and users will not be able to symlink -to files they don't own.
  • - -
-All the standard apache modules are available with this release and are -now managed with debconf. Type dpkg-reconfigure apache to -select which modules you want enabled. Many other modules are available -through the Debian package system with the names libapache-mod-*. -If you need to compile a module yourself, you will need to install the -apache-dev package. - -

More documentation on Apache can be found on: -

- -

You can also consult the list of World -Wide Web Frequently Asked Questions for information. - -

Let other people know about this server

- -Netcraft provides an interesting free -service for web site monitoring and statistic collection. -You can let them know about your server using their -interface. -Enabling the monitoring of your server will provide a better global overview -of who is using what and where, and it would give Debian a better -overview of the apache package usage. - -

About this page

- - - -

This is a placeholder page installed by the Debian -release of the apache Web server package. - -

This computer has installed the Debian GNU/Linux operating system, -but it has nothing to do with the Debian -Project. Please do not contact the Debian -Project about it.

- -

If you find a bug in this apache package, or in Apache itself, -please file a bug report on it. Instructions on doing this, and the -list of known bugs of this -package, can be found in the -Debian Bug Tracking System. - -

Thanks for using this package, and congratulations for your choice of -a Debian system!

- -
- -Debian - - -Apache - -
- - - - - - -23:57:35.941260 IP 127.0.0.1.55920 > 127.0.0.1.80: . ack 5560 win 12383 -..............E..4.n@.@.!T.........p.P7X.I7z....0_....... -M...M... -23:57:37.229575 IP 127.0.0.1.55920 > 127.0.0.1.80: F 203:203(0) ack 5560 win 12383 -..............E..4.p@.@.!R.........p.P7X.I7z....0_....... -M..!M... -23:57:37.230839 IP 127.0.0.1.80 > 127.0.0.1.55920: F 5560:5560(0) ack 204 win 8192 -..............E..4..@.@............P.p7z..7X.J.. ..5..... -M..#M..! -23:57:37.230900 IP 127.0.0.1.55920 > 127.0.0.1.80: . ack 5561 win 12383 -..............E..4.r@.@.!P.........p.P7X.J7z....0_....... -M..#M..# diff --git a/tests/print-X.out b/tests/print-X.out deleted file mode 100644 index 53e44edb6b1c..000000000000 --- a/tests/print-X.out +++ /dev/null @@ -1,409 +0,0 @@ -23:57:35.938066 IP 127.0.0.1.55920 > 127.0.0.1.80: S 928549246:928549246(0) win 32767 - 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........... -23:57:35.938122 IP 127.0.0.1.80 > 127.0.0.1.55920: S 930778609:930778609(0) ack 928549247 win 32767 - 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....... -23:57:35.938167 IP 127.0.0.1.55920 > 127.0.0.1.80: . ack 1 win 8192 - 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... -23:57:35.939423 IP 127.0.0.1.55920 > 127.0.0.1.80: P 1:203(202) ack 1 win 8192 - 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... - 0x0030: 4ddc 9216 4745 5420 2f20 4854 5450 2f31 M...GET./.HTTP/1 - 0x0040: 2e31 0d0a 486f 7374 3a20 6c6f 6361 6c68 .1..Host:.localh - 0x0050: 6f73 740d 0a55 7365 722d 4167 656e 743a ost..User-Agent: - 0x0060: 2045 4c69 6e6b 732f 302e 3130 2e34 2d37 .ELinks/0.10.4-7 - 0x0070: 2d64 6562 6961 6e20 2874 6578 746d 6f64 -debian.(textmod - 0x0080: 653b 204c 696e 7578 2032 2e36 2e31 312d e;.Linux.2.6.11- - 0x0090: 312d 3638 362d 736d 7020 6936 3836 3b20 1-686-smp.i686;. - 0x00a0: 3133 3278 3536 2d32 290d 0a41 6363 6570 132x56-2)..Accep - 0x00b0: 743a 202a 2f2a 0d0a 4163 6365 7074 2d45 t:.*/*..Accept-E - 0x00c0: 6e63 6f64 696e 673a 2067 7a69 700d 0a41 ncoding:.gzip..A - 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.... -23:57:35.940474 IP 127.0.0.1.80 > 127.0.0.1.55920: . ack 203 win 8192 - 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... -23:57:35.941232 IP 127.0.0.1.80 > 127.0.0.1.55920: P 1:5560(5559) ack 203 win 8192 - 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... - 0x0030: 4ddc 9217 4854 5450 2f31 2e31 2032 3030 M...HTTP/1.1.200 - 0x0040: 204f 4b0d 0a44 6174 653a 2057 6564 2c20 .OK..Date:.Wed,. - 0x0050: 3036 204a 756c 2032 3030 3520 3033 3a35 06.Jul.2005.03:5 - 0x0060: 373a 3335 2047 4d54 0d0a 5365 7276 6572 7:35.GMT..Server - 0x0070: 3a20 4170 6163 6865 2f31 2e33 2e33 330d :.Apache/1.3.33. - 0x0080: 0a4c 6173 742d 4d6f 6469 6669 6564 3a20 .Last-Modified:. - 0x0090: 5375 6e2c 2031 3520 4175 6720 3230 3034 Sun,.15.Aug.2004 - 0x00a0: 2030 303a 3433 3a34 3120 474d 540d 0a45 .00:43:41.GMT..E - 0x00b0: 5461 673a 2022 3665 3830 6630 2d31 3438 Tag:."6e80f0-148 - 0x00c0: 612d 3431 3165 6231 6264 220d 0a41 6363 a-411eb1bd"..Acc - 0x00d0: 6570 742d 5261 6e67 6573 3a20 6279 7465 ept-Ranges:.byte - 0x00e0: 730d 0a43 6f6e 7465 6e74 2d4c 656e 6774 s..Content-Lengt - 0x00f0: 683a 2035 3235 380d 0a4b 6565 702d 416c h:.5258..Keep-Al - 0x0100: 6976 653a 2074 696d 656f 7574 3d31 352c ive:.timeout=15, - 0x0110: 206d 6178 3d31 3030 0d0a 436f 6e6e 6563 .max=100..Connec - 0x0120: 7469 6f6e 3a20 4b65 6570 2d41 6c69 7665 tion:.Keep-Alive - 0x0130: 0d0a 436f 6e74 656e 742d 5479 7065 3a20 ..Content-Type:. - 0x0140: 7465 7874 2f68 746d 6c3b 2063 6861 7273 text/html;.chars - 0x0150: 6574 3d69 736f 2d38 3835 392d 310d 0a0d et=iso-8859-1... - 0x0160: 0a3c 2144 4f43 5459 5045 2048 544d 4c20 . - 0x01a0: 0a3c 4854 4d4c 3e0a 3c48 4541 443e 0a20 .... - 0x01b0: 2020 3c4d 4554 4120 4854 5450 2d45 5155 .......... - 0x0250: 3c54 4954 4c45 3e50 6c61 6365 686f 6c64 Placehold - 0x0260: 6572 2070 6167 653c 2f54 4954 4c45 3e0a er.page. - 0x0270: 3c2f 4845 4144 3e0a 3c42 4f44 5920 5445 ... - 0x02d0: 3c48 313e 506c 6163 6568 6f6c 6465 7220

Placeholder. - 0x02e0: 7061 6765 3c2f 4831 3e0a 3c48 323e 4966 page

.

If - 0x02f0: 2079 6f75 2061 7265 206a 7573 7420 6272 .you.are.just.br - 0x0300: 6f77 7369 6e67 2074 6865 2077 6562 3c2f owsing.the.web..

The.owne - 0x0320: 7220 6f66 2074 6869 7320 7765 6220 7369 r.of.this.web.si - 0x0330: 7465 2068 6173 206e 6f74 2070 7574 2075 te.has.not.put.u - 0x0340: 7020 616e 7920 7765 6220 7061 6765 7320 p.any.web.pages. - 0x0350: 7965 742e 0a50 6c65 6173 6520 636f 6d65 yet..Please.come - 0x0360: 2062 6163 6b20 6c61 7465 722e 3c2f 503e .back.later.

- 0x0370: 0a0a 3c50 3e3c 534d 414c 4c3e 3c43 4954 ..

Move.along,.no - 0x0390: 7468 696e 6720 746f 2073 6565 2068 6572 thing.to.see.her - 0x03a0: 652e 2e2e 3c2f 4349 5445 3e20 3a2d 293c e....:-)< - 0x03b0: 2f53 4d41 4c4c 3e3c 2f50 3e0a 0a3c 4832 /SMALL>

..

If.you.are.tryi - 0x03d0: 6e67 2074 6f20 6c6f 6361 7465 2074 6865 ng.to.locate.the - 0x03e0: 2061 646d 696e 6973 7472 6174 6f72 206f .administrator.o - 0x03f0: 6620 7468 6973 206d 6163 6869 6e65 3c2f f.this.machine..

If.you.w - 0x0410: 616e 7420 746f 2072 6570 6f72 7420 736f ant.to.report.so - 0x0420: 6d65 7468 696e 6720 6162 6f75 7420 7468 mething.about.th - 0x0430: 6973 2068 6f73 7427 7320 6265 6861 7669 is.host's.behavi - 0x0440: 6f72 2c20 706c 6561 7365 0a63 6f6e 7461 or,.please.conta - 0x0450: 6374 2074 6865 2049 6e74 6572 6e65 7420 ct.the.Internet. - 0x0460: 5365 7276 6963 6520 5072 6f76 6964 6572 Service.Provider - 0x0470: 2028 4953 5029 2069 6e76 6f6c 7665 6420 .(ISP).involved. - 0x0480: 6469 7265 6374 6c79 2e3c 2f50 3e0a 0a3c directly.

..< - 0x0490: 503e 5365 6520 7468 6520 3c41 2068 7265 P>See.the.Networ - 0x04c0: 6b20 4162 7573 650a 436c 6561 7269 6e67 k.Abuse.Clearing - 0x04d0: 686f 7573 653c 2f41 3e20 666f 7220 686f house.for.ho - 0x04e0: 7720 746f 2064 6f20 7468 6973 2e3c 2f50 w.to.do.this.

..

If.you.ar - 0x0500: 6520 7468 6520 6164 6d69 6e69 7374 7261 e.the.administra - 0x0510: 746f 7220 6f66 2074 6869 7320 6d61 6368 tor.of.this.mach - 0x0520: 696e 653c 2f48 323e 0a0a 3c50 3e54 6865 ine

..

The - 0x0530: 2069 6e69 7469 616c 2069 6e73 7461 6c6c .initial.install - 0x0540: 6174 696f 6e20 6f66 203c 4120 6872 6566 ation.of.Debian - 0x0570: 2773 0a61 7061 6368 653c 2f41 3e20 7765 's.apache.we - 0x0580: 6220 7365 7276 6572 2070 6163 6b61 6765 b.server.package - 0x0590: 2077 6173 2073 7563 6365 7373 6675 6c2e .was.successful. - 0x05a0: 3c2f 503e 0a0a 3c50 3e3c 5354 524f 4e47

..

You.should.repl - 0x05c0: 6163 6520 7468 6973 2070 6167 6520 7769 ace.this.page.wi - 0x05d0: 7468 2079 6f75 7220 6f77 6e20 7765 6220 th.your.own.web. - 0x05e0: 7061 6765 7320 6173 0a73 6f6f 6e20 6173 pages.as.soon.as - 0x05f0: 2070 6f73 7369 626c 652e 3c2f 5354 524f .possible.

..

Unle - 0x0610: 7373 2079 6f75 2063 6861 6e67 6564 2069 ss.you.changed.i - 0x0620: 7473 2063 6f6e 6669 6775 7261 7469 6f6e ts.configuration - 0x0630: 2c20 796f 7572 206e 6577 2073 6572 7665 ,.your.new.serve - 0x0640: 7220 6973 2063 6f6e 6669 6775 7265 6420 r.is.configured. - 0x0650: 6173 2066 6f6c 6c6f 7773 3a0a 3c55 4c3e as.follows:.

    - 0x0660: 0a3c 4c49 3e0a 436f 6e66 6967 7572 6174 .
  • .Configurat - 0x0670: 696f 6e20 6669 6c65 7320 6361 6e20 6265 ion.files.can.be - 0x0680: 2066 6f75 6e64 2069 6e20 3c54 543e 2f65 .found.in./e - 0x0690: 7463 2f61 7061 6368 653c 2f54 543e 2e3c tc/apache.< - 0x06a0: 2f4c 493e 0a0a 3c4c 493e 0a54 6865 203c /LI>..
  • .The.< - 0x06b0: 5454 3e44 6f63 756d 656e 7452 6f6f 743c TT>DocumentRoot< - 0x06c0: 2f54 543e 2c20 7768 6963 6820 6973 2074 /TT>,.which.is.t - 0x06d0: 6865 2064 6972 6563 746f 7279 2075 6e64 he.directory.und - 0x06e0: 6572 2077 6869 6368 2061 6c6c 2079 6f75 er.which.all.you - 0x06f0: 720a 4854 4d4c 2066 696c 6573 2073 686f r.HTML.files.sho - 0x0700: 756c 6420 6578 6973 742c 2069 7320 7365 uld.exist,.is.se - 0x0710: 7420 746f 203c 5454 3e2f 7661 722f 7777 t.to./var/ww - 0x0720: 773c 2f54 543e 2e3c 2f4c 493e 0a0a 3c4c w.
  • ...CGI.scripts.a - 0x0740: 7265 206c 6f6f 6b65 6420 666f 7220 696e re.looked.for.in - 0x0750: 203c 5454 3e2f 7573 722f 6c69 622f 6367 ./usr/lib/cg - 0x0760: 692d 6269 6e3c 2f54 543e 2c20 7768 6963 i-bin,.whic - 0x0770: 6820 6973 2077 6865 7265 0a44 6562 6961 h.is.where.Debia - 0x0780: 6e20 7061 636b 6167 6573 2077 696c 6c20 n.packages.will. - 0x0790: 706c 6163 6520 7468 6569 7220 7363 7269 place.their.scri - 0x07a0: 7074 732e 3c2f 4c49 3e0a 0a3c 4c49 3e0a pts...
  • . - 0x07b0: 4c6f 6720 6669 6c65 7320 6172 6520 706c Log.files.are.pl - 0x07c0: 6163 6564 2069 6e20 3c54 543e 2f76 6172 aced.in./var - 0x07d0: 2f6c 6f67 2f61 7061 6368 653c 2f54 543e /log/apache - 0x07e0: 2c20 616e 6420 7769 6c6c 2062 6520 726f ,.and.will.be.ro - 0x07f0: 7461 7465 640a 7765 656b 6c79 2e20 2054 tated.weekly...T - 0x0800: 6865 2066 7265 7175 656e 6379 206f 6620 he.frequency.of. - 0x0810: 726f 7461 7469 6f6e 2063 616e 2062 6520 rotation.can.be. - 0x0820: 6561 7369 6c79 2063 6861 6e67 6564 2062 easily.changed.b - 0x0830: 7920 6564 6974 696e 670a 3c54 543e 2f65 y.editing./e - 0x0840: 7463 2f6c 6f67 726f 7461 7465 2e64 2f61 tc/logrotate.d/a - 0x0850: 7061 6368 653c 2f54 543e 2e3c 2f4c 493e pache.
  • - 0x0860: 0a0a 3c4c 493e 0a54 6865 2064 6566 6175 ..
  • .The.defau - 0x0870: 6c74 2064 6972 6563 746f 7279 2069 6e64 lt.directory.ind - 0x0880: 6578 2069 7320 3c54 543e 696e 6465 782e ex.is.index. - 0x0890: 6874 6d6c 3c2f 5454 3e2c 206d 6561 6e69 html,.meani - 0x08a0: 6e67 2074 6861 7420 7265 7175 6573 7473 ng.that.requests - 0x08b0: 0a66 6f72 2061 2064 6972 6563 746f 7279 .for.a.directory - 0x08c0: 203c 5454 3e2f 666f 6f2f 6261 722f 3c2f ./foo/bar/.will.give.th - 0x08e0: 6520 636f 6e74 656e 7473 206f 6620 7468 e.contents.of.th - 0x08f0: 6520 6669 6c65 203c 5454 3e2f 7661 722f e.file./var/ - 0x0900: 7777 772f 666f 6f2f 6261 722f 696e 6465 www/foo/bar/inde - 0x0910: 782e 6874 6d6c 3c2f 5454 3e0a 6966 2069 x.html.if.i - 0x0920: 7420 6578 6973 7473 2028 6173 7375 6d69 t.exists.(assumi - 0x0930: 6e67 2074 6861 7420 3c54 543e 2f76 6172 ng.that./var - 0x0940: 2f77 7777 3c2f 5454 3e20 6973 2079 6f75 /www.is.you - 0x0950: 7220 3c54 543e 446f 6375 6d65 6e74 526f r.DocumentRo - 0x0960: 6f74 3c2f 5454 3e29 2e3c 2f4c 493e 0a0a ot).
  • .. - 0x0970: 3c4c 493e 0a55 7365 7220 6469 7265 6374
  • .User.direct - 0x0980: 6f72 6965 7320 6172 6520 656e 6162 6c65 ories.are.enable - 0x0990: 642c 2061 6e64 2075 7365 7220 646f 6375 d,.and.user.docu - 0x09a0: 6d65 6e74 7320 7769 6c6c 2062 6520 6c6f ments.will.be.lo - 0x09b0: 6f6b 6564 2066 6f72 0a69 6e20 7468 6520 oked.for.in.the. - 0x09c0: 3c54 543e 7075 626c 6963 5f68 746d 6c3c public_html< - 0x09d0: 2f54 543e 2064 6972 6563 746f 7279 206f /TT>.directory.o - 0x09e0: 6620 7468 6520 7573 6572 7327 2068 6f6d f.the.users'.hom - 0x09f0: 6573 2e20 2054 6865 7365 2064 6972 730a es...These.dirs. - 0x0a00: 7368 6f75 6c64 2062 6520 756e 6465 7220 should.be.under. - 0x0a10: 3c54 543e 2f68 6f6d 653c 2f54 543e 2c20 /home,. - 0x0a20: 616e 6420 7573 6572 7320 7769 6c6c 206e and.users.will.n - 0x0a30: 6f74 2062 6520 6162 6c65 2074 6f20 7379 ot.be.able.to.sy - 0x0a40: 6d6c 696e 6b0a 746f 2066 696c 6573 2074 mlink.to.files.t - 0x0a50: 6865 7920 646f 6e27 7420 6f77 6e2e 3c2f hey.don't.own...
.All.t - 0x0a70: 6865 2073 7461 6e64 6172 6420 6170 6163 he.standard.apac - 0x0a80: 6865 206d 6f64 756c 6573 2061 7265 2061 he.modules.are.a - 0x0a90: 7661 696c 6162 6c65 2077 6974 6820 7468 vailable.with.th - 0x0aa0: 6973 2072 656c 6561 7365 2061 6e64 2061 is.release.and.a - 0x0ab0: 7265 0a6e 6f77 206d 616e 6167 6564 2077 re.now.managed.w - 0x0ac0: 6974 6820 6465 6263 6f6e 662e 2020 5479 ith.debconf...Ty - 0x0ad0: 7065 203c 5454 3e64 706b 672d 7265 636f pe.dpkg-reco - 0x0ae0: 6e66 6967 7572 6520 6170 6163 6865 3c2f nfigure.apache.to.select.wh - 0x0b00: 6963 6820 6d6f 6475 6c65 7320 796f 7520 ich.modules.you. - 0x0b10: 7761 6e74 2065 6e61 626c 6564 2e20 204d want.enabled...M - 0x0b20: 616e 7920 6f74 6865 7220 6d6f 6475 6c65 any.other.module - 0x0b30: 7320 6172 6520 6176 6169 6c61 626c 650a s.are.available. - 0x0b40: 7468 726f 7567 6820 7468 6520 4465 6269 through.the.Debi - 0x0b50: 616e 2070 6163 6b61 6765 2073 7973 7465 an.package.syste - 0x0b60: 6d20 7769 7468 2074 6865 206e 616d 6573 m.with.the.names - 0x0b70: 203c 5454 3e6c 6962 6170 6163 6865 2d6d .libapache-m - 0x0b80: 6f64 2d2a 3c2f 5454 3e2e 0a49 6620 796f od-*..If.yo - 0x0b90: 7520 6e65 6564 2074 6f20 636f 6d70 696c u.need.to.compil - 0x0ba0: 6520 6120 6d6f 6475 6c65 2079 6f75 7273 e.a.module.yours - 0x0bb0: 656c 662c 2079 6f75 2077 696c 6c20 6e65 elf,.you.will.ne - 0x0bc0: 6564 2074 6f20 696e 7374 616c 6c20 7468 ed.to.install.th - 0x0bd0: 650a 3c54 543e 6170 6163 6865 2d64 6576 e.apache-dev - 0x0be0: 3c2f 5454 3e20 7061 636b 6167 652e 0a0a .package... - 0x0bf0: 3c50 3e4d 6f72 6520 646f 6375 6d65 6e74

More.document - 0x0c00: 6174 696f 6e20 6f6e 2041 7061 6368 6520 ation.on.Apache. - 0x0c10: 6361 6e20 6265 2066 6f75 6e64 206f 6e3a can.be.found.on: - 0x0c20: 0a3c 554c 3e0a 3c4c 493e 0a54 6865 203c .

    .
  • .The.< - 0x0c30: 4120 4852 4546 3d22 2f64 6f63 2f61 7061 A.HREF="/doc/apa - 0x0c40: 6368 652d 646f 632f 6d61 6e75 616c 2f22 che-doc/manual/" - 0x0c50: 3e41 7061 6368 6520 646f 6375 6d65 6e74 >Apache.document - 0x0c60: 6174 696f 6e3c 2f41 3e20 7374 6f72 6564 ation.stored - 0x0c70: 206f 6e20 796f 7572 2073 6572 7665 722e .on.your.server. - 0x0c80: 3c2f 4c49 3e0a 0a3c 4c49 3e0a 5468 6520
  • ..
  • .The. - 0x0c90: 3c41 2048 5245 463d 2268 7474 703a 2f2f Apache.Project< - 0x0cc0: 2f41 3e20 686f 6d65 2073 6974 652e 3c2f /A>.home.site...
  • .The.Apache-SSL.home.site.
  • ..
  • .The.mo - 0x0d50: 6420 7065 726c 3c2f 413e 2068 6f6d 6520 d.perl.home. - 0x0d60: 7369 7465 2e3c 2f4c 493e 0a0a 3c4c 493e site.
  • ..
  • - 0x0d70: 0a54 6865 203c 4120 4852 4546 3d22 6874 .The.Apache - 0x0da0: 5765 656b 3c2f 413e 206e 6577 736c 6574 Week.newslet - 0x0db0: 7465 722e 3c2f 4c49 3e0a 0a3c 4c49 3e0a ter.
  • ..
  • . - 0x0dc0: 5468 6520 3c41 2048 5245 463d 2268 7474 The.Debian. - 0x0df0: 5072 6f6a 6563 740a 446f 6375 6d65 6e74 Project.Document - 0x0e00: 6174 696f 6e3c 2f41 3e20 7768 6963 6820 ation.which. - 0x0e10: 636f 6e74 6169 6e73 2048 4f57 544f 732c contains.HOWTOs, - 0x0e20: 2046 4151 732c 2061 6e64 2073 6f66 7477 .FAQs,.and.softw - 0x0e30: 6172 6520 7570 6461 7465 732e 3c2f 4c49 are.updates.
  • .
..

You. - 0x0e50: 6361 6e20 616c 736f 2063 6f6e 7375 6c74 can.also.consult - 0x0e60: 2074 6865 206c 6973 7420 6f66 203c 4120 .the.list.of.World.Wide.We - 0x0ea0: 6220 4672 6571 7565 6e74 6c79 2041 736b b.Frequently.Ask - 0x0eb0: 6564 2051 7565 7374 696f 6e73 3c2f 413e ed.Questions - 0x0ec0: 2066 6f72 2069 6e66 6f72 6d61 7469 6f6e .for.information - 0x0ed0: 2e0a 0a3c 4832 3e4c 6574 206f 7468 6572 ...

Let.other - 0x0ee0: 2070 656f 706c 6520 6b6e 6f77 2061 626f .people.know.abo - 0x0ef0: 7574 2074 6869 7320 7365 7276 6572 3c2f ut.this.server..Netcraft - 0x0f30: 2070 726f 7669 6465 7320 616e 2069 6e74 .provides.an.int - 0x0f40: 6572 6573 7469 6e67 2066 7265 650a 7365 eresting.free.se - 0x0f50: 7276 6963 6520 666f 7220 7765 6220 7369 rvice.for.web.si - 0x0f60: 7465 206d 6f6e 6974 6f72 696e 6720 616e te.monitoring.an - 0x0f70: 6420 7374 6174 6973 7469 6320 636f 6c6c d.statistic.coll - 0x0f80: 6563 7469 6f6e 2e0a 596f 7520 6361 6e20 ection..You.can. - 0x0f90: 6c65 7420 7468 656d 206b 6e6f 7720 6162 let.them.know.ab - 0x0fa0: 6f75 7420 796f 7572 2073 6572 7665 7220 out.your.server. - 0x0fb0: 7573 696e 6720 7468 6569 720a 3c41 2048 using.their.interface. - 0x0ff0: 0a45 6e61 626c 696e 6720 7468 6520 6d6f .Enabling.the.mo - 0x1000: 6e69 746f 7269 6e67 206f 6620 796f 7572 nitoring.of.your - 0x1010: 2073 6572 7665 7220 7769 6c6c 2070 726f .server.will.pro - 0x1020: 7669 6465 2061 2062 6574 7465 7220 676c vide.a.better.gl - 0x1030: 6f62 616c 206f 7665 7276 6965 770a 6f66 obal.overview.of - 0x1040: 2077 686f 2069 7320 7573 696e 6720 7768 .who.is.using.wh - 0x1050: 6174 2061 6e64 2077 6865 7265 2c20 616e at.and.where,.an - 0x1060: 6420 6974 2077 6f75 6c64 2067 6976 6520 d.it.would.give. - 0x1070: 4465 6269 616e 2061 2062 6574 7465 720a Debian.a.better. - 0x1080: 6f76 6572 7669 6577 206f 6620 7468 6520 overview.of.the. - 0x1090: 6170 6163 6865 2070 6163 6b61 6765 2075 apache.package.u - 0x10a0: 7361 6765 2e0a 0a3c 4832 3e41 626f 7574 sage...

About - 0x10b0: 2074 6869 7320 7061 6765 3c2f 4832 3e0a .this.page

. - 0x10c0: 0a3c 494d 4720 414c 4947 4e3d 2272 6967 ...

- 0x1110: 5468 6973 2069 7320 6120 706c 6163 6568 This.is.a.placeh - 0x1120: 6f6c 6465 7220 7061 6765 2069 6e73 7461 older.page.insta - 0x1130: 6c6c 6564 2062 7920 7468 6520 3c41 0a48 lled.by.the.Deb - 0x1160: 6961 6e3c 2f41 3e0a 7265 6c65 6173 6520 ian.release. - 0x1170: 6f66 2074 6865 2061 7061 6368 6520 5765 of.the.apache.We - 0x1180: 6220 7365 7276 6572 2070 6163 6b61 6765 b.server.package - 0x1190: 2e0a 0a3c 503e 5468 6973 2063 6f6d 7075 ...

This.compu - 0x11a0: 7465 7220 6861 7320 696e 7374 616c 6c65 ter.has.installe - 0x11b0: 6420 7468 6520 4465 6269 616e 2047 4e55 d.the.Debian.GNU - 0x11c0: 2f4c 696e 7578 206f 7065 7261 7469 6e67 /Linux.operating - 0x11d0: 2073 7973 7465 6d2c 0a62 7574 2069 7420 .system,.but.it. - 0x11e0: 6861 7320 3c73 7472 6f6e 673e 6e6f 7468 has.noth - 0x11f0: 696e 6720 746f 2064 6f20 7769 7468 2074 ing.to.do.with.t - 0x1200: 6865 2044 6562 6961 6e0a 5072 6f6a 6563 he.Debian.Projec - 0x1210: 743c 2f73 7472 6f6e 673e 2e20 506c 6561 t..Plea - 0x1220: 7365 2064 6f20 3c73 7472 6f6e 673e 6e6f se.do.no - 0x1230: 743c 2f73 7472 6f6e 673e 2063 6f6e 7461 t.conta - 0x1240: 6374 2074 6865 2044 6562 6961 6e0a 5072 ct.the.Debian.Pr - 0x1250: 6f6a 6563 7420 6162 6f75 7420 6974 2e3c oject.about.it.< - 0x1260: 2f50 3e0a 0a3c 503e 4966 2079 6f75 2066 /P>..

If.you.f - 0x1270: 696e 6420 6120 6275 6720 696e 2074 6869 ind.a.bug.in.thi - 0x1280: 7320 6170 6163 6865 2070 6163 6b61 6765 s.apache.package - 0x1290: 2c20 6f72 2069 6e20 4170 6163 6865 2069 ,.or.in.Apache.i - 0x12a0: 7473 656c 662c 0a70 6c65 6173 6520 6669 tself,.please.fi - 0x12b0: 6c65 2061 2062 7567 2072 6570 6f72 7420 le.a.bug.report. - 0x12c0: 6f6e 2069 742e 2020 496e 7374 7275 6374 on.it...Instruct - 0x12d0: 696f 6e73 206f 6e20 646f 696e 6720 7468 ions.on.doing.th - 0x12e0: 6973 2c20 616e 6420 7468 650a 6c69 7374 is,.and.the.list - 0x12f0: 206f 6620 3c41 2048 5245 463d 2268 7474 .of. - 0x1320: 6b6e 6f77 6e20 6275 6773 3c2f 413e 206f known.bugs.o - 0x1330: 6620 7468 6973 0a70 6163 6b61 6765 2c20 f.this.package,. - 0x1340: 6361 6e20 6265 2066 6f75 6e64 2069 6e20 can.be.found.in. - 0x1350: 7468 6520 0a3c 4120 4852 4546 3d22 6874 the..Debian.Bug.T - 0x1390: 7261 636b 696e 6720 5379 7374 656d 3c2f racking.System...

Thanks.f - 0x13b0: 6f72 2075 7369 6e67 2074 6869 7320 7061 or.using.this.pa - 0x13c0: 636b 6167 652c 2061 6e64 2063 6f6e 6772 ckage,.and.congr - 0x13d0: 6174 756c 6174 696f 6e73 2066 6f72 2079 atulations.for.y - 0x13e0: 6f75 7220 6368 6f69 6365 206f 660a 6120 our.choice.of.a. - 0x13f0: 4465 6269 616e 2073 7973 7465 6d21 3c2f Debian.system!...........< - 0x1520: 212d 2d0a 2020 5468 6973 2070 6167 6520 !--...This.page. - 0x1530: 7761 7320 696e 6974 6961 6c6c 7920 6372 was.initially.cr - 0x1540: 6561 7465 6420 6279 204a 6f68 6e69 6520 eated.by.Johnie. - 0x1550: 496e 6772 616d 2028 6874 7470 3a2f 2f6e Ingram.(http://n - 0x1560: 6574 676f 642e 6e65 742f 290a 2020 4974 etgod.net/)...It - 0x1570: 2077 6173 206c 6174 6572 2065 6469 7465 .was.later.edite - 0x1580: 6420 6279 204d 6174 7468 6577 2057 696c d.by.Matthew.Wil - 0x1590: 636f 7820 616e 6420 4a6f 7369 7020 526f cox.and.Josip.Ro - 0x15a0: 6469 6e2e 0a20 204c 6173 7420 6d6f 6469 din....Last.modi - 0x15b0: 6669 6564 3a20 2444 6174 653a 2032 3030 fied:.$Date:.200 - 0x15c0: 342f 3036 2f32 3020 3135 3a33 333a 3537 4/06/20.15:33:57 - 0x15d0: 2024 2e0a 2020 2d2d 3e0a 0a3c 2f42 4f44 .$....-->.... -23:57:35.941260 IP 127.0.0.1.55920 > 127.0.0.1.80: . ack 5560 win 12383 - 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... -23:57:37.229575 IP 127.0.0.1.55920 > 127.0.0.1.80: F 203:203(0) ack 5560 win 12383 - 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... -23:57:37.230839 IP 127.0.0.1.80 > 127.0.0.1.55920: F 5560:5560(0) ack 204 win 8192 - 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..! -23:57:37.230900 IP 127.0.0.1.55920 > 127.0.0.1.80: . ack 5561 win 12383 - 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..# - 0x0030: 4ddc 9723 M..# diff --git a/tests/print-XX.out b/tests/print-XX.out deleted file mode 100644 index 6921a017a04a..000000000000 --- a/tests/print-XX.out +++ /dev/null @@ -1,419 +0,0 @@ -23:57:35.938066 IP 127.0.0.1.55920 > 127.0.0.1.80: S 928549246:928549246(0) win 32767 - 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 .......... -23:57:35.938122 IP 127.0.0.1.80 > 127.0.0.1.55920: S 930778609:930778609(0) ack 928549247 win 32767 - 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....... -23:57:35.938167 IP 127.0.0.1.55920 > 127.0.0.1.80: . ack 1 win 8192 - 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 .. -23:57:35.939423 IP 127.0.0.1.55920 > 127.0.0.1.80: P 1:203(202) ack 1 win 8192 - 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.... - 0x0030: 2000 fef2 0000 0101 080a 4ddc 9217 4ddc ..........M...M. - 0x0040: 9216 4745 5420 2f20 4854 5450 2f31 2e31 ..GET./.HTTP/1.1 - 0x0050: 0d0a 486f 7374 3a20 6c6f 6361 6c68 6f73 ..Host:.localhos - 0x0060: 740d 0a55 7365 722d 4167 656e 743a 2045 t..User-Agent:.E - 0x0070: 4c69 6e6b 732f 302e 3130 2e34 2d37 2d64 Links/0.10.4-7-d - 0x0080: 6562 6961 6e20 2874 6578 746d 6f64 653b ebian.(textmode; - 0x0090: 204c 696e 7578 2032 2e36 2e31 312d 312d .Linux.2.6.11-1- - 0x00a0: 3638 362d 736d 7020 6936 3836 3b20 3133 686-smp.i686;.13 - 0x00b0: 3278 3536 2d32 290d 0a41 6363 6570 743a 2x56-2)..Accept: - 0x00c0: 202a 2f2a 0d0a 4163 6365 7074 2d45 6e63 .*/*..Accept-Enc - 0x00d0: 6f64 696e 673a 2067 7a69 700d 0a41 6363 oding:.gzip..Acc - 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.... -23:57:35.940474 IP 127.0.0.1.80 > 127.0.0.1.55920: . ack 203 win 8192 - 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 .. -23:57:35.941232 IP 127.0.0.1.80 > 127.0.0.1.55920: P 1:5560(5559) ack 203 win 8192 - 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.. - 0x0030: 2000 13e0 0000 0101 080a 4ddc 9219 4ddc ..........M...M. - 0x0040: 9217 4854 5450 2f31 2e31 2032 3030 204f ..HTTP/1.1.200.O - 0x0050: 4b0d 0a44 6174 653a 2057 6564 2c20 3036 K..Date:.Wed,.06 - 0x0060: 204a 756c 2032 3030 3520 3033 3a35 373a .Jul.2005.03:57: - 0x0070: 3335 2047 4d54 0d0a 5365 7276 6572 3a20 35.GMT..Server:. - 0x0080: 4170 6163 6865 2f31 2e33 2e33 330d 0a4c Apache/1.3.33..L - 0x0090: 6173 742d 4d6f 6469 6669 6564 3a20 5375 ast-Modified:.Su - 0x00a0: 6e2c 2031 3520 4175 6720 3230 3034 2030 n,.15.Aug.2004.0 - 0x00b0: 303a 3433 3a34 3120 474d 540d 0a45 5461 0:43:41.GMT..ETa - 0x00c0: 673a 2022 3665 3830 6630 2d31 3438 612d g:."6e80f0-148a- - 0x00d0: 3431 3165 6231 6264 220d 0a41 6363 6570 411eb1bd"..Accep - 0x00e0: 742d 5261 6e67 6573 3a20 6279 7465 730d t-Ranges:.bytes. - 0x00f0: 0a43 6f6e 7465 6e74 2d4c 656e 6774 683a .Content-Length: - 0x0100: 2035 3235 380d 0a4b 6565 702d 416c 6976 .5258..Keep-Aliv - 0x0110: 653a 2074 696d 656f 7574 3d31 352c 206d e:.timeout=15,.m - 0x0120: 6178 3d31 3030 0d0a 436f 6e6e 6563 7469 ax=100..Connecti - 0x0130: 6f6e 3a20 4b65 6570 2d41 6c69 7665 0d0a on:.Keep-Alive.. - 0x0140: 436f 6e74 656e 742d 5479 7065 3a20 7465 Content-Type:.te - 0x0150: 7874 2f68 746d 6c3b 2063 6861 7273 6574 xt/html;.charset - 0x0160: 3d69 736f 2d38 3835 392d 310d 0a0d 0a3c =iso-8859-1....< - 0x0170: 2144 4f43 5459 5045 2048 544d 4c20 5055 !DOCTYPE.HTML.PU - 0x0180: 424c 4943 2022 2d2f 2f57 3343 2f2f 4454 BLIC."-//W3C//DT - 0x0190: 4420 4854 4d4c 2034 2e30 3120 5472 616e D.HTML.4.01.Tran - 0x01a0: 7369 7469 6f6e 616c 2f2f 454e 223e 0a3c sitional//EN">.< - 0x01b0: 4854 4d4c 3e0a 3c48 4541 443e 0a20 2020 HTML>..... - 0x01c0: 3c4d 4554 4120 4854 5450 2d45 5155 4956 ........Placeholder - 0x0270: 2070 6167 653c 2f54 4954 4c45 3e0a 3c2f .page....Placeholder.pa - 0x02f0: 6765 3c2f 4831 3e0a 3c48 323e 4966 2079 ge

.

If.y - 0x0300: 6f75 2061 7265 206a 7573 7420 6272 6f77 ou.are.just.brow - 0x0310: 7369 6e67 2074 6865 2077 6562 3c2f 6832 sing.the.web

..

The.owner. - 0x0330: 6f66 2074 6869 7320 7765 6220 7369 7465 of.this.web.site - 0x0340: 2068 6173 206e 6f74 2070 7574 2075 7020 .has.not.put.up. - 0x0350: 616e 7920 7765 6220 7061 6765 7320 7965 any.web.pages.ye - 0x0360: 742e 0a50 6c65 6173 6520 636f 6d65 2062 t..Please.come.b - 0x0370: 6163 6b20 6c61 7465 722e 3c2f 503e 0a0a ack.later.

.. - 0x0380: 3c50 3e3c 534d 414c 4c3e 3c43 4954 453e

- 0x0390: 4d6f 7665 2061 6c6f 6e67 2c20 6e6f 7468 Move.along,.noth - 0x03a0: 696e 6720 746f 2073 6565 2068 6572 652e ing.to.see.here. - 0x03b0: 2e2e 3c2f 4349 5445 3e20 3a2d 293c 2f53 ...:-)

..

I - 0x03d0: 6620 796f 7520 6172 6520 7472 7969 6e67 f.you.are.trying - 0x03e0: 2074 6f20 6c6f 6361 7465 2074 6865 2061 .to.locate.the.a - 0x03f0: 646d 696e 6973 7472 6174 6f72 206f 6620 dministrator.of. - 0x0400: 7468 6973 206d 6163 6869 6e65 3c2f 4832 this.machine

..

If.you.wan - 0x0420: 7420 746f 2072 6570 6f72 7420 736f 6d65 t.to.report.some - 0x0430: 7468 696e 6720 6162 6f75 7420 7468 6973 thing.about.this - 0x0440: 2068 6f73 7427 7320 6265 6861 7669 6f72 .host's.behavior - 0x0450: 2c20 706c 6561 7365 0a63 6f6e 7461 6374 ,.please.contact - 0x0460: 2074 6865 2049 6e74 6572 6e65 7420 5365 .the.Internet.Se - 0x0470: 7276 6963 6520 5072 6f76 6964 6572 2028 rvice.Provider.( - 0x0480: 4953 5029 2069 6e76 6f6c 7665 6420 6469 ISP).involved.di - 0x0490: 7265 6374 6c79 2e3c 2f50 3e0a 0a3c 503e rectly.

..

- 0x04a0: 5365 6520 7468 6520 3c41 2068 7265 663d See.the.Network. - 0x04d0: 4162 7573 650a 436c 6561 7269 6e67 686f Abuse.Clearingho - 0x04e0: 7573 653c 2f41 3e20 666f 7220 686f 7720 use.for.how. - 0x04f0: 746f 2064 6f20 7468 6973 2e3c 2f50 3e0a to.do.this.

. - 0x0500: 0a3c 4832 3e49 6620 796f 7520 6172 6520 .

If.you.are. - 0x0510: 7468 6520 6164 6d69 6e69 7374 7261 746f the.administrato - 0x0520: 7220 6f66 2074 6869 7320 6d61 6368 696e r.of.this.machin - 0x0530: 653c 2f48 323e 0a0a 3c50 3e54 6865 2069 e

..

The.i - 0x0540: 6e69 7469 616c 2069 6e73 7461 6c6c 6174 nitial.installat - 0x0550: 696f 6e20 6f66 203c 4120 6872 6566 3d22 ion.of.Debian's - 0x0580: 0a61 7061 6368 653c 2f41 3e20 7765 6220 .apache.web. - 0x0590: 7365 7276 6572 2070 6163 6b61 6765 2077 server.package.w - 0x05a0: 6173 2073 7563 6365 7373 6675 6c2e 3c2f as.successful...

Y - 0x05c0: 6f75 2073 686f 756c 6420 7265 706c 6163 ou.should.replac - 0x05d0: 6520 7468 6973 2070 6167 6520 7769 7468 e.this.page.with - 0x05e0: 2079 6f75 7220 6f77 6e20 7765 6220 7061 .your.own.web.pa - 0x05f0: 6765 7320 6173 0a73 6f6f 6e20 6173 2070 ges.as.soon.as.p - 0x0600: 6f73 7369 626c 652e 3c2f 5354 524f 4e47 ossible.

..

Unless - 0x0620: 2079 6f75 2063 6861 6e67 6564 2069 7473 .you.changed.its - 0x0630: 2063 6f6e 6669 6775 7261 7469 6f6e 2c20 .configuration,. - 0x0640: 796f 7572 206e 6577 2073 6572 7665 7220 your.new.server. - 0x0650: 6973 2063 6f6e 6669 6775 7265 6420 6173 is.configured.as - 0x0660: 2066 6f6c 6c6f 7773 3a0a 3c55 4c3e 0a3c .follows:.

    .< - 0x0670: 4c49 3e0a 436f 6e66 6967 7572 6174 696f LI>.Configuratio - 0x0680: 6e20 6669 6c65 7320 6361 6e20 6265 2066 n.files.can.be.f - 0x0690: 6f75 6e64 2069 6e20 3c54 543e 2f65 7463 ound.in./etc - 0x06a0: 2f61 7061 6368 653c 2f54 543e 2e3c 2f4c /apache...
  • .The.DocumentRoot,.which.is.the - 0x06e0: 2064 6972 6563 746f 7279 2075 6e64 6572 .directory.under - 0x06f0: 2077 6869 6368 2061 6c6c 2079 6f75 720a .which.all.your. - 0x0700: 4854 4d4c 2066 696c 6573 2073 686f 756c HTML.files.shoul - 0x0710: 6420 6578 6973 742c 2069 7320 7365 7420 d.exist,.is.set. - 0x0720: 746f 203c 5454 3e2f 7661 722f 7777 773c to./var/www< - 0x0730: 2f54 543e 2e3c 2f4c 493e 0a0a 3c4c 493e /TT>.
  • ..
  • - 0x0740: 0a43 4749 2073 6372 6970 7473 2061 7265 .CGI.scripts.are - 0x0750: 206c 6f6f 6b65 6420 666f 7220 696e 203c .looked.for.in.< - 0x0760: 5454 3e2f 7573 722f 6c69 622f 6367 692d TT>/usr/lib/cgi- - 0x0770: 6269 6e3c 2f54 543e 2c20 7768 6963 6820 bin,.which. - 0x0780: 6973 2077 6865 7265 0a44 6562 6961 6e20 is.where.Debian. - 0x0790: 7061 636b 6167 6573 2077 696c 6c20 706c packages.will.pl - 0x07a0: 6163 6520 7468 6569 7220 7363 7269 7074 ace.their.script - 0x07b0: 732e 3c2f 4c49 3e0a 0a3c 4c49 3e0a 4c6f s.
  • ..
  • .Lo - 0x07c0: 6720 6669 6c65 7320 6172 6520 706c 6163 g.files.are.plac - 0x07d0: 6564 2069 6e20 3c54 543e 2f76 6172 2f6c ed.in./var/l - 0x07e0: 6f67 2f61 7061 6368 653c 2f54 543e 2c20 og/apache,. - 0x07f0: 616e 6420 7769 6c6c 2062 6520 726f 7461 and.will.be.rota - 0x0800: 7465 640a 7765 656b 6c79 2e20 2054 6865 ted.weekly...The - 0x0810: 2066 7265 7175 656e 6379 206f 6620 726f .frequency.of.ro - 0x0820: 7461 7469 6f6e 2063 616e 2062 6520 6561 tation.can.be.ea - 0x0830: 7369 6c79 2063 6861 6e67 6564 2062 7920 sily.changed.by. - 0x0840: 6564 6974 696e 670a 3c54 543e 2f65 7463 editing./etc - 0x0850: 2f6c 6f67 726f 7461 7465 2e64 2f61 7061 /logrotate.d/apa - 0x0860: 6368 653c 2f54 543e 2e3c 2f4c 493e 0a0a che.
  • .. - 0x0870: 3c4c 493e 0a54 6865 2064 6566 6175 6c74
  • .The.default - 0x0880: 2064 6972 6563 746f 7279 2069 6e64 6578 .directory.index - 0x0890: 2069 7320 3c54 543e 696e 6465 782e 6874 .is.index.ht - 0x08a0: 6d6c 3c2f 5454 3e2c 206d 6561 6e69 6e67 ml,.meaning - 0x08b0: 2074 6861 7420 7265 7175 6573 7473 0a66 .that.requests.f - 0x08c0: 6f72 2061 2064 6972 6563 746f 7279 203c or.a.directory.< - 0x08d0: 5454 3e2f 666f 6f2f 6261 722f 3c2f 5454 TT>/foo/bar/.will.give.the. - 0x08f0: 636f 6e74 656e 7473 206f 6620 7468 6520 contents.of.the. - 0x0900: 6669 6c65 203c 5454 3e2f 7661 722f 7777 file./var/ww - 0x0910: 772f 666f 6f2f 6261 722f 696e 6465 782e w/foo/bar/index. - 0x0920: 6874 6d6c 3c2f 5454 3e0a 6966 2069 7420 html.if.it. - 0x0930: 6578 6973 7473 2028 6173 7375 6d69 6e67 exists.(assuming - 0x0940: 2074 6861 7420 3c54 543e 2f76 6172 2f77 .that./var/w - 0x0950: 7777 3c2f 5454 3e20 6973 2079 6f75 7220 ww.is.your. - 0x0960: 3c54 543e 446f 6375 6d65 6e74 526f 6f74 DocumentRoot - 0x0970: 3c2f 5454 3e29 2e3c 2f4c 493e 0a0a 3c4c ).
  • ...User.director - 0x0990: 6965 7320 6172 6520 656e 6162 6c65 642c ies.are.enabled, - 0x09a0: 2061 6e64 2075 7365 7220 646f 6375 6d65 .and.user.docume - 0x09b0: 6e74 7320 7769 6c6c 2062 6520 6c6f 6f6b nts.will.be.look - 0x09c0: 6564 2066 6f72 0a69 6e20 7468 6520 3c54 ed.for.in.the.public_html.directory.of. - 0x09f0: 7468 6520 7573 6572 7327 2068 6f6d 6573 the.users'.homes - 0x0a00: 2e20 2054 6865 7365 2064 6972 730a 7368 ...These.dirs.sh - 0x0a10: 6f75 6c64 2062 6520 756e 6465 7220 3c54 ould.be.under./home
    ,.an - 0x0a30: 6420 7573 6572 7320 7769 6c6c 206e 6f74 d.users.will.not - 0x0a40: 2062 6520 6162 6c65 2074 6f20 7379 6d6c .be.able.to.syml - 0x0a50: 696e 6b0a 746f 2066 696c 6573 2074 6865 ink.to.files.the - 0x0a60: 7920 646f 6e27 7420 6f77 6e2e 3c2f 4c49 y.don't.own...
.All.the - 0x0a80: 2073 7461 6e64 6172 6420 6170 6163 6865 .standard.apache - 0x0a90: 206d 6f64 756c 6573 2061 7265 2061 7661 .modules.are.ava - 0x0aa0: 696c 6162 6c65 2077 6974 6820 7468 6973 ilable.with.this - 0x0ab0: 2072 656c 6561 7365 2061 6e64 2061 7265 .release.and.are - 0x0ac0: 0a6e 6f77 206d 616e 6167 6564 2077 6974 .now.managed.wit - 0x0ad0: 6820 6465 6263 6f6e 662e 2020 5479 7065 h.debconf...Type - 0x0ae0: 203c 5454 3e64 706b 672d 7265 636f 6e66 .dpkg-reconf - 0x0af0: 6967 7572 6520 6170 6163 6865 3c2f 5454 igure.apache.to.select.whic - 0x0b10: 6820 6d6f 6475 6c65 7320 796f 7520 7761 h.modules.you.wa - 0x0b20: 6e74 2065 6e61 626c 6564 2e20 204d 616e nt.enabled...Man - 0x0b30: 7920 6f74 6865 7220 6d6f 6475 6c65 7320 y.other.modules. - 0x0b40: 6172 6520 6176 6169 6c61 626c 650a 7468 are.available.th - 0x0b50: 726f 7567 6820 7468 6520 4465 6269 616e rough.the.Debian - 0x0b60: 2070 6163 6b61 6765 2073 7973 7465 6d20 .package.system. - 0x0b70: 7769 7468 2074 6865 206e 616d 6573 203c with.the.names.< - 0x0b80: 5454 3e6c 6962 6170 6163 6865 2d6d 6f64 TT>libapache-mod - 0x0b90: 2d2a 3c2f 5454 3e2e 0a49 6620 796f 7520 -*
..If.you. - 0x0ba0: 6e65 6564 2074 6f20 636f 6d70 696c 6520 need.to.compile. - 0x0bb0: 6120 6d6f 6475 6c65 2079 6f75 7273 656c a.module.yoursel - 0x0bc0: 662c 2079 6f75 2077 696c 6c20 6e65 6564 f,.you.will.need - 0x0bd0: 2074 6f20 696e 7374 616c 6c20 7468 650a .to.install.the. - 0x0be0: 3c54 543e 6170 6163 6865 2d64 6576 3c2f apache-dev.package...

More.documentat - 0x0c10: 696f 6e20 6f6e 2041 7061 6368 6520 6361 ion.on.Apache.ca - 0x0c20: 6e20 6265 2066 6f75 6e64 206f 6e3a 0a3c n.be.found.on:.< - 0x0c30: 554c 3e0a 3c4c 493e 0a54 6865 203c 4120 UL>.

  • .The.A - 0x0c60: 7061 6368 6520 646f 6375 6d65 6e74 6174 pache.documentat - 0x0c70: 696f 6e3c 2f41 3e20 7374 6f72 6564 206f ion.stored.o - 0x0c80: 6e20 796f 7572 2073 6572 7665 722e 3c2f n.your.server...
  • .The.A - 0x0cc0: 7061 6368 6520 5072 6f6a 6563 743c 2f41 pache.Project.home.site.
  • ..
  • .The.Apache-SSL. - 0x0d20: 686f 6d65 2073 6974 652e 3c2f 4c49 3e0a home.site.
  • . - 0x0d30: 0a3c 4c49 3e0a 5468 6520 3c41 2048 5245 .
  • .The.mod. - 0x0d60: 7065 726c 3c2f 413e 2068 6f6d 6520 7369 perl.home.si - 0x0d70: 7465 2e3c 2f4c 493e 0a0a 3c4c 493e 0a54 te.
  • ..
  • .T - 0x0d80: 6865 203c 4120 4852 4546 3d22 6874 7470 he.ApacheWe - 0x0db0: 656b 3c2f 413e 206e 6577 736c 6574 7465 ek.newslette - 0x0dc0: 722e 3c2f 4c49 3e0a 0a3c 4c49 3e0a 5468 r.
  • ..
  • .Th - 0x0dd0: 6520 3c41 2048 5245 463d 2268 7474 703a e.Debian.Pr - 0x0e00: 6f6a 6563 740a 446f 6375 6d65 6e74 6174 oject.Documentat - 0x0e10: 696f 6e3c 2f41 3e20 7768 6963 6820 636f ion.which.co - 0x0e20: 6e74 6169 6e73 2048 4f57 544f 732c 2046 ntains.HOWTOs,.F - 0x0e30: 4151 732c 2061 6e64 2073 6f66 7477 6172 AQs,.and.softwar - 0x0e40: 6520 7570 6461 7465 732e 3c2f 4c49 3e0a e.updates.
  • . - 0x0e50: 3c2f 554c 3e0a 0a3c 503e 596f 7520 6361 ..

    You.ca - 0x0e60: 6e20 616c 736f 2063 6f6e 7375 6c74 2074 n.also.consult.t - 0x0e70: 6865 206c 6973 7420 6f66 203c 4120 4852 he.list.of.World.Wide.Web. - 0x0eb0: 4672 6571 7565 6e74 6c79 2041 736b 6564 Frequently.Asked - 0x0ec0: 2051 7565 7374 696f 6e73 3c2f 413e 2066 .Questions.f - 0x0ed0: 6f72 2069 6e66 6f72 6d61 7469 6f6e 2e0a or.information.. - 0x0ee0: 0a3c 4832 3e4c 6574 206f 7468 6572 2070 .

    Let.other.p - 0x0ef0: 656f 706c 6520 6b6e 6f77 2061 626f 7574 eople.know.about - 0x0f00: 2074 6869 7320 7365 7276 6572 3c2f 4832 .this.server

    ..Netcraft.p - 0x0f40: 726f 7669 6465 7320 616e 2069 6e74 6572 rovides.an.inter - 0x0f50: 6573 7469 6e67 2066 7265 650a 7365 7276 esting.free.serv - 0x0f60: 6963 6520 666f 7220 7765 6220 7369 7465 ice.for.web.site - 0x0f70: 206d 6f6e 6974 6f72 696e 6720 616e 6420 .monitoring.and. - 0x0f80: 7374 6174 6973 7469 6320 636f 6c6c 6563 statistic.collec - 0x0f90: 7469 6f6e 2e0a 596f 7520 6361 6e20 6c65 tion..You.can.le - 0x0fa0: 7420 7468 656d 206b 6e6f 7720 6162 6f75 t.them.know.abou - 0x0fb0: 7420 796f 7572 2073 6572 7665 7220 7573 t.your.server.us - 0x0fc0: 696e 6720 7468 6569 720a 3c41 2048 5245 ing.their. - 0x0ff0: 696e 7465 7266 6163 653c 2f41 3e2e 0a45 interface..E - 0x1000: 6e61 626c 696e 6720 7468 6520 6d6f 6e69 nabling.the.moni - 0x1010: 746f 7269 6e67 206f 6620 796f 7572 2073 toring.of.your.s - 0x1020: 6572 7665 7220 7769 6c6c 2070 726f 7669 erver.will.provi - 0x1030: 6465 2061 2062 6574 7465 7220 676c 6f62 de.a.better.glob - 0x1040: 616c 206f 7665 7276 6965 770a 6f66 2077 al.overview.of.w - 0x1050: 686f 2069 7320 7573 696e 6720 7768 6174 ho.is.using.what - 0x1060: 2061 6e64 2077 6865 7265 2c20 616e 6420 .and.where,.and. - 0x1070: 6974 2077 6f75 6c64 2067 6976 6520 4465 it.would.give.De - 0x1080: 6269 616e 2061 2062 6574 7465 720a 6f76 bian.a.better.ov - 0x1090: 6572 7669 6577 206f 6620 7468 6520 6170 erview.of.the.ap - 0x10a0: 6163 6865 2070 6163 6b61 6765 2075 7361 ache.package.usa - 0x10b0: 6765 2e0a 0a3c 4832 3e41 626f 7574 2074 ge...

    About.t - 0x10c0: 6869 7320 7061 6765 3c2f 4832 3e0a 0a3c his.page

    ..< - 0x10d0: 494d 4720 414c 4947 4e3d 2272 6967 6874 IMG.ALIGN="right - 0x10e0: 2220 414c 543d 2222 2048 4549 4748 543d ".ALT="".HEIGHT= - 0x10f0: 2232 3437 2220 5749 4454 483d 2232 3738 "247".WIDTH="278 - 0x1100: 2220 5352 433d 2269 636f 6e73 2f6a 6865 ".SRC="icons/jhe - 0x1110: 3036 312e 706e 6722 3e0a 0a3c 503e 5468 061.png">..

    Th - 0x1120: 6973 2069 7320 6120 706c 6163 6568 6f6c is.is.a.placehol - 0x1130: 6465 7220 7061 6765 2069 6e73 7461 6c6c der.page.install - 0x1140: 6564 2062 7920 7468 6520 3c41 0a48 5245 ed.by.the.Debia - 0x1170: 6e3c 2f41 3e0a 7265 6c65 6173 6520 6f66 n.release.of - 0x1180: 2074 6865 2061 7061 6368 6520 5765 6220 .the.apache.Web. - 0x1190: 7365 7276 6572 2070 6163 6b61 6765 2e0a server.package.. - 0x11a0: 0a3c 503e 5468 6973 2063 6f6d 7075 7465 .

    This.compute - 0x11b0: 7220 6861 7320 696e 7374 616c 6c65 6420 r.has.installed. - 0x11c0: 7468 6520 4465 6269 616e 2047 4e55 2f4c the.Debian.GNU/L - 0x11d0: 696e 7578 206f 7065 7261 7469 6e67 2073 inux.operating.s - 0x11e0: 7973 7465 6d2c 0a62 7574 2069 7420 6861 ystem,.but.it.ha - 0x11f0: 7320 3c73 7472 6f6e 673e 6e6f 7468 696e s.nothin - 0x1200: 6720 746f 2064 6f20 7769 7468 2074 6865 g.to.do.with.the - 0x1210: 2044 6562 6961 6e0a 5072 6f6a 6563 743c .Debian.Project< - 0x1220: 2f73 7472 6f6e 673e 2e20 506c 6561 7365 /strong>..Please - 0x1230: 2064 6f20 3c73 7472 6f6e 673e 6e6f 743c .do.not< - 0x1240: 2f73 7472 6f6e 673e 2063 6f6e 7461 6374 /strong>.contact - 0x1250: 2074 6865 2044 6562 6961 6e0a 5072 6f6a .the.Debian.Proj - 0x1260: 6563 7420 6162 6f75 7420 6974 2e3c 2f50 ect.about.it.

    ..

    If.you.fin - 0x1280: 6420 6120 6275 6720 696e 2074 6869 7320 d.a.bug.in.this. - 0x1290: 6170 6163 6865 2070 6163 6b61 6765 2c20 apache.package,. - 0x12a0: 6f72 2069 6e20 4170 6163 6865 2069 7473 or.in.Apache.its - 0x12b0: 656c 662c 0a70 6c65 6173 6520 6669 6c65 elf,.please.file - 0x12c0: 2061 2062 7567 2072 6570 6f72 7420 6f6e .a.bug.report.on - 0x12d0: 2069 742e 2020 496e 7374 7275 6374 696f .it...Instructio - 0x12e0: 6e73 206f 6e20 646f 696e 6720 7468 6973 ns.on.doing.this - 0x12f0: 2c20 616e 6420 7468 650a 6c69 7374 206f ,.and.the.list.o - 0x1300: 6620 3c41 2048 5245 463d 2268 7474 703a f.kn - 0x1330: 6f77 6e20 6275 6773 3c2f 413e 206f 6620 own.bugs.of. - 0x1340: 7468 6973 0a70 6163 6b61 6765 2c20 6361 this.package,.ca - 0x1350: 6e20 6265 2066 6f75 6e64 2069 6e20 7468 n.be.found.in.th - 0x1360: 6520 0a3c 4120 4852 4546 3d22 6874 7470 e..Debian.Bug.Tra - 0x13a0: 636b 696e 6720 5379 7374 656d 3c2f 413e cking.System - 0x13b0: 2e0a 0a3c 503e 5468 616e 6b73 2066 6f72 ...

    Thanks.for - 0x13c0: 2075 7369 6e67 2074 6869 7320 7061 636b .using.this.pack - 0x13d0: 6167 652c 2061 6e64 2063 6f6e 6772 6174 age,.and.congrat - 0x13e0: 756c 6174 696f 6e73 2066 6f72 2079 6f75 ulations.for.you - 0x13f0: 7220 6368 6f69 6365 206f 660a 6120 4465 r.choice.of.a.De - 0x1400: 6269 616e 2073 7973 7465 6d21 3c2f 503e bian.system!

    - 0x1410: 0a0a 3c44 4956 2061 6c69 676e 3d22 6365 ........ - 0x1520: 3c2f 613e 0a3c 2f44 4956 3e0a 0a3c 212d ..... - 0x15f0: 0a3c 2f48 544d 4c3e 0a .. -23:57:35.941260 IP 127.0.0.1.55920 > 127.0.0.1.80: . ack 5560 win 12383 - 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 .. -23:57:37.229575 IP 127.0.0.1.55920 > 127.0.0.1.80: F 203:203(0) ack 5560 win 12383 - 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 .. -23:57:37.230839 IP 127.0.0.1.80 > 127.0.0.1.55920: F 5560:5560(0) ack 204 win 8192 - 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 .! -23:57:37.230900 IP 127.0.0.1.55920 > 127.0.0.1.80: . ack 5561 win 12383 - 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.... - 0x0030: 305f 06d4 0000 0101 080a 4ddc 9723 4ddc 0_........M..#M. - 0x0040: 9723 .# diff --git a/tests/print-capX.out b/tests/print-capX.out deleted file mode 100644 index 53e44edb6b1c..000000000000 --- a/tests/print-capX.out +++ /dev/null @@ -1,409 +0,0 @@ -23:57:35.938066 IP 127.0.0.1.55920 > 127.0.0.1.80: S 928549246:928549246(0) win 32767 - 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........... -23:57:35.938122 IP 127.0.0.1.80 > 127.0.0.1.55920: S 930778609:930778609(0) ack 928549247 win 32767 - 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....... -23:57:35.938167 IP 127.0.0.1.55920 > 127.0.0.1.80: . ack 1 win 8192 - 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... -23:57:35.939423 IP 127.0.0.1.55920 > 127.0.0.1.80: P 1:203(202) ack 1 win 8192 - 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... - 0x0030: 4ddc 9216 4745 5420 2f20 4854 5450 2f31 M...GET./.HTTP/1 - 0x0040: 2e31 0d0a 486f 7374 3a20 6c6f 6361 6c68 .1..Host:.localh - 0x0050: 6f73 740d 0a55 7365 722d 4167 656e 743a ost..User-Agent: - 0x0060: 2045 4c69 6e6b 732f 302e 3130 2e34 2d37 .ELinks/0.10.4-7 - 0x0070: 2d64 6562 6961 6e20 2874 6578 746d 6f64 -debian.(textmod - 0x0080: 653b 204c 696e 7578 2032 2e36 2e31 312d e;.Linux.2.6.11- - 0x0090: 312d 3638 362d 736d 7020 6936 3836 3b20 1-686-smp.i686;. - 0x00a0: 3133 3278 3536 2d32 290d 0a41 6363 6570 132x56-2)..Accep - 0x00b0: 743a 202a 2f2a 0d0a 4163 6365 7074 2d45 t:.*/*..Accept-E - 0x00c0: 6e63 6f64 696e 673a 2067 7a69 700d 0a41 ncoding:.gzip..A - 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.... -23:57:35.940474 IP 127.0.0.1.80 > 127.0.0.1.55920: . ack 203 win 8192 - 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... -23:57:35.941232 IP 127.0.0.1.80 > 127.0.0.1.55920: P 1:5560(5559) ack 203 win 8192 - 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... - 0x0030: 4ddc 9217 4854 5450 2f31 2e31 2032 3030 M...HTTP/1.1.200 - 0x0040: 204f 4b0d 0a44 6174 653a 2057 6564 2c20 .OK..Date:.Wed,. - 0x0050: 3036 204a 756c 2032 3030 3520 3033 3a35 06.Jul.2005.03:5 - 0x0060: 373a 3335 2047 4d54 0d0a 5365 7276 6572 7:35.GMT..Server - 0x0070: 3a20 4170 6163 6865 2f31 2e33 2e33 330d :.Apache/1.3.33. - 0x0080: 0a4c 6173 742d 4d6f 6469 6669 6564 3a20 .Last-Modified:. - 0x0090: 5375 6e2c 2031 3520 4175 6720 3230 3034 Sun,.15.Aug.2004 - 0x00a0: 2030 303a 3433 3a34 3120 474d 540d 0a45 .00:43:41.GMT..E - 0x00b0: 5461 673a 2022 3665 3830 6630 2d31 3438 Tag:."6e80f0-148 - 0x00c0: 612d 3431 3165 6231 6264 220d 0a41 6363 a-411eb1bd"..Acc - 0x00d0: 6570 742d 5261 6e67 6573 3a20 6279 7465 ept-Ranges:.byte - 0x00e0: 730d 0a43 6f6e 7465 6e74 2d4c 656e 6774 s..Content-Lengt - 0x00f0: 683a 2035 3235 380d 0a4b 6565 702d 416c h:.5258..Keep-Al - 0x0100: 6976 653a 2074 696d 656f 7574 3d31 352c ive:.timeout=15, - 0x0110: 206d 6178 3d31 3030 0d0a 436f 6e6e 6563 .max=100..Connec - 0x0120: 7469 6f6e 3a20 4b65 6570 2d41 6c69 7665 tion:.Keep-Alive - 0x0130: 0d0a 436f 6e74 656e 742d 5479 7065 3a20 ..Content-Type:. - 0x0140: 7465 7874 2f68 746d 6c3b 2063 6861 7273 text/html;.chars - 0x0150: 6574 3d69 736f 2d38 3835 392d 310d 0a0d et=iso-8859-1... - 0x0160: 0a3c 2144 4f43 5459 5045 2048 544d 4c20 . - 0x01a0: 0a3c 4854 4d4c 3e0a 3c48 4541 443e 0a20 .... - 0x01b0: 2020 3c4d 4554 4120 4854 5450 2d45 5155 .......... - 0x0250: 3c54 4954 4c45 3e50 6c61 6365 686f 6c64 Placehold - 0x0260: 6572 2070 6167 653c 2f54 4954 4c45 3e0a er.page. - 0x0270: 3c2f 4845 4144 3e0a 3c42 4f44 5920 5445 ... - 0x02d0: 3c48 313e 506c 6163 6568 6f6c 6465 7220

    Placeholder. - 0x02e0: 7061 6765 3c2f 4831 3e0a 3c48 323e 4966 page

    .

    If - 0x02f0: 2079 6f75 2061 7265 206a 7573 7420 6272 .you.are.just.br - 0x0300: 6f77 7369 6e67 2074 6865 2077 6562 3c2f owsing.the.web..

    The.owne - 0x0320: 7220 6f66 2074 6869 7320 7765 6220 7369 r.of.this.web.si - 0x0330: 7465 2068 6173 206e 6f74 2070 7574 2075 te.has.not.put.u - 0x0340: 7020 616e 7920 7765 6220 7061 6765 7320 p.any.web.pages. - 0x0350: 7965 742e 0a50 6c65 6173 6520 636f 6d65 yet..Please.come - 0x0360: 2062 6163 6b20 6c61 7465 722e 3c2f 503e .back.later.

    - 0x0370: 0a0a 3c50 3e3c 534d 414c 4c3e 3c43 4954 ..

    Move.along,.no - 0x0390: 7468 696e 6720 746f 2073 6565 2068 6572 thing.to.see.her - 0x03a0: 652e 2e2e 3c2f 4349 5445 3e20 3a2d 293c e....:-)< - 0x03b0: 2f53 4d41 4c4c 3e3c 2f50 3e0a 0a3c 4832 /SMALL>

    ..

    If.you.are.tryi - 0x03d0: 6e67 2074 6f20 6c6f 6361 7465 2074 6865 ng.to.locate.the - 0x03e0: 2061 646d 696e 6973 7472 6174 6f72 206f .administrator.o - 0x03f0: 6620 7468 6973 206d 6163 6869 6e65 3c2f f.this.machine..

    If.you.w - 0x0410: 616e 7420 746f 2072 6570 6f72 7420 736f ant.to.report.so - 0x0420: 6d65 7468 696e 6720 6162 6f75 7420 7468 mething.about.th - 0x0430: 6973 2068 6f73 7427 7320 6265 6861 7669 is.host's.behavi - 0x0440: 6f72 2c20 706c 6561 7365 0a63 6f6e 7461 or,.please.conta - 0x0450: 6374 2074 6865 2049 6e74 6572 6e65 7420 ct.the.Internet. - 0x0460: 5365 7276 6963 6520 5072 6f76 6964 6572 Service.Provider - 0x0470: 2028 4953 5029 2069 6e76 6f6c 7665 6420 .(ISP).involved. - 0x0480: 6469 7265 6374 6c79 2e3c 2f50 3e0a 0a3c directly.

    ..< - 0x0490: 503e 5365 6520 7468 6520 3c41 2068 7265 P>See.the.Networ - 0x04c0: 6b20 4162 7573 650a 436c 6561 7269 6e67 k.Abuse.Clearing - 0x04d0: 686f 7573 653c 2f41 3e20 666f 7220 686f house.for.ho - 0x04e0: 7720 746f 2064 6f20 7468 6973 2e3c 2f50 w.to.do.this.

    ..

    If.you.ar - 0x0500: 6520 7468 6520 6164 6d69 6e69 7374 7261 e.the.administra - 0x0510: 746f 7220 6f66 2074 6869 7320 6d61 6368 tor.of.this.mach - 0x0520: 696e 653c 2f48 323e 0a0a 3c50 3e54 6865 ine

    ..

    The - 0x0530: 2069 6e69 7469 616c 2069 6e73 7461 6c6c .initial.install - 0x0540: 6174 696f 6e20 6f66 203c 4120 6872 6566 ation.of.Debian - 0x0570: 2773 0a61 7061 6368 653c 2f41 3e20 7765 's.apache.we - 0x0580: 6220 7365 7276 6572 2070 6163 6b61 6765 b.server.package - 0x0590: 2077 6173 2073 7563 6365 7373 6675 6c2e .was.successful. - 0x05a0: 3c2f 503e 0a0a 3c50 3e3c 5354 524f 4e47

    ..

    You.should.repl - 0x05c0: 6163 6520 7468 6973 2070 6167 6520 7769 ace.this.page.wi - 0x05d0: 7468 2079 6f75 7220 6f77 6e20 7765 6220 th.your.own.web. - 0x05e0: 7061 6765 7320 6173 0a73 6f6f 6e20 6173 pages.as.soon.as - 0x05f0: 2070 6f73 7369 626c 652e 3c2f 5354 524f .possible.

    ..

    Unle - 0x0610: 7373 2079 6f75 2063 6861 6e67 6564 2069 ss.you.changed.i - 0x0620: 7473 2063 6f6e 6669 6775 7261 7469 6f6e ts.configuration - 0x0630: 2c20 796f 7572 206e 6577 2073 6572 7665 ,.your.new.serve - 0x0640: 7220 6973 2063 6f6e 6669 6775 7265 6420 r.is.configured. - 0x0650: 6173 2066 6f6c 6c6f 7773 3a0a 3c55 4c3e as.follows:.

      - 0x0660: 0a3c 4c49 3e0a 436f 6e66 6967 7572 6174 .
    • .Configurat - 0x0670: 696f 6e20 6669 6c65 7320 6361 6e20 6265 ion.files.can.be - 0x0680: 2066 6f75 6e64 2069 6e20 3c54 543e 2f65 .found.in./e - 0x0690: 7463 2f61 7061 6368 653c 2f54 543e 2e3c tc/apache.< - 0x06a0: 2f4c 493e 0a0a 3c4c 493e 0a54 6865 203c /LI>..
    • .The.< - 0x06b0: 5454 3e44 6f63 756d 656e 7452 6f6f 743c TT>DocumentRoot< - 0x06c0: 2f54 543e 2c20 7768 6963 6820 6973 2074 /TT>,.which.is.t - 0x06d0: 6865 2064 6972 6563 746f 7279 2075 6e64 he.directory.und - 0x06e0: 6572 2077 6869 6368 2061 6c6c 2079 6f75 er.which.all.you - 0x06f0: 720a 4854 4d4c 2066 696c 6573 2073 686f r.HTML.files.sho - 0x0700: 756c 6420 6578 6973 742c 2069 7320 7365 uld.exist,.is.se - 0x0710: 7420 746f 203c 5454 3e2f 7661 722f 7777 t.to./var/ww - 0x0720: 773c 2f54 543e 2e3c 2f4c 493e 0a0a 3c4c w.
    • ...CGI.scripts.a - 0x0740: 7265 206c 6f6f 6b65 6420 666f 7220 696e re.looked.for.in - 0x0750: 203c 5454 3e2f 7573 722f 6c69 622f 6367 ./usr/lib/cg - 0x0760: 692d 6269 6e3c 2f54 543e 2c20 7768 6963 i-bin,.whic - 0x0770: 6820 6973 2077 6865 7265 0a44 6562 6961 h.is.where.Debia - 0x0780: 6e20 7061 636b 6167 6573 2077 696c 6c20 n.packages.will. - 0x0790: 706c 6163 6520 7468 6569 7220 7363 7269 place.their.scri - 0x07a0: 7074 732e 3c2f 4c49 3e0a 0a3c 4c49 3e0a pts...
    • . - 0x07b0: 4c6f 6720 6669 6c65 7320 6172 6520 706c Log.files.are.pl - 0x07c0: 6163 6564 2069 6e20 3c54 543e 2f76 6172 aced.in./var - 0x07d0: 2f6c 6f67 2f61 7061 6368 653c 2f54 543e /log/apache - 0x07e0: 2c20 616e 6420 7769 6c6c 2062 6520 726f ,.and.will.be.ro - 0x07f0: 7461 7465 640a 7765 656b 6c79 2e20 2054 tated.weekly...T - 0x0800: 6865 2066 7265 7175 656e 6379 206f 6620 he.frequency.of. - 0x0810: 726f 7461 7469 6f6e 2063 616e 2062 6520 rotation.can.be. - 0x0820: 6561 7369 6c79 2063 6861 6e67 6564 2062 easily.changed.b - 0x0830: 7920 6564 6974 696e 670a 3c54 543e 2f65 y.editing./e - 0x0840: 7463 2f6c 6f67 726f 7461 7465 2e64 2f61 tc/logrotate.d/a - 0x0850: 7061 6368 653c 2f54 543e 2e3c 2f4c 493e pache.
    • - 0x0860: 0a0a 3c4c 493e 0a54 6865 2064 6566 6175 ..
    • .The.defau - 0x0870: 6c74 2064 6972 6563 746f 7279 2069 6e64 lt.directory.ind - 0x0880: 6578 2069 7320 3c54 543e 696e 6465 782e ex.is.index. - 0x0890: 6874 6d6c 3c2f 5454 3e2c 206d 6561 6e69 html,.meani - 0x08a0: 6e67 2074 6861 7420 7265 7175 6573 7473 ng.that.requests - 0x08b0: 0a66 6f72 2061 2064 6972 6563 746f 7279 .for.a.directory - 0x08c0: 203c 5454 3e2f 666f 6f2f 6261 722f 3c2f ./foo/bar/.will.give.th - 0x08e0: 6520 636f 6e74 656e 7473 206f 6620 7468 e.contents.of.th - 0x08f0: 6520 6669 6c65 203c 5454 3e2f 7661 722f e.file./var/ - 0x0900: 7777 772f 666f 6f2f 6261 722f 696e 6465 www/foo/bar/inde - 0x0910: 782e 6874 6d6c 3c2f 5454 3e0a 6966 2069 x.html.if.i - 0x0920: 7420 6578 6973 7473 2028 6173 7375 6d69 t.exists.(assumi - 0x0930: 6e67 2074 6861 7420 3c54 543e 2f76 6172 ng.that./var - 0x0940: 2f77 7777 3c2f 5454 3e20 6973 2079 6f75 /www.is.you - 0x0950: 7220 3c54 543e 446f 6375 6d65 6e74 526f r.DocumentRo - 0x0960: 6f74 3c2f 5454 3e29 2e3c 2f4c 493e 0a0a ot).
    • .. - 0x0970: 3c4c 493e 0a55 7365 7220 6469 7265 6374
    • .User.direct - 0x0980: 6f72 6965 7320 6172 6520 656e 6162 6c65 ories.are.enable - 0x0990: 642c 2061 6e64 2075 7365 7220 646f 6375 d,.and.user.docu - 0x09a0: 6d65 6e74 7320 7769 6c6c 2062 6520 6c6f ments.will.be.lo - 0x09b0: 6f6b 6564 2066 6f72 0a69 6e20 7468 6520 oked.for.in.the. - 0x09c0: 3c54 543e 7075 626c 6963 5f68 746d 6c3c public_html< - 0x09d0: 2f54 543e 2064 6972 6563 746f 7279 206f /TT>.directory.o - 0x09e0: 6620 7468 6520 7573 6572 7327 2068 6f6d f.the.users'.hom - 0x09f0: 6573 2e20 2054 6865 7365 2064 6972 730a es...These.dirs. - 0x0a00: 7368 6f75 6c64 2062 6520 756e 6465 7220 should.be.under. - 0x0a10: 3c54 543e 2f68 6f6d 653c 2f54 543e 2c20 /home,. - 0x0a20: 616e 6420 7573 6572 7320 7769 6c6c 206e and.users.will.n - 0x0a30: 6f74 2062 6520 6162 6c65 2074 6f20 7379 ot.be.able.to.sy - 0x0a40: 6d6c 696e 6b0a 746f 2066 696c 6573 2074 mlink.to.files.t - 0x0a50: 6865 7920 646f 6e27 7420 6f77 6e2e 3c2f hey.don't.own...
    .All.t - 0x0a70: 6865 2073 7461 6e64 6172 6420 6170 6163 he.standard.apac - 0x0a80: 6865 206d 6f64 756c 6573 2061 7265 2061 he.modules.are.a - 0x0a90: 7661 696c 6162 6c65 2077 6974 6820 7468 vailable.with.th - 0x0aa0: 6973 2072 656c 6561 7365 2061 6e64 2061 is.release.and.a - 0x0ab0: 7265 0a6e 6f77 206d 616e 6167 6564 2077 re.now.managed.w - 0x0ac0: 6974 6820 6465 6263 6f6e 662e 2020 5479 ith.debconf...Ty - 0x0ad0: 7065 203c 5454 3e64 706b 672d 7265 636f pe.dpkg-reco - 0x0ae0: 6e66 6967 7572 6520 6170 6163 6865 3c2f nfigure.apache.to.select.wh - 0x0b00: 6963 6820 6d6f 6475 6c65 7320 796f 7520 ich.modules.you. - 0x0b10: 7761 6e74 2065 6e61 626c 6564 2e20 204d want.enabled...M - 0x0b20: 616e 7920 6f74 6865 7220 6d6f 6475 6c65 any.other.module - 0x0b30: 7320 6172 6520 6176 6169 6c61 626c 650a s.are.available. - 0x0b40: 7468 726f 7567 6820 7468 6520 4465 6269 through.the.Debi - 0x0b50: 616e 2070 6163 6b61 6765 2073 7973 7465 an.package.syste - 0x0b60: 6d20 7769 7468 2074 6865 206e 616d 6573 m.with.the.names - 0x0b70: 203c 5454 3e6c 6962 6170 6163 6865 2d6d .libapache-m - 0x0b80: 6f64 2d2a 3c2f 5454 3e2e 0a49 6620 796f od-*..If.yo - 0x0b90: 7520 6e65 6564 2074 6f20 636f 6d70 696c u.need.to.compil - 0x0ba0: 6520 6120 6d6f 6475 6c65 2079 6f75 7273 e.a.module.yours - 0x0bb0: 656c 662c 2079 6f75 2077 696c 6c20 6e65 elf,.you.will.ne - 0x0bc0: 6564 2074 6f20 696e 7374 616c 6c20 7468 ed.to.install.th - 0x0bd0: 650a 3c54 543e 6170 6163 6865 2d64 6576 e.apache-dev - 0x0be0: 3c2f 5454 3e20 7061 636b 6167 652e 0a0a .package... - 0x0bf0: 3c50 3e4d 6f72 6520 646f 6375 6d65 6e74

    More.document - 0x0c00: 6174 696f 6e20 6f6e 2041 7061 6368 6520 ation.on.Apache. - 0x0c10: 6361 6e20 6265 2066 6f75 6e64 206f 6e3a can.be.found.on: - 0x0c20: 0a3c 554c 3e0a 3c4c 493e 0a54 6865 203c .

      .
    • .The.< - 0x0c30: 4120 4852 4546 3d22 2f64 6f63 2f61 7061 A.HREF="/doc/apa - 0x0c40: 6368 652d 646f 632f 6d61 6e75 616c 2f22 che-doc/manual/" - 0x0c50: 3e41 7061 6368 6520 646f 6375 6d65 6e74 >Apache.document - 0x0c60: 6174 696f 6e3c 2f41 3e20 7374 6f72 6564 ation.stored - 0x0c70: 206f 6e20 796f 7572 2073 6572 7665 722e .on.your.server. - 0x0c80: 3c2f 4c49 3e0a 0a3c 4c49 3e0a 5468 6520
    • ..
    • .The. - 0x0c90: 3c41 2048 5245 463d 2268 7474 703a 2f2f Apache.Project< - 0x0cc0: 2f41 3e20 686f 6d65 2073 6974 652e 3c2f /A>.home.site...
    • .The.Apache-SSL.home.site.
    • ..
    • .The.mo - 0x0d50: 6420 7065 726c 3c2f 413e 2068 6f6d 6520 d.perl.home. - 0x0d60: 7369 7465 2e3c 2f4c 493e 0a0a 3c4c 493e site.
    • ..
    • - 0x0d70: 0a54 6865 203c 4120 4852 4546 3d22 6874 .The.Apache - 0x0da0: 5765 656b 3c2f 413e 206e 6577 736c 6574 Week.newslet - 0x0db0: 7465 722e 3c2f 4c49 3e0a 0a3c 4c49 3e0a ter.
    • ..
    • . - 0x0dc0: 5468 6520 3c41 2048 5245 463d 2268 7474 The.Debian. - 0x0df0: 5072 6f6a 6563 740a 446f 6375 6d65 6e74 Project.Document - 0x0e00: 6174 696f 6e3c 2f41 3e20 7768 6963 6820 ation.which. - 0x0e10: 636f 6e74 6169 6e73 2048 4f57 544f 732c contains.HOWTOs, - 0x0e20: 2046 4151 732c 2061 6e64 2073 6f66 7477 .FAQs,.and.softw - 0x0e30: 6172 6520 7570 6461 7465 732e 3c2f 4c49 are.updates.
    • .
    ..

    You. - 0x0e50: 6361 6e20 616c 736f 2063 6f6e 7375 6c74 can.also.consult - 0x0e60: 2074 6865 206c 6973 7420 6f66 203c 4120 .the.list.of.World.Wide.We - 0x0ea0: 6220 4672 6571 7565 6e74 6c79 2041 736b b.Frequently.Ask - 0x0eb0: 6564 2051 7565 7374 696f 6e73 3c2f 413e ed.Questions - 0x0ec0: 2066 6f72 2069 6e66 6f72 6d61 7469 6f6e .for.information - 0x0ed0: 2e0a 0a3c 4832 3e4c 6574 206f 7468 6572 ...

    Let.other - 0x0ee0: 2070 656f 706c 6520 6b6e 6f77 2061 626f .people.know.abo - 0x0ef0: 7574 2074 6869 7320 7365 7276 6572 3c2f ut.this.server..Netcraft - 0x0f30: 2070 726f 7669 6465 7320 616e 2069 6e74 .provides.an.int - 0x0f40: 6572 6573 7469 6e67 2066 7265 650a 7365 eresting.free.se - 0x0f50: 7276 6963 6520 666f 7220 7765 6220 7369 rvice.for.web.si - 0x0f60: 7465 206d 6f6e 6974 6f72 696e 6720 616e te.monitoring.an - 0x0f70: 6420 7374 6174 6973 7469 6320 636f 6c6c d.statistic.coll - 0x0f80: 6563 7469 6f6e 2e0a 596f 7520 6361 6e20 ection..You.can. - 0x0f90: 6c65 7420 7468 656d 206b 6e6f 7720 6162 let.them.know.ab - 0x0fa0: 6f75 7420 796f 7572 2073 6572 7665 7220 out.your.server. - 0x0fb0: 7573 696e 6720 7468 6569 720a 3c41 2048 using.their.interface. - 0x0ff0: 0a45 6e61 626c 696e 6720 7468 6520 6d6f .Enabling.the.mo - 0x1000: 6e69 746f 7269 6e67 206f 6620 796f 7572 nitoring.of.your - 0x1010: 2073 6572 7665 7220 7769 6c6c 2070 726f .server.will.pro - 0x1020: 7669 6465 2061 2062 6574 7465 7220 676c vide.a.better.gl - 0x1030: 6f62 616c 206f 7665 7276 6965 770a 6f66 obal.overview.of - 0x1040: 2077 686f 2069 7320 7573 696e 6720 7768 .who.is.using.wh - 0x1050: 6174 2061 6e64 2077 6865 7265 2c20 616e at.and.where,.an - 0x1060: 6420 6974 2077 6f75 6c64 2067 6976 6520 d.it.would.give. - 0x1070: 4465 6269 616e 2061 2062 6574 7465 720a Debian.a.better. - 0x1080: 6f76 6572 7669 6577 206f 6620 7468 6520 overview.of.the. - 0x1090: 6170 6163 6865 2070 6163 6b61 6765 2075 apache.package.u - 0x10a0: 7361 6765 2e0a 0a3c 4832 3e41 626f 7574 sage...

    About - 0x10b0: 2074 6869 7320 7061 6765 3c2f 4832 3e0a .this.page

    . - 0x10c0: 0a3c 494d 4720 414c 4947 4e3d 2272 6967 ...

    - 0x1110: 5468 6973 2069 7320 6120 706c 6163 6568 This.is.a.placeh - 0x1120: 6f6c 6465 7220 7061 6765 2069 6e73 7461 older.page.insta - 0x1130: 6c6c 6564 2062 7920 7468 6520 3c41 0a48 lled.by.the.Deb - 0x1160: 6961 6e3c 2f41 3e0a 7265 6c65 6173 6520 ian.release. - 0x1170: 6f66 2074 6865 2061 7061 6368 6520 5765 of.the.apache.We - 0x1180: 6220 7365 7276 6572 2070 6163 6b61 6765 b.server.package - 0x1190: 2e0a 0a3c 503e 5468 6973 2063 6f6d 7075 ...

    This.compu - 0x11a0: 7465 7220 6861 7320 696e 7374 616c 6c65 ter.has.installe - 0x11b0: 6420 7468 6520 4465 6269 616e 2047 4e55 d.the.Debian.GNU - 0x11c0: 2f4c 696e 7578 206f 7065 7261 7469 6e67 /Linux.operating - 0x11d0: 2073 7973 7465 6d2c 0a62 7574 2069 7420 .system,.but.it. - 0x11e0: 6861 7320 3c73 7472 6f6e 673e 6e6f 7468 has.noth - 0x11f0: 696e 6720 746f 2064 6f20 7769 7468 2074 ing.to.do.with.t - 0x1200: 6865 2044 6562 6961 6e0a 5072 6f6a 6563 he.Debian.Projec - 0x1210: 743c 2f73 7472 6f6e 673e 2e20 506c 6561 t..Plea - 0x1220: 7365 2064 6f20 3c73 7472 6f6e 673e 6e6f se.do.no - 0x1230: 743c 2f73 7472 6f6e 673e 2063 6f6e 7461 t.conta - 0x1240: 6374 2074 6865 2044 6562 6961 6e0a 5072 ct.the.Debian.Pr - 0x1250: 6f6a 6563 7420 6162 6f75 7420 6974 2e3c oject.about.it.< - 0x1260: 2f50 3e0a 0a3c 503e 4966 2079 6f75 2066 /P>..

    If.you.f - 0x1270: 696e 6420 6120 6275 6720 696e 2074 6869 ind.a.bug.in.thi - 0x1280: 7320 6170 6163 6865 2070 6163 6b61 6765 s.apache.package - 0x1290: 2c20 6f72 2069 6e20 4170 6163 6865 2069 ,.or.in.Apache.i - 0x12a0: 7473 656c 662c 0a70 6c65 6173 6520 6669 tself,.please.fi - 0x12b0: 6c65 2061 2062 7567 2072 6570 6f72 7420 le.a.bug.report. - 0x12c0: 6f6e 2069 742e 2020 496e 7374 7275 6374 on.it...Instruct - 0x12d0: 696f 6e73 206f 6e20 646f 696e 6720 7468 ions.on.doing.th - 0x12e0: 6973 2c20 616e 6420 7468 650a 6c69 7374 is,.and.the.list - 0x12f0: 206f 6620 3c41 2048 5245 463d 2268 7474 .of. - 0x1320: 6b6e 6f77 6e20 6275 6773 3c2f 413e 206f known.bugs.o - 0x1330: 6620 7468 6973 0a70 6163 6b61 6765 2c20 f.this.package,. - 0x1340: 6361 6e20 6265 2066 6f75 6e64 2069 6e20 can.be.found.in. - 0x1350: 7468 6520 0a3c 4120 4852 4546 3d22 6874 the..Debian.Bug.T - 0x1390: 7261 636b 696e 6720 5379 7374 656d 3c2f racking.System...

    Thanks.f - 0x13b0: 6f72 2075 7369 6e67 2074 6869 7320 7061 or.using.this.pa - 0x13c0: 636b 6167 652c 2061 6e64 2063 6f6e 6772 ckage,.and.congr - 0x13d0: 6174 756c 6174 696f 6e73 2066 6f72 2079 atulations.for.y - 0x13e0: 6f75 7220 6368 6f69 6365 206f 660a 6120 our.choice.of.a. - 0x13f0: 4465 6269 616e 2073 7973 7465 6d21 3c2f Debian.system!...........< - 0x1520: 212d 2d0a 2020 5468 6973 2070 6167 6520 !--...This.page. - 0x1530: 7761 7320 696e 6974 6961 6c6c 7920 6372 was.initially.cr - 0x1540: 6561 7465 6420 6279 204a 6f68 6e69 6520 eated.by.Johnie. - 0x1550: 496e 6772 616d 2028 6874 7470 3a2f 2f6e Ingram.(http://n - 0x1560: 6574 676f 642e 6e65 742f 290a 2020 4974 etgod.net/)...It - 0x1570: 2077 6173 206c 6174 6572 2065 6469 7465 .was.later.edite - 0x1580: 6420 6279 204d 6174 7468 6577 2057 696c d.by.Matthew.Wil - 0x1590: 636f 7820 616e 6420 4a6f 7369 7020 526f cox.and.Josip.Ro - 0x15a0: 6469 6e2e 0a20 204c 6173 7420 6d6f 6469 din....Last.modi - 0x15b0: 6669 6564 3a20 2444 6174 653a 2032 3030 fied:.$Date:.200 - 0x15c0: 342f 3036 2f32 3020 3135 3a33 333a 3537 4/06/20.15:33:57 - 0x15d0: 2024 2e0a 2020 2d2d 3e0a 0a3c 2f42 4f44 .$....-->.... -23:57:35.941260 IP 127.0.0.1.55920 > 127.0.0.1.80: . ack 5560 win 12383 - 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... -23:57:37.229575 IP 127.0.0.1.55920 > 127.0.0.1.80: F 203:203(0) ack 5560 win 12383 - 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... -23:57:37.230839 IP 127.0.0.1.80 > 127.0.0.1.55920: F 5560:5560(0) ack 204 win 8192 - 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..! -23:57:37.230900 IP 127.0.0.1.55920 > 127.0.0.1.80: . ack 5561 win 12383 - 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..# - 0x0030: 4ddc 9723 M..# diff --git a/tests/print-capXX.out b/tests/print-capXX.out deleted file mode 100644 index 6921a017a04a..000000000000 --- a/tests/print-capXX.out +++ /dev/null @@ -1,419 +0,0 @@ -23:57:35.938066 IP 127.0.0.1.55920 > 127.0.0.1.80: S 928549246:928549246(0) win 32767 - 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 .......... -23:57:35.938122 IP 127.0.0.1.80 > 127.0.0.1.55920: S 930778609:930778609(0) ack 928549247 win 32767 - 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....... -23:57:35.938167 IP 127.0.0.1.55920 > 127.0.0.1.80: . ack 1 win 8192 - 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 .. -23:57:35.939423 IP 127.0.0.1.55920 > 127.0.0.1.80: P 1:203(202) ack 1 win 8192 - 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.... - 0x0030: 2000 fef2 0000 0101 080a 4ddc 9217 4ddc ..........M...M. - 0x0040: 9216 4745 5420 2f20 4854 5450 2f31 2e31 ..GET./.HTTP/1.1 - 0x0050: 0d0a 486f 7374 3a20 6c6f 6361 6c68 6f73 ..Host:.localhos - 0x0060: 740d 0a55 7365 722d 4167 656e 743a 2045 t..User-Agent:.E - 0x0070: 4c69 6e6b 732f 302e 3130 2e34 2d37 2d64 Links/0.10.4-7-d - 0x0080: 6562 6961 6e20 2874 6578 746d 6f64 653b ebian.(textmode; - 0x0090: 204c 696e 7578 2032 2e36 2e31 312d 312d .Linux.2.6.11-1- - 0x00a0: 3638 362d 736d 7020 6936 3836 3b20 3133 686-smp.i686;.13 - 0x00b0: 3278 3536 2d32 290d 0a41 6363 6570 743a 2x56-2)..Accept: - 0x00c0: 202a 2f2a 0d0a 4163 6365 7074 2d45 6e63 .*/*..Accept-Enc - 0x00d0: 6f64 696e 673a 2067 7a69 700d 0a41 6363 oding:.gzip..Acc - 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.... -23:57:35.940474 IP 127.0.0.1.80 > 127.0.0.1.55920: . ack 203 win 8192 - 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 .. -23:57:35.941232 IP 127.0.0.1.80 > 127.0.0.1.55920: P 1:5560(5559) ack 203 win 8192 - 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.. - 0x0030: 2000 13e0 0000 0101 080a 4ddc 9219 4ddc ..........M...M. - 0x0040: 9217 4854 5450 2f31 2e31 2032 3030 204f ..HTTP/1.1.200.O - 0x0050: 4b0d 0a44 6174 653a 2057 6564 2c20 3036 K..Date:.Wed,.06 - 0x0060: 204a 756c 2032 3030 3520 3033 3a35 373a .Jul.2005.03:57: - 0x0070: 3335 2047 4d54 0d0a 5365 7276 6572 3a20 35.GMT..Server:. - 0x0080: 4170 6163 6865 2f31 2e33 2e33 330d 0a4c Apache/1.3.33..L - 0x0090: 6173 742d 4d6f 6469 6669 6564 3a20 5375 ast-Modified:.Su - 0x00a0: 6e2c 2031 3520 4175 6720 3230 3034 2030 n,.15.Aug.2004.0 - 0x00b0: 303a 3433 3a34 3120 474d 540d 0a45 5461 0:43:41.GMT..ETa - 0x00c0: 673a 2022 3665 3830 6630 2d31 3438 612d g:."6e80f0-148a- - 0x00d0: 3431 3165 6231 6264 220d 0a41 6363 6570 411eb1bd"..Accep - 0x00e0: 742d 5261 6e67 6573 3a20 6279 7465 730d t-Ranges:.bytes. - 0x00f0: 0a43 6f6e 7465 6e74 2d4c 656e 6774 683a .Content-Length: - 0x0100: 2035 3235 380d 0a4b 6565 702d 416c 6976 .5258..Keep-Aliv - 0x0110: 653a 2074 696d 656f 7574 3d31 352c 206d e:.timeout=15,.m - 0x0120: 6178 3d31 3030 0d0a 436f 6e6e 6563 7469 ax=100..Connecti - 0x0130: 6f6e 3a20 4b65 6570 2d41 6c69 7665 0d0a on:.Keep-Alive.. - 0x0140: 436f 6e74 656e 742d 5479 7065 3a20 7465 Content-Type:.te - 0x0150: 7874 2f68 746d 6c3b 2063 6861 7273 6574 xt/html;.charset - 0x0160: 3d69 736f 2d38 3835 392d 310d 0a0d 0a3c =iso-8859-1....< - 0x0170: 2144 4f43 5459 5045 2048 544d 4c20 5055 !DOCTYPE.HTML.PU - 0x0180: 424c 4943 2022 2d2f 2f57 3343 2f2f 4454 BLIC."-//W3C//DT - 0x0190: 4420 4854 4d4c 2034 2e30 3120 5472 616e D.HTML.4.01.Tran - 0x01a0: 7369 7469 6f6e 616c 2f2f 454e 223e 0a3c sitional//EN">.< - 0x01b0: 4854 4d4c 3e0a 3c48 4541 443e 0a20 2020 HTML>..... - 0x01c0: 3c4d 4554 4120 4854 5450 2d45 5155 4956 ........Placeholder - 0x0270: 2070 6167 653c 2f54 4954 4c45 3e0a 3c2f .page....Placeholder.pa - 0x02f0: 6765 3c2f 4831 3e0a 3c48 323e 4966 2079 ge

    .

    If.y - 0x0300: 6f75 2061 7265 206a 7573 7420 6272 6f77 ou.are.just.brow - 0x0310: 7369 6e67 2074 6865 2077 6562 3c2f 6832 sing.the.web

    ..

    The.owner. - 0x0330: 6f66 2074 6869 7320 7765 6220 7369 7465 of.this.web.site - 0x0340: 2068 6173 206e 6f74 2070 7574 2075 7020 .has.not.put.up. - 0x0350: 616e 7920 7765 6220 7061 6765 7320 7965 any.web.pages.ye - 0x0360: 742e 0a50 6c65 6173 6520 636f 6d65 2062 t..Please.come.b - 0x0370: 6163 6b20 6c61 7465 722e 3c2f 503e 0a0a ack.later.

    .. - 0x0380: 3c50 3e3c 534d 414c 4c3e 3c43 4954 453e

    - 0x0390: 4d6f 7665 2061 6c6f 6e67 2c20 6e6f 7468 Move.along,.noth - 0x03a0: 696e 6720 746f 2073 6565 2068 6572 652e ing.to.see.here. - 0x03b0: 2e2e 3c2f 4349 5445 3e20 3a2d 293c 2f53 ...:-)

    ..

    I - 0x03d0: 6620 796f 7520 6172 6520 7472 7969 6e67 f.you.are.trying - 0x03e0: 2074 6f20 6c6f 6361 7465 2074 6865 2061 .to.locate.the.a - 0x03f0: 646d 696e 6973 7472 6174 6f72 206f 6620 dministrator.of. - 0x0400: 7468 6973 206d 6163 6869 6e65 3c2f 4832 this.machine

    ..

    If.you.wan - 0x0420: 7420 746f 2072 6570 6f72 7420 736f 6d65 t.to.report.some - 0x0430: 7468 696e 6720 6162 6f75 7420 7468 6973 thing.about.this - 0x0440: 2068 6f73 7427 7320 6265 6861 7669 6f72 .host's.behavior - 0x0450: 2c20 706c 6561 7365 0a63 6f6e 7461 6374 ,.please.contact - 0x0460: 2074 6865 2049 6e74 6572 6e65 7420 5365 .the.Internet.Se - 0x0470: 7276 6963 6520 5072 6f76 6964 6572 2028 rvice.Provider.( - 0x0480: 4953 5029 2069 6e76 6f6c 7665 6420 6469 ISP).involved.di - 0x0490: 7265 6374 6c79 2e3c 2f50 3e0a 0a3c 503e rectly.

    ..

    - 0x04a0: 5365 6520 7468 6520 3c41 2068 7265 663d See.the.Network. - 0x04d0: 4162 7573 650a 436c 6561 7269 6e67 686f Abuse.Clearingho - 0x04e0: 7573 653c 2f41 3e20 666f 7220 686f 7720 use.for.how. - 0x04f0: 746f 2064 6f20 7468 6973 2e3c 2f50 3e0a to.do.this.

    . - 0x0500: 0a3c 4832 3e49 6620 796f 7520 6172 6520 .

    If.you.are. - 0x0510: 7468 6520 6164 6d69 6e69 7374 7261 746f the.administrato - 0x0520: 7220 6f66 2074 6869 7320 6d61 6368 696e r.of.this.machin - 0x0530: 653c 2f48 323e 0a0a 3c50 3e54 6865 2069 e

    ..

    The.i - 0x0540: 6e69 7469 616c 2069 6e73 7461 6c6c 6174 nitial.installat - 0x0550: 696f 6e20 6f66 203c 4120 6872 6566 3d22 ion.of.Debian's - 0x0580: 0a61 7061 6368 653c 2f41 3e20 7765 6220 .apache.web. - 0x0590: 7365 7276 6572 2070 6163 6b61 6765 2077 server.package.w - 0x05a0: 6173 2073 7563 6365 7373 6675 6c2e 3c2f as.successful...

    Y - 0x05c0: 6f75 2073 686f 756c 6420 7265 706c 6163 ou.should.replac - 0x05d0: 6520 7468 6973 2070 6167 6520 7769 7468 e.this.page.with - 0x05e0: 2079 6f75 7220 6f77 6e20 7765 6220 7061 .your.own.web.pa - 0x05f0: 6765 7320 6173 0a73 6f6f 6e20 6173 2070 ges.as.soon.as.p - 0x0600: 6f73 7369 626c 652e 3c2f 5354 524f 4e47 ossible.

    ..

    Unless - 0x0620: 2079 6f75 2063 6861 6e67 6564 2069 7473 .you.changed.its - 0x0630: 2063 6f6e 6669 6775 7261 7469 6f6e 2c20 .configuration,. - 0x0640: 796f 7572 206e 6577 2073 6572 7665 7220 your.new.server. - 0x0650: 6973 2063 6f6e 6669 6775 7265 6420 6173 is.configured.as - 0x0660: 2066 6f6c 6c6f 7773 3a0a 3c55 4c3e 0a3c .follows:.

      .< - 0x0670: 4c49 3e0a 436f 6e66 6967 7572 6174 696f LI>.Configuratio - 0x0680: 6e20 6669 6c65 7320 6361 6e20 6265 2066 n.files.can.be.f - 0x0690: 6f75 6e64 2069 6e20 3c54 543e 2f65 7463 ound.in./etc - 0x06a0: 2f61 7061 6368 653c 2f54 543e 2e3c 2f4c /apache...
    • .The.DocumentRoot,.which.is.the - 0x06e0: 2064 6972 6563 746f 7279 2075 6e64 6572 .directory.under - 0x06f0: 2077 6869 6368 2061 6c6c 2079 6f75 720a .which.all.your. - 0x0700: 4854 4d4c 2066 696c 6573 2073 686f 756c HTML.files.shoul - 0x0710: 6420 6578 6973 742c 2069 7320 7365 7420 d.exist,.is.set. - 0x0720: 746f 203c 5454 3e2f 7661 722f 7777 773c to./var/www< - 0x0730: 2f54 543e 2e3c 2f4c 493e 0a0a 3c4c 493e /TT>.
    • ..
    • - 0x0740: 0a43 4749 2073 6372 6970 7473 2061 7265 .CGI.scripts.are - 0x0750: 206c 6f6f 6b65 6420 666f 7220 696e 203c .looked.for.in.< - 0x0760: 5454 3e2f 7573 722f 6c69 622f 6367 692d TT>/usr/lib/cgi- - 0x0770: 6269 6e3c 2f54 543e 2c20 7768 6963 6820 bin,.which. - 0x0780: 6973 2077 6865 7265 0a44 6562 6961 6e20 is.where.Debian. - 0x0790: 7061 636b 6167 6573 2077 696c 6c20 706c packages.will.pl - 0x07a0: 6163 6520 7468 6569 7220 7363 7269 7074 ace.their.script - 0x07b0: 732e 3c2f 4c49 3e0a 0a3c 4c49 3e0a 4c6f s.
    • ..
    • .Lo - 0x07c0: 6720 6669 6c65 7320 6172 6520 706c 6163 g.files.are.plac - 0x07d0: 6564 2069 6e20 3c54 543e 2f76 6172 2f6c ed.in./var/l - 0x07e0: 6f67 2f61 7061 6368 653c 2f54 543e 2c20 og/apache,. - 0x07f0: 616e 6420 7769 6c6c 2062 6520 726f 7461 and.will.be.rota - 0x0800: 7465 640a 7765 656b 6c79 2e20 2054 6865 ted.weekly...The - 0x0810: 2066 7265 7175 656e 6379 206f 6620 726f .frequency.of.ro - 0x0820: 7461 7469 6f6e 2063 616e 2062 6520 6561 tation.can.be.ea - 0x0830: 7369 6c79 2063 6861 6e67 6564 2062 7920 sily.changed.by. - 0x0840: 6564 6974 696e 670a 3c54 543e 2f65 7463 editing./etc - 0x0850: 2f6c 6f67 726f 7461 7465 2e64 2f61 7061 /logrotate.d/apa - 0x0860: 6368 653c 2f54 543e 2e3c 2f4c 493e 0a0a che.
    • .. - 0x0870: 3c4c 493e 0a54 6865 2064 6566 6175 6c74
    • .The.default - 0x0880: 2064 6972 6563 746f 7279 2069 6e64 6578 .directory.index - 0x0890: 2069 7320 3c54 543e 696e 6465 782e 6874 .is.index.ht - 0x08a0: 6d6c 3c2f 5454 3e2c 206d 6561 6e69 6e67 ml,.meaning - 0x08b0: 2074 6861 7420 7265 7175 6573 7473 0a66 .that.requests.f - 0x08c0: 6f72 2061 2064 6972 6563 746f 7279 203c or.a.directory.< - 0x08d0: 5454 3e2f 666f 6f2f 6261 722f 3c2f 5454 TT>/foo/bar/.will.give.the. - 0x08f0: 636f 6e74 656e 7473 206f 6620 7468 6520 contents.of.the. - 0x0900: 6669 6c65 203c 5454 3e2f 7661 722f 7777 file./var/ww - 0x0910: 772f 666f 6f2f 6261 722f 696e 6465 782e w/foo/bar/index. - 0x0920: 6874 6d6c 3c2f 5454 3e0a 6966 2069 7420 html.if.it. - 0x0930: 6578 6973 7473 2028 6173 7375 6d69 6e67 exists.(assuming - 0x0940: 2074 6861 7420 3c54 543e 2f76 6172 2f77 .that./var/w - 0x0950: 7777 3c2f 5454 3e20 6973 2079 6f75 7220 ww.is.your. - 0x0960: 3c54 543e 446f 6375 6d65 6e74 526f 6f74 DocumentRoot - 0x0970: 3c2f 5454 3e29 2e3c 2f4c 493e 0a0a 3c4c ).
    • ...User.director - 0x0990: 6965 7320 6172 6520 656e 6162 6c65 642c ies.are.enabled, - 0x09a0: 2061 6e64 2075 7365 7220 646f 6375 6d65 .and.user.docume - 0x09b0: 6e74 7320 7769 6c6c 2062 6520 6c6f 6f6b nts.will.be.look - 0x09c0: 6564 2066 6f72 0a69 6e20 7468 6520 3c54 ed.for.in.the.public_html.directory.of. - 0x09f0: 7468 6520 7573 6572 7327 2068 6f6d 6573 the.users'.homes - 0x0a00: 2e20 2054 6865 7365 2064 6972 730a 7368 ...These.dirs.sh - 0x0a10: 6f75 6c64 2062 6520 756e 6465 7220 3c54 ould.be.under./home
      ,.an - 0x0a30: 6420 7573 6572 7320 7769 6c6c 206e 6f74 d.users.will.not - 0x0a40: 2062 6520 6162 6c65 2074 6f20 7379 6d6c .be.able.to.syml - 0x0a50: 696e 6b0a 746f 2066 696c 6573 2074 6865 ink.to.files.the - 0x0a60: 7920 646f 6e27 7420 6f77 6e2e 3c2f 4c49 y.don't.own...
    .All.the - 0x0a80: 2073 7461 6e64 6172 6420 6170 6163 6865 .standard.apache - 0x0a90: 206d 6f64 756c 6573 2061 7265 2061 7661 .modules.are.ava - 0x0aa0: 696c 6162 6c65 2077 6974 6820 7468 6973 ilable.with.this - 0x0ab0: 2072 656c 6561 7365 2061 6e64 2061 7265 .release.and.are - 0x0ac0: 0a6e 6f77 206d 616e 6167 6564 2077 6974 .now.managed.wit - 0x0ad0: 6820 6465 6263 6f6e 662e 2020 5479 7065 h.debconf...Type - 0x0ae0: 203c 5454 3e64 706b 672d 7265 636f 6e66 .dpkg-reconf - 0x0af0: 6967 7572 6520 6170 6163 6865 3c2f 5454 igure.apache.to.select.whic - 0x0b10: 6820 6d6f 6475 6c65 7320 796f 7520 7761 h.modules.you.wa - 0x0b20: 6e74 2065 6e61 626c 6564 2e20 204d 616e nt.enabled...Man - 0x0b30: 7920 6f74 6865 7220 6d6f 6475 6c65 7320 y.other.modules. - 0x0b40: 6172 6520 6176 6169 6c61 626c 650a 7468 are.available.th - 0x0b50: 726f 7567 6820 7468 6520 4465 6269 616e rough.the.Debian - 0x0b60: 2070 6163 6b61 6765 2073 7973 7465 6d20 .package.system. - 0x0b70: 7769 7468 2074 6865 206e 616d 6573 203c with.the.names.< - 0x0b80: 5454 3e6c 6962 6170 6163 6865 2d6d 6f64 TT>libapache-mod - 0x0b90: 2d2a 3c2f 5454 3e2e 0a49 6620 796f 7520 -*
    ..If.you. - 0x0ba0: 6e65 6564 2074 6f20 636f 6d70 696c 6520 need.to.compile. - 0x0bb0: 6120 6d6f 6475 6c65 2079 6f75 7273 656c a.module.yoursel - 0x0bc0: 662c 2079 6f75 2077 696c 6c20 6e65 6564 f,.you.will.need - 0x0bd0: 2074 6f20 696e 7374 616c 6c20 7468 650a .to.install.the. - 0x0be0: 3c54 543e 6170 6163 6865 2d64 6576 3c2f apache-dev.package...

    More.documentat - 0x0c10: 696f 6e20 6f6e 2041 7061 6368 6520 6361 ion.on.Apache.ca - 0x0c20: 6e20 6265 2066 6f75 6e64 206f 6e3a 0a3c n.be.found.on:.< - 0x0c30: 554c 3e0a 3c4c 493e 0a54 6865 203c 4120 UL>.

  • .The.A - 0x0c60: 7061 6368 6520 646f 6375 6d65 6e74 6174 pache.documentat - 0x0c70: 696f 6e3c 2f41 3e20 7374 6f72 6564 206f ion.stored.o - 0x0c80: 6e20 796f 7572 2073 6572 7665 722e 3c2f n.your.server...
  • .The.A - 0x0cc0: 7061 6368 6520 5072 6f6a 6563 743c 2f41 pache.Project.home.site.
  • ..
  • .The.Apache-SSL. - 0x0d20: 686f 6d65 2073 6974 652e 3c2f 4c49 3e0a home.site.
  • . - 0x0d30: 0a3c 4c49 3e0a 5468 6520 3c41 2048 5245 .
  • .The.mod. - 0x0d60: 7065 726c 3c2f 413e 2068 6f6d 6520 7369 perl.home.si - 0x0d70: 7465 2e3c 2f4c 493e 0a0a 3c4c 493e 0a54 te.
  • ..
  • .T - 0x0d80: 6865 203c 4120 4852 4546 3d22 6874 7470 he.ApacheWe - 0x0db0: 656b 3c2f 413e 206e 6577 736c 6574 7465 ek.newslette - 0x0dc0: 722e 3c2f 4c49 3e0a 0a3c 4c49 3e0a 5468 r.
  • ..
  • .Th - 0x0dd0: 6520 3c41 2048 5245 463d 2268 7474 703a e.Debian.Pr - 0x0e00: 6f6a 6563 740a 446f 6375 6d65 6e74 6174 oject.Documentat - 0x0e10: 696f 6e3c 2f41 3e20 7768 6963 6820 636f ion.which.co - 0x0e20: 6e74 6169 6e73 2048 4f57 544f 732c 2046 ntains.HOWTOs,.F - 0x0e30: 4151 732c 2061 6e64 2073 6f66 7477 6172 AQs,.and.softwar - 0x0e40: 6520 7570 6461 7465 732e 3c2f 4c49 3e0a e.updates.
  • . - 0x0e50: 3c2f 554c 3e0a 0a3c 503e 596f 7520 6361 ..

    You.ca - 0x0e60: 6e20 616c 736f 2063 6f6e 7375 6c74 2074 n.also.consult.t - 0x0e70: 6865 206c 6973 7420 6f66 203c 4120 4852 he.list.of.World.Wide.Web. - 0x0eb0: 4672 6571 7565 6e74 6c79 2041 736b 6564 Frequently.Asked - 0x0ec0: 2051 7565 7374 696f 6e73 3c2f 413e 2066 .Questions.f - 0x0ed0: 6f72 2069 6e66 6f72 6d61 7469 6f6e 2e0a or.information.. - 0x0ee0: 0a3c 4832 3e4c 6574 206f 7468 6572 2070 .

    Let.other.p - 0x0ef0: 656f 706c 6520 6b6e 6f77 2061 626f 7574 eople.know.about - 0x0f00: 2074 6869 7320 7365 7276 6572 3c2f 4832 .this.server

    ..Netcraft.p - 0x0f40: 726f 7669 6465 7320 616e 2069 6e74 6572 rovides.an.inter - 0x0f50: 6573 7469 6e67 2066 7265 650a 7365 7276 esting.free.serv - 0x0f60: 6963 6520 666f 7220 7765 6220 7369 7465 ice.for.web.site - 0x0f70: 206d 6f6e 6974 6f72 696e 6720 616e 6420 .monitoring.and. - 0x0f80: 7374 6174 6973 7469 6320 636f 6c6c 6563 statistic.collec - 0x0f90: 7469 6f6e 2e0a 596f 7520 6361 6e20 6c65 tion..You.can.le - 0x0fa0: 7420 7468 656d 206b 6e6f 7720 6162 6f75 t.them.know.abou - 0x0fb0: 7420 796f 7572 2073 6572 7665 7220 7573 t.your.server.us - 0x0fc0: 696e 6720 7468 6569 720a 3c41 2048 5245 ing.their. - 0x0ff0: 696e 7465 7266 6163 653c 2f41 3e2e 0a45 interface..E - 0x1000: 6e61 626c 696e 6720 7468 6520 6d6f 6e69 nabling.the.moni - 0x1010: 746f 7269 6e67 206f 6620 796f 7572 2073 toring.of.your.s - 0x1020: 6572 7665 7220 7769 6c6c 2070 726f 7669 erver.will.provi - 0x1030: 6465 2061 2062 6574 7465 7220 676c 6f62 de.a.better.glob - 0x1040: 616c 206f 7665 7276 6965 770a 6f66 2077 al.overview.of.w - 0x1050: 686f 2069 7320 7573 696e 6720 7768 6174 ho.is.using.what - 0x1060: 2061 6e64 2077 6865 7265 2c20 616e 6420 .and.where,.and. - 0x1070: 6974 2077 6f75 6c64 2067 6976 6520 4465 it.would.give.De - 0x1080: 6269 616e 2061 2062 6574 7465 720a 6f76 bian.a.better.ov - 0x1090: 6572 7669 6577 206f 6620 7468 6520 6170 erview.of.the.ap - 0x10a0: 6163 6865 2070 6163 6b61 6765 2075 7361 ache.package.usa - 0x10b0: 6765 2e0a 0a3c 4832 3e41 626f 7574 2074 ge...

    About.t - 0x10c0: 6869 7320 7061 6765 3c2f 4832 3e0a 0a3c his.page

    ..< - 0x10d0: 494d 4720 414c 4947 4e3d 2272 6967 6874 IMG.ALIGN="right - 0x10e0: 2220 414c 543d 2222 2048 4549 4748 543d ".ALT="".HEIGHT= - 0x10f0: 2232 3437 2220 5749 4454 483d 2232 3738 "247".WIDTH="278 - 0x1100: 2220 5352 433d 2269 636f 6e73 2f6a 6865 ".SRC="icons/jhe - 0x1110: 3036 312e 706e 6722 3e0a 0a3c 503e 5468 061.png">..

    Th - 0x1120: 6973 2069 7320 6120 706c 6163 6568 6f6c is.is.a.placehol - 0x1130: 6465 7220 7061 6765 2069 6e73 7461 6c6c der.page.install - 0x1140: 6564 2062 7920 7468 6520 3c41 0a48 5245 ed.by.the.Debia - 0x1170: 6e3c 2f41 3e0a 7265 6c65 6173 6520 6f66 n.release.of - 0x1180: 2074 6865 2061 7061 6368 6520 5765 6220 .the.apache.Web. - 0x1190: 7365 7276 6572 2070 6163 6b61 6765 2e0a server.package.. - 0x11a0: 0a3c 503e 5468 6973 2063 6f6d 7075 7465 .

    This.compute - 0x11b0: 7220 6861 7320 696e 7374 616c 6c65 6420 r.has.installed. - 0x11c0: 7468 6520 4465 6269 616e 2047 4e55 2f4c the.Debian.GNU/L - 0x11d0: 696e 7578 206f 7065 7261 7469 6e67 2073 inux.operating.s - 0x11e0: 7973 7465 6d2c 0a62 7574 2069 7420 6861 ystem,.but.it.ha - 0x11f0: 7320 3c73 7472 6f6e 673e 6e6f 7468 696e s.nothin - 0x1200: 6720 746f 2064 6f20 7769 7468 2074 6865 g.to.do.with.the - 0x1210: 2044 6562 6961 6e0a 5072 6f6a 6563 743c .Debian.Project< - 0x1220: 2f73 7472 6f6e 673e 2e20 506c 6561 7365 /strong>..Please - 0x1230: 2064 6f20 3c73 7472 6f6e 673e 6e6f 743c .do.not< - 0x1240: 2f73 7472 6f6e 673e 2063 6f6e 7461 6374 /strong>.contact - 0x1250: 2074 6865 2044 6562 6961 6e0a 5072 6f6a .the.Debian.Proj - 0x1260: 6563 7420 6162 6f75 7420 6974 2e3c 2f50 ect.about.it.

    ..

    If.you.fin - 0x1280: 6420 6120 6275 6720 696e 2074 6869 7320 d.a.bug.in.this. - 0x1290: 6170 6163 6865 2070 6163 6b61 6765 2c20 apache.package,. - 0x12a0: 6f72 2069 6e20 4170 6163 6865 2069 7473 or.in.Apache.its - 0x12b0: 656c 662c 0a70 6c65 6173 6520 6669 6c65 elf,.please.file - 0x12c0: 2061 2062 7567 2072 6570 6f72 7420 6f6e .a.bug.report.on - 0x12d0: 2069 742e 2020 496e 7374 7275 6374 696f .it...Instructio - 0x12e0: 6e73 206f 6e20 646f 696e 6720 7468 6973 ns.on.doing.this - 0x12f0: 2c20 616e 6420 7468 650a 6c69 7374 206f ,.and.the.list.o - 0x1300: 6620 3c41 2048 5245 463d 2268 7474 703a f.kn - 0x1330: 6f77 6e20 6275 6773 3c2f 413e 206f 6620 own.bugs.of. - 0x1340: 7468 6973 0a70 6163 6b61 6765 2c20 6361 this.package,.ca - 0x1350: 6e20 6265 2066 6f75 6e64 2069 6e20 7468 n.be.found.in.th - 0x1360: 6520 0a3c 4120 4852 4546 3d22 6874 7470 e..Debian.Bug.Tra - 0x13a0: 636b 696e 6720 5379 7374 656d 3c2f 413e cking.System - 0x13b0: 2e0a 0a3c 503e 5468 616e 6b73 2066 6f72 ...

    Thanks.for - 0x13c0: 2075 7369 6e67 2074 6869 7320 7061 636b .using.this.pack - 0x13d0: 6167 652c 2061 6e64 2063 6f6e 6772 6174 age,.and.congrat - 0x13e0: 756c 6174 696f 6e73 2066 6f72 2079 6f75 ulations.for.you - 0x13f0: 7220 6368 6f69 6365 206f 660a 6120 4465 r.choice.of.a.De - 0x1400: 6269 616e 2073 7973 7465 6d21 3c2f 503e bian.system!

    - 0x1410: 0a0a 3c44 4956 2061 6c69 676e 3d22 6365 ........ - 0x1520: 3c2f 613e 0a3c 2f44 4956 3e0a 0a3c 212d ..... - 0x15f0: 0a3c 2f48 544d 4c3e 0a .. -23:57:35.941260 IP 127.0.0.1.55920 > 127.0.0.1.80: . ack 5560 win 12383 - 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 .. -23:57:37.229575 IP 127.0.0.1.55920 > 127.0.0.1.80: F 203:203(0) ack 5560 win 12383 - 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 .. -23:57:37.230839 IP 127.0.0.1.80 > 127.0.0.1.55920: F 5560:5560(0) ack 204 win 8192 - 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 .! -23:57:37.230900 IP 127.0.0.1.55920 > 127.0.0.1.80: . ack 5561 win 12383 - 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.... - 0x0030: 305f 06d4 0000 0101 080a 4ddc 9723 4ddc 0_........M..#M. - 0x0040: 9723 .# diff --git a/tests/print-flags.puu b/tests/print-flags.puu deleted file mode 100644 index bcd8b9926839..000000000000 --- a/tests/print-flags.puu +++ /dev/null @@ -1,151 +0,0 @@ -begin 644 print-flags.pcap -MU,.RH0(`!````````````/__```!````KU;+0E)0#@!*````2@`````````` -M``````````@`10``/!MH0`!`!B%2?P```7\```':<`!0-UB)?@````"@`G__ -M%"$```($0`P$`@@*3=R2%@`````!`P,"KU;+0HI0#@!*````2@`````````` -M``````````@`10``/```0`!`!CRZ?P```7\```$`4-IP-WJ-\3=8B7^@$G__ -M;K$```($0`P$`@@*3=R2%DWHWR@!@@`/[R```!`0@* -M3=R2%TW?P```7\```$`4-IP-WJ-\C=8 -MBDF`$"``-P,```$!"`I-W)(83=R2%Z]6RT*P7`X`^14``/D5```````````` -M```````(`$4`%>L?YD``0`8')7\```%_```!`%#:<#=ZC?(W6(I)@!@@`!/@ -M```!`0@*3=R2&4W71E#TQ,#`-"D-O;FYE8W1I;VXZ($ME97`M06QI=F4-"D-O -M;G1E;G0M5'EP93H@=&5X="]H=&UL.R!C:&%R7!E(B!#3TY414Y4/2)T97AT+VAT;6P[(&-H -M87)S970]:7-O+3@X-3DM,2(^"B`@(#Q-151!($Y!344](D1E2!W96(@<&%G97,@ -M>65T+@I0;&5A6EN9R!T;R!L -M;V-A=&4@=&AE(&%D;6EN:7-T6]U(&%R92!T:&4@861M:6YI2!E9&ET:6YG"CQ4 -M5#XO971C+VQO9W)O=&%T92YD+V%P86-H93PO5%0^+CPO3$D^"@H\3$D^"E1H -M92!D969A=6QT(&1I2!I;F1E>"!I6]U2!O9B!T:&4@=7-E6]U('=A;G0@96YA8FQE9"X@($UA;GD@;W1H97(@;6]D=6QE6]U6]U2!T:&4@/$$*2%)%1CTB:'1T<#HO+W=W=RYD96)I86XN;W)G+R(^1&5B -M:6%N/"]!/@IR96QE87-E(&]F('1H92!A<&%C:&4@5V5B('-E7-T96TL"F)U="!I="!H87,@/'-T -M6]U -M(&9I;F0@82!B=6<@:6X@=&AI6]U2!*;VAN:64@26YG2!-871T:&5W(%=I;&-O>"!A;F0@ -M2F]S:7`@4F]D:6XN"B`@3&%S="!M;V1I9FEE9#H@)$1A=&4Z(#(P,#0O,#8O -M,C`@,34Z,S,Z-3<@)"X*("`M+3X*"CPO0D]$63X*/"](5$U,/@JO5LM"S%P. -M`$(```!"````````````````````"`!%```T&VY``$`&(51_```!?P```=IP -M`%`W6(I)-WJCJ8`0,%\0Z@```0$("DW``P!"````0@`` -M``````````````````@`10``-!MP0`!`!B%2?P```7\```':<`!0-UB*23=Z -MHZF`$3!?"^$```$!"`I-W) 127.0.0.1.80: S 928549246:928549246(0) win 32767 - 0x0000: 4500 003c 1b68 4000 4006 2152 7f00 0001 - 0x0010: 7f00 0001 da70 0050 3758 897e 0000 0000 - 0x0020: a002 7fff 1421 0000 0204 400c 0402 080a - 0x0030: 4ddc 9216 0000 0000 0103 0302 -23:57:35.938122 IP 127.0.0.1.80 > 127.0.0.1.55920: S 930778609:930778609(0) ack 928549247 win 32767 - 0x0000: 4500 003c 0000 4000 4006 3cba 7f00 0001 - 0x0010: 7f00 0001 0050 da70 377a 8df1 3758 897f - 0x0020: a012 7fff 6eb1 0000 0204 400c 0402 080a - 0x0030: 4ddc 9216 4ddc 9216 0103 0302 -23:57:35.938167 IP 127.0.0.1.55920 > 127.0.0.1.80: . ack 1 win 8192 - 0x0000: 4500 0034 1b6a 4000 4006 2158 7f00 0001 - 0x0010: 7f00 0001 da70 0050 3758 897f 377a 8df2 - 0x0020: 8010 2000 37d0 0000 0101 080a 4ddc 9216 - 0x0030: 4ddc 9216 -23:57:35.939423 IP 127.0.0.1.55920 > 127.0.0.1.80: P 1:203(202) ack 1 win 8192 - 0x0000: 4500 00fe 1b6c 4000 4006 208c 7f00 0001 - 0x0010: 7f00 0001 da70 0050 3758 897f 377a 8df2 - 0x0020: 8018 2000 fef2 0000 0101 080a 4ddc 9217 - 0x0030: 4ddc 9216 4745 5420 2f20 4854 5450 2f31 - 0x0040: 2e31 0d0a 486f 7374 3a20 6c6f 6361 6c68 - 0x0050: 6f73 740d 0a55 7365 722d 4167 656e 743a - 0x0060: 2045 4c69 6e6b 732f 302e 3130 2e34 2d37 - 0x0070: 2d64 6562 6961 6e20 2874 6578 746d 6f64 - 0x0080: 653b 204c 696e 7578 2032 2e36 2e31 312d - 0x0090: 312d 3638 362d 736d 7020 6936 3836 3b20 - 0x00a0: 3133 3278 3536 2d32 290d 0a41 6363 6570 - 0x00b0: 743a 202a 2f2a 0d0a 4163 6365 7074 2d45 - 0x00c0: 6e63 6f64 696e 673a 2067 7a69 700d 0a41 - 0x00d0: 6363 6570 742d 4c61 6e67 7561 6765 3a20 - 0x00e0: 656e 0d0a 436f 6e6e 6563 7469 6f6e 3a20 - 0x00f0: 4b65 6570 2d41 6c69 7665 0d0a 0d0a -23:57:35.940474 IP 127.0.0.1.80 > 127.0.0.1.55920: . ack 203 win 8192 - 0x0000: 4500 0034 1fe4 4000 4006 1cde 7f00 0001 - 0x0010: 7f00 0001 0050 da70 377a 8df2 3758 8a49 - 0x0020: 8010 2000 3703 0000 0101 080a 4ddc 9218 - 0x0030: 4ddc 9217 -23:57:35.941232 IP 127.0.0.1.80 > 127.0.0.1.55920: P 1:5560(5559) ack 203 win 8192 - 0x0000: 4500 15eb 1fe6 4000 4006 0725 7f00 0001 - 0x0010: 7f00 0001 0050 da70 377a 8df2 3758 8a49 - 0x0020: 8018 2000 13e0 0000 0101 080a 4ddc 9219 - 0x0030: 4ddc 9217 4854 5450 2f31 2e31 2032 3030 - 0x0040: 204f 4b0d 0a44 6174 653a 2057 6564 2c20 - 0x0050: 3036 204a 756c 2032 3030 3520 3033 3a35 - 0x0060: 373a 3335 2047 4d54 0d0a 5365 7276 6572 - 0x0070: 3a20 4170 6163 6865 2f31 2e33 2e33 330d - 0x0080: 0a4c 6173 742d 4d6f 6469 6669 6564 3a20 - 0x0090: 5375 6e2c 2031 3520 4175 6720 3230 3034 - 0x00a0: 2030 303a 3433 3a34 3120 474d 540d 0a45 - 0x00b0: 5461 673a 2022 3665 3830 6630 2d31 3438 - 0x00c0: 612d 3431 3165 6231 6264 220d 0a41 6363 - 0x00d0: 6570 742d 5261 6e67 6573 3a20 6279 7465 - 0x00e0: 730d 0a43 6f6e 7465 6e74 2d4c 656e 6774 - 0x00f0: 683a 2035 3235 380d 0a4b 6565 702d 416c - 0x0100: 6976 653a 2074 696d 656f 7574 3d31 352c - 0x0110: 206d 6178 3d31 3030 0d0a 436f 6e6e 6563 - 0x0120: 7469 6f6e 3a20 4b65 6570 2d41 6c69 7665 - 0x0130: 0d0a 436f 6e74 656e 742d 5479 7065 3a20 - 0x0140: 7465 7874 2f68 746d 6c3b 2063 6861 7273 - 0x0150: 6574 3d69 736f 2d38 3835 392d 310d 0a0d - 0x0160: 0a3c 2144 4f43 5459 5045 2048 544d 4c20 - 0x0170: 5055 424c 4943 2022 2d2f 2f57 3343 2f2f - 0x0180: 4454 4420 4854 4d4c 2034 2e30 3120 5472 - 0x0190: 616e 7369 7469 6f6e 616c 2f2f 454e 223e - 0x01a0: 0a3c 4854 4d4c 3e0a 3c48 4541 443e 0a20 - 0x01b0: 2020 3c4d 4554 4120 4854 5450 2d45 5155 - 0x01c0: 4956 3d22 436f 6e74 656e 742d 5479 7065 - 0x01d0: 2220 434f 4e54 454e 543d 2274 6578 742f - 0x01e0: 6874 6d6c 3b20 6368 6172 7365 743d 6973 - 0x01f0: 6f2d 3838 3539 2d31 223e 0a20 2020 3c4d - 0x0200: 4554 4120 4e41 4d45 3d22 4465 7363 7269 - 0x0210: 7074 696f 6e22 2043 4f4e 5445 4e54 3d22 - 0x0220: 5468 6520 696e 6974 6961 6c20 696e 7374 - 0x0230: 616c 6c61 7469 6f6e 206f 6620 4465 6269 - 0x0240: 616e 2061 7061 6368 652e 223e 0a20 2020 - 0x0250: 3c54 4954 4c45 3e50 6c61 6365 686f 6c64 - 0x0260: 6572 2070 6167 653c 2f54 4954 4c45 3e0a - 0x0270: 3c2f 4845 4144 3e0a 3c42 4f44 5920 5445 - 0x0280: 5854 3d22 2330 3030 3030 3022 2042 4743 - 0x0290: 4f4c 4f52 3d22 2346 4646 4646 4622 204c - 0x02a0: 494e 4b3d 2223 3030 3030 4546 2220 564c - 0x02b0: 494e 4b3d 2223 3535 3138 3841 2220 414c - 0x02c0: 494e 4b3d 2223 4646 3030 3030 223e 0a0a - 0x02d0: 3c48 313e 506c 6163 6568 6f6c 6465 7220 - 0x02e0: 7061 6765 3c2f 4831 3e0a 3c48 323e 4966 - 0x02f0: 2079 6f75 2061 7265 206a 7573 7420 6272 - 0x0300: 6f77 7369 6e67 2074 6865 2077 6562 3c2f - 0x0310: 6832 3e0a 0a3c 503e 5468 6520 6f77 6e65 - 0x0320: 7220 6f66 2074 6869 7320 7765 6220 7369 - 0x0330: 7465 2068 6173 206e 6f74 2070 7574 2075 - 0x0340: 7020 616e 7920 7765 6220 7061 6765 7320 - 0x0350: 7965 742e 0a50 6c65 6173 6520 636f 6d65 - 0x0360: 2062 6163 6b20 6c61 7465 722e 3c2f 503e - 0x0370: 0a0a 3c50 3e3c 534d 414c 4c3e 3c43 4954 - 0x0380: 453e 4d6f 7665 2061 6c6f 6e67 2c20 6e6f - 0x0390: 7468 696e 6720 746f 2073 6565 2068 6572 - 0x03a0: 652e 2e2e 3c2f 4349 5445 3e20 3a2d 293c - 0x03b0: 2f53 4d41 4c4c 3e3c 2f50 3e0a 0a3c 4832 - 0x03c0: 3e49 6620 796f 7520 6172 6520 7472 7969 - 0x03d0: 6e67 2074 6f20 6c6f 6361 7465 2074 6865 - 0x03e0: 2061 646d 696e 6973 7472 6174 6f72 206f - 0x03f0: 6620 7468 6973 206d 6163 6869 6e65 3c2f - 0x0400: 4832 3e0a 0a3c 503e 4966 2079 6f75 2077 - 0x0410: 616e 7420 746f 2072 6570 6f72 7420 736f - 0x0420: 6d65 7468 696e 6720 6162 6f75 7420 7468 - 0x0430: 6973 2068 6f73 7427 7320 6265 6861 7669 - 0x0440: 6f72 2c20 706c 6561 7365 0a63 6f6e 7461 - 0x0450: 6374 2074 6865 2049 6e74 6572 6e65 7420 - 0x0460: 5365 7276 6963 6520 5072 6f76 6964 6572 - 0x0470: 2028 4953 5029 2069 6e76 6f6c 7665 6420 - 0x0480: 6469 7265 6374 6c79 2e3c 2f50 3e0a 0a3c - 0x0490: 503e 5365 6520 7468 6520 3c41 2068 7265 - 0x04a0: 663d 2268 7474 703a 2f2f 7777 772e 6162 - 0x04b0: 7573 652e 6e65 742f 223e 4e65 7477 6f72 - 0x04c0: 6b20 4162 7573 650a 436c 6561 7269 6e67 - 0x04d0: 686f 7573 653c 2f41 3e20 666f 7220 686f - 0x04e0: 7720 746f 2064 6f20 7468 6973 2e3c 2f50 - 0x04f0: 3e0a 0a3c 4832 3e49 6620 796f 7520 6172 - 0x0500: 6520 7468 6520 6164 6d69 6e69 7374 7261 - 0x0510: 746f 7220 6f66 2074 6869 7320 6d61 6368 - 0x0520: 696e 653c 2f48 323e 0a0a 3c50 3e54 6865 - 0x0530: 2069 6e69 7469 616c 2069 6e73 7461 6c6c - 0x0540: 6174 696f 6e20 6f66 203c 4120 6872 6566 - 0x0550: 3d22 6874 7470 3a2f 2f77 7777 2e64 6562 - 0x0560: 6961 6e2e 6f72 672f 223e 4465 6269 616e - 0x0570: 2773 0a61 7061 6368 653c 2f41 3e20 7765 - 0x0580: 6220 7365 7276 6572 2070 6163 6b61 6765 - 0x0590: 2077 6173 2073 7563 6365 7373 6675 6c2e - 0x05a0: 3c2f 503e 0a0a 3c50 3e3c 5354 524f 4e47 - 0x05b0: 3e59 6f75 2073 686f 756c 6420 7265 706c - 0x05c0: 6163 6520 7468 6973 2070 6167 6520 7769 - 0x05d0: 7468 2079 6f75 7220 6f77 6e20 7765 6220 - 0x05e0: 7061 6765 7320 6173 0a73 6f6f 6e20 6173 - 0x05f0: 2070 6f73 7369 626c 652e 3c2f 5354 524f - 0x0600: 4e47 3e3c 2f50 3e0a 0a3c 503e 556e 6c65 - 0x0610: 7373 2079 6f75 2063 6861 6e67 6564 2069 - 0x0620: 7473 2063 6f6e 6669 6775 7261 7469 6f6e - 0x0630: 2c20 796f 7572 206e 6577 2073 6572 7665 - 0x0640: 7220 6973 2063 6f6e 6669 6775 7265 6420 - 0x0650: 6173 2066 6f6c 6c6f 7773 3a0a 3c55 4c3e - 0x0660: 0a3c 4c49 3e0a 436f 6e66 6967 7572 6174 - 0x0670: 696f 6e20 6669 6c65 7320 6361 6e20 6265 - 0x0680: 2066 6f75 6e64 2069 6e20 3c54 543e 2f65 - 0x0690: 7463 2f61 7061 6368 653c 2f54 543e 2e3c - 0x06a0: 2f4c 493e 0a0a 3c4c 493e 0a54 6865 203c - 0x06b0: 5454 3e44 6f63 756d 656e 7452 6f6f 743c - 0x06c0: 2f54 543e 2c20 7768 6963 6820 6973 2074 - 0x06d0: 6865 2064 6972 6563 746f 7279 2075 6e64 - 0x06e0: 6572 2077 6869 6368 2061 6c6c 2079 6f75 - 0x06f0: 720a 4854 4d4c 2066 696c 6573 2073 686f - 0x0700: 756c 6420 6578 6973 742c 2069 7320 7365 - 0x0710: 7420 746f 203c 5454 3e2f 7661 722f 7777 - 0x0720: 773c 2f54 543e 2e3c 2f4c 493e 0a0a 3c4c - 0x0730: 493e 0a43 4749 2073 6372 6970 7473 2061 - 0x0740: 7265 206c 6f6f 6b65 6420 666f 7220 696e - 0x0750: 203c 5454 3e2f 7573 722f 6c69 622f 6367 - 0x0760: 692d 6269 6e3c 2f54 543e 2c20 7768 6963 - 0x0770: 6820 6973 2077 6865 7265 0a44 6562 6961 - 0x0780: 6e20 7061 636b 6167 6573 2077 696c 6c20 - 0x0790: 706c 6163 6520 7468 6569 7220 7363 7269 - 0x07a0: 7074 732e 3c2f 4c49 3e0a 0a3c 4c49 3e0a - 0x07b0: 4c6f 6720 6669 6c65 7320 6172 6520 706c - 0x07c0: 6163 6564 2069 6e20 3c54 543e 2f76 6172 - 0x07d0: 2f6c 6f67 2f61 7061 6368 653c 2f54 543e - 0x07e0: 2c20 616e 6420 7769 6c6c 2062 6520 726f - 0x07f0: 7461 7465 640a 7765 656b 6c79 2e20 2054 - 0x0800: 6865 2066 7265 7175 656e 6379 206f 6620 - 0x0810: 726f 7461 7469 6f6e 2063 616e 2062 6520 - 0x0820: 6561 7369 6c79 2063 6861 6e67 6564 2062 - 0x0830: 7920 6564 6974 696e 670a 3c54 543e 2f65 - 0x0840: 7463 2f6c 6f67 726f 7461 7465 2e64 2f61 - 0x0850: 7061 6368 653c 2f54 543e 2e3c 2f4c 493e - 0x0860: 0a0a 3c4c 493e 0a54 6865 2064 6566 6175 - 0x0870: 6c74 2064 6972 6563 746f 7279 2069 6e64 - 0x0880: 6578 2069 7320 3c54 543e 696e 6465 782e - 0x0890: 6874 6d6c 3c2f 5454 3e2c 206d 6561 6e69 - 0x08a0: 6e67 2074 6861 7420 7265 7175 6573 7473 - 0x08b0: 0a66 6f72 2061 2064 6972 6563 746f 7279 - 0x08c0: 203c 5454 3e2f 666f 6f2f 6261 722f 3c2f - 0x08d0: 5454 3e20 7769 6c6c 2067 6976 6520 7468 - 0x08e0: 6520 636f 6e74 656e 7473 206f 6620 7468 - 0x08f0: 6520 6669 6c65 203c 5454 3e2f 7661 722f - 0x0900: 7777 772f 666f 6f2f 6261 722f 696e 6465 - 0x0910: 782e 6874 6d6c 3c2f 5454 3e0a 6966 2069 - 0x0920: 7420 6578 6973 7473 2028 6173 7375 6d69 - 0x0930: 6e67 2074 6861 7420 3c54 543e 2f76 6172 - 0x0940: 2f77 7777 3c2f 5454 3e20 6973 2079 6f75 - 0x0950: 7220 3c54 543e 446f 6375 6d65 6e74 526f - 0x0960: 6f74 3c2f 5454 3e29 2e3c 2f4c 493e 0a0a - 0x0970: 3c4c 493e 0a55 7365 7220 6469 7265 6374 - 0x0980: 6f72 6965 7320 6172 6520 656e 6162 6c65 - 0x0990: 642c 2061 6e64 2075 7365 7220 646f 6375 - 0x09a0: 6d65 6e74 7320 7769 6c6c 2062 6520 6c6f - 0x09b0: 6f6b 6564 2066 6f72 0a69 6e20 7468 6520 - 0x09c0: 3c54 543e 7075 626c 6963 5f68 746d 6c3c - 0x09d0: 2f54 543e 2064 6972 6563 746f 7279 206f - 0x09e0: 6620 7468 6520 7573 6572 7327 2068 6f6d - 0x09f0: 6573 2e20 2054 6865 7365 2064 6972 730a - 0x0a00: 7368 6f75 6c64 2062 6520 756e 6465 7220 - 0x0a10: 3c54 543e 2f68 6f6d 653c 2f54 543e 2c20 - 0x0a20: 616e 6420 7573 6572 7320 7769 6c6c 206e - 0x0a30: 6f74 2062 6520 6162 6c65 2074 6f20 7379 - 0x0a40: 6d6c 696e 6b0a 746f 2066 696c 6573 2074 - 0x0a50: 6865 7920 646f 6e27 7420 6f77 6e2e 3c2f - 0x0a60: 4c49 3e0a 0a3c 2f55 4c3e 0a41 6c6c 2074 - 0x0a70: 6865 2073 7461 6e64 6172 6420 6170 6163 - 0x0a80: 6865 206d 6f64 756c 6573 2061 7265 2061 - 0x0a90: 7661 696c 6162 6c65 2077 6974 6820 7468 - 0x0aa0: 6973 2072 656c 6561 7365 2061 6e64 2061 - 0x0ab0: 7265 0a6e 6f77 206d 616e 6167 6564 2077 - 0x0ac0: 6974 6820 6465 6263 6f6e 662e 2020 5479 - 0x0ad0: 7065 203c 5454 3e64 706b 672d 7265 636f - 0x0ae0: 6e66 6967 7572 6520 6170 6163 6865 3c2f - 0x0af0: 5454 3e20 746f 0a73 656c 6563 7420 7768 - 0x0b00: 6963 6820 6d6f 6475 6c65 7320 796f 7520 - 0x0b10: 7761 6e74 2065 6e61 626c 6564 2e20 204d - 0x0b20: 616e 7920 6f74 6865 7220 6d6f 6475 6c65 - 0x0b30: 7320 6172 6520 6176 6169 6c61 626c 650a - 0x0b40: 7468 726f 7567 6820 7468 6520 4465 6269 - 0x0b50: 616e 2070 6163 6b61 6765 2073 7973 7465 - 0x0b60: 6d20 7769 7468 2074 6865 206e 616d 6573 - 0x0b70: 203c 5454 3e6c 6962 6170 6163 6865 2d6d - 0x0b80: 6f64 2d2a 3c2f 5454 3e2e 0a49 6620 796f - 0x0b90: 7520 6e65 6564 2074 6f20 636f 6d70 696c - 0x0ba0: 6520 6120 6d6f 6475 6c65 2079 6f75 7273 - 0x0bb0: 656c 662c 2079 6f75 2077 696c 6c20 6e65 - 0x0bc0: 6564 2074 6f20 696e 7374 616c 6c20 7468 - 0x0bd0: 650a 3c54 543e 6170 6163 6865 2d64 6576 - 0x0be0: 3c2f 5454 3e20 7061 636b 6167 652e 0a0a - 0x0bf0: 3c50 3e4d 6f72 6520 646f 6375 6d65 6e74 - 0x0c00: 6174 696f 6e20 6f6e 2041 7061 6368 6520 - 0x0c10: 6361 6e20 6265 2066 6f75 6e64 206f 6e3a - 0x0c20: 0a3c 554c 3e0a 3c4c 493e 0a54 6865 203c - 0x0c30: 4120 4852 4546 3d22 2f64 6f63 2f61 7061 - 0x0c40: 6368 652d 646f 632f 6d61 6e75 616c 2f22 - 0x0c50: 3e41 7061 6368 6520 646f 6375 6d65 6e74 - 0x0c60: 6174 696f 6e3c 2f41 3e20 7374 6f72 6564 - 0x0c70: 206f 6e20 796f 7572 2073 6572 7665 722e - 0x0c80: 3c2f 4c49 3e0a 0a3c 4c49 3e0a 5468 6520 - 0x0c90: 3c41 2048 5245 463d 2268 7474 703a 2f2f - 0x0ca0: 7777 772e 6170 6163 6865 2e6f 7267 2f22 - 0x0cb0: 3e41 7061 6368 6520 5072 6f6a 6563 743c - 0x0cc0: 2f41 3e20 686f 6d65 2073 6974 652e 3c2f - 0x0cd0: 4c49 3e0a 0a3c 4c49 3e0a 5468 6520 3c41 - 0x0ce0: 2048 5245 463d 2268 7474 703a 2f2f 7777 - 0x0cf0: 772e 6170 6163 6865 2d73 736c 2e6f 7267 - 0x0d00: 2f22 3e41 7061 6368 652d 5353 4c3c 2f41 - 0x0d10: 3e20 686f 6d65 2073 6974 652e 3c2f 4c49 - 0x0d20: 3e0a 0a3c 4c49 3e0a 5468 6520 3c41 2048 - 0x0d30: 5245 463d 2268 7474 703a 2f2f 7065 726c - 0x0d40: 2e61 7061 6368 652e 6f72 672f 223e 6d6f - 0x0d50: 6420 7065 726c 3c2f 413e 2068 6f6d 6520 - 0x0d60: 7369 7465 2e3c 2f4c 493e 0a0a 3c4c 493e - 0x0d70: 0a54 6865 203c 4120 4852 4546 3d22 6874 - 0x0d80: 7470 3a2f 2f77 7777 2e61 7061 6368 6577 - 0x0d90: 6565 6b2e 636f 6d2f 223e 4170 6163 6865 - 0x0da0: 5765 656b 3c2f 413e 206e 6577 736c 6574 - 0x0db0: 7465 722e 3c2f 4c49 3e0a 0a3c 4c49 3e0a - 0x0dc0: 5468 6520 3c41 2048 5245 463d 2268 7474 - 0x0dd0: 703a 2f2f 7777 772e 6465 6269 616e 2e6f - 0x0de0: 7267 2f64 6f63 2f22 3e44 6562 6961 6e20 - 0x0df0: 5072 6f6a 6563 740a 446f 6375 6d65 6e74 - 0x0e00: 6174 696f 6e3c 2f41 3e20 7768 6963 6820 - 0x0e10: 636f 6e74 6169 6e73 2048 4f57 544f 732c - 0x0e20: 2046 4151 732c 2061 6e64 2073 6f66 7477 - 0x0e30: 6172 6520 7570 6461 7465 732e 3c2f 4c49 - 0x0e40: 3e0a 3c2f 554c 3e0a 0a3c 503e 596f 7520 - 0x0e50: 6361 6e20 616c 736f 2063 6f6e 7375 6c74 - 0x0e60: 2074 6865 206c 6973 7420 6f66 203c 4120 - 0x0e70: 4852 4546 3d22 6874 7470 3a2f 2f77 7777 - 0x0e80: 2e62 6f75 7465 6c6c 2e63 6f6d 2f66 6171 - 0x0e90: 2f22 3e57 6f72 6c64 0a57 6964 6520 5765 - 0x0ea0: 6220 4672 6571 7565 6e74 6c79 2041 736b - 0x0eb0: 6564 2051 7565 7374 696f 6e73 3c2f 413e - 0x0ec0: 2066 6f72 2069 6e66 6f72 6d61 7469 6f6e - 0x0ed0: 2e0a 0a3c 4832 3e4c 6574 206f 7468 6572 - 0x0ee0: 2070 656f 706c 6520 6b6e 6f77 2061 626f - 0x0ef0: 7574 2074 6869 7320 7365 7276 6572 3c2f - 0x0f00: 4832 3e0a 0a3c 4120 4852 4546 3d22 6874 - 0x0f10: 7470 3a2f 2f6e 6574 6372 6166 742e 636f - 0x0f20: 6d2f 223e 4e65 7463 7261 6674 3c2f 413e - 0x0f30: 2070 726f 7669 6465 7320 616e 2069 6e74 - 0x0f40: 6572 6573 7469 6e67 2066 7265 650a 7365 - 0x0f50: 7276 6963 6520 666f 7220 7765 6220 7369 - 0x0f60: 7465 206d 6f6e 6974 6f72 696e 6720 616e - 0x0f70: 6420 7374 6174 6973 7469 6320 636f 6c6c - 0x0f80: 6563 7469 6f6e 2e0a 596f 7520 6361 6e20 - 0x0f90: 6c65 7420 7468 656d 206b 6e6f 7720 6162 - 0x0fa0: 6f75 7420 796f 7572 2073 6572 7665 7220 - 0x0fb0: 7573 696e 6720 7468 6569 720a 3c41 2048 - 0x0fc0: 5245 463d 2268 7474 703a 2f2f 7570 7469 - 0x0fd0: 6d65 2e6e 6574 6372 6166 742e 636f 6d2f - 0x0fe0: 223e 696e 7465 7266 6163 653c 2f41 3e2e - 0x0ff0: 0a45 6e61 626c 696e 6720 7468 6520 6d6f - 0x1000: 6e69 746f 7269 6e67 206f 6620 796f 7572 - 0x1010: 2073 6572 7665 7220 7769 6c6c 2070 726f - 0x1020: 7669 6465 2061 2062 6574 7465 7220 676c - 0x1030: 6f62 616c 206f 7665 7276 6965 770a 6f66 - 0x1040: 2077 686f 2069 7320 7573 696e 6720 7768 - 0x1050: 6174 2061 6e64 2077 6865 7265 2c20 616e - 0x1060: 6420 6974 2077 6f75 6c64 2067 6976 6520 - 0x1070: 4465 6269 616e 2061 2062 6574 7465 720a - 0x1080: 6f76 6572 7669 6577 206f 6620 7468 6520 - 0x1090: 6170 6163 6865 2070 6163 6b61 6765 2075 - 0x10a0: 7361 6765 2e0a 0a3c 4832 3e41 626f 7574 - 0x10b0: 2074 6869 7320 7061 6765 3c2f 4832 3e0a - 0x10c0: 0a3c 494d 4720 414c 4947 4e3d 2272 6967 - 0x10d0: 6874 2220 414c 543d 2222 2048 4549 4748 - 0x10e0: 543d 2232 3437 2220 5749 4454 483d 2232 - 0x10f0: 3738 2220 5352 433d 2269 636f 6e73 2f6a - 0x1100: 6865 3036 312e 706e 6722 3e0a 0a3c 503e - 0x1110: 5468 6973 2069 7320 6120 706c 6163 6568 - 0x1120: 6f6c 6465 7220 7061 6765 2069 6e73 7461 - 0x1130: 6c6c 6564 2062 7920 7468 6520 3c41 0a48 - 0x1140: 5245 463d 2268 7474 703a 2f2f 7777 772e - 0x1150: 6465 6269 616e 2e6f 7267 2f22 3e44 6562 - 0x1160: 6961 6e3c 2f41 3e0a 7265 6c65 6173 6520 - 0x1170: 6f66 2074 6865 2061 7061 6368 6520 5765 - 0x1180: 6220 7365 7276 6572 2070 6163 6b61 6765 - 0x1190: 2e0a 0a3c 503e 5468 6973 2063 6f6d 7075 - 0x11a0: 7465 7220 6861 7320 696e 7374 616c 6c65 - 0x11b0: 6420 7468 6520 4465 6269 616e 2047 4e55 - 0x11c0: 2f4c 696e 7578 206f 7065 7261 7469 6e67 - 0x11d0: 2073 7973 7465 6d2c 0a62 7574 2069 7420 - 0x11e0: 6861 7320 3c73 7472 6f6e 673e 6e6f 7468 - 0x11f0: 696e 6720 746f 2064 6f20 7769 7468 2074 - 0x1200: 6865 2044 6562 6961 6e0a 5072 6f6a 6563 - 0x1210: 743c 2f73 7472 6f6e 673e 2e20 506c 6561 - 0x1220: 7365 2064 6f20 3c73 7472 6f6e 673e 6e6f - 0x1230: 743c 2f73 7472 6f6e 673e 2063 6f6e 7461 - 0x1240: 6374 2074 6865 2044 6562 6961 6e0a 5072 - 0x1250: 6f6a 6563 7420 6162 6f75 7420 6974 2e3c - 0x1260: 2f50 3e0a 0a3c 503e 4966 2079 6f75 2066 - 0x1270: 696e 6420 6120 6275 6720 696e 2074 6869 - 0x1280: 7320 6170 6163 6865 2070 6163 6b61 6765 - 0x1290: 2c20 6f72 2069 6e20 4170 6163 6865 2069 - 0x12a0: 7473 656c 662c 0a70 6c65 6173 6520 6669 - 0x12b0: 6c65 2061 2062 7567 2072 6570 6f72 7420 - 0x12c0: 6f6e 2069 742e 2020 496e 7374 7275 6374 - 0x12d0: 696f 6e73 206f 6e20 646f 696e 6720 7468 - 0x12e0: 6973 2c20 616e 6420 7468 650a 6c69 7374 - 0x12f0: 206f 6620 3c41 2048 5245 463d 2268 7474 - 0x1300: 703a 2f2f 6275 6773 2e64 6562 6961 6e2e - 0x1310: 6f72 672f 7372 633a 6170 6163 6865 223e - 0x1320: 6b6e 6f77 6e20 6275 6773 3c2f 413e 206f - 0x1330: 6620 7468 6973 0a70 6163 6b61 6765 2c20 - 0x1340: 6361 6e20 6265 2066 6f75 6e64 2069 6e20 - 0x1350: 7468 6520 0a3c 4120 4852 4546 3d22 6874 - 0x1360: 7470 3a2f 2f77 7777 2e64 6562 6961 6e2e - 0x1370: 6f72 672f 4275 6773 2f52 6570 6f72 7469 - 0x1380: 6e67 223e 4465 6269 616e 2042 7567 2054 - 0x1390: 7261 636b 696e 6720 5379 7374 656d 3c2f - 0x13a0: 413e 2e0a 0a3c 503e 5468 616e 6b73 2066 - 0x13b0: 6f72 2075 7369 6e67 2074 6869 7320 7061 - 0x13c0: 636b 6167 652c 2061 6e64 2063 6f6e 6772 - 0x13d0: 6174 756c 6174 696f 6e73 2066 6f72 2079 - 0x13e0: 6f75 7220 6368 6f69 6365 206f 660a 6120 - 0x13f0: 4465 6269 616e 2073 7973 7465 6d21 3c2f - 0x1400: 503e 0a0a 3c44 4956 2061 6c69 676e 3d22 - 0x1410: 6365 6e74 6572 223e 0a3c 6120 6872 6566 - 0x1420: 3d22 6874 7470 3a2f 2f77 7777 2e64 6562 - 0x1430: 6961 6e2e 6f72 672f 223e 0a3c 494d 4720 - 0x1440: 616c 6967 6e3d 226d 6964 646c 6522 2068 - 0x1450: 6569 6768 743d 2233 3022 2077 6964 7468 - 0x1460: 3d22 3235 2220 7372 633d 2269 636f 6e73 - 0x1470: 2f64 6562 6961 6e2f 6f70 656e 6c6f 676f - 0x1480: 2d32 352e 6a70 6722 2061 6c74 3d22 4465 - 0x1490: 6269 616e 223e 0a3c 2f61 3e0a 3c61 2068 - 0x14a0: 7265 663d 2268 7474 703a 2f2f 7777 772e - 0x14b0: 6170 6163 6865 2e6f 7267 2f22 3e0a 3c49 - 0x14c0: 4d47 2061 6c69 676e 3d22 6d69 6464 6c65 - 0x14d0: 2220 6865 6967 6874 3d22 3332 2220 7769 - 0x14e0: 6474 683d 2232 3539 2220 7372 633d 2269 - 0x14f0: 636f 6e73 2f61 7061 6368 655f 7062 2e70 - 0x1500: 6e67 2220 616c 743d 2241 7061 6368 6522 - 0x1510: 3e0a 3c2f 613e 0a3c 2f44 4956 3e0a 0a3c - 0x1520: 212d 2d0a 2020 5468 6973 2070 6167 6520 - 0x1530: 7761 7320 696e 6974 6961 6c6c 7920 6372 - 0x1540: 6561 7465 6420 6279 204a 6f68 6e69 6520 - 0x1550: 496e 6772 616d 2028 6874 7470 3a2f 2f6e - 0x1560: 6574 676f 642e 6e65 742f 290a 2020 4974 - 0x1570: 2077 6173 206c 6174 6572 2065 6469 7465 - 0x1580: 6420 6279 204d 6174 7468 6577 2057 696c - 0x1590: 636f 7820 616e 6420 4a6f 7369 7020 526f - 0x15a0: 6469 6e2e 0a20 204c 6173 7420 6d6f 6469 - 0x15b0: 6669 6564 3a20 2444 6174 653a 2032 3030 - 0x15c0: 342f 3036 2f32 3020 3135 3a33 333a 3537 - 0x15d0: 2024 2e0a 2020 2d2d 3e0a 0a3c 2f42 4f44 - 0x15e0: 593e 0a3c 2f48 544d 4c3e 0a -23:57:35.941260 IP 127.0.0.1.55920 > 127.0.0.1.80: . ack 5560 win 12383 - 0x0000: 4500 0034 1b6e 4000 4006 2154 7f00 0001 - 0x0010: 7f00 0001 da70 0050 3758 8a49 377a a3a9 - 0x0020: 8010 305f 10ea 0000 0101 080a 4ddc 9219 - 0x0030: 4ddc 9219 -23:57:37.229575 IP 127.0.0.1.55920 > 127.0.0.1.80: F 203:203(0) ack 5560 win 12383 - 0x0000: 4500 0034 1b70 4000 4006 2152 7f00 0001 - 0x0010: 7f00 0001 da70 0050 3758 8a49 377a a3a9 - 0x0020: 8011 305f 0be1 0000 0101 080a 4ddc 9721 - 0x0030: 4ddc 9219 -23:57:37.230839 IP 127.0.0.1.80 > 127.0.0.1.55920: F 5560:5560(0) ack 204 win 8192 - 0x0000: 4500 0034 1fe8 4000 4006 1cda 7f00 0001 - 0x0010: 7f00 0001 0050 da70 377a a3a9 3758 8a4a - 0x0020: 8011 2000 1735 0000 0101 080a 4ddc 9723 - 0x0030: 4ddc 9721 -23:57:37.230900 IP 127.0.0.1.55920 > 127.0.0.1.80: . ack 5561 win 12383 - 0x0000: 4500 0034 1b72 4000 4006 2150 7f00 0001 - 0x0010: 7f00 0001 da70 0050 3758 8a4a 377a a3aa - 0x0020: 8010 305f 06d4 0000 0101 080a 4ddc 9723 - 0x0030: 4ddc 9723 diff --git a/tests/print-xx.out b/tests/print-xx.out deleted file mode 100644 index 82323d4210e9..000000000000 --- a/tests/print-xx.out +++ /dev/null @@ -1,419 +0,0 @@ -23:57:35.938066 IP 127.0.0.1.55920 > 127.0.0.1.80: S 928549246:928549246(0) win 32767 - 0x0000: 0000 0000 0000 0000 0000 0000 0800 4500 - 0x0010: 003c 1b68 4000 4006 2152 7f00 0001 7f00 - 0x0020: 0001 da70 0050 3758 897e 0000 0000 a002 - 0x0030: 7fff 1421 0000 0204 400c 0402 080a 4ddc - 0x0040: 9216 0000 0000 0103 0302 -23:57:35.938122 IP 127.0.0.1.80 > 127.0.0.1.55920: S 930778609:930778609(0) ack 928549247 win 32767 - 0x0000: 0000 0000 0000 0000 0000 0000 0800 4500 - 0x0010: 003c 0000 4000 4006 3cba 7f00 0001 7f00 - 0x0020: 0001 0050 da70 377a 8df1 3758 897f a012 - 0x0030: 7fff 6eb1 0000 0204 400c 0402 080a 4ddc - 0x0040: 9216 4ddc 9216 0103 0302 -23:57:35.938167 IP 127.0.0.1.55920 > 127.0.0.1.80: . ack 1 win 8192 - 0x0000: 0000 0000 0000 0000 0000 0000 0800 4500 - 0x0010: 0034 1b6a 4000 4006 2158 7f00 0001 7f00 - 0x0020: 0001 da70 0050 3758 897f 377a 8df2 8010 - 0x0030: 2000 37d0 0000 0101 080a 4ddc 9216 4ddc - 0x0040: 9216 -23:57:35.939423 IP 127.0.0.1.55920 > 127.0.0.1.80: P 1:203(202) ack 1 win 8192 - 0x0000: 0000 0000 0000 0000 0000 0000 0800 4500 - 0x0010: 00fe 1b6c 4000 4006 208c 7f00 0001 7f00 - 0x0020: 0001 da70 0050 3758 897f 377a 8df2 8018 - 0x0030: 2000 fef2 0000 0101 080a 4ddc 9217 4ddc - 0x0040: 9216 4745 5420 2f20 4854 5450 2f31 2e31 - 0x0050: 0d0a 486f 7374 3a20 6c6f 6361 6c68 6f73 - 0x0060: 740d 0a55 7365 722d 4167 656e 743a 2045 - 0x0070: 4c69 6e6b 732f 302e 3130 2e34 2d37 2d64 - 0x0080: 6562 6961 6e20 2874 6578 746d 6f64 653b - 0x0090: 204c 696e 7578 2032 2e36 2e31 312d 312d - 0x00a0: 3638 362d 736d 7020 6936 3836 3b20 3133 - 0x00b0: 3278 3536 2d32 290d 0a41 6363 6570 743a - 0x00c0: 202a 2f2a 0d0a 4163 6365 7074 2d45 6e63 - 0x00d0: 6f64 696e 673a 2067 7a69 700d 0a41 6363 - 0x00e0: 6570 742d 4c61 6e67 7561 6765 3a20 656e - 0x00f0: 0d0a 436f 6e6e 6563 7469 6f6e 3a20 4b65 - 0x0100: 6570 2d41 6c69 7665 0d0a 0d0a -23:57:35.940474 IP 127.0.0.1.80 > 127.0.0.1.55920: . ack 203 win 8192 - 0x0000: 0000 0000 0000 0000 0000 0000 0800 4500 - 0x0010: 0034 1fe4 4000 4006 1cde 7f00 0001 7f00 - 0x0020: 0001 0050 da70 377a 8df2 3758 8a49 8010 - 0x0030: 2000 3703 0000 0101 080a 4ddc 9218 4ddc - 0x0040: 9217 -23:57:35.941232 IP 127.0.0.1.80 > 127.0.0.1.55920: P 1:5560(5559) ack 203 win 8192 - 0x0000: 0000 0000 0000 0000 0000 0000 0800 4500 - 0x0010: 15eb 1fe6 4000 4006 0725 7f00 0001 7f00 - 0x0020: 0001 0050 da70 377a 8df2 3758 8a49 8018 - 0x0030: 2000 13e0 0000 0101 080a 4ddc 9219 4ddc - 0x0040: 9217 4854 5450 2f31 2e31 2032 3030 204f - 0x0050: 4b0d 0a44 6174 653a 2057 6564 2c20 3036 - 0x0060: 204a 756c 2032 3030 3520 3033 3a35 373a - 0x0070: 3335 2047 4d54 0d0a 5365 7276 6572 3a20 - 0x0080: 4170 6163 6865 2f31 2e33 2e33 330d 0a4c - 0x0090: 6173 742d 4d6f 6469 6669 6564 3a20 5375 - 0x00a0: 6e2c 2031 3520 4175 6720 3230 3034 2030 - 0x00b0: 303a 3433 3a34 3120 474d 540d 0a45 5461 - 0x00c0: 673a 2022 3665 3830 6630 2d31 3438 612d - 0x00d0: 3431 3165 6231 6264 220d 0a41 6363 6570 - 0x00e0: 742d 5261 6e67 6573 3a20 6279 7465 730d - 0x00f0: 0a43 6f6e 7465 6e74 2d4c 656e 6774 683a - 0x0100: 2035 3235 380d 0a4b 6565 702d 416c 6976 - 0x0110: 653a 2074 696d 656f 7574 3d31 352c 206d - 0x0120: 6178 3d31 3030 0d0a 436f 6e6e 6563 7469 - 0x0130: 6f6e 3a20 4b65 6570 2d41 6c69 7665 0d0a - 0x0140: 436f 6e74 656e 742d 5479 7065 3a20 7465 - 0x0150: 7874 2f68 746d 6c3b 2063 6861 7273 6574 - 0x0160: 3d69 736f 2d38 3835 392d 310d 0a0d 0a3c - 0x0170: 2144 4f43 5459 5045 2048 544d 4c20 5055 - 0x0180: 424c 4943 2022 2d2f 2f57 3343 2f2f 4454 - 0x0190: 4420 4854 4d4c 2034 2e30 3120 5472 616e - 0x01a0: 7369 7469 6f6e 616c 2f2f 454e 223e 0a3c - 0x01b0: 4854 4d4c 3e0a 3c48 4541 443e 0a20 2020 - 0x01c0: 3c4d 4554 4120 4854 5450 2d45 5155 4956 - 0x01d0: 3d22 436f 6e74 656e 742d 5479 7065 2220 - 0x01e0: 434f 4e54 454e 543d 2274 6578 742f 6874 - 0x01f0: 6d6c 3b20 6368 6172 7365 743d 6973 6f2d - 0x0200: 3838 3539 2d31 223e 0a20 2020 3c4d 4554 - 0x0210: 4120 4e41 4d45 3d22 4465 7363 7269 7074 - 0x0220: 696f 6e22 2043 4f4e 5445 4e54 3d22 5468 - 0x0230: 6520 696e 6974 6961 6c20 696e 7374 616c - 0x0240: 6c61 7469 6f6e 206f 6620 4465 6269 616e - 0x0250: 2061 7061 6368 652e 223e 0a20 2020 3c54 - 0x0260: 4954 4c45 3e50 6c61 6365 686f 6c64 6572 - 0x0270: 2070 6167 653c 2f54 4954 4c45 3e0a 3c2f - 0x0280: 4845 4144 3e0a 3c42 4f44 5920 5445 5854 - 0x0290: 3d22 2330 3030 3030 3022 2042 4743 4f4c - 0x02a0: 4f52 3d22 2346 4646 4646 4622 204c 494e - 0x02b0: 4b3d 2223 3030 3030 4546 2220 564c 494e - 0x02c0: 4b3d 2223 3535 3138 3841 2220 414c 494e - 0x02d0: 4b3d 2223 4646 3030 3030 223e 0a0a 3c48 - 0x02e0: 313e 506c 6163 6568 6f6c 6465 7220 7061 - 0x02f0: 6765 3c2f 4831 3e0a 3c48 323e 4966 2079 - 0x0300: 6f75 2061 7265 206a 7573 7420 6272 6f77 - 0x0310: 7369 6e67 2074 6865 2077 6562 3c2f 6832 - 0x0320: 3e0a 0a3c 503e 5468 6520 6f77 6e65 7220 - 0x0330: 6f66 2074 6869 7320 7765 6220 7369 7465 - 0x0340: 2068 6173 206e 6f74 2070 7574 2075 7020 - 0x0350: 616e 7920 7765 6220 7061 6765 7320 7965 - 0x0360: 742e 0a50 6c65 6173 6520 636f 6d65 2062 - 0x0370: 6163 6b20 6c61 7465 722e 3c2f 503e 0a0a - 0x0380: 3c50 3e3c 534d 414c 4c3e 3c43 4954 453e - 0x0390: 4d6f 7665 2061 6c6f 6e67 2c20 6e6f 7468 - 0x03a0: 696e 6720 746f 2073 6565 2068 6572 652e - 0x03b0: 2e2e 3c2f 4349 5445 3e20 3a2d 293c 2f53 - 0x03c0: 4d41 4c4c 3e3c 2f50 3e0a 0a3c 4832 3e49 - 0x03d0: 6620 796f 7520 6172 6520 7472 7969 6e67 - 0x03e0: 2074 6f20 6c6f 6361 7465 2074 6865 2061 - 0x03f0: 646d 696e 6973 7472 6174 6f72 206f 6620 - 0x0400: 7468 6973 206d 6163 6869 6e65 3c2f 4832 - 0x0410: 3e0a 0a3c 503e 4966 2079 6f75 2077 616e - 0x0420: 7420 746f 2072 6570 6f72 7420 736f 6d65 - 0x0430: 7468 696e 6720 6162 6f75 7420 7468 6973 - 0x0440: 2068 6f73 7427 7320 6265 6861 7669 6f72 - 0x0450: 2c20 706c 6561 7365 0a63 6f6e 7461 6374 - 0x0460: 2074 6865 2049 6e74 6572 6e65 7420 5365 - 0x0470: 7276 6963 6520 5072 6f76 6964 6572 2028 - 0x0480: 4953 5029 2069 6e76 6f6c 7665 6420 6469 - 0x0490: 7265 6374 6c79 2e3c 2f50 3e0a 0a3c 503e - 0x04a0: 5365 6520 7468 6520 3c41 2068 7265 663d - 0x04b0: 2268 7474 703a 2f2f 7777 772e 6162 7573 - 0x04c0: 652e 6e65 742f 223e 4e65 7477 6f72 6b20 - 0x04d0: 4162 7573 650a 436c 6561 7269 6e67 686f - 0x04e0: 7573 653c 2f41 3e20 666f 7220 686f 7720 - 0x04f0: 746f 2064 6f20 7468 6973 2e3c 2f50 3e0a - 0x0500: 0a3c 4832 3e49 6620 796f 7520 6172 6520 - 0x0510: 7468 6520 6164 6d69 6e69 7374 7261 746f - 0x0520: 7220 6f66 2074 6869 7320 6d61 6368 696e - 0x0530: 653c 2f48 323e 0a0a 3c50 3e54 6865 2069 - 0x0540: 6e69 7469 616c 2069 6e73 7461 6c6c 6174 - 0x0550: 696f 6e20 6f66 203c 4120 6872 6566 3d22 - 0x0560: 6874 7470 3a2f 2f77 7777 2e64 6562 6961 - 0x0570: 6e2e 6f72 672f 223e 4465 6269 616e 2773 - 0x0580: 0a61 7061 6368 653c 2f41 3e20 7765 6220 - 0x0590: 7365 7276 6572 2070 6163 6b61 6765 2077 - 0x05a0: 6173 2073 7563 6365 7373 6675 6c2e 3c2f - 0x05b0: 503e 0a0a 3c50 3e3c 5354 524f 4e47 3e59 - 0x05c0: 6f75 2073 686f 756c 6420 7265 706c 6163 - 0x05d0: 6520 7468 6973 2070 6167 6520 7769 7468 - 0x05e0: 2079 6f75 7220 6f77 6e20 7765 6220 7061 - 0x05f0: 6765 7320 6173 0a73 6f6f 6e20 6173 2070 - 0x0600: 6f73 7369 626c 652e 3c2f 5354 524f 4e47 - 0x0610: 3e3c 2f50 3e0a 0a3c 503e 556e 6c65 7373 - 0x0620: 2079 6f75 2063 6861 6e67 6564 2069 7473 - 0x0630: 2063 6f6e 6669 6775 7261 7469 6f6e 2c20 - 0x0640: 796f 7572 206e 6577 2073 6572 7665 7220 - 0x0650: 6973 2063 6f6e 6669 6775 7265 6420 6173 - 0x0660: 2066 6f6c 6c6f 7773 3a0a 3c55 4c3e 0a3c - 0x0670: 4c49 3e0a 436f 6e66 6967 7572 6174 696f - 0x0680: 6e20 6669 6c65 7320 6361 6e20 6265 2066 - 0x0690: 6f75 6e64 2069 6e20 3c54 543e 2f65 7463 - 0x06a0: 2f61 7061 6368 653c 2f54 543e 2e3c 2f4c - 0x06b0: 493e 0a0a 3c4c 493e 0a54 6865 203c 5454 - 0x06c0: 3e44 6f63 756d 656e 7452 6f6f 743c 2f54 - 0x06d0: 543e 2c20 7768 6963 6820 6973 2074 6865 - 0x06e0: 2064 6972 6563 746f 7279 2075 6e64 6572 - 0x06f0: 2077 6869 6368 2061 6c6c 2079 6f75 720a - 0x0700: 4854 4d4c 2066 696c 6573 2073 686f 756c - 0x0710: 6420 6578 6973 742c 2069 7320 7365 7420 - 0x0720: 746f 203c 5454 3e2f 7661 722f 7777 773c - 0x0730: 2f54 543e 2e3c 2f4c 493e 0a0a 3c4c 493e - 0x0740: 0a43 4749 2073 6372 6970 7473 2061 7265 - 0x0750: 206c 6f6f 6b65 6420 666f 7220 696e 203c - 0x0760: 5454 3e2f 7573 722f 6c69 622f 6367 692d - 0x0770: 6269 6e3c 2f54 543e 2c20 7768 6963 6820 - 0x0780: 6973 2077 6865 7265 0a44 6562 6961 6e20 - 0x0790: 7061 636b 6167 6573 2077 696c 6c20 706c - 0x07a0: 6163 6520 7468 6569 7220 7363 7269 7074 - 0x07b0: 732e 3c2f 4c49 3e0a 0a3c 4c49 3e0a 4c6f - 0x07c0: 6720 6669 6c65 7320 6172 6520 706c 6163 - 0x07d0: 6564 2069 6e20 3c54 543e 2f76 6172 2f6c - 0x07e0: 6f67 2f61 7061 6368 653c 2f54 543e 2c20 - 0x07f0: 616e 6420 7769 6c6c 2062 6520 726f 7461 - 0x0800: 7465 640a 7765 656b 6c79 2e20 2054 6865 - 0x0810: 2066 7265 7175 656e 6379 206f 6620 726f - 0x0820: 7461 7469 6f6e 2063 616e 2062 6520 6561 - 0x0830: 7369 6c79 2063 6861 6e67 6564 2062 7920 - 0x0840: 6564 6974 696e 670a 3c54 543e 2f65 7463 - 0x0850: 2f6c 6f67 726f 7461 7465 2e64 2f61 7061 - 0x0860: 6368 653c 2f54 543e 2e3c 2f4c 493e 0a0a - 0x0870: 3c4c 493e 0a54 6865 2064 6566 6175 6c74 - 0x0880: 2064 6972 6563 746f 7279 2069 6e64 6578 - 0x0890: 2069 7320 3c54 543e 696e 6465 782e 6874 - 0x08a0: 6d6c 3c2f 5454 3e2c 206d 6561 6e69 6e67 - 0x08b0: 2074 6861 7420 7265 7175 6573 7473 0a66 - 0x08c0: 6f72 2061 2064 6972 6563 746f 7279 203c - 0x08d0: 5454 3e2f 666f 6f2f 6261 722f 3c2f 5454 - 0x08e0: 3e20 7769 6c6c 2067 6976 6520 7468 6520 - 0x08f0: 636f 6e74 656e 7473 206f 6620 7468 6520 - 0x0900: 6669 6c65 203c 5454 3e2f 7661 722f 7777 - 0x0910: 772f 666f 6f2f 6261 722f 696e 6465 782e - 0x0920: 6874 6d6c 3c2f 5454 3e0a 6966 2069 7420 - 0x0930: 6578 6973 7473 2028 6173 7375 6d69 6e67 - 0x0940: 2074 6861 7420 3c54 543e 2f76 6172 2f77 - 0x0950: 7777 3c2f 5454 3e20 6973 2079 6f75 7220 - 0x0960: 3c54 543e 446f 6375 6d65 6e74 526f 6f74 - 0x0970: 3c2f 5454 3e29 2e3c 2f4c 493e 0a0a 3c4c - 0x0980: 493e 0a55 7365 7220 6469 7265 6374 6f72 - 0x0990: 6965 7320 6172 6520 656e 6162 6c65 642c - 0x09a0: 2061 6e64 2075 7365 7220 646f 6375 6d65 - 0x09b0: 6e74 7320 7769 6c6c 2062 6520 6c6f 6f6b - 0x09c0: 6564 2066 6f72 0a69 6e20 7468 6520 3c54 - 0x09d0: 543e 7075 626c 6963 5f68 746d 6c3c 2f54 - 0x09e0: 543e 2064 6972 6563 746f 7279 206f 6620 - 0x09f0: 7468 6520 7573 6572 7327 2068 6f6d 6573 - 0x0a00: 2e20 2054 6865 7365 2064 6972 730a 7368 - 0x0a10: 6f75 6c64 2062 6520 756e 6465 7220 3c54 - 0x0a20: 543e 2f68 6f6d 653c 2f54 543e 2c20 616e - 0x0a30: 6420 7573 6572 7320 7769 6c6c 206e 6f74 - 0x0a40: 2062 6520 6162 6c65 2074 6f20 7379 6d6c - 0x0a50: 696e 6b0a 746f 2066 696c 6573 2074 6865 - 0x0a60: 7920 646f 6e27 7420 6f77 6e2e 3c2f 4c49 - 0x0a70: 3e0a 0a3c 2f55 4c3e 0a41 6c6c 2074 6865 - 0x0a80: 2073 7461 6e64 6172 6420 6170 6163 6865 - 0x0a90: 206d 6f64 756c 6573 2061 7265 2061 7661 - 0x0aa0: 696c 6162 6c65 2077 6974 6820 7468 6973 - 0x0ab0: 2072 656c 6561 7365 2061 6e64 2061 7265 - 0x0ac0: 0a6e 6f77 206d 616e 6167 6564 2077 6974 - 0x0ad0: 6820 6465 6263 6f6e 662e 2020 5479 7065 - 0x0ae0: 203c 5454 3e64 706b 672d 7265 636f 6e66 - 0x0af0: 6967 7572 6520 6170 6163 6865 3c2f 5454 - 0x0b00: 3e20 746f 0a73 656c 6563 7420 7768 6963 - 0x0b10: 6820 6d6f 6475 6c65 7320 796f 7520 7761 - 0x0b20: 6e74 2065 6e61 626c 6564 2e20 204d 616e - 0x0b30: 7920 6f74 6865 7220 6d6f 6475 6c65 7320 - 0x0b40: 6172 6520 6176 6169 6c61 626c 650a 7468 - 0x0b50: 726f 7567 6820 7468 6520 4465 6269 616e - 0x0b60: 2070 6163 6b61 6765 2073 7973 7465 6d20 - 0x0b70: 7769 7468 2074 6865 206e 616d 6573 203c - 0x0b80: 5454 3e6c 6962 6170 6163 6865 2d6d 6f64 - 0x0b90: 2d2a 3c2f 5454 3e2e 0a49 6620 796f 7520 - 0x0ba0: 6e65 6564 2074 6f20 636f 6d70 696c 6520 - 0x0bb0: 6120 6d6f 6475 6c65 2079 6f75 7273 656c - 0x0bc0: 662c 2079 6f75 2077 696c 6c20 6e65 6564 - 0x0bd0: 2074 6f20 696e 7374 616c 6c20 7468 650a - 0x0be0: 3c54 543e 6170 6163 6865 2d64 6576 3c2f - 0x0bf0: 5454 3e20 7061 636b 6167 652e 0a0a 3c50 - 0x0c00: 3e4d 6f72 6520 646f 6375 6d65 6e74 6174 - 0x0c10: 696f 6e20 6f6e 2041 7061 6368 6520 6361 - 0x0c20: 6e20 6265 2066 6f75 6e64 206f 6e3a 0a3c - 0x0c30: 554c 3e0a 3c4c 493e 0a54 6865 203c 4120 - 0x0c40: 4852 4546 3d22 2f64 6f63 2f61 7061 6368 - 0x0c50: 652d 646f 632f 6d61 6e75 616c 2f22 3e41 - 0x0c60: 7061 6368 6520 646f 6375 6d65 6e74 6174 - 0x0c70: 696f 6e3c 2f41 3e20 7374 6f72 6564 206f - 0x0c80: 6e20 796f 7572 2073 6572 7665 722e 3c2f - 0x0c90: 4c49 3e0a 0a3c 4c49 3e0a 5468 6520 3c41 - 0x0ca0: 2048 5245 463d 2268 7474 703a 2f2f 7777 - 0x0cb0: 772e 6170 6163 6865 2e6f 7267 2f22 3e41 - 0x0cc0: 7061 6368 6520 5072 6f6a 6563 743c 2f41 - 0x0cd0: 3e20 686f 6d65 2073 6974 652e 3c2f 4c49 - 0x0ce0: 3e0a 0a3c 4c49 3e0a 5468 6520 3c41 2048 - 0x0cf0: 5245 463d 2268 7474 703a 2f2f 7777 772e - 0x0d00: 6170 6163 6865 2d73 736c 2e6f 7267 2f22 - 0x0d10: 3e41 7061 6368 652d 5353 4c3c 2f41 3e20 - 0x0d20: 686f 6d65 2073 6974 652e 3c2f 4c49 3e0a - 0x0d30: 0a3c 4c49 3e0a 5468 6520 3c41 2048 5245 - 0x0d40: 463d 2268 7474 703a 2f2f 7065 726c 2e61 - 0x0d50: 7061 6368 652e 6f72 672f 223e 6d6f 6420 - 0x0d60: 7065 726c 3c2f 413e 2068 6f6d 6520 7369 - 0x0d70: 7465 2e3c 2f4c 493e 0a0a 3c4c 493e 0a54 - 0x0d80: 6865 203c 4120 4852 4546 3d22 6874 7470 - 0x0d90: 3a2f 2f77 7777 2e61 7061 6368 6577 6565 - 0x0da0: 6b2e 636f 6d2f 223e 4170 6163 6865 5765 - 0x0db0: 656b 3c2f 413e 206e 6577 736c 6574 7465 - 0x0dc0: 722e 3c2f 4c49 3e0a 0a3c 4c49 3e0a 5468 - 0x0dd0: 6520 3c41 2048 5245 463d 2268 7474 703a - 0x0de0: 2f2f 7777 772e 6465 6269 616e 2e6f 7267 - 0x0df0: 2f64 6f63 2f22 3e44 6562 6961 6e20 5072 - 0x0e00: 6f6a 6563 740a 446f 6375 6d65 6e74 6174 - 0x0e10: 696f 6e3c 2f41 3e20 7768 6963 6820 636f - 0x0e20: 6e74 6169 6e73 2048 4f57 544f 732c 2046 - 0x0e30: 4151 732c 2061 6e64 2073 6f66 7477 6172 - 0x0e40: 6520 7570 6461 7465 732e 3c2f 4c49 3e0a - 0x0e50: 3c2f 554c 3e0a 0a3c 503e 596f 7520 6361 - 0x0e60: 6e20 616c 736f 2063 6f6e 7375 6c74 2074 - 0x0e70: 6865 206c 6973 7420 6f66 203c 4120 4852 - 0x0e80: 4546 3d22 6874 7470 3a2f 2f77 7777 2e62 - 0x0e90: 6f75 7465 6c6c 2e63 6f6d 2f66 6171 2f22 - 0x0ea0: 3e57 6f72 6c64 0a57 6964 6520 5765 6220 - 0x0eb0: 4672 6571 7565 6e74 6c79 2041 736b 6564 - 0x0ec0: 2051 7565 7374 696f 6e73 3c2f 413e 2066 - 0x0ed0: 6f72 2069 6e66 6f72 6d61 7469 6f6e 2e0a - 0x0ee0: 0a3c 4832 3e4c 6574 206f 7468 6572 2070 - 0x0ef0: 656f 706c 6520 6b6e 6f77 2061 626f 7574 - 0x0f00: 2074 6869 7320 7365 7276 6572 3c2f 4832 - 0x0f10: 3e0a 0a3c 4120 4852 4546 3d22 6874 7470 - 0x0f20: 3a2f 2f6e 6574 6372 6166 742e 636f 6d2f - 0x0f30: 223e 4e65 7463 7261 6674 3c2f 413e 2070 - 0x0f40: 726f 7669 6465 7320 616e 2069 6e74 6572 - 0x0f50: 6573 7469 6e67 2066 7265 650a 7365 7276 - 0x0f60: 6963 6520 666f 7220 7765 6220 7369 7465 - 0x0f70: 206d 6f6e 6974 6f72 696e 6720 616e 6420 - 0x0f80: 7374 6174 6973 7469 6320 636f 6c6c 6563 - 0x0f90: 7469 6f6e 2e0a 596f 7520 6361 6e20 6c65 - 0x0fa0: 7420 7468 656d 206b 6e6f 7720 6162 6f75 - 0x0fb0: 7420 796f 7572 2073 6572 7665 7220 7573 - 0x0fc0: 696e 6720 7468 6569 720a 3c41 2048 5245 - 0x0fd0: 463d 2268 7474 703a 2f2f 7570 7469 6d65 - 0x0fe0: 2e6e 6574 6372 6166 742e 636f 6d2f 223e - 0x0ff0: 696e 7465 7266 6163 653c 2f41 3e2e 0a45 - 0x1000: 6e61 626c 696e 6720 7468 6520 6d6f 6e69 - 0x1010: 746f 7269 6e67 206f 6620 796f 7572 2073 - 0x1020: 6572 7665 7220 7769 6c6c 2070 726f 7669 - 0x1030: 6465 2061 2062 6574 7465 7220 676c 6f62 - 0x1040: 616c 206f 7665 7276 6965 770a 6f66 2077 - 0x1050: 686f 2069 7320 7573 696e 6720 7768 6174 - 0x1060: 2061 6e64 2077 6865 7265 2c20 616e 6420 - 0x1070: 6974 2077 6f75 6c64 2067 6976 6520 4465 - 0x1080: 6269 616e 2061 2062 6574 7465 720a 6f76 - 0x1090: 6572 7669 6577 206f 6620 7468 6520 6170 - 0x10a0: 6163 6865 2070 6163 6b61 6765 2075 7361 - 0x10b0: 6765 2e0a 0a3c 4832 3e41 626f 7574 2074 - 0x10c0: 6869 7320 7061 6765 3c2f 4832 3e0a 0a3c - 0x10d0: 494d 4720 414c 4947 4e3d 2272 6967 6874 - 0x10e0: 2220 414c 543d 2222 2048 4549 4748 543d - 0x10f0: 2232 3437 2220 5749 4454 483d 2232 3738 - 0x1100: 2220 5352 433d 2269 636f 6e73 2f6a 6865 - 0x1110: 3036 312e 706e 6722 3e0a 0a3c 503e 5468 - 0x1120: 6973 2069 7320 6120 706c 6163 6568 6f6c - 0x1130: 6465 7220 7061 6765 2069 6e73 7461 6c6c - 0x1140: 6564 2062 7920 7468 6520 3c41 0a48 5245 - 0x1150: 463d 2268 7474 703a 2f2f 7777 772e 6465 - 0x1160: 6269 616e 2e6f 7267 2f22 3e44 6562 6961 - 0x1170: 6e3c 2f41 3e0a 7265 6c65 6173 6520 6f66 - 0x1180: 2074 6865 2061 7061 6368 6520 5765 6220 - 0x1190: 7365 7276 6572 2070 6163 6b61 6765 2e0a - 0x11a0: 0a3c 503e 5468 6973 2063 6f6d 7075 7465 - 0x11b0: 7220 6861 7320 696e 7374 616c 6c65 6420 - 0x11c0: 7468 6520 4465 6269 616e 2047 4e55 2f4c - 0x11d0: 696e 7578 206f 7065 7261 7469 6e67 2073 - 0x11e0: 7973 7465 6d2c 0a62 7574 2069 7420 6861 - 0x11f0: 7320 3c73 7472 6f6e 673e 6e6f 7468 696e - 0x1200: 6720 746f 2064 6f20 7769 7468 2074 6865 - 0x1210: 2044 6562 6961 6e0a 5072 6f6a 6563 743c - 0x1220: 2f73 7472 6f6e 673e 2e20 506c 6561 7365 - 0x1230: 2064 6f20 3c73 7472 6f6e 673e 6e6f 743c - 0x1240: 2f73 7472 6f6e 673e 2063 6f6e 7461 6374 - 0x1250: 2074 6865 2044 6562 6961 6e0a 5072 6f6a - 0x1260: 6563 7420 6162 6f75 7420 6974 2e3c 2f50 - 0x1270: 3e0a 0a3c 503e 4966 2079 6f75 2066 696e - 0x1280: 6420 6120 6275 6720 696e 2074 6869 7320 - 0x1290: 6170 6163 6865 2070 6163 6b61 6765 2c20 - 0x12a0: 6f72 2069 6e20 4170 6163 6865 2069 7473 - 0x12b0: 656c 662c 0a70 6c65 6173 6520 6669 6c65 - 0x12c0: 2061 2062 7567 2072 6570 6f72 7420 6f6e - 0x12d0: 2069 742e 2020 496e 7374 7275 6374 696f - 0x12e0: 6e73 206f 6e20 646f 696e 6720 7468 6973 - 0x12f0: 2c20 616e 6420 7468 650a 6c69 7374 206f - 0x1300: 6620 3c41 2048 5245 463d 2268 7474 703a - 0x1310: 2f2f 6275 6773 2e64 6562 6961 6e2e 6f72 - 0x1320: 672f 7372 633a 6170 6163 6865 223e 6b6e - 0x1330: 6f77 6e20 6275 6773 3c2f 413e 206f 6620 - 0x1340: 7468 6973 0a70 6163 6b61 6765 2c20 6361 - 0x1350: 6e20 6265 2066 6f75 6e64 2069 6e20 7468 - 0x1360: 6520 0a3c 4120 4852 4546 3d22 6874 7470 - 0x1370: 3a2f 2f77 7777 2e64 6562 6961 6e2e 6f72 - 0x1380: 672f 4275 6773 2f52 6570 6f72 7469 6e67 - 0x1390: 223e 4465 6269 616e 2042 7567 2054 7261 - 0x13a0: 636b 696e 6720 5379 7374 656d 3c2f 413e - 0x13b0: 2e0a 0a3c 503e 5468 616e 6b73 2066 6f72 - 0x13c0: 2075 7369 6e67 2074 6869 7320 7061 636b - 0x13d0: 6167 652c 2061 6e64 2063 6f6e 6772 6174 - 0x13e0: 756c 6174 696f 6e73 2066 6f72 2079 6f75 - 0x13f0: 7220 6368 6f69 6365 206f 660a 6120 4465 - 0x1400: 6269 616e 2073 7973 7465 6d21 3c2f 503e - 0x1410: 0a0a 3c44 4956 2061 6c69 676e 3d22 6365 - 0x1420: 6e74 6572 223e 0a3c 6120 6872 6566 3d22 - 0x1430: 6874 7470 3a2f 2f77 7777 2e64 6562 6961 - 0x1440: 6e2e 6f72 672f 223e 0a3c 494d 4720 616c - 0x1450: 6967 6e3d 226d 6964 646c 6522 2068 6569 - 0x1460: 6768 743d 2233 3022 2077 6964 7468 3d22 - 0x1470: 3235 2220 7372 633d 2269 636f 6e73 2f64 - 0x1480: 6562 6961 6e2f 6f70 656e 6c6f 676f 2d32 - 0x1490: 352e 6a70 6722 2061 6c74 3d22 4465 6269 - 0x14a0: 616e 223e 0a3c 2f61 3e0a 3c61 2068 7265 - 0x14b0: 663d 2268 7474 703a 2f2f 7777 772e 6170 - 0x14c0: 6163 6865 2e6f 7267 2f22 3e0a 3c49 4d47 - 0x14d0: 2061 6c69 676e 3d22 6d69 6464 6c65 2220 - 0x14e0: 6865 6967 6874 3d22 3332 2220 7769 6474 - 0x14f0: 683d 2232 3539 2220 7372 633d 2269 636f - 0x1500: 6e73 2f61 7061 6368 655f 7062 2e70 6e67 - 0x1510: 2220 616c 743d 2241 7061 6368 6522 3e0a - 0x1520: 3c2f 613e 0a3c 2f44 4956 3e0a 0a3c 212d - 0x1530: 2d0a 2020 5468 6973 2070 6167 6520 7761 - 0x1540: 7320 696e 6974 6961 6c6c 7920 6372 6561 - 0x1550: 7465 6420 6279 204a 6f68 6e69 6520 496e - 0x1560: 6772 616d 2028 6874 7470 3a2f 2f6e 6574 - 0x1570: 676f 642e 6e65 742f 290a 2020 4974 2077 - 0x1580: 6173 206c 6174 6572 2065 6469 7465 6420 - 0x1590: 6279 204d 6174 7468 6577 2057 696c 636f - 0x15a0: 7820 616e 6420 4a6f 7369 7020 526f 6469 - 0x15b0: 6e2e 0a20 204c 6173 7420 6d6f 6469 6669 - 0x15c0: 6564 3a20 2444 6174 653a 2032 3030 342f - 0x15d0: 3036 2f32 3020 3135 3a33 333a 3537 2024 - 0x15e0: 2e0a 2020 2d2d 3e0a 0a3c 2f42 4f44 593e - 0x15f0: 0a3c 2f48 544d 4c3e 0a -23:57:35.941260 IP 127.0.0.1.55920 > 127.0.0.1.80: . ack 5560 win 12383 - 0x0000: 0000 0000 0000 0000 0000 0000 0800 4500 - 0x0010: 0034 1b6e 4000 4006 2154 7f00 0001 7f00 - 0x0020: 0001 da70 0050 3758 8a49 377a a3a9 8010 - 0x0030: 305f 10ea 0000 0101 080a 4ddc 9219 4ddc - 0x0040: 9219 -23:57:37.229575 IP 127.0.0.1.55920 > 127.0.0.1.80: F 203:203(0) ack 5560 win 12383 - 0x0000: 0000 0000 0000 0000 0000 0000 0800 4500 - 0x0010: 0034 1b70 4000 4006 2152 7f00 0001 7f00 - 0x0020: 0001 da70 0050 3758 8a49 377a a3a9 8011 - 0x0030: 305f 0be1 0000 0101 080a 4ddc 9721 4ddc - 0x0040: 9219 -23:57:37.230839 IP 127.0.0.1.80 > 127.0.0.1.55920: F 5560:5560(0) ack 204 win 8192 - 0x0000: 0000 0000 0000 0000 0000 0000 0800 4500 - 0x0010: 0034 1fe8 4000 4006 1cda 7f00 0001 7f00 - 0x0020: 0001 0050 da70 377a a3a9 3758 8a4a 8011 - 0x0030: 2000 1735 0000 0101 080a 4ddc 9723 4ddc - 0x0040: 9721 -23:57:37.230900 IP 127.0.0.1.55920 > 127.0.0.1.80: . ack 5561 win 12383 - 0x0000: 0000 0000 0000 0000 0000 0000 0800 4500 - 0x0010: 0034 1b72 4000 4006 2150 7f00 0001 7f00 - 0x0020: 0001 da70 0050 3758 8a4a 377a a3aa 8010 - 0x0030: 305f 06d4 0000 0101 080a 4ddc 9723 4ddc - 0x0040: 9723 diff --git a/tftp.h b/tftp.h index 44083042d562..6285404fc7bd 100644 --- a/tftp.h +++ b/tftp.h @@ -1,4 +1,4 @@ -/* @(#) $Header: /tcpdump/master/tcpdump/tftp.h,v 1.1.2.1 2007/09/14 01:03:12 guy Exp $ (LBL) */ +/* @(#) $Header: /tcpdump/master/tcpdump/tftp.h,v 1.1.4.1 2008-04-11 16:44:17 gianluca Exp $ (LBL) */ /* * Copyright (c) 1983, 1993 * The Regents of the University of California. All rights reserved. @@ -49,7 +49,7 @@ #define WRQ 02 /* write request */ #define DATA 03 /* data packet */ #define ACK 04 /* acknowledgement */ -#define ERROR 05 /* error code */ +#define TFTP_ERROR 05 /* error code */ #define OACK 06 /* option acknowledgement */ struct tftphdr { diff --git a/timed.h b/timed.h index 0a5c5fe57a7d..15135e7372cd 100644 --- a/timed.h +++ b/timed.h @@ -1,4 +1,4 @@ -/* @(#) $Header: /tcpdump/master/tcpdump/timed.h,v 1.5 2002/12/11 07:14:12 guy Exp $ (LBL) */ +/* @(#) $Header: /tcpdump/master/tcpdump/timed.h,v 1.5.6.1 2008-02-05 19:46:58 guy Exp $ (LBL) */ /* * Copyright (c) 1983, 1993 * The Regents of the University of California. All rights reserved. @@ -44,12 +44,17 @@ #define TSPVERSION 1 #define ANYADDR NULL +struct tsp_timeval { + u_int32_t tv_sec; + u_int32_t tv_usec; +}; + struct tsp { u_int8_t tsp_type; u_int8_t tsp_vers; u_int16_t tsp_seq; union { - struct timeval tspu_time; + struct tsp_timeval tspu_time; int8_t tspu_hopcnt; } tsp_u; int8_t tsp_name[256]; diff --git a/token.h b/token.h index 8e7fd6d4e27d..b1d92a3f1a17 100644 --- a/token.h +++ b/token.h @@ -1,4 +1,4 @@ -/* @(#) $Header: /tcpdump/master/tcpdump/token.h,v 1.6 2002/12/11 07:14:12 guy Exp $ (LBL) */ +/* @(#) $Header: /tcpdump/master/tcpdump/token.h,v 1.6 2002-12-11 07:14:12 guy Exp $ (LBL) */ /* * Copyright (c) 1998, Larry Lile * All rights reserved. diff --git a/udp.h b/udp.h index dedc9c18460b..fb45d68f7bef 100644 --- a/udp.h +++ b/udp.h @@ -1,4 +1,4 @@ -/* @(#) $Header: /tcpdump/master/tcpdump/udp.h,v 1.8.2.2 2007/03/28 07:45:46 hannes Exp $ (LBL) */ +/* @(#) $Header: /tcpdump/master/tcpdump/udp.h,v 1.13 2007-08-08 17:20:58 hannes Exp $ (LBL) */ /* * Copyright (c) 1982, 1986, 1993 * The Regents of the University of California. All rights reserved. @@ -76,11 +76,15 @@ struct udphdr { #define HSRP_PORT 1985 /*XXX*/ #define LMP_PORT 701 /* rfc4204 */ #define LWRES_PORT 921 +#define VQP_PORT 1589 #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 SFLOW_PORT 6343 /* http://www.sflow.org/developers/specifications.php */ +#define LWAPP_DATA_PORT 12222 /* draft-ohara-capwap-lwapp-04.txt */ +#define LWAPP_CONTROL_PORT 12223 /* draft-ohara-capwap-lwapp-04.txt */ #ifdef INET6 #define RIPNG_PORT 521 /*XXX*/ diff --git a/util.c b/util.c index 912f6f3c76ef..6b723e543c60 100644 --- a/util.c +++ b/util.c @@ -21,7 +21,7 @@ #ifndef lint static const char rcsid[] _U_ = - "@(#) $Header: /tcpdump/master/tcpdump/util.c,v 1.95.2.6 2006/02/08 01:40:09 hannes Exp $ (LBL)"; + "@(#) $Header: /tcpdump/master/tcpdump/util.c,v 1.109 2007-01-29 09:59:42 hannes Exp $ (LBL)"; #endif #ifdef HAVE_CONFIG_H @@ -44,6 +44,8 @@ static const char rcsid[] _U_ = #include "interface.h" +char * ts_format(register int, register int); + /* * Print out a null-terminated filename (or other ascii string). * If ep is NULL, assume no truncation check is needed. @@ -138,6 +140,19 @@ fn_printzp(register const u_char *s, register u_int n, return (n == 0) ? 0 : ret; } +/* + * Format the timestamp + */ +char * +ts_format(register int sec, register int usec) +{ + static char buf[sizeof("00:00:00.000000")]; + (void)snprintf(buf, sizeof(buf), "%02d:%02d:%02d.%06u", + sec / 3600, (sec % 3600) / 60, sec % 60, usec); + + return buf; +} + /* * Print the timestamp */ @@ -149,14 +164,14 @@ ts_print(register const struct timeval *tvp) time_t Time; static unsigned b_sec; static unsigned b_usec; + int d_usec; + int d_sec; switch (tflag) { case 0: /* Default */ s = (tvp->tv_sec + thiszone) % 86400; - (void)printf("%02d:%02d:%02d.%06u ", - s / 3600, (s % 3600) / 60, s % 60, - (unsigned)tvp->tv_usec); + (void)printf("%s ", ts_format(s, tvp->tv_usec)); break; case 1: /* No time stamp */ @@ -169,22 +184,27 @@ ts_print(register const struct timeval *tvp) break; case 3: /* Microseconds since previous packet */ + case 5: /* Microseconds since first packet */ if (b_sec == 0) { - printf("000000 "); - } else { - int d_usec = tvp->tv_usec - b_usec; - int d_sec = tvp->tv_sec - b_sec; + /* init timestamp for first packet */ + b_usec = tvp->tv_usec; + b_sec = tvp->tv_sec; + } - while (d_usec < 0) { - d_usec += 1000000; - d_sec--; - } - if (d_sec) - printf("%d. ", d_sec); - printf("%06d ", d_usec); - } - b_sec = tvp->tv_sec; - b_usec = tvp->tv_usec; + d_usec = tvp->tv_usec - b_usec; + d_sec = tvp->tv_sec - b_sec; + + while (d_usec < 0) { + d_usec += 1000000; + d_sec--; + } + + (void)printf("%s ", ts_format(d_sec, d_usec)); + + if (tflag == 3) { /* set timestamp for last packet */ + b_sec = tvp->tv_sec; + b_usec = tvp->tv_usec; + } break; case 4: /* Default + Date*/ @@ -194,10 +214,9 @@ ts_print(register const struct timeval *tvp) if (!tm) printf("Date fail "); else - printf("%04d-%02d-%02d ", - tm->tm_year+1900, tm->tm_mon+1, tm->tm_mday); - printf("%02d:%02d:%02d.%06u ", - s / 3600, (s % 3600) / 60, s % 60, (unsigned)tvp->tv_usec); + printf("%04d-%02d-%02d %s ", + tm->tm_year+1900, tm->tm_mon+1, tm->tm_mday, + ts_format(s, tvp->tv_usec)); break; } } @@ -297,11 +316,12 @@ tok2str(register const struct tok *lp, register const char *fmt, /* * Convert a bit token value to a string; use "fmt" if not found. - * this is useful for parsing bitfields, the output strings are comma seperated + * this is useful for parsing bitfields, the output strings are seperated + * if the s field is positive. */ -char * -bittok2str(register const struct tok *lp, register const char *fmt, - register int v) +static char * +bittok2str_internal(register const struct tok *lp, register const char *fmt, + register int v, register int sep) { static char buf[256]; /* our stringbuffer */ int buflen=0; @@ -318,7 +338,8 @@ bittok2str(register const struct tok *lp, register const char *fmt, */ if (tokval == (v&rotbit)) { /* ok we have found something */ - buflen+=snprintf(buf+buflen, sizeof(buf)-buflen, "%s, ",lp->s); + buflen+=snprintf(buf+buflen, sizeof(buf)-buflen, "%s%s", + lp->s, sep ? ", " : ""); break; } rotbit=rotbit<<1; /* no match - lets shift and try again */ @@ -326,6 +347,11 @@ bittok2str(register const struct tok *lp, register const char *fmt, lp++; } + /* user didn't want string seperation - no need to cut off trailing seperators */ + if (!sep) { + return (buf); + } + if (buflen != 0) { /* did we find anything */ /* yep, set the the trailing zero 2 bytes before to eliminate the last comma & whitespace */ buf[buflen-2] = '\0'; @@ -340,6 +366,28 @@ bittok2str(register const struct tok *lp, register const char *fmt, } } +/* + * Convert a bit token value to a string; use "fmt" if not found. + * this is useful for parsing bitfields, the output strings are not seperated. + */ +char * +bittok2str_nosep(register const struct tok *lp, register const char *fmt, + register int v) +{ + return (bittok2str_internal(lp, fmt, v, 0)); +} + +/* + * Convert a bit token value to a string; use "fmt" if not found. + * this is useful for parsing bitfields, the output strings are comma seperated. + */ +char * +bittok2str(register const struct tok *lp, register const char *fmt, + register int v) +{ + return (bittok2str_internal(lp, fmt, v, 1)); +} + /* * Convert a value to a string using an array; the macro * tok2strary() in is the public interface to @@ -509,7 +557,8 @@ read_infile(char *fname) void safeputs(const char *s, int maxlen) { - int idx = 0; + int idx = 0; + while (*s && idx < maxlen) { safeputchar(*s); idx++; @@ -526,5 +575,5 @@ safeputchar(int c) if (ch < 0x80 && isprint(ch)) printf("%c", ch); else - printf("\\%03o", ch); + printf("\\0x%02x", ch); } diff --git a/vfprintf.c b/vfprintf.c index 354406ce2c43..6f8407af6960 100644 --- a/vfprintf.c +++ b/vfprintf.c @@ -21,7 +21,7 @@ #ifndef lint static const char rcsid[] _U_ = - "@(#) $Header: /tcpdump/master/tcpdump/vfprintf.c,v 1.6 2003/11/16 09:36:45 guy Exp $ (LBL)"; + "@(#) $Header: /tcpdump/master/tcpdump/vfprintf.c,v 1.6 2003-11-16 09:36:45 guy Exp $ (LBL)"; #endif #ifdef HAVE_CONFIG_H