]> The Tcpdump Group git mirrors - tcpdump/commitdiff
Merge pull request #46 from fxlb/master
authorMichael Richardson <[email protected]>
Thu, 6 Dec 2012 13:43:26 +0000 (05:43 -0800)
committerMichael Richardson <[email protected]>
Thu, 6 Dec 2012 13:43:26 +0000 (05:43 -0800)
print-dhcp6.c: update of the references RFC with their titles

.travis.yml
CHANGES
VERSION
checksum.c
print-pppoe.c
tcpdump.1.in
tcpdump.c

index 02189e61e4e3885f1d74b3a7abebf5682bed0a04..ce70e17c44d12efcc94b8d78a58949292ca122a7 100644 (file)
@@ -1,7 +1,12 @@
 language: c
 
+env:
+  - BUILD_LIBPCAP=true
+  - BUILD_LIBPCAP=false
+
 before_script:
-  - sudo apt-get install libpcap-dev libssl-dev libssl0.9.8 libssl1.0.0
+  - sudo apt-get install libssl-dev libssl0.9.8 libssl1.0.0
+  - if [ $BUILD_LIBPCAP == "true" ]; then ( cd ../ && git clone https://github.com/mcr/libpcap.git && cd libpcap && ./configure && make ); else sudo apt-get install libpcap-dev; fi
 
 script:
   - ./configure
diff --git a/CHANGES b/CHANGES
index a1172527f6c0484fff68e1cb268bd5c6d97a4515..22263c96a0e646ac53287cfd29efc150e63270ce 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,9 +1,35 @@
-Saturday June 30, 2012 [email protected].
+Thursday  November 29, 2012 [email protected].
+  Summary for 4.4.0 tcpdump release
+       Fix detection of OpenSSL libcrypto.
+       Add DNSSL (RFC6106) support.
+       Add "radius" as an option for -T.
+       Update Action codes for handle_action function according to
+           802.11s amendment.
+       Decode DHCPv6 AFTR-Name option (RFC6334).
+       Updates for Babel.
+       Fix printing of infinite lifetime in ICMPv6.
+       Added support for SPB, SPBM Service Identifier, and Unicast
+           Address sub-TLV in ISIS.
+       Decode RIPv2 authentication up to RFC4822.
+       Fix RIP Request/full table decoding issues.
+       On Linux systems with cap-ng.h, drop root privileges
+           using Linux Capabilities.
+       Add support for reading multiple files.
+
+Wednesday  November 28, 2012 [email protected].
   Summary for 4.3.1 tcpdump release
        Print "LLDP, length N" for LLDP packets even when not in verbose
            mode, so something is printed even if only the timestamp is
            present
-       Documented "-T carp".
+       Document "-T carp"
+       Print NTP poll interval correctly (it's an exponent, so print
+           both its raw value and 2^value)
+       Document that "-e" is used to get MAC addresses
+       More clearly document that you need to escape or quote
+           backslashes in filter expressions on the command line
+       Fix some "the the" in the man page
+       Use the right maximum path length
+       Don't treat 192_1_2, when passed to -i, as an interface number
 
 Friday  April 3, 2011.  [email protected].
   Summary for 4.3.0 tcpdump release
diff --git a/VERSION b/VERSION
index 2a585680e94268518f562ffc082afd31b8f25096..87ba31122d3ce115b737e97e1a62bff7a65b059d 100644 (file)
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-4.4.0-PRE_GIT
+4.4.0-PRE-GIT
index da4718ff53bf70cbe94fac29d8f32fdee41596a4..57c02bd1e057fbe04055bc3fb1a40bdc25bcbf03 100644 (file)
@@ -152,8 +152,6 @@ create_osi_cksum (const u_int8_t *pptr, int checksum_offset, int length)
     u_int16_t checksum;
     int index;
 
-    checksum = 0;
-
     c0 = 0;
     c1 = 0;
 
index bcc976c4b7981c768049978263bf417952f67ece..8040c7ae09c2375ec8ccd8f1616cba49af000596 100644 (file)
@@ -159,7 +159,7 @@ pppoe_print(register const u_char *bp, u_int length)
 
                        if (tag_len) {
                                unsigned isascii = 0, isgarbage = 0;
-                               const u_char *v = p;
+                               const u_char *v;
                                char tag_str[MAXTAGPRINT];
                                unsigned tag_str_len = 0;
 
index 57447fb3a7dfef2dd0a2c6354380885e19284962..b967baa0c2a5c3274ae23f40f0b01c1c5acf3ffb 100644 (file)
@@ -74,6 +74,10 @@ tcpdump \- dump traffic on a network
 .I file
 ]
 [
+.B \-V
+.I file
+]
+[
 .B \-s
 .I snaplen
 ]
@@ -127,8 +131,10 @@ flag, which causes it to save the packet data to a file for later
 analysis, and/or with the
 .B \-r
 flag, which causes it to read from a saved packet file rather than to
-read packets from a network interface.  In all cases, only packets that
-match
+read packets from a network interface.  It can also be run with the
+.B \-V
+flag, which causes it to read a list of saved packet files. In all cases,
+only packets that match
 .I expression
 will be processed by
 .IR tcpdump .
@@ -594,6 +600,10 @@ With
 .B \-X
 Telnet options are printed in hex as well.
 .TP
+.B \-V
+Read a list of filenames from \fIfile\fR. Standard input is used
+if \fIfile\fR is ``-''.
+.TP
 .B \-w
 Write the raw packets to \fIfile\fR rather than parsing and printing
 them out.
index e47b95f21710305ec711fdf54265d31953bde303..49029b8988ab6486fdf4627fc41fe356673dd0a5 100644 (file)
--- a/tcpdump.c
+++ b/tcpdump.c
@@ -632,7 +632,9 @@ static int tcpdump_printf(netdissect_options *ndo _U_,
   return ret;
 }
 
-struct print_info get_print_info(int type) {
+static struct print_info
+get_print_info(int type)
+{
        struct print_info printinfo;
 
        printinfo.ndo_type = 1;
@@ -653,10 +655,12 @@ struct print_info get_print_info(int type) {
        return (printinfo);
 }
 
-char *get_next_file(FILE *VFile, char *ptr) {
+static char *
+get_next_file(FILE *VFile, char *ptr)
+{
        char *ret;
 
-       ret = fgets(ptr, NAME_MAX, VFile);
+       ret = fgets(ptr, PATH_MAX, VFile);
        if (!ret)
                return NULL;
 
@@ -685,7 +689,7 @@ main(int argc, char **argv)
        struct dump_info dumpinfo;
        u_char *pcap_userdata;
        char ebuf[PCAP_ERRBUF_SIZE];
-       char VFileLine[NAME_MAX + 1];
+       char VFileLine[PATH_MAX + 1];
        char *username = NULL;
        char *chroot_dir = NULL;
        char *ret = NULL;
@@ -715,7 +719,9 @@ main(int argc, char **argv)
        infile = NULL;
        RFileName = NULL;
        VFileName = NULL;
+       VFile = NULL;
        WFileName = NULL;
+       dlt = -1;
        if ((cp = strrchr(argv[0], '/')) != NULL)
                program_name = cp + 1;
        else
@@ -1137,6 +1143,15 @@ main(int argc, char **argv)
 #endif
 
        if (RFileName != NULL || VFileName != NULL) {
+               /*
+                * If RFileName is non-null, it's the pathname of a
+                * savefile to read.  If VFileName is non-null, it's
+                * the pathname of a file containing a list of pathnames
+                * (one per line) of savefiles to read.
+                *
+                * In either case, we're reading a savefile, not doing
+                * a live capture.
+                */
 #ifndef WIN32
                /*
                 * We don't need network access, so relinquish any set-UID
@@ -1182,12 +1197,19 @@ main(int argc, char **argv)
                localnet = 0;
                netmask = 0;
        } else {
+               /*
+                * We're doing a live capture.
+                */
                if (device == NULL) {
                        device = pcap_lookupdev(ebuf);
                        if (device == NULL)
                                error("%s", ebuf);
                }
 #ifdef WIN32
+               /*
+                * Print a message to the standard error on Windows.
+                * XXX - why do it here, with a different message?
+                */
                if(strlen(device) == 1) //we assume that an ASCII string is always longer than 1 char
                {                                               //a Unicode string has a \0 as second byte (so strlen() is 1)
                        fprintf(stderr, "%s: listening on %ws\n", program_name, device);
@@ -1478,6 +1500,11 @@ main(int argc, char **argv)
 
 #ifndef WIN32
        if (RFileName == NULL) {
+               /*
+                * Live capture (if -V was specified, we set RFileName
+                * to a file from the -V file).  Print a message to
+                * the standard error on UN*X.
+                */
                if (!vflag && !WFileName) {
                        (void)fprintf(stderr,
                            "%s: verbose output suppressed, use -v or -vv for full protocol decode\n",