linux-ppp.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: James Carlson <carlsonj@workingcode.com>
To: linux-ppp@vger.kernel.org
Subject: Re: PPP compression
Date: Thu, 18 Dec 2014 21:24:39 +0000	[thread overview]
Message-ID: <54934617.403@workingcode.com> (raw)
In-Reply-To: <3b4526880d737ed5094d632636e6fef8@great.ufc.br>

On 12/18/14 15:49, arthurpaulino wrote:
> We configured a PPTP VPN server with no encryption. The compression
> algorithm negotiated during the connection phase is Deflate.

The simplest method (of course) would be to disable compression and just
avoid the issue.

But assuming you don't want to do that, there are two other options:

- If you're actually running pppd, you could use the "record" option
  to record raw data and then dump using pppdump.  That tool has a
  "-d" option to decompress this kind of data.

- If you're not running pppd, and have just GRE-encapsulated data
  captured off the network, then I suggest writing a small tool that
  will extract the PPP frames (ff 03 ...) and rewrite them to a file
  in the very simple format that pppdump expects so that you can use
  pppdump to display them.

The file format can be deduced by looking at the code in pppdump.c.
For a really trivial converter (payload only), you can use:

  01 LL LL ...   - sent data, where LLLL is the number of bytes in
                   big endian (network byte order) format.
  02 LL LL ...   - received data, same format.

Note that pppdump expects the data to be AHDLC encoded (!) so you
have to do that before doing the encoding above.  AHDLC is pretty
simple; replace any instance of 7D or 7E in the data with 7D 5D or 7D 5E
(respectively) and then end the frame with 7E.

-- 
James Carlson         42.703N 71.076W         <carlsonj@workingcode.com>

  reply	other threads:[~2014-12-18 21:24 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-18 20:49 PPP compression arthurpaulino
2014-12-18 21:24 ` James Carlson [this message]
2014-12-19 17:28 ` Arthur Paulino
2014-12-20 21:24 ` James Carlson
2014-12-21 18:37 ` Michael Richardson
2014-12-22 12:34 ` James Carlson
2014-12-22 18:06 ` arthurpaulino
2014-12-22 19:09 ` James Carlson

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=54934617.403@workingcode.com \
    --to=carlsonj@workingcode.com \
    --cc=linux-ppp@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).