[Previous] [Contents] [Index] [Next]

io_net_registrant_t

Information used when registering with io-net

Synopsis:

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;
    int       ndependencies;
} io_net_registrant_t;

Description:

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 type is one of the following:

You can also OR in any combination of the following:

You can use _REG_TYPE_MASK to mask out these additional flags from the module type.

name
A pointer to the full ASCII name of the driver, for example, devn-speedo.so.
top_type
A pointer to the ASCII name of the top type binding, for example, en. See the types listed below.
bot_type
A pointer to the ASCII name of the bottom type binding, for example, ip. See the types listed below.
func_hdl
A handle that you define that's passed to your functions when they get called. It's a convenient way of binding a data structure to this particular registration instance (because your module can register multiple times as different things).
funcs
A pointer to a function table. See io_net_registrant_funcs_t.
ndependencies
The number of elements in the io_net_dependency_t table that's assumed to implicitly follow the io_net_registrant_t table.

The types (for top_type and bot_type) include:

en
Ethernet.
ip
TCP/IP.
ppp
Point-to-point protocol.
qnet
QNX native networking.

This structure is assumed to be followed by a variable number of io_net_dependency_t elements, as specified by the ndependencies member:

typedef struct _io_net_dependency {
    char      *dep;
    uint32_t  flags;
} io_net_dependency_t;

The members of this structure include:

dep
The name of a shared object that you depend on. If you specify a dependency, io-net checks the name of all currently registered modules (as specified in the name member of their io_net_registrant_t structures) and tries to load them if they aren't already present.

Similarly, if an attempt is made to unload a module that fulfills another's dependency, EBUSY is returned (the dependent module must be unloaded first).

flags
Used internally by io-net.

Classification:

QNX

See also:

io_net_registrant_funcs_t, io_net_self_t


[Previous] [Contents] [Index] [Next]