* this function is a POSIX compliant version, which shall perform a variety of * control functions on devices. * * @param fildes the file description * @param cmd the specified command * @param ... represents the additional information that is needed by this * specific device to perform the requested function. * * @return 0 on successful completion. Otherwise, -1 shall be returned and errn
| 677 | * set to indicate the error. |
| 678 | */ |
| 679 | int ioctl(int fildes, int cmd, ...) |
| 680 | { |
| 681 | void *arg; |
| 682 | va_list ap; |
| 683 | |
| 684 | va_start(ap, cmd); |
| 685 | arg = va_arg(ap, void *); |
| 686 | va_end(ap); |
| 687 | |
| 688 | /* we use fcntl for this API. */ |
| 689 | return fcntl(fildes, cmd, arg); |
| 690 | } |
| 691 | RTM_EXPORT(ioctl); |
| 692 | |
| 693 | /** |