| 187 | } |
| 188 | |
| 189 | static void |
| 190 | vlan_set(int s, struct ifreq *ifr) |
| 191 | { |
| 192 | if (params.vlr_tag != NOTAG && params.vlr_parent[0] != '\0') { |
| 193 | ifr->ifr_data = (caddr_t) ¶ms; |
| 194 | #ifndef FSTACK |
| 195 | if (ioctl(s, SIOCSETVLAN, (caddr_t)ifr) == -1) |
| 196 | #else |
| 197 | size_t offset = (char *)&(ifr->ifr_data) - (char *)ifr; |
| 198 | size_t clen = sizeof(params); |
| 199 | if (ioctl_va(s, SIOCSETVLAN, ifr, 3, offset, ifr->ifr_data, clen) == -1) |
| 200 | #endif |
| 201 | err(1, "SIOCSETVLAN"); |
| 202 | } |
| 203 | } |
| 204 | |
| 205 | static |
| 206 | DECL_CMD_FUNC(setvlantag, val, d) |