ConnectClientInfoAble()

Store extended information about a client connection, including abilities

Synopsis:

#include <sys/neutrino.h>

struct _client_able {
    unsigned ability;
    unsigned flags;
    uint64_t range_lo;
    uint64_t range_hi;
};

int ConnectClientInfoAble( int scoid,
                           struct _client_info **info_pp,
                           const int flags,
                           struct _client_able abilities[],
                           const int nable );

Since:

BlackBerry 10.0.0

Arguments:

scoid
A server connection ID that identifies the client process that you want to get information about. This client is typically a process that's made a connection to the server to try to access a resource. You can get it from the _msg_info argument to MsgReceivev() or MsgInfo().
info
The address of a location where the function can store a pointer to a _client_info structure that the function can fill with information about the client. For more information, see ConnectClientInfoExt().
flags
Zero or more of the following:
  • _NTO_CLIENTINFO_GETGROUPS — get the supplementary group IDs
able
An array of struct _client_able structures that specifies the abilities that the client must have; see below.
nable
The number of entries in the able array.

Library:

libc

Use the -l c option to qcc to link against this library. This library is usually included automatically.

Description:

This call gets information about a client connection identified by scoid, allocates a buffer, stores the information in the buffer, and stores a pointer to the buffer in the location that info points to. Use ClientInfoExtFree() to free this buffer.

A server uses this function to determine whether or not a client has the required abilities; see procmgr_ability() and procmgr_ability_create().

The ConnectClientInfoAble() function is a specialized version of ConnectClientInfo().

_client_able structure

The _client_able structure has at least the following members:

ability
The numeric identifier for the ability; either a PROCMGR_AID_* value (see procmgr_ability()), or an ability that the server created by calling procmgr_ability_create().
flags
Flags that specify the domain of the ability; a bitwise OR of zero or more of the following:
  • PROCMGR_ADN_ROOT — the ability is for privileged processes.
  • PROCMGR_ADN_NONROOT — the ability is for unprivileged processes.
range_lo
The lower limit on the range of the ability.
range_hi
The upper limit on the range of the ability.

Returns:

0, or -1 if an error occurred ( errno is set).

Errors:

EFAULT
A fault occurred when the kernel tried to access the buffers provided.
EINVAL
The process doesn't have a connection scoid.

Classification:

QNX Neutrino

Safety:  
Cancellation point No
Interrupt handler No
Signal handler Yes
Thread Yes

Last modified: 2014-06-24



Got questions about leaving a comment? Get answers from our Disqus FAQ.

comments powered by Disqus