normStreamer example tweak
parent
63d266f0b5
commit
ad31a1a32a
|
|
@ -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");
|
||||
|
|
|
|||
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Reference in New Issue