[an error occurred while processing this directive]

HP OpenVMS Systems Documentation

Content starts here

HP TCP/IP Services for OpenVMS
Sockets API and System Services Programming


Previous Contents Index

Table A-3 lists options that are set at the IPPROTO_IP level and their Sockets API and system service symbol names.

Table A-3 IP Protocol Options
Sockets API Symbol System Service Symbol Description
IP_ADD_MEMBERSHIP TCPIP$C_IP_ADD_MEMBERSHIP Adds the host to the membership of a multicast group.

A host must become a member of a multicast group before it can receive datagrams sent to the group.

Membership is associated with a single interface; programs running on multihomed hosts may need to join the same group on more than one interface. Up to IP_MAX_MEMBERSHIPS (currently 20) memberships may be added on a single socket.

IP_DROP_MEMBERSHIP TCPIP$C_IP_DROP_MEMBERSHIP Removes the host from the membership of a multicast group.
IP_HDRINCL TCPIP$C_IP_HDRINCL If specified for a raw IP socket, you must build the IP header for all datagrams sent on the raw socket.
IP_MULTICAST_IF TCPIP$C_IP_MULTICAST_IF Specifies the interface for outgoing multicast datagrams sent on this socket. The interface is specified as an in_addr structure.
IP_MULTICAST_LOOP TCPIP$C_IP_MULTICAST_LOOP Disables loopback of local delivery.

If a multicast datagram is sent to a group which the sending host is a member, a copy of the datagram is looped back by the IP layer for local delivery (the default). To disable the loopback delivery, specify a value of 0.

IP_MULTICAST_TTL TCPIP$C_IP_MULTICAST_TTL Specifies the time-to-live (TTL) value for outgoing multicast datagrams.

Takes an integer value between 0 and 255:

Value Action
0 Restricts distribution to applications running on the local host.
1 Forwards the multicast datagram to hosts on the local subnet.
2 - 255 With a multicast router attached to the sending host's network, forwards multicast datagrams beyond the local subnet.

Multicast routers forward the datagram to known networks that have hosts belonging to the specified multicast group. The TTL value is decremented by each multicast router in the path. When the TTL value is decremented to zero, the datagram is no longer forwarded.

IP_OPTIONS TCPIP$C_IP_OPTIONS Provides IP options to be transmitted in the IP header of each outgoing packet.
IP_RECVDSTADDR TCPIP$C_IP_RECVDSTADDR Enables a SOCK_DGRAM socket to receive the destination IP address for a UDP datagram.
IP_RECVOPTS TCPIP$C_IP_RECVOPTS Enables a SOCK_DGRAM socket to receive IP options.
IP_TTL TCPIP$C_IP_TTL Time to live (TTL) for a datagram.
IP_TOS TCPIP$C_IP_TOS Type of service (1-byte value).

Table A-4 describes the socket options supporting IPv6. The IPv6 socket options do not have system service symbols.

Table A-4 IPv6 Socket Options
Sockets API Symbol Description
IPV6_RECVPKTINFO Source and destination IPv6 address, and sending and receiving interface.
IPV6_RECVHOPLIMIT Hop limit.
IPV6_RECVRTHDR Routing header.
IPV6_RECVHOPOPTS Hop-by-hop options.
IPV6_RECVDSTOPTS Destination options.
IPV6_CHECKSUM For raw IPv6 sockets other than ICMPv6 raw sockets, causes the kernel to compute and store checksum for output and to verify the received checksum on input. Discards the packet if the checksum is in error.
IPV6_ICMP6_FILTER Fetches and stores the filter associated with the ICMPv6 raw socket using the getsockopt() function and setsockopt() functions.
IPV6_UNICAST_HOPS Sets the hop limit for all subsequent unicast packets sent on a socket. You can also use this option with the getsockopt() function to determine the current hop limit for a socket.
IPV6_MULTICAST_IF Sets the interface to use for outgoing multicast packets.
IPV6_MULTICAST_HOPS Sets the hop limit for outgoing multicast packets.
IPV6_MULTICAST_LOOP Controls whether to deliver outgoing multicast packets back to the local application.
IPV6_JOIN_GROUP Joins a multicast group on the specified interface.
IPV6_LEAVE_GROUP Leaves a multicast group on the specified interface.


Appendix B
IOCTL Requests

The ioctl() Sockets API function and the IO$_SENSEMODE and IO$_SETMODE function codes used with the $QIO system service perform I/O control functions on a network pseudodevice (BG:).

The following tables list the IOCTL requests supported by TCP/IP Services, their data types, the equivalent $QIO system services, and descriptions of their operations:

  • Table B-1 describes the terminal compatibility options.
  • Table B-2 describes the socket operations.
  • Table B-3 describes the interface operations. These request types are defined in the IF.H header file.
  • Table B-4 describes the routing operations. These request types are defined in the ROUTE.H header file.
  • Table B-5 describes the ARP cache operations. These request types are defined in the IF_ARP.H header file.

Table B-1 Terminal Compatibility Operations
Operation Data Type $QIO Function Code Description
FIONREAD int IO$_SENSEMODE Get number of bytes to read.
FIONBIO int IO$_SETMODE Set/clear non-blocking I/O.
FIOASYNC int IO$_SETMODE Set/clear asynchronous I/O.
FIOSETOWN int IO$_SETMODE Set owner.
FIOGETOWN int IO$_SENSEMODE Get owner.
FIOPIPESTAT int IO$_SENSEMODE Pipe first-in, first out statistics.
FIOFATTACH int IO$_SETMODE Internal: fattach.
FIOFDETACH int IO$_SETMODE Internal: fdetach.

Table B-2 Socket Operations
Operation Data Type $QIO Function Code Description
SIOCSHIWAT int IO$_SETMODE Set high watermark.
SIOCGHIWAT int IO$_SENSEMODE Get high watermark.
SIOCSLOWAT int IO$_SETMODE Set low watermark.
SIOCGLOWAT int IO$_SENSEMODE Get low watermark.
SIOCATMARK int IO$_SENSEMODE Determines whether you are at the out-of-band character mark. The operation returns a nonzero value if the socket's read pointer is currently at the end-of-band mark or a zero value if the read pointer is not at the out-of-band mark. The value is returned in the integer pointed to by the third argument of the ioct() call. For more information, see Section 2.11.2.

Table B-3 Interface Operations
Operation Data Type $QIO Function Code Description
SIOCSIFADDR struct ifreq IO$_SETMODE Sets the interface address from the ifr_addr member. The initialization function for the interface is also called.
SIOCSIFDSTADDR struct ifreq IO$_SETMODE Sets the point-to-point address from the ifr_dstaddr member.
SIOCSIFFLAGS struct ifreq IO$_SETMODE Sets the interface flags from the ifr_flags member.
SIOCGIFFLAGS struct ifreq IO$_SENSEMODE Returns the interface flags in the ifr_flags member. The flags indicate whether the interface is up ( IFF_UP ), is a point-to-point interface ( IFF_POINTOPOINT ), supports broadcasts ( IFF_BROADCAST ), and other flags.
SIOCSIFBRDADDR struct ifreq IO$_SETMODE Sets the broadcast address from the ifr_broadaddr member.
SIOCSIFNETMASK struct ifreq IO$_SETMODE Sets the subnet address mask from the ifr_addr member.
SIOCGIFMETRIC struct ifreq IO$_SENSEMODE Returns the interface routing metric in the ifr_metric member. The interface metric is maintained by the kernel for each interface but is used by the routing software (ROUTED). The interface metric is added to the hop count (to make an interface less favorable).
SIOCSIFMETRIC struct ifreq IO$_SETMODE Sets the interface routing metric from the ifr_metric member.
SIOCDIFADDR struct ifreq IO$_SETMODE Deletes an interface address
SIOCAIFADDR struct ifaliasreq IO$_SETMODE Adds or changes an interface alias.
SIOCPIFADDR struct ifaliasreq IO$_SETMODE Sets the primary interface address.
SIOCADDMULTI struct ifreq IO$_SETMODE Adds a multicast address.
SIOCDELMULTI struct ifreq IO$_SETMODE Deletes a multicast address.
SIOCENABLBACK struct ifreq IO$_SETMODE Enables the loopback interface.
SIOCDISABLBACK struct ifreq IO$_SETMODE Disables the loopback interface.
SIOCSIPMTU struct ifreq IO$_SETMODE Sets the interface IP MTU value.
SIOCRIPMTU struct ifreq IO$_SENSEMODE Returns the interface IP MTU value.
SIOCGIFINDEX struct ifreq IO$_SENSEMODE Returns the IF index value.
SIOCGMEDIAMTU struct ifreq IO$_SENSEMODE Returns the value of the media MTU.
SIOCGIFTYPE struct ifreq IO$_SENSEMODE Returns the interface type.
SIOCGIFADDR struct ifreq IO$_SENSEMODE Returns the interface address.
SIOCGIFDSTADDR struct ifreq IO$_SENSEMODE Returns the point-to-point interface address.
SIOCGIFBRDADDR struct ifreq IO$_SENSEMODE Returns the interface broadcast address.
SIOCGIFCONF struct ifconf IO$_SENSEMODE Returns the interface list.
SIOCGIFNETMASK struct ifreq IO$_SENSEMODE Returns the interface subnet address mask.

Table B-4 Routing Table Operations
Operation Data Type $QIO Function Code Description
SIOCADDRT struct ortentry IO$_SETMODE Adds an entry to the routing table.
SIOCDELRT struct ortentry IO$_SETMODE Deletes an entry from the routing table.

Table B-5 ARP Cache Operations
Operation Data Type $QIO Function Code Description
SIOCSARP struct arpreq IO$_SETMODE Adds a new entry to or modifies an existing entry in the ARP table.
SIOCDARP struct arpreq IO$_SETMODE Deletes an entry from the ARP table.
SIOCGARP struct arpreq IO$_SENSEMODE Returns an ARP table entry.


Previous Next Contents Index