| 155 | } |
| 156 | |
| 157 | static void |
| 158 | vlan_create(int s, struct ifreq *ifr) |
| 159 | { |
| 160 | vlan_parse_ethervid(ifr->ifr_name); |
| 161 | |
| 162 | if (params.vlr_tag != NOTAG || params.vlr_parent[0] != '\0') { |
| 163 | /* |
| 164 | * One or both parameters were specified, make sure both. |
| 165 | */ |
| 166 | if (params.vlr_tag == NOTAG) |
| 167 | errx(1, "must specify a tag for vlan create"); |
| 168 | if (params.vlr_parent[0] == '\0') |
| 169 | errx(1, "must specify a parent device for vlan create"); |
| 170 | ifr->ifr_data = (caddr_t) ¶ms; |
| 171 | #ifdef FSTACK |
| 172 | size_t offset = (char *)&(ifr->ifr_data) - (char *)ifr; |
| 173 | size_t clen = sizeof(params); |
| 174 | if (ioctl_va(s, SIOCIFCREATE2, ifr, 3, offset, ifr->ifr_data, clen) < 0) |
| 175 | err(1, "SIOCIFCREATE2"); |
| 176 | return; |
| 177 | #endif |
| 178 | } |
| 179 | ioctl_ifcreate(s, ifr); |
| 180 | } |
| 181 | |
| 182 | static void |
| 183 | vlan_cb(int s, void *arg) |
nothing calls this directly
no test coverage detected