All of lore.kernel.org
 help / color / mirror / Atom feed
From: Emmanuel Guiton <emmanuel@netlab.hut.fi>
To: Harald Welte <laforge@netfilter.org>
Cc: netfilter-devel@lists.netfilter.org
Subject: Re: Sequence number translation explanations.
Date: Mon, 29 Mar 2004 11:12:15 +0300	[thread overview]
Message-ID: <4067DA5F.9020102@netlab.hut.fi> (raw)
In-Reply-To: 20040328183643.GW7039@sunbeam.de.gnumonks.org


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

      reply	other threads:[~2004-03-29  8:12 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4067DA5F.9020102@netlab.hut.fi \
    --to=emmanuel@netlab.hut.fi \
    --cc=laforge@netfilter.org \
    --cc=netfilter-devel@lists.netfilter.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.