| 256 | } |
| 257 | |
| 258 | void |
| 259 | ioctl_ifcreate(int s, struct ifreq *ifr) |
| 260 | { |
| 261 | if (ioctl(s, SIOCIFCREATE2, ifr) < 0) { |
| 262 | switch (errno) { |
| 263 | case EEXIST: |
| 264 | errx(1, "interface %s already exists", ifr->ifr_name); |
| 265 | default: |
| 266 | err(1, "SIOCIFCREATE2"); |
| 267 | } |
| 268 | } |
| 269 | } |
| 270 | |
| 271 | #define ORDERS_SIZE(x) sizeof(x) / sizeof(x[0]) |
| 272 |
no test coverage detected