difference between struct proto and struct proto_ops
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....
Hi!
Quoted 6 lines · nawab
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
Signature · 2 lines
programing a layer 3+4 network protocol for mesh networks see http://michaelblizek.twilightparadox.com