Lines Matching refs:req

128 	struct ifbreq req;
130 strlcpy(req.ifbr_ifsname, ifs, sizeof(req.ifbr_ifsname));
132 if (do_cmd(sock, BRDGGIFFLGS, &req, sizeof(req), 0) < 0)
136 req.ifbr_ifsflags |= flag;
138 req.ifbr_ifsflags &= ~flag;
140 if (do_cmd(sock, BRDGSIFFLGS, &req, sizeof(req), 1) < 0)
148 struct ifbreq *req;
170 if ((bifc.ifbic_len + sizeof(*req)) < len)
175 for (i = 0; i < bifc.ifbic_len / sizeof(*req); i++) {
176 req = bifc.ifbic_req + i;
177 printf("%s%s ", prefix, req->ifbr_ifsname);
178 printb("flags", req->ifbr_ifsflags, IFBIFBITS);
182 printf("ifmaxaddr %u", req->ifbr_addrmax);
183 printf(" port %u priority %u", req->ifbr_portno,
184 req->ifbr_priority);
185 printf(" path cost %u", req->ifbr_path_cost);
187 if (req->ifbr_ifsflags & IFBIF_STP) {
188 if (req->ifbr_proto <
190 printf(" proto %s", stpproto[req->ifbr_proto]);
193 req->ifbr_proto);
196 if (req->ifbr_role <
198 printf("role %s", stproles[req->ifbr_role]);
201 req->ifbr_role);
202 if (req->ifbr_state <
204 printf(" state %s", stpstates[req->ifbr_state]);
207 req->ifbr_state);
296 struct ifbreq req;
298 memset(&req, 0, sizeof(req));
299 strlcpy(req.ifbr_ifsname, val, sizeof(req.ifbr_ifsname));
300 if (do_cmd(s, BRDGADD, &req, sizeof(req), 1) < 0)
307 struct ifbreq req;
309 memset(&req, 0, sizeof(req));
310 strlcpy(req.ifbr_ifsname, val, sizeof(req.ifbr_ifsname));
311 if (do_cmd(s, BRDGDEL, &req, sizeof(req), 1) < 0)
360 struct ifbreq req;
362 memset(&req, 0, sizeof(req));
363 strlcpy(req.ifbr_ifsname, val, sizeof(req.ifbr_ifsname));
364 if (do_cmd(s, BRDGADDS, &req, sizeof(req), 1) < 0)
371 struct ifbreq req;
373 memset(&req, 0, sizeof(req));
374 strlcpy(req.ifbr_ifsname, val, sizeof(req.ifbr_ifsname));
375 if (do_cmd(s, BRDGDELS, &req, sizeof(req), 1) < 0)
444 struct ifbreq req;
446 memset(&req, 0, sizeof(req));
447 req.ifbr_ifsflags = IFBF_FLUSHDYN;
448 if (do_cmd(s, BRDGFLUSH, &req, sizeof(req), 1) < 0)
455 struct ifbreq req;
457 memset(&req, 0, sizeof(req));
458 req.ifbr_ifsflags = IFBF_FLUSHALL;
459 if (do_cmd(s, BRDGFLUSH, &req, sizeof(req), 1) < 0)
467 struct ifbareq req;
470 memset(&req, 0, sizeof(req));
471 strlcpy(req.ifba_ifsname, val, sizeof(req.ifba_ifsname));
477 memcpy(req.ifba_dst, ea->octet, sizeof(req.ifba_dst));
478 req.ifba_flags = IFBAF_STATIC;
479 req.ifba_vlan = 1; /* XXX allow user to specify */
481 if (do_cmd(s, BRDGSADDR, &req, sizeof(req), 1) < 0)
488 struct ifbareq req;
491 memset(&req, 0, sizeof(req));
497 memcpy(req.ifba_dst, ea->octet, sizeof(req.ifba_dst));
499 if (do_cmd(s, BRDGDADDR, &req, sizeof(req), 1) < 0)
621 struct ifbreq req;
624 memset(&req, 0, sizeof(req));
629 strlcpy(req.ifbr_ifsname, ifn, sizeof(req.ifbr_ifsname));
630 req.ifbr_priority = val & 0xff;
632 if (do_cmd(s, BRDGSIFPRIO, &req, sizeof(req), 1) < 0)
640 struct ifbreq req;
643 memset(&req, 0, sizeof(req));
648 strlcpy(req.ifbr_ifsname, ifn, sizeof(req.ifbr_ifsname));
649 req.ifbr_path_cost = val;
651 if (do_cmd(s, BRDGSIFCOST, &req, sizeof(req), 1) < 0)
659 struct ifbreq req;
662 memset(&req, 0, sizeof(req));
667 strlcpy(req.ifbr_ifsname, ifn, sizeof(req.ifbr_ifsname));
668 req.ifbr_addrmax = val & 0xffffffff;
670 if (do_cmd(s, BRDGSIFAMAX, &req, sizeof(req), 1) < 0)