Daniel Baluta escreveu:
Hello ,

What is the difference between those two functions?

I've looked through the source code and i found this:


 int sock_create(int family, int type, int protocol, struct socket **res)
{
         return __sock_create(current->nsproxy->net_ns, family, type,
protocol, res, 0);
}

int sock_create_kern(int family, int type, int protocol, struct socket **res)
{
         return __sock_create(&init_net, family, type, protocol, res, 1);
}

Any ideas?

thanks,
Daniel.

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to [email protected]
Please read the FAQ at http://kernelnewbies.org/FAQ


It seems that sock_create is used on the socket implementation itself. sock_create_kern is used in socket family implementations (like inet socket for instance - see net/ipv4/af_inet.c, function inet_ct_sock_create).


Best Regards

Alan Menegotto


--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to [email protected]
Please read the FAQ at http://kernelnewbies.org/FAQ

Reply via email to