Displaying 2 results from an estimated 2 matches for "bpdu_body".
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->bpdu_body.flags.agreement...
2007 Apr 18
0
[Bridge] STP Explanation
...bpdu_header;
typedef struct
{
bpdu_flag flags;
unsigned char root_id[8];
unsigned char root_path_cost[4];
unsigned char bridge_id[8];
unsigned char port_id[2];
unsigned char message_age[2];
unsigned char max_age[2];
unsigned char hello_time[2];
unsigned char forward_delay[2];
} bpdu_body;
typedef struct
{
bpdu_header hdr;
bpdu_body body;
unsigned char ver_1_len[2];// ?
}bpdu;
--------------------------------------------------------------------------------------------------------------------------
but i'm perplex with this following function in br_stp_bpdu.c :
--------...