1 /* 2 3 Copyright 2008--2013, Centre for Advanced Internet Architectures, 4 Swinburne University of Technology, http://caia.swin.edu.au 5 6 Author: Amiel Heyde, amiel@swin.edu.au 7 8 This program is free software; you can redistribute it and/or modify 9 it under the terms of the GNU General Public License version 2 as 10 published by the Free Software Foundation. 11 12 This program is distributed in the hope that it will be useful, 13 but WITHOUT ANY WARRANTY; without even the implied warranty of 14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 GNU General Public License for more details. 16 17 You should have received a copy of the GNU General Public License 18 along with this program; if not, write to the Free Software 19 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 20 21 $Id: spptool.h 175 2015-05-21 00:30:20Z szander $ 22 23 */ 24 25 #ifndef SPPTOOL_H 26 #define SPPTOOL_H 27 28 #define PRIVATE static 29 #define PUBLIC 30 31 #ifndef CONFIG 32 #include "config.h" 33 #endif 34 35 36 // Number of measure points 37 #define MP_COUNT 2 38 #define SDF 4 39 40 41 typedef enum DIR_TYPE {IN = 0, OUT = 1} direction_t; 42 typedef enum MON_ID_TYPE {REF = 0, MON = 1} mp_id_t; 43 // added use_firstpkt_time option --- David Hayes 44 typedef enum OPTIONS_TYPE { 45 46 /* 47 * Output the server processing time as a part of 48 * the normal SPP output line 49 * */ 50 output_spt = 1, 51 52 /* 53 * Output the pair count figure when SPP finishes 54 * running 55 * */ 56 output_pair_count = 2, 57 use_monitor_clock = 16, 58 59 /* 60 * When determining what time the RTT occured at, 61 * use the timestamp of the first packet instead 62 * of subtracting half of the RTT from the second 63 * packet timestamp. -b CLI flag. 64 * */ 65 use_firstpkt_time = 32, 66 run_slave = 256, 67 68 /* 69 * Append 'fake' (uncorrected) OWD in each direction to each RTT line, e.g. 70 * [<paircnt>] <timestamp> <RTT> [<spt>] OWDref2mon OWDmon2ref 71 * Note: The OWD are uncorrected in that we make no adjustment for clock 72 * offsets between REF and MON. This option is useful to track *relative* 73 * changes in OWD in each direciton, rather than infer anything about absolute OWDs. 74 * */ 75 output_fakeowd = 512, 76 77 /* 78 * When set: compile and activate a pcap filter rule such that only packets 79 * travelling between the nominated IP endpoints are passed to spp's processing loop. 80 * Pros: May improve performance. 81 * Cons: Implicitly limits us to seeing DLT_EN10MB frames, which precludes 82 * parsing .pcap files that contain other frame types recognised by instance.c:createInstance(), 83 * such as DLT_NULL or DLT_PPP frames. 84 * This flag is unset by default (for maximum versatility). 85 * */ 86 use_pcap_filter = 1024 87 88 } options_t; 89 90 91 typedef enum TS_CODE {ABSOLUTE = 0, OFFSET_1 = 1, OFFSET_2 = 2, OFFSET_3 = 3, OFFSET_4 = 4} ts_code_t; 92 93 typedef enum STATUS_TYPE {OK = 0, FILE_END = 1} status_t; //CHECK THIS HACK 94 95 typedef uint64_t (*HASH_FUNCTION)(uint64_t, const unsigned char *, uint64_t); 96 97 #endif 98