Re: detecting new tcp connections

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

 



Checking the source address, destination address, source port, and 
destination port will guaruntee that the connection is unique. TCP (and 
UDP, i think) include wait mechanisms that disallow reuse of an 
ephemeral source port too soon after being used. So, if You poll quickly 
enough (every second is plenty fast), You will never run into this problem.

			-&


Murgan wrote:
> Hi,
>      I want to make a process that will do polling of the /proc/net/tcp 
> and I want to recognize the new connections that have been made since my 
> last poll.How can I do it as only checking the src and dest addresses 
> can't tell it as the connection btw same src and dest may have been 
> closed and established again.
> 
> I would be obliged for ur help.
> 
> Murgan
> 
> _________________________________________________________
> Click below to visit monsterindia.com and review jobs in India or Abroad
> http://monsterindia.rediff.com/jobs
> 
> -- 
> Kernelnewbies: Help each other learn about the Linux kernel.
> Archive:       http://mail.nl.linux.org/kernelnewbies/
> FAQ:           http://kernelnewbies.org/faq/
> 

--
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