Lines Matching refs:req

130 	struct ifbreq req;
132 strlcpy(req.ifbr_ifsname, ifs, sizeof(req.ifbr_ifsname));
134 if (do_cmd(sock, BRDGGIFFLGS, &req, sizeof(req), 0) < 0)
138 req.ifbr_ifsflags |= flag;
140 req.ifbr_ifsflags &= ~flag;
142 if (do_cmd(sock, BRDGSIFFLGS, &req, sizeof(req), 1) < 0)
150 struct ifbreq *req;
172 if ((bifc.ifbic_len + sizeof(*req)) < len)
177 for (i = 0; i < bifc.ifbic_len / sizeof(*req); i++) {
178 req = bifc.ifbic_req + i;
179 printf("%s%s ", prefix, req->ifbr_ifsname);
180 printb("flags", req->ifbr_ifsflags, IFBIFBITS);
184 printf("ifmaxaddr %u", req->ifbr_addrmax);
185 printf(" port %u priority %u", req->ifbr_portno,
186 req->ifbr_priority);
187 printf(" path cost %u", req->ifbr_path_cost);
189 if (req->ifbr_ifsflags & IFBIF_STP) {
190 if (req->ifbr_proto < nitems(stpproto))
191 printf(" proto %s", stpproto[req->ifbr_proto]);
194 req->ifbr_proto);
197 if (req->ifbr_role < nitems(stproles))
198 printf("role %s", stproles[req->ifbr_role]);
201 req->ifbr_role);
202 if (req->ifbr_state < nitems(stpstates))
203 printf(" state %s", stpstates[req->ifbr_state]);
206 req->ifbr_state);
295 struct ifbreq req;
297 memset(&req, 0, sizeof(req));
298 strlcpy(req.ifbr_ifsname, val, sizeof(req.ifbr_ifsname));
299 if (do_cmd(s, BRDGADD, &req, sizeof(req), 1) < 0)
306 struct ifbreq req;
308 memset(&req, 0, sizeof(req));
309 strlcpy(req.ifbr_ifsname, val, sizeof(req.ifbr_ifsname));
310 if (do_cmd(s, BRDGDEL, &req, sizeof(req), 1) < 0)
359 struct ifbreq req;
361 memset(&req, 0, sizeof(req));
362 strlcpy(req.ifbr_ifsname, val, sizeof(req.ifbr_ifsname));
363 if (do_cmd(s, BRDGADDS, &req, sizeof(req), 1) < 0)
370 struct ifbreq req;
372 memset(&req, 0, sizeof(req));
373 strlcpy(req.ifbr_ifsname, val, sizeof(req.ifbr_ifsname));
374 if (do_cmd(s, BRDGDELS, &req, sizeof(req), 1) < 0)
443 struct ifbreq req;
445 memset(&req, 0, sizeof(req));
446 req.ifbr_ifsflags = IFBF_FLUSHDYN;
447 if (do_cmd(s, BRDGFLUSH, &req, sizeof(req), 1) < 0)
454 struct ifbreq req;
456 memset(&req, 0, sizeof(req));
457 req.ifbr_ifsflags = IFBF_FLUSHALL;
458 if (do_cmd(s, BRDGFLUSH, &req, sizeof(req), 1) < 0)
466 struct ifbareq req;
469 memset(&req, 0, sizeof(req));
470 strlcpy(req.ifba_ifsname, val, sizeof(req.ifba_ifsname));
476 memcpy(req.ifba_dst, ea->octet, sizeof(req.ifba_dst));
477 req.ifba_flags = IFBAF_STATIC;
478 req.ifba_vlan = 1; /* XXX allow user to specify */
480 if (do_cmd(s, BRDGSADDR, &req, sizeof(req), 1) < 0)
487 struct ifbareq req;
490 memset(&req, 0, sizeof(req));
496 memcpy(req.ifba_dst, ea->octet, sizeof(req.ifba_dst));
498 if (do_cmd(s, BRDGDADDR, &req, sizeof(req), 1) < 0)
620 struct ifbreq req;
623 memset(&req, 0, sizeof(req));
628 strlcpy(req.ifbr_ifsname, ifn, sizeof(req.ifbr_ifsname));
629 req.ifbr_priority = val & 0xff;
631 if (do_cmd(s, BRDGSIFPRIO, &req, sizeof(req), 1) < 0)
639 struct ifbreq req;
642 memset(&req, 0, sizeof(req));
647 strlcpy(req.ifbr_ifsname, ifn, sizeof(req.ifbr_ifsname));
648 req.ifbr_path_cost = val;
650 if (do_cmd(s, BRDGSIFCOST, &req, sizeof(req), 1) < 0)
658 struct ifbreq req;
661 memset(&req, 0, sizeof(req));
666 strlcpy(req.ifbr_ifsname, ifn, sizeof(req.ifbr_ifsname));
667 req.ifbr_addrmax = val & 0xffffffff;
669 if (do_cmd(s, BRDGSIFAMAX, &req, sizeof(req), 1) < 0)