"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "sf-pcapng.c" between
libpcap-1.10.0.tar.gz and libpcap-1.10.1.tar.gz

About: libpcap is a packet filter library used by tools like tcpdump.

sf-pcapng.c  (libpcap-1.10.0):sf-pcapng.c  (libpcap-1.10.1)
skipping to change at line 104 skipping to change at line 104
/* followed by options and trailer */ /* followed by options and trailer */
}; };
/* /*
* Byte-order magic value. * Byte-order magic value.
*/ */
#define BYTE_ORDER_MAGIC 0x1A2B3C4D #define BYTE_ORDER_MAGIC 0x1A2B3C4D
/* /*
* Current version number. If major_version isn't PCAP_NG_VERSION_MAJOR, * Current version number. If major_version isn't PCAP_NG_VERSION_MAJOR,
* that means that this code can't read the file. * or if minor_version isn't PCAP_NG_VERSION_MINOR or 2, that means that
* this code can't read the file.
*/ */
#define PCAP_NG_VERSION_MAJOR 1 #define PCAP_NG_VERSION_MAJOR 1
#define PCAP_NG_VERSION_MINOR 0 #define PCAP_NG_VERSION_MINOR 0
/* /*
* Interface Description Block. * Interface Description Block.
*/ */
#define BT_IDB 0x00000001 #define BT_IDB 0x00000001
struct interface_description_block { struct interface_description_block {
skipping to change at line 965 skipping to change at line 966
/* /*
* Byte-swap the fields we've read. * Byte-swap the fields we've read.
*/ */
shbp->major_version = SWAPSHORT(shbp->major_version); shbp->major_version = SWAPSHORT(shbp->major_version);
shbp->minor_version = SWAPSHORT(shbp->minor_version); shbp->minor_version = SWAPSHORT(shbp->minor_version);
/* /*
* XXX - we don't care about the section length. * XXX - we don't care about the section length.
*/ */
} }
/* currently only SHB version 1.0 is supported */ /* Currently only SHB versions 1.0 and 1.2 are supported;
version 1.2 is treated as being the same as version 1.0.
See the current version of the pcapng specification.
Version 1.2 is written by some programs that write additional
block types (which can be read by any code that handles them,
regardless of whether the minor version if 0 or 2, so that's
not a reason to change the minor version number).
XXX - the pcapng specification says that readers should
just ignore sections with an unsupported version number;
presumably they can also report an error if they skip
all the way to the end of the file without finding
any versions that they support. */
if (! (shbp->major_version == PCAP_NG_VERSION_MAJOR && if (! (shbp->major_version == PCAP_NG_VERSION_MAJOR &&
shbp->minor_version == PCAP_NG_VERSION_MINOR)) { (shbp->minor_version == PCAP_NG_VERSION_MINOR ||
shbp->minor_version == 2))) {
snprintf(errbuf, PCAP_ERRBUF_SIZE, snprintf(errbuf, PCAP_ERRBUF_SIZE,
"unsupported pcapng savefile version %u.%u", "unsupported pcapng savefile version %u.%u",
shbp->major_version, shbp->minor_version); shbp->major_version, shbp->minor_version);
goto fail; goto fail;
} }
p->version_major = shbp->major_version; p->version_major = shbp->major_version;
p->version_minor = shbp->minor_version; p->version_minor = shbp->minor_version;
/* /*
* Save the time stamp resolution the user requested. * Save the time stamp resolution the user requested.
 End of changes. 3 change blocks. 
3 lines changed or deleted 18 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)