create_ipc_prof
Purpose
Creates a profile for an IPC queue.
Library
IPC Library (libipc.a)
Syntax
#include <drs.h>
int creat_ipc_prof (queue_name, l_key, r_key, nickname)
char *queue_name;
key_t *l_key, *r_key;
char *nickname;
Description
The create_ipc_prof subroutine creates a profile for an
IPC queue. A process must have an effective user ID of
superuser in order to use the create_ipc_prof subroutine.
The queue_name parameter contains the name of the IPC
queue. If this value is not specified by the caller,
create_ipc_prof assigns a queue name and places it in
queue_name. A queue_name supplied by the caller must
have valid AIX filename syntax. A queue_name supplied by
the subroutine has valid AIX filename syntax and is up to
15 characters long, including the trailing NULL.
The l_key parameter points to the local key for an IPC
queue. If the key pointed to by this parameter is 0,
then create_ipc_prof assigns a local key value and places
it in l_key. If the caller supplies the l_key, it should
fall between 0x30000 and 0xFFFFF because other ranges are
reserved. A value for this parameter supplied by the
subroutine will fall in the same range.
The create_ipc_prof subroutine creates a profile that
maps a key (l_key) to another key (r_key). The r_key can
be either local or remote. The nickname parameter points
to the node ID (in hexadecimal) or to the nickname of the
node where the IPC queue exists. If the key pointed to
by r_key is 0 and the nickname parameter points to a null
string, the queue is on the local node.
If create_ipc_prof succeeds in creating a profile, the
dsipc command is used to update the kernel's copy of the
profiles.
Return Value
Upon successful completion, this function returns a 0,
and the parameters queue_name, l_key, r_key, and nickname
contain the values in the created profile. If an error
occurs, then create_ipc_prof returns a negative value
from the following list:
DRS_ACCES The required access permissions were denied.
DRS_BADLEN An incorrect parameter was supplied.
DRS_NOREC No record was found.
DRS_BKEY The key is out of range.
DRS_NOKEY No keys are available.
DRS_IO An input/output error occurred.
DRS_AGAIN Unable to start pfsmain.
DRS_BADF An incorrect file descriptor was supplied.
DRS_BADK An incorrect index key was supplied.
DRS_BDMSF An incorrect file or table was supplied.
DRS_BOF The beginning of the file was encountered.
DRS_DEADLK A deadlock was detected.
DRS_EOF The end of the file was encountered.
DRS_FAULT An incorrect address was supplied.
DRS_FBIG The maximum file size was exceeded.
DRS_IDRM The identifier was removed.
DRS_INBLCK The profile data base is locked against
updates.
DRS_INTENT The intentions were denied.
DRS_ISDIR A write to a directory was attempted.
DRS_MFILE Too many files, tables, or indexes were
open.
DRS_NFILE The file table overflowed.
DRS_NOENT No file or directory was found.
DRS_NOMEM No memory is available.
DRS_NOSPC No space is available on the device.
DRS_NOTDIR Not a directory.
DRS_NOTIDX Not an index.
DRS_PANIC Abnormal termination occurred.
DRS_RCVRY The file needs recovery.
DRS_RECLEN The record length is invalid.
DRS_ROFS The file system to be accessed is read-only.
Related Information
In this book: "del_ipc_prof," -- Heading id 'fipcpro'
unknown --, and "msgctl."
The dsipc command in AIX Operating System Commands Refer-
ence.
The discussion of messages and IPC queues in AIX Oper-
ating System Programming Tools and Interfaces.