[haiku-gsoc] Re: Queries regarding the current code for tcp

  • From: Rene Gollent <anevilyak@xxxxxxxxx>
  • To: "haiku-gsoc@xxxxxxxxxxxxx" <haiku-gsoc@xxxxxxxxxxxxx>
  • Date: Mon, 5 Jun 2017 14:23:39 -0400

On Mon, Jun 5, 2017 at 2:10 PM, Ayush Agrawal <echo.27.04.96@xxxxxxxxx> wrote:

They will be called using the function pointer names defined in the
struct, so you won't see calls to the implemented function names.


I did search for the function pointer names defined in the struct for
example tcp_open and tcp_bind, but couldn't find a single match in any other
file.

That's exactly what won't happen. The stack itself is
protocol-agnostic, ergo all it knows is a list of net_protocol
module_info structs (see headers/private/net/net_protocol.h). TCP,
UDP, ICMP and friends provide instances of that module struct, with
pointers linking to the appropriate version, while the stack itself
doesn't need to know or care about anything other than the generic
struct.

Regards,

Rene

Other related posts: