如何在服务器客户端程序中使用sendmsg()系统调用



我正在进行sendmsg系统调用,我想使用服务器客户端程序触发这个sendmsg的系统调用,以及使用ftrace跟踪所涉及的功能并了解sendmsg 的流程

您可以如下调用msgsnd((系统调用。参考

语法:

int msgsnd(int msqid, const void *msgp, size_t msgsz, int msgflg);

int ret = msgsnd(msq_id, &msg, sizeof(msg.data), 0);
if(ret< 0){
perror("msgsnd() failed");
_exit(-1);
}
// message is sent

最新更新