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
+ 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.
+
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
Summary for 4.3.0 tcpdump release
-4.4.0-PRE_GIT
+4.4.0-PRE-GIT
u_int16_t checksum;
int index;
- checksum = 0;
-
c0 = 0;
c1 = 0;
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;
.I file
]
[
+.B \-V
+.I file
+]
+[
.B \-s
.I snaplen
]
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 .
.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.
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;
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;
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;
infile = NULL;
RFileName = NULL;
VFileName = NULL;
+ VFile = NULL;
WFileName = NULL;
+ dlt = -1;
if ((cp = strrchr(argv[0], '/')) != NULL)
program_name = cp + 1;
else
#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
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);
#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",