2 * Routines for Aggregate Server Access Protocol
3 * It is hopefully (needs testing) compilant to
4 * http://www.ietf.org/internet-drafts/draft-ietf-rserpool-asap-02.txt
6 * Copyright 2002, Michael Tuexen <Michael.Tuexen@icn.siemens.de>
8 * $Id: packet-asap.c,v 1.3 2002/05/02 07:49:43 guy Exp $
10 * Ethereal - Network traffic analyzer
11 * By Gerald Combs <gerald@ethereal.com>
12 * Copyright 1998 Gerald Combs
14 * Copied from README.developer
16 * This program is free software; you can redistribute it and/or
17 * modify it under the terms of the GNU General Public License
18 * as published by the Free Software Foundation; either version 2
19 * of the License, or (at your option) any later version.
21 * This program is distributed in the hope that it will be useful,
22 * but WITHOUT ANY WARRANTY; without even the implied warranty of
23 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
24 * GNU General Public License for more details.
26 * You should have received a copy of the GNU General Public License
27 * along with this program; if not, write to the Free Software
28 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
35 #include <epan/packet.h>
37 #define ASAP_PAYLOAD_PROTO_ID 0xFAEEB5D1
39 /* Initialize the protocol and registered fields */
40 static int proto_asap = -1;
41 static int hf_asap_message_type = -1;
42 static int hf_asap_message_flags = -1;
43 static int hf_asap_message_length = -1;
44 #ifdef ASAP_UNUSED_HANDLES
45 static int hf_asap_message_value = -1;
47 static int hf_asap_parameter_type = -1;
48 static int hf_asap_parameter_length = -1;
49 static int hf_asap_parameter_value = -1;
50 static int hf_asap_parameter_padding = -1;
51 static int hf_asap_parameter_ipv4_address = -1;
52 static int hf_asap_parameter_ipv6_address = -1;
53 static int hf_asap_parameter_port = -1;
54 static int hf_asap_parameter_number_of_addr = -1;
55 static int hf_asap_parameter_load_policy = -1;
56 static int hf_asap_parameter_load_value = -1;
57 static int hf_asap_parameter_reg_life = -1;
58 static int hf_asap_parameter_pool_handle = -1;
59 static int hf_asap_parameter_signature = -1;
60 static int hf_asap_parameter_action_code = -1;
61 static int hf_asap_parameter_result_code = -1;
62 static int hf_asap_parameter_reserved = -1;
64 /* Initialize the subtree pointers */
65 static gint ett_asap = -1;
66 static gint ett_asap_parameter = -1;
69 dissect_all_asap_parameters(tvbuff_t *, proto_tree *);
72 dissect_next_asap_parameters(guint, gint, tvbuff_t *, proto_tree *);
75 nr_of_padding_bytes (guint length)
79 remainder = length % 4;
87 #define PARAMETER_TYPE_LENGTH 2
88 #define PARAMETER_LENGTH_LENGTH 2
89 #define PARAMETER_HEADER_LENGTH (PARAMETER_TYPE_LENGTH + PARAMETER_LENGTH_LENGTH)
91 #define PARAMETER_HEADER_OFFSET 0
92 #define PARAMETER_TYPE_OFFSET PARAMETER_HEADER_OFFSET
93 #define PARAMETER_LENGTH_OFFSET (PARAMETER_TYPE_OFFSET + PARAMETER_TYPE_LENGTH)
94 #define PARAMETER_VALUE_OFFSET (PARAMETER_LENGTH_OFFSET + PARAMETER_LENGTH_LENGTH)
96 #define IPV4_ADDRESS_LENGTH 4
97 #define IPV4_ADDRESS_OFFSET PARAMETER_VALUE_OFFSET
100 dissect_ipv4_parameter(tvbuff_t *parameter_tvb, proto_tree *parameter_tree, proto_item *parameter_item)
102 guint32 ipv4_address;
104 tvb_memcpy(parameter_tvb, (guint8 *)&ipv4_address, IPV4_ADDRESS_OFFSET, IPV4_ADDRESS_LENGTH);
105 proto_tree_add_ipv4(parameter_tree, hf_asap_parameter_ipv4_address, parameter_tvb, IPV4_ADDRESS_OFFSET, IPV4_ADDRESS_LENGTH, ipv4_address);
106 proto_item_set_text(parameter_item, "IPV4 address parameter");
109 #define IPV6_ADDRESS_LENGTH 16
110 #define IPV6_ADDRESS_OFFSET PARAMETER_VALUE_OFFSET
113 dissect_ipv6_parameter(tvbuff_t *parameter_tvb, proto_tree *parameter_tree, proto_item *parameter_item)
115 proto_tree_add_ipv6(parameter_tree, hf_asap_parameter_ipv6_address, parameter_tvb, IPV6_ADDRESS_OFFSET, IPV6_ADDRESS_LENGTH,
116 tvb_get_ptr(parameter_tvb, IPV6_ADDRESS_OFFSET, IPV6_ADDRESS_LENGTH));
118 proto_item_set_text(parameter_item, "IPV6 address parameter");
121 #define PORT_LENGTH 2
122 #define NUMBER_OF_ADDRESSES_LENGTH 2
123 #define LOAD_POLICY_LENGTH 2
124 #define LOAD_VALUE_LENGTH 2
125 #define REGISTRATION_LIFE_LENGTH 4
127 #define PORT_OFFSET PARAMETER_VALUE_OFFSET
128 #define NUMBER_OF_ADDRESSES_OFFSET (PORT_OFFSET + PORT_LENGTH)
129 #define ADDRESS_LIST_OFFSET (NUMBER_OF_ADDRESSES_OFFSET + NUMBER_OF_ADDRESSES_LENGTH)
130 #define LOAD_POLICY_OFFSET 0
131 #define LOAD_VALUE_OFFSET (LOAD_POLICY_OFFSET + LOAD_POLICY_LENGTH)
132 #define REGISTRATION_LIFE_OFFSET (LOAD_VALUE_OFFSET + LOAD_VALUE_LENGTH)
135 dissect_pool_element_parameter(tvbuff_t *parameter_tvb, proto_tree *parameter_tree, proto_item *parameter_item)
137 guint16 port, number_of_addresses, load_policy, load_value;
141 port = tvb_get_ntohs(parameter_tvb, PORT_OFFSET);
142 number_of_addresses = tvb_get_ntohs(parameter_tvb, NUMBER_OF_ADDRESSES_OFFSET);
143 proto_tree_add_uint(parameter_tree, hf_asap_parameter_port, parameter_tvb, PORT_OFFSET, PORT_LENGTH, port);
144 proto_tree_add_uint(parameter_tree, hf_asap_parameter_number_of_addr, parameter_tvb, NUMBER_OF_ADDRESSES_OFFSET, NUMBER_OF_ADDRESSES_LENGTH, number_of_addresses);
146 offset = dissect_next_asap_parameters(number_of_addresses, ADDRESS_LIST_OFFSET, parameter_tvb, parameter_tree);
147 load_policy = tvb_get_ntohs(parameter_tvb, offset + LOAD_POLICY_OFFSET);
148 load_value = tvb_get_ntohs(parameter_tvb, offset + LOAD_VALUE_OFFSET);
149 reg_life = tvb_get_ntohs(parameter_tvb, offset + REGISTRATION_LIFE_OFFSET);
151 proto_tree_add_uint(parameter_tree, hf_asap_parameter_load_policy, parameter_tvb, offset + LOAD_POLICY_OFFSET, LOAD_POLICY_LENGTH, load_policy);
152 proto_tree_add_uint(parameter_tree, hf_asap_parameter_load_value, parameter_tvb, offset + LOAD_VALUE_OFFSET, LOAD_VALUE_LENGTH, load_value);
153 proto_tree_add_uint(parameter_tree, hf_asap_parameter_reg_life, parameter_tvb, offset + REGISTRATION_LIFE_OFFSET, REGISTRATION_LIFE_LENGTH, reg_life);
154 proto_item_set_text(parameter_item, "Pool element");
158 #define POOL_HANDLE_OFFSET PARAMETER_VALUE_OFFSET
161 dissect_pool_handle_parameter(tvbuff_t *parameter_tvb, proto_tree *parameter_tree, proto_item *parameter_item)
163 guint16 length, handle_length;
166 length = tvb_get_ntohs(parameter_tvb, PARAMETER_LENGTH_OFFSET);
168 handle_length = length - PARAMETER_HEADER_LENGTH;
169 handle = (char *)tvb_get_ptr(parameter_tvb, POOL_HANDLE_OFFSET, handle_length);
170 proto_tree_add_string(parameter_tree, hf_asap_parameter_pool_handle, parameter_tvb, POOL_HANDLE_OFFSET, handle_length, handle);
171 proto_item_set_text(parameter_item, "Pool handle (%.*s)", handle_length, handle);
174 #define SIGNATURE_OFFSET PARAMETER_VALUE_OFFSET
177 dissect_authorization_parameter(tvbuff_t *parameter_tvb, proto_tree *parameter_tree, proto_item *parameter_item)
179 guint16 length, signature_length;
181 length = tvb_get_ntohs(parameter_tvb, PARAMETER_LENGTH_OFFSET);
182 signature_length = length - PARAMETER_HEADER_LENGTH;
184 if (signature_length > 0)
185 proto_tree_add_bytes(parameter_tree, hf_asap_parameter_signature, parameter_tvb, SIGNATURE_OFFSET, signature_length,
186 tvb_get_ptr(parameter_tvb, SIGNATURE_OFFSET, signature_length));
188 proto_item_set_text(parameter_item, "Authorization signature (%u byte%s)", signature_length, plurality(signature_length, "", "s"));
192 dissect_unknown_parameter(tvbuff_t *parameter_tvb, proto_tree *parameter_tree, proto_item *parameter_item)
194 guint16 type, length, parameter_value_length;
196 type = tvb_get_ntohs(parameter_tvb, PARAMETER_TYPE_OFFSET);
197 length = tvb_get_ntohs(parameter_tvb, PARAMETER_LENGTH_OFFSET);
199 parameter_value_length = length - PARAMETER_HEADER_LENGTH;
201 if (parameter_value_length > 0)
202 proto_tree_add_bytes(parameter_tree, hf_asap_parameter_value, parameter_tvb, PARAMETER_VALUE_OFFSET, parameter_value_length,
203 tvb_get_ptr(parameter_tvb, PARAMETER_VALUE_OFFSET, parameter_value_length));
205 proto_item_set_text(parameter_item, "Parameter with type %u and %u byte%s value", type, parameter_value_length, plurality(parameter_value_length, "", "s"));
208 #define IPV4_ADDRESS_PARAMETER_TYPE 0x01
209 #define IPV6_ADDRESS_PARAMETER_TYPE 0x02
210 #define POOL_ELEMENT_PARAMETER_TYPE 0x03
211 #define POOL_HANDLE_PARAMETER_TYPE 0x04
212 #define AUTHORIZATION_PARAMETER_TYPE 0x05
214 static const value_string asap_parameter_type_values[] = {
215 { IPV4_ADDRESS_PARAMETER_TYPE, "IPV4 address" },
216 { IPV6_ADDRESS_PARAMETER_TYPE, "IPV6 address" },
217 { POOL_ELEMENT_PARAMETER_TYPE, "Pool element" },
218 { POOL_HANDLE_PARAMETER_TYPE, "Pool handle" },
219 { AUTHORIZATION_PARAMETER_TYPE, "Authorization parameter" },
224 dissect_asap_parameter(tvbuff_t *parameter_tvb, proto_tree *asap_tree)
226 guint16 type, length, padding_length, total_length;
227 proto_item *parameter_item;
228 proto_tree *parameter_tree;
230 /* extract tag and length from the parameter */
231 type = tvb_get_ntohs(parameter_tvb, PARAMETER_TYPE_OFFSET);
232 length = tvb_get_ntohs(parameter_tvb, PARAMETER_LENGTH_OFFSET);
234 /* calculate padding and total length */
235 padding_length = tvb_length(parameter_tvb) - length;
236 total_length = length + padding_length;
238 /* create proto_tree stuff */
239 parameter_item = proto_tree_add_text(asap_tree, parameter_tvb, PARAMETER_HEADER_OFFSET, total_length, "Incomplete parameter");
240 parameter_tree = proto_item_add_subtree(parameter_item, ett_asap_parameter);
242 /* add tag and length to the asap tree */
243 proto_tree_add_uint(parameter_tree, hf_asap_parameter_type, parameter_tvb, PARAMETER_TYPE_OFFSET, PARAMETER_TYPE_LENGTH, type);
244 proto_tree_add_uint(parameter_tree, hf_asap_parameter_length, parameter_tvb, PARAMETER_LENGTH_OFFSET, PARAMETER_LENGTH_LENGTH, length);
247 case IPV4_ADDRESS_PARAMETER_TYPE:
248 dissect_ipv4_parameter(parameter_tvb, parameter_tree, parameter_item);
250 case IPV6_ADDRESS_PARAMETER_TYPE:
251 dissect_ipv6_parameter(parameter_tvb, parameter_tree, parameter_item);
253 case POOL_ELEMENT_PARAMETER_TYPE:
254 dissect_pool_element_parameter(parameter_tvb, parameter_tree, parameter_item);
256 case POOL_HANDLE_PARAMETER_TYPE:
257 dissect_pool_handle_parameter(parameter_tvb, parameter_tree, parameter_item);
259 case AUTHORIZATION_PARAMETER_TYPE:
260 dissect_authorization_parameter(parameter_tvb, parameter_tree, parameter_item);
263 dissect_unknown_parameter(parameter_tvb, parameter_tree, parameter_item);
267 if (padding_length > 0)
268 proto_tree_add_bytes(parameter_tree, hf_asap_parameter_padding, parameter_tvb, PARAMETER_HEADER_OFFSET + length, padding_length,
269 tvb_get_ptr(parameter_tvb, PARAMETER_HEADER_OFFSET + length, padding_length));
274 dissect_next_asap_parameters(guint number_of_parameters, gint initial_offset, tvbuff_t *parameters_tvb, proto_tree *asap_tree)
276 gint offset, length, padding_length, total_length;
277 tvbuff_t *parameter_tvb;
278 guint parameter_number;
280 offset = initial_offset;
281 for(parameter_number=1; parameter_number <= number_of_parameters; parameter_number++) {
282 length = tvb_get_ntohs(parameters_tvb, offset + PARAMETER_LENGTH_OFFSET);
283 padding_length = nr_of_padding_bytes(length);
284 total_length = length + padding_length;
285 /* create a tvb for the parameter including the padding bytes */
286 parameter_tvb = tvb_new_subset(parameters_tvb, offset, total_length, total_length);
287 dissect_asap_parameter(parameter_tvb, asap_tree);
288 /* get rid of the handled parameter */
289 offset += total_length;
295 dissect_all_asap_parameters(tvbuff_t *parameters_tvb, proto_tree *asap_tree)
297 gint offset, length, padding_length, total_length, remaining_length;
298 tvbuff_t *parameter_tvb;
301 while((remaining_length = tvb_reported_length_remaining(parameters_tvb, offset))) {
302 length = tvb_get_ntohs(parameters_tvb, offset + PARAMETER_LENGTH_OFFSET);
303 padding_length = nr_of_padding_bytes(length);
304 if (remaining_length >= length)
305 total_length = MIN(length + padding_length, remaining_length);
307 total_length = length + padding_length;
308 /* create a tvb for the parameter including the padding bytes */
309 parameter_tvb = tvb_new_subset(parameters_tvb, offset, total_length, total_length);
310 dissect_asap_parameter(parameter_tvb, asap_tree);
311 /* get rid of the handled parameter */
312 offset += total_length;
316 #define ACTION_CODE_LENGTH 1
317 #define RESULT_CODE_LENGTH 1
318 #define RESERVED_LENGTH 2
320 #define ACTION_CODE_OFFSET 0
321 #define RESULT_CODE_OFFSET (ACTION_CODE_OFFSET + ACTION_CODE_LENGTH)
322 #define RESERVED_OFFSET (RESULT_CODE_OFFSET + RESULT_CODE_LENGTH)
325 dissect_registration_response_message(tvbuff_t *parameters_tvb, proto_tree *asap_tree)
328 guint8 action_code, result_code;
330 tvbuff_t *last_parameter_tvb;
332 offset = dissect_next_asap_parameters(2, 0, parameters_tvb, asap_tree);
333 action_code = tvb_get_guint8(parameters_tvb, offset + ACTION_CODE_OFFSET);
334 result_code = tvb_get_guint8(parameters_tvb, offset + RESULT_CODE_OFFSET);
335 reserved = tvb_get_ntohs(parameters_tvb, offset + RESERVED_OFFSET);
336 proto_tree_add_uint(asap_tree, hf_asap_parameter_action_code, parameters_tvb, offset + ACTION_CODE_OFFSET, ACTION_CODE_LENGTH, action_code);
337 proto_tree_add_uint(asap_tree, hf_asap_parameter_result_code, parameters_tvb, offset + RESULT_CODE_OFFSET, RESULT_CODE_LENGTH, result_code);
338 proto_tree_add_uint(asap_tree, hf_asap_parameter_reserved, parameters_tvb, offset + RESERVED_OFFSET, RESERVED_LENGTH, reserved);
340 last_parameter_tvb = tvb_new_subset(parameters_tvb, offset + 4 , -1, -1);
341 dissect_all_asap_parameters(last_parameter_tvb, asap_tree);
344 #define MESSAGE_TYPE_LENGTH 1
345 #define MESSAGE_FLAGS_LENGTH 1
346 #define MESSAGE_LENGTH_LENGTH 2
348 #define MESSAGE_TYPE_OFFSET 0
349 #define MESSAGE_FLAGS_OFFSET (MESSAGE_TYPE_OFFSET + MESSAGE_TYPE_LENGTH)
350 #define MESSAGE_LENGTH_OFFSET (MESSAGE_FLAGS_OFFSET + MESSAGE_FLAGS_LENGTH)
351 #define MESSAGE_VALUE_OFFSET (MESSAGE_LENGTH_OFFSET + MESSAGE_LENGTH_LENGTH)
353 #define REGISTRATION_MESSAGE_TYPE 0x01
354 #define DEREGISTRATION_MESSAGE_TYPE 0x02
355 #define REGISTRATION_RESPONSE_MESSAGE_TYPE 0x03
356 #define NAME_RESOLUTION_MESSAGE_TYPE 0x04
357 #define NAME_RESOLUTION_RESPONSE_MESSAGE_TYPE 0x05
358 #define NAME_UNKNOWN_MESSAGE_TYPE 0x06
359 #define ENDPOINT_KEEP_ALIVE_MESSAGE_TYPE 0x08
360 #define ENDPOINT_UNREACHABLE_MESSAGE_TYPE 0x09
361 #define SERVER_HUNT_MESSAGE_TYPE 0x0a
362 #define SERVER_HUNT_RESPONSE_MESSAGE_TYPE 0x0b
364 static const value_string asap_message_type_values[] = {
365 { REGISTRATION_MESSAGE_TYPE, "Registration" },
366 { DEREGISTRATION_MESSAGE_TYPE, "Deregistration" },
367 { REGISTRATION_RESPONSE_MESSAGE_TYPE, "Registration response" },
368 { NAME_RESOLUTION_MESSAGE_TYPE, "Name resolution" },
369 { NAME_RESOLUTION_RESPONSE_MESSAGE_TYPE, "Name resolution response" },
370 { NAME_UNKNOWN_MESSAGE_TYPE, "Name unknown" },
371 { ENDPOINT_KEEP_ALIVE_MESSAGE_TYPE, "Endpoint keep alive" },
372 { ENDPOINT_UNREACHABLE_MESSAGE_TYPE, "Endpoint unreachable" },
373 { SERVER_HUNT_MESSAGE_TYPE, "Server hunt" },
374 { SERVER_HUNT_RESPONSE_MESSAGE_TYPE, "Server hunt response" },
378 dissect_asap_message(tvbuff_t *message_tvb, proto_tree *asap_tree)
380 tvbuff_t *parameters_tvb;
384 type = tvb_get_guint8(message_tvb, MESSAGE_TYPE_OFFSET);
385 flags = tvb_get_guint8(message_tvb, MESSAGE_FLAGS_OFFSET);
386 length = tvb_get_ntohs (message_tvb, MESSAGE_LENGTH_OFFSET);
389 proto_tree_add_uint(asap_tree, hf_asap_message_type, message_tvb, MESSAGE_TYPE_OFFSET, MESSAGE_TYPE_LENGTH, type);
390 proto_tree_add_uint(asap_tree, hf_asap_message_flags, message_tvb, MESSAGE_FLAGS_OFFSET, MESSAGE_FLAGS_LENGTH, flags);
391 proto_tree_add_uint(asap_tree, hf_asap_message_length, message_tvb, MESSAGE_LENGTH_OFFSET, MESSAGE_LENGTH_LENGTH, length);
394 parameters_tvb = tvb_new_subset(message_tvb, MESSAGE_VALUE_OFFSET, -1, -1);
396 case REGISTRATION_RESPONSE_MESSAGE_TYPE:
397 dissect_registration_response_message(parameters_tvb, asap_tree);
400 dissect_all_asap_parameters(parameters_tvb, asap_tree);
407 dissect_asap(tvbuff_t *message_tvb, packet_info *pinfo, proto_tree *tree)
409 proto_item *asap_item;
410 proto_tree *asap_tree;
412 /* make entry in the Protocol column on summary display */
413 if (check_col(pinfo->cinfo, COL_PROTOCOL))
414 col_set_str(pinfo->cinfo, COL_PROTOCOL, "ASAP");
416 /* In the interest of speed, if "tree" is NULL, don't do any work not
417 necessary to generate protocol tree items. */
419 /* create the asap protocol tree */
420 asap_item = proto_tree_add_item(tree, proto_asap, message_tvb, 0, -1, FALSE);
421 asap_tree = proto_item_add_subtree(asap_item, ett_asap);
425 /* dissect the message */
426 dissect_asap_message(message_tvb, asap_tree);
429 /* Register the protocol with Ethereal */
431 proto_register_asap(void)
434 /* Setup list of header fields */
435 static hf_register_info hf[] = {
436 { &hf_asap_message_type,
437 { "Type", "asap.message_type",
438 FT_UINT8, BASE_DEC, VALS(asap_message_type_values), 0x0,
441 { &hf_asap_message_flags,
442 { "Flags", "asap.message_flags",
443 FT_UINT8, BASE_HEX, NULL, 0x0,
446 { &hf_asap_message_length,
447 { "Length", "asap.message_length",
448 FT_UINT16, BASE_DEC, NULL, 0x0,
451 { &hf_asap_parameter_type,
452 { "Parameter Type", "asap.parameter_type",
453 FT_UINT16, BASE_HEX, VALS(asap_parameter_type_values), 0x0,
456 { &hf_asap_parameter_length,
457 { "Parameter length", "asap.message_length",
458 FT_UINT16, BASE_DEC, NULL, 0x0,
461 { &hf_asap_parameter_value,
462 { "Parameter value", "asap.parameter_value",
463 FT_BYTES, BASE_NONE, NULL, 0x0,
466 { &hf_asap_parameter_padding,
467 { "Padding", "asap.parameter_padding",
468 FT_BYTES, BASE_NONE, NULL, 0x0,
471 {&hf_asap_parameter_ipv4_address,
472 { "IP Version 4 address", "asap.ipv4_address",
473 FT_IPv4, BASE_NONE, NULL, 0x0,
476 {&hf_asap_parameter_ipv6_address,
477 { "IP Version 6 address", "asap.ipv6_address",
478 FT_IPv6, BASE_NONE, NULL, 0x0,
481 { &hf_asap_parameter_port,
482 { "SCTP port", "asap.message_port",
483 FT_UINT16, BASE_DEC, NULL, 0x0,
486 { &hf_asap_parameter_number_of_addr,
487 { "Number of IP addresses", "asap.message_number_of_addresses",
488 FT_UINT16, BASE_DEC, NULL, 0x0,
491 { &hf_asap_parameter_load_policy,
492 { "Load policy", "asap.message_load_policy",
493 FT_UINT16, BASE_DEC, NULL, 0x0,
496 { &hf_asap_parameter_load_value,
497 { "Load value", "asap.message_load_value",
498 FT_UINT16, BASE_DEC, NULL, 0x0,
501 { &hf_asap_parameter_reg_life,
502 { "Registration life", "asap.message_registration_life",
503 FT_UINT32, BASE_DEC, NULL, 0x0,
506 { &hf_asap_parameter_pool_handle,
507 { "Pool handle", "asap.pool_handle",
508 FT_STRING, BASE_DEC, NULL, 0x0,
511 { &hf_asap_parameter_signature,
512 { "Signature", "asap.parameter_signature",
513 FT_BYTES, BASE_NONE, NULL, 0x0,
516 { &hf_asap_parameter_action_code,
517 { "Action code", "asap.message_action_code",
518 FT_UINT8, BASE_DEC, NULL, 0x0,
521 { &hf_asap_parameter_result_code,
522 { "Result code", "asap.message_result_code",
523 FT_UINT8, BASE_DEC, NULL, 0x0,
526 { &hf_asap_parameter_reserved,
527 { "Reserved", "asap.message_reserved",
528 FT_UINT16, BASE_HEX, NULL, 0x0,
533 /* Setup protocol subtree array */
534 static gint *ett[] = {
539 /* Register the protocol name and description */
540 proto_asap = proto_register_protocol("Aggregate Server Access Protocol", "ASAP", "asap");
542 /* Required function calls to register the header fields and subtrees used */
543 proto_register_field_array(proto_asap, hf, array_length(hf));
544 proto_register_subtree_array(ett, array_length(ett));
549 proto_reg_handoff_asap(void)
551 dissector_handle_t asap_handle;
553 asap_handle = create_dissector_handle(dissect_asap, proto_asap);
554 dissector_add("sctp.ppi", ASAP_PAYLOAD_PROTO_ID, asap_handle);