Where is the true implementation of sendto
I am trying to explore the implementation of the "sendto" socket function. I tried to find an implementation in Linux.
In Linux, sendto function corresponds to "sys_sendto" system call. When I tried to follow it, I found a definition for it which is the following:
asmlinkage long sys_sendto (void) attribute((weak,alias("sys_ni_syscall"))
That's to say sys_sendto is nothing than an alias to sys_ni_syscall, which does nothing more than returning a value. That does not make sense, as far as I am concerned.
Besides, I found in another piece of code that "sys_sendto()" is calling "_sock_send_msg" which is in turn calling "_scok_sendmsg_nosec".
Where to find sys_snedto implementation? Is it implemented by some Assembly code? I want to find where exactly and how the information Ethernet Index is processed (passed to sendto fct in Raw socket context).
|