Displaying 2 results from an estimated 2 matches for "bpdu_type_config".
2007 Apr 18
0
[Bridge] STP Explanation
...--------------------------------------------------------------------------------------------------------
void br_send_config_bpdu(struct net_bridge_port *p, struct bpdu *bpdu)
{
unsigned char buf[38];
buf[0] = 0x42;
buf[1] = 0x42;
buf[2] = 0x03;
buf[3] = 0;
buf[4] = 0;
buf[5] = 0;
buf[6] = BPDU_TYPE_CONFIG;
buf[7] = (bpdu->topology_change ? 0x01 : 0) |
(bpdu->topology_change_ack ? 0x80 : 0);
buf[8] = bpdu->root.prio[0];
buf[9] = bpdu->root.prio[1];
buf[10] = bpdu->root.addr[0];
buf[11] = bpdu->root.addr[1];
buf[12] = bpdu->root.addr[2];
buf[13] = bpdu->root.addr[3];...
2007 Apr 18
1
[Bridge] STP Explanation (2)
...------------------------------------------
void br_send_config_bpdu(struct net_bridge_port *p, struct bpdu *bpdu)
{
unsigned char buf[42];
buf[0] = bpdu->bpdu_header.protocol[0]; //0x00
buf[1] = bpdu->bpdu_header.protocol[1]; //0x00
buf[2] = bpdu->bpdu_header.version; //0x02
buf[3] = BPDU_TYPE_CONFIG;
buf[4] = bpdu->bpdu_body.flags.topo_change;
buf[5] = bpdu->bpdu_body.flags.proposal;
buf[6] = bpdu->bpdu_body.flags.port_role[0];
buf[7] = bpdu->bpdu_body.flags.port_role[1];
buf[8] = bpdu->bpdu_body.flags.learning;
buf[9] = bpdu->bpdu_body.flags.forwarding;
buf[10] = bpdu...