Information used when registering with io-net
typedef struct _io_net_registrant {
uint32_t flags;
char *name;
char *top_type;
char *bot_type;
void *func_hdl;
io_net_registrant_funcs_t *funcs;
uint16_t endpoint;
int ndependencies;
} io_net_registrant_t;
The io_net_registrant_t structure contains information that's
used when registering your driver with io-net.
It's a member of the
io_net_self_t
structure.
The members are defined as follows:
- flags
- The type and characteristics of the driver being registered.
The driver should set this to _REG_PRODUCER_UP.
The driver can also optionally set the _REG_ENDPOINT flag.
- _REG_PRODUCER_UP -- a producer in the
up direction.
- _REG_ENDPOINT -- the LAN number was
specified by the lan driver options; see the description of
the endpoint field for more details.
- name
- Points to the name of the driver module. For example,
the devn-smc9000.so driver DLL
would set this to point to the string devn-smc9000.
- top_type
- An Ethernet driver should make this member point
to the string en. However, if a different string
was specified via the uptype driver option, the
driver should use this instead.
- bot_type
- Set this field to NULL.
- func_hdl
- This is a function that will be passed to all of
the driver's entry points. The driver should specify
a pointer that points to its internal data structures
associated with the interface.
- funcs
- Specifies a pointer to the driver's entry point table,
which is of type io_net_registrant_funcs_t, also
defined in <sys/io-net.h>.
- endpoint
- If the driver wants to let io-net automatically
assign an interface (LAN) number to the interface,
the contents of this field are ignored. If the
driver wants to select a LAN number (for example,
if a LAN number was specified via the lan driver
option), the driver should set the _REG_ENDPOINT
flag in the flags field. In this case, the
contents of this field will specify the LAN number,
and io-net will attempt to assign this LAN number
to the interface.
However, the specified LAN number
may already be assigned to another interface. If this is the
case, io-net will assign a different,
available interface number instead. In any case, after a
successful attempt at registration, the endpoint
parameter that was passed to the reg() function
will point to the value of the actual LAN number
that was assigned.
QNX Neutrino
io_net_registrant_funcs_t,
io_net_self_t