from kirby files

ppp/bpdu update


svn path=/trunk/; revision=17367
This commit is contained in:
Ronnie Sahlberg 2006-02-22 08:39:06 +00:00
parent 2c6f269568
commit 5ddde8e4fe
3 changed files with 32 additions and 1 deletions

View File

@ -2577,6 +2577,7 @@ John Sullivan <john [AT] kanargh.force9.co.uk>
Martin André <andre [AT] clarinet.u-strasbg.fr>
Andrei Emeltchenko <Andrei.Emeltchenko [AT] nokia.com>
Marc Petit-Huguenin <marc [AT] petit-huguenin.org>
Kirby Files <kfiles [AT] masergy.com>
Alain Magloire <alainm[AT]rcsm.ece.mcgill.ca> was kind enough to
give his permission to use his version of snprintf.c.

View File

@ -822,7 +822,6 @@ proto_reg_handoff_bpdu(void)
bpdu_handle = find_dissector("bpdu");
dissector_add("llc.dsap", SAP_BPDU, bpdu_handle);
dissector_add("ppp.protocol", PPP_BPDU, bpdu_handle);
dissector_add("chdlctype", CHDLCTYPE_BPDU, bpdu_handle);
dissector_add("llc.cisco_pid", 0x010b, bpdu_handle);
}

View File

@ -86,6 +86,8 @@ static gint ett_osicp = -1;
static gint ett_osicp_options = -1;
static gint ett_osicp_align_npdu_opt = -1;
static int proto_bcp = -1;
static int proto_ccp = -1;
static gint ett_ccp = -1;
@ -186,6 +188,8 @@ static gint ett_ipv6cp_compress_opt = -1;
static dissector_table_t ppp_subdissector_table;
static dissector_handle_t chdlc_handle;
static dissector_handle_t data_handle;
static dissector_handle_t eth_withfcs_handle;
/* options */
static gint ppp_fcs_decode = 0; /* 0 = No FCS, 1 = 16 bit FCS, 2 = 32 bit FCS */
@ -2819,6 +2823,17 @@ dissect_ipcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
ipcp_opts, N_IPCP_OPTS, pinfo, tree);
}
/*
* RFC 3518
*/
static void
dissect_bcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
tvbuff_t *next_tvb;
next_tvb = tvb_new_subset(tvb, 2, -1, -1);
call_dissector(eth_withfcs_handle, next_tvb, pinfo, tree);
}
/*
* RFC 1377.
*/
@ -3902,6 +3917,12 @@ proto_reg_handoff_ipcp(void)
}
void
proto_register_bcp(void)
{
proto_bcp = proto_register_protocol("PPP Bridge Control Protocol", "PPP BCP", "bcp");
}
void
proto_register_osicp(void)
{
@ -3916,6 +3937,16 @@ proto_register_osicp(void)
proto_register_subtree_array(ett, array_length(ett));
}
void
proto_reg_handoff_bcp(void)
{
dissector_handle_t bcp_handle;
eth_withfcs_handle = find_dissector("eth_withfcs");
bcp_handle = create_dissector_handle(dissect_bcp, proto_bcp);
dissector_add("ppp.protocol", PPP_BPDU, bcp_handle);
}
void
proto_reg_handoff_osicp(void)
{