I have been writing module foobar for while and At the moment it works in
a way that it add itself in protocol "stack?" when module is initialized.

ie. about.

---
struct packet_type       pt;
pt.func = handle_packet;
pt.type = htons(ETH_P_ALL);
pt.data = SK_ALLOC(GFP_USER);
pt.dev = dev_get(name);
dev_add_pack(pt);
---

when i have the module plugged in it'll put all network traffic that is
going trought NIC "name" also trough function "handle_packet".

here comes the (imo) tricky part.

when *skb arrives to this (handle_packet) function it is already
with cloned headers and seems that because of that I can't drop it
(delete,purge,etc).

I have managed to modify skb->data extensivily and it works.

Ie when i am sending packet out I'll modify skb->data[26] to [29] and I
can then modify within the module from and to IP addresses in the package
that I'll be sending. However biggest problem is that I can't delete
packets that go trough the module.

kfree_skb seems to check that packet it is freeing is not cloned yms.

What I'm trying is to to make hand crafted "filter" which would allow some
packages trough and other would be dropped to ground for the reason that I
don't get skb->list to "handle_packet" function it'd seem that this is not
possible in linux? Is there any way around this.


Thanks.

-- 
Janne P�nk�l�

-
To unsubscribe from this list: send the line "unsubscribe linux-net" in
the body of a message to [EMAIL PROTECTED]

Reply via email to