diff --git a/norp/doc/norpUserGuide.xml b/norp/doc/norpUserGuide.xml
index a79330a..5e37e1a 100644
--- a/norp/doc/norpUserGuide.xml
+++ b/norp/doc/norpUserGuide.xml
@@ -23,9 +23,8 @@
a remote norp peer is unavailable. This software
was developed by the Naval
Research Laboratory (NRL) PROTocol Engineering Advanced
- Networking Research Group.
- The NRL reference implementation of NORM used here is available from
- http://www.nrl.navy.mil/itd/ncs/products/norm.
@@ -127,9 +126,9 @@
norp [interface <ifaceName>][address <publicAddr>][sport <socksPort>][port <norpPort>]
[norm {on|off}][id <normId>][nport <normPort>][cce | ccl | rate <bits/sec>]
- [limit <bits/sec>][persist <seconds>][correspondent <remoteNorpAddr>]
- [forward <tcpPort>,<destAddr>/<destPort>[,<remoteNorpAddr>]][version][debug <level>]
- [trace][dlog <debugLog>][lport <localNorpPort>][rport <remoteNorpPort>]
+ [limit <bits/sec>][persist <seconds>][segment <segmentSize>]
+ [correspondent <remoteNorpAddr>][forward <tcpPort>,<destAddr>/<destPort>[,<remoteNorpAddr>]]
+ [version][debug <level>][trace][dlog <debugLog>][lport <localNorpPort>][rport <remoteNorpPort>]
The norp program command-line options
include ...
@@ -290,6 +289,26 @@
the limit enforcement.
+
+ segment <segmentSize>
+
+ This option sets the NORM protocol maximum packet payload
+ size where is <segmentSize> is in
+ units of bytes. . For norp that uses the
+ NORM_OBJECT_STREAM, the maximum NORM UDP payload size is 40 bytes
+ of NORM header plus the configured segment size. The resultant
+ total maximum IPv4 UDP packet size (including IP and UDP headers)
+ is then 28 + 40 + <segmentSize>
+ bytes. For IPv6, the resultant maximum packet size is 48 + 40 +
+ <segmentSize> bytes. The default NORM
+ segment size, if this option is not invoked, is 1400 bytes,
+ resulting in NORM UDP packets with 1440 byte payloads. Thus, for
+ IPv4 that has 28 bytes of IP + UDP header, this results in a
+ maximum norp packet size of 1468 bytes while,
+ for IPv6, the maximum norp packet size would
+ be 1488 bytes.
+
+
correspondent
<remoteNorpAddr>
@@ -504,7 +523,7 @@
ACK_REP
- The message is used to acknoledge receipt of a SOCKS_REP
+ The message is used to acknowledge receipt of a SOCKS_REP
message. There is no "content".
diff --git a/norp/include/norpVersion.h b/norp/include/norpVersion.h
index c3ad7d0..cd8aefc 100644
--- a/norp/include/norpVersion.h
+++ b/norp/include/norpVersion.h
@@ -1,3 +1,3 @@
#ifndef _NORP_VERSION
-#define NORP_VERSION "0.1b5"
+#define NORP_VERSION "0.1b6"
#endif // NORP_VERSION
diff --git a/norp/src/common/norpApp.cpp b/norp/src/common/norpApp.cpp
index df6cb89..4acd460 100644
--- a/norp/src/common/norpApp.cpp
+++ b/norp/src/common/norpApp.cpp
@@ -47,9 +47,10 @@ NorpApp::~NorpApp()
void NorpApp::Usage()
{
fprintf(stderr, "Usage: norp [interface ][address ][sport ][port ]\n"
- " [norm {on|off}][id ][nport ][cce | ccl | rate ][persist ][limit ]\n"
- " [correspondent ][forward ,/[,]][version]\n"
- " [debug ][trace][dlog ][lport ][rport ]\n");
+ " [norm {on|off}][id ][nport ][cce | ccl | rate ]\n"
+ " [limit ][persist ][segment ]\n"
+ " [correspondent ][forward ,/[,]]\n"
+ " [version][debug ][trace][dlog ][lport ][rport ]\n");
}
const char* const NorpApp::CMD_LIST[] =
@@ -64,7 +65,8 @@ const char* const NorpApp::CMD_LIST[] =
"-cce", // Use NORM-CCE instead of NORM-CC
"-ccl", // Use NORM-CCL instead of NORM-CC
"+rate", // set fixed transmit rate (no congestion control)
- "+limit", // set _cumulaltive_ NORP transmit rate limit
+ "+limit", // set _cumulative_ NORP transmit rate limit
+ "+segment", // Set NORM packet segment size (impacts MTU of NORM packets, UDP packets w/ (40 + ) bytes of payload)
"+persist", // how long to persist NORM data delivery to receiver after TCP socket closure
"+debug", // set debug level
"-trace", // enables NORM protocol packet send/recv trace in debug output
@@ -277,6 +279,16 @@ bool NorpApp::OnCommand(const char* cmd, const char* val)
}
norp.SetNormTxLimit(txLimit);
}
+ else if (!strncmp("segment", cmd, len))
+ {
+ UINT16 segmentSize;
+ if (1 != sscanf(val, "%hu", &segmentSize))
+ {
+ PLOG(PL_ERROR, "NorpApp::OnCommand(segment) error: invalid segment size \"%s\" bps\n", val);
+ return false;
+ }
+ norp.SetNormSegmentSize(segmentSize);
+ }
else if (!strncmp("lport", cmd, len))
{
norp.SetLocalNorpPort(atoi(val));