Need help in understanding the mapping of user-space send, sendto, sendmsg to kernel-space sendmsg
Posted
by bala1486
on Stack Overflow
See other posts from Stack Overflow
or by bala1486
Published on 2010-06-15T00:57:20Z
Indexed on
2010/06/15
1:02 UTC
Read the original article
Hit count: 310
Hello, I am trying to implement my own transport layer protocol in Linux for an experiment. I am going to use socket interface and add my protocol using sock_register. For the proto_ops i can see that the parameters for the sendmsg and recvmsg are (struct kiocb *iocb, struct socket *sock, struct msghdr *msg, size_t len, int flags). But there are three types of user api's send, sendto, sendmsg. Of these three only sendmsg contains a parameter for msghdr. I find that the other two api's are incompatible with the parameters supplied by the kernel to my kernel-space sendmsg function. So what happens when we use send and sendto user-space api's? Hope i am clear..
Thanks, Bala
© Stack Overflow or respective owner