Skip to contentSkip to conversation

handle packets by libipq

DISCUSSION Dan Nguyen 2 participants 2 messages Aug 6, 2004

lore
Share & tools
lore

Dan Nguyen

author
#0 lore raw

Hi all,

I posted this in devel- mailling, but it seem is wrong place. So I post here to hope the helping.

I plan to use libipq to do the following:
1. capture all packet (both ipv4 and ipv6) on user-space.
2. Modify the captured packet (may tranlate even protocol, i.e replace ipv4 packet by ipv6 packet).
3. Reinject modified packet to kernel.

The 1st and 2nd tasks had solution by modify the libipq and use rfc. But I had not have solution in 3nd task.

Please help me to roadmap.

Thanks for your considering.
Dan Nguyen
PS: Sorry if I send to the wrong mailling.

__________________________________
Do you Yahoo!?
Yahoo! Mail Address AutoComplete - You start. We finish.
http://promotions.yahoo.com/new_mail

#1 lore raw

You re-inject using ipq_set_verdict. Moving a packet from ipv4 to ipv6...dunno. ipv4 and ipv6 use 2 different interfaces ( ipq_create_handle(0, PF_INET) vs ipq_create_handle(0, PF_INET6) and 2 different ip_queues (ip_queue.o, ip6_queue.o), so not sure if you can. More likely would need to drop from 1 and regenerate on the other, but not sure on that one.

-Scott

Quoted 27 lines · --- Dan Nguyen

Hi all,

I posted this in devel- mailling, but it seem is wrong place. So I
post here to hope the helping.

I plan to use libipq to do the following:
1. capture all packet (both ipv4 and ipv6) on user-space.
2. Modify the captured packet (may tranlate even protocol, i.e
replace ipv4 packet by ipv6 packet).
3. Reinject modified packet to kernel.

The 1st and 2nd tasks had solution by modify the libipq and use rfc.
But I had not have solution in 3nd task.

Please help me to roadmap.

Thanks for your considering.
Dan Nguyen
PS: Sorry if I send to the wrong mailling.

Quoted 7 lines

__________________________________
Do you Yahoo!?
Yahoo! Mail Address AutoComplete - You start. We finish.
http://promotions.yahoo.com/new_mail

__________________________________
Do you Yahoo!?
Yahoo! Mail - 50x more storage than other providers!
http://promotions.yahoo.com/new_mail