2 * Routines for RX packet dissection
3 * Copyright 1999, Nathan Neulinger <nneul@umr.edu>
4 * Based on routines from tcpdump patches by
5 * Ken Hornstein <kenh@cmf.nrl.navy.mil>
9 * Wireshark - Network traffic analyzer
10 * By Gerald Combs <gerald@wireshark.org>
11 * Copyright 1998 Gerald Combs
13 * Copied from packet-tftp.c
15 * This program is free software; you can redistribute it and/or
16 * modify it under the terms of the GNU General Public License
17 * as published by the Free Software Foundation; either version 2
18 * of the License, or (at your option) any later version.
20 * This program is distributed in the hope that it will be useful,
21 * but WITHOUT ANY WARRANTY; without even the implied warranty of
22 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23 * GNU General Public License for more details.
25 * You should have received a copy of the GNU General Public License
26 * along with this program; if not, write to the Free Software
27 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
35 #include <epan/packet.h>
36 #include "packet-rx.h"
37 #include <epan/addr_resolv.h>
42 * http://web.mit.edu/kolya/afs/rx/rx-spec
44 * XXX - is the "Epoch" really a UN*X time? The high-order bit, according
45 * to that spec, is a flag bit.
48 #define UDP_PORT_RX_LOW 7000
49 #define UDP_PORT_RX_HIGH 7009
50 #define UDP_PORT_RX_AFS_BACKUPS 7021
52 static const value_string rx_types[] = {
53 { RX_PACKET_TYPE_DATA, "data" },
54 { RX_PACKET_TYPE_ACK, "ack" },
55 { RX_PACKET_TYPE_BUSY, "busy" },
56 { RX_PACKET_TYPE_ABORT, "abort" },
57 { RX_PACKET_TYPE_ACKALL, "ackall" },
58 { RX_PACKET_TYPE_CHALLENGE, "challenge" },
59 { RX_PACKET_TYPE_RESPONSE, "response" },
60 { RX_PACKET_TYPE_DEBUG, "debug" },
61 { RX_PACKET_TYPE_PARAMS, "params" },
62 { RX_PACKET_TYPE_VERSION, "version" },
66 static const value_string rx_reason[] = {
67 { RX_ACK_REQUESTED, "Ack Requested" },
68 { RX_ACK_DUPLICATE, "Duplicate Packet" },
69 { RX_ACK_OUT_OF_SEQUENCE, "Out Of Sequence" },
70 { RX_ACK_EXEEDS_WINDOW, "Exceeds Window" },
71 { RX_ACK_NOSPACE, "No Space" },
72 { RX_ACK_PING, "Ping" },
73 { RX_ACK_PING_RESPONSE, "Ping Response" },
74 { RX_ACK_DELAY, "Delay" },
75 { RX_ACK_IDLE, "Idle" },
79 static const value_string rx_ack_type[] = {
80 { RX_ACK_TYPE_NACK, "NACK" },
81 { RX_ACK_TYPE_ACK, "ACK" },
85 static int proto_rx = -1;
86 static int hf_rx_epoch = -1;
87 static int hf_rx_cid = -1;
88 static int hf_rx_seq = -1;
89 static int hf_rx_serial = -1;
90 static int hf_rx_callnumber = -1;
91 static int hf_rx_type = -1;
92 static int hf_rx_flags = -1;
93 static int hf_rx_flags_clientinit = -1;
94 static int hf_rx_flags_request_ack = -1;
95 static int hf_rx_flags_last_packet = -1;
96 static int hf_rx_flags_more_packets = -1;
97 static int hf_rx_flags_free_packet = -1;
98 static int hf_rx_userstatus = -1;
99 static int hf_rx_securityindex = -1;
100 static int hf_rx_spare = -1;
101 static int hf_rx_serviceid = -1;
102 static int hf_rx_bufferspace = -1;
103 static int hf_rx_maxskew = -1;
104 static int hf_rx_first_packet = -1;
105 static int hf_rx_prev_packet = -1;
106 static int hf_rx_reason = -1;
107 static int hf_rx_numacks = -1;
108 static int hf_rx_ack_type = -1;
109 static int hf_rx_ack = -1;
110 static int hf_rx_challenge = -1;
111 static int hf_rx_version = -1;
112 static int hf_rx_nonce = -1;
113 static int hf_rx_inc_nonce = -1;
114 static int hf_rx_min_level = -1;
115 static int hf_rx_level = -1;
116 static int hf_rx_response = -1;
117 static int hf_rx_encrypted = -1;
118 static int hf_rx_kvno = -1;
119 static int hf_rx_ticket_len = -1;
120 static int hf_rx_ticket = -1;
121 static int hf_rx_ifmtu = -1;
122 static int hf_rx_maxmtu = -1;
123 static int hf_rx_rwind = -1;
124 static int hf_rx_maxpackets = -1;
125 static int hf_rx_abort = -1;
126 static int hf_rx_abortcode = -1;
128 static gint ett_rx = -1;
129 static gint ett_rx_flags = -1;
130 static gint ett_rx_ack = -1;
131 static gint ett_rx_challenge = -1;
132 static gint ett_rx_response = -1;
133 static gint ett_rx_encrypted = -1;
134 static gint ett_rx_abort = -1;
136 static dissector_handle_t afs_handle;
139 dissect_rx_response_encrypted(tvbuff_t *tvb, proto_tree *parent_tree, int offset)
143 int old_offset=offset;
147 item = proto_tree_add_item(parent_tree, hf_rx_encrypted, tvb, offset, -1, FALSE);
148 tree = proto_item_add_subtree(item, ett_rx_encrypted);
150 /* epoch : 4 bytes */
153 ts.secs = tvb_get_ntohl(tvb, offset);
156 proto_tree_add_time(tree, hf_rx_epoch, tvb,
162 proto_tree_add_item(tree, hf_rx_cid, tvb, offset, 4, FALSE);
165 /*FIXME dont know how to handle this checksum, skipping it */
168 /* sequrityindex : 1 byte */
169 proto_tree_add_item(tree, hf_rx_securityindex, tvb, offset, 1, FALSE);
172 for (i=0; i<RX_MAXCALLS; i++) {
173 /* callnumber : 4 bytes */
174 callnumber = tvb_get_ntohl(tvb, offset);
175 proto_tree_add_uint(tree, hf_rx_callnumber, tvb,
176 offset, 4, callnumber);
180 /* inc nonce : 4 bytes */
181 proto_tree_add_item(tree, hf_rx_inc_nonce, tvb, offset, 4, FALSE);
184 /* level : 4 bytes */
185 proto_tree_add_item(tree, hf_rx_level, tvb, offset, 4, FALSE);
188 proto_item_set_len(item, offset-old_offset);
194 dissect_rx_response(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, int offset, guint32 seq, guint32 callnumber)
199 int old_offset=offset;
201 if (check_col(pinfo->cinfo, COL_INFO)) {
202 col_add_fstr(pinfo->cinfo, COL_INFO,
207 "Destination Port: %s ",
209 (unsigned long)callnumber,
210 get_udp_port(pinfo->srcport),
211 get_udp_port(pinfo->destport)
215 item = proto_tree_add_item(parent_tree, hf_rx_response, tvb, offset, -1, FALSE);
216 tree = proto_item_add_subtree(item, ett_rx_response);
218 version = tvb_get_ntohl(tvb, offset);
219 proto_tree_add_uint(tree, hf_rx_version, tvb,
227 /* encrypted : struct */
228 offset = dissect_rx_response_encrypted(tvb, tree, offset);
231 proto_tree_add_item(tree, hf_rx_kvno, tvb, offset, 4, FALSE);
235 tl = tvb_get_ntohl(tvb, offset);
236 proto_tree_add_uint(tree, hf_rx_ticket_len, tvb,
240 tvb_ensure_bytes_exist(tvb, offset, tl);
241 proto_tree_add_item(tree, hf_rx_ticket, tvb, offset, tl, FALSE);
245 proto_item_set_len(item, offset-old_offset);
250 dissect_rx_abort(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, int offset, guint32 seq, guint32 callnumber)
254 int old_offset=offset;
256 if (check_col(pinfo->cinfo, COL_INFO)) {
257 col_add_fstr(pinfo->cinfo, COL_INFO,
262 "Destination Port: %s ",
264 (unsigned long)callnumber,
265 get_udp_port(pinfo->srcport),
266 get_udp_port(pinfo->destport)
270 item = proto_tree_add_item(parent_tree, hf_rx_abort, tvb, offset, -1, FALSE);
271 tree = proto_item_add_subtree(item, ett_rx_abort);
274 proto_tree_add_item(tree, hf_rx_abortcode, tvb, offset, 4, FALSE);
277 proto_item_set_len(item, offset-old_offset);
283 dissect_rx_challenge(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, int offset, guint32 seq, guint32 callnumber)
288 int old_offset=offset;
290 if (check_col(pinfo->cinfo, COL_INFO)) {
291 col_add_fstr(pinfo->cinfo, COL_INFO,
296 "Destination Port: %s ",
298 (unsigned long)callnumber,
299 get_udp_port(pinfo->srcport),
300 get_udp_port(pinfo->destport)
304 item = proto_tree_add_item(parent_tree, hf_rx_challenge, tvb, offset, -1, FALSE);
305 tree = proto_item_add_subtree(item, ett_rx_challenge);
307 version = tvb_get_ntohl(tvb, offset);
308 proto_tree_add_uint(tree, hf_rx_version, tvb,
313 proto_tree_add_item(tree, hf_rx_nonce, tvb, offset, 4, FALSE);
316 proto_tree_add_item(tree, hf_rx_min_level, tvb, offset, 4, FALSE);
320 proto_item_set_len(item, offset-old_offset);
325 dissect_rx_acks(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, int offset, guint32 seq, guint32 callnumber)
330 int old_offset = offset;
332 if (check_col(pinfo->cinfo, COL_INFO)) {
333 col_add_fstr(pinfo->cinfo, COL_INFO,
338 "Destination Port: %s ",
340 (unsigned long)callnumber,
341 get_udp_port(pinfo->srcport),
342 get_udp_port(pinfo->destport)
346 item = proto_tree_add_item(parent_tree, hf_rx_ack, tvb, offset, -1, FALSE);
347 tree = proto_item_add_subtree(item, ett_rx_ack);
350 /* bufferspace: 2 bytes*/
351 proto_tree_add_item(tree, hf_rx_bufferspace, tvb, offset, 2, FALSE);
354 /* maxskew: 2 bytes*/
355 proto_tree_add_item(tree, hf_rx_maxskew, tvb, offset, 2, FALSE);
358 /* first packet: 4 bytes*/
359 proto_tree_add_item(tree, hf_rx_first_packet, tvb, offset, 4, FALSE);
362 /* prev packet: 4 bytes*/
363 proto_tree_add_item(tree, hf_rx_prev_packet, tvb, offset, 4, FALSE);
366 /* serial : 4 bytes */
367 proto_tree_add_item(tree, hf_rx_serial, tvb, offset, 4, FALSE);
370 /* reason : 1 byte */
371 proto_tree_add_item(tree, hf_rx_reason, tvb, offset, 1, FALSE);
375 num = tvb_get_guint8(tvb, offset);
376 proto_tree_add_uint(tree, hf_rx_numacks, tvb, offset, 1, num);
380 proto_tree_add_item(tree, hf_rx_ack_type, tvb, offset, 1,
385 /* Some implementations adds some extra fields.
386 * As far as I can see, these first add 3 padding bytes and then
387 * up to 4 32-bit values. (0,3,4 have been witnessed)
389 * RX as a protocol seems to be completely nondefined and seems to lack
390 * any sort of documentation other than "read the source of any of the
391 * (compatible?) implementations.
393 if (tvb_length_remaining(tvb, offset)>3) {
394 offset += 3; /* guess. some implementations adds 3 bytes */
396 if (tvb_reported_length_remaining(tvb, offset) >= 4){
397 proto_tree_add_item(tree, hf_rx_ifmtu, tvb, offset, 4,
401 if (tvb_reported_length_remaining(tvb, offset) >= 4){
402 proto_tree_add_item(tree, hf_rx_maxmtu, tvb, offset, 4,
406 if (tvb_reported_length_remaining(tvb, offset) >= 4){
407 proto_tree_add_item(tree, hf_rx_rwind, tvb, offset, 4,
411 if (tvb_reported_length_remaining(tvb, offset) >= 4){
412 proto_tree_add_item(tree, hf_rx_maxpackets, tvb, offset, 4,
418 proto_item_set_len(item, offset-old_offset);
424 dissect_rx_flags(tvbuff_t *tvb, struct rxinfo *rxinfo, proto_tree *parent_tree, int offset)
430 flags = tvb_get_guint8(tvb, offset);
431 rxinfo->flags = flags;
433 item = proto_tree_add_uint(parent_tree, hf_rx_flags, tvb,
435 tree = proto_item_add_subtree(item, ett_rx_flags);
437 proto_tree_add_boolean(tree, hf_rx_flags_free_packet, tvb,
439 proto_tree_add_boolean(tree, hf_rx_flags_more_packets, tvb,
441 proto_tree_add_boolean(tree, hf_rx_flags_last_packet, tvb,
443 proto_tree_add_boolean(tree, hf_rx_flags_request_ack, tvb,
445 proto_tree_add_boolean(tree, hf_rx_flags_clientinit, tvb,
453 dissect_rx(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
458 struct rxinfo rxinfo;
461 guint32 seq, callnumber;
464 /* Ensure we have enough data */
465 if (tvb_length(tvb) < 28)
468 /* Make sure it's a known type */
469 type = tvb_get_guint8(tvb, 20);
470 if (type == 0 || type == 10 || type == 11 || type == 12 || type > 13)
473 col_set_str(pinfo->cinfo, COL_PROTOCOL, "RX");
474 col_clear(pinfo->cinfo, COL_INFO);
476 item = proto_tree_add_protocol_format(parent_tree, proto_rx, tvb,
477 offset, 28, "RX Protocol");
478 tree = proto_item_add_subtree(item, ett_rx);
480 /* epoch : 4 bytes */
481 rxinfo.epoch = tvb_get_ntohl(tvb, offset);
482 ts.secs = rxinfo.epoch;
484 proto_tree_add_time(tree, hf_rx_epoch, tvb, offset, 4, &ts);
488 rxinfo.cid = tvb_get_ntohl(tvb, offset);
489 proto_tree_add_item(tree, hf_rx_cid, tvb, offset, 4, FALSE);
492 /* callnumber : 4 bytes */
493 callnumber = tvb_get_ntohl(tvb, offset);
494 proto_tree_add_uint(tree, hf_rx_callnumber, tvb,
495 offset, 4, callnumber);
497 rxinfo.callnumber = callnumber;
500 seq = tvb_get_ntohl(tvb, offset);
501 proto_tree_add_uint(tree, hf_rx_seq, tvb,
506 /* serial : 4 bytes */
507 proto_tree_add_item(tree, hf_rx_serial, tvb, offset, 4, FALSE);
511 type = tvb_get_guint8(tvb, offset);
512 proto_tree_add_uint(tree, hf_rx_type, tvb,
518 offset = dissect_rx_flags(tvb, &rxinfo, tree, offset);
520 /* userstatus : 1 byte */
521 proto_tree_add_item(tree, hf_rx_userstatus, tvb, offset, 1, FALSE);
524 /* sequrityindex : 1 byte */
525 proto_tree_add_item(tree, hf_rx_securityindex, tvb, offset, 1, FALSE);
529 * How clever: even though the AFS header files indicate that the
530 * serviceId is first, it's really encoded _after_ the spare field.
531 * I wasted a day figuring that out!
535 proto_tree_add_item(tree, hf_rx_spare, tvb, offset, 2, FALSE);
538 /* service id : 2 bytes */
539 serviceid = tvb_get_ntohs(tvb, offset);
540 proto_tree_add_uint(tree, hf_rx_serviceid, tvb,
541 offset, 2, serviceid);
543 rxinfo.serviceid = serviceid;
546 case RX_PACKET_TYPE_ACK:
547 /*dissect_rx_acks(tvb, pinfo, parent_tree, offset,
548 cant create it in a parallell tree, then ett seasrch
550 dissect_rx_acks(tvb, pinfo, tree, offset,
553 case RX_PACKET_TYPE_ACKALL:
554 /* does not contain any payload */
555 if (check_col(pinfo->cinfo, COL_INFO)) {
556 col_add_fstr(pinfo->cinfo, COL_INFO,
561 "Destination Port: %s ",
563 (unsigned long)callnumber,
564 get_udp_port(pinfo->srcport),
565 get_udp_port(pinfo->destport)
569 case RX_PACKET_TYPE_CHALLENGE:
570 dissect_rx_challenge(tvb, pinfo, tree, offset, seq, callnumber);
572 case RX_PACKET_TYPE_RESPONSE:
573 dissect_rx_response(tvb, pinfo, tree, offset, seq, callnumber);
575 case RX_PACKET_TYPE_DATA: {
578 pd_save = pinfo->private_data;
579 pinfo->private_data = &rxinfo;
580 next_tvb = tvb_new_subset_remaining(tvb, offset);
581 call_dissector(afs_handle, next_tvb, pinfo, parent_tree);
582 pinfo->private_data = pd_save;
585 case RX_PACKET_TYPE_ABORT:
586 dissect_rx_abort(tvb, pinfo, tree, offset, seq, callnumber);
590 return(tvb_length(tvb));
594 proto_register_rx(void)
596 static hf_register_info hf[] = {
598 "Epoch", "rx.epoch", FT_ABSOLUTE_TIME, ABSOLUTE_TIME_LOCAL,
599 NULL, 0, NULL, HFILL }},
602 "CID", "rx.cid", FT_UINT32, BASE_DEC,
603 NULL, 0, NULL, HFILL }},
605 { &hf_rx_callnumber, {
606 "Call Number", "rx.callnumber", FT_UINT32, BASE_DEC,
607 NULL, 0, NULL, HFILL }},
610 "Sequence Number", "rx.seq", FT_UINT32, BASE_DEC,
611 NULL, 0, NULL, HFILL }},
614 "Serial", "rx.serial", FT_UINT32, BASE_DEC,
615 NULL, 0, NULL, HFILL }},
618 "Type", "rx.type", FT_UINT8, BASE_DEC,
619 VALS(rx_types), 0, NULL, HFILL }},
622 "Flags", "rx.flags", FT_UINT8, BASE_HEX,
623 NULL, 0, NULL, HFILL }},
625 { &hf_rx_flags_clientinit, {
626 "Client Initiated", "rx.flags.client_init", FT_BOOLEAN, 8,
627 NULL, RX_CLIENT_INITIATED, NULL, HFILL }},
629 { &hf_rx_flags_request_ack, {
630 "Request Ack", "rx.flags.request_ack", FT_BOOLEAN, 8,
631 NULL, RX_REQUEST_ACK, NULL, HFILL }},
633 { &hf_rx_flags_last_packet, {
634 "Last Packet", "rx.flags.last_packet", FT_BOOLEAN, 8,
635 NULL, RX_LAST_PACKET, NULL, HFILL }},
637 { &hf_rx_flags_more_packets, {
638 "More Packets", "rx.flags.more_packets", FT_BOOLEAN, 8,
639 NULL, RX_MORE_PACKETS, NULL, HFILL }},
641 { &hf_rx_flags_free_packet, {
642 "Free Packet", "rx.flags.free_packet", FT_BOOLEAN, 8,
643 NULL, RX_FREE_PACKET, NULL, HFILL }},
645 /* XXX - what about RX_SLOW_START_OR_JUMBO? */
647 { &hf_rx_userstatus, {
648 "User Status", "rx.userstatus", FT_UINT32, BASE_DEC,
649 NULL, 0, NULL, HFILL }},
651 { &hf_rx_securityindex, {
652 "Security Index", "rx.securityindex", FT_UINT32, BASE_DEC,
653 NULL, 0, NULL, HFILL }},
656 "Spare/Checksum", "rx.spare", FT_UINT16, BASE_DEC,
657 NULL, 0, NULL, HFILL }},
659 { &hf_rx_serviceid, {
660 "Service ID", "rx.serviceid", FT_UINT16, BASE_DEC,
661 NULL, 0, NULL, HFILL }},
663 { &hf_rx_bufferspace, {
664 "Bufferspace", "rx.bufferspace", FT_UINT16, BASE_DEC,
665 NULL, 0, "Number Of Packets Available", HFILL }},
668 "Max Skew", "rx.maxskew", FT_UINT16, BASE_DEC,
669 NULL, 0, NULL, HFILL }},
671 { &hf_rx_first_packet, {
672 "First Packet", "rx.first", FT_UINT32, BASE_DEC,
673 NULL, 0, NULL, HFILL }},
675 { &hf_rx_prev_packet, {
676 "Prev Packet", "rx.prev", FT_UINT32, BASE_DEC,
677 NULL, 0, "Previous Packet", HFILL }},
680 "Reason", "rx.reason", FT_UINT8, BASE_DEC,
681 VALS(rx_reason), 0, "Reason For This ACK", HFILL }},
684 "Num ACKs", "rx.num_acks", FT_UINT8, BASE_DEC,
685 NULL, 0, "Number Of ACKs", HFILL }},
688 "ACK Type", "rx.ack_type", FT_UINT8, BASE_DEC,
689 VALS(rx_ack_type), 0, "Type Of ACKs", HFILL }},
692 "ACK Packet", "rx.ack", FT_NONE, BASE_NONE,
693 NULL, 0, NULL, HFILL }},
695 { &hf_rx_challenge, {
696 "CHALLENGE Packet", "rx.challenge", FT_NONE, BASE_NONE,
697 NULL, 0, NULL, HFILL }},
700 "Version", "rx.version", FT_UINT32, BASE_DEC,
701 NULL, 0, "Version Of Challenge/Response", HFILL }},
704 "Nonce", "rx.nonce", FT_UINT32, BASE_HEX,
705 NULL, 0, NULL, HFILL }},
707 { &hf_rx_inc_nonce, {
708 "Inc Nonce", "rx.inc_nonce", FT_UINT32, BASE_HEX,
709 NULL, 0, "Incremented Nonce", HFILL }},
711 { &hf_rx_min_level, {
712 "Min Level", "rx.min_level", FT_UINT32, BASE_DEC,
713 NULL, 0, NULL, HFILL }},
716 "Level", "rx.level", FT_UINT32, BASE_DEC,
717 NULL, 0, NULL, HFILL }},
720 "RESPONSE Packet", "rx.response", FT_NONE, BASE_NONE,
721 NULL, 0, NULL, HFILL }},
724 "ABORT Packet", "rx.abort", FT_NONE, BASE_NONE,
725 NULL, 0, NULL, HFILL }},
727 { &hf_rx_encrypted, {
728 "Encrypted", "rx.encrypted", FT_NONE, BASE_NONE,
729 NULL, 0, "Encrypted part of response packet", HFILL }},
732 "kvno", "rx.kvno", FT_UINT32, BASE_DEC,
733 NULL, 0, NULL, HFILL }},
735 { &hf_rx_ticket_len, {
736 "Ticket len", "rx.ticket_len", FT_UINT32, BASE_DEC,
737 NULL, 0, "Ticket Length", HFILL }},
740 "ticket", "rx.ticket", FT_BYTES, BASE_NONE,
741 NULL, 0, NULL, HFILL }},
744 "Interface MTU", "rx.if_mtu", FT_UINT32, BASE_DEC,
745 NULL, 0, NULL, HFILL }},
748 "Max MTU", "rx.max_mtu", FT_UINT32, BASE_DEC,
749 NULL, 0, NULL, HFILL }},
752 "rwind", "rx.rwind", FT_UINT32, BASE_DEC,
753 NULL, 0, NULL, HFILL }},
755 { &hf_rx_maxpackets, {
756 "Max Packets", "rx.max_packets", FT_UINT32, BASE_DEC,
757 NULL, 0, NULL, HFILL }},
759 { &hf_rx_abortcode, {
760 "Abort Code", "rx.abort_code", FT_UINT32, BASE_DEC,
761 NULL, 0, NULL, HFILL }},
764 static gint *ett[] = {
774 proto_rx = proto_register_protocol("RX Protocol", "RX", "rx");
775 proto_register_field_array(proto_rx, hf, array_length(hf));
776 proto_register_subtree_array(ett, array_length(ett));
780 proto_reg_handoff_rx(void)
782 dissector_handle_t rx_handle;
787 * Get handle for the AFS dissector.
789 afs_handle = find_dissector("afs");
791 /* Ports in the range UDP_PORT_RX_LOW to UDP_PORT_RX_HIGH
792 are all used for various AFS services. */
793 rx_handle = new_create_dissector_handle(dissect_rx, proto_rx);
794 for (port = UDP_PORT_RX_LOW; port <= UDP_PORT_RX_HIGH; port++)
795 dissector_add("udp.port", port, rx_handle);
796 dissector_add("udp.port", UDP_PORT_RX_AFS_BACKUPS, rx_handle);