diff options
author | Anders Broman <anders.broman@ericsson.com> | 2005-10-24 21:42:19 +0000 |
---|---|---|
committer | Anders Broman <anders.broman@ericsson.com> | 2005-10-24 21:42:19 +0000 |
commit | 314c36da9ab818ee9d47759cda10cb9466afbce7 (patch) | |
tree | 63b6cd3c22e99a490f472c65b08acdb48952b4c0 /epan/dissectors/packet-s4406.c | |
parent | 149b419740ffdad03b11037819d6def9b9492651 (diff) |
From Graeme Lunt:
The ftbp.patch file includes:
a) A fix to acse.cnf which works around an asn2eth bug (it is the AE-qualifier EXPORT I want, but asn2eth doesn't generate the appropriate extern for the values). Also a small cosmetic change for EXTERNAL decodings.
b) New EXPORTs for the FTAM dissector for use in FTBP.
c) A fix to asn2eth to solve the problem if you EXPORT types that include a '-' character in the name (e.g. "AE-qualifier" from acse.cnf, "Date-and-Time-Attribute" from ftam.cnf). The problem is that asn2eth generates the "xxxx-exp.cnf" file using the 'C' name (which has replaced '-' with '_') rather than the original 'ASN' name. The fix just undoes the replacement as I couldn't see the original name being preserved anywhere. There still remains a problem if the type has a '.' in the name - but generally I don't think they do.
* Better ROS handling and registration
* Simplified RTSE registration
* X411 column information, extension naming and use of new RTSE/ROS registration
* X420 notification extensions, warnings removal and export of ExtensionsField (missed from recent FTBP patch).
* Better highlighting of S4406 protocol.
svn path=/trunk/; revision=16296
Diffstat (limited to 'epan/dissectors/packet-s4406.c')
-rw-r--r-- | epan/dissectors/packet-s4406.c | 32 |
1 files changed, 28 insertions, 4 deletions
diff --git a/epan/dissectors/packet-s4406.c b/epan/dissectors/packet-s4406.c index 1f52713052..34c6166e5e 100644 --- a/epan/dissectors/packet-s4406.c +++ b/epan/dissectors/packet-s4406.c @@ -1,6 +1,6 @@ /* Do not modify this file. */ /* It is created automatically by the ASN.1 to Ethereal dissector compiler */ -/* ./packet-s4406.c */ +/* .\packet-s4406.c */ /* ../../tools/asn2eth.py -X -b -e -p s4406 -c s4406.cnf -s packet-s4406-template s4406.asn */ /* Input file: packet-s4406-template.c */ @@ -49,7 +49,7 @@ #include "packet-x411.h" #include "packet-x420.h" -#define PNAME "STANAG 4406 Military Message Extensions" +#define PNAME "STANAG 4406 Military Message" #define PSNAME "STANAG 4406" #define PFNAME "s4406" @@ -208,8 +208,7 @@ static int dissect_sics_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb static int dissect_s4406_OBJECT_IDENTIFIER(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) { - offset = dissect_ber_object_identifier(implicit_tag, pinfo, tree, tvb, offset, hf_index, - NULL); + offset = dissect_ber_object_identifier(implicit_tag, pinfo, tree, tvb, offset, hf_index, NULL); return offset; } @@ -222,6 +221,7 @@ static int dissect_dist_type(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb static int dissect_s4406_T_dist_value(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) { /* XXX: not implemented */ + return offset; } static int dissect_dist_value(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) { @@ -695,6 +695,29 @@ static void dissect_SecurityInformationLabels_PDU(tvbuff_t *tvb, packet_info *pi +/* +* Dissect STANAG 4406 PDUs inside a PPDU. +*/ +static void +dissect_s4406(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree) +{ + int offset = 0; + proto_item *item=NULL; + proto_tree *tree=NULL; + + if(parent_tree){ + item = proto_tree_add_item(parent_tree, proto_s4406, tvb, 0, -1, FALSE); + tree = proto_item_add_subtree(item, ett_s4406); + } + + if (check_col(pinfo->cinfo, COL_PROTOCOL)) + col_set_str(pinfo->cinfo, COL_PROTOCOL, "S4406"); + if (check_col(pinfo->cinfo, COL_INFO)) + col_add_str(pinfo->cinfo, COL_INFO, "Military"); + + dissect_x420_InformationObject(TRUE, tvb, offset, pinfo , tree, -1); +} + /*--- proto_register_s4406 -------------------------------------------*/ @@ -945,4 +968,5 @@ void proto_reg_handoff_s4406(void) { /*--- End of included file: packet-s4406-dis-tab.c ---*/ + register_ber_oid_dissector("1.3.26.0.4406.0.4.1", dissect_s4406, proto_s4406, "Military Message"); } |