DIGITAL TCP/IP Services for OpenVMS
System Services and C Socket Programming


Previous Contents Index


IO$_SETMODE|IO$M_OUTBAND

The IO$_SETMODE|IO$M_OUTBAND function/modifier combination requests that the asynchronous system trap (AST) for an out-of-band (OOB) character be delivered to the requesting process. This is to be done only when an OOB character is received on the socket and there is no waiting read request. The socket is a TCP/IP (stream) socket.

Arguments

p1


usage ast_procedure
type procedure entry mask
access call without stack unwinding
mechanism by reference

To enable the AST, the p1 argument is the address of the OOB character AST routine. To disable the AST, p1 equals 0.

p2


usage user_arg
type longword (unsigned)
access read only
mechanism by value

AST parameter to be delivered to the AST routine specified by the p1 argument.

p3


usage acmode
type longword (unsigned)
access read only
mechanism by value

Access mode to deliver the AST.

Description

The Enable OOB character AST function allows an Attention AST to be delivered to the requesting process only once. After the AST occurs, the function must explicitly reenable AST delivery before a new AST can be delivered. This function is subject to AST quotas.

Condition Values Returned

SS$_ABORT Programming, INET management, or hardware error. The route entry already exists. You attempted to add a route entry with the IO$_SETMODE function and the operation failed.
SS$_ACCVIO Programming error. You attempted to access an invalid memory location or buffer.
SS$_BADPARAM Programming error. You specified a $QIO function with an invalid parameter that occurred for one of the following reasons:
  1. You attempted to execute an IO$_SETMODE function (all subfunctions, except socket creation) without specifying a device socket. Instead, create a device socket by issuing a $QIO with the IO$_SETMODE function and the proper parameters.
  2. You made an error specifying a socket option.
SS$_DEVACTIVE INET management error. You attempted to change the static INET parameters. If new parameters are needed, shut down the internet, reset the static parameters, and issue the START COMMUNICATION command.
SS$_DEVINACT INET management error. The driver was not started. Issue a START COMMUNICATION command before issuing $QIO functions.
SS$_DEVNOTMOUNT INET management error. You improperly executed the INET startup procedure. The driver was loaded, but the INET_ACP was not activated. Execute the INET startup procedure again.
SS$_DUPLNAM Programming error. You are attempting to bind a port that is already in use. An attempt to bind the socket to an address and port failed.
SS$_EXQUOTA Programming or INET management error that occurred because of one of the following reasons:
  1. You attempted to create a new socket with the IO$_SETMODE function but it failed because the maximum number of sockets was exceeded. Increase the maximum number of sockets (INET parameter).
  2. The number of sockets specified with the IO$_SETMODE (listen) exceeds the maximum number of sockets. Increase the maximum number of sockets (INET parameter) or reduce the listen parameter (the number of sockets that the listener socket can create).
SS$_FILALRACC Programming error. INET address is already in use. An attempt to bind the socket to an address and port failed.
SS$_INSFMEM Programming or system management error: Not enough resources to allocate new socket.
SS$_ILLCNTRFUNC Programming error. Operation is not supported because of one of the following reasons:
  1. You used an invalid IO$_SETMODE (IOCTL) function for the interface. The interface does not have an IOCTL routine.
  2. You attempted to perform an IO$_SETMODE (IOCTL) function that required a socket, but the device did not have one. Create a socket and issue the IOCTL function.
SS$_IVADDR Programming error. The specified INET address is not in the system, and an invalid port number or an invalid INET address combination was specified with an IO$_SETMODE function (a bind) for one of the following reasons:
  1. An attempt to bind the address failed because the INET address is not in the system, port zero and INET address zero are not allowed, or port zero is not allowed when using an IO$_ACCESS or IO$_WRITEVBLK function.
  2. An attempt to make a permanent entry in an ARP table that was full failed.
  3. An attempt was made to bind an IP socket (raw IP) when there are no interfaces defined in the system.
  4. An attempt was made to bind an IP socket (raw IP) to a null INET address.
SS$_IVBUFLEN Programming error. The socket option buffer has an invalid size.
SS$_NOLICENSE Programming or system management error. Product license not present.
SS$_NOOPER Programming or INET management error. An attempt was made to execute an I/O function that needs the OPER privilege.
SS$_NOPRIV Programming or INET management error. Not enough privileges for the attempted operation for one of the following reasons:
  1. Broadcasting an IP datagram was denied because the process does not have a system UIC, SYSPRV, BYPASS, or OPER privileges.
  2. An attempt was made to use a reserved port number lower than 1024.
  3. An operation accesses only processes that have a system UIC, SYSPRV, or BYPASS privilege.
  4. Raw IP protocol can be used only on privileged sockets. The process must have a SYSPRV or BYPASS privilege.
SS$_NOSUCHDEV Programming error or INET management error. An INET address is not in the ARP table. An attempt to show or delete an ARP table entry failed.
SS$_NOSUCHNODE Programming or INET management error. An attempt to delete a route from the routing table failed because a route entry was not found.
SS$_PROTOCOL Programming error due to one of the following reasons:
  1. The protocol type specified at socket creation is not valid.
  2. The protocol is not supported.
  3. The protocol type specified is not found in the internal tables and therefore is an invalid type.
  4. The address family is not supported for one of the following reasons:
    • The address family specified with an IO$_SETMODE function (IOCTL subfunction) is not supported. The address family should be the TCPIP$C_AF_INET or TCPIP$C_UNSPEC address family.
    • The address family of the remote INET address specified with an IO$_ACCESS or IO$_WRITEVBLK function is not supported (UDP/IP or TCP/IP). The address family should be the TCPIP$C_AF_INET address family.
    • The address family of the local INET address specified with an IO$_SETMODE (bind) function is not supported. The address family should be the TCPIP$C_AF_INET address family.
    • The address family of the INET address specified in a request to the routing module is not supported. The address family should be the TCPIP$C_AF_INET address family.
SS$_SHUT The network is being shut down.

IO$_SETMODE|IO$M_READATTN

The IO$_SETMODE|IO$M_READATTN function/modifier combination requests that an Attention AST be delivered to the requesting process when a data packet is received on the socket and there is no waiting read request.

Arguments

p1


usage procedure entry mask
type call without stack unwinding
access by reference

To enable the AST, the p1 argument is the address of the Read Attention AST routine. To disable the AST, set p1 to 0.

p2


usage user_arg
type longword (unsigned)
access read only
mechanism by value

AST parameter to be delivered to the AST routine.

p3


usage acmode
type longword (unsigned)
access read only
mechanism by value

Access mode to deliver the AST.

Description

The Enable Read Attention AST function enables an Attention AST to be delivered to the requesting process once only. After the AST occurs, the function must explicitly re-enable AST delivery before the AST can occur again. The function is subject to AST quotas.

Consider the following when using IO$M_READATTN:

If the TCPIP$C_OOBINLINE option is set, then a waiting READ $QIO is completed and the OOB character is returned in the data stream.


Condition Values Returned

SS$_ABORT Programming, INET management, or hardware error. The route entry already exists, so your attempt to add a route entry using the IO$_SETMODE function failed.
SS$_ACCVIO Programming error. You attempted to access an invalid memory location or buffer.
SS$_BADPARAM Programming error. The parameter you specified for a $QIO function was invalid for one of the following reasons:
  1. You attempted to execute the IO$_SETMODE subfunctions without specifying a device socket. Instead, create a device socket by issuing a $QIO with the IO$_SETMODE function and the proper parameters.
  2. You made an error specifying a socket option.
SS$_DEVACTIVE INET management error. You attempted to change the static INET parameters. If you need new parameters, shut down the internet, reset the static parameters, and issue the START COMMUNICATION command.
SS$_DEVINACT INET management error. The driver was not started. Issue a START COMMUNICATION command before issuing $QIO functions.
SS$_DEVNOTMOUNT INET management error. You improperly executed the startup procedure. The driver was loaded, but the INET_ACP was not activated. Execute the INET startup procedure again.
SS$_DUPLNAM Programming error. You attempted to bind a port already in use so the operation to bind the socket to the address and port failed.
SS$_EXQUOTA Programming or INET management error. The quota for the valid number of sockets caused an error for one of the following reasons:
  1. You attempted to exceed the maximum number of sockets by creating new socket with the IO$_SETMODE function. Increase the maximum number of allowable sockets (INET parameter) before creating more sockets.
  2. You specified a number of sockets with the IO$_SETMODE function that exceeds the maximum number of sockets allowed. Increase the maximum number of sockets (INET parameter) or reduce the number of sockets that the listener socket can create (listen parameter).
SS$_FILALRACC Programming error. You attempted to bind the socket to an address that is already in use and the operation failed.
SS$_INSFMEM Programming or system management error. Your system does not have enough resources to allocate new socket.
SS$_ILLCNTRFUNC Programming error. Operation is not supported.
  1. Invalid IO$_SETMODE (IOCTL) function was used for the interface. The interface does not have an IOCTL routine.
  2. An attempt was made to perform an IO$_SETMODE (IOCTL) function that required a socket, but the device did not have one. Create a socket and issue the IOCTL function.
SS$_IVADDR Programming error. The specified INET address is not in the system, and an invalid port number or an invalid INET address combination was specified with an IO$_SETMODE function (a bind).
  1. An attempt to bind the address failed because the INET address is not in the system, port zero and INET address zero are not allowed, or port zero is not allowed when using an IO$_ACCESS or IO$_WRITEVBLK function.
  2. An attempt to make a permanent entry in the ARP table failed because of lack of space. Too many permanent entries.
  3. An attempt was made to bind an IP socket (raw IP) when there are no interfaces defined in the system.
  4. An attempt was made to bind an IP socket (raw IP) to a null INET address.
SS$_IVBUFLEN Programming error. The socket option buffer has an invalid size.
SS$_NOLICENSE Programming or system management error. Product license not present.
SS$_NOOPER Programming or INET management error. An attempt was made to execute an I/O function that needs the OPER privilege.
SS$_NOPRIV Programming or INET management error. Not enough privileges for the attempted operation.
  1. Broadcasting an IP datagram was denied because the process does not have a system UIC, SYSPRV, BYPASS, or OPER privileges.
  2. An attempt was made to use a reserved port number lower than 1024.
  3. An operation accesses only processes that have a system UIC, SYSPRV, or BYPASS privilege.
  4. Raw IP protocol can be used only on privileged sockets. The process must have a SYSPRV or BYPASS privilege.
SS$_NOSUCHDEV Programming error or INET management error. An INET address is not in the ARP table. An attempt to show or delete an ARP table entry failed.
SS$_NOSUCHNODE Programming error or INET management error. An attempt to delete a route from the routing table failed because a route entry was not found.
SS$_PROTOCOL Programming error.
  1. The protocol type specified at socket creation is not valid.
  2. The protocol is not supported.
  3. The protocol type specified is not found in the internal tables. It is an invalid type.
  4. The address family is not supported:
    • The address family specified with an IO$_SETMODE function (IOCTL subfunction) is not supported. The address family should be the TCPIP$C_AF_INET or TCPIP$C_UNSPEC address family.
    • The address family of the remote INET address specified with an IO$_ACCESS or IO$_WRITEVBLK function is not supported (UDP/IP or TCP/IP). The address family should be the TCPIP$C_AF_INET address family.
    • The address family of the local INET address specified with an IO$_SETMODE (bind) function is not supported. The address family should be the TCPIP$C_AF_INET address family.
    • The address family of the INET address that is specified in a request to the routing module is not supported. The address family should be the TCPIP$C_AF_INET address family.
SS$_SHUT The network is being shut down.

IO$_SETMODE|IO$M_WRTATTN

The IO$_SETMODE|IO$M_WRTATTN function/modifier combination (IO$M_WRTATTN is Enable Write Attention AST (asynchronous system trap)) requests that an Attention AST be delivered to the requesting process when a data packet can be queued to the socket. For TCP sockets, this occurs when the TCP transmit queue is available.

Arguments

p1


usage procedure entry mask
type call without stack unwinding
access by reference

To enable the AST, the p1 argument is the address of the Write Attention AST routine. To disable the AST, p1 is set to 0.

p2


usage user_arg
type longword (unsigned)
access read only
mechanism by value

AST parameter to be delivered to the AST routine.

p3


usage acmode
type longword (unsigned)
access read only
mechanism by value

Access mode to deliver the AST.

Description

The Enable Write Attention AST function enables an Attention AST to be delivered to the requesting process only once. After the AST occurs, the function must explicitly re-enable AST delivery before the AST can occur again. The function is subject to AST quotas.

There is a one-to-one correspondence between the number of times you enable an Attention AST and the number of times the AST is delivered. For example, for each enable AST, one AST is delivered. If you enable an Attention AST several times, several ASTs are delivered for one event when the event occurs.

You can use the management command SHOW DEVICE_SOCKET to display information on the socket's characteristics, options, and state.


Condition Values Returned

SS$_ABORT Programming error, INET management error, or hardware error. The route you specified with the IO$_SETMODE function already exists. Therefore, the operation failed.
SS$_ACCVIO Programming error. You attempted to access an invalid memory location or buffer.
SS$_BADPARAM Programming error. The parameter you specified for the $QIO I/O function was invalid for one of the following reasons:
  1. You attempted to execute the IO$_SETMODE functions without specifying a device socket. Instead, create a device socket by issuing a $QIO with the IO$_SETMODE function and the proper parameters.
  2. You made an error when specifying a socket option.
SS$_DEVACTIVE INET management error. You attempted to change the static INET parameters. If you need new parameters, shut down the internet, reset the static parameters, and issue the START COMMUNICATION command.
SS$_DEVINACT INET management error. The driver is not started. Issue a START COMMUNICATION command before issuing $QIO functions.
SS$_DEVNOTMOUNT INET management error. The INET startup procedure was improperly executed. The driver was loaded, but the INET_ACP was not activated. Execute the INET startup procedure again.
SS$_DUPLNAM Programming error. Port that is being bound is already in use. An attempt to bind the socket to an address and port failed.
SS$_EXQUOTA Programming or INET management error.
  1. You attempted to create a new socket with the IO$_SETMODE function and it failed because the maximum number of sockets was exceeded. Increase the maximum number of sockets (INET parameter) and then create a new socket.
  2. The number of sockets you specified with the IO$_SETMODE function exceeds the allowable maximum number of sockets. Increase the maximum number of sockets (INET parameter) or reduce the number of sockets that the listener socket can create (listen parameter).
SS$_FILALRACC Programming error. Because the INET address is already in use, your attempt to bind the socket to an address and port failed.
SS$_INSFMEM Programming or system management error. There are not enough resources to allocate new socket.
SS$_ILLCNTRFUNC Programming error. You specified an operation that is unsupported for one of the following reasons:
  1. You used an invalid IO$_SETMODE function for the interface. The interface does not have an IOCTL routine.
  2. You attempted to execute an IO$_SETMODE function that required a socket, but the device did not have one. Instead, create a socket and issue the function.
SS$_IVADDR Programming error. You specified an invalid port number and INET address combination with the IO$_SETMODE bind function. This caused the operation to fail for one of the following reasons:
  1. You specified an illegal combination of port zero and INET address zero.
  2. You specified port zero when using an IO$_ACCESS or IO$_WRITEVBLK function.
  3. When you attempted to make a permanent entry in the ARP table, the operation failed because of lack of space. There are too many permanent entries.
  4. You attempted to bind a raw IP socket when there were no interfaces defined in the system.
  5. You attempted to bind a raw IP socket to a null INET address.
SS$_IVBUFLEN Programming error. You specified an invalid size for the socket option buffer.
SS$_NOLICENSE Programming or system management error. There is no DIGITAL TCP/IP Services for OpenVMS license present.
SS$_NOOPER Programming or INET management error. You attempted to execute an I/O function that needs the OPER privilege.
SS$_NOPRIV Programming or INET management error. You attempted to execute an operation that failed for one of the following reasons:
  1. You cannot broadcast an IP datagram for a process if you do not have system UIC, SYSPRV, BYPASS, or OPER privileges.
  2. You attempted to use a reserved port number lower than 1024.
  3. You attempted to access a process when you do not have system UIC, SYSPRV, or BYPASS privileges.
  4. You attempted to use raw IP on a socket that is not a privileged sockets. To do this, the process must have SYSPRV or BYPASS privilege.
SS$_NOSUCHDEV Programming error or INET management error. You attempted to show or delete an entry in the ARP table. However, because the INET address was not in the ARP table, the operation failed.
SS$_NOSUCHNODE Programming error or INET management error. You attempted to delete a route from the routing information table (RIT). However, because the route was not found in the RIT, the operation failed.
SS$_PROTOCOL Programming error.
  1. You specified an invalid protocol type when you created the socket.
  2. You specified an unsupported protocol.
  3. You specified a protocol type that is invalid because it is not found in the internal tables.
  4. You specified an address family that is not supported for one of the following reasons:
    • You specified an address family with an IO$_SETMODE subfunction. Instead, specify the TCPIP$C_AF_INET or TCPIP$C_UNSPEC address family.
    • You specified an address family of the remote INET address for a datagram or stream socket with an IO$_ACCESS or IO$_WRITEVBLK function. Instead, specify the TCPIP$C_AF_INET address family.
    • You specified an address family of the local INET address with an IO$_SETMODE bind function. Instead, specify the TCPIP$C_AF_INET address family.
    • You made a request to the routing module by specifying the address family of the INET address. Instead, specify the TCPIP$C_AF_INET address family.
SS$_SHUT The network is being shut down.


Previous Next Contents Index