Commit 4c518f9c authored by Robert Ricci's avatar Robert Ricci

Copyrights

parent 91b7f2c7
/*
* EMULAB-COPYRIGHT
* Copyright (c) 2006 University of Utah and the Flux Group.
* All rights reserved.
*/
// CircularTraffic.cc
#include "lib.h"
......
/*
* EMULAB-COPYRIGHT
* Copyright (c) 2006 University of Utah and the Flux Group.
* All rights reserved.
*/
// CircularTraffic.h
#ifndef CIRCULAR_TRAFFIC_H_STUB_2
......
/*
* EMULAB-COPYRIGHT
* Copyright (c) 2006 University of Utah and the Flux Group.
* All rights reserved.
*/
// Command.cc
#include "lib.h"
......
/*
* EMULAB-COPYRIGHT
* Copyright (c) 2006 University of Utah and the Flux Group.
* All rights reserved.
*/
// Command.h
#ifndef COMMAND_H_STUB_2
......
/*
* EMULAB-COPYRIGHT
* Copyright (c) 2006 University of Utah and the Flux Group.
* All rights reserved.
*/
// CommandInput.h
// This is the abstract base class for various kinds of control
......
/*
* EMULAB-COPYRIGHT
* Copyright (c) 2006 University of Utah and the Flux Group.
* All rights reserved.
*/
// CommandOutput.h
// This is the base class which abstracts the messages sent to the monitor.
......
/*
* EMULAB-COPYRIGHT
* Copyright (c) 2006 University of Utah and the Flux Group.
* All rights reserved.
*/
// Connection.cc
#include "lib.h"
......
/*
* EMULAB-COPYRIGHT
* Copyright (c) 2006 University of Utah and the Flux Group.
* All rights reserved.
*/
// Connection.h
#ifndef CONNECTION_H_STUB_2
......
/*
* EMULAB-COPYRIGHT
* Copyright (c) 2006 University of Utah and the Flux Group.
* All rights reserved.
*/
// ConnectionModel.h
#ifndef CONNECTION_MODEL_H_PELAB_2
......
/*
* EMULAB-COPYRIGHT
* Copyright (c) 2006 University of Utah and the Flux Group.
* All rights reserved.
*/
// Decayer.cc
#include "lib.h"
......
/*
* EMULAB-COPYRIGHT
* Copyright (c) 2006 University of Utah and the Flux Group.
* All rights reserved.
*/
// Decayer.h
// This is for an old value which will decay over time. We still want
......
/*
* EMULAB-COPYRIGHT
* Copyright (c) 2006 University of Utah and the Flux Group.
* All rights reserved.
*/
// DelaySensor.cc
#include "lib.h"
......
/*
* EMULAB-COPYRIGHT
* Copyright (c) 2006 University of Utah and the Flux Group.
* All rights reserved.
*/
// DelaySensor.h
#ifndef DELAY_SENSOR_H_STUB_2
......
/*
* EMULAB-COPYRIGHT
* Copyright (c) 2006 University of Utah and the Flux Group.
* All rights reserved.
*/
// DirectInput.cc
#include "lib.h"
......
/*
* EMULAB-COPYRIGHT
* Copyright (c) 2006 University of Utah and the Flux Group.
* All rights reserved.
*/
// DirectInput.h
#ifndef DIRECT_INPUT_H_STUB_2
......
/*
* EMULAB-COPYRIGHT
* Copyright (c) 2006 University of Utah and the Flux Group.
* All rights reserved.
*/
// EwmaThroughputSensor.cc
#include "lib.h"
......
/*
* EMULAB-COPYRIGHT
* Copyright (c) 2006 University of Utah and the Flux Group.
* All rights reserved.
*/
// EwmaThroughputSensor.h
#ifndef EWMA_THROUGHPUT_SENSOR_H_STUB_2
......
/*
* EMULAB-COPYRIGHT
* Copyright (c) 2006 University of Utah and the Flux Group.
* All rights reserved.
*/
// KernelTcp.cc
#include "lib.h"
......
/*
* EMULAB-COPYRIGHT
* Copyright (c) 2006 University of Utah and the Flux Group.
* All rights reserved.
*/
// KernelTcp.h
#ifndef KERNEL_TCP_H_PELAB_2
......
/*
* EMULAB-COPYRIGHT
* Copyright (c) 2006 University of Utah and the Flux Group.
* All rights reserved.
*/
// LeastSquaresThroughput.cc
#include "lib.h"
......
/*
* EMULAB-COPYRIGHT
* Copyright (c) 2006 University of Utah and the Flux Group.
* All rights reserved.
*/
// LeastSquaresThroughput.h
// Algorithm based on the equations at:
......
/*
* EMULAB-COPYRIGHT
* Copyright (c) 2006 University of Utah and the Flux Group.
* All rights reserved.
*/
// MaxDelaySensor.cc
#include "lib.h"
......
/*
* EMULAB-COPYRIGHT
* Copyright (c) 2006 University of Utah and the Flux Group.
* All rights reserved.
*/
// MaxDelaySensor.h
#ifndef MAX_DELAY_SENSOR_H_STUB_2
......
/*
* EMULAB-COPYRIGHT
* Copyright (c) 2006 University of Utah and the Flux Group.
* All rights reserved.
*/
// MinDelaySensor.cc
#include "lib.h"
......
/*
* EMULAB-COPYRIGHT
* Copyright (c) 2006 University of Utah and the Flux Group.
* All rights reserved.
*/
// MinDelaySensor.h
// This sensor keeps track of the lowest delay seen recently. The
......
/*
* EMULAB-COPYRIGHT
* Copyright (c) 2006 University of Utah and the Flux Group.
* All rights reserved.
*/
// PacketSensor.cc
#include "lib.h"
......@@ -167,6 +173,40 @@ void PacketSensor::localSend(PacketInfo * packet)
SentPacket record;
record.seqStart = startSequence;
<<<<<<< PacketSensor.cc
/*
* Calculate the packet payload size - we have to make sure to
* take into account IP and TCP option headers
*/
unsigned int sequenceLength =
// Total length of the IP part of the packet
(ntohs(packet->ip->ip_len))
// Total length of all IP headers (including options)
- (packet->ip->ip_hl*4)
// Total length of all TCP headers (including options)
<<<<<<< PacketSensor.cc
- (packet->tcp->doff*4);
record.seqEnd = record.seqStart + sequenceLength;
record.totalLength = packet->packetLength;
record.timestamp = packet->packetTime;
logWrite(SENSOR,
<<<<<<< PacketSensor.cc
"PacketSensor::localSend() new record: ss=%i,sl=%i,se=%i,tl=%i",
record.seqStart,record.sequenceLength,record.seqEnd,
record.totalLength);
=======
"PacketSensor::localSend() new record: ss=%u,sl=%u,se=%u,tl=%u",
record.seqStart, sequenceLength, record.seqEnd,
record.totalLength);
>>>>>>> 1.5
globalSequence.seqEnd = record.seqEnd;
if (unacked.empty())
{
globalSequence.seqStart = record.seqStart;
=======
- (packet->tcp->doff*4);
=======
>>>>>>> 1.27
// We want to get the sequence number of the last data byte, not the
// sequence number of the first byte of the next segment
record.seqEnd = record.seqStart + sequenceLength - 1;
......@@ -176,6 +216,11 @@ void PacketSensor::localSend(PacketInfo * packet)
"PacketSensor::localSend() new record: ss=%u,sl=%u,se=%u,tl=%u",
record.seqStart, sequenceLength, record.seqEnd,
record.totalLength);
<<<<<<< PacketSensor.cc
>>>>>>> 1.11
globalSequence.seqEnd = record.seqEnd;
=======
>>>>>>> 1.16
if (unacked.empty())
{
globalSequence.seqStart = record.seqStart;
......
/*
* EMULAB-COPYRIGHT
* Copyright (c) 2006 University of Utah and the Flux Group.
* All rights reserved.
*/
// PacketSensor.h
// This sensor keeps track of unacknowledged packets.
......
/*
* EMULAB-COPYRIGHT
* Copyright (c) 2006 University of Utah and the Flux Group.
* All rights reserved.
*/
// Sensor.cc
#include "lib.h"
......
/*
* EMULAB-COPYRIGHT
* Copyright (c) 2006 University of Utah and the Flux Group.
* All rights reserved.
*/
// Sensor.h
// This is the abstract base class for all of the individual
......
/*
* EMULAB-COPYRIGHT
* Copyright (c) 2006 University of Utah and the Flux Group.
* All rights reserved.
*/
// SensorList.cc
#include "lib.h"
......
/*
* EMULAB-COPYRIGHT
* Copyright (c) 2006 University of Utah and the Flux Group.
* All rights reserved.
*/
// SensorList.h
// This is the class for managing sensors and their dependencies. When
......
/*
* EMULAB-COPYRIGHT
* Copyright (c) 2006 University of Utah and the Flux Group.
* All rights reserved.
*/
// StateSensor.cc
#include "lib.h"
......
/*
* EMULAB-COPYRIGHT
* Copyright (c) 2006 University of Utah and the Flux Group.
* All rights reserved.
*/
// StateSensor.h
#ifndef STATE_SENSOR_H_STUB_2
......
/*
* EMULAB-COPYRIGHT
* Copyright (c) 2006 University of Utah and the Flux Group.
* All rights reserved.
*/
// TSThroughputSensor.cc
#include "lib.h"
......
/*
* EMULAB-COPYRIGHT
* Copyright (c) 2006 University of Utah and the Flux Group.
* All rights reserved.
*/
/*
* TSThroughputSensor.h
* NOTE: This file is very similar to ThroughputSensor.h - however, it uses
......
/*
* EMULAB-COPYRIGHT
* Copyright (c) 2006 University of Utah and the Flux Group.
* All rights reserved.
*/
// ThroughputSensor.cc
#include "lib.h"
......
/*
* EMULAB-COPYRIGHT
* Copyright (c) 2006 University of Utah and the Flux Group.
* All rights reserved.
*/
// ThroughputSensor.h
// For every ack, this calculates the
......
/*
* EMULAB-COPYRIGHT
* Copyright (c) 2006 University of Utah and the Flux Group.
* All rights reserved.
*/
// Time.cc
#include "lib.h"
......
/*
* EMULAB-COPYRIGHT
* Copyright (c) 2006 University of Utah and the Flux Group.
* All rights reserved.
*/
// Time.h
#ifndef TIME_H_STUB_2
......
/*
* EMULAB-COPYRIGHT
* Copyright (c) 2006 University of Utah and the Flux Group.
* All rights reserved.
*/
// TrafficModel.h
#ifndef TRAFFIC_MODEL_H_STUB_2
......
/*
* EMULAB-COPYRIGHT
* Copyright (c) 2006 University of Utah and the Flux Group.
* All rights reserved.
*/
// TrivialCommandOutput.cc
#include "lib.h"
......
/*
* EMULAB-COPYRIGHT
* Copyright (c) 2006 University of Utah and the Flux Group.
* All rights reserved.
*/
// TrivialCommandOutput.h
#ifndef TRIVIAL_COMMAND_OUTPUT_H_STUB_2
......
#!/bin/sh
#
# EMULAB-COPYRIGHT
# Copyright (c) 2006 University of Utah and the Flux Group.
# All rights reserved.
#
ARGS=$*
......
/*
* EMULAB-COPYRIGHT
* Copyright (c) 2006 University of Utah and the Flux Group.
* All rights reserved.
*/
// lib.h
#ifndef LIB_H_PELAB_2
......@@ -268,5 +274,7 @@ namespace global
extern std::auto_ptr<CommandInput> input;
extern std::auto_ptr<CommandOutput> output;
extern int logFlags;
}
#endif
/*
* EMULAB-COPYRIGHT
* Copyright (c) 2006 University of Utah and the Flux Group.
* All rights reserved.
*/
// log.c
#include "lib.h"
......
/*
* EMULAB-COPYRIGHT
* Copyright (c) 2006 University of Utah and the Flux Group.
* All rights reserved.
*/
// log.h
#ifndef _LOG_H
......
/*
* EMULAB-COPYRIGHT
* Copyright (c) 2006 University of Utah and the Flux Group.
* All rights reserved.
*/
// main.cc
#include "lib.h"
......@@ -43,6 +49,8 @@ namespace global
std::auto_ptr<CommandInput> input;
std::auto_ptr<CommandOutput> output;
int logFlags = LOG_EVERYTHING /*& ~SENSOR_COMPLETE*/;
}
void usageMessage(char *progname);
......@@ -92,6 +100,7 @@ void usageMessage(char *progname)
cerr << " --replay-save=<filename> " << endl;
cerr << " --replay-load=<filename> " << endl;
cerr << " --replay-sensor=<null|state|packet|delay|min-delay|max-delay|throughput|ewma-throughput|leastsquares-throughput>" << endl;
cerr << " --less-logging" << endl;
logWrite(ERROR, "Bad command line argument", global::connectionModelArg);
}
......@@ -117,11 +126,12 @@ void processArgs(int argc, char * argv[])
{"replay-save", required_argument, NULL, 's'},
{"replay-load", required_argument, NULL, 'l'},
{"replay-sensor", required_argument, NULL, 'n'},
{"less-logging", no_argument , NULL, 'L'},
// Required so that getopt_long can find the end of the list
{NULL, 0, NULL, 0}
};
string shortOptions = "c:p:m:i:ds:l:";
string shortOptions = "c:p:m:i:ds:l:L";
// Not used
int longIndex;
......@@ -283,6 +293,9 @@ void processArgs(int argc, char * argv[])
exit(1);
}
break;
case 'L':
logFlags = ERROR & EXCEPTION;
break;
case '?':
default:
usageMessage(argv[0]);
......@@ -296,7 +309,7 @@ void init(void)
FD_ZERO(&global::readers);
global::maxReader = -1;
logInit(stderr, LOG_EVERYTHING /*& ~SENSOR_COMPLETE*/, true);
logInit(stderr, logFlags, true);
/*
* Install a signal handler so that we can catch control-C's, etc.
......
#!/bin/sh
#
# EMULAB-COPYRIGHT
# Copyright (c) 2006 University of Utah and the Flux Group.
# All rights reserved.
#
#
# Script to run the monitoring agent
#
......
/*
* EMULAB-COPYRIGHT
* Copyright (c) 2006 University of Utah and the Flux Group.
* All rights reserved.
*/
// saveload.cc
#include "lib.h"
......
/*
* EMULAB-COPYRIGHT
* Copyright (c) 2006 University of Utah and the Flux Group.
* All rights reserved.
*/
// saveload.h
#ifndef SAVE_LOAD_H_STUB_2
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment