1 /* Do not modify this file. Changes will be overwritten. */
2 /* Generated automatically by the ASN.1 to Wireshark dissector compiler */
4 /* ../../tools/asn2wrs.py -b -p sv -c ./sv.cnf -s ./packet-sv-template -D . -O ../../epan/dissectors sv.asn */
6 /* Input file: packet-sv-template.c */
8 #line 1 "../../asn1/sv/packet-sv-template.c"
10 * Routines for IEC 61850 Sampled Vales packet dissection
11 * Michael Bernhard 2008
15 * Wireshark - Network traffic analyzer
16 * By Gerald Combs <gerald@wireshark.org>
17 * Copyright 1998 Gerald Combs
19 * This program is free software; you can redistribute it and/or
20 * modify it under the terms of the GNU General Public License
21 * as published by the Free Software Foundation; either version 2
22 * of the License, or (at your option) any later version.
24 * This program is distributed in the hope that it will be useful,
25 * but WITHOUT ANY WARRANTY; without even the implied warranty of
26 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
27 * GNU General Public License for more details.
29 * You should have received a copy of the GNU General Public License
30 * along with this program; if not, write to the Free Software
31 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
37 #include <epan/packet.h>
38 #include <epan/asn1.h>
39 #include <epan/etypes.h>
40 #include <epan/expert.h>
45 #include "packet-ber.h"
46 #include "packet-acse.h"
50 #include "packet-sv.h"
52 #define PNAME "IEC61850 Sampled Values"
56 /* see IEC61850-8-1 8.2 */
57 #define Q_VALIDITY_GOOD (0x0 << 0)
58 #define Q_VALIDITY_INVALID (0x1 << 0)
59 #define Q_VALIDITY_QUESTIONABLE (0x3 << 0)
60 #define Q_VALIDITY_MASK (0x3 << 0)
62 #define Q_OVERFLOW (1 << 2)
63 #define Q_OUTOFRANGE (1 << 3)
64 #define Q_BADREFERENCE (1 << 4)
65 #define Q_OSCILLATORY (1 << 5)
66 #define Q_FAILURE (1 << 6)
67 #define Q_OLDDATA (1 << 7)
68 #define Q_INCONSISTENT (1 << 8)
69 #define Q_INACCURATE (1 << 9)
71 #define Q_SOURCE_PROCESS (0 << 10)
72 #define Q_SOURCE_SUBSTITUTED (1 << 10)
73 #define Q_SOURCE_MASK (1 << 10)
75 #define Q_TEST (1 << 11)
76 #define Q_OPERATORBLOCKED (1 << 12)
78 /* see UCA Implementation Guideline for IEC 61850-9-2 */
79 #define Q_DERIVED (1 << 13)
81 void proto_register_sv(void);
82 void proto_reg_handoff_sv(void);
85 static int sv_tap
= -1;
86 static sv_frame_data sv_data
;
88 /* Initialize the protocol and registered fields */
89 static int proto_sv
= -1;
90 static int hf_sv_appid
= -1;
91 static int hf_sv_length
= -1;
92 static int hf_sv_reserve1
= -1;
93 static int hf_sv_reserve2
= -1;
95 static int hf_sv_phmeas_instmag_i
= -1;
96 static int hf_sv_phsmeas_q
= -1;
97 static int hf_sv_phsmeas_q_validity
= -1;
98 static int hf_sv_phsmeas_q_overflow
= -1;
99 static int hf_sv_phsmeas_q_outofrange
= -1;
100 static int hf_sv_phsmeas_q_badreference
= -1;
101 static int hf_sv_phsmeas_q_oscillatory
= -1;
102 static int hf_sv_phsmeas_q_failure
= -1;
103 static int hf_sv_phsmeas_q_olddata
= -1;
104 static int hf_sv_phsmeas_q_inconsistent
= -1;
105 static int hf_sv_phsmeas_q_inaccurate
= -1;
106 static int hf_sv_phsmeas_q_source
= -1;
107 static int hf_sv_phsmeas_q_test
= -1;
108 static int hf_sv_phsmeas_q_operatorblocked
= -1;
109 static int hf_sv_phsmeas_q_derived
= -1;
112 /*--- Included file: packet-sv-hf.c ---*/
113 #line 1 "../../asn1/sv/packet-sv-hf.c"
114 static int hf_sv_savPdu
= -1; /* SavPdu */
115 static int hf_sv_noASDU
= -1; /* INTEGER_0_65535 */
116 static int hf_sv_seqASDU
= -1; /* SEQUENCE_OF_ASDU */
117 static int hf_sv_seqASDU_item
= -1; /* ASDU */
118 static int hf_sv_svID
= -1; /* VisibleString */
119 static int hf_sv_datSet
= -1; /* VisibleString */
120 static int hf_sv_smpCnt
= -1; /* T_smpCnt */
121 static int hf_sv_confRef
= -1; /* INTEGER_0_4294967295 */
122 static int hf_sv_refrTm
= -1; /* UtcTime */
123 static int hf_sv_smpSynch
= -1; /* T_smpSynch */
124 static int hf_sv_smpRate
= -1; /* INTEGER_0_65535 */
125 static int hf_sv_seqData
= -1; /* Data */
126 static int hf_sv_smpMod
= -1; /* T_smpMod */
128 /*--- End of included file: packet-sv-hf.c ---*/
129 #line 104 "../../asn1/sv/packet-sv-template.c"
131 /* Initialize the subtree pointers */
132 static int ett_sv
= -1;
133 static int ett_phsmeas
= -1;
134 static int ett_phsmeas_q
= -1;
137 /*--- Included file: packet-sv-ett.c ---*/
138 #line 1 "../../asn1/sv/packet-sv-ett.c"
139 static gint ett_sv_SampledValues
= -1;
140 static gint ett_sv_SavPdu
= -1;
141 static gint ett_sv_SEQUENCE_OF_ASDU
= -1;
142 static gint ett_sv_ASDU
= -1;
144 /*--- End of included file: packet-sv-ett.c ---*/
145 #line 111 "../../asn1/sv/packet-sv-template.c"
147 static expert_field ei_sv_mal_utctime
= EI_INIT
;
150 static const value_string sv_q_validity_vals
[] = {
153 { 3, "questionable" },
157 static const value_string sv_q_source_vals
[] = {
159 { 1, "substituted" },
164 dissect_PhsMeas1(gboolean implicit_tag
, packet_info
*pinfo
, proto_tree
*tree
, tvbuff_t
*tvb
, int offset
, int hf_id _U_
)
171 proto_tree
*subtree
= NULL
;
176 static const int *q_flags
[] = {
177 &hf_sv_phsmeas_q_validity
,
178 &hf_sv_phsmeas_q_overflow
,
179 &hf_sv_phsmeas_q_outofrange
,
180 &hf_sv_phsmeas_q_badreference
,
181 &hf_sv_phsmeas_q_oscillatory
,
182 &hf_sv_phsmeas_q_failure
,
183 &hf_sv_phsmeas_q_olddata
,
184 &hf_sv_phsmeas_q_inconsistent
,
185 &hf_sv_phsmeas_q_inaccurate
,
186 &hf_sv_phsmeas_q_source
,
187 &hf_sv_phsmeas_q_test
,
188 &hf_sv_phsmeas_q_operatorblocked
,
189 &hf_sv_phsmeas_q_derived
,
194 offset
=dissect_ber_identifier(pinfo
, tree
, tvb
, offset
, &class, &pc
, &tag
);
195 offset
=dissect_ber_length(pinfo
, tree
, tvb
, offset
, &len
, NULL
);
197 len
=tvb_length_remaining(tvb
, offset
);
201 it
= proto_tree_add_text(tree
, tvb
, offset
, len
, "PhsMeas1");
202 subtree
= proto_item_add_subtree(it
, ett_phsmeas
);
205 sv_data
.num_phsMeas
= 0;
206 for (i
= 0; i
< len
/8; i
++) {
207 if (tree
&& subtree
) {
208 value
= tvb_get_ntohl(tvb
, offset
);
209 qual
= tvb_get_ntohl(tvb
, offset
+ 4);
211 proto_tree_add_item(subtree
, hf_sv_phmeas_instmag_i
, tvb
, offset
, 4, ENC_BIG_ENDIAN
);
212 proto_tree_add_bitmask(subtree
, tvb
, offset
+ 4, hf_sv_phsmeas_q
, ett_phsmeas_q
, q_flags
, ENC_BIG_ENDIAN
);
214 if (i
< IEC61850_SV_MAX_PHSMEAS_ENTRIES
) {
215 sv_data
.phsMeas
[i
].value
= value
;
216 sv_data
.phsMeas
[i
].qual
= qual
;
217 sv_data
.num_phsMeas
++;
229 /*--- Included file: packet-sv-fn.c ---*/
230 #line 1 "../../asn1/sv/packet-sv-fn.c"
234 dissect_sv_INTEGER_0_65535(gboolean implicit_tag _U_
, tvbuff_t
*tvb _U_
, int offset _U_
, asn1_ctx_t
*actx _U_
, proto_tree
*tree _U_
, int hf_index _U_
) {
235 offset
= dissect_ber_integer(implicit_tag
, actx
, tree
, tvb
, offset
, hf_index
,
244 dissect_sv_VisibleString(gboolean implicit_tag _U_
, tvbuff_t
*tvb _U_
, int offset _U_
, asn1_ctx_t
*actx _U_
, proto_tree
*tree _U_
, int hf_index _U_
) {
245 offset
= dissect_ber_restricted_string(implicit_tag
, BER_UNI_TAG_VisibleString
,
246 actx
, tree
, tvb
, offset
, hf_index
,
255 dissect_sv_T_smpCnt(gboolean implicit_tag _U_
, tvbuff_t
*tvb _U_
, int offset _U_
, asn1_ctx_t
*actx _U_
, proto_tree
*tree _U_
, int hf_index _U_
) {
256 #line 19 "../../asn1/sv/sv.cnf"
258 offset
= dissect_ber_integer(implicit_tag
, actx
, tree
, tvb
, offset
, hf_index
,
261 sv_data
.smpCnt
= value
;
270 dissect_sv_INTEGER_0_4294967295(gboolean implicit_tag _U_
, tvbuff_t
*tvb _U_
, int offset _U_
, asn1_ctx_t
*actx _U_
, proto_tree
*tree _U_
, int hf_index _U_
) {
271 offset
= dissect_ber_integer(implicit_tag
, actx
, tree
, tvb
, offset
, hf_index
,
280 dissect_sv_UtcTime(gboolean implicit_tag _U_
, tvbuff_t
*tvb _U_
, int offset _U_
, asn1_ctx_t
*actx _U_
, proto_tree
*tree _U_
, int hf_index _U_
) {
281 #line 25 "../../asn1/sv/sv.cnf"
289 len
= tvb_length_remaining(tvb
, offset
);
293 proto_tree_add_expert_format(tree
, actx
->pinfo
, &ei_sv_mal_utctime
, tvb
, offset
, len
,
294 "BER Error: malformed UTCTime encoding, length must be 8 bytes");
297 proto_tree_add_string(tree
, hf_index
, tvb
, offset
, len
, "????");
302 seconds
= tvb_get_ntohl(tvb
, offset
);
303 fraction
= tvb_get_ntoh24(tvb
, offset
+4) * 0x100; /* Only 3 bytes are recommended */
304 nanoseconds
= (guint32
)( ((guint64
)fraction
* G_GINT64_CONSTANT(1000000000U)) / G_GINT64_CONSTANT(0x100000000U
) ) ;
307 ts
.nsecs
= nanoseconds
;
309 ptime
= abs_time_to_str(&ts
, ABSOLUTE_TIME_UTC
, TRUE
);
313 proto_tree_add_string(tree
, hf_index
, tvb
, offset
, len
, ptime
);
323 static const value_string sv_T_smpSynch_vals
[] = {
332 dissect_sv_T_smpSynch(gboolean implicit_tag _U_
, tvbuff_t
*tvb _U_
, int offset _U_
, asn1_ctx_t
*actx _U_
, proto_tree
*tree _U_
, int hf_index _U_
) {
333 #line 66 "../../asn1/sv/sv.cnf"
335 offset
= dissect_ber_integer(implicit_tag
, actx
, tree
, tvb
, offset
, hf_index
,
338 sv_data
.smpSynch
= value
;
347 dissect_sv_Data(gboolean implicit_tag _U_
, tvbuff_t
*tvb _U_
, int offset _U_
, asn1_ctx_t
*actx _U_
, proto_tree
*tree _U_
, int hf_index _U_
) {
348 offset
= dissect_ber_octet_string(implicit_tag
, actx
, tree
, tvb
, offset
, hf_index
,
355 static const value_string sv_T_smpMod_vals
[] = {
356 { 0, "samplesPerNormalPeriod" },
357 { 1, "samplesPerSecond" },
358 { 2, "secondsPerSample" },
364 dissect_sv_T_smpMod(gboolean implicit_tag _U_
, tvbuff_t
*tvb _U_
, int offset _U_
, asn1_ctx_t
*actx _U_
, proto_tree
*tree _U_
, int hf_index _U_
) {
365 #line 72 "../../asn1/sv/sv.cnf"
367 offset
= dissect_ber_integer(implicit_tag
, actx
, tree
, tvb
, offset
, hf_index
,
370 sv_data
.smpMod
= value
;
377 static const ber_sequence_t ASDU_sequence
[] = {
378 { &hf_sv_svID
, BER_CLASS_CON
, 0, BER_FLAGS_IMPLTAG
, dissect_sv_VisibleString
},
379 { &hf_sv_datSet
, BER_CLASS_CON
, 1, BER_FLAGS_OPTIONAL
|BER_FLAGS_IMPLTAG
, dissect_sv_VisibleString
},
380 { &hf_sv_smpCnt
, BER_CLASS_CON
, 2, BER_FLAGS_IMPLTAG
, dissect_sv_T_smpCnt
},
381 { &hf_sv_confRef
, BER_CLASS_CON
, 3, BER_FLAGS_IMPLTAG
, dissect_sv_INTEGER_0_4294967295
},
382 { &hf_sv_refrTm
, BER_CLASS_CON
, 4, BER_FLAGS_OPTIONAL
|BER_FLAGS_IMPLTAG
, dissect_sv_UtcTime
},
383 { &hf_sv_smpSynch
, BER_CLASS_CON
, 5, BER_FLAGS_OPTIONAL
|BER_FLAGS_IMPLTAG
, dissect_sv_T_smpSynch
},
384 { &hf_sv_smpRate
, BER_CLASS_CON
, 6, BER_FLAGS_OPTIONAL
|BER_FLAGS_IMPLTAG
, dissect_sv_INTEGER_0_65535
},
385 { &hf_sv_seqData
, BER_CLASS_CON
, 7, BER_FLAGS_IMPLTAG
, dissect_sv_Data
},
386 { &hf_sv_smpMod
, BER_CLASS_CON
, 8, BER_FLAGS_OPTIONAL
|BER_FLAGS_IMPLTAG
, dissect_sv_T_smpMod
},
387 { NULL
, 0, 0, 0, NULL
}
391 dissect_sv_ASDU(gboolean implicit_tag _U_
, tvbuff_t
*tvb _U_
, int offset _U_
, asn1_ctx_t
*actx _U_
, proto_tree
*tree _U_
, int hf_index _U_
) {
392 offset
= dissect_ber_sequence(implicit_tag
, actx
, tree
, tvb
, offset
,
393 ASDU_sequence
, hf_index
, ett_sv_ASDU
);
399 static const ber_sequence_t SEQUENCE_OF_ASDU_sequence_of
[1] = {
400 { &hf_sv_seqASDU_item
, BER_CLASS_UNI
, BER_UNI_TAG_SEQUENCE
, BER_FLAGS_NOOWNTAG
, dissect_sv_ASDU
},
404 dissect_sv_SEQUENCE_OF_ASDU(gboolean implicit_tag _U_
, tvbuff_t
*tvb _U_
, int offset _U_
, asn1_ctx_t
*actx _U_
, proto_tree
*tree _U_
, int hf_index _U_
) {
405 offset
= dissect_ber_sequence_of(implicit_tag
, actx
, tree
, tvb
, offset
,
406 SEQUENCE_OF_ASDU_sequence_of
, hf_index
, ett_sv_SEQUENCE_OF_ASDU
);
412 static const ber_sequence_t SavPdu_sequence
[] = {
413 { &hf_sv_noASDU
, BER_CLASS_CON
, 0, BER_FLAGS_IMPLTAG
, dissect_sv_INTEGER_0_65535
},
414 { &hf_sv_seqASDU
, BER_CLASS_CON
, 2, BER_FLAGS_IMPLTAG
, dissect_sv_SEQUENCE_OF_ASDU
},
415 { NULL
, 0, 0, 0, NULL
}
419 dissect_sv_SavPdu(gboolean implicit_tag _U_
, tvbuff_t
*tvb _U_
, int offset _U_
, asn1_ctx_t
*actx _U_
, proto_tree
*tree _U_
, int hf_index _U_
) {
420 offset
= dissect_ber_sequence(implicit_tag
, actx
, tree
, tvb
, offset
,
421 SavPdu_sequence
, hf_index
, ett_sv_SavPdu
);
427 static const value_string sv_SampledValues_vals
[] = {
432 static const ber_choice_t SampledValues_choice
[] = {
433 { 0, &hf_sv_savPdu
, BER_CLASS_APP
, 0, BER_FLAGS_IMPLTAG
, dissect_sv_SavPdu
},
434 { 0, NULL
, 0, 0, 0, NULL
}
438 dissect_sv_SampledValues(gboolean implicit_tag _U_
, tvbuff_t
*tvb _U_
, int offset _U_
, asn1_ctx_t
*actx _U_
, proto_tree
*tree _U_
, int hf_index _U_
) {
439 offset
= dissect_ber_choice(actx
, tree
, tvb
, offset
,
440 SampledValues_choice
, hf_index
, ett_sv_SampledValues
,
447 /*--- End of included file: packet-sv-fn.c ---*/
448 #line 194 "../../asn1/sv/packet-sv-template.c"
451 * Dissect SV PDUs inside a PPDU.
454 dissect_sv(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*parent_tree
)
458 proto_item
*item
= NULL
;
459 proto_tree
*tree
= NULL
;
462 asn1_ctx_init(&asn1_ctx
, ASN1_ENC_BER
, TRUE
, pinfo
);
465 item
= proto_tree_add_item(parent_tree
, proto_sv
, tvb
, 0, -1, ENC_NA
);
466 tree
= proto_item_add_subtree(item
, ett_sv
);
468 col_set_str(pinfo
->cinfo
, COL_PROTOCOL
, PNAME
);
469 col_clear(pinfo
->cinfo
, COL_INFO
);
472 if (tree
&& tvb_reported_length_remaining(tvb
, offset
) >= 2)
473 proto_tree_add_item(tree
, hf_sv_appid
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
476 if (tree
&& tvb_reported_length_remaining(tvb
, offset
) >= 4)
477 proto_tree_add_item(tree
, hf_sv_length
, tvb
, offset
+ 2, 2, ENC_BIG_ENDIAN
);
480 if (tree
&& tvb_reported_length_remaining(tvb
, offset
) >= 6)
481 proto_tree_add_item(tree
, hf_sv_reserve1
, tvb
, offset
+ 4, 2, ENC_BIG_ENDIAN
);
484 if (tree
&& tvb_reported_length_remaining(tvb
, offset
) >= 8)
485 proto_tree_add_item(tree
, hf_sv_reserve2
, tvb
, offset
+ 6, 2, ENC_BIG_ENDIAN
);
488 while (tree
&& tvb_reported_length_remaining(tvb
, offset
) > 0){
490 offset
= dissect_sv_SampledValues(FALSE
, tvb
, offset
, &asn1_ctx
, tree
, -1);
491 if (offset
== old_offset
) {
492 proto_tree_add_text(tree
, tvb
, offset
, -1, "Internal error, zero-byte SV PDU");
498 tap_queue_packet(sv_tap
, pinfo
, &sv_data
);
502 /*--- proto_register_sv -------------------------------------------*/
503 void proto_register_sv(void) {
506 static hf_register_info hf
[] = {
508 { "APPID", "sv.appid", FT_UINT16
, BASE_HEX
, NULL
, 0x0, NULL
, HFILL
}},
511 { "Length", "sv.length", FT_UINT16
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
514 { "Reserved 1", "sv.reserve1", FT_UINT16
, BASE_HEX_DEC
, NULL
, 0x0, NULL
, HFILL
}},
517 { "Reserved 2", "sv.reserve2", FT_UINT16
, BASE_HEX_DEC
, NULL
, 0x0, NULL
, HFILL
}},
519 { &hf_sv_phmeas_instmag_i
,
520 { "value", "sv.meas_value", FT_INT32
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
523 { "quality", "sv.meas_quality", FT_UINT32
, BASE_HEX
, NULL
, 0x0, NULL
, HFILL
}},
525 { &hf_sv_phsmeas_q_validity
,
526 { "validity", "sv.meas_quality.validity", FT_UINT32
, BASE_HEX
, VALS(sv_q_validity_vals
), Q_VALIDITY_MASK
, NULL
, HFILL
}},
528 { &hf_sv_phsmeas_q_overflow
,
529 { "overflow", "sv.meas_quality.overflow", FT_BOOLEAN
, 32, NULL
, Q_OVERFLOW
, NULL
, HFILL
}},
531 { &hf_sv_phsmeas_q_outofrange
,
532 { "out of range", "sv.meas_quality.outofrange", FT_BOOLEAN
, 32, NULL
, Q_OUTOFRANGE
, NULL
, HFILL
}},
534 { &hf_sv_phsmeas_q_badreference
,
535 { "bad reference", "sv.meas_quality.badreference", FT_BOOLEAN
, 32, NULL
, Q_BADREFERENCE
, NULL
, HFILL
}},
537 { &hf_sv_phsmeas_q_oscillatory
,
538 { "oscillatory", "sv.meas_quality.oscillatory", FT_BOOLEAN
, 32, NULL
, Q_OSCILLATORY
, NULL
, HFILL
}},
540 { &hf_sv_phsmeas_q_failure
,
541 { "failure", "sv.meas_quality.failure", FT_BOOLEAN
, 32, NULL
, Q_FAILURE
, NULL
, HFILL
}},
543 { &hf_sv_phsmeas_q_olddata
,
544 { "old data", "sv.meas_quality.olddata", FT_BOOLEAN
, 32, NULL
, Q_OLDDATA
, NULL
, HFILL
}},
546 { &hf_sv_phsmeas_q_inconsistent
,
547 { "inconsistent", "sv.meas_quality.inconsistent", FT_BOOLEAN
, 32, NULL
, Q_INCONSISTENT
, NULL
, HFILL
}},
549 { &hf_sv_phsmeas_q_inaccurate
,
550 { "inaccurate", "sv.meas_quality.inaccurate", FT_BOOLEAN
, 32, NULL
, Q_INACCURATE
, NULL
, HFILL
}},
552 { &hf_sv_phsmeas_q_source
,
553 { "source", "sv.meas_quality.source", FT_UINT32
, BASE_HEX
, VALS(sv_q_source_vals
), Q_SOURCE_MASK
, NULL
, HFILL
}},
555 { &hf_sv_phsmeas_q_test
,
556 { "test", "sv.meas_quality.teset", FT_BOOLEAN
, 32, NULL
, Q_TEST
, NULL
, HFILL
}},
558 { &hf_sv_phsmeas_q_operatorblocked
,
559 { "operator blocked", "sv.meas_quality.operatorblocked", FT_BOOLEAN
, 32, NULL
, Q_OPERATORBLOCKED
, NULL
, HFILL
}},
561 { &hf_sv_phsmeas_q_derived
,
562 { "derived", "sv.meas_quality.derived", FT_BOOLEAN
, 32, NULL
, Q_DERIVED
, NULL
, HFILL
}},
566 /*--- Included file: packet-sv-hfarr.c ---*/
567 #line 1 "../../asn1/sv/packet-sv-hfarr.c"
569 { "savPdu", "sv.savPdu_element",
570 FT_NONE
, BASE_NONE
, NULL
, 0,
573 { "noASDU", "sv.noASDU",
574 FT_UINT32
, BASE_DEC
, NULL
, 0,
575 "INTEGER_0_65535", HFILL
}},
577 { "seqASDU", "sv.seqASDU",
578 FT_UINT32
, BASE_DEC
, NULL
, 0,
579 "SEQUENCE_OF_ASDU", HFILL
}},
580 { &hf_sv_seqASDU_item
,
581 { "ASDU", "sv.ASDU_element",
582 FT_NONE
, BASE_NONE
, NULL
, 0,
586 FT_STRING
, BASE_NONE
, NULL
, 0,
587 "VisibleString", HFILL
}},
589 { "datSet", "sv.datSet",
590 FT_STRING
, BASE_NONE
, NULL
, 0,
591 "VisibleString", HFILL
}},
593 { "smpCnt", "sv.smpCnt",
594 FT_UINT32
, BASE_DEC
, NULL
, 0,
597 { "confRef", "sv.confRef",
598 FT_UINT32
, BASE_DEC
, NULL
, 0,
599 "INTEGER_0_4294967295", HFILL
}},
601 { "refrTm", "sv.refrTm",
602 FT_STRING
, BASE_NONE
, NULL
, 0,
605 { "smpSynch", "sv.smpSynch",
606 FT_INT32
, BASE_DEC
, VALS(sv_T_smpSynch_vals
), 0,
609 { "smpRate", "sv.smpRate",
610 FT_UINT32
, BASE_DEC
, NULL
, 0,
611 "INTEGER_0_65535", HFILL
}},
613 { "seqData", "sv.seqData",
614 FT_BYTES
, BASE_NONE
, NULL
, 0,
617 { "smpMod", "sv.smpMod",
618 FT_INT32
, BASE_DEC
, VALS(sv_T_smpMod_vals
), 0,
621 /*--- End of included file: packet-sv-hfarr.c ---*/
622 #line 311 "../../asn1/sv/packet-sv-template.c"
625 /* List of subtrees */
626 static gint
*ett
[] = {
631 /*--- Included file: packet-sv-ettarr.c ---*/
632 #line 1 "../../asn1/sv/packet-sv-ettarr.c"
633 &ett_sv_SampledValues
,
635 &ett_sv_SEQUENCE_OF_ASDU
,
638 /*--- End of included file: packet-sv-ettarr.c ---*/
639 #line 319 "../../asn1/sv/packet-sv-template.c"
642 static ei_register_info ei
[] = {
643 { &ei_sv_mal_utctime
, { "sv.malformed.utctime", PI_MALFORMED
, PI_WARN
, "BER Error: malformed UTCTime encoding", EXPFILL
}},
646 expert_module_t
* expert_sv
;
648 /* Register protocol */
649 proto_sv
= proto_register_protocol(PNAME
, PSNAME
, PFNAME
);
650 register_dissector("sv", dissect_sv
, proto_sv
);
652 /* Register fields and subtrees */
653 proto_register_field_array(proto_sv
, hf
, array_length(hf
));
654 proto_register_subtree_array(ett
, array_length(ett
));
655 expert_sv
= expert_register_protocol(proto_sv
);
656 expert_register_field_array(expert_sv
, ei
, array_length(ei
));
659 sv_tap
= register_tap("sv");
662 /*--- proto_reg_handoff_sv --- */
663 void proto_reg_handoff_sv(void) {
665 dissector_handle_t sv_handle
;
666 sv_handle
= find_dissector("sv");
668 dissector_add_uint("ethertype", ETHERTYPE_IEC61850_SV
, sv_handle
);