2 * Routines for dissection of packets from the Axent Raptor firewall/
3 * Symantec Enterprise Firewall
7 * Wireshark - Network traffic analyzer
8 * By Gerald Combs <gerald@wireshark.org>
10 * This program is free software; you can redistribute it and/or
11 * modify it under the terms of the GNU General Public License
12 * as published by the Free Software Foundation; either version 2
13 * of the License, or (at your option) any later version.
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
20 * You should have received a copy of the GNU General Public License
21 * along with this program; if not, write to the Free Software
22 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
31 #include <epan/packet.h>
33 #include <epan/etypes.h>
35 static dissector_table_t ethertype_dissector_table;
37 /* protocols and header fields */
38 static int proto_symantec = -1;
39 static int hf_symantec_if = -1;
40 static int hf_symantec_etype = -1;
42 static gint ett_symantec = -1;
45 dissect_symantec(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
48 proto_tree *symantec_tree = NULL;
53 * The first 4 bytes are the IPv4 address of the interface that
54 * captured the data, followed by 2 bytes of 0, then an Ethernet
55 * type, followed by 36 bytes of 0.
57 if (check_col(pinfo->cinfo, COL_PROTOCOL))
58 col_add_str(pinfo->cinfo, COL_PROTOCOL, "Symantec");
59 if (check_col(pinfo->cinfo, COL_INFO))
60 col_add_fstr(pinfo->cinfo, COL_INFO, "Symantec Enterprise Firewall");
62 ti = proto_tree_add_protocol_format(tree, proto_symantec, tvb,
63 0, 44, "Symantec firewall");
64 symantec_tree = proto_item_add_subtree(ti, ett_symantec);
66 etype = tvb_get_ntohs(tvb, 6);
68 proto_tree_add_item(symantec_tree, hf_symantec_if, tvb,
70 proto_tree_add_uint(symantec_tree, hf_symantec_etype, tvb,
73 next_tvb = tvb_new_subset(tvb, 44, -1, -1);
74 dissector_try_port(ethertype_dissector_table, etype, next_tvb, pinfo,
79 proto_register_symantec(void)
81 static hf_register_info hf[] = {
83 { "Interface", "symantec.if", FT_IPv4, BASE_NONE, NULL, 0x0,
84 "Interface", HFILL }},
86 { "Type", "symantec.type", FT_UINT16, BASE_HEX, VALS(etype_vals), 0x0,
89 static gint *ett[] = {
93 proto_symantec = proto_register_protocol("Symantec Enterprise Firewall",
94 "Symantec", "symantec");
95 proto_register_field_array(proto_symantec, hf, array_length(hf));
96 proto_register_subtree_array(ett, array_length(ett));
100 proto_reg_handoff_symantec(void)
102 dissector_handle_t symantec_handle;
104 ethertype_dissector_table = find_dissector_table("ethertype");
106 symantec_handle = create_dissector_handle(dissect_symantec,
108 dissector_add("wtap_encap", WTAP_ENCAP_SYMANTEC, symantec_handle);