2 * Routines for Quake packet dissection
4 * Uwe Girlich <uwe@planetquake.com>
5 * http://www.idsoftware.com/q1source/q1source.zip
7 * $Id: packet-quake.c,v 1.26 2002/04/02 06:28:16 girlich Exp $
9 * Ethereal - Network traffic analyzer
10 * By Gerald Combs <gerald@ethereal.com>
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.
34 #ifdef HAVE_SYS_TYPES_H
35 # include <sys/types.h>
38 #ifdef HAVE_NETINET_IN_H
39 # include <netinet/in.h>
43 #include <epan/packet.h>
44 #include <epan/conversation.h>
47 static int proto_quake = -1;
48 static int hf_quake_header_flags = -1;
49 static int hf_quake_header_length = -1;
50 static int hf_quake_header_sequence = -1;
51 static int hf_quake_control_command = -1;
53 static int hf_quake_CCREQ_CONNECT_game = -1;
54 static int hf_quake_CCREQ_CONNECT_version = -1;
55 static int hf_quake_CCREQ_SERVER_INFO_game = -1;
56 static int hf_quake_CCREQ_SERVER_INFO_version = -1;
57 static int hf_quake_CCREQ_PLAYER_INFO_player = -1;
58 static int hf_quake_CCREQ_RULE_INFO_lastrule = -1;
60 static int hf_quake_CCREP_ACCEPT_port = -1;
61 static int hf_quake_CCREP_REJECT_reason = -1;
62 static int hf_quake_CCREP_SERVER_INFO_address = -1;
63 static int hf_quake_CCREP_SERVER_INFO_server = -1;
64 static int hf_quake_CCREP_SERVER_INFO_map = -1;
65 static int hf_quake_CCREP_SERVER_INFO_num_player = -1;
66 static int hf_quake_CCREP_SERVER_INFO_max_player = -1;
67 static int hf_quake_CCREP_PLAYER_INFO_name = -1;
68 static int hf_quake_CCREP_PLAYER_INFO_colors = -1;
69 static int hf_quake_CCREP_PLAYER_INFO_colors_shirt = -1;
70 static int hf_quake_CCREP_PLAYER_INFO_colors_pants = -1;
71 static int hf_quake_CCREP_PLAYER_INFO_frags = -1;
72 static int hf_quake_CCREP_PLAYER_INFO_connect_time = -1;
73 static int hf_quake_CCREP_PLAYER_INFO_address = -1;
74 static int hf_quake_CCREP_RULE_INFO_rule = -1;
75 static int hf_quake_CCREP_RULE_INFO_value = -1;
78 static gint ett_quake = -1;
79 static gint ett_quake_control = -1;
80 static gint ett_quake_control_colors = -1;
81 static gint ett_quake_flags = -1;
83 static dissector_handle_t quake_handle;
84 static dissector_handle_t data_handle;
86 /* I took these names directly out of the Q1 source. */
87 #define NETFLAG_LENGTH_MASK 0x0000ffff
88 #define NET_HEADERSIZE 8
89 #define DEFAULTnet_hostport 26000
90 static unsigned int gbl_quakeServerPort=DEFAULTnet_hostport;
92 #define NETFLAG_LENGTH_MASK 0x0000ffff
93 #define NETFLAG_DATA 0x00010000
94 #define NETFLAG_ACK 0x00020000
95 #define NETFLAG_NAK 0x00040000
96 #define NETFLAG_EOM 0x00080000
97 #define NETFLAG_UNRELIABLE 0x00100000
98 #define NETFLAG_CTL 0x80000000
101 #define CCREQ_CONNECT 0x01
102 #define CCREQ_SERVER_INFO 0x02
103 #define CCREQ_PLAYER_INFO 0x03
104 #define CCREQ_RULE_INFO 0x04
106 #define CCREP_ACCEPT 0x81
107 #define CCREP_REJECT 0x82
108 #define CCREP_SERVER_INFO 0x83
109 #define CCREP_PLAYER_INFO 0x84
110 #define CCREP_RULE_INFO 0x85
112 static const value_string names_control_command[] = {
113 { CCREQ_CONNECT, "connect" },
114 { CCREQ_SERVER_INFO, "server_info" },
115 { CCREQ_PLAYER_INFO, "player_info" },
116 { CCREQ_RULE_INFO, "rule_info" },
117 { CCREP_ACCEPT, "accept" },
118 { CCREP_REJECT, "reject" },
119 { CCREP_SERVER_INFO, "server_info" },
120 { CCREP_PLAYER_INFO, "player_info" },
121 { CCREP_RULE_INFO, "rule_info" },
128 #define QUAKE_MAXSTRING 0x800
130 static const value_string names_control_direction[] = {
131 { CCREQ, "Request" },
137 static const value_string names_colors[] = {
158 static void dissect_quake(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree);
163 dissect_quake_CCREQ_CONNECT
164 (tvbuff_t *tvb, proto_tree *tree)
167 char game[QUAKE_MAXSTRING];
171 maxbufsize = MIN(sizeof(game), tvb_length(tvb));
172 len = tvb_get_nstringz0(tvb, 0, maxbufsize, game);
173 version = tvb_get_guint8(tvb, len + 1);
176 proto_tree_add_string(tree, hf_quake_CCREQ_CONNECT_game,
177 tvb, 0, len + 1, game);
178 proto_tree_add_uint(tree, hf_quake_CCREQ_CONNECT_version,
179 tvb, len + 1, 1, version);
185 dissect_quake_CCREQ_SERVER_INFO
186 (tvbuff_t *tvb, proto_tree *tree)
189 char game[QUAKE_MAXSTRING];
193 maxbufsize = MIN(sizeof(game), tvb_length(tvb));
194 len = tvb_get_nstringz0(tvb, 0, maxbufsize, game);
195 version = tvb_get_guint8(tvb, len + 1);
198 proto_tree_add_string(tree, hf_quake_CCREQ_SERVER_INFO_game,
199 tvb, 0, len + 1, game);
200 proto_tree_add_uint(tree, hf_quake_CCREQ_SERVER_INFO_version,
201 tvb, len + 1, 1, version);
207 dissect_quake_CCREQ_PLAYER_INFO
208 (tvbuff_t *tvb, proto_tree *tree)
212 player = tvb_get_guint8(tvb, 0);
214 proto_tree_add_uint(tree, hf_quake_CCREQ_PLAYER_INFO_player,
221 dissect_quake_CCREQ_RULE_INFO
222 (tvbuff_t *tvb, proto_tree *tree)
224 char rule[QUAKE_MAXSTRING];
228 maxbufsize = MIN(sizeof(rule), tvb_length(tvb));
229 len = tvb_get_nstringz0(tvb, 0, maxbufsize, rule);
231 proto_tree_add_string(tree, hf_quake_CCREQ_RULE_INFO_lastrule,
232 tvb, 0, len + 1, rule);
238 dissect_quake_CCREP_ACCEPT
239 (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
244 port = tvb_get_letohl(tvb, 0);
245 c = conversation_new( &pinfo->src, &pinfo->dst, PT_UDP, port,
248 conversation_set_dissector(c, quake_handle);
251 proto_tree_add_uint(tree, hf_quake_CCREP_ACCEPT_port,
258 dissect_quake_CCREP_REJECT
259 (tvbuff_t *tvb, proto_tree *tree)
262 char reason[QUAKE_MAXSTRING];
265 maxbufsize = MIN(sizeof(reason), tvb_length(tvb));
266 len = tvb_get_nstringz0(tvb, 0, maxbufsize, reason);
269 proto_tree_add_string(tree, hf_quake_CCREP_REJECT_reason,
270 tvb, 0, len + 1, reason);
276 dissect_quake_CCREP_SERVER_INFO
277 (tvbuff_t *tvb, proto_tree *tree)
282 char address[QUAKE_MAXSTRING];
283 char server[QUAKE_MAXSTRING];
284 char map[QUAKE_MAXSTRING];
292 maxbufsize = MIN((int)sizeof(address), tvb_length_remaining(tvb, offset));
293 len = tvb_get_nstringz0(tvb, offset, maxbufsize, address);
295 proto_tree_add_string(tree, hf_quake_CCREP_SERVER_INFO_address,
296 tvb, offset, len + 1, address);
300 maxbufsize = MIN((int)sizeof(server), tvb_length_remaining(tvb, offset));
301 len = tvb_get_nstringz0(tvb, offset, maxbufsize, server);
303 proto_tree_add_string(tree, hf_quake_CCREP_SERVER_INFO_server,
304 tvb, offset, len + 1, server);
308 maxbufsize = MIN((int)sizeof(map), tvb_length_remaining(tvb, offset));
309 len = tvb_get_nstringz0(tvb, offset, maxbufsize, map);
311 proto_tree_add_string(tree, hf_quake_CCREP_SERVER_INFO_map,
312 tvb, offset, len + 1, map);
316 num_player = tvb_get_guint8(tvb, offset + 0);
317 max_player = tvb_get_guint8(tvb, offset + 1);
318 version = tvb_get_guint8(tvb, offset + 2);
321 proto_tree_add_uint(tree, hf_quake_CCREP_SERVER_INFO_num_player,
322 tvb, offset + 0, 1, num_player);
323 proto_tree_add_uint(tree, hf_quake_CCREP_SERVER_INFO_max_player,
324 tvb, offset + 1, 1, max_player);
325 proto_tree_add_uint(tree, hf_quake_CCREQ_SERVER_INFO_version,
326 tvb, offset + 2, 1, version);
332 dissect_quake_CCREP_PLAYER_INFO
333 (tvbuff_t *tvb, proto_tree *tree)
339 char name[QUAKE_MAXSTRING];
344 guint32 connect_time;
345 char address[QUAKE_MAXSTRING];
349 player = tvb_get_guint8(tvb, offset);
351 proto_tree_add_uint(tree, hf_quake_CCREQ_PLAYER_INFO_player,
352 tvb, offset, 1, player);
356 maxbufsize = MIN((int)sizeof(name), tvb_length_remaining(tvb, offset));
357 len = tvb_get_nstringz0(tvb, offset, maxbufsize, name);
359 proto_tree_add_string(tree, hf_quake_CCREP_PLAYER_INFO_name,
360 tvb, offset, len + 1, name);
364 colors = tvb_get_letohl(tvb, offset + 0);
365 color_shirt = (colors >> 4) & 0x0f;
366 color_pants = (colors ) & 0x0f;
367 frags = tvb_get_letohl(tvb, offset + 4);
368 connect_time = tvb_get_letohl(tvb, offset + 8);
370 proto_item *colors_item;
371 proto_tree *colors_tree;
373 colors_item = proto_tree_add_uint(tree,
374 hf_quake_CCREP_PLAYER_INFO_colors,
375 tvb, offset + 0, 4, colors);
377 colors_tree = proto_item_add_subtree(colors_item,
378 ett_quake_control_colors);
379 proto_tree_add_uint(colors_tree,
380 hf_quake_CCREP_PLAYER_INFO_colors_shirt,
381 tvb, offset + 0, 1, color_shirt);
382 proto_tree_add_uint(colors_tree,
383 hf_quake_CCREP_PLAYER_INFO_colors_pants,
384 tvb, offset + 0, 1, color_pants);
386 proto_tree_add_uint(tree, hf_quake_CCREP_PLAYER_INFO_frags,
387 tvb, offset + 4, 4, frags);
388 proto_tree_add_uint(tree, hf_quake_CCREP_PLAYER_INFO_connect_time,
389 tvb, offset + 8, 4, connect_time);
393 maxbufsize = MIN((int)sizeof(address), tvb_length_remaining(tvb, offset));
394 len = tvb_get_nstringz0(tvb, offset, maxbufsize, address);
396 proto_tree_add_string(tree, hf_quake_CCREP_PLAYER_INFO_address,
397 tvb, offset, len + 1, address);
404 dissect_quake_CCREP_RULE_INFO
405 (tvbuff_t *tvb, proto_tree *tree)
407 char rule[QUAKE_MAXSTRING];
408 char value[QUAKE_MAXSTRING];
413 if (tvb_length(tvb) == 0) return;
417 maxbufsize = MIN((int)sizeof(rule), tvb_length_remaining(tvb, offset));
418 len = tvb_get_nstringz0(tvb, offset, maxbufsize, rule);
420 proto_tree_add_string(tree, hf_quake_CCREP_RULE_INFO_rule,
421 tvb, offset, len + 1, rule);
425 maxbufsize = MIN((int)sizeof(value), tvb_length_remaining(tvb, offset));
426 len = tvb_get_nstringz0(tvb, offset, maxbufsize, value);
428 proto_tree_add_string(tree, hf_quake_CCREP_RULE_INFO_value,
429 tvb, offset, len + 1, value);
436 dissect_quake_control(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
440 proto_item *control_item = NULL;
441 proto_tree *control_tree = NULL;
445 command = tvb_get_guint8(tvb, 0);
446 direction = (command & 0x80) ? CCREP : CCREQ;
448 if (check_col(pinfo->cinfo, COL_INFO)) {
449 col_add_fstr(pinfo->cinfo, COL_INFO, "%s %s",
450 val_to_str(command,names_control_command, "%u"),
451 val_to_str(direction,names_control_direction,"%u"));
455 control_item = proto_tree_add_text(tree, tvb,
456 0, -1, "Control %s: %s",
457 val_to_str(direction, names_control_direction, "%u"),
458 val_to_str(command, names_control_command, "%u"));
460 control_tree = proto_item_add_subtree(control_item,
462 proto_tree_add_uint(control_tree, hf_quake_control_command,
466 rest_length = tvb_reported_length(tvb) - 1;
467 next_tvb = tvb_new_subset(tvb, 1, rest_length , rest_length);
470 dissect_quake_CCREQ_CONNECT
471 (next_tvb, control_tree);
473 case CCREQ_SERVER_INFO:
474 dissect_quake_CCREQ_SERVER_INFO
475 (next_tvb, control_tree);
477 case CCREQ_PLAYER_INFO:
478 dissect_quake_CCREQ_PLAYER_INFO
479 (next_tvb, control_tree);
481 case CCREQ_RULE_INFO:
482 dissect_quake_CCREQ_RULE_INFO
483 (next_tvb, control_tree);
486 dissect_quake_CCREP_ACCEPT
487 (next_tvb, pinfo, control_tree);
490 dissect_quake_CCREP_REJECT
491 (next_tvb, control_tree);
493 case CCREP_SERVER_INFO:
494 dissect_quake_CCREP_SERVER_INFO
495 (next_tvb, control_tree);
497 case CCREP_PLAYER_INFO:
498 dissect_quake_CCREP_PLAYER_INFO
499 (next_tvb, control_tree);
501 case CCREP_RULE_INFO:
502 dissect_quake_CCREP_RULE_INFO
503 (next_tvb, control_tree);
506 call_dissector(data_handle,next_tvb, pinfo, control_tree);
513 dissect_quake(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
515 proto_tree *quake_tree = NULL;
516 proto_item *quake_item = NULL;
519 guint32 sequence = 0;
523 if (check_col(pinfo->cinfo, COL_PROTOCOL))
524 col_set_str(pinfo->cinfo, COL_PROTOCOL, "QUAKE");
525 if (check_col(pinfo->cinfo, COL_INFO))
526 col_clear(pinfo->cinfo, COL_INFO);
528 length = tvb_get_ntohl(tvb, 0);
529 flags = length & (~NETFLAG_LENGTH_MASK);
530 length &= NETFLAG_LENGTH_MASK;
533 quake_item = proto_tree_add_item(tree, proto_quake,
536 quake_tree = proto_item_add_subtree(quake_item, ett_quake);
540 proto_item* flags_item = NULL;
541 proto_tree* flags_tree = NULL;
543 flags_item = proto_tree_add_uint(quake_tree, hf_quake_header_flags,
546 flags_tree = proto_item_add_subtree(flags_item, ett_quake_flags);
550 proto_tree_add_text(flags_tree, tvb, 0, 2,
551 decode_boolean_bitfield(flags, NETFLAG_DATA, 32,
553 proto_tree_add_text(flags_tree, tvb, 0, 2,
554 decode_boolean_bitfield(flags, NETFLAG_ACK, 32,
555 "Acknowledgment","-"));
556 proto_tree_add_text(flags_tree, tvb, 0, 2,
557 decode_boolean_bitfield(flags, NETFLAG_NAK, 32,
558 "No Acknowledgment","-"));
559 proto_tree_add_text(flags_tree, tvb, 0, 2,
560 decode_boolean_bitfield(flags, NETFLAG_EOM, 32,
561 "End Of Message","-"));
562 proto_tree_add_text(flags_tree, tvb, 0, 2,
563 decode_boolean_bitfield(flags, NETFLAG_UNRELIABLE, 32,
565 proto_tree_add_text(flags_tree, tvb, 0, 2,
566 decode_boolean_bitfield(flags, NETFLAG_CTL, 32,
569 proto_tree_add_uint(quake_tree, hf_quake_header_length,
573 if (flags == NETFLAG_CTL) {
574 rest_length = tvb_reported_length(tvb) - 4;
575 next_tvb = tvb_new_subset(tvb, 4, rest_length , rest_length);
576 dissect_quake_control(next_tvb, pinfo, quake_tree);
580 sequence = tvb_get_ntohl(tvb, 4);
581 if (check_col(pinfo->cinfo, COL_INFO)) {
582 col_add_fstr(pinfo->cinfo, COL_INFO, "seq 0x%x", sequence);
585 proto_tree_add_uint(quake_tree, hf_quake_header_sequence,
586 tvb, 4, 4, sequence);
589 rest_length = tvb_reported_length(tvb) - 8;
590 next_tvb = tvb_new_subset(tvb, 8, rest_length , rest_length);
591 call_dissector(data_handle,next_tvb, pinfo, quake_tree);
596 proto_reg_handoff_quake(void)
598 static int Initialized=FALSE;
599 static int ServerPort=0;
602 dissector_delete("udp.port", ServerPort, quake_handle);
607 /* set port for future deletes */
608 ServerPort=gbl_quakeServerPort;
610 dissector_add("udp.port", gbl_quakeServerPort, quake_handle);
611 data_handle = find_dissector("data");
616 proto_register_quake(void)
618 static hf_register_info hf[] = {
619 { &hf_quake_header_flags,
620 { "Flags", "quake.header.flags",
621 FT_UINT16, BASE_HEX, NULL, 0x0,
623 { &hf_quake_header_length,
624 { "Length", "quake.header.length",
625 FT_UINT16, BASE_DEC, NULL, 0x0,
626 "full data length", HFILL }},
627 { &hf_quake_header_sequence,
628 { "Sequence", "quake.header.sequence",
629 FT_UINT32, BASE_HEX, NULL, 0x0,
630 "Sequence Number", HFILL }},
631 { &hf_quake_control_command,
632 { "Command", "quake.control.command",
633 FT_UINT8, BASE_HEX, VALS(names_control_command), 0x0,
634 "Control Command", HFILL }},
635 { &hf_quake_CCREQ_CONNECT_game,
636 { "Game", "quake.control.connect.game",
637 FT_STRING, BASE_DEC, NULL, 0x0,
638 "Game Name", HFILL }},
639 { &hf_quake_CCREQ_CONNECT_version,
640 { "Version", "quake.control.connect.version",
641 FT_UINT8, BASE_DEC, NULL, 0x0,
642 "Game Protocol Version Number", HFILL }},
643 { &hf_quake_CCREQ_SERVER_INFO_game,
644 { "Game", "quake.control.server_info.game",
645 FT_STRING, BASE_DEC, NULL, 0x0,
646 "Game Name", HFILL }},
647 { &hf_quake_CCREQ_SERVER_INFO_version,
648 { "Version", "quake.control.server_info.version",
649 FT_UINT8, BASE_DEC, NULL, 0x0,
650 "Game Protocol Version Number", HFILL }},
651 { &hf_quake_CCREQ_PLAYER_INFO_player,
652 { "Player", "quake.control.player_info.player",
653 FT_UINT8, BASE_DEC, NULL, 0x0,
655 { &hf_quake_CCREQ_RULE_INFO_lastrule,
656 { "Last Rule", "quake.control.rule_info.lastrule",
657 FT_STRING, BASE_DEC, NULL, 0x0,
658 "Last Rule Name", HFILL }},
659 { &hf_quake_CCREP_ACCEPT_port,
660 { "Port", "quake.control.accept.port",
661 FT_UINT32, BASE_DEC, NULL, 0x0,
662 "Game Data Port", HFILL }},
663 { &hf_quake_CCREP_REJECT_reason,
664 { "Reason", "quake.control.reject.reason",
665 FT_STRING, BASE_DEC, NULL, 0x0,
666 "Reject Reason", HFILL }},
667 { &hf_quake_CCREP_SERVER_INFO_address,
668 { "Address", "quake.control.server_info.address",
669 FT_STRING, BASE_DEC, NULL, 0x0,
670 "Server Address", HFILL }},
671 { &hf_quake_CCREP_SERVER_INFO_server,
672 { "Server", "quake.control.server_info.server",
673 FT_STRING, BASE_DEC, NULL, 0x0,
674 "Server Name", HFILL }},
675 { &hf_quake_CCREP_SERVER_INFO_map,
676 { "Map", "quake.control.server_info.map",
677 FT_STRING, BASE_DEC, NULL, 0x0,
678 "Map Name", HFILL }},
679 { &hf_quake_CCREP_SERVER_INFO_num_player,
680 { "Number of Players", "quake.control.server_info.num_player",
681 FT_UINT8, BASE_DEC, NULL, 0x0,
682 "Current Number of Players", HFILL }},
683 { &hf_quake_CCREP_SERVER_INFO_max_player,
684 { "Maximal Number of Players", "quake.control.server_info.max_player",
685 FT_UINT8, BASE_DEC, NULL, 0x0,
686 "Maximal Number of Players", HFILL }},
687 { &hf_quake_CCREP_PLAYER_INFO_name,
688 { "Name", "quake.control.player_info.name",
689 FT_STRING, BASE_DEC, NULL, 0x0,
690 "Player Name", HFILL }},
691 { &hf_quake_CCREP_PLAYER_INFO_colors,
692 { "Colors", "quake.control.player_info.colors",
693 FT_UINT32, BASE_HEX, NULL, 0x0,
694 "Player Colors", HFILL }},
695 { &hf_quake_CCREP_PLAYER_INFO_colors_shirt,
696 { "Shirt", "quake.control.player_info.colors.shirt",
697 FT_UINT8, BASE_DEC, VALS(names_colors), 0x0,
698 "Shirt Color", HFILL }},
699 { &hf_quake_CCREP_PLAYER_INFO_colors_pants,
700 { "Pants", "quake.control.player_info.colors.pants",
701 FT_UINT8, BASE_DEC, VALS(names_colors), 0x0,
702 "Pants Color", HFILL }},
703 { &hf_quake_CCREP_PLAYER_INFO_frags,
704 { "Frags", "quake.control.player_info.frags",
705 FT_UINT32, BASE_DEC, NULL, 0x0,
706 "Player Frags", HFILL }},
707 { &hf_quake_CCREP_PLAYER_INFO_connect_time,
708 { "Connect Time", "quake.control.player_info.connect_time",
709 FT_UINT32, BASE_DEC, NULL, 0x0,
710 "Player Connect Time", HFILL }},
711 { &hf_quake_CCREP_PLAYER_INFO_address,
712 { "Address", "quake.control.player_info.address",
713 FT_STRING, BASE_DEC, NULL, 0x0,
714 "Player Address", HFILL }},
715 { &hf_quake_CCREP_RULE_INFO_rule,
716 { "Rule", "quake.control.rule_info.rule",
717 FT_STRING, BASE_DEC, NULL, 0x0,
718 "Rule Name", HFILL }},
719 { &hf_quake_CCREP_RULE_INFO_value,
720 { "Value", "quake.control.rule_info.value",
721 FT_STRING, BASE_DEC, NULL, 0x0,
722 "Rule Value", HFILL }},
724 static gint *ett[] = {
727 &ett_quake_control_colors,
730 module_t *quake_module;
732 proto_quake = proto_register_protocol("Quake Network Protocol",
734 proto_register_field_array(proto_quake, hf, array_length(hf));
735 proto_register_subtree_array(ett, array_length(ett));
737 quake_handle = create_dissector_handle(dissect_quake, proto_quake);
739 /* Register a configuration option for port */
740 quake_module = prefs_register_protocol(proto_quake,
741 proto_reg_handoff_quake);
742 prefs_register_uint_preference(quake_module, "udp.port",
743 "Quake Server UDP Port",
744 "Set the UDP port for the Quake Server",
745 10, &gbl_quakeServerPort);