Re: get tcp header

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

 



ok.thanks. now is all clear...so if i write a new target for
NFPROTO_IPV4, the packet that i firstly receive in my target-hook
function is an _IP_ packet. isn't it?

On Wed, Sep 1, 2010 at 2:18 PM, Nicola Padovano
<nicola.padovano@xxxxxxxxx> wrote:
> maybe because the packet is sent firstly to the router and then the
> router sends to my host a ip packet in which network_header is set? i
> hope so...
>
> On Wed, Sep 1, 2010 at 1:48 PM, Nicola Padovano
> <nicola.padovano@xxxxxxxxx> wrote:
>> ok, Jan! Perfect.
>>
>> But there is a last question: i've seen a source code that get a
>> packet just received from the Net: so -if I understand correctly- it
>> can't use skb_network_header (IP header) because when i get a packet
>> just received from the net i should have only the mac_header set.
>> isn't it?
>> But, i've seen the usage of skb_network_header...
>>
>> On Wed, Sep 1, 2010 at 12:53 PM, Jan Engelhardt <jengelh@xxxxxxxxxx> wrote:
>>> On Wednesday 2010-09-01 11:57, Nicola Padovano wrote:
>>>
>>>>"If a packet is handled by a bridge, that is, a component that does not
>>>>deal with layer 3 or 4, there is no point in spending time to find the
>>>>start of the layer 3/4 header."
>>>>
>>>>Ok, well: great. but in this case (bridge) also the skb_network_header
>>>>function is senseless because we don't have to find layer3 header.
>>>>isn't it?
>>>
>>> Correct.
>>>
>>>>in general: when i can use the skb_transport_header function?
>>>
>>> When a transport header pointer has been set. Which is when the
>>> appropriate layer-X function has processed it. (After ip_rcv for
>>> example)
>>> On the output path, since it goes in the reverse direction, it will
>>> always be set.
>>>
>>>
>>
>>
>>
>> --
>> Nicola Padovano
>> e-mail: nicola.padovano@xxxxxxxxx
>> web: http://npadovano.altervista.org
>>
>
>
>
> --
> Nicola Padovano
> e-mail: nicola.padovano@xxxxxxxxx
> web: http://npadovano.altervista.org
>



-- 
Nicola Padovano
e-mail: nicola.padovano@xxxxxxxxx
web: http://npadovano.altervista.org
--
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