Adds a demuxer for the specified type of network interface.
Item | Description |
---|---|
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. |
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.
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);
Item | Description |
---|---|
0 | Indicates the operation was successful. |
EEXIST | Indicates a demuxer already exists for the given type. |