When a transport driver is being initialized, the prerouter is
notified of the TD's arrival. The prerouter performs the following
functions:
- 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.
- 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.
- 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.
- 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.
- Closes the socket.
The prerouter is now initialized for the transport driver.