Lines Matching refs:bpdu

76 void br_send_config_bpdu(struct net_bridge_port *p, struct br_config_bpdu *bpdu)  in br_send_config_bpdu()  argument
87 buf[7] = (bpdu->topology_change ? 0x01 : 0) | in br_send_config_bpdu()
88 (bpdu->topology_change_ack ? 0x80 : 0); in br_send_config_bpdu()
89 buf[8] = bpdu->root.prio[0]; in br_send_config_bpdu()
90 buf[9] = bpdu->root.prio[1]; in br_send_config_bpdu()
91 buf[10] = bpdu->root.addr[0]; in br_send_config_bpdu()
92 buf[11] = bpdu->root.addr[1]; in br_send_config_bpdu()
93 buf[12] = bpdu->root.addr[2]; in br_send_config_bpdu()
94 buf[13] = bpdu->root.addr[3]; in br_send_config_bpdu()
95 buf[14] = bpdu->root.addr[4]; in br_send_config_bpdu()
96 buf[15] = bpdu->root.addr[5]; in br_send_config_bpdu()
97 buf[16] = (bpdu->root_path_cost >> 24) & 0xFF; in br_send_config_bpdu()
98 buf[17] = (bpdu->root_path_cost >> 16) & 0xFF; in br_send_config_bpdu()
99 buf[18] = (bpdu->root_path_cost >> 8) & 0xFF; in br_send_config_bpdu()
100 buf[19] = bpdu->root_path_cost & 0xFF; in br_send_config_bpdu()
101 buf[20] = bpdu->bridge_id.prio[0]; in br_send_config_bpdu()
102 buf[21] = bpdu->bridge_id.prio[1]; in br_send_config_bpdu()
103 buf[22] = bpdu->bridge_id.addr[0]; in br_send_config_bpdu()
104 buf[23] = bpdu->bridge_id.addr[1]; in br_send_config_bpdu()
105 buf[24] = bpdu->bridge_id.addr[2]; in br_send_config_bpdu()
106 buf[25] = bpdu->bridge_id.addr[3]; in br_send_config_bpdu()
107 buf[26] = bpdu->bridge_id.addr[4]; in br_send_config_bpdu()
108 buf[27] = bpdu->bridge_id.addr[5]; in br_send_config_bpdu()
109 buf[28] = (bpdu->port_id >> 8) & 0xFF; in br_send_config_bpdu()
110 buf[29] = bpdu->port_id & 0xFF; in br_send_config_bpdu()
112 br_set_ticks(buf+30, bpdu->message_age); in br_send_config_bpdu()
113 br_set_ticks(buf+32, bpdu->max_age); in br_send_config_bpdu()
114 br_set_ticks(buf+34, bpdu->hello_time); in br_send_config_bpdu()
115 br_set_ticks(buf+36, bpdu->forward_delay); in br_send_config_bpdu()
152 struct br_config_bpdu bpdu; in br_stp_handle_bpdu() local
158 bpdu.topology_change = (buf[1] & 0x01) ? 1 : 0; in br_stp_handle_bpdu()
159 bpdu.topology_change_ack = (buf[1] & 0x80) ? 1 : 0; in br_stp_handle_bpdu()
161 bpdu.root.prio[0] = buf[2]; in br_stp_handle_bpdu()
162 bpdu.root.prio[1] = buf[3]; in br_stp_handle_bpdu()
163 bpdu.root.addr[0] = buf[4]; in br_stp_handle_bpdu()
164 bpdu.root.addr[1] = buf[5]; in br_stp_handle_bpdu()
165 bpdu.root.addr[2] = buf[6]; in br_stp_handle_bpdu()
166 bpdu.root.addr[3] = buf[7]; in br_stp_handle_bpdu()
167 bpdu.root.addr[4] = buf[8]; in br_stp_handle_bpdu()
168 bpdu.root.addr[5] = buf[9]; in br_stp_handle_bpdu()
169 bpdu.root_path_cost = in br_stp_handle_bpdu()
174 bpdu.bridge_id.prio[0] = buf[14]; in br_stp_handle_bpdu()
175 bpdu.bridge_id.prio[1] = buf[15]; in br_stp_handle_bpdu()
176 bpdu.bridge_id.addr[0] = buf[16]; in br_stp_handle_bpdu()
177 bpdu.bridge_id.addr[1] = buf[17]; in br_stp_handle_bpdu()
178 bpdu.bridge_id.addr[2] = buf[18]; in br_stp_handle_bpdu()
179 bpdu.bridge_id.addr[3] = buf[19]; in br_stp_handle_bpdu()
180 bpdu.bridge_id.addr[4] = buf[20]; in br_stp_handle_bpdu()
181 bpdu.bridge_id.addr[5] = buf[21]; in br_stp_handle_bpdu()
182 bpdu.port_id = (buf[22] << 8) | buf[23]; in br_stp_handle_bpdu()
184 bpdu.message_age = br_get_ticks(buf+24); in br_stp_handle_bpdu()
185 bpdu.max_age = br_get_ticks(buf+26); in br_stp_handle_bpdu()
186 bpdu.hello_time = br_get_ticks(buf+28); in br_stp_handle_bpdu()
187 bpdu.forward_delay = br_get_ticks(buf+30); in br_stp_handle_bpdu()
189 br_received_config_bpdu(p, &bpdu); in br_stp_handle_bpdu()