add_netisr Kernel Service

Purpose

Adds a network software interrupt service to the Network Interrupt table.

Syntax

#include <sys/types.h> #include <sys/errno.h> #include <net/netisr.h> int add_netisr ( soft_intr_level, service_level, isr) u_short soft_intr_level; u_short service_level; int (*isr) ();

Parameters

Item Description
soft_intr_level Specifies the software interrupt level to add. This parameter must be greater than or equal to 0 and less than NETISR_MAX. Refer to netisr.h for the range of values of soft_intr_level that are already in use. Also, other kernel extensions that are not AIX® and that use network ISRs currently running on the system can make use of additional values not mentioned in netisr.h.
service_level Specifies the processing level of the network software interrupt.
isr Specifies the interrupt service routine to add.

Description

The add_netisr kernel service adds the software-interrupt level specified by the soft_intr_level parameter to the Network Software Interrupt table.

The processing level of a network software interrupt is specified by the service_level parameter. If the interrupt level specified by the service_level parameter equals NET_KPROC, a network interrupt scheduler calls the function specified by the isr parameter. If you set the service_level parameter to NET_OFF_LEVEL, the schednetisr service calls the interrupt service routine directly.

Execution Environment

The add_netisr kernel service can be called from either the process or interrupt environment.

Return Values

Item Description
0 Indicates that the interrupt service routine was successfully added.
EEXIST Indicates that the interrupt service routine was previously added to the table.
EINVAL Indicates that the value specified for the soft_intr_level parameter is out of range or at a service level that is not valid.