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 );
Arguments:
- scoid
- A server connection ID that identifies the client process that you want
to get information about, or -1 to get information about the calling process.
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_pp
- 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().
The ConnectClientInfoAble() function sets the _NTO_CI_UNABLE bit in
the flags member if the client doesn't have all the indicated abilities.
- flags
- Zero or more of the following:
- _NTO_CLIENTINFO_GETGROUPS — get the supplementary group IDs
- abilities
- 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 abilities 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_pp 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
- The function sets this member to 1 if the client has the specified ability, or 0 if it doesn't.
- range_lo
- The lower limit on the range of the ability.
- range_hi
- The upper limit on the range of the ability.
Set the ability, range_lo, and range_hi members before
calling ConnectClientInfoAble(); this function sets the flags member.
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 |