Re: libnetfilter_queue: extracting TCP options.

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

 



Hi,

You said you want the Checksum and Timestamp.
1. Timestamp as i said could be achieved from nfq_get_timestamp,
2. Checksum could be achieved from the tcphdr,
3. Data length could be computed with iphdr(get the data length - tcp
header length ) ...

I guess that if you want to get the other options, you could just use
the tcphdr, and address the wanted members of the struct...


2010/11/14 Igor 'Lo' (И.L.) <bombsiteunrested@xxxxxxxxx>:
> Hi,
> which .h contains a correct struct tcp? I guess it is tcphdr from
> netinet/tcp.h, which only gives a doff (whole header length), so have
> to get payload, skip header length and read the options by byte?
>
> 2010/11/14 Yechiel Levi <gmistick@xxxxxxxxx>:
>> Hi,
>>
>> You should use the nfq_handle_packet method, and in the callback it
>> activates use a casting of tcp struct on the payload (nfq_get_payload
>> method)
>>
>> timestamp can be achieved from netfilter using the :
>> nfq_get_timestamp (struct nfq_data *nfad, struct timeval *tv)
>>
> cheer,
> Igor.
>



-- 
Kind Regards,
Yechiel Levi
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Netfitler Users]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux