3.1 Overview
System V IPC Functions:
3.2 key_t and Ftok functions
Key_t is the external identifier of the system V IPC, also known as the IPC Key, through which multiple processes meet on the same IPC object
The Ftok function converts pathname and integer identifiers to key_t values
#include <sys/ipc.h>key_t ftok (char *pathname,int ID)
Client and server agree on pathname and ID, then both sides get the same IPC key by calling the Ftok function
Three get functions (Msgget, Semget, shmget) use the key and flag parameters to create or get an IPC object that returns an int type identifier
A) Key=ipc_private is created
b) key is not associated with an IPC object and the specified ipc_creat bit in flag is created
3.3 Ipc_perm Structure
struct ipc_perm{ uid_t uid; gid_t GID; uid_t cuid; gid_t Cgid; mode_t mode; ulong_t Sep; key_t Key;};
3.4 Creating and opening IPC channels
From the IPC key to the IPC identifier:
To open a logical process for an IPC object:
3rd. System V IPC