Hi,<br>
I'd like to be able to look at the packets' header received by a
station (unicast or broadcast packets) which is using the hostap driver before they are passed to the
upper layers with netif_rx and I noticed that there are different
points in which netif_rx is used.. Now I'm looking at the packets'
header in the function hostap_80211_rx (hostap_80211_rx.c) here (line
1064):
<br>
<br>
if (skb) {<br>
[EXAMINE ETHERNET HEADER HERE - DO SOMETHING WITH SKB]<br>
skb->protocol = eth_type_trans(skb, dev);<br>
memset(skb->cb, 0, sizeof(skb->cb));<br>
skb->dev = dev;
<br>
<br>
netif_rx(skb);<br>
}<br>
<br>
What I want to
do is look at the ETHERTYPE field and if the protocol number is the one
identifying my protocol, do something with the skb without passing it
to upper layers. Is it sufficient for my purposes to take into
consideration only this netif_rx call or could I miss some packets?
What is the purpose of the other netif_rx calls in the rest of the
code?
<br>
Let me ask you also another question, not related to hostap but to
kernel development: what's the difference between htons and
__constant_htons calls? Should I simply use __constant_htons when I'm
"converting" a constant?
<br clear="all">
<br>
Thank you in advance for any help :)<br>
Gianni<br clear="all"><br>-- <br>--------------------------------------------------------------------------------------------------------------<br>| Gianni Costanzi (<a href="mailto:gianni.costanzi@gmail.com">gianni.costanzi@gmail.com
</a>)<br>| (<a href="http://ares.science.unitn.it/~gianni.costanzi/">http://ares.science.unitn.it/~gianni.costanzi/</a>)<br>|<br>| Gentoo Documentation Project (GDP) Member - Italian Translator<br>| (<a href="http://www.gentoo.org/proj/en/gdp/">
http://www.gentoo.org/proj/en/gdp/</a>)<br>|<br>| Free Software Foundation Member #3844 (<a href="http://www.fsf.org">www.fsf.org</a>)<br>|<br>| Why GNU/Linux? (<a href="http://www.gnu.org/gnu/why-gnu-linux.html">http://www.gnu.org/gnu/why-gnu-linux.html
</a>)<br>--------------------------------------------------------------------------------------------------------------