From Alejandro Vaquero :

Find attached a patch for "Voip analysis" to get the LRQ/LCF/LRJ messages included in the H323 calls for Gatekeeper to Gatekeeper configurations

svn path=/trunk/; revision=13337
This commit is contained in:
Anders Broman 2005-02-07 08:57:47 +00:00
parent c765d211e9
commit 2a9f29ce77
4 changed files with 40 additions and 15 deletions

View File

@ -744,7 +744,7 @@ static int hf_h225_transportQOS = -1; /* TransportQOS */
static int hf_h225_gatewayDataRate = -1; /* DataRate */
static int hf_h225_desiredTunnelledProtocol = -1; /* TunnelledProtocol */
static int hf_h225_canMapSrcAlias = -1; /* BOOLEAN */
static int hf_h225_DestinationInfo_item = -1; /* AliasAddress */
static int hf_h225_DestinationInfo_item = -1; /* DestinationInfo_item */
static int hf_h225_pointToPoint = -1; /* NULL */
static int hf_h225_oneToN = -1; /* NULL */
static int hf_h225_nToOne = -1; /* NULL */
@ -2232,8 +2232,12 @@ static int dissect_h245Address(tvbuff_t *tvb, int offset, packet_info *pinfo, pr
static int
dissect_h225_DialedDigits(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index) {
offset=dissect_per_restricted_character_string(tvb, offset, pinfo, tree, hf_index, 1, 128, "#,*0123456789", 13);
if (h225_pi->is_destinationInfo == TRUE) {
offset = dissect_per_restricted_character_string(tvb, offset, pinfo, tree, hf_index, 1, 128, "#,*0123456789", 13, (char *)&h225_pi->dialedDigits , 64);
h225_pi->is_destinationInfo = FALSE;
}
else
offset = dissect_per_restricted_character_string(tvb, offset, pinfo, tree, hf_index, 1, 128, "#,*0123456789", 13, NULL, NULL);
return offset;
}
@ -2515,7 +2519,7 @@ static int dissect_publicTypeOfNumber(tvbuff_t *tvb, int offset, packet_info *pi
static int
dissect_h225_NumberDigits(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index) {
offset=dissect_per_restricted_character_string(tvb, offset, pinfo, tree, hf_index, 1, 128, "#,*0123456789", 13);
offset=dissect_per_restricted_character_string(tvb, offset, pinfo, tree, hf_index, 1, 128, "#,*0123456789", 13, NULL, NULL);
return offset;
}
@ -2649,7 +2653,8 @@ static int dissect_routeCalltoSCN_item(tvbuff_t *tvb, int offset, packet_info *p
static int
dissect_h225_TBCD_STRING(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index) {
offset = dissect_per_restricted_character_string(tvb, offset, pinfo, tree, hf_index,
-1, -1, "0123456789#*abc", strlen("0123456789#*abc"));
-1, -1, "0123456789#*abc", strlen("0123456789#*abc"),
NULL, NULL);
return offset;
}
@ -2914,9 +2919,6 @@ static int dissect_duplicateAlias_item(tvbuff_t *tvb, int offset, packet_info *p
static int dissect_srcInfo_item(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree) {
return dissect_h225_AliasAddress(tvb, offset, pinfo, tree, hf_h225_srcInfo_item);
}
static int dissect_DestinationInfo_item(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree) {
return dissect_h225_AliasAddress(tvb, offset, pinfo, tree, hf_h225_DestinationInfo_item);
}
static int dissect_modifiedSrcInfo_item(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree) {
return dissect_h225_AliasAddress(tvb, offset, pinfo, tree, hf_h225_modifiedSrcInfo_item);
}
@ -7583,6 +7585,19 @@ static int dissect_callModel(tvbuff_t *tvb, int offset, packet_info *pinfo, prot
}
static int
dissect_h225_DestinationInfo_item(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index) {
h225_pi->is_destinationInfo = TRUE;
offset = dissect_h225_AliasAddress(tvb, offset, pinfo, tree, hf_index);
return offset;
}
static int dissect_DestinationInfo_item(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree) {
return dissect_h225_DestinationInfo_item(tvb, offset, pinfo, tree, hf_h225_DestinationInfo_item);
}
static int
dissect_h225_DestinationInfo(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index) {
offset = dissect_per_sequence_of(tvb, offset, pinfo, tree, hf_index,
@ -12274,6 +12289,8 @@ static void reset_h225_packet_info(h225_packet_info *pi)
pi->h245_address = 0;
pi->h245_port = 0;
pi->frame_label[0] = '\0';
pi->dialedDigits[0] = '\0';
pi->is_destinationInfo = FALSE;
}
/*

View File

@ -1,6 +1,6 @@
/* Do not modify this file. */
/* It is created automatically by the ASN.1 to Ethereal dissector compiler */
/* .\packet-h225.h */
/* ./packet-h225.h */
/* ../../tools/asn2eth.py -X -e -p h225 -c h225.cnf -s packet-h225-template h225.asn */
/* Input file: packet-h225-template.h */
@ -72,6 +72,8 @@ typedef struct _h225_packet_info {
gboolean is_h245Tunneling;
guint32 h245_address;
guint16 h245_port;
gchar dialedDigits[64]; /* Dialed Digits in the LRQ and LCF used for voip analysis */
gboolean is_destinationInfo;
gchar frame_label[50]; /* the Fram label used by graph_analysis, what is a abreviation of cinfo */
} h225_packet_info;

View File

@ -269,7 +269,7 @@ dissect_per_IA5String(tvbuff_t *tvb, guint32 offset, packet_info *pinfo, proto_t
/* XXX we dont do >64k length strings yet */
guint32
dissect_per_restricted_character_string(tvbuff_t *tvb, guint32 offset, packet_info *pinfo, proto_tree *tree, int hf_index, int min_len, int max_len, char *alphabet, int alphabet_length)
dissect_per_restricted_character_string(tvbuff_t *tvb, guint32 offset, packet_info *pinfo, proto_tree *tree, int hf_index, int min_len, int max_len, char *alphabet, int alphabet_length, char *info_str, guint32 info_str_len)
{
guint32 length;
gboolean byte_aligned;
@ -282,6 +282,9 @@ DEBUG_ENTRY("dissect_per_restricted_character_string");
/* xx.x if the length is 0 bytes there will be no encoding */
if(max_len==0){
if (info_str != NULL) {
info_str[0] = '\0';
}
return offset;
}
@ -397,27 +400,30 @@ DEBUG_ENTRY("dissect_per_restricted_character_string");
}
str[char_pos]=0;
proto_tree_add_string(tree, hf_index, tvb, (old_offset>>3), (offset>>3)-(old_offset>>3), str);
if (info_str != NULL) {
if (info_str_len<length) str[info_str_len-1] = '\0';
strcpy(info_str, str);
}
return offset;
}
guint32
dissect_per_NumericString(tvbuff_t *tvb, guint32 offset, packet_info *pinfo, proto_tree *tree, int hf_index, int min_len, int max_len)
{
offset=dissect_per_restricted_character_string(tvb, offset, pinfo, tree, hf_index, min_len, max_len, " 0123456789", 11);
offset=dissect_per_restricted_character_string(tvb, offset, pinfo, tree, hf_index, min_len, max_len, " 0123456789", 11, NULL, NULL);
return offset;
}
guint32
dissect_per_PrintableString(tvbuff_t *tvb, guint32 offset, packet_info *pinfo, proto_tree *tree, int hf_index, int min_len, int max_len)
{
offset=dissect_per_restricted_character_string(tvb, offset, pinfo, tree, hf_index, min_len, max_len, " '()+,-.*0123456789:=?ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz", 74);
offset=dissect_per_restricted_character_string(tvb, offset, pinfo, tree, hf_index, min_len, max_len, " '()+,-.*0123456789:=?ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz", 74, NULL, NULL);
return offset;
}
guint32
dissect_per_VisibleString(tvbuff_t *tvb, guint32 offset, packet_info *pinfo, proto_tree *tree, int hf_index, int min_len, int max_len)
{
offset=dissect_per_restricted_character_string(tvb, offset, pinfo, tree, hf_index, min_len, max_len,
" !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~", 95);
" !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~", 95, NULL, NULL);
return offset;
}
guint32

View File

@ -100,6 +100,6 @@ extern guint32 dissect_per_octet_string(tvbuff_t *tvb, guint32 offset, packet_in
extern guint32 dissect_per_bit_string(tvbuff_t *tvb, guint32 offset, packet_info *pinfo, proto_tree *tree, int hf_index, int min_len, int max_len);
extern guint32 dissect_per_restricted_character_string(tvbuff_t *tvb, guint32 offset, packet_info *pinfo, proto_tree *tree, int hf_index, int min_len, int max_len, char *alphabet, int alphabet_length);
extern guint32 dissect_per_restricted_character_string(tvbuff_t *tvb, guint32 offset, packet_info *pinfo, proto_tree *tree, int hf_index, int min_len, int max_len, char *alphabet, int alphabet_length, char *info_str, guint32 info_str_len);
#endif /* __PACKET_PER_H__ */