Bart De Schuymer wrote:
On Thursday 05 June 2003 11:51, J�r�me Tollet wrote:

But I have 3 problems:
1) My module needs to access to the entire frame, but when I receive a
packet in my handler, skb->data points on the beginning of the IP header
(not the ethernet). To solve this problem, I simply used skb_push(skb,
ETH_HLEN) and then skb_pull(skb, ETH_HLEN) to make skb->data point on
the Ethernet header. Is this method correct for both hook points
(NF_BR_POST_ROUTING and NF_BR_LOCAL_IN).


Yeah, that's fine.

I think it will break if you are using 802.1Q VLANs, or anything else with a header that is not ETH_HLEN long.

I believe the skb->raw points to the beginning of the frame, could use that
to calculate offsets if you really need to pull/put...


-- Ben Greear <[EMAIL PROTECTED]> <Ben_Greear AT excite.com> President of Candela Technologies Inc http://www.candelatech.com ScryMUD: http://scry.wanfear.com http://scry.wanfear.com/~greear


_______________________________________________ Bridge mailing list [EMAIL PROTECTED] http://www.math.leidenuniv.nl/mailman/listinfo/bridge

Reply via email to