From Stig Bjorlykke:

I have added a new dissector for DMP (STANAG 4406 Direct Message
Profile) as defined in STANAG 4406 Annex E.  The DMP protocol has no
assigned UDP port number yet, so the default value in this dissector
is 0 (I suppose this is som sort of "disabled"?) until we get this
registered.

The dissector has been tested on OSX Intel/PowerPC and Solaris SPARC.

Changes in this patch:
* Added DMP dissector
* Added a new CRC table and functions in crc16.c
* Made NonDeliveryReasonCode and NonDeliveryDiagnosticCode available
from X.411
* Made NonReceiptReasonField and DiscardReasonField available from X.420


svn path=/trunk/; revision=20133
This commit is contained in:
Stephen Fisher 2006-12-14 00:16:06 +00:00
parent 8b8b648ad6
commit c97caf2a94
13 changed files with 3787 additions and 67 deletions

View File

@ -2444,6 +2444,7 @@ Menno Andriesse <s5066 [AT] nc3a.nato.int> {
Stig Bjørlykke <stig [AT] bjorlykke.org> {
P_Mul (ACP142) packet disassembly
CDT (CompressedDataType) support
DMP (STANAG 4406 Direct Message Profile) support
}
Kyle J. Harms <kyle.j.harms [AT] boeing.com> {

View File

@ -16,6 +16,8 @@ ExtendedContentType BER_CLASS_UNI BER_UNI_TAG_OID
ContentLength BER_CLASS_UNI BER_UNI_TAG_INTEGER
MessageDeliveryIdentifier BER_CLASS_APP 4
MessageDeliveryTime BER_CLASS_UNI BER_UNI_TAG_UTCTime
NonDeliveryReasonCode BER_CLASS_UNI BER_UNI_TAG_INTEGER
NonDeliveryDiagnosticCode BER_CLASS_UNI BER_UNI_TAG_INTEGER
SupplementaryInformation BER_CLASS_UNI BER_UNI_TAG_PrintableString
RequestedDeliveryMethod BER_CLASS_UNI BER_UNI_TAG_SEQUENCE
OriginatingMTACertificate BER_CLASS_UNI BER_UNI_TAG_SEQUENCE
@ -39,6 +41,8 @@ ExtendedContentType TYPE = FT_OID DISPLAY = BASE_NONE STRINGS = NULL
ContentLength TYPE = FT_UINT32 DISPLAY = BASE_DEC STRINGS = NULL BITMASK = 0
MessageDeliveryIdentifier TYPE = FT_NONE DISPLAY = BASE_NONE STRINGS = NULL BITMASK = 0
MessageDeliveryTime TYPE = FT_STRING DISPLAY = BASE_NONE STRINGS = NULL BITMASK = 0
NonDeliveryReasonCode TYPE = FT_UINT32 DISPLAY = BASE_DEC STRINGS = VALS(x411_NonDeliveryReasonCode_vals) BITMASK = 0
NonDeliveryDiagnosticCode TYPE = FT_UINT32 DISPLAY = BASE_DEC STRINGS = VALS(x411_NonDeliveryDiagnosticCode_vals) BITMASK = 0
SupplementaryInformation TYPE = FT_STRING DISPLAY = BASE_NONE STRINGS = NULL BITMASK = 0
RequestedDeliveryMethod TYPE = FT_UINT32 DISPLAY = BASE_DEC STRINGS = NULL BITMASK = 0
OriginatingMTACertificate TYPE = FT_NONE DISPLAY = BASE_NONE STRINGS = NULL BITMASK = 0

View File

@ -29,6 +29,8 @@ SecurityLabel
SupplementaryInformation
TeletexNonBasicParameters
UniversalOrBMPString
NonDeliveryReasonCode
NonDeliveryDiagnosticCode
#.TYPE_RENAME
MTABindArgument/authenticated AuthenticatedArgument

View File

@ -14,6 +14,8 @@ ORDescriptor BER_CLASS_UNI BER_UNI_TAG_SET
ExtensionsField BER_CLASS_UNI BER_UNI_TAG_SET
MessageParameters BER_CLASS_UNI BER_UNI_TAG_SET
IPN BER_CLASS_UNI BER_UNI_TAG_SET
NonReceiptReasonField BER_CLASS_UNI BER_UNI_TAG_ENUMERATED
DiscardReasonField BER_CLASS_UNI BER_UNI_TAG_ENUMERATED
#.END
#.TYPE_ATTR
@ -23,5 +25,7 @@ ORDescriptor TYPE = FT_NONE DISPLAY = BASE_NONE STRINGS = NULL
ExtensionsField TYPE = FT_UINT32 DISPLAY = BASE_DEC STRINGS = NULL BITMASK = 0
MessageParameters TYPE = FT_NONE DISPLAY = BASE_NONE STRINGS = NULL BITMASK = 0
IPN TYPE = FT_NONE DISPLAY = BASE_NONE STRINGS = NULL BITMASK = 0
NonReceiptReasonField TYPE = FT_UINT32 DISPLAY = BASE_DEC STRINGS = VALS(x420_NonReceiptReasonField_vals) BITMASK = 0
DiscardReasonField TYPE = FT_UINT32 DISPLAY = BASE_DEC STRINGS = VALS(x420_DiscardReasonField_vals) BITMASK = 0
#.END

View File

@ -16,6 +16,8 @@ ExtensionsField
IPM
IPN
MessageParameters
NonReceiptReasonField
DiscardReasonField
#.FIELD_RENAME

View File

@ -67,7 +67,7 @@
/* */
/*****************************************************************/
static const guint crc16_ccitt_table[256] =
static const guint crc16_ccitt_table_reverse[256] =
{
0x0000, 0x1189, 0x2312, 0x329B, 0x4624, 0x57AD, 0x6536, 0x74BF,
0x8C48, 0x9DC1, 0xAF5A, 0xBED3, 0xCA6C, 0xDBE5, 0xE97E, 0xF8F7,
@ -103,26 +103,62 @@ static const guint crc16_ccitt_table[256] =
0x7BC7, 0x6A4E, 0x58D5, 0x495C, 0x3DE3, 0x2C6A, 0x1EF1, 0x0F78
};
/* Same as above, only without reverse (Reverse=FALSE) */
static const guint crc16_ccitt_table[256] =
{
0x0000, 0x1021, 0x2042, 0x3063, 0x4084, 0x50A5, 0x60C6, 0x70E7,
0x8108, 0x9129, 0xA14A, 0xB16B, 0xC18C, 0xD1AD, 0xE1CE, 0xF1EF,
0x1231, 0x0210, 0x3273, 0x2252, 0x52B5, 0x4294, 0x72F7, 0x62D6,
0x9339, 0x8318, 0xB37B, 0xA35A, 0xD3BD, 0xC39C, 0xF3FF, 0xE3DE,
0x2462, 0x3443, 0x0420, 0x1401, 0x64E6, 0x74C7, 0x44A4, 0x5485,
0xA56A, 0xB54B, 0x8528, 0x9509, 0xE5EE, 0xF5CF, 0xC5AC, 0xD58D,
0x3653, 0x2672, 0x1611, 0x0630, 0x76D7, 0x66F6, 0x5695, 0x46B4,
0xB75B, 0xA77A, 0x9719, 0x8738, 0xF7DF, 0xE7FE, 0xD79D, 0xC7BC,
0x48C4, 0x58E5, 0x6886, 0x78A7, 0x0840, 0x1861, 0x2802, 0x3823,
0xC9CC, 0xD9ED, 0xE98E, 0xF9AF, 0x8948, 0x9969, 0xA90A, 0xB92B,
0x5AF5, 0x4AD4, 0x7AB7, 0x6A96, 0x1A71, 0x0A50, 0x3A33, 0x2A12,
0xDBFD, 0xCBDC, 0xFBBF, 0xEB9E, 0x9B79, 0x8B58, 0xBB3B, 0xAB1A,
0x6CA6, 0x7C87, 0x4CE4, 0x5CC5, 0x2C22, 0x3C03, 0x0C60, 0x1C41,
0xEDAE, 0xFD8F, 0xCDEC, 0xDDCD, 0xAD2A, 0xBD0B, 0x8D68, 0x9D49,
0x7E97, 0x6EB6, 0x5ED5, 0x4EF4, 0x3E13, 0x2E32, 0x1E51, 0x0E70,
0xFF9F, 0xEFBE, 0xDFDD, 0xCFFC, 0xBF1B, 0xAF3A, 0x9F59, 0x8F78,
0x9188, 0x81A9, 0xB1CA, 0xA1EB, 0xD10C, 0xC12D, 0xF14E, 0xE16F,
0x1080, 0x00A1, 0x30C2, 0x20E3, 0x5004, 0x4025, 0x7046, 0x6067,
0x83B9, 0x9398, 0xA3FB, 0xB3DA, 0xC33D, 0xD31C, 0xE37F, 0xF35E,
0x02B1, 0x1290, 0x22F3, 0x32D2, 0x4235, 0x5214, 0x6277, 0x7256,
0xB5EA, 0xA5CB, 0x95A8, 0x8589, 0xF56E, 0xE54F, 0xD52C, 0xC50D,
0x34E2, 0x24C3, 0x14A0, 0x0481, 0x7466, 0x6447, 0x5424, 0x4405,
0xA7DB, 0xB7FA, 0x8799, 0x97B8, 0xE75F, 0xF77E, 0xC71D, 0xD73C,
0x26D3, 0x36F2, 0x0691, 0x16B0, 0x6657, 0x7676, 0x4615, 0x5634,
0xD94C, 0xC96D, 0xF90E, 0xE92F, 0x99C8, 0x89E9, 0xB98A, 0xA9AB,
0x5844, 0x4865, 0x7806, 0x6827, 0x18C0, 0x08E1, 0x3882, 0x28A3,
0xCB7D, 0xDB5C, 0xEB3F, 0xFB1E, 0x8BF9, 0x9BD8, 0xABBB, 0xBB9A,
0x4A75, 0x5A54, 0x6A37, 0x7A16, 0x0AF1, 0x1AD0, 0x2AB3, 0x3A92,
0xFD2E, 0xED0F, 0xDD6C, 0xCD4D, 0xBDAA, 0xAD8B, 0x9DE8, 0x8DC9,
0x7C26, 0x6C07, 0x5C64, 0x4C45, 0x3CA2, 0x2C83, 0x1CE0, 0x0CC1,
0xEF1F, 0xFF3E, 0xCF5D, 0xDF7C, 0xAF9B, 0xBFBA, 0x8FD9, 0x9FF8,
0x6E17, 0x7E36, 0x4E55, 0x5E74, 0x2E93, 0x3EB2, 0x0ED1, 0x1EF0
};
static const guint16 crc16_ccitt_start = 0xFFFF;
static const guint16 crc16_ccitt_xorout = 0xFFFF;
/* two types of crcs are possible: unreflected (bits shift left) and
* reflected (bits shift right).
*/
#if 0
static guint16 crc16_unreflected(const guint8 *buf, guint len,
guint16 crc_in, const guint table[])
guint16 crc_in, const guint table[])
{
/* we use guints, rather than guint16s, as they are likely to be
faster. We just ignore the top 16 bits and let them do what they want. */
faster. We just ignore the top 16 bits and let them do what they want.
*/
guint crc16 = (guint)crc_in;;
while( len-- != 0 )
crc16 = table[(crc16 ^ *buf++) & 0xff] ^ (crc16 << 8);
crc16 = table[((crc16 >> 8) ^ *buf++) & 0xff] ^ (crc16 << 8);
return (guint16)crc16;
}
#endif
static guint16 crc16_reflected(const guint8 *buf, guint len,
guint16 crc_in, const guint table[])
@ -142,13 +178,18 @@ static guint16 crc16_reflected(const guint8 *buf, guint len,
guint16 crc16_ccitt(const guint8 *buf, guint len)
{
return crc16_reflected(buf,len,crc16_ccitt_start,crc16_ccitt_table)
return crc16_reflected(buf,len,crc16_ccitt_start,crc16_ccitt_table_reverse)
^ crc16_ccitt_xorout;
}
guint16 crc16_x25_ccitt(const guint8 *buf, guint len)
{
return crc16_unreflected(buf,len,crc16_ccitt_start,crc16_ccitt_table);
}
guint16 crc16_ccitt_seed(const guint8 *buf, guint len, guint16 seed)
{
return crc16_reflected(buf,len,seed,crc16_ccitt_table)
return crc16_reflected(buf,len,seed,crc16_ccitt_table_reverse)
^ crc16_ccitt_xorout;
}
@ -159,6 +200,13 @@ guint16 crc16_ccitt_tvb(tvbuff_t *tvb, guint len)
return crc16_ccitt(buf, len);
}
guint16 crc16_x25_ccitt_tvb(tvbuff_t *tvb, guint len)
{
const guint8* buf = tvb_get_ptr(tvb, 0, len);
return crc16_x25_ccitt(buf, len);
}
guint16 crc16_ccitt_tvb_offset(tvbuff_t *tvb, guint offset, guint len)
{
const guint8* buf = tvb_get_ptr(tvb, offset, len);

View File

@ -41,6 +41,12 @@
@return The CRC16 CCITT checksum. */
extern guint16 crc16_ccitt(const guint8 *buf, guint len);
/** Compute CRC16 X.25 CCITT checksum of a buffer of data.
@param buf The buffer containing the data.
@param len The number of bytes to include in the computation.
@return The CRC16 X.25 CCITT checksum. */
extern guint16 crc16_x25_ccitt(const guint8 *buf, guint len);
/** Compute CRC16 CCITT checksum of a buffer of data. If computing the
* checksum over multiple buffers and you want to feed the partial CRC16
* back in, remember to take the 1's complement of the partial CRC16 first.
@ -56,6 +62,12 @@ extern guint16 crc16_ccitt_seed(const guint8 *buf, guint len, guint16 seed);
@return The CRC16 CCITT checksum. */
extern guint16 crc16_ccitt_tvb(tvbuff_t *tvb, guint len);
/** Compute CRC16 X.25 CCITT checksum of a tv buffer.
@param tvb The tv buffer containing the data.
@param len The number of bytes to include in the computation.
@return The CRC16 X.25 CCITT checksum. */
extern guint16 crc16_x25_ccitt_tvb(tvbuff_t *tvb, guint len);
/** Compute CRC16 CCITT checksum of a tv buffer.
@param tvb The tv buffer containing the data.
@param offset The offset into the tv buffer.

View File

@ -270,6 +270,7 @@ DISSECTOR_SRC = \
packet-disp.c \
packet-distcc.c \
packet-dlsw.c \
packet-dmp.c \
packet-dnp.c \
packet-dns.c \
packet-dop.c \

3638
epan/dissectors/packet-dmp.c Normal file

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,6 @@
/* Do not modify this file. */
/* It is created automatically by the ASN.1 to Wireshark dissector compiler */
/* .\packet-x411.c */
/* ./packet-x411.c */
/* ../../tools/asn2wrs.py -b -e -p x411 -c x411.cnf -s packet-x411-template x411.asn */
/* Input file: packet-x411-template.c */
@ -809,7 +809,7 @@ static int dissect_empty_result(packet_info *pinfo, proto_tree *tree, tvbuff_t *
static int
dissect_x411_MTAName(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
#line 391 "x411.cnf"
#line 393 "x411.cnf"
tvbuff_t *mtaname = NULL;
offset = dissect_ber_restricted_string(implicit_tag, BER_UNI_TAG_IA5String,
@ -929,7 +929,7 @@ static int dissect_token_type_identifier_impl(packet_info *pinfo, proto_tree *tr
static int
dissect_x411_TokenTypeData(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
#line 661 "x411.cnf"
#line 663 "x411.cnf"
if(object_identifier_id)
call_ber_oid_callback(object_identifier_id, tvb, offset, pinfo, tree);
@ -1075,7 +1075,7 @@ static const ber_choice_t Credentials_choice[] = {
static int
dissect_x411_Credentials(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
#line 669 "x411.cnf"
#line 671 "x411.cnf"
guint32 credentials;
offset = dissect_ber_choice(pinfo, tree, tvb, offset,
@ -1164,7 +1164,7 @@ static int dissect_privacy_mark(packet_info *pinfo, proto_tree *tree, tvbuff_t *
static int
dissect_x411_OBJECT_IDENTIFIER(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
#line 325 "x411.cnf"
#line 327 "x411.cnf"
offset = dissect_ber_object_identifier_str(implicit_tag, pinfo, tree, tvb, offset, hf_index, &object_identifier_id);
@ -1185,7 +1185,7 @@ static int dissect_category_type_impl(packet_info *pinfo, proto_tree *tree, tvbu
static int
dissect_x411_CategoryValue(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
#line 246 "x411.cnf"
#line 248 "x411.cnf"
offset = dissect_unknown_ber(pinfo, tvb, offset, tree);
@ -1379,7 +1379,7 @@ static const value_string x411_MTABindError_vals[] = {
static int
dissect_x411_MTABindError(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
#line 652 "x411.cnf"
#line 654 "x411.cnf"
int error = -1;
offset = dissect_ber_integer(implicit_tag, pinfo, tree, tvb, offset, hf_index,
&error);
@ -1396,7 +1396,7 @@ dissect_x411_MTABindError(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset,
static int
dissect_x411_NumericString(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
#line 480 "x411.cnf"
#line 482 "x411.cnf"
tvbuff_t *nstring = NULL;
offset = dissect_ber_restricted_string(implicit_tag, BER_UNI_TAG_NumericString,
@ -1434,7 +1434,7 @@ static int dissect_sub_address_impl(packet_info *pinfo, proto_tree *tree, tvbuff
static int
dissect_x411_PrintableString(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
#line 502 "x411.cnf"
#line 504 "x411.cnf"
tvbuff_t *pstring = NULL;
char *fmt = NULL;
@ -1517,7 +1517,7 @@ static const ber_choice_t CountryName_choice[] = {
static int
dissect_x411_CountryName(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
#line 257 "x411.cnf"
#line 259 "x411.cnf"
gint8 class;
gboolean pc, ind_field;
gint32 tag;
@ -1562,7 +1562,7 @@ static const ber_choice_t AdministrationDomainName_choice[] = {
static int
dissect_x411_AdministrationDomainName(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
#line 279 "x411.cnf"
#line 281 "x411.cnf"
gint8 class;
gboolean pc, ind_field;
gint32 tag;
@ -1608,7 +1608,7 @@ static const ber_choice_t PrivateDomainIdentifier_choice[] = {
static int
dissect_x411_PrivateDomainIdentifier(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
#line 442 "x411.cnf"
#line 444 "x411.cnf"
if(doing_address)
g_strlcat(oraddress, "/P=", MAX_ORA_STR_LEN);
@ -1639,7 +1639,7 @@ static const ber_sequence_t GlobalDomainIdentifier_sequence[] = {
static int
dissect_x411_GlobalDomainIdentifier(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
#line 549 "x411.cnf"
#line 551 "x411.cnf"
oraddress = ep_alloc(MAX_ORA_STR_LEN); oraddress[0] = '\0';
address_item = tree;
@ -1670,7 +1670,7 @@ static int dissect_attempted_domain(packet_info *pinfo, proto_tree *tree, tvbuff
static int
dissect_x411_LocalIdentifier(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
#line 563 "x411.cnf"
#line 565 "x411.cnf"
tvbuff_t *id = NULL;
offset = dissect_ber_restricted_string(implicit_tag, BER_UNI_TAG_IA5String,
@ -1698,7 +1698,7 @@ static const ber_sequence_t MTSIdentifier_sequence[] = {
static int
dissect_x411_MTSIdentifier(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
#line 571 "x411.cnf"
#line 573 "x411.cnf"
doing_address = TRUE;
@ -1729,7 +1729,7 @@ static int dissect_message_identifier(packet_info *pinfo, proto_tree *tree, tvbu
static int
dissect_x411_X121Address(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
#line 411 "x411.cnf"
#line 413 "x411.cnf"
tvbuff_t *string = NULL;
offset = dissect_ber_restricted_string(implicit_tag, BER_UNI_TAG_NumericString,
@ -1764,7 +1764,7 @@ static int dissect_network_address_impl(packet_info *pinfo, proto_tree *tree, tv
static int
dissect_x411_TerminalIdentifier(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
#line 425 "x411.cnf"
#line 427 "x411.cnf"
tvbuff_t *string = NULL;
offset = dissect_ber_restricted_string(implicit_tag, BER_UNI_TAG_PrintableString,
@ -1800,7 +1800,7 @@ static const ber_choice_t PrivateDomainName_choice[] = {
static int
dissect_x411_PrivateDomainName(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
#line 435 "x411.cnf"
#line 437 "x411.cnf"
if(doing_address)
g_strlcat(oraddress, "/P=", MAX_ORA_STR_LEN);
@ -1822,7 +1822,7 @@ static int dissect_private_domain_name_impl(packet_info *pinfo, proto_tree *tree
static int
dissect_x411_OrganizationName(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
#line 452 "x411.cnf"
#line 454 "x411.cnf"
tvbuff_t *string = NULL;
offset = dissect_ber_restricted_string(implicit_tag, BER_UNI_TAG_PrintableString,
@ -1923,7 +1923,7 @@ static const ber_sequence_t BuiltInStandardAttributes_sequence[] = {
static int
dissect_x411_BuiltInStandardAttributes(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
#line 588 "x411.cnf"
#line 590 "x411.cnf"
address_item = tree;
@ -2005,7 +2005,7 @@ static int dissect_message_sequence_number_impl(packet_info *pinfo, proto_tree *
static int
dissect_x411_T_extension_attribute_value(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
#line 250 "x411.cnf"
#line 252 "x411.cnf"
offset=call_x411_oid_callback("x411.extension-attribute", tvb, offset, pinfo, tree);
@ -2062,7 +2062,7 @@ static const ber_sequence_t ORName_sequence[] = {
int
dissect_x411_ORName(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
#line 536 "x411.cnf"
#line 538 "x411.cnf"
oraddress = ep_alloc(MAX_ORA_STR_LEN); oraddress[0] = '\0';
address_item = NULL;
@ -2195,7 +2195,7 @@ static int dissect_g3_facsimile_impl(packet_info *pinfo, proto_tree *tree, tvbuf
static int
dissect_x411_TeletexString(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
#line 490 "x411.cnf"
#line 492 "x411.cnf"
tvbuff_t *tstring = NULL;
offset = dissect_ber_restricted_string(implicit_tag, BER_UNI_TAG_TeletexString,
@ -2349,7 +2349,7 @@ static const value_string x411_BuiltInContentType_vals[] = {
static int
dissect_x411_BuiltInContentType(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
#line 349 "x411.cnf"
#line 351 "x411.cnf"
guint32 ict = -1;
offset = dissect_ber_integer(implicit_tag, pinfo, tree, tvb, offset, hf_index,
@ -2384,7 +2384,7 @@ static int dissect_built_in_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t
int
dissect_x411_ExtendedContentType(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
#line 333 "x411.cnf"
#line 335 "x411.cnf"
const char *name = NULL;
offset = dissect_ber_object_identifier_str(implicit_tag, pinfo, tree, tvb, offset, hf_index, &content_type_id);
@ -2441,7 +2441,7 @@ static int dissect_ContentTypes_item(packet_info *pinfo, proto_tree *tree, tvbuf
static int
dissect_x411_ContentIdentifier(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
#line 299 "x411.cnf"
#line 301 "x411.cnf"
gint8 class;
gboolean pc, ind_field;
gint32 tag;
@ -2527,7 +2527,7 @@ static int dissect_per_message_indicators(packet_info *pinfo, proto_tree *tree,
static int
dissect_x411_Time(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
#line 631 "x411.cnf"
#line 633 "x411.cnf"
tvbuff_t *arrival = NULL;
offset = dissect_ber_restricted_string(implicit_tag, BER_UNI_TAG_UTCTime,
@ -2666,7 +2666,7 @@ static const value_string x411_RoutingAction_vals[] = {
static int
dissect_x411_RoutingAction(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
#line 642 "x411.cnf"
#line 644 "x411.cnf"
int action = 0;
offset = dissect_ber_integer(implicit_tag, pinfo, tree, tvb, offset, hf_index,
@ -2742,7 +2742,7 @@ static const ber_sequence_t DomainSuppliedInformation_set[] = {
static int
dissect_x411_DomainSuppliedInformation(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
#line 610 "x411.cnf"
#line 612 "x411.cnf"
doing_address = FALSE;
@ -2770,7 +2770,7 @@ static const ber_sequence_t TraceInformationElement_sequence[] = {
static int
dissect_x411_TraceInformationElement(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
#line 594 "x411.cnf"
#line 596 "x411.cnf"
doing_address = TRUE;
@ -2853,7 +2853,7 @@ static int dissect_criticality_impl(packet_info *pinfo, proto_tree *tree, tvbuff
static int
dissect_x411_ExtensionValue(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
#line 234 "x411.cnf"
#line 236 "x411.cnf"
const char *name;
if(extension_id != -1)
@ -3057,7 +3057,7 @@ static int dissect_message_envelope(packet_info *pinfo, proto_tree *tree, tvbuff
static int
dissect_x411_Content(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
#line 367 "x411.cnf"
#line 369 "x411.cnf"
tvbuff_t *next_tvb;
/* we can do this now constructed octet strings are supported */
@ -3292,7 +3292,7 @@ static int dissect_subject_intermediate_trace_information(packet_info *pinfo, pr
static int
dissect_x411_AdditionalInformation(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
#line 228 "x411.cnf"
#line 230 "x411.cnf"
/*XXX not implemented yet */
@ -3376,7 +3376,7 @@ static int dissect_delivery_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t
}
static const value_string x411_NonDeliveryReasonCode_vals[] = {
const value_string x411_NonDeliveryReasonCode_vals[] = {
{ 0, "transfer-failure" },
{ 1, "unable-to-transfer" },
{ 2, "conversion-not-performed" },
@ -3390,7 +3390,7 @@ static const value_string x411_NonDeliveryReasonCode_vals[] = {
};
static int
int
dissect_x411_NonDeliveryReasonCode(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
offset = dissect_ber_integer(implicit_tag, pinfo, tree, tvb, offset, hf_index,
NULL);
@ -3405,7 +3405,7 @@ static int dissect_non_delivery_reason_code_impl(packet_info *pinfo, proto_tree
}
static const value_string x411_NonDeliveryDiagnosticCode_vals[] = {
const value_string x411_NonDeliveryDiagnosticCode_vals[] = {
{ 0, "unrecognised-OR-name" },
{ 1, "ambiguous-OR-name" },
{ 2, "mts-congestion" },
@ -3489,7 +3489,7 @@ static const value_string x411_NonDeliveryDiagnosticCode_vals[] = {
};
static int
int
dissect_x411_NonDeliveryDiagnosticCode(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
offset = dissect_ber_integer(implicit_tag, pinfo, tree, tvb, offset, hf_index,
NULL);
@ -3747,7 +3747,7 @@ static const ber_sequence_t MTASuppliedInformation_set[] = {
static int
dissect_x411_MTASuppliedInformation(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
#line 619 "x411.cnf"
#line 621 "x411.cnf"
doing_address = FALSE;
@ -3776,7 +3776,7 @@ static const ber_sequence_t InternalTraceInformationElement_sequence[] = {
static int
dissect_x411_InternalTraceInformationElement(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
#line 602 "x411.cnf"
#line 604 "x411.cnf"
doing_address = TRUE;
@ -4883,7 +4883,7 @@ static int dissect_built_in_argument_impl(packet_info *pinfo, proto_tree *tree,
static int
dissect_x411_T_refused_extension(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
#line 254 "x411.cnf"
#line 256 "x411.cnf"
/*XXX not implemented yet */
@ -5336,7 +5336,7 @@ static int dissect_standard_parameters_impl(packet_info *pinfo, proto_tree *tree
static int
dissect_x411_T_type_extensions_item(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
#line 231 "x411.cnf"
#line 233 "x411.cnf"
/*XXX not implemented yet */
@ -5702,7 +5702,7 @@ static const ber_sequence_t ORAddress_sequence[] = {
int
dissect_x411_ORAddress(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
#line 523 "x411.cnf"
#line 525 "x411.cnf"
oraddress = ep_alloc(MAX_ORA_STR_LEN); oraddress[0] = '\0';
doing_address = TRUE;
@ -6268,7 +6268,7 @@ dissect_x411_CertificateSelectors(gboolean implicit_tag _U_, tvbuff_t *tvb, int
static int
dissect_x411_CommonName(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
#line 465 "x411.cnf"
#line 467 "x411.cnf"
tvbuff_t *string = NULL;
offset = dissect_ber_restricted_string(implicit_tag, BER_UNI_TAG_PrintableString,
@ -6954,7 +6954,7 @@ static const ber_sequence_t MTANameAndOptionalGDI_sequence[] = {
static int
dissect_x411_MTANameAndOptionalGDI(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
#line 579 "x411.cnf"
#line 581 "x411.cnf"
doing_address = TRUE;
@ -7002,7 +7002,7 @@ static int dissect_name(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int
static int
dissect_x411_T_value(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
#line 679 "x411.cnf"
#line 681 "x411.cnf"
offset=call_x411_oid_callback("x411.tokendata", tvb, offset, pinfo, tree);

View File

@ -38,6 +38,8 @@ int dissect_x411_mts_apdu (tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent
/*--- Included file: packet-x411-exp.h ---*/
#line 1 "packet-x411-exp.h"
extern const value_string x411_NonDeliveryReasonCode_vals[];
extern const value_string x411_NonDeliveryDiagnosticCode_vals[];
int dissect_x411_SecurityContext(gboolean implicit_tag, tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, int hf_index);
int dissect_x411_EncodedInformationTypesConstraints(gboolean implicit_tag, tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, int hf_index);
int dissect_x411_MessageSubmissionEnvelope(gboolean implicit_tag, tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, int hf_index);
@ -46,6 +48,8 @@ int dissect_x411_ExtendedContentType(gboolean implicit_tag, tvbuff_t *tvb, int o
int dissect_x411_ContentLength(gboolean implicit_tag, tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, int hf_index);
int dissect_x411_MessageDeliveryIdentifier(gboolean implicit_tag, tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, int hf_index);
int dissect_x411_MessageDeliveryTime(gboolean implicit_tag, tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, int hf_index);
int dissect_x411_NonDeliveryReasonCode(gboolean implicit_tag, tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, int hf_index);
int dissect_x411_NonDeliveryDiagnosticCode(gboolean implicit_tag, tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, int hf_index);
int dissect_x411_SupplementaryInformation(gboolean implicit_tag, tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, int hf_index);
int dissect_x411_RequestedDeliveryMethod(gboolean implicit_tag, tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, int hf_index);
int dissect_x411_OriginatingMTACertificate(gboolean implicit_tag, tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, int hf_index);

View File

@ -1,6 +1,6 @@
/* Do not modify this file. */
/* It is created automatically by the ASN.1 to Wireshark dissector compiler */
/* .\packet-x420.c */
/* ./packet-x420.c */
/* ../../tools/asn2wrs.py -b -e -p x420 -c x420.cnf -s packet-x420-template x420.asn */
/* Input file: packet-x420-template.c */
@ -646,7 +646,7 @@ static int dissect_telex_compatible_impl(packet_info *pinfo, proto_tree *tree, t
static int
dissect_x420_T_type(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
#line 113 "x420.cnf"
#line 115 "x420.cnf"
const char *name = NULL;
offset = dissect_ber_object_identifier_str(implicit_tag, pinfo, tree, tvb, offset, hf_index, &object_identifier_id);
@ -667,7 +667,7 @@ static int dissect_type(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int
static int
dissect_x420_T_value(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
#line 121 "x420.cnf"
#line 123 "x420.cnf"
offset=call_ber_oid_callback(object_identifier_id, tvb, offset, pinfo, tree);
@ -904,7 +904,7 @@ static int dissect_related_IPMs_impl(packet_info *pinfo, proto_tree *tree, tvbuf
static int
dissect_x420_SubjectField(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
#line 143 "x420.cnf"
#line 145 "x420.cnf"
tvbuff_t *subject=NULL;
offset = dissect_ber_restricted_string(implicit_tag, BER_UNI_TAG_TeletexString,
@ -1236,7 +1236,7 @@ static int dissect_g3_facsimile_impl(packet_info *pinfo, proto_tree *tree, tvbuf
static int
dissect_x420_Interchange_Data_Element(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
#line 162 "x420.cnf"
#line 164 "x420.cnf"
/* XXX Not implemented yet */
@ -1552,7 +1552,7 @@ static int dissect_bilaterally_defined_impl(packet_info *pinfo, proto_tree *tree
static int
dissect_x420_NationallyDefinedBodyPart(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
#line 165 "x420.cnf"
#line 167 "x420.cnf"
/* XXX Not implemented yet */
@ -1653,7 +1653,7 @@ static const ber_sequence_t IPM_sequence[] = {
int
dissect_x420_IPM(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
#line 125 "x420.cnf"
#line 127 "x420.cnf"
if((hf_index == hf_x420_ipm) && check_col(pinfo->cinfo, COL_INFO))
col_append_fstr(pinfo->cinfo, COL_INFO, " Message");
@ -1733,14 +1733,14 @@ static int dissect_notification_extensions_impl(packet_info *pinfo, proto_tree *
}
static const value_string x420_NonReceiptReasonField_vals[] = {
const value_string x420_NonReceiptReasonField_vals[] = {
{ 0, "ipm-discarded" },
{ 1, "ipm-auto-forwarded" },
{ 0, NULL }
};
static int
int
dissect_x420_NonReceiptReasonField(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
offset = dissect_ber_integer(implicit_tag, pinfo, tree, tvb, offset, hf_index,
NULL);
@ -1752,7 +1752,7 @@ static int dissect_non_receipt_reason_impl(packet_info *pinfo, proto_tree *tree,
}
static const value_string x420_DiscardReasonField_vals[] = {
const value_string x420_DiscardReasonField_vals[] = {
{ 0, "ipm-expired" },
{ 1, "ipm-obsoleted" },
{ 2, "user-subscription-terminated" },
@ -1761,7 +1761,7 @@ static const value_string x420_DiscardReasonField_vals[] = {
};
static int
int
dissect_x420_DiscardReasonField(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
offset = dissect_ber_integer(implicit_tag, pinfo, tree, tvb, offset, hf_index,
NULL);
@ -1979,7 +1979,7 @@ static const ber_sequence_t IPN_set[] = {
int
dissect_x420_IPN(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
#line 133 "x420.cnf"
#line 135 "x420.cnf"
if((hf_index == hf_x420_ipn) && check_col(pinfo->cinfo, COL_INFO))
col_append_fstr(pinfo->cinfo, COL_INFO, " Notification");
@ -2665,7 +2665,7 @@ dissect_x420_Precedence(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, pa
static int
dissect_x420_CharacterSetRegistration(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
#line 154 "x420.cnf"
#line 156 "x420.cnf"
guint32 crs;
proto_item *pi;
offset = dissect_ber_integer(implicit_tag, pinfo, tree, tvb, offset, hf_index,

View File

@ -1,6 +1,6 @@
/* Do not modify this file. */
/* It is created automatically by the ASN.1 to Wireshark dissector compiler */
/* .\packet-x420.h */
/* ./packet-x420.h */
/* ../../tools/asn2wrs.py -b -e -p x420 -c x420.cnf -s packet-x420-template x420.asn */
/* Input file: packet-x420-template.h */
@ -38,12 +38,16 @@
/*--- Included file: packet-x420-exp.h ---*/
#line 1 "packet-x420-exp.h"
extern const value_string x420_InformationObject_vals[];
extern const value_string x420_NonReceiptReasonField_vals[];
extern const value_string x420_DiscardReasonField_vals[];
int dissect_x420_InformationObject(gboolean implicit_tag, tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, int hf_index);
int dissect_x420_IPM(gboolean implicit_tag, tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, int hf_index);
int dissect_x420_ORDescriptor(gboolean implicit_tag, tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, int hf_index);
int dissect_x420_ExtensionsField(gboolean implicit_tag, tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, int hf_index);
int dissect_x420_MessageParameters(gboolean implicit_tag, tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, int hf_index);
int dissect_x420_IPN(gboolean implicit_tag, tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, int hf_index);
int dissect_x420_NonReceiptReasonField(gboolean implicit_tag, tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, int hf_index);
int dissect_x420_DiscardReasonField(gboolean implicit_tag, tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, int hf_index);
/*--- End of included file: packet-x420-exp.h ---*/
#line 30 "packet-x420-template.h"