[ Previous | Next | Contents | Home | Search ]
AIX Version 4.3 Kernel and Subsystems Technical Reference, Volume 1

net_attach Kernel Service

Purpose

Opens a communications I/O device handler.

Syntax

#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;

Parameters

kopen_ext Specifies the device handler kernel open extension.
device_req Indicates the address of the device description structure.
netid Indicates the address of the network ID list.
netfpp Specifies the address of the variable that will hold the returned file pointer.

Description

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.

Execution Environment

The net_attach kernel service can be called from the process environment only.

Return Values

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.

Implementation Specifics

The net_attach kernel service is part of Base Operating System (BOS) Runtime.

Related Information

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.


[ Previous | Next | Contents | Home | Search ]