| 219 | } |
| 220 | |
| 221 | static void |
| 222 | usage(void) |
| 223 | { |
| 224 | char options[1024]; |
| 225 | struct option *p; |
| 226 | |
| 227 | /* XXX not right but close enough for now */ |
| 228 | options[0] = '\0'; |
| 229 | for (p = opts; p != NULL; p = p->next) { |
| 230 | strlcat(options, p->opt_usage, sizeof(options)); |
| 231 | strlcat(options, " ", sizeof(options)); |
| 232 | } |
| 233 | |
| 234 | fprintf(stderr, |
| 235 | #ifndef FSTACK |
| 236 | "usage: ifconfig [-f type:format] %sinterface address_family\n" |
| 237 | " [address [dest_address]] [parameters]\n" |
| 238 | " ifconfig interface create\n" |
| 239 | " ifconfig -a %s[-d] [-m] [-u] [-v] [address_family]\n" |
| 240 | " ifconfig -l [-d] [-u] [address_family]\n" |
| 241 | " ifconfig %s[-d] [-m] [-u] [-v]\n", |
| 242 | #else |
| 243 | "usage: ifconfig -p <f-stack proc_id> [-f type:format] %sinterface address_family\n" |
| 244 | " [address [dest_address]] [parameters]\n" |
| 245 | " ifconfig -p <f-stack proc_id> interface create\n" |
| 246 | " ifconfig -p <f-stack proc_id> -a %s[-d] [-m] [-u] [-v] [address_family]\n" |
| 247 | " ifconfig -p <f-stack proc_id> -l [-d] [-u] [address_family]\n" |
| 248 | " ifconfig -p <f-stack proc_id> %s[-d] [-m] [-u] [-v]\n", |
| 249 | #endif |
| 250 | options, options, options); |
| 251 | |
| 252 | #ifdef FSTACK |
| 253 | ff_ipc_exit(); |
| 254 | #endif |
| 255 | exit(1); |
| 256 | } |
| 257 | |
| 258 | void |
| 259 | ioctl_ifcreate(int s, struct ifreq *ifr) |
no test coverage detected