"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "print-macsec.c" between
tcpdump-4.99.0.tar.gz and tcpdump-4.99.1.tar.gz

About: tcpdump is a tool for network monitoring and data acquisition.

print-macsec.c  (tcpdump-4.99.0):print-macsec.c  (tcpdump-4.99.1)
skipping to change at line 28 skipping to change at line 28
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*/ */
/* \summary: MACsec printer */ /* \summary: MACsec printer */
#ifdef HAVE_CONFIG_H #ifdef HAVE_CONFIG_H
#include <config.h> #include <config.h>
#endif #endif
#include <netdissect-stdinc.h> #include "netdissect-stdinc.h"
#include "netdissect.h" #include "netdissect.h"
#include "addrtoname.h" #include "addrtoname.h"
#include "ethertype.h" #include "ethertype.h"
#include "extract.h" #include "extract.h"
#define MACSEC_DEFAULT_ICV_LEN 16 #define MACSEC_DEFAULT_ICV_LEN 16
/* Header format (SecTAG), following an Ethernet header /* Header format (SecTAG), following an Ethernet header
* IEEE 802.1AE-2006 9.3 * IEEE 802.1AE-2006 9.3
skipping to change at line 220 skipping to change at line 220
ndo->ndo_protocol = save_protocol; ndo->ndo_protocol = save_protocol;
return hdrlen + caplen; return hdrlen + caplen;
} }
if (*caplenp < MACSEC_DEFAULT_ICV_LEN) { if (*caplenp < MACSEC_DEFAULT_ICV_LEN) {
nd_print_trunc(ndo); nd_print_trunc(ndo);
ndo->ndo_protocol = save_protocol; ndo->ndo_protocol = save_protocol;
return hdrlen + caplen; return hdrlen + caplen;
} }
*lengthp -= MACSEC_DEFAULT_ICV_LEN; *lengthp -= MACSEC_DEFAULT_ICV_LEN;
*caplenp -= MACSEC_DEFAULT_ICV_LEN; *caplenp -= MACSEC_DEFAULT_ICV_LEN;
/*
* Update the snapend thus the ICV field is not in the payload for
* the caller.
* The ICV (Integrity Check Value) is at the end of the frame, after
* the secure data.
*/
ndo->ndo_snapend -= MACSEC_DEFAULT_ICV_LEN;
/* /*
* If the SL field is non-zero, then it's the length of the * If the SL field is non-zero, then it's the length of the
* Secure Data; otherwise, the Secure Data is what's left * Secure Data; otherwise, the Secure Data is what's left
* ver after the MACsec header and ICV are removed. * ver after the MACsec header and ICV are removed.
*/ */
if (short_length != 0) { if (short_length != 0) {
/* /*
* If the short length is more than we *have*, * If the short length is more than we *have*,
* that's an error. * that's an error.
 End of changes. 2 change blocks. 
1 lines changed or deleted 8 lines changed or added

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