* Marek Zawadzki (mzawadzk@cs.stevens-tech.edu) wrote: > Hello, > > I'm done with my networking-stack project (transport protocol) and > I'm writing the docs now (borrrring). > I registered a function 'xxx_sendmsg' in the 'struct proto' to be called > for 'sendmsg' operation on the socket and it workes fine. > > Since this is not my part, I don't really know what is the exact chain of > calls when user calls send(). I need to know what happens from send() called > by user to 'xxx_sendmsg'. Also, I need to know how this chain changes when > the user calls 'write()' instead of 'send()'. > btw. this is a connection-oriented protocol. send() is socket operation which quickly resolves to the socket level sendmsg callback (e.g., inet_sendmsg) and subsequently the protocol specific callback like your xxx_sendmsg. write()/wriitev() is a file operation which adds one layer of indirection through the VFS. note the file_operations registered in net/socket.c to see how write() differs slightly from send(). As Christine mentioned, cscope or grep or some other source browsing tool well help spell this out for you. good luck, -chris -- Kernelnewbies: Help each other learn about the Linux kernel. Archive: http://mail.nl.linux.org/kernelnewbies/ FAQ: http://kernelnewbies.org/faq/