简体   繁体   English

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

[英]how to use sendmsg() system call in server client program

I'm going through sendmsg systemcall, i want to trigger this sendmsg systemcall using a server client programs and what to use ftrace to trace what functions are involved and understand the flow of sendmsg我正在通过 sendmsg 系统调用,我想使用服务器客户端程序触发这个 sendmsg 系统调用以及使用 ftrace 来跟踪涉及哪些功能并了解 sendmsg 的流程

You can invoke the msgsnd() system call as follows.您可以按如下方式调用 msgsnd() 系统调用。 Reference参考

syntax:句法:

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 sendmsg系统调用是否验证添加到辅助数据中的IPv6源地址? - Does sendmsg system call validate IPv6 source-address added into ancillary data? linux c中sendmsg()调用中的错误 - error in sendmsg() call in linux c 如何在C语言的多个客户端服务器通信程序中同时使用writefds和readfds? - How do I use both writefds and readfds for multiple client server communication program in C language? 如何使用 ssh 在 linux 服务器上从 python 程序在 ZAEA23428CECDAA39 客户端上安排“at”作业或“cron 作业” - How to use ssh to schedule an 'at' job or a 'cron job' on a linux server from a python program on Windows client 如何使用sendmsg()通过两个进程之间的套接字发送文件描述符? - How to use sendmsg() to send a file-descriptor via sockets between 2 processes? 暂停客户端服务器程序 - halting a client server program 如何在C程序中不使用remove系统调用来删除文件? - How to delete a file without using remove system call in a C program? 对系统程序的Python调用不起作用 - Python call to system program not working sendmsg()中的辅助数据如何工作? - How does ancillary data in sendmsg() work? 如何在不使用“system()库函数”的情况下在c程序中调用pkill - how to call pkill in c program without using “system() library function”
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM