Put PDU dissection in protocol tree

svn path=/trunk/; revision=52724
This commit is contained in:
Pascal Quantin 2013-10-20 21:05:37 +00:00
parent 24ba431d80
commit b552143a5c
4 changed files with 56 additions and 26 deletions

View File

@ -25,12 +25,20 @@ SETId/min minsi
#.END
#.FN_HDR ILP-PDU
proto_tree_add_item(tree, proto_ilp, tvb, 0, -1, ENC_NA);
proto_item *it;
proto_tree *ilp_tree;
it = proto_tree_add_item(tree, proto_ilp, tvb, 0, -1, ENC_NA);
ilp_tree = proto_item_add_subtree(it, ett_ilp);
col_set_str(actx->pinfo->cinfo, COL_PROTOCOL, PSNAME);
col_clear(actx->pinfo->cinfo, COL_INFO);
#.END
#.FN_BODY ILP-PDU TREE=ilp_tree
%(DEFAULT_BODY)s
#.END
#.FN_BODY IlpMessage VAL_PTR = &IlpMessage
guint32 IlpMessage;

View File

@ -26,10 +26,18 @@ SETId/min minsi
#.END
#.FN_HDR ULP-PDU
proto_tree_add_item(tree, proto_ulp, tvb, 0, -1, ENC_NA);
proto_item *it;
proto_tree *ulp_tree;
col_set_str(actx->pinfo->cinfo, COL_PROTOCOL, PSNAME);
col_clear(actx->pinfo->cinfo, COL_INFO);
it = proto_tree_add_item(tree, proto_ulp, tvb, 0, -1, ENC_NA);
ulp_tree = proto_item_add_subtree(it, ett_ulp);
col_set_str(actx->pinfo->cinfo, COL_PROTOCOL, PSNAME);
col_clear(actx->pinfo->cinfo, COL_INFO);
#.END
#.FN_BODY ULP-PDU TREE=ulp_tree
%(DEFAULT_BODY)s
#.END
#.FN_BODY UlpMessage VAL_PTR = &UlpMessage
@ -48,7 +56,7 @@ guint32 UlpMessage;
%(DEFAULT_BODY)s
if (rrlp_tvb && rrlp_handle) {
call_dissector(rrlp_handle, rrlp_tvb, %(ACTX)s->pinfo, tree);
call_dissector(rrlp_handle, rrlp_tvb, %(ACTX)s->pinfo, tree);
}
#.FN_BODY Ver2-PosPayLoad-extension/lPPPayload/_item VAL_PTR = &lpp_tvb
@ -57,21 +65,21 @@ guint32 UlpMessage;
%(DEFAULT_BODY)s
if (lpp_tvb && lpp_handle) {
call_dissector(lpp_handle, lpp_tvb, %(ACTX)s->pinfo, tree);
call_dissector(lpp_handle, lpp_tvb, %(ACTX)s->pinfo, tree);
}
#.FN_BODY ThirdPartyID/sip-uri
# asn2wrs does not handle '%' in the resticted string ( Has to be there twice)
# asn2wrs does not handle '%' in the restricted string ( Has to be there twice)
offset = dissect_per_restricted_character_string(tvb, offset, actx, tree, hf_index,
1, 255, FALSE, "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789:./-_~%%#@?", 72,
NULL);
#.FN_BODY ThirdPartyID/ims-public-identity
# asn2wrs does not handle '%' in the resticted string ( Has to be there twice)
# asn2wrs does not handle '%' in the restricted string ( Has to be there twice)
offset = dissect_per_restricted_character_string(tvb, offset, actx, tree, hf_index,
1, 255, FALSE, "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789:./-_~%%#@?", 72,
NULL);
#.FN_BODY ThirdPartyID/uri
# asn2wrs does not handle '%' in the resticted string ( Has to be there twice)
# asn2wrs does not handle '%' in the restricted string ( Has to be there twice)
offset = dissect_per_restricted_character_string(tvb, offset, actx, tree, hf_index,
1, 255, FALSE, "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789./-_~%%#", 69,
NULL);

View File

@ -3342,7 +3342,7 @@ dissect_ilp_OCTET_STRING_SIZE_1_8192(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx
static int
dissect_ilp_T_rrlpPayload(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
#line 45 "../../asn1/ilp/ilp.cnf"
#line 53 "../../asn1/ilp/ilp.cnf"
tvbuff_t *rrlp_tvb;
offset = dissect_per_octet_string(tvb, offset, actx, tree, hf_index,
@ -3362,7 +3362,7 @@ dissect_ilp_T_rrlpPayload(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U
static int
dissect_ilp_T_lPPPayload_item(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
#line 54 "../../asn1/ilp/ilp.cnf"
#line 62 "../../asn1/ilp/ilp.cnf"
tvbuff_t *lpp_tvb;
offset = dissect_per_octet_string(tvb, offset, actx, tree, hf_index,
@ -4033,7 +4033,7 @@ static const per_choice_t IlpMessage_choice[] = {
static int
dissect_ilp_IlpMessage(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
#line 35 "../../asn1/ilp/ilp.cnf"
#line 43 "../../asn1/ilp/ilp.cnf"
guint32 IlpMessage;
@ -4061,14 +4061,21 @@ static const per_sequence_t ILP_PDU_sequence[] = {
static int
dissect_ilp_ILP_PDU(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
#line 28 "../../asn1/ilp/ilp.cnf"
proto_tree_add_item(tree, proto_ilp, tvb, 0, -1, ENC_NA);
proto_item *it;
proto_tree *ilp_tree;
it = proto_tree_add_item(tree, proto_ilp, tvb, 0, -1, ENC_NA);
ilp_tree = proto_item_add_subtree(it, ett_ilp);
col_set_str(actx->pinfo->cinfo, COL_PROTOCOL, PSNAME);
col_clear(actx->pinfo->cinfo, COL_INFO);
offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index,
#line 39 "../../asn1/ilp/ilp.cnf"
offset = dissect_per_sequence(tvb, offset, actx, ilp_tree, hf_index,
ett_ilp_ILP_PDU, ILP_PDU_sequence);
return offset;
}

View File

@ -3489,7 +3489,7 @@ dissect_ulp_MultipleLocationIds(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *a
static int
dissect_ulp_T_sip_uri(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
#line 65 "../../asn1/ulp/ulp.cnf"
#line 73 "../../asn1/ulp/ulp.cnf"
offset = dissect_per_restricted_character_string(tvb, offset, actx, tree, hf_index,
1, 255, FALSE, "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789:./-_~%#@?", 72,
NULL);
@ -3502,7 +3502,7 @@ dissect_ulp_T_sip_uri(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, p
static int
dissect_ulp_T_ims_public_identity(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
#line 70 "../../asn1/ulp/ulp.cnf"
#line 78 "../../asn1/ulp/ulp.cnf"
offset = dissect_per_restricted_character_string(tvb, offset, actx, tree, hf_index,
1, 255, FALSE, "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789:./-_~%#@?", 72,
NULL);
@ -3515,7 +3515,7 @@ dissect_ulp_T_ims_public_identity(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t
static int
dissect_ulp_T_uri(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
#line 75 "../../asn1/ulp/ulp.cnf"
#line 83 "../../asn1/ulp/ulp.cnf"
offset = dissect_per_restricted_character_string(tvb, offset, actx, tree, hf_index,
1, 255, FALSE, "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789./-_~%#", 69,
NULL);
@ -4463,7 +4463,7 @@ dissect_ulp_OCTET_STRING_SIZE_1_8192(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx
static int
dissect_ulp_T_rrlpPayload(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
#line 46 "../../asn1/ulp/ulp.cnf"
#line 54 "../../asn1/ulp/ulp.cnf"
tvbuff_t *rrlp_tvb;
offset = dissect_per_octet_string(tvb, offset, actx, tree, hf_index,
@ -4471,7 +4471,7 @@ dissect_ulp_T_rrlpPayload(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U
if (rrlp_tvb && rrlp_handle) {
call_dissector(rrlp_handle, rrlp_tvb, actx->pinfo, tree);
call_dissector(rrlp_handle, rrlp_tvb, actx->pinfo, tree);
}
@ -4483,7 +4483,7 @@ dissect_ulp_T_rrlpPayload(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U
static int
dissect_ulp_T_lPPPayload_item(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
#line 55 "../../asn1/ulp/ulp.cnf"
#line 63 "../../asn1/ulp/ulp.cnf"
tvbuff_t *lpp_tvb;
offset = dissect_per_octet_string(tvb, offset, actx, tree, hf_index,
@ -4491,7 +4491,7 @@ dissect_ulp_T_lPPPayload_item(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *act
if (lpp_tvb && lpp_handle) {
call_dissector(lpp_handle, lpp_tvb, actx->pinfo, tree);
call_dissector(lpp_handle, lpp_tvb, actx->pinfo, tree);
}
@ -6220,7 +6220,7 @@ static const per_choice_t UlpMessage_choice[] = {
static int
dissect_ulp_UlpMessage(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
#line 36 "../../asn1/ulp/ulp.cnf"
#line 44 "../../asn1/ulp/ulp.cnf"
guint32 UlpMessage;
@ -6248,14 +6248,21 @@ static const per_sequence_t ULP_PDU_sequence[] = {
static int
dissect_ulp_ULP_PDU(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
#line 29 "../../asn1/ulp/ulp.cnf"
proto_tree_add_item(tree, proto_ulp, tvb, 0, -1, ENC_NA);
proto_item *it;
proto_tree *ulp_tree;
col_set_str(actx->pinfo->cinfo, COL_PROTOCOL, PSNAME);
col_clear(actx->pinfo->cinfo, COL_INFO);
it = proto_tree_add_item(tree, proto_ulp, tvb, 0, -1, ENC_NA);
ulp_tree = proto_item_add_subtree(it, ett_ulp);
offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index,
col_set_str(actx->pinfo->cinfo, COL_PROTOCOL, PSNAME);
col_clear(actx->pinfo->cinfo, COL_INFO);
#line 40 "../../asn1/ulp/ulp.cnf"
offset = dissect_per_sequence(tvb, offset, actx, ulp_tree, hf_index,
ett_ulp_ULP_PDU, ULP_PDU_sequence);
return offset;
}