All of lore.kernel.org
 help / color / mirror / Atom feed
* modify tcp header in the kernel
@ 2004-07-24 10:01 Manjunath Prabhu
  2004-07-24 10:41 ` Olaf Dietsche
  0 siblings, 1 reply; 2+ messages in thread
From: Manjunath Prabhu @ 2004-07-24 10:01 UTC (permalink / raw)
  To: linux-kernel

hi,
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.

am i right???
-best regards,
manjunath

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: modify tcp header in the kernel
  2004-07-24 10:01 modify tcp header in the kernel Manjunath Prabhu
@ 2004-07-24 10:41 ` Olaf Dietsche
  0 siblings, 0 replies; 2+ messages in thread
From: Olaf Dietsche @ 2004-07-24 10:41 UTC (permalink / raw)
  To: Manjunath Prabhu; +Cc: linux-kernel

Manjunath Prabhu <manjunath.mp@gmail.com> 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.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2004-07-24 10:42 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-07-24 10:01 modify tcp header in the kernel Manjunath Prabhu
2004-07-24 10:41 ` Olaf Dietsche

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.