Re: Casting sock to inet_timewait_sock

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

 



Hi!

On 16:47 Fri 14 Jan     , Daniel Baluta wrote:
> Hello,
> 
> When casting sock to inet_timewait_sock ([1]) it is assumed
> that sock points to a structure of type inet_timewait_sock.
> 
> Is there a way to check if a sock struct wraps around
> a inet_timewait_sock struct?

By looking at the callers of inet_twsk it seems as if sk->sk_state has to be
either TCP_TIME_WAIT or DCCP_TIME_WAIT. It even seems as if both actually have
the same value (see
http://lxr.linux.no/linux+v2.6.36/include/linux/dccp.h#L256 ).

	-Michi
-- 
programing a layer 3+4 network protocol for mesh networks
see http://michaelblizek.twilightparadox.com


_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


[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