VMS Help
TCPIP Services, Programming Interfaces, Sockets API, ioctl()

 *Conan The Librarian (sorry for the slow response - running on an old VAX)

    Controls I/O requests to obtain network information.
    Format
      #include  <ioctl.h>
      int ioctl  ( int s, int request, ... /* arg */ );

  1 - Argument

 s
    Specifies the socket descriptor of the requested network device.
 request
    Specifies the type of ioctl command to be performed on the
    device. The request types are grouped as follows:
    o  Socket operations
    o  File operations
    o  Interface operations
    o  ARP cache operations
    o  Routing table operations
    Refer to <REFERENCE>(app_ioctl_commands) for a complete list of
    IOCTL commands.
 arg
    Specifies arguments for this request. The type of arg is
    dependent on the specific ioctl() request and device to which
    the ioctl call is targeted.

  2 - Description

    The ioctl() function performs a variety of control functions
    on devices. The functions performed are device-specific control
    functions. The request and arg arguments are passed to the file
    designated by fildes and then interpreted by the device driver.
    The basic I/O functions are performed through the read() and
    write() functions.
    Encoded in an ioctl() request is whether the argument is an in
    argument or an out argument, and the size of the arg argument
    in bytes. The macros and definitions used to specify an ioctl()
    request are located in the IOCTL.H header file.

  3 - Return Values

    -1                 Error; errno is set to indicate the error.

  4 - Errors

    EBADF              The fildes argument is not a valid open file
                       descriptor.
    EINTR              A signal was caught during the ioctl()
                       operation.
    If an underlying device driver detects an error, errno might be
    set to one of the following values:
    EINVAL             Either the request or the arg argument is not
                       valid.
    ENOTTY             Reserved for Compaq use. The fildes argument
                       is not associated with a character special
                       device, or the specified request does not
                       apply to the type of object that the fildes
                       argument references.
    ENXIO              The request and arg arguments are valid for
                       this device driver, but the service requested
                       cannot be performed on the particular
                       subdevice.
  Close     HLB-list     TLB-list     Help  

[legal] [privacy] [GNU] [policy] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.