* difference between struct proto and struct proto_ops
@ 2015-01-25 5:09 nawab
2015-01-25 10:19 ` michi1 at michaelblizek.twilightparadox.com
0 siblings, 1 reply; 2+ messages in thread
From: nawab @ 2015-01-25 5:09 UTC (permalink / raw)
To: kernelnewbies
What is the difference between struct proto and struct proto_ops : Both
are having the same functions:setsockopt,getsockopt,bind,connect etc...
So which functions are called when we call connect ,bind from userspace....
^ permalink raw reply [flat|nested] 2+ messages in thread
* difference between struct proto and struct proto_ops
2015-01-25 5:09 difference between struct proto and struct proto_ops nawab
@ 2015-01-25 10:19 ` michi1 at michaelblizek.twilightparadox.com
0 siblings, 0 replies; 2+ messages in thread
From: michi1 at michaelblizek.twilightparadox.com @ 2015-01-25 10:19 UTC (permalink / raw)
To: kernelnewbies
Hi!
On 10:39 Sun 25 Jan , nawab wrote:
>
>
> What is the difference between struct proto and struct proto_ops : Both
> are having the same functions:setsockopt,getsockopt,bind,connect etc...
>
> So which functions are called when we call connect ,bind from userspace....
The entry point from userspace is net/socket.c . The functions which are
called is those from "struct proto_ops".
Both "struct sock" and "struct proto" look pretty weird to me too. It seems
that they are meant to be tools which make implementing protocols easier,
but they are sometimes required by upper layers. Take a look at e.g.
sock_getsockopt().
-Michi
--
programing a layer 3+4 network protocol for mesh networks
see http://michaelblizek.twilightparadox.com
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-01-25 10:19 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-01-25 5:09 difference between struct proto and struct proto_ops nawab
2015-01-25 10:19 ` michi1 at michaelblizek.twilightparadox.com
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).