Question: Project description In this project, you are required to implement a new IPC method called Notification - Based IPC ( NIPC ) . A NIPC

Project description
In this project, you are required to implement a new IPC method called Notification-Based IPC (NIPC). A NIPC instance is a system resource identified by a unique key. Any process that has the key may access the NIPC instance to send/receive messages. The procedure to use a NIPC instance is as follows:
A process opens a NIPC instance using its key.
A process subscribes under a specific type )>(0 to the opened NIPC instance to receive messages
A process may send messages to an opened NIPC instance using any of the following:
Broadcast: message is sent to all subscribed processes.
Multicast: message is sent to all subscribed processes of certain type.
Unicast: message is sent to a specific subscribed processes.
When a message is sent to the NIPC instance, all intended subscribers are notified. The notified process then have the choice of reading the message or ignoring it.
Implementation details
You are required to implement the following functions and submit a library named nipc. h(along with its .c file). Make sure you perform all necessary testing before submitting the code.
int nipc_create(key_t _key);
Description : This function creates a NIPC instance that has a key _key. If a NIPC instance with the same key exists, the function fails.
Return value : 0 on success, -1 on failures.
Errors : On failure, errno is set to an appropriate error value, You may define any errors you may need.
int nipc_get(key_t _key)
Description : This function opens a NIPC instance whose key is _key.
Return value : If the instance exists, it returns a unique positive non-zero integer to identify the instance within the process. Otherwise, it returns -1.
Errors : On failure, errno is set to an appropriate errot value. You may define any errors you may need.
int nipc_subscribe(int id, long type, void (handler*)(struct nipc_message*));
Description : This function subscribes the calling process to the opened NIPC instance identified by id under the specified type "type". The function handler is invoked upon any notification from the NIPC instance.
1
 Project description In this project, you are required to implement a

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!