aboutsummaryrefslogtreecommitdiffstats
path: root/asn1/ansi-tcap/ansi_tcap.cnf
blob: 62835dcb72ae480e0bc7b3984016f86b9bbc1b54 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
# tcap.cnf
# $Id$
# tcap conformation file

#.OMIT_ASSIGNMENT
# Removed as they are giving 'defined but not used' warnings currently.
Priority
#.END

#--- OperationCode ---

#.FN_PARS
OperationCode            VAL_PTR = &ansi_tcap_private.d.OperationCode
OperationCode/national   VAL_PTR = &ansi_tcap_private.d.OperationCode_national
OperationCode/private    VAL_PTR = &ansi_tcap_private.d.OperationCode_private
#.FN_FTR OperationCode
  ansi_tcap_private.d.OperationCode_item = actx->created_item;
#.END

#--- INVOKE ---
#.FIELD_ATTR
Invoke/parameter  TYPE = FT_BYTES  DISPLAY = BASE_HEX

#.FN_BODY Invoke/parameter
tvbuff_t	*parameter_tvb;

  offset = dissect_ber_octet_string(TRUE, actx, tree, tvb, offset, hf_index,
                                       &parameter_tvb);
  if(!parameter_tvb)
    return offset;
  
  find_tcap_subdissector(parameter_tvb, actx, tree);

#.FN_HDR Invoke
  ansi_tcap_private.d.pdu = 1;

#--- RETURN RESULT ---

#.FIELD_ATTR
ReturnResult/parameter  TYPE = FT_BYTES  DISPLAY = BASE_HEX

#.FN_BODY ReturnResult/parameter
tvbuff_t	*parameter_tvb;


  offset = dissect_ber_octet_string(TRUE, actx, tree, tvb, offset, hf_index,
                                       &parameter_tvb);
  if(!parameter_tvb)
    return offset;
  
  find_tcap_subdissector(parameter_tvb, actx, tree);

#.FN_HDR ReturnResult
  ansi_tcap_private.d.pdu = 2;


#--- RETURN ERROR ---

#.FIELD_ATTR
ReturnError/parameter  TYPE = FT_BYTES  DISPLAY = BASE_HEX

#.FN_BODY ReturnError/parameter
tvbuff_t	*parameter_tvb;

  offset = dissect_ber_octet_string(TRUE, actx, tree, tvb, offset, hf_index,
                                       &parameter_tvb);
  if(!parameter_tvb)
    return offset;
  
  find_tcap_subdissector(parameter_tvb, actx, tree);

#.FN_HDR ReturnError
  ansi_tcap_private.d.pdu = 3;

#--- ObjectIDApplicationContext --
#.FN_BODY ObjectIDApplicationContext FN_VARIANT = _str  VAL_PTR = &oid_str

 static const char * oid_str;

 %(DEFAULT_BODY)s
 	ansi_tcap_private.objectApplicationId_oid= (void*) oid_str;
	ansi_tcap_private.oid_is_present=TRUE;

#.FN_HDR PackageType/unidirectional
gp_tcapsrt_info->ope=TC_ANSI_ALL;
if (check_col(actx->pinfo->cinfo, COL_INFO))
		col_add_str(actx->pinfo->cinfo, COL_INFO, "unidirectional ");

#.FN_HDR PackageType/queryWithPerm
gp_tcapsrt_info->ope=TC_ANSI_ALL;
if (check_col(actx->pinfo->cinfo, COL_INFO))
		col_add_str(actx->pinfo->cinfo, COL_INFO, "queryWithPerm ");

#.FN_HDR PackageType/queryWithoutPerm
gp_tcapsrt_info->ope=TC_ANSI_ALL;
if (check_col(actx->pinfo->cinfo, COL_INFO))
		col_add_str(actx->pinfo->cinfo, COL_INFO, "queryWithoutPerm ");

#.FN_HDR PackageType/response
gp_tcapsrt_info->ope=TC_ANSI_ALL;
if (check_col(actx->pinfo->cinfo, COL_INFO))
		col_add_str(actx->pinfo->cinfo, COL_INFO, "response ");

#.FN_HDR PackageType/conversationWithPerm
gp_tcapsrt_info->ope=TC_ANSI_ALL;
if (check_col(actx->pinfo->cinfo, COL_INFO))
		col_add_str(actx->pinfo->cinfo, COL_INFO, "conversationWithPerm ");

#.FN_HDR PackageType/conversationWithoutPerm
gp_tcapsrt_info->ope=TC_ANSI_ALL;
if (check_col(actx->pinfo->cinfo, COL_INFO))
		col_add_str(actx->pinfo->cinfo, COL_INFO, "conversationWithoutPerm ");

#.FN_HDR PackageType/abort
gp_tcapsrt_info->ope=TC_ANSI_ABORT;
if (check_col(actx->pinfo->cinfo, COL_INFO))
		col_add_str(actx->pinfo->cinfo, COL_INFO, "Abort ");

#.FN_BODY TransactionID/_untag VAL_PTR = &next_tvb

tvbuff_t *next_tvb;
guint8 len;

%(DEFAULT_BODY)s

if(next_tvb) {
	if(tvb_length(next_tvb) !=0)
		ansi_tcap_private.TransactionID_str = tvb_bytes_to_str(next_tvb, 0,tvb_length(next_tvb));
	len = tvb_length_remaining(next_tvb, 0);
	switch(len) {
	case 1:
		gp_tcapsrt_info->src_tid=tvb_get_guint8(next_tvb, 0);
		break;
	case 2:
		gp_tcapsrt_info->src_tid=tvb_get_ntohs(next_tvb, 0);
		break;
	case 4:
		gp_tcapsrt_info->src_tid=tvb_get_ntohl(next_tvb, 0);
		break;
	default:
		gp_tcapsrt_info->src_tid=0;
		break;
	}
}

#.END