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

ns_add_demux Network Kernel Service

Purpose

Adds a demuxer for the specified type of network interface.

Syntax

#include <sys/ndd.h> 
#include <sys/cdli.h>
int ns_add_demux (ndd_type, demux)
       u_long ndd_type;
       struct ns_demuxer *demux;

Parameters

ndd_type Specifies the interface type of the demuxer to be added.
demux Specifies the pointer to an ns_demux structure that defines the demuxer.

Description

The ns_add_demux network service adds the specified demuxer to the list of available network demuxers. Only one demuxer per network interface type can exist. An interface type describes a certain class of network devices that have the same characteristics (such as ethernet or token ring). The values of the ndd_type parameter listed in the /usr/include/sys/ndd.h file are the numbers defined by Simple Network Management Protocol (SNMP). If the desired type is not in the ndd.h file, the SNMP value should be used if it is defined. Otherwise, any undefined type above NDD_MAX_TYPE may be used.

Note: The ns_demuxer structure must be allocated and pinned by the network demuxer.

Examples

The following example illustrates the ns_add_demux network service:

struct ns_demuxer demuxer;
bzero (&demuxer, sizeof (demuxer));
demuxer.nd_add_filter = eth_add_filter;
demuxer.nd_del_filter = eth_del_filter;
demuxer.nd_add_status = eth_add_status;
demuxer.nd_del_status = eth_del_status;
demuxer.nd_receive = eth_receive;
demuxer.nd_status = eth_status;
demuxer.nd_response = eth_response;
demuxer.nd_use_nsdnx = 1;
ns_add_demux(NDD_ISO88023, &demuxer);

Return Values

0 Indicates the operation was successful.
EEXIST Indicates a demuxer already exists for the given type.

Related Information

The ns_del_demux network service.


[ Previous | Next | Contents | Home | Search ]