2 * Routines for Secure Host IP Configuration Protocol dissection
3 * Copyright 2021, Filip Kågesson <exfik@hms.se>
5 * Wireshark - Network traffic analyzer
6 * By Gerald Combs <gerald@wireshark.org>
7 * Copyright 1998 Gerald Combs
9 * SPDX-License-Identifier: GPL-2.0-or-later
14 #include <epan/packet.h>
15 #include <epan/expert.h>
16 #include <epan/addr_resolv.h>
18 #include <wsutil/array.h>
19 #include "packet-udp.h"
21 void proto_reg_handoff_shicp(void);
22 void proto_register_shicp(void);
24 /* Protocols and header fields */
25 static int proto_shicp
;
26 static int hf_shicp_header
;
27 static int hf_shicp_protocol_version
;
28 static int hf_shicp_dst
;
29 static int hf_shicp_src
;
30 static int hf_shicp_flags
;
31 static int hf_shicp_msgclass_flag
;
32 static int hf_shicp_error_flag
;
33 static int hf_shicp_reserved_flag
;
34 static int hf_shicp_msgtype
;
35 static int hf_shicp_error
;
36 static int hf_shicp_error_string
;
37 static int hf_shicp_auth_req
;
38 static int hf_shicp_module_version
;
39 static int hf_shicp_module_desc
;
40 static int hf_shicp_supported_msg
;
41 static int hf_shicp_ip
;
42 static int hf_shicp_sn
;
43 static int hf_shicp_gw
;
44 static int hf_shicp_dns1
;
45 static int hf_shicp_dns2
;
46 static int hf_shicp_dhcp
;
47 static int hf_shicp_hn
;
48 static int hf_shicp_hn_max_len
;
49 static int hf_shicp_pswd_max_len
;
50 static int hf_shicp_challenge
;
51 static int hf_shicp_validity_period
;
52 static int hf_shicp_token
;
53 static int hf_shicp_pswd
;
54 static int hf_shicp_wink_type
;
55 static int hf_shicp_restart_mode
;
58 static int ett_shicp_flags
;
60 static expert_field ei_shicp_error
;
61 static expert_field ei_shicp_malformed
;
63 #define SHICP_UDP_PORT 3250
65 #define SHICP_MIN_LENGTH 2
66 #define SHICP_MAX_LENGTH 548
67 #define SHICP_HEADER_SIZE 2
68 #define SHICP_ADDRESS_SIZE 6
69 #define SHICP_FLAGS_SIZE 1
70 #define SHICP_MSG_TYPE_SIZE 1
71 #define SHICP_ERROR_SIZE 1
72 #define SHICP_CHALLENGE_SIZE 4
73 #define SHICP_VALIDITY_PERIOD_SIZE 1
74 #define SHICP_TOKEN_SIZE 36
75 #define SHICP_WINK_TYPE_SIZE 1
76 #define SHICP_RESTART_MODE_SIZE 1
77 #define SHICP_FIXED_LEN 18
78 #define SHICP_MSG_CLASS_FLAG 0x01
79 #define SHICP_ERROR_FLAG 0x02
80 #define SHICP_RESERVED_FLAG 0xFC
82 /* Values of the supported message types. */
83 #define SHICP_DISCOVER_MSG_TYPE 0x00
84 #define SHICP_AUTH_CHALLENGE_MSG_TYPE 0x01
85 #define SHICP_CONFIG_MSG_TYPE 0x02
86 #define SHICP_WINK_MSG_TYPE 0x03
87 #define SHICP_RESTART_MSG_TYPE 0x04
88 #define SHICP_MASS_RESTART_MSG_TYPE 0x05
90 /* Keys of the parameters associated with discover messages. */
91 #define SHICP_DISCOVER_AUTH_REQ_KEY 0x00
92 #define SHICP_DISCOVER_MODULE_VERSION_KEY 0x01
93 #define SHICP_DISCOVER_MODULE_DESC_KEY 0x02
94 #define SHICP_DISCOVER_SUPPORTED_MSG_KEY 0x03
95 #define SHICP_DISCOVER_IP_KEY 0x04
96 #define SHICP_DISCOVER_SN_KEY 0x05
97 #define SHICP_DISCOVER_GW_KEY 0x06
98 #define SHICP_DISCOVER_DNS1_KEY 0x07
99 #define SHICP_DISCOVER_DNS2_KEY 0x08
100 #define SHICP_DISCOVER_DHCP_KEY 0x09
101 #define SHICP_DISCOVER_HN_KEY 0x0A
102 #define SHICP_DISCOVER_HN_MAX_LEN_KEY 0x0B
103 #define SHICP_DISCOVER_PSWD_MAX_LEN_KEY 0x0C
105 /* Keys of the parameters associated with configuration messages. */
106 #define SHICP_CONFIG_IP_KEY 0x00
107 #define SHICP_CONFIG_SN_KEY 0x01
108 #define SHICP_CONFIG_GW_KEY 0x02
109 #define SHICP_CONFIG_DNS1_KEY 0x03
110 #define SHICP_CONFIG_DNS2_KEY 0x04
111 #define SHICP_CONFIG_DHCP_KEY 0x05
112 #define SHICP_CONFIG_HN_KEY 0x06
113 #define SHICP_CONFIG_PSWD_KEY 0x07
115 /* The types of messages supported. */
116 static const value_string message_types
[] = {
117 {SHICP_DISCOVER_MSG_TYPE
, "Discover"},
118 {SHICP_AUTH_CHALLENGE_MSG_TYPE
, "Authentication challenge"},
119 {SHICP_CONFIG_MSG_TYPE
, "Configuration"},
120 {SHICP_WINK_MSG_TYPE
, "Wink"},
121 {SHICP_RESTART_MSG_TYPE
, "Restart"},
122 {SHICP_MASS_RESTART_MSG_TYPE
, "Mass-restart"},
125 /* The error codes that are supported. */
126 static const value_string error_types
[] = {
127 {0x00, "Request was rejected"},
128 {0x01, "Authentication failed"},
129 {0x02, "Authentication required"},
130 {0x03, "Unsupported message type"},
131 {0x1F, "Hostname too long"},
132 {0x20, "Password too long"},
133 {0x21, "Bad config"},
136 /* The types of restart mode that are supported. */
137 static const value_string restart_mode_types
[] = {
138 {0x00, "Immediate restart"},
139 {0x01, "Delayed restart"},
144 test_shicp(packet_info
* pinfo
, tvbuff_t
* tvb
, int offset
, void* data _U_
)
146 /* Check that the port matches the port used by SHICP. */
147 if (pinfo
->destport
!= SHICP_UDP_PORT
) {
151 /* Check that the length of the message is within allowed boundaries. */
152 if (tvb_reported_length(tvb
) < SHICP_MIN_LENGTH
|| tvb_reported_length(tvb
) > SHICP_MAX_LENGTH
) {
156 /* Check that the header tag starts with 0xABC0. */
157 if ((tvb_get_uint16(tvb
, offset
, ENC_LITTLE_ENDIAN
) & 0xFFF8) != 0xABC0) {
165 dissect_shicp(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
,
169 proto_item
* flags_pi
;
170 proto_item
* error_pi
;
171 proto_tree
* shicp_tree
;
173 unsigned payload_end
;
174 unsigned keyvalue_key
= 0;
175 unsigned keyvalue_length
= 0;
176 unsigned keyvalue_offset
= 0;
177 unsigned keyvalue_end
= 0;
178 uint8_t supported_message_value
= 0;
179 uint16_t payload_length
= 0;
180 uint32_t version
= 0;
181 uint32_t msgtype_value
= 0;
182 uint32_t error_value
= 0;
183 uint64_t flags_value
= 0;
185 wmem_strbuf_t
* supported_messages
= wmem_strbuf_new(pinfo
->pool
, "");
186 wmem_strbuf_t
* module_addr_strbuf
= wmem_strbuf_new(pinfo
->pool
, "");
188 static int* flags
[] = {
189 &hf_shicp_reserved_flag
,
190 &hf_shicp_error_flag
,
191 &hf_shicp_msgclass_flag
,
195 col_set_str(pinfo
->cinfo
, COL_PROTOCOL
, "SHICP");
196 col_clear(pinfo
->cinfo
, COL_INFO
);
198 ti
= proto_tree_add_item(tree
, proto_shicp
, tvb
, offset
, -1, ENC_NA
);
200 shicp_tree
= proto_item_add_subtree(ti
, ett_shicp
);
201 proto_item_append_text(ti
,
203 address_with_resolution_to_str(pinfo
->pool
, &pinfo
->dl_src
),
204 address_with_resolution_to_str(pinfo
->pool
, &pinfo
->dl_dst
));
205 proto_tree_add_item_ret_uint(shicp_tree
, hf_shicp_header
, tvb
, offset
, SHICP_HEADER_SIZE
, ENC_LITTLE_ENDIAN
, &version
);
206 proto_tree_add_uint(shicp_tree
, hf_shicp_protocol_version
, tvb
, offset
, SHICP_HEADER_SIZE
, version
& 0x07);
207 offset
+= SHICP_HEADER_SIZE
;
208 proto_tree_add_item(shicp_tree
, hf_shicp_dst
, tvb
, offset
, SHICP_ADDRESS_SIZE
, ENC_NA
);
209 char* dst
= tvb_address_to_str(pinfo
->pool
, tvb
, AT_ETHER
, offset
);
210 offset
+= SHICP_ADDRESS_SIZE
;
211 proto_tree_add_item(shicp_tree
, hf_shicp_src
, tvb
, offset
, SHICP_ADDRESS_SIZE
, ENC_NA
);
212 char* src
= tvb_address_to_str(pinfo
->pool
, tvb
, AT_ETHER
, offset
);
213 offset
+= SHICP_ADDRESS_SIZE
;
214 flags_pi
= proto_tree_add_bitmask_ret_uint64(shicp_tree
, tvb
, offset
, hf_shicp_flags
, ett_shicp_flags
, flags
, ENC_LITTLE_ENDIAN
, &flags_value
);
215 offset
+= SHICP_FLAGS_SIZE
;
216 proto_tree_add_item_ret_uint(shicp_tree
, hf_shicp_msgtype
, tvb
, offset
, SHICP_MSG_TYPE_SIZE
, ENC_LITTLE_ENDIAN
, &msgtype_value
);
217 offset
+= SHICP_MSG_TYPE_SIZE
;
218 payload_length
= tvb_get_uint16(tvb
, offset
, ENC_LITTLE_ENDIAN
);
220 if (flags_value
& SHICP_ERROR_FLAG
) {
221 proto_item_set_text(flags_pi
,
222 "Message flags: 0x%02x (%s, %s)",
223 (unsigned)flags_value
,
224 tfs_get_string(flags_value
& SHICP_MSG_CLASS_FLAG
, &tfs_response_request
), "Error");
225 if (payload_length
!= 1) {
226 error_pi
= proto_tree_add_string(shicp_tree
, hf_shicp_error_string
, tvb
, offset
, 0, "Malformed message");
227 expert_add_info(pinfo
, error_pi
, &ei_shicp_malformed
);
228 col_append_str(pinfo
->cinfo
, COL_INFO
, "Error: Malformed message");
231 error_pi
= proto_tree_add_item_ret_uint(shicp_tree
, hf_shicp_error
, tvb
, offset
, SHICP_ERROR_SIZE
, ENC_LITTLE_ENDIAN
, &error_value
);
232 expert_add_info(pinfo
, error_pi
, &ei_shicp_error
);
233 col_append_fstr(pinfo
->cinfo
, COL_INFO
, "Error: %s", val_to_str(error_value
, error_types
, "%d"));
237 proto_item_set_text(flags_pi
,
238 "Message flags: 0x%02x (%s)",
239 (unsigned)flags_value
,
240 tfs_get_string(flags_value
& SHICP_MSG_CLASS_FLAG
, &tfs_response_request
));
241 col_append_fstr(pinfo
->cinfo
,
244 tfs_get_string(flags_value
& SHICP_MSG_CLASS_FLAG
, &tfs_response_request
),
245 val_to_str(msgtype_value
, message_types
, "%d"));
246 payload_end
= offset
+ payload_length
;
247 switch (msgtype_value
)
249 case SHICP_DISCOVER_MSG_TYPE
:
250 while (offset
< payload_end
) {
251 keyvalue_key
= tvb_get_uint8(tvb
, offset
);
253 keyvalue_length
= tvb_get_uint8(tvb
, offset
);
255 switch (keyvalue_key
)
257 case SHICP_DISCOVER_AUTH_REQ_KEY
:
258 proto_tree_add_item(shicp_tree
, hf_shicp_auth_req
, tvb
, offset
, keyvalue_length
, ENC_LITTLE_ENDIAN
);
260 case SHICP_DISCOVER_MODULE_VERSION_KEY
:
261 proto_tree_add_item(shicp_tree
, hf_shicp_module_version
, tvb
, offset
, keyvalue_length
, ENC_ASCII
| ENC_NA
);
263 case SHICP_DISCOVER_MODULE_DESC_KEY
:
264 proto_tree_add_item(shicp_tree
, hf_shicp_module_desc
, tvb
, offset
, keyvalue_length
, ENC_ASCII
| ENC_NA
);
266 case SHICP_DISCOVER_SUPPORTED_MSG_KEY
:
267 keyvalue_end
= offset
+ keyvalue_length
;
268 keyvalue_offset
= offset
;
269 supported_message_value
= tvb_get_uint8(tvb
, keyvalue_offset
);
270 wmem_strbuf_append(supported_messages
, val_to_str(supported_message_value
, message_types
, "%d"));
271 keyvalue_offset
+= 1;
272 while (keyvalue_offset
< keyvalue_end
) {
273 supported_message_value
= tvb_get_uint8(tvb
, keyvalue_offset
);
274 wmem_strbuf_append_printf(supported_messages
, ", %s", val_to_str(supported_message_value
, message_types
, "%d"));
275 keyvalue_offset
+= 1;
277 proto_tree_add_string(shicp_tree
, hf_shicp_supported_msg
, tvb
, offset
, keyvalue_length
, wmem_strbuf_get_str(supported_messages
));
279 case SHICP_DISCOVER_IP_KEY
:
280 proto_tree_add_item(shicp_tree
, hf_shicp_ip
, tvb
, offset
, keyvalue_length
, ENC_LITTLE_ENDIAN
);
282 case SHICP_DISCOVER_SN_KEY
:
283 proto_tree_add_item(shicp_tree
, hf_shicp_sn
, tvb
, offset
, keyvalue_length
, ENC_LITTLE_ENDIAN
);
285 case SHICP_DISCOVER_GW_KEY
:
286 proto_tree_add_item(shicp_tree
, hf_shicp_gw
, tvb
, offset
, keyvalue_length
, ENC_LITTLE_ENDIAN
);
288 case SHICP_DISCOVER_DNS1_KEY
:
289 proto_tree_add_item(shicp_tree
, hf_shicp_dns1
, tvb
, offset
, keyvalue_length
, ENC_LITTLE_ENDIAN
);
291 case SHICP_DISCOVER_DNS2_KEY
:
292 proto_tree_add_item(shicp_tree
, hf_shicp_dns2
, tvb
, offset
, keyvalue_length
, ENC_LITTLE_ENDIAN
);
294 case SHICP_DISCOVER_DHCP_KEY
:
295 proto_tree_add_item(shicp_tree
, hf_shicp_dhcp
, tvb
, offset
, keyvalue_length
, ENC_LITTLE_ENDIAN
);
297 case SHICP_DISCOVER_HN_KEY
:
298 proto_tree_add_item(shicp_tree
, hf_shicp_hn
, tvb
, offset
, keyvalue_length
, ENC_ASCII
| ENC_NA
);
300 case SHICP_DISCOVER_HN_MAX_LEN_KEY
:
301 proto_tree_add_item(shicp_tree
, hf_shicp_hn_max_len
, tvb
, offset
, keyvalue_length
, ENC_LITTLE_ENDIAN
);
303 case SHICP_DISCOVER_PSWD_MAX_LEN_KEY
:
304 proto_tree_add_item(shicp_tree
, hf_shicp_pswd_max_len
, tvb
, offset
, keyvalue_length
, ENC_LITTLE_ENDIAN
);
309 offset
+= keyvalue_length
;
312 case SHICP_AUTH_CHALLENGE_MSG_TYPE
:
313 if (payload_length
>= 5) {
314 proto_tree_add_item(shicp_tree
, hf_shicp_challenge
, tvb
, offset
, SHICP_CHALLENGE_SIZE
, ENC_LITTLE_ENDIAN
);
315 offset
+= SHICP_CHALLENGE_SIZE
;
316 proto_tree_add_item(shicp_tree
, hf_shicp_validity_period
, tvb
, offset
, SHICP_VALIDITY_PERIOD_SIZE
, ENC_LITTLE_ENDIAN
);
319 case SHICP_CONFIG_MSG_TYPE
:
320 if (payload_length
>= SHICP_TOKEN_SIZE
) {
321 proto_tree_add_item(shicp_tree
, hf_shicp_token
, tvb
, offset
, SHICP_TOKEN_SIZE
, ENC_NA
);
322 offset
+= SHICP_TOKEN_SIZE
;
324 else if (payload_length
== SHICP_ERROR_SIZE
) {
325 proto_tree_add_item(shicp_tree
, hf_shicp_error
, tvb
, offset
, SHICP_ERROR_SIZE
, ENC_ASCII
| ENC_NA
);
328 while (offset
< payload_end
) {
329 keyvalue_key
= tvb_get_uint8(tvb
, offset
);
331 keyvalue_length
= tvb_get_uint8(tvb
, offset
);
333 switch (keyvalue_key
)
335 case SHICP_CONFIG_IP_KEY
:
336 proto_tree_add_item(shicp_tree
, hf_shicp_ip
, tvb
, offset
, keyvalue_length
, ENC_LITTLE_ENDIAN
);
338 case SHICP_CONFIG_SN_KEY
:
339 proto_tree_add_item(shicp_tree
, hf_shicp_sn
, tvb
, offset
, keyvalue_length
, ENC_LITTLE_ENDIAN
);
341 case SHICP_CONFIG_GW_KEY
:
342 proto_tree_add_item(shicp_tree
, hf_shicp_gw
, tvb
, offset
, keyvalue_length
, ENC_LITTLE_ENDIAN
);
344 case SHICP_CONFIG_DNS1_KEY
:
345 proto_tree_add_item(shicp_tree
, hf_shicp_dns1
, tvb
, offset
, keyvalue_length
, ENC_LITTLE_ENDIAN
);
347 case SHICP_CONFIG_DNS2_KEY
:
348 proto_tree_add_item(shicp_tree
, hf_shicp_dns2
, tvb
, offset
, keyvalue_length
, ENC_LITTLE_ENDIAN
);
350 case SHICP_CONFIG_DHCP_KEY
:
351 proto_tree_add_item(shicp_tree
, hf_shicp_dhcp
, tvb
, offset
, keyvalue_length
, ENC_LITTLE_ENDIAN
);
353 case SHICP_CONFIG_HN_KEY
:
354 proto_tree_add_item(shicp_tree
, hf_shicp_hn
, tvb
, offset
, keyvalue_length
, ENC_ASCII
| ENC_NA
);
356 case SHICP_CONFIG_PSWD_KEY
:
357 proto_tree_add_item(shicp_tree
, hf_shicp_pswd
, tvb
, offset
, keyvalue_length
, ENC_ASCII
| ENC_NA
);
362 offset
+= keyvalue_length
;
365 case SHICP_WINK_MSG_TYPE
:
366 if (payload_length
>= SHICP_TOKEN_SIZE
+ SHICP_WINK_TYPE_SIZE
) {
367 proto_tree_add_item(shicp_tree
, hf_shicp_token
, tvb
, offset
, SHICP_TOKEN_SIZE
, ENC_NA
);
368 offset
+= SHICP_TOKEN_SIZE
;
369 proto_tree_add_item(shicp_tree
, hf_shicp_wink_type
, tvb
, offset
, SHICP_WINK_TYPE_SIZE
, ENC_LITTLE_ENDIAN
);
372 case SHICP_RESTART_MSG_TYPE
:
373 if (payload_length
>= SHICP_TOKEN_SIZE
+ SHICP_RESTART_MODE_SIZE
) {
374 proto_tree_add_item(shicp_tree
, hf_shicp_token
, tvb
, offset
, SHICP_TOKEN_SIZE
, ENC_NA
);
375 offset
+= SHICP_TOKEN_SIZE
;
376 proto_tree_add_item(shicp_tree
, hf_shicp_restart_mode
, tvb
, offset
, SHICP_RESTART_MODE_SIZE
, ENC_LITTLE_ENDIAN
);
384 wmem_strbuf_append(module_addr_strbuf
, (flags_value
& SHICP_MSG_CLASS_FLAG
) ? src
: dst
);
385 if (strcmp(wmem_strbuf_get_str(module_addr_strbuf
), "ff:ff:ff:ff:ff:ff") != 0) {
386 col_append_fstr(pinfo
->cinfo
, COL_INFO
, ", Module MAC address: %s", wmem_strbuf_get_str(module_addr_strbuf
));
389 return tvb_captured_length(tvb
);
393 get_shicp_len(packet_info
* pinfo _U_
, tvbuff_t
* tvb
, int offset _U_
, void* data _U_
)
395 return (unsigned)tvb_reported_length(tvb
);
399 dissect_shicp_heur_udp(tvbuff_t
* tvb
, packet_info
* pinfo
, proto_tree
* tree
, void* data
)
401 return (udp_dissect_pdus(tvb
, pinfo
, tree
, SHICP_FIXED_LEN
, test_shicp
,
402 get_shicp_len
, dissect_shicp
, data
) != 0);
406 proto_register_shicp(void)
408 expert_module_t
* expert_shicp
;
410 static hf_register_info hf
[] = {
412 { "Header", "shicp.header",
417 { &hf_shicp_protocol_version
,
418 { "Protocol version", "shicp.protocolversion",
424 { "Destination", "shicp.dst",
430 { "Source", "shicp.src",
436 { "Message flags", "shicp.flags",
441 { &hf_shicp_reserved_flag
,
442 { "Reserved", "shicp.flags.reserved",
444 TFS(&tfs_set_notset
), 0xFC,
447 { &hf_shicp_error_flag
,
448 { "Error", "shicp.flags.error",
450 TFS(&tfs_set_notset
), 0x02,
453 { &hf_shicp_msgclass_flag
,
454 { "Class", "shicp.flags.msgclass",
456 TFS(&tfs_response_request
), 0x01,
460 { "Message type", "shicp.msgtype",
462 VALS(message_types
), 0x0,
466 { "Error", "shicp.error",
471 { &hf_shicp_error_string
,
472 { "Error", "shicp.error.string",
473 FT_STRINGZ
, BASE_NONE
,
477 { &hf_shicp_auth_req
,
478 { "Authentication required", "shicp.authreq",
479 FT_BOOLEAN
, BASE_NONE
,
483 { &hf_shicp_module_version
,
484 { "Module version", "shicp.moduleversion",
485 FT_STRINGZ
, BASE_NONE
,
489 { &hf_shicp_module_desc
,
490 { "Module description", "shicp.moduledesc",
491 FT_STRINGZ
, BASE_NONE
,
495 { &hf_shicp_supported_msg
,
496 { "Supported messages", "shicp.supportedmsg",
497 FT_STRINGZ
, BASE_NONE
,
502 { "IP address", "shicp.ip",
508 { "Subnet mask", "shicp.sn",
514 { "Gateway address", "shicp.gw",
520 { "Primary DNS address", "shicp.dns1",
526 { "Secondary DNS address", "shicp.dns2",
532 { "DHCP", "shicp.dhcp",
533 FT_BOOLEAN
, BASE_NONE
,
534 TFS(&tfs_enabled_disabled
), 0x0,
538 { "Hostname", "shicp.hn",
539 FT_STRINGZ
, BASE_NONE
,
543 { &hf_shicp_hn_max_len
,
544 { "Hostname max length", "shicp.hnmaxlen",
549 { &hf_shicp_pswd_max_len
,
550 { "Password max length", "shicp.pswdmaxlen",
555 { &hf_shicp_challenge
,
556 { "Challenge", "shicp.challenge",
561 { &hf_shicp_validity_period
,
562 { "Validity period (seconds)", "shicp.validityperiod",
568 { "Authentication token", "shicp.token",
574 { "Password", "shicp.pswd",
575 FT_STRINGZ
, BASE_NONE
,
579 { &hf_shicp_wink_type
,
580 { "Wink type", "shicp.winktype",
585 { &hf_shicp_restart_mode
,
586 { "Restart mode", "shicp.restartmode",
588 VALS(restart_mode_types
), 0x0,
593 static int *ett
[] = {
598 /* Setup protocol expert items */
599 static ei_register_info ei
[] = {
601 { "shicp.expert.error", PI_RESPONSE_CODE
, PI_NOTE
,
602 "Message contains an error code", EXPFILL
}
604 { &ei_shicp_malformed
,
605 { "shicp.malformed", PI_MALFORMED
, PI_WARN
,
606 "Malformed message", EXPFILL
}
610 proto_shicp
= proto_register_protocol("Secure Host IP Configuration Protocol", "SHICP", "shicp");
612 proto_register_field_array(proto_shicp
, hf
, array_length(hf
));
613 proto_register_subtree_array(ett
, array_length(ett
));
615 expert_shicp
= expert_register_protocol(proto_shicp
);
616 expert_register_field_array(expert_shicp
, ei
, array_length(ei
));
620 proto_reg_handoff_shicp(void)
622 heur_dissector_add("udp", dissect_shicp_heur_udp
, "SHICP over UDP", "shicp_udp", proto_shicp
, HEURISTIC_ENABLE
);
626 * Editor modelines - https://www.wireshark.org/tools/modelines.html
631 * indent-tabs-mode: nil
634 * vi: set shiftwidth=4 tabstop=8 expandtab:
635 * :indentSize=4:tabSize=8:noTabs=true: