Merge branch 'master' into emul

This commit is contained in:
Srivats P 2015-12-01 19:16:24 +05:30
commit bed034a08b
6 changed files with 35 additions and 9 deletions

19
.travis.yml Normal file
View File

@ -0,0 +1,19 @@
language: cpp
compiler:
- gcc
- clang
addons:
apt:
packages:
- libqt4-dev
- qt4-qmake
- libpcap-dev
- libprotobuf-dev
- protobuf-compiler
script:
- qmake
- make

View File

@ -1,7 +1,12 @@
# Ostinato
[![Build Status](https://travis-ci.org/pstavirs/ostinato.svg?branch=master)](https://travis-ci.org/pstavirs/ostinato)
Ostinato is an open-source, cross-platform network packet crafter/traffic generator and analyzer with a friendly GUI. Craft and send packets of several streams with different protocols at different rates.
Ostinato aims to be "Wireshark in Reverse" and become complementary to Wireshark.
License: GPLv3+ (see COPYING)
For more information visit http://ostinato.org.

View File

@ -80,9 +80,8 @@ bool PythonFileFormat::saveStreams(const OstProto::StreamConfigList streams,
refl->ListFields(protocol, &fields);
for (uint k = 0; k < fields.size(); k++) {
// skip protocol_id field
if (fields.at(k)->number() ==
OstProto::Protocol::kProtocolIdFieldNumber)
// skip non extension fields
if (!fields.at(k)->is_extension())
continue;
if (fields.at(k)->file()->name() !=
@ -199,7 +198,8 @@ bool PythonFileFormat::saveStreams(const OstProto::StreamConfigList streams,
OstProto::Protocol::kProtocolIdFieldNumber)
continue;
QString pfx(" p.Extensions[X]");
pfx.replace("X", fields.at(k)->name().c_str());
pfx.replace(fields.at(k)->is_extension()? "X": "Extensions[X]",
fields.at(k)->name().c_str());
writeFieldAssignment(out, pfx, protocol,
refl, fields.at(k));
}

View File

@ -253,7 +253,11 @@ QVariant UdpProtocol::fieldData(int index, FieldAttrib attrib,
if (data.is_override_cksum())
cksum = data.cksum();
else
{
cksum = protocolFrameCksum(streamIndex, CksumTcpUdp);
if (cksum == 0)
cksum = 0xFFFF;
}
qDebug("UDP cksum = %hu", cksum);
break;
}

View File

@ -207,10 +207,8 @@ void AbstractPort::updatePacketListSequential()
case OstProto::StreamControl::e_su_bursts:
burstSize = streamList_[i]->burstSize();
x = AbstractProtocol::lcm(frameVariableCount, burstSize);
n = ulong(burstSize * streamList_[i]->burstRate()
* streamList_[i]->numBursts()) / x;
y = ulong(burstSize * streamList_[i]->burstRate()
* streamList_[i]->numBursts()) % x;
n = ulong(burstSize * streamList_[i]->numBursts()) / x;
y = ulong(burstSize * streamList_[i]->numBursts()) % x;
if (streamList_[i]->burstRate() > 0)
{
ibg = 1e9/double(streamList_[i]->burstRate());

View File

@ -1,5 +1,5 @@
APP_VERSION = 0.7.1
APP_REVISION = $(shell hg identify -i)
APP_REVISION = $(shell git rev-parse --short=12 --verify HEAD)
#uncomment the below line in a source package and fill-in the correct revision
#APP_REVISION = <rev-hash>@