-2

I need to analyse the source code of the process that selects the transport layer protocol when a data is sent over a network. I tried to find but still I haven't fount it. Can someone suggests me how to get this?

*At least If I can get the algorithm/ pseudocode that will also very helpful.

Thanks

chathura
  • 3,362
  • 6
  • 41
  • 68

1 Answers1

1

Transport layer is chosen by the application code, when creating a socket. It is not clear what you mean by "process".

Try grepping the app source code for the strings SOCK_STREAM, SOCK_DGRAM, AF_INET or IPPROTO_TCP for starters.

If you mean the Linux kernel, start in src/net/socket.c

http://lxr.free-electrons.com/source/net/socket.c

codenheim
  • 20,467
  • 1
  • 59
  • 80
  • Thanks for the reply. could you tell me more specifically how to get those strings?(which file should I use in Linux) I'm new to this area. – chathura Jun 30 '14 at 07:56
  • @chathura2020 They aren't strings, they are manifest constants. As you haven't specified a programming language your question about where to get them isn't answerable. – user207421 Jun 30 '14 at 08:03
  • @mrjoltcola Thanks for the link, I will use this as a starting point – chathura Jun 30 '14 at 08:17