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

io_net_msg_dl_advert_t

Structure used to advertise a module'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;
    uint16_t            zero;
    uint32_t            iflags;
    uint32_t            mtu_min;
    uint32_t            mtu_max;
    uint32_t            mtu_preferred;
    uint32_t            reserved[4];
    char                up_type[20];
    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
_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
mtu_max
mtu_preferred
The minimum, maximum, and preferred MTU (Maximum Transmission Unit).
up_type
The type of upgoing packet produced by the module.
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 {
    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;
    u_char    sdl_slen;
    char      sdl_data[12];
};

The members are:

sdl_len
The total length of the sockaddr_dl structure.
sdl_family
AF_DLI or AF_LINK.
sdl_index
If nonzero, this is the index for the interface.
sdl_type
The interface type, which indicates how to intrepret the address portion of sdl_data. The types are defined in <net/if_types.h>, using a prefix of IFT_ (For example, IFT_ETHER).
sdl_nlen
The length of the interface name. There isn't a trailing \0 on the interface name.
sdl_alen
The length of the link-level address.
sdl_slen
Not used; set this member to 0.
sdl_data[12]
The minimum work area, which can be larger; it contains both the interface name and the link-level address.

Classification:

QNX


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