Need help in understanding the mapping of user-space send, sendto, sendmsg to kernel-space sendmsg

Need help in understanding the mapping of user-space send, sendto, sendmsg to kernel-space sendmsg

Post by Balachanda » Wed, 16 Jun 2010 10:55:49



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

 
 
 

1. send(), sendto(), or sendmsg()?

Hi. I need a way to send a one or two line message via email inside of a
program.  I think that what I need is either the function send(),
sendto(), or sendmsg().  However, I don't know exactly how to use them,
and the man pages are a little too cryptic for me.  Can someone help me
out with a syntax for sending to a specific address?  Thanks a lot.
-Danny
"The end of our exploring will be to arrive
where we started, and know it for the first
time."

2. Is a boot problem in r3.1 fixed in the next release?

3. mapping user space and kernel space

4. IP address

5. How can I map kernel space to user space ??

6. How to foreground a nohuped and background process?

7. How can I map kernel space to user space..

8. ip masq

9. user-space <-> kernel-space

10. Problem mapping PCI memory space to user space

11. Kernel space to user space

12. exchange data from user space to kernel space

13. kernel space access to user space functions