| 237 | } |
| 238 | |
| 239 | static void |
| 240 | bridge_status(int s) |
| 241 | { |
| 242 | struct ifbropreq ifbp; |
| 243 | struct ifbrparam param; |
| 244 | u_int16_t pri; |
| 245 | u_int8_t ht, fd, ma, hc, pro; |
| 246 | u_int8_t lladdr[ETHER_ADDR_LEN]; |
| 247 | u_int16_t bprio; |
| 248 | u_int32_t csize, ctime; |
| 249 | |
| 250 | if (do_cmd(s, BRDGGCACHE, ¶m, sizeof(param), 0) < 0) |
| 251 | return; |
| 252 | csize = param.ifbrp_csize; |
| 253 | if (do_cmd(s, BRDGGTO, ¶m, sizeof(param), 0) < 0) |
| 254 | return; |
| 255 | ctime = param.ifbrp_ctime; |
| 256 | if (do_cmd(s, BRDGPARAM, &ifbp, sizeof(ifbp), 0) < 0) |
| 257 | return; |
| 258 | pri = ifbp.ifbop_priority; |
| 259 | pro = ifbp.ifbop_protocol; |
| 260 | ht = ifbp.ifbop_hellotime; |
| 261 | fd = ifbp.ifbop_fwddelay; |
| 262 | hc = ifbp.ifbop_holdcount; |
| 263 | ma = ifbp.ifbop_maxage; |
| 264 | |
| 265 | PV2ID(ifbp.ifbop_bridgeid, bprio, lladdr); |
| 266 | printf("\tid %s priority %u hellotime %u fwddelay %u\n", |
| 267 | ether_ntoa((struct ether_addr *)lladdr), pri, ht, fd); |
| 268 | printf("\tmaxage %u holdcnt %u proto %s maxaddr %u timeout %u\n", |
| 269 | ma, hc, stpproto[pro], csize, ctime); |
| 270 | |
| 271 | PV2ID(ifbp.ifbop_designated_root, bprio, lladdr); |
| 272 | printf("\troot id %s priority %d ifcost %u port %u\n", |
| 273 | ether_ntoa((struct ether_addr *)lladdr), bprio, |
| 274 | ifbp.ifbop_root_path_cost, ifbp.ifbop_root_port & 0xfff); |
| 275 | |
| 276 | bridge_interfaces(s, "\tmember: "); |
| 277 | |
| 278 | return; |
| 279 | |
| 280 | } |
| 281 | |
| 282 | static void |
| 283 | setbridge_add(const char *val, int d, int s, const struct afswtch *afp) |
nothing calls this directly
no test coverage detected