diff options
author | Michael Tüxen <tuexen@fh-muenster.de> | 2005-05-02 14:07:33 +0000 |
---|---|---|
committer | Michael Tüxen <tuexen@fh-muenster.de> | 2005-05-02 14:07:33 +0000 |
commit | 23d022349ddb36bed7a04aa6fc70188a2b39d055 (patch) | |
tree | 2a687d23dd6499bedbc1849f839374382901ccf5 /epan/dissectors/packet-frame.c | |
parent | 5e89412e0c0b3584ecc2214c1c19addd6547ab41 (diff) |
- Add support for libpcap files for MTP2 with a per packet header
indicating the direction, narrowband/broadband, and interface number.
- Add support to display the direction and interface number.
- Add support to packet-mtp2.c to use the broadband/narrowband indication.
svn path=/trunk/; revision=14265
Diffstat (limited to 'epan/dissectors/packet-frame.c')
-rw-r--r-- | epan/dissectors/packet-frame.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/epan/dissectors/packet-frame.c b/epan/dissectors/packet-frame.c index 3630d8aa43..a64491fe09 100644 --- a/epan/dissectors/packet-frame.c +++ b/epan/dissectors/packet-frame.c @@ -46,6 +46,7 @@ static int hf_frame_p2p_dir = -1; static int hf_frame_file_off = -1; static int hf_frame_marked = -1; static int hf_frame_ref_time = -1; +static int hf_link_number = -1; static int hf_frame_protocols = -1; static int proto_short = -1; @@ -107,6 +108,14 @@ dissect_frame(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree) pinfo->p2p_dir = pinfo->pseudo_header->isdn.uton ? P2P_DIR_SENT : P2P_DIR_RECV; break; + case WTAP_ENCAP_MTP2_WITH_PHDR: + pinfo->p2p_dir = pinfo->pseudo_header->mtp2.sent ? + P2P_DIR_SENT : P2P_DIR_RECV; + pinfo->link_number = pinfo->pseudo_header->mtp2.link_number; + pinfo->annex_a_used = pinfo->pseudo_header->mtp2.annex_a_used ? + MTP2_ANNEX_A_USED : MTP2_ANNEX_A_NOT_USED; + break; + } } @@ -191,6 +200,12 @@ dissect_frame(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree) 0, 0, pinfo->p2p_dir); } + /* Check for existences of MTP2 link number */ + if ((pinfo->pseudo_header != NULL ) && (pinfo->fd->lnk_t == WTAP_ENCAP_MTP2_WITH_PHDR)) { + proto_tree_add_uint(fh_tree, hf_link_number, tvb, + 0, 0, pinfo->link_number); + } + if (show_file_off) { proto_tree_add_int_format(fh_tree, hf_frame_file_off, tvb, 0, 0, pinfo->fd->file_off, @@ -326,6 +341,10 @@ proto_register_frame(void) { "Point-to-Point Direction", "frame.p2p_dir", FT_UINT8, BASE_DEC, VALS(p2p_dirs), 0x0, "", HFILL }}, + { &hf_link_number, + { "Link Number", "frame.link_nr", FT_UINT16, BASE_DEC, NULL, 0x0, + "", HFILL }}, + { &hf_frame_file_off, { "File Offset", "frame.file_off", FT_INT32, BASE_DEC, NULL, 0x0, "", HFILL }}, |