Re: The structure of ports

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

On Fri, 2004-07-02 at 01:59, so usp wrote:
> Hi...
> 
> 
> I would like to know where i can find the linked list
> or structure that mantain the ports open or used of my
> computer like (HTTP 80, FTP 21 and anothers).

You can trace down the system call socket. The counterpart in
the kernel is sys_socket.

after that u can trace down the system call bind (sys_bind in 
kernel).


Basically when a socket is created using socket system call,
a "struct socket" (and "struct sock") is created and put into
the protocol specific (not ftp, http, etc... here its IP, UNIX, etc..)
hash chains. Example is function inet_create

    418                 /* Add to protocol hash chains. */
    419                 sk->sk_prot->hash(sk);

Later bind is called with a port number (HTTP 80, FTP 21 and anothers)
this number is binded to the "struct sock"
> 
> thanks,
> Luis Henrique.

Regards,
Shine Mohamed Jabbar


--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux