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

Caution: This version of this document is no longer maintained. For the latest documentation, see http://www.qnx.com/developers/docs.

io_net_msg_dl_advert_t

Structure used to advertise a driver's capabilities

Synopsis:

typedef struct _io_net_msg_dl_advert
                  io_net_msg_dl_advert_t;

struct _io_net_msg_dl_advert {
    uint16_t            type;
    uint32_t            iflags;
    uint32_t            mtu_min;
    uint32_t            mtu_max;
    uint32_t            mtu_preferred;
    char                up_type[20];
    uint32_t            capabilities_rx;
    uint32_t            capabilities_tx; 
    struct sockaddr_dl  dl;
};

Description:

The io_net_msg_dl_advert_t structure is used when a module wants to advertise its capabilities to io-net and its other modules. The advertising module fills in this structure and places it in an upgoing packet.

The members include:

type
Set this to _IO_NET_MSG_DL_ADVERT.
iflags
Flags that describe the module's capabilities. This member is a combination of the following bits, which are defined in <net/if.h>:
mtu_min
The minimum preferred MTU (Maximum Transmission Unit). Set the mtu_min value to zero.
mtu_max
The maximum MTU. The values for mtu_max and mtu_preferred should be set the same.
mtu_preferred
The preferred MTU. For an Ethernet device, this value is 1514. If an MTU size was specified via the mtu driver option, specify the value associated with that driver option instead.
up_type
The type of upgoing packet produced by the module. For an Ethernet device, set to en followed by an ASCII representation of the LAN number, e.g. en0. If a different string was specified by the uptype driver option, use that value instead of en. The LAN number should be the number obtained from io-net at registration.
dl
A link-layer sockaddr_dl structure, as described below. Its members are specific to the link layer.

The sockaddr_dl structure is defined as follows:

struct sockaddr_dl {
    char      sdl_data;
    u_char    sdl_len;
    u_char    sdl_family;
    u_int16_t sdl_index;
    u_char    sdl_type;
    u_char    sdl_nlen;
    u_char    sdl_alen;
};

The members are:

sdl_data
The value found in the up_type field, followed by the numeric form of the interface's current MAC address. Don't include NULL-string terminators.
sdl_len
The total length of the sockaddr_dl structure.
sdl_family
Set this to AF_LINK (defined in <sys/socket.h>).
sdl_index
Set this to the LAN number that was obtained when the driver registered the interface with io-net.
sdl_type
Set this to IFT_ETHER (defined in <net/if_types.h>). If a value was specified via the "iftype" command-line option, use this value instead.
sdl_nlen
Set this to specify the number of characters in the alphabetic portion of the dl.sdl_data field.
sdl_alen
Set this to the length of the device's MAC address. The length for an Ethernet address is six.
capabilities_rx and capabilities_tx
Advertise the device's hardware checksum-offloading capabilities. The following flags are defined for capabilities_rx and capabilities_tx:

Classification:

QNX Neutrino


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