Opens a communications I/O device handler.
#include <sys/types.h> #include <sys/errno.h> #include <aixif/net_if.h> #include <sys/comio.h>
int net_attach (kopen_ext, device_req, netid, netfpp) struct kopen_ext *kopen_ext; struct device_req *device_req; struct netid_list *netid; struct file **netfpp;
The net_attach kernel service opens the device handler specified by the device_req parameter and then starts all the network IDs listed in the address specified by the netid parameter. The net_attach service then sleeps and waits for the asynchronous start completion notifications from the net_start_done kernel service.
The net_attach kernel service can be called from the process environment only.
Upon success, a value of 0 is returned and a file pointer is stored in the address specified by the netfpp parameter. Upon failure, the net_attach service returns either the error codes received from the fp_opendev or fp_ioctl kernel service, or the value ETIMEDOUT. The latter value is returned when an open operation times out.
The net_attach kernel service is part of Base Operating System (BOS) Runtime.
The net_detach kernel service, net_start kernel service, net_start_done kernel service.
Network Kernel Services in AIX Kernel Extensions and Device Support Programming Concepts.