diff options
author | Guy Harris <guy@alum.mit.edu> | 2009-05-05 22:35:19 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2009-05-05 22:35:19 +0000 |
commit | efafedd3e0460daf252a496f918fe1385db24c6f (patch) | |
tree | 624286e669463f313ad8ee0d1462a6595c5465e5 /epan/dissectors/packet-iana-oui.c | |
parent | 88714b76591a68a5b5b274ca4c453139ff82b2e8 (diff) | |
download | wireshark-efafedd3e0460daf252a496f918fe1385db24c6f.tar.gz |
Add support for the IANA's OUI, and recognize NHRP-over-SNAP.
An NHRP extension offset of 0 is not an error - it means there are no
extensions.
Start using the address family number to determine the type of
link-layer addresses in NHRP. Don't fetch IPv4 addresses and add them
to the tree - just use proto_tree_add_item().
svn path=/trunk/; revision=28286
Diffstat (limited to 'epan/dissectors/packet-iana-oui.c')
-rw-r--r-- | epan/dissectors/packet-iana-oui.c | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/epan/dissectors/packet-iana-oui.c b/epan/dissectors/packet-iana-oui.c new file mode 100644 index 0000000000..14a71e05a0 --- /dev/null +++ b/epan/dissectors/packet-iana-oui.c @@ -0,0 +1,61 @@ +/* packet-iana-oui.c + * Register an LLC dissector table for the IANA's OUI 00:00:5e + * + * $Id$ + * + * Wireshark - Network traffic analyzer + * By Gerald Combs <gerald@wireshark.org> + * Copyright 1998 Gerald Combs + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ + +#include "config.h" + +#include <epan/packet.h> +#include "packet-llc.h" +#include <epan/oui.h> +#include <epan/iana_snap_pid.h> + +static int hf_llc_iana_pid = -1; + +static const value_string iana_pid_vals[] = { + { IANA_PID_MARS_DATA_SHORT, "MARS Data Messages (short form)" }, + { IANA_PID_NHRP_RESERVED, "Reserved for future NHRP use" }, + { IANA_PID_MARS_NHRP_CONTROL, "MARS/NHRP Control Messages" }, + { IANA_PID_MARS_DATA_LONG, "MARS Data Messages (long form)" }, + { IANA_PID_SCSP, "SCSP" }, + { IANA_PID_VRID, "VRID" }, + { IANA_PID_L2TP, "L2TP" }, + { IANA_PID_VPN_ID, "VPN ID" }, + { IANA_PID_MSDP_GRE_PROTO_TYPE, "MSDP-GRE-Protocol Type" }, + { 0, NULL } +}; + +/* + * NOTE: there's no dissector here, just registration routines to set + * up the dissector table for the IANA OUI. + */ +void +proto_register_iana_oui(void) +{ + static hf_register_info hf = { + &hf_llc_iana_pid, + { "PID", "llc.iana_pid", FT_UINT16, BASE_HEX, + VALS(iana_pid_vals), 0x0, "", HFILL }, + }; + + llc_add_oui(OUI_IANA, "llc.iana_pid", "IANA OUI PID", &hf); +} |