Searched refs:bpdu (Results 1 - 4 of 4) sorted by relevance

/linux-4.1.27/net/bridge/
H A Dbr_stp_bpdu.c77 void br_send_config_bpdu(struct net_bridge_port *p, struct br_config_bpdu *bpdu) br_send_config_bpdu() argument
88 buf[4] = (bpdu->topology_change ? 0x01 : 0) | br_send_config_bpdu()
89 (bpdu->topology_change_ack ? 0x80 : 0); br_send_config_bpdu()
90 buf[5] = bpdu->root.prio[0]; br_send_config_bpdu()
91 buf[6] = bpdu->root.prio[1]; br_send_config_bpdu()
92 buf[7] = bpdu->root.addr[0]; br_send_config_bpdu()
93 buf[8] = bpdu->root.addr[1]; br_send_config_bpdu()
94 buf[9] = bpdu->root.addr[2]; br_send_config_bpdu()
95 buf[10] = bpdu->root.addr[3]; br_send_config_bpdu()
96 buf[11] = bpdu->root.addr[4]; br_send_config_bpdu()
97 buf[12] = bpdu->root.addr[5]; br_send_config_bpdu()
98 buf[13] = (bpdu->root_path_cost >> 24) & 0xFF; br_send_config_bpdu()
99 buf[14] = (bpdu->root_path_cost >> 16) & 0xFF; br_send_config_bpdu()
100 buf[15] = (bpdu->root_path_cost >> 8) & 0xFF; br_send_config_bpdu()
101 buf[16] = bpdu->root_path_cost & 0xFF; br_send_config_bpdu()
102 buf[17] = bpdu->bridge_id.prio[0]; br_send_config_bpdu()
103 buf[18] = bpdu->bridge_id.prio[1]; br_send_config_bpdu()
104 buf[19] = bpdu->bridge_id.addr[0]; br_send_config_bpdu()
105 buf[20] = bpdu->bridge_id.addr[1]; br_send_config_bpdu()
106 buf[21] = bpdu->bridge_id.addr[2]; br_send_config_bpdu()
107 buf[22] = bpdu->bridge_id.addr[3]; br_send_config_bpdu()
108 buf[23] = bpdu->bridge_id.addr[4]; br_send_config_bpdu()
109 buf[24] = bpdu->bridge_id.addr[5]; br_send_config_bpdu()
110 buf[25] = (bpdu->port_id >> 8) & 0xFF; br_send_config_bpdu()
111 buf[26] = bpdu->port_id & 0xFF; br_send_config_bpdu()
113 br_set_ticks(buf+27, bpdu->message_age); br_send_config_bpdu()
114 br_set_ticks(buf+29, bpdu->max_age); br_send_config_bpdu()
115 br_set_ticks(buf+31, bpdu->hello_time); br_send_config_bpdu()
116 br_set_ticks(buf+33, bpdu->forward_delay); br_send_config_bpdu()
186 struct br_config_bpdu bpdu; br_stp_rcv() local
192 bpdu.topology_change = (buf[1] & 0x01) ? 1 : 0; br_stp_rcv()
193 bpdu.topology_change_ack = (buf[1] & 0x80) ? 1 : 0; br_stp_rcv()
195 bpdu.root.prio[0] = buf[2]; br_stp_rcv()
196 bpdu.root.prio[1] = buf[3]; br_stp_rcv()
197 bpdu.root.addr[0] = buf[4]; br_stp_rcv()
198 bpdu.root.addr[1] = buf[5]; br_stp_rcv()
199 bpdu.root.addr[2] = buf[6]; br_stp_rcv()
200 bpdu.root.addr[3] = buf[7]; br_stp_rcv()
201 bpdu.root.addr[4] = buf[8]; br_stp_rcv()
202 bpdu.root.addr[5] = buf[9]; br_stp_rcv()
203 bpdu.root_path_cost = br_stp_rcv()
208 bpdu.bridge_id.prio[0] = buf[14]; br_stp_rcv()
209 bpdu.bridge_id.prio[1] = buf[15]; br_stp_rcv()
210 bpdu.bridge_id.addr[0] = buf[16]; br_stp_rcv()
211 bpdu.bridge_id.addr[1] = buf[17]; br_stp_rcv()
212 bpdu.bridge_id.addr[2] = buf[18]; br_stp_rcv()
213 bpdu.bridge_id.addr[3] = buf[19]; br_stp_rcv()
214 bpdu.bridge_id.addr[4] = buf[20]; br_stp_rcv()
215 bpdu.bridge_id.addr[5] = buf[21]; br_stp_rcv()
216 bpdu.port_id = (buf[22] << 8) | buf[23]; br_stp_rcv()
218 bpdu.message_age = br_get_ticks(buf+24); br_stp_rcv()
219 bpdu.max_age = br_get_ticks(buf+26); br_stp_rcv()
220 bpdu.hello_time = br_get_ticks(buf+28); br_stp_rcv()
221 bpdu.forward_delay = br_get_ticks(buf+30); br_stp_rcv()
223 if (bpdu.message_age > bpdu.max_age) { br_stp_rcv()
230 bpdu.message_age, bpdu.max_age); br_stp_rcv()
234 br_received_config_bpdu(p, &bpdu); br_stp_rcv()
H A Dbr_stp.c20 /* since time values in bpdu are in jiffies and then scaled (1/256)
176 struct br_config_bpdu bpdu; br_transmit_config() local
186 bpdu.topology_change = br->topology_change; br_transmit_config()
187 bpdu.topology_change_ack = p->topology_change_ack; br_transmit_config()
188 bpdu.root = br->designated_root; br_transmit_config()
189 bpdu.root_path_cost = br->root_path_cost; br_transmit_config()
190 bpdu.bridge_id = br->bridge_id; br_transmit_config()
191 bpdu.port_id = p->port_id; br_transmit_config()
193 bpdu.message_age = 0; br_transmit_config()
197 bpdu.message_age = (jiffies - root->designated_age) br_transmit_config()
200 bpdu.max_age = br->max_age; br_transmit_config()
201 bpdu.hello_time = br->hello_time; br_transmit_config()
202 bpdu.forward_delay = br->forward_delay; br_transmit_config()
204 if (bpdu.message_age < br->max_age) { br_transmit_config()
205 br_send_config_bpdu(p, &bpdu); br_transmit_config()
215 const struct br_config_bpdu *bpdu) br_record_config_information()
217 p->designated_root = bpdu->root; br_record_config_information()
218 p->designated_cost = bpdu->root_path_cost; br_record_config_information()
219 p->designated_bridge = bpdu->bridge_id; br_record_config_information()
220 p->designated_port = bpdu->port_id; br_record_config_information()
221 p->designated_age = jiffies - bpdu->message_age; br_record_config_information()
224 + (bpdu->max_age - bpdu->message_age)); br_record_config_information()
229 const struct br_config_bpdu *bpdu) br_record_config_timeout_values()
231 br->max_age = bpdu->max_age; br_record_config_timeout_values()
232 br->hello_time = bpdu->hello_time; br_record_config_timeout_values()
233 br->forward_delay = bpdu->forward_delay; br_record_config_timeout_values()
234 br->topology_change = bpdu->topology_change; br_record_config_timeout_values()
295 const struct br_config_bpdu *bpdu) br_supersedes_port_info()
299 t = memcmp(&bpdu->root, &p->designated_root, 8); br_supersedes_port_info()
305 if (bpdu->root_path_cost < p->designated_cost) br_supersedes_port_info()
307 else if (bpdu->root_path_cost > p->designated_cost) br_supersedes_port_info()
310 t = memcmp(&bpdu->bridge_id, &p->designated_bridge, 8); br_supersedes_port_info()
316 if (memcmp(&bpdu->bridge_id, &p->br->bridge_id, 8)) br_supersedes_port_info()
319 if (bpdu->port_id <= p->designated_port) br_supersedes_port_info()
341 isroot ? "propagating" : "sending tcn bpdu"); br_topology_change_detection()
480 const struct br_config_bpdu *bpdu) br_received_config_bpdu()
488 if (br_supersedes_port_info(p, bpdu)) { br_received_config_bpdu()
489 br_record_config_information(p, bpdu); br_received_config_bpdu()
505 br_record_config_timeout_values(br, bpdu); br_received_config_bpdu()
507 if (bpdu->topology_change_ack) br_received_config_bpdu()
519 br_info(p->br, "port %u(%s) received tcn bpdu\n", br_received_tcn_bpdu()
214 br_record_config_information(struct net_bridge_port *p, const struct br_config_bpdu *bpdu) br_record_config_information() argument
228 br_record_config_timeout_values(struct net_bridge *br, const struct br_config_bpdu *bpdu) br_record_config_timeout_values() argument
294 br_supersedes_port_info(const struct net_bridge_port *p, const struct br_config_bpdu *bpdu) br_supersedes_port_info() argument
479 br_received_config_bpdu(struct net_bridge_port *p, const struct br_config_bpdu *bpdu) br_received_config_bpdu() argument
H A Dbr_private_stp.h59 const struct br_config_bpdu *bpdu);
/linux-4.1.27/include/uapi/linux/
H A Dif_link.h248 IFLA_BRPORT_GUARD, /* bpdu guard */

Completed in 194 milliseconds