diff --git a/examples/normStreamer.cpp b/examples/normStreamer.cpp index b7db6ad..76248b0 100644 --- a/examples/normStreamer.cpp +++ b/examples/normStreamer.cpp @@ -576,6 +576,8 @@ bool NormStreamer::OpenNormSession(NormInstanceHandle instance, const char* addr NormSetGrttProbingTOS(norm_session, probe_tos); + NormSetFragmentation(norm_session, true); // so that IP ID gets set for SMF DPD + return true; } // end NormStreamer::OpenNormSession() @@ -1459,7 +1461,11 @@ int main(int argc, char* argv[]) int tos = -1; int result = sscanf(argv[i], "%i", &tos); if (1 != result) - result = sscanf(argv[i], "%x", &tos); + { + unsigned int utos; + result = sscanf(argv[i], "%x", &utos); + tos = utos; + } if ((1 != result) || (tos < 0) || (tos > 255)) { fprintf(stderr, "normStreamer error: invalid 'ptos' value!\n"); diff --git a/src/common/normSession.cpp b/src/common/normSession.cpp index 0d8f555..e715f1a 100644 --- a/src/common/normSession.cpp +++ b/src/common/normSession.cpp @@ -5110,12 +5110,15 @@ bool NormSession::RawSendTo(const char* buffer, unsigned int& numBytes, const Pr etherDst = PROTO_ADDR_BROADCAST; ethPkt.SetDstAddr(etherDst); + + if (ecn_enabled) { trafficClass |= ((UINT8)ProtoSocket::ECN_ECT0); // set ECT0 bit trafficClass &= ~((UINT8)ProtoSocket::ECN_ECT1); // clear ECT1 bit } + //TRACE("sending RAW with tos 0x%02x (probe_tos 0x%02x\n", trafficClass, probe_tos); switch (dstAddr.GetType()) { case ProtoAddress::IPv4: