/* * Copyright (c) 1995, 1996 * The Regents of the University of California. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that: (1) source code distributions * retain the above copyright notice and this paragraph in its entirety, (2) * distributions including binary code include the above copyright notice and * this paragraph in its entirety in the documentation or other materials * provided with the distribution, and (3) all advertising materials mentioning * features or use of this software display the following acknowledgement: * ``This product includes software developed by the University of California, * Lawrence Berkeley Laboratory and its contributors.'' Neither the name of * the University nor the names of its contributors may be used to endorse * or promote products derived from this software without specific prior * written permission. * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. */ #define NETDISSECT_REWORKED #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include "interface.h" #include "addrtoname.h" #include "extract.h" #include "ip.h" #define PIMV1_TYPE_QUERY 0 #define PIMV1_TYPE_REGISTER 1 #define PIMV1_TYPE_REGISTER_STOP 2 #define PIMV1_TYPE_JOIN_PRUNE 3 #define PIMV1_TYPE_RP_REACHABILITY 4 #define PIMV1_TYPE_ASSERT 5 #define PIMV1_TYPE_GRAFT 6 #define PIMV1_TYPE_GRAFT_ACK 7 static const struct tok pimv1_type_str[] = { { PIMV1_TYPE_QUERY, "Query" }, { PIMV1_TYPE_REGISTER, "Register" }, { PIMV1_TYPE_REGISTER_STOP, "Register-Stop" }, { PIMV1_TYPE_JOIN_PRUNE, "Join/Prune" }, { PIMV1_TYPE_RP_REACHABILITY, "RP-reachable" }, { PIMV1_TYPE_ASSERT, "Assert" }, { PIMV1_TYPE_GRAFT, "Graft" }, { PIMV1_TYPE_GRAFT_ACK, "Graft-ACK" }, { 0, NULL } }; #define PIMV2_TYPE_HELLO 0 #define PIMV2_TYPE_REGISTER 1 #define PIMV2_TYPE_REGISTER_STOP 2 #define PIMV2_TYPE_JOIN_PRUNE 3 #define PIMV2_TYPE_BOOTSTRAP 4 #define PIMV2_TYPE_ASSERT 5 #define PIMV2_TYPE_GRAFT 6 #define PIMV2_TYPE_GRAFT_ACK 7 #define PIMV2_TYPE_CANDIDATE_RP 8 #define PIMV2_TYPE_PRUNE_REFRESH 9 #define PIMV2_TYPE_DF_ELECTION 10 #define PIMV2_TYPE_ECMP_REDIRECT 11 static const struct tok pimv2_type_values[] = { { PIMV2_TYPE_HELLO, "Hello" }, { PIMV2_TYPE_REGISTER, "Register" }, { PIMV2_TYPE_REGISTER_STOP, "Register Stop" }, { PIMV2_TYPE_JOIN_PRUNE, "Join / Prune" }, { PIMV2_TYPE_BOOTSTRAP, "Bootstrap" }, { PIMV2_TYPE_ASSERT, "Assert" }, { PIMV2_TYPE_GRAFT, "Graft" }, { PIMV2_TYPE_GRAFT_ACK, "Graft Acknowledgement" }, { PIMV2_TYPE_CANDIDATE_RP, "Candidate RP Advertisement" }, { PIMV2_TYPE_PRUNE_REFRESH, "Prune Refresh" }, { PIMV2_TYPE_DF_ELECTION, "DF Election" }, { PIMV2_TYPE_ECMP_REDIRECT, "ECMP Redirect" }, { 0, NULL} }; #define PIMV2_HELLO_OPTION_HOLDTIME 1 #define PIMV2_HELLO_OPTION_LANPRUNEDELAY 2 #define PIMV2_HELLO_OPTION_DR_PRIORITY_OLD 18 #define PIMV2_HELLO_OPTION_DR_PRIORITY 19 #define PIMV2_HELLO_OPTION_GENID 20 #define PIMV2_HELLO_OPTION_REFRESH_CAP 21 #define PIMV2_HELLO_OPTION_BIDIR_CAP 22 #define PIMV2_HELLO_OPTION_ADDRESS_LIST 24 #define PIMV2_HELLO_OPTION_ADDRESS_LIST_OLD 65001 static const struct tok pimv2_hello_option_values[] = { { PIMV2_HELLO_OPTION_HOLDTIME, "Hold Time" }, { PIMV2_HELLO_OPTION_LANPRUNEDELAY, "LAN Prune Delay" }, { PIMV2_HELLO_OPTION_DR_PRIORITY_OLD, "DR Priority (Old)" }, { PIMV2_HELLO_OPTION_DR_PRIORITY, "DR Priority" }, { PIMV2_HELLO_OPTION_GENID, "Generation ID" }, { PIMV2_HELLO_OPTION_REFRESH_CAP, "State Refresh Capability" },