diff options
author | Guy Harris <guy@alum.mit.edu> | 2013-12-30 23:37:12 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2013-12-30 23:37:12 +0000 |
commit | 53cba3e3b9b4d493ee4ca3256942ee2163a1cb9a (patch) | |
tree | c8b92f29e102fcb4eafe00e12a216526b75c8c83 /wiretap | |
parent | 1c9b36ad4673501b0fd22ae867f80d60fcdb9005 (diff) |
Add an "ATM reassembly failed" flag for capture file readers to provide,
and set it in NetXRay/Windows Sniffer files if the putative "ATM
reassembly failed" flag is set and, if reassembly failed, don't attempt
to dissect the packet.
svn path=/trunk/; revision=54503
Diffstat (limited to 'wiretap')
-rw-r--r-- | wiretap/netxray.c | 5 | ||||
-rw-r--r-- | wiretap/wtap.h | 6 |
2 files changed, 9 insertions, 2 deletions
diff --git a/wiretap/netxray.c b/wiretap/netxray.c index 22267f312f..8c58325738 100644 --- a/wiretap/netxray.c +++ b/wiretap/netxray.c @@ -1460,6 +1460,8 @@ netxray_set_phdr(wtap *wth, struct wtap_pkthdr *phdr, union netxrayrec_hdr *hdr) * a cell is bad? */ phdr->pseudo_header.atm.flags = 0; + if (hdr->hdr_2_x.xxx[8] & 0x01) + phdr->pseudo_header.atm.flags |= ATM_REASSEMBLY_ERROR; /* * XXX - is 0x08 an "OAM cell" flag? * Are the 0x01 and 0x02 bits error indications? @@ -1649,7 +1651,8 @@ netxray_guess_atm_type(wtap *wth, struct wtap_pkthdr *phdr, Buffer *buf) { const guint8 *pd; - if (wth->file_encap == WTAP_ENCAP_ATM_PDUS_UNTRUNCATED) { + if (wth->file_encap == WTAP_ENCAP_ATM_PDUS_UNTRUNCATED && + !(phdr->pseudo_header.atm.flags & ATM_REASSEMBLY_ERROR)) { if (phdr->pseudo_header.atm.aal == AAL_UNKNOWN) { /* * Try to guess the type and subtype based diff --git a/wiretap/wtap.h b/wiretap/wtap.h index 719ed0aeb5..cb09d44430 100644 --- a/wiretap/wtap.h +++ b/wiretap/wtap.h @@ -404,7 +404,10 @@ struct isdn_phdr { }; /* Packet "pseudo-header" for ATM capture files. - Not all of this information is supplied by all capture types. */ + Not all of this information is supplied by all capture types. + These originally came from the Network General (DOS-based) + ATM Sniffer file format, but we've added some additional + items. */ /* * Status bits. @@ -412,6 +415,7 @@ struct isdn_phdr { #define ATM_RAW_CELL 0x01 /* TRUE if the packet is a single cell */ #define ATM_NO_HEC 0x02 /* TRUE if the cell has HEC stripped out */ #define ATM_AAL2_NOPHDR 0x04 /* TRUE if the AAL2 PDU has no pseudo-header */ +#define ATM_REASSEMBLY_ERROR 0x08 /* TRUE if this is an incompletely-reassembled PDU */ /* * AAL types. |