Re: modify tcp header in the kernel

From: Olaf Dietsche
Date: Sat Jul 24 2004 - 05:43:06 EST


Manjunath Prabhu <manjunath.mp@xxxxxxxxx> writes:

> i am using the debian linux and am working on the 2.6.6 kernel.
> i want to access the tcp header, modify it (by passing it through my
> function) and then
> put it back for the regular flow to continue.
> can somebody tell me where i can access TCP header....
> this is what i think should be done.
>
> 1.will using (struct sk_buff*)skb->h.th be sufficient
> 2.using hook to divert the regular flow.
> 3.passing it to my function.
> 4.putting it back.

Maybe iptables is what you're searching for.

Another possibility would be Linux socket filtering. A short
description is in: Documentation/networking/filter.txt

Regards, Olaf.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/