WTAP_ENCAP_MTP2 is for MTP2 *without* a pseudo-header giving direction

or other information; WTAP_ENCAP_MTP2_WITH_PHDR is for MTP2 *with* such
a pseudo-header.  Use WTAP_ENCAP_MTP2_WITH_PHDR for the EyeSDN captures,
and don't assume there's a pseudo-header if you have WTAP_ENCAP_MTP2.

svn path=/trunk/; revision=41962
This commit is contained in:
Guy Harris 2012-04-05 20:25:26 +00:00
parent cbfa8a5de6
commit a98336862a
2 changed files with 3 additions and 4 deletions

View File

@ -171,7 +171,6 @@ dissect_frame(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
break;
case WTAP_ENCAP_MTP2_WITH_PHDR:
case WTAP_ENCAP_MTP2:
pinfo->p2p_dir = pinfo->pseudo_header->mtp2.sent ?
P2P_DIR_SENT : P2P_DIR_RECV;
pinfo->link_number = pinfo->pseudo_header->mtp2.link_number;

View File

@ -330,7 +330,7 @@ parse_eyesdn_rec_hdr(wtap *wth, FILE_T fh,
pseudo_header->mtp2.annex_a_used = MTP2_ANNEX_A_USED_UNKNOWN;
pseudo_header->mtp2.link_number = channel;
if(wth) {
wth->phdr.pkt_encap = WTAP_ENCAP_MTP2;
wth->phdr.pkt_encap = WTAP_ENCAP_MTP2_WITH_PHDR;
}
break;
@ -459,7 +459,7 @@ int eyesdn_dump_can_write_encap(int encap)
case WTAP_ENCAP_DPNSS:
case WTAP_ENCAP_ATM_PDUS_UNTRUNCATED:
case WTAP_ENCAP_LAPB:
case WTAP_ENCAP_MTP2:
case WTAP_ENCAP_MTP2_WITH_PHDR:
case WTAP_ENCAP_BACNET_MS_TP:
case WTAP_ENCAP_PER_PACKET:
return 0;
@ -520,7 +520,7 @@ static gboolean eyesdn_dump(wtap_dumper *wdh,
protocol=EYESDN_ENCAP_LAPB;
break;
case WTAP_ENCAP_MTP2:
case WTAP_ENCAP_MTP2_WITH_PHDR:
protocol=EYESDN_ENCAP_MTP2;
break;