z/OS UNIX System Services File System Interface Reference
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


Initializing an AF_INET (IPv4) transport driver

z/OS UNIX System Services File System Interface Reference
SA23-2285-00

When a transport driver is being initialized, the prerouter is notified of the TD's arrival. The prerouter performs the following functions:
  1. Opens a socket from the kernel address space. This is not the master socket, but a regular user socket that is initiated through the z/OS UNIX socket interface.
  2. Issues the SIOCGIFCONF ioctl to the TP.
    • If the TP recognizes that the SIOCGIFCONF was sent by the z/OS® UNIX prerouter (the prerouter puts 'USS4' in the first four bytes of the buffer), the TP returns the ioctl with Iocn_NetConfLength set to -1 (to indicate that no home interface information is being returned). The prerouter will receive information about the IPv4 home interfaces maintained by the file system in the next step.
    • Otherwise, the TP returns the list of home IPv4 interfaces via the ioctl. The prerouter adds the home IP addresses to the home interface table.
  3. Issues the SIOCGRTTABLE ioctl. This gets the file system IPv4 home, host, and network routing information in a table format. The mapping for this request is found in ioctl.h.
    • The TP places the home IP address in the Iocn_ipaddrRtMsgHomeIf field for each route to be returned.
    • The TP identifies home routes by setting the Iocn_bRtAttrLocal and Iocn_bRtAttrHost bits on.
    • When the TP sets the Iocn_bRtAttrLocal and Iocn_bRtAttrHost bits on in any route, it also sets the Iocn_bRtAttrRtUp bit on if the interface is active, or off if it is inactive.
  4. Places the routes from the SIOCGRTTABLE in the home, host, and network routing tables managed by the prerouter. Note that the TP can give metrics in hop counts or millisecond delays by setting the appropriate flag in the header of the SIOCGRTTABLE structure. All metrics are converted to hop counts.
  5. Closes the socket.
The prerouter is now initialized for the transport driver.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014