Adds a status filter for the routing of asynchronous status.
#include <sys/cdli.h>
#include <sys/ndd.h>
int ns_add_status (nddp, statfilter, len, ns_statuser)
struct ndd * nddp;
caddr_t statfilter;
int len;
struct ns_statuser * ns_statuser;
Item | Description |
---|---|
nddp | Specifies a pointer to the ndd structure to which this add request applies. |
statfilter | Specifies a pointer to the status filter. |
len | Specifies the length, in bytes, of the value of the statfilter parameter. |
ns_statuser | Specifies a pointer to an ns_statuser structure that defines this user. |
The ns_add_status network service registers a status filter. The add request is passed on to the nd_add_status function of the demuxer for the specified network device driver (NDD). This network service enables the user to receive asynchronous status information from the specified device.
The following example illustrates the ns_add_status network service:
struct ns_statuser user;
struct ns_com_status filter;
filter.filtertype = NS_STATUS_MASK;
filter.mask = NDD_HARD_FAIL;
filter.sid = 0;
user.isr = status_fn;
user.isr_data = whatever_makes_sense;
error = ns_add_status(nddp, &filter, sizeof(filter), &user);
Item | Description |
---|---|
0 | Indicates the operation was successful. |
The network demuxer may supply other return values.