starting /etc/init/network.conf.sh
reg_sig_handler : done sig 1
reg_sig_handler : done sig 14
reg_sig_handler : done sig 13
srpc_start:680:: start a TCP srpc server!
------> family is 2 ,type is 2 ,protocol is 0
------> family is 2 ,type is 1 ,protocol is 0
ipv4 inet_create : ------>
ipv4 inet_create : ------>
-------> sock_map_fd
-------> sock_map_fd
starting /etc/init/ntp.conf.sh
__srpc_socket:49:: srpc create TCP socket:3
-------> sys_bind
-------> sys_listen
__srpc_task_tcp:471:: srpc service running ...
starting /etc/init/pagecache_limit.conf.sh
-------> 33333 sys_accept
-------> sys_accept4
-------> 33333 sys_accept
-------> sys_accept4
starting /etc/init/rpcd.conf.sh
Launch the rpc service...
SYSCALL_DEFINE3(bind, int, fd, struct sockaddr __user *, umyaddr, int, addrlen)
{
struct socket *sock;
struct sockaddr_storage address;
int err, fput_needed;
printk("\n -------> %s \n",__FUNC__); /// ------> sys_bind
sock = sockfd_lookup_light(fd, &err, &fput_needed);
...
}
SYSCALL_DEFINE2(listen, int, fd, int, backlog)
{
struct socket *sock;
int err, fput_needed;
int somaxconn;
printk("\n -------> %s \n",__FUNC__);
....
}
SYSCALL_DEFINE3(accept, int, fd, struct sockaddr __user *, upeer_sockaddr,
int __user *, upeer_addrlen)
{
printk("\n -------> 33333 %s \n",__FUNC__); /// ------> 33333 sys_accept
return sys_accept4(fd, upeer_sockaddr, upeer_addrlen, 0);
}
/*
* For accept, we attempt to create a new socket, set up the link
* with the client, wake up the client, then return the new
* connected fd. We collect the address of the connector in kernel
* space and move it to user at the very end. This is unclean because
* we open the socket then return an error.
*
* 1003.1g adds the ability to recvmsg() to query connection pending
* status to recvmsg. We need to add that support in a way thats
* clean when we restucture accept also.
*/
SYSCALL_DEFINE4(accept4, int, fd, struct sockaddr __user *, upeer_sockaddr,
int __user *, upeer_addrlen, int, flags)
{
struct socket *sock, *newsock;
struct file *newfile;
int err, len, newfd, fput_needed;
struct sockaddr_storage address;
printk("\n -------> %s \n",__FUNC__);
if (flags & ~(SOCK_CLOEXEC | SOCK_NONBLOCK))
return -EINVAL;
...
err = sock->ops->accept(sock, newsock, sock->file->f_flags);
...
}