TODO netlogon_user_flags_ntlmv2_enabled
[wireshark-sm.git] / epan / dissectors / asn1 / goose / goose.cnf
bloba47661b2d32c096ae5dc677de743f81a4827758c
1 # goose.cnf
2 # goose conformation file
4 #.MODULE_IMPORT
6 #.EXPORTS
8 #.PDU
10 #.NO_EMIT ONLY_VALS
11 GOOSEpdu
13 #.FN_BODY IECGoosePdu/simulation VAL_PTR = &value
14         bool value;
15         uint32_t len = tvb_reported_length_remaining(tvb, offset);
16         int origin_offset = offset;
17 %(DEFAULT_BODY)s
18         if((actx->private_data) && (actx->created_item)){
19                 goose_chk_data_t *data_chk = (goose_chk_data_t *)actx->private_data;
20                 proto_tree *expert_inf_tree = NULL;
21                 /* S bit set and Simulation attribute clear: reject as invalid GOOSE */
22                 if((data_chk->s_bit == true) && (value == false)){
23                         /* It really looks better showed as a new subtree */
24                         expert_inf_tree = proto_item_add_subtree(actx->created_item, ett_expert_inf_sim);
25                         proto_tree_add_expert(expert_inf_tree, actx->pinfo, &ei_goose_invalid_sim, tvb, origin_offset, len);
26                 }
27         }
28 #.END
30 #.FN_BODY UtcTime
32         uint32_t len;
33         uint32_t seconds;
34         uint32_t        fraction;
35         uint32_t nanoseconds;
36         nstime_t ts;
37         char *  ptime;
39         len = tvb_reported_length_remaining(tvb, offset);
41         if(len != 8)
42         {
43                 proto_tree_add_expert(tree, actx->pinfo, &ei_goose_mal_utctime, tvb, offset, len);
44                 if(hf_index > 0)
45                 {
46                         proto_tree_add_string(tree, hf_index, tvb, offset, len, "????");
47                 }
48                 return offset;
49         }
51         seconds = tvb_get_ntohl(tvb, offset);
52         fraction = tvb_get_ntoh24(tvb, offset+4) * 0x100; /* Only 3 bytes are recommended */
53         nanoseconds = (uint32_t)( ((uint64_t)fraction * UINT64_C(1000000000)) / UINT64_C(0x100000000) ) ;
55         ts.secs = seconds;
56         ts.nsecs = nanoseconds;
58         ptime = abs_time_to_str(actx->pinfo->pool, &ts, ABSOLUTE_TIME_UTC, true);
60         if(hf_index > 0)
61         {
62                 proto_tree_add_string(tree, hf_index, tvb, offset, len, ptime);
63         }
65 #.END
67 #.FN_BODY FloatingPoint
69         int len = tvb_reported_length_remaining(tvb, offset);
71         %(DEFAULT_BODY)s
72         if ((len == FLOAT_ENC_LENGTH) && (tvb_get_uint8(tvb,0) == SINGLE_FLOAT_EXP_BITS) ){
73                 /* IEEE 754 single precision floating point */
74                 proto_item_set_hidden(actx->created_item);
75                 proto_tree_add_item(tree, hf_goose_float_value, tvb, 1, (FLOAT_ENC_LENGTH-1), ENC_BIG_ENDIAN);
76         }
78 #.END
80 #.TYPE_ATTR
81 UtcTime TYPE = FT_STRING DISPLAY = BASE_NONE
84 #.FIELD_RENAME
85 GetReferenceRequestPdu/offset getReferenceRequest_offset
86 GSEMngtResponses/getGsReference gseMngtResponses_GetGSReference
87 GSEMngtResponses/getGoReference gseMngtResponses_GetGOReference
88 GSEMngtResponses/getGSSEDataOffset gseMngtResponses_GetGSSEDataOffset
89 GSEMngtResponses/getGOOSEElementNumber gseMngtResponses_GetGOOSEElementNumber
91 #.FIELD_ATTR
92 IECGoosePdu/stNum  TYPE = FT_UINT32  DISPLAY = BASE_DEC
93 IECGoosePdu/sqNum  TYPE = FT_UINT32  DISPLAY = BASE_DEC
94 GetReferenceRequestPdu/offset ABBREV=getReferenceRequest.offset
95 IECGoosePdu/simulation BLURB = "BOOLEAN"
96 #.END