2012-02-17 16:25:32

by Claudio Rossi

[permalink] [raw]
Subject: Accessing protocol type field from mac802.11

Dear all,
I would like to inspect the protocol type field from mac802.11, and
specifically in rx.c in the function

static ieee80211_rx_result debug_noinline
ieee80211_rx_h_sta_process(struct ieee80211_rx_data *rx)

I was trying to do:

struct iphdr * network_header;
skb_set_network_header(skb,ieee80211_get_hdrlen_from_skb(skb));
network_header = (struct iphdr *)skb_network_header(skb);

if (network_header->protocol==IPPROTO_TCP){
...
}
but it does not seams to work....

can somebody give me an hint?
I am sorry about this question, that may be silly... I am a beginner.

Thank you

--
Claudio Rossi
-------------------
Office @ PoliTO: +39 011 5644194


2012-02-20 10:31:34

by Claudio Rossi

[permalink] [raw]
Subject: Re: Accessing protocol type field from mac802.11

Dear all,
?I forgot to mention that in status.c everything works fine when I do:

struct iphdr * network_header;

network_header = (struct iphdr *)skb_network_header(skb);

?if (network_header->protocol==IPPROTO_TCP){
...
}


the problem is how to correctly set the network header pointer in the
skb in rx.c

Please, can somebody help?
Thank you

2012/2/17 Claudio Rossi <[email protected]>
>
> Dear all,
> ?I would like to inspect the protocol type field from mac802.11, and
> specifically in rx.c in the function
>
> static ieee80211_rx_result debug_noinline
> ieee80211_rx_h_sta_process(struct ieee80211_rx_data *rx)
>
> I was trying to do:
>
> struct iphdr * network_header;
> skb_set_network_header(skb,ieee80211_get_hdrlen_from_skb(skb));
> network_header = (struct iphdr *)skb_network_header(skb);
>
> ?if (network_header->protocol==IPPROTO_TCP){
> ...
> }
> but it does not seams to work....
>
> can somebody give me an hint?
> I am sorry about this question, that may be silly... I am a beginner.
>
> Thank you
>
> --
> Claudio Rossi
> -------------------
> Office @ PoliTO: +39 011 5644194




--
Claudio Rossi
-------------------
Office @ PoliTO: +39 011 5644194