_io_connect

Structure of a resource manager's connect message

Synopsis:

struct _io_connect {
    uint16_t                type;
    uint16_t                subtype;
    uint32_t                file_type;
    uint16_t                reply_max;
    uint16_t                entry_max;
    uint32_t                key;
    uint32_t                handle;
    uint32_t                ioflag;
    uint32_t                mode;
    uint16_t                sflag;
    uint16_t                access;
    uint16_t                zero;
    uint16_t                path_len;
    uint8_t                 eflag;
    uint8_t                 extra_type;
    uint16_t                extra_len;
    char                    path[1];
};

Description:

The _io_connect structure is used to describe a connect message that a resource manager receives and sends.

The members include:

type
_IO_CONNECT
subtype
The type of connection that the message concerns; one of:
file_type
The file type; one of the following (defined in <sys/ftype.h>):
reply_max
The maximum length of the reply message.
entry_max
The maximum number of _io_connect_entry structures that the resource manager is willing to accept. If a path could reference more than one resource manager, it returns a list of _io_connect_entry structures referring to the overlapping resource managers.
key
Reserved.
handle
The handle returned by resmgr_attach().
ioflag
The bottom two bits are modified from traditional Unix values to more useful bit flags:

Note that this translation can be performed without overlapping other O_* flags.

To check for permissions, use the following:

The remaining values of ioflag are outside this range and are not modified. These values are:

mode
Contains the type and access permissions of the file.

The type is one of:

The permissions are a combination of:

Owner Group Others Permission
S_IRUSR S_IRGRP S_IROTH Read
S_IRWXU S_IRWXG S_IRWXO Read, write, execute/search. A bitwise inclusive OR of the other three constants (S_IRWXU is OR of IRUSR, S_IWSUR and S_IXUSR.)
S_IWUSR S_IWGRP S_IWOTH Write
S_IXUSR S_IXGRP S_IXOTH Execute/search

The following bits define miscellaneous permissions used by other implementations:

Bit Equivalent
S_IEXEC S_IXUSR
S_IREAD S_IRUSR
S_IWRITE S_IWUSR
sflag
How the client wants the file to be shared; a combination of the following bits:
access
Contains a combination of _IO_FLAG_RD and _IO_FLAG_WR bits, which are used internally as the access permissions to allow from ioflag.
path_len
The length of the path member.
eflag
Extended flags:
extra_type
One of:
extra_len
The length of any extra data included in the message.
path
The path that the client is trying to connect to, relative to the resource manager's mountpoint.

Classification:

QNX Neutrino

See also:

_io_connect_ftype_reply, _io_connect_link_reply, resmgr_connect_funcs_t

The _IO_OPEN message for filesystems in the Filesystem Resource Managers chapter of Writing a Resource Manager