* Sequence number translation explanations.
@ 2004-03-27 16:00 Emmanuel Guiton
2004-03-28 18:36 ` Harald Welte
0 siblings, 1 reply; 3+ messages in thread
From: Emmanuel Guiton @ 2004-03-27 16:00 UTC (permalink / raw)
To: netfilter-devel
Hi!
I need to translate sequence numbers between the two networks that are
separated by the firewall. In fact, I just need to translate on of them
(so tcph->ack_seq in one direction, and tcph->seq in the opposite
direction).
I found the ip_nat_seq stucture and the ip_nat_seq_adjust function but I
do not understand them. Particularly this "correction_pos", what is it?
Could someone provide me with some explanations?
Emmanuel
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: Sequence number translation explanations.
2004-03-27 16:00 Sequence number translation explanations Emmanuel Guiton
@ 2004-03-28 18:36 ` Harald Welte
2004-03-29 8:12 ` Emmanuel Guiton
0 siblings, 1 reply; 3+ messages in thread
From: Harald Welte @ 2004-03-28 18:36 UTC (permalink / raw)
To: Emmanuel Guiton; +Cc: netfilter-devel
[-- Attachment #1: Type: text/plain, Size: 1296 bytes --]
On Sat, Mar 27, 2004 at 06:00:01PM +0200, Emmanuel Guiton wrote:
> Hi!
>
> I need to translate sequence numbers between the two networks that are
> separated by the firewall. In fact, I just need to translate on of them
> (so tcph->ack_seq in one direction, and tcph->seq in the opposite
> direction).
> I found the ip_nat_seq stucture and the ip_nat_seq_adjust function but I
> do not understand them. Particularly this "correction_pos", what is it?
>
> Could someone provide me with some explanations?
It is for inserting/removing bytes from a TCP stream, as needed with NAT
of protocols like FTP (IP address printed in ASCII has different length,
compare strlen('1.1.1.1') to strlen('255.255.255.255').
correction_pos is the position (sequence number) where the
addition/subtraction occurred, and offset is the number of bytes added
(positive) or removed (negative).
> Emmanuel
--
- Harald Welte <laforge@netfilter.org> http://www.netfilter.org/
============================================================================
"Fragmentation is like classful addressing -- an interesting early
architectural error that shows how much experimentation was going
on while IP was being designed." -- Paul Vixie
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: Sequence number translation explanations.
2004-03-28 18:36 ` Harald Welte
@ 2004-03-29 8:12 ` Emmanuel Guiton
0 siblings, 0 replies; 3+ messages in thread
From: Emmanuel Guiton @ 2004-03-29 8:12 UTC (permalink / raw)
To: Harald Welte; +Cc: netfilter-devel
Harald Welte wrote:
>On Sat, Mar 27, 2004 at 06:00:01PM +0200, Emmanuel Guiton wrote:
>
>
>>Hi!
>>
>>I need to translate sequence numbers between the two networks that are
>>separated by the firewall. In fact, I just need to translate on of them
>>(so tcph->ack_seq in one direction, and tcph->seq in the opposite
>>direction).
>>I found the ip_nat_seq stucture and the ip_nat_seq_adjust function but I
>>do not understand them. Particularly this "correction_pos", what is it?
>>
>>Could someone provide me with some explanations?
>>
>>
>
>It is for inserting/removing bytes from a TCP stream, as needed with NAT
>of protocols like FTP (IP address printed in ASCII has different length,
>compare strlen('1.1.1.1') to strlen('255.255.255.255').
>
>correction_pos is the position (sequence number) where the
>addition/subtraction occurred, and offset is the number of bytes added
>(positive) or removed (negative).
>
>
Ok, then it does not fit my problem. I will operate the change like for
the TCP port number.
Thanks!
Emmanuel
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2004-03-29 8:12 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-03-27 16:00 Sequence number translation explanations Emmanuel Guiton
2004-03-28 18:36 ` Harald Welte
2004-03-29 8:12 ` Emmanuel Guiton
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.