aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/asn1/pres/pres.cnf
blob: 01539e9a221f10dda7618c9c6a89747ae50b75f8 (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
# pres.cnf
# pres conformation file

#.IMPORT ../rtse/rtse-exp.cnf

#.EXPORTS

#.PDU
UD-type

#.NO_EMIT
UDC-type

#.TYPE_RENAME
CPA-PPDU/normal-mode-parameters	T_CPA_PPDU_normal_mode_parameters
CPR-PPDU/normal-mode-parameters	T_CPR_PPDU_normal_mode_parameters
ARU-PPDU/normal-mode-parameters	T_ARU_PPDU_normal_mode_parameters

#.FIELD_RENAME
ARU-PPDU/normal-mode-parameters aRU_PPDU_normal_mode_parameters
CPA-PPDU/normal-mode-parameters	cPU_PPDU_normal_mode_parameters
CPR-PPDU/normal-mode-parameters	cPR_PPDU_normal_mode_parameters

ARU-PPDU/x400-mode-parameters aRU_PPDU_x400_mode_parameters
CPR-PPDU/x400-mode-parameters cPU_PPDU_x400_mode_parameters
CPA-PPDU/x410-mode-parameters cPR_PPDU_x400_mode_parameters

ARP-PPDU/provider-reason aRU_PPDU_provider-reason
CPR-PPDU/normal-mode-parameters/provider-reason cPR_PPDU__provider-reason




#.FN_BODY PDV-list/presentation-data-values/single-ASN1-type

 tvbuff_t	*next_tvb;
 char *oid;

	oid=find_oid_by_pres_ctx_id(actx->pinfo, presentation_context_identifier);
	if(oid){
		next_tvb = tvb_new_subset_remaining(tvb, offset);
		call_ber_oid_callback(oid, next_tvb, offset, actx->pinfo, global_tree, actx->private_data);
	} else {
		proto_tree_add_expert(tree, actx->pinfo, &ei_pres_dissector_not_available,
								tvb, offset, -1);
	}

#.FN_BODY PDV-list/presentation-data-values/octet-aligned

 tvbuff_t	*next_tvb;
 char *oid;

	oid=find_oid_by_pres_ctx_id(actx->pinfo, presentation_context_identifier);
	if(oid){
		dissect_ber_octet_string(implicit_tag, actx, tree, tvb, offset, hf_index, &next_tvb);
		call_ber_oid_callback(oid, next_tvb, offset, actx->pinfo, global_tree, actx->private_data);
	} else {
		proto_tree_add_expert(tree, actx->pinfo, &ei_pres_dissector_not_available,
								tvb, offset, -1);
		%(DEFAULT_BODY)s
	}


#.FN_PARS Abstract-syntax-name
  FN_VARIANT = _str  VAL_PTR = &abstract_syntax_name_oid

#.FN_PARS Presentation-context-identifier
 VAL_PTR = &presentation_context_identifier

#.FN_BODY Presentation-context-identifier
  const char *name;
  char *oid;
  struct SESSION_DATA_STRUCTURE* session = (struct SESSION_DATA_STRUCTURE*)actx->private_data;

  %(DEFAULT_BODY)s

  if(session)
	session->pres_ctx_id = presentation_context_identifier;

  oid = find_oid_by_pres_ctx_id(actx->pinfo, presentation_context_identifier);

  if(oid && (name = oid_resolved_from_string(wmem_packet_scope(), oid))) {
	proto_item_append_text(actx->created_item, " (%%s)", name);
  }

#.FN_PARS Abort-reason
  VAL_PTR = &reason

#.FN_BODY Abort-reason
  guint32 reason;

  %(DEFAULT_BODY)s

  col_append_fstr(actx->pinfo->cinfo, COL_INFO, " (%%s)", val_to_str(reason, pres_Abort_reason_vals, "unknown: %%d"));

#.FN_HDR Context-list/_item
	abstract_syntax_name_oid=NULL;
#.END
#.FN_FTR Context-list/_item
	register_ctx_id_and_oid(actx->pinfo, presentation_context_identifier, abstract_syntax_name_oid);
#.END