3 .\" Manual for the simple packet streamer
5 .\" (c) 2008 Straylight/Edgeware
8 .\"----- Licensing notice ---------------------------------------------------
10 .\" This file is part of Trivial IP Encryption (TrIPE).
12 .\" TrIPE is free software; you can redistribute it and/or modify
13 .\" it under the terms of the GNU General Public License as published by
14 .\" the Free Software Foundation; either version 2 of the License, or
15 .\" (at your option) any later version.
17 .\" TrIPE is distributed in the hope that it will be useful,
18 .\" but WITHOUT ANY WARRANTY; without even the implied warranty of
19 .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 .\" GNU General Public License for more details.
22 .\" You should have received a copy of the GNU General Public License
23 .\" along with TrIPE; if not, write to the Free Software Foundation,
24 .\" Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
26 .\"--------------------------------------------------------------------------
27 .so ../common/defs.man \" @@@PRE@@@
29 .\"--------------------------------------------------------------------------
30 .TH pkstream 1 "23 April 2003" "Straylight/Edgeware" "TrIPE: Trivial IP Encryption"
32 .\"--------------------------------------------------------------------------
35 pkstream \- forward UDP packets over streams
37 .\"--------------------------------------------------------------------------
56 .\"--------------------------------------------------------------------------
61 program forwards UDP packets over some kind of reliable stream. It
62 understands TCP sockets natively; anything else has to be fudged up
63 using some kind of port forwarder like
67 etc. It's intended, among other things, to provide a transport for
69 packets where there are annoying firewalls in the way.
70 .SS "Command-line arguments"
75 pairs on the command-line are respectively the UDP port that
77 should listen on, and the port which it should receive packets from and
82 will parse packets from the stream attached to its standard input and
83 send them to its UDP peer; and it will write packets it reads from its
84 UDP port to the stream attached to its standard output. The program
85 will quit when its input stream closes.
87 This behaviour can be modified by passing suitable options:
90 Writes a brief description of the command-line options available to
91 standard output and exits with status 0.
96 version number to standard output and exits with status 0.
99 Writes a brief usage summary to standard output and exits with status 0.
101 .BI "\-l, \-\-listen=" port
102 Listen for connections on the given TCP
104 Only one connection is allowed at a time. When a connection is
105 accepted, forward UDP packets over the TCP stream until it closes; then
106 wait for another connection.
108 .BI "\-p, \-\-peer=" addr
109 Only accept TCP connections from
111 This option only makes sense in conjunction with
114 .BI "\-b, \-\-bind=" addr
115 When making a connection (see
119 as the source address rather than letting the kernel choose the address
120 automatically. This is useful when the other end will only accept
121 connections from a particular address and you get the wrong one otherwise.
123 .BI "\-c, \-\-connect=" addr : port
128 and forward packets over the TCP connection rather than using stdin and
131 .\"--------------------------------------------------------------------------
134 The stream protocol is very simple. Each packet is preceded by a
135 two-octet length field in network byte order. The length is number of
136 octets in the following packet (i.e., it does
138 include the length field itself). There is no padding between packets.
139 The only way a stream can be invalid is if it stops in the middle of a
142 .\"--------------------------------------------------------------------------
145 The code hasn't been audited. It may contain security bugs. If you
146 find one, please inform the author
149 .\"--------------------------------------------------------------------------
157 .\"--------------------------------------------------------------------------
160 Mark Wooding, <mdw@distorted.org.uk>
162 .\"----- That's all, folks --------------------------------------------------