├── .gitattributes ├── .github └── workflows │ └── project_auto_add_issue.yml ├── .gitignore ├── .gitmodules ├── LICENSE ├── Makefile ├── owamp ├── Makefile └── owamp │ ├── CHANGES │ ├── ChangeLog │ ├── Doxyfile │ ├── INSTALL │ ├── LICENSE │ ├── Makefile.am │ ├── NOTES │ ├── README │ ├── README.md │ ├── RELEASE.TODO │ ├── TODO.txt │ ├── bench │ ├── timeintervals.c │ └── timesyscall.c │ ├── bootstrap │ ├── conf │ ├── Makefile.am │ ├── owampd-cleanup │ ├── owampd.conf │ ├── owampd.init │ ├── owampd.limits │ ├── owampd.rpm.conf │ ├── owampd.service │ ├── twampd.conf │ ├── twampd.init │ ├── twampd.limits │ ├── twampd.rpm.conf │ └── twampd.service │ ├── config │ ├── c-attribute.m4 │ ├── compile │ ├── config.guess │ ├── config.sub │ ├── depcomp │ ├── install-sh │ ├── missing │ └── test-driver │ ├── configure.ac │ ├── design │ ├── api_design │ ├── control_flow │ ├── decisions │ └── usage_scenerios │ ├── doc │ ├── Makefile.am │ ├── details.html │ ├── draft-shalunov-reordering-definition-02.txt │ ├── index.html │ ├── milestones.html │ ├── nwampd_conf_desc.man │ ├── nwampd_limits_desc.man │ ├── nwampd_opts.man │ ├── owamp-cookbook.doc │ ├── owamp-cookbook.pdf │ ├── owamp-server.conf.ms │ ├── owamp-server.limits.ms │ ├── owamp-server.pfs.man │ ├── owamp_arch.graffle │ ├── owamp_arch.png │ ├── owamp_arch.vsd │ ├── owamp_firewalls.html │ ├── owamp_infosheet.pdf │ ├── owampd.ms │ ├── owfetch.ms │ ├── owping.ms │ ├── owping_conn_opts.man │ ├── owping_out_opts.man │ ├── owping_report.man │ ├── owping_test_opts.man │ ├── owstats.ms │ ├── owup.ms │ ├── powstream.man │ ├── twamp-server.conf.ms │ ├── twamp-server.limits.ms │ ├── twamp-server.pfs.man │ ├── twampd.ms │ └── twping.ms │ ├── exp-spec.txt │ ├── exp-vector │ ├── boxes-ref.dat │ ├── rijndael-alg-ref.c │ ├── rijndael-alg-ref.h │ ├── rijndael-api-ref.c │ ├── rijndael-api-ref.h │ ├── table.128 │ ├── table.192 │ ├── table.256 │ └── vector.c │ ├── externals.txt │ ├── owamp │ ├── Makefile.am │ ├── api.c │ ├── arithm64.c │ ├── bc.txt │ ├── capi.c │ ├── config.h.in │ ├── context.c │ ├── endpoint.c │ ├── error.c │ ├── io.c │ ├── owamp.h │ ├── owampP.h │ ├── protocol.c │ ├── ques.dat │ ├── rijndael-alg-fst.c │ ├── rijndael-alg-fst.h │ ├── rijndael-api-fst.c │ ├── rijndael-api-fst.h │ ├── rijndael-test-fst.c │ ├── sapi.c │ ├── schedule.c │ ├── stats.c │ ├── table.128 │ └── time.c │ ├── owampd │ ├── Makefile.am │ ├── fts.c │ ├── fts.h │ ├── owampd.c │ ├── owampdP.h │ ├── policy.c │ ├── policy.h │ └── twampd.c │ ├── owping │ ├── Makefile.am │ ├── owping.c │ ├── owpingP.h │ └── twping.c │ ├── powstream │ ├── Makefile.am │ ├── powstream.c │ └── powstreamP.h │ ├── selinux │ ├── Makefile.am │ ├── owamp-server.fc │ ├── owamp-server.te │ ├── twamp-server.fc │ └── twamp-server.te │ ├── test │ ├── Makefile.am │ ├── README │ ├── e2e_utils.c │ ├── e2e_utils.h │ ├── hmac.c │ ├── owe2e_auth.c │ ├── owe2e_clear.c │ ├── owe2e_enc.c │ ├── owping_clear.c │ ├── owping_enc.c │ ├── owstats.c │ ├── owtest_utils.c │ ├── owtest_utils.h │ ├── owtvec.c │ ├── server.c │ ├── server.h │ ├── session_setup.c │ ├── session_setup.h │ ├── twe2e_auth.c │ ├── twe2e_clear.c │ ├── twe2e_enc.c │ ├── twping_clear.c │ └── twping_enc.c │ └── unibuild-packaging │ ├── deb │ ├── apparmor │ │ ├── usr.sbin.owampd │ │ └── usr.sbin.twampd │ ├── changelog │ ├── compat │ ├── control │ ├── copyright │ ├── owamp-client.doc │ ├── owamp-client.install │ ├── owamp-client.postinst │ ├── owamp-server.init │ ├── owamp-server.install │ ├── owamp-server.postinst │ ├── owamp-server.postrm │ ├── owamp-server.preinst │ ├── owamp-server.service │ ├── patches │ │ ├── autotools.diff │ │ ├── man.diff │ │ └── series │ ├── rules │ ├── source │ │ └── format │ ├── tests │ │ ├── control │ │ ├── owampd │ │ ├── owping │ │ ├── owstats │ │ ├── owup │ │ ├── twampd │ │ └── twping │ ├── twamp-client.install │ ├── twamp-client.postinst │ ├── twamp-server.init │ ├── twamp-server.install │ ├── twamp-server.postinst │ ├── twamp-server.postrm │ └── twamp-server.service │ ├── owamp-00-root-test.patch │ └── rpm │ └── owamp.spec └── unibuild-order /.gitattributes: -------------------------------------------------------------------------------- 1 | # Ignore those files when creating a tarball with `git archive` 2 | debian/ export-ignore 3 | distribution/ export-ignore 4 | -------------------------------------------------------------------------------- /.github/workflows/project_auto_add_issue.yml: -------------------------------------------------------------------------------- 1 | name: Adds all new issues to project board 2 | 3 | on: 4 | issues: 5 | types: 6 | - opened 7 | 8 | jobs: 9 | add-to-project: 10 | name: Add issue to perfSONAR project 11 | runs-on: ubuntu-latest 12 | steps: 13 | # NOTE: "uses" cannot be a variable so name and version hard-coded here 14 | - uses: actions/add-to-project@v0.5.0 15 | with: 16 | project-url: ${{ vars.PROJECT_PS_URL }} 17 | github-token: ${{ secrets.PAT_PROJECT_PS_AUTO_ADD }} -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Ignore mac hidden file 2 | .DS_Store 3 | # Ignore quilt cache directory 4 | .pc/ 5 | # Ignore unibuild files 6 | unibuild-log 7 | unibuild-work/ 8 | unibuild-repo/ 9 | multiarch_build/ 10 | #Ignore autoconf, automake and make results 11 | *.o 12 | .powlock 13 | owamp/owamp/Makefile 14 | owamp/owamp/Makefile.in 15 | owamp/owamp/aclocal.m4 16 | owamp/owamp/autom4te.cache/ 17 | owamp/owamp/conf/Makefile 18 | owamp/owamp/conf/Makefile.in 19 | owamp/owamp/config.log 20 | owamp/owamp/config.status 21 | owamp/owamp/config/compile 22 | owamp/owamp/config/config.guess 23 | owamp/owamp/config/config.sub 24 | owamp/owamp/config/depcomp 25 | owamp/owamp/config/install-sh 26 | owamp/owamp/config/missing 27 | owamp/owamp/config/test-driver 28 | owamp/owamp/configure 29 | owamp/owamp/doc/Makefile 30 | owamp/owamp/doc/Makefile.in 31 | owamp/owamp/doc/owampd.man 32 | owamp/owamp/doc/owamp-server.conf.man 33 | owamp/owamp/doc/owamp-server.limits.man 34 | owamp/owamp/doc/owfetch.man 35 | owamp/owamp/doc/owping.man 36 | owamp/owamp/doc/owstats.man 37 | owamp/owamp/doc/owup.man 38 | owamp/owamp/doc/twampd.man 39 | owamp/owamp/doc/twamp-server.conf.man 40 | owamp/owamp/doc/twamp-server.limits.man 41 | owamp/owamp/doc/twping.man 42 | owamp/owamp/owamp.spec 43 | owamp/owamp/owamp/.deps/ 44 | owamp/owamp/owamp/Makefile 45 | owamp/owamp/owamp/Makefile.in 46 | owamp/owamp/owamp/config.h 47 | owamp/owamp/owamp/config.h.in 48 | owamp/owamp/owamp/libowamp.a 49 | owamp/owamp/owamp/stamp-h.in 50 | owamp/owamp/owamp/stamp-h1 51 | owamp/owamp/owampd/.deps/ 52 | owamp/owamp/owampd/Makefile 53 | owamp/owamp/owampd/Makefile.in 54 | owamp/owamp/owampd/owampd 55 | owamp/owamp/owampd/twampd 56 | owamp/owamp/owping/.deps/ 57 | owamp/owamp/owping/Makefile 58 | owamp/owamp/owping/Makefile.in 59 | owamp/owamp/owping/owfetch 60 | owamp/owamp/owping/owping 61 | owamp/owamp/owping/owstats 62 | owamp/owamp/owping/owup 63 | owamp/owamp/owping/twping 64 | owamp/owamp/powstream/.deps/ 65 | owamp/owamp/powstream/Makefile 66 | owamp/owamp/powstream/Makefile.in 67 | owamp/owamp/powstream/powstream 68 | owamp/owamp/test/.deps/ 69 | owamp/owamp/test/Makefile 70 | owamp/owamp/test/Makefile.in 71 | owamp/owamp/test/owtvec 72 | owamp/owamp/test/*.log 73 | owamp/owamp/test/*.trs 74 | owamp/owamp/test/hmac 75 | owamp/owamp/test/owe2e_auth 76 | owamp/owamp/test/owe2e_clear 77 | owamp/owamp/test/owe2e_enc 78 | owamp/owamp/test/owping_clear 79 | owamp/owamp/test/owping_enc 80 | owamp/owamp/test/owstats 81 | owamp/owamp/test/twe2e_auth 82 | owamp/owamp/test/twe2e_clear 83 | owamp/owamp/test/twe2e_enc 84 | owamp/owamp/test/twping_clear 85 | owamp/owamp/test/twping_enc 86 | owamp/owamp/selinux/Makefile 87 | owamp/owamp/selinux/Makefile.in 88 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/perfsonar/owamp/fcfa567ef7de26b36d4a94b3d82d71cf6ef52cc8/.gitmodules -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # Makefile for unibuild top-level directory 3 | # 4 | 5 | default: build 6 | 7 | 8 | BUILD_LOG=unibuild-log 9 | 10 | ifdef START 11 | UNIBUILD_OPTS += --start $(START) 12 | endif 13 | ifdef STOP 14 | UNIBUILD_OPTS += --stop $(STOP) 15 | endif 16 | 17 | # The shell command below does the equivalent of BASH's pipefail 18 | # within the confines of POSIX. 19 | # Source: https://unix.stackexchange.com/a/70675/15184 20 | build: 21 | rm -rf $(BUILD_LOG) 22 | ((( \ 23 | (unibuild build $(UNIBUILD_OPTS); echo $$? >&3) \ 24 | | tee $(BUILD_LOG) >&4) 3>&1) \ 25 | | (read XS; exit $$XS) \ 26 | ) 4>&1 27 | TO_CLEAN += $(BUILD_LOG) 28 | 29 | 30 | uninstall: 31 | unibuild make --reverse $@ 32 | 33 | fresh: uninstall build 34 | 35 | clean: 36 | unibuild make $(UNIBUILD_OPTS) clean 37 | unibuild clean 38 | rm -rf $(TO_CLEAN) 39 | find . -name '*~' | xargs rm -f 40 | -------------------------------------------------------------------------------- /owamp/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # Makefile for Any Package 3 | # 4 | AUTO_TARBALL := 1 5 | include unibuild/unibuild.make 6 | -------------------------------------------------------------------------------- /owamp/owamp/CHANGES: -------------------------------------------------------------------------------- 1 | A "functional" summary of changes to the code base are placed in 2 | this file. The complete set of change logs from Subversion can 3 | be seen in ChangeLog. The section from just the latest release 4 | can be seen in the main index.html bwctl documentation page in 5 | the doc dir. 6 | 7 | version 3.1 8 | * Minor protocol compliance fixes 9 | * RPM support 10 | * Documentation updates 11 | * Add packet reordering to -M output 12 | * Enable powstream to do both inbound and outbound tests 13 | -------------------------------------------------------------------------------- /owamp/owamp/INSTALL: -------------------------------------------------------------------------------- 1 | $Id$ 2 | 3 | Currently owamp has only been tested on FreeBSD - specifically versions 4.6 4 | and 4.7. 5 | 6 | The owamp software uses the "autoconf" tools to prepare a build process. It is 7 | distributed with a pre-built "configure" script - so the "autoconf" tools should 8 | not be needed. (gnumake may be required... I have not tried using other versions 9 | of make.) 10 | 11 | The simple build procedure would be: 12 | 13 | % gzip -cd owamp-$VERS.tar.gz | tar xf - 14 | % cd owamp-$VERS 15 | % ./configure --prefix=/inst/root 16 | % make 17 | % make install 18 | then 19 | * edit owamp-$VERS/conf/owampd.conf (modify datadir!) 20 | * copy owampd.conf to a config directory. (/inst/root/etc?) 21 | 22 | There is currently no build process to help build the owampd configuration 23 | file - or to build "init.d" scripts. There are some example configuration 24 | files in the $owamp/conf directory - I highly recommend you edit them 25 | before using them. 26 | 27 | To run the daemon: 28 | 29 | % owampd -c /path/to/confdir (/inst/root/etc in above) 30 | 31 | The daemon will run without an owampd configuration file if you use enough 32 | of the command-line flags - but it is much easier to use the config file. 33 | There is an example configuration file in $owampd/conf/owampd.conf (in the 34 | alpha release, this is the only config file used - ignore the others for now). 35 | The most important parameter to set is the "datadir". One-way tests "toward" 36 | owampd will not work if this is not set to a directory writable by the owampd 37 | process. 38 | 39 | To get the list of available options use: 40 | 41 | % owampd -h 42 | 43 | 44 | To run the client: 45 | 46 | % owping host.running.owampd 47 | 48 | This will run two one-way tests. One toward the named host, and one from. These 49 | two tests will happen immediately and concurrently. (The default average 50 | interval is 100 msec's and the default test length is 100 packets - so this test 51 | will take around 10 seconds.) 52 | 53 | To get the list of available options use: 54 | 55 | % owping -h 56 | 57 | 58 | To setup local authentication, create an owamp-server.pfs file using the 59 | pfstore I2util command. For more information see the owamp-server.pfs(5) 60 | man page: 61 | 62 | % pfstore -f owamp-server.pfs -n [username] 63 | 64 | Problems/Questions can be reported to owamp@internet2.edu 65 | -------------------------------------------------------------------------------- /owamp/owamp/Makefile.am: -------------------------------------------------------------------------------- 1 | # 2 | # $Id$ 3 | # 4 | ######################################################################### 5 | # # 6 | # Copyright (C) 2002 # 7 | # Internet2 # 8 | # All Rights Reserved # 9 | # # 10 | ######################################################################### 11 | # 12 | # File: Makefile.am 13 | # 14 | # Author: Jeff Boote 15 | # Internet2 16 | # 17 | # Date: Wed Apr 17 13:37:24 EDT 2002 18 | # 19 | # Description: toplevel build for owamp project 20 | # 21 | ACLOCAL_AMFLAGS = -I config 22 | SUBDIRS = @TOP_BUILD_DIRS@ owamp owampd owping conf powstream test doc selinux 23 | #SUBDIRS = owamp owampd owping owdigest conf powstream scripts 24 | 25 | EXTRA_DIST = LICENSE 26 | #EXTRA_DIST = bootstrap 27 | #MAINTAINERCLEANFILES = aclocal.m4 Makefile.in configure config.log \ 28 | # config.status 29 | -------------------------------------------------------------------------------- /owamp/owamp/NOTES: -------------------------------------------------------------------------------- 1 | $Id$ 2 | 3 | Implementation notes: 4 | 5 | Crypto algorithms: 6 | 7 | AES is done using rijndael reference implementation. C source 8 | files are in the owamp directory and included as part of 9 | libowamp.a. The AES implementation is used for 2 things. One 10 | it is used to encrypt data sent in encrypted mode. Second, 11 | it is used as part of the exponentially distributed pseudo-random 12 | number generator that is used to compute send schedules. 13 | 14 | SHA-1 is based on a public-domain version of SHA-1 written 15 | by Steve Reid . It has been modified to 16 | hopefully remove all type punning as well as changing 17 | symbol names to start with I2 so they do not interfere 18 | with other symbols. The implementation is in I2util/I2util 19 | and test vectors from FIPS 180-1 are run by "make check" in 20 | the I2util/test directory. SHA-1 is used as part of the 21 | HMAC-SHA1 algorithm. 22 | 23 | HMAC-SHA1 is original code. I was unable to find any public domain 24 | versions of HMAC-SHA1. (GNU does not count.) Therefore, I wrote my own 25 | version based on the information in rfc2104. The implementation is in 26 | I2util/I2util and test vectors from rfc2202 are run by "make check" 27 | in the I2util/test directory. HMAC-SHA1 is used for two 28 | things in the implementation. First, it is used to authenticate 29 | messages. Second, it is used as the pseudo-random function 30 | used in the key derivation function (PBKDF2). 31 | 32 | Likewise, I was unable to find a PBKDF2 without licensing restrictions. 33 | So, I wrote my own based on rfc2898. I verified my implementation 34 | using test vectors from rfc3962 (available in I2util/test with 35 | 'make check'). The PBKDF2 algorithm is used to derive session keys 36 | from the shared secret (pass-phrase) known by both the client and 37 | the server. 38 | 39 | Message Validation (HMAC check): 40 | The current implementation does not check the HMAC as early as 41 | it probably should when reading the StopSessions message. This 42 | message is of variable length, and the current code modifies 43 | the local 'recv' data files based on the data in the message 44 | as it reads it. It should probably validate the message first 45 | by reading the entire message in, checking the HMAC, and then 46 | acting on the data. (This is somewhat problematic in that the 47 | data is of variable length - it would probably be best to add 48 | some intermediate HMAC blocks into this message for the next 49 | version of the protocol - if/when that ever happens.) 50 | 51 | Protocol: 52 | FetchAck - session data 53 | When the server sends a FetchAck message - the session data follows. 54 | It could be clearer in the spec, but the HMAC within the reproduciton 55 | of the RequestSession message should be the 'new' HMAC. The new 56 | reproduction of the message is modified with actual start times 57 | and port numbers. Besides, the fetch could be happening over a completely 58 | different control session in which case the old HMAC is useless. 59 | -------------------------------------------------------------------------------- /owamp/owamp/README: -------------------------------------------------------------------------------- 1 | $Id$ 2 | 3 | owamp 4 | 5 | This release is an implementation of the OWAMP (one-way active measurement 6 | protocol) defined by 7 | http://www.internet2.edu/~shalunov/ippm/draft-ietf-ippm-owdp-14.txt. 8 | 9 | It is organized as follows: 10 | 11 | I2util/ convienient utility functions... Error reporting, hash funcs... 12 | owamp/ directory for owamp api - a high level abstraction for 13 | speaking the owamp protocol. 14 | owampd/ An owamp server implementation. 15 | owping/ A command line owamp client (one way ping). 16 | powstream/ A client-daemon for continuous one-way tests. 17 | (This is a one-off application that Internet2 18 | uses to run continuous tests on a mesh of Abilene 19 | measurement hosts. There is currently no documentation 20 | and only limited support for this tool. If it interests 21 | you, please say so and it may get better support in the 22 | future.) 23 | conf/ Example config files. (not installed - EXAMPLES!) 24 | doc/ html and man page descriptions of owamp tools. 25 | test/ validate programs. 26 | -------------------------------------------------------------------------------- /owamp/owamp/README.md: -------------------------------------------------------------------------------- 1 | | [![release](https://img.shields.io/github/release/perfsonar/owamp.svg)](https://github.com/perfsonar/owamp/releases) | CentOS | [![Build Status (CentOS)](https://perfsonar-dev3.grnoc.iu.edu/jenkins/buildStatus/icon?job=owamp-centos)](https://perfsonar-dev3.grnoc.iu.edu/jenkins/view/Debian/job/owamp-centos/) | Debian | [![Build Status (Debian)](https://perfsonar-dev3.grnoc.iu.edu/jenkins/buildStatus/icon?job=owamp-debian-source)](https://perfsonar-dev3.grnoc.iu.edu/jenkins/view/Debian/job/owamp-debian-source/) | 2 | | -------------|-------------|-------------|-------------|-------------| 3 | 4 | # OWAMP 5 | 6 | This release is contains implementations of the OWAMP (one-way active measurement protocol) defined by https://tools.ietf.org/html/rfc4656 and the TWAMP (two-way active measurement protocol) defined by https://tools.ietf.org/html/rfc5357 7 | 8 | ## Code Organization 9 | It is organized as follows: 10 | 11 | Directory | Description 12 | --- | --- 13 | I2util/ | convienient utility functions... Error reporting, hash funcs... 14 | owamp/ | directory for owamp api - a high level abstraction for speaking the owamp/twamp protocols. 15 | owampd/ | OWAMP and TWAMP server implementations. 16 | owping/ | A command line owamp client (one way ping) and twamp client (two way ping). 17 | powstream/ | A client-daemon for continuous one-way tests. 18 | conf/ | Example config files. (not installed - EXAMPLES!) 19 | doc/ | html and man page descriptions of owamp and twamp tools. 20 | test/ | unit tests. 21 | 22 | -------------------------------------------------------------------------------- /owamp/owamp/RELEASE.TODO: -------------------------------------------------------------------------------- 1 | To make a new release of owamp: 2 | 3 | 1) Edit configure.ac and modify the version number in the macros. 4 | 2) Edit doc/index.html and modify the version number 5 | 3) check-in all changes 6 | 4) svn log > ChangeLog 7 | 4.5) Review ChangeLog and edit doc/milestones.html 8 | 4.6) check-in doc/milestones 9 | 4.7) svn log > ChangeLog 10 | 5) check-in ChangeLog 11 | 6) tag release ex. "svn cp trunk tags/OWAMP_2_0a" 12 | 7) make dist (builds spec file in tree) 13 | a) sudo cp [tarball] /usr/src/redhat/SOURCES/ 14 | b) sudo rpmbuild -ba [spec-file] 15 | 8) copy tarball and RPMs from /usr/src/redhat/RPMS/i386 to dist area of website 16 | 9) update webpages 17 | -------------------------------------------------------------------------------- /owamp/owamp/TODO.txt: -------------------------------------------------------------------------------- 1 | Check datadir is writable on startup: fail if not 2 | Modify to treat I2util as independent package 3 | Fix version string in help message (Now reports I2util version) 4 | Document missing packet format for -R output 5 | Powstream: Add -D option 6 | Add 'make check' tests to owamp 7 | test all owamp client apps 8 | Port owamp 3.0a to FreeBSD 9 | Add crypto NOTES 10 | version option 11 | Copyright/License in distribution 12 | owamp: memory debug check 13 | owamp: methodological errors included in timestamp? 14 | Add version flag (not -h) 15 | have owup report server version 16 | Autoconf: Update AC_CHECK_HEADERS (see bwctl) 17 | Test DSCP (-D) - tcpdump to view diffserv bits 18 | powstream: Modify -i to do full schedule (like owping) 19 | owampd: add delete_on_cntrl_close option 20 | Modify AcceptType values to new spec terms 21 | owampd: full disk problem not clear 22 | powstream -h: Add defaults into output 23 | ContextCreate - varargs (see bwctl) 24 | Document SIGNALS for owampd/owping (powstream?) 25 | ContextCreate var for no NTP sync warnings 26 | Release: versions page (what's new with each release.) 27 | 28 | ----------------------------- 29 | Detect owampd.keys/owampd.limits changes 30 | 31 | chi-owamp> 32 | chi-owamp> /usr/local/esnet/ami/bin/owampd -c /usr/local/esnet/ami/etc -Z 33 | owampd[94592]: FILE=policy.c, LINE=956, verify_datadir: Directory "/home/owamp/data/hierarchy/root/box/sand" expect at "/home/owamp/data/hierarchy/root/sand" 34 | owampd[94592]: FILE=policy.c, LINE=1123, InitializeDiskUsage: Invalid datadir directory: /home/owamp/data 35 | owampd[94592]: FILE=owampd.c, LINE=1381, PolicyInit failed. Exiting... 36 | 37 | --------------------------------- 38 | 39 | owampd: owampd.limits - add a more compact way of assigning a whole list of users to a group(user class) 40 | owampd: owampd.limits file - add limit option for "reject=on" 41 | owampd: NTP sanity check - check N peers, etc... 42 | 43 | -------------------------- 44 | OWAMP Paper 45 | 46 | Review 1: 47 | + Additional Calibration tests on other architectures 48 | * Show that unaccounted for errors are not accountable AND 49 | show that they are insignificant. 50 | * Data from more "generic" end systems. (not on abilene, no GPS) 51 | * Better motivation explaination. 52 | * What does quiescent mean? "one of the tests?" 53 | * Discuss the effects of "caching". 54 | * Discuss/measure ICMP processing time. 55 | * More references on NTP precision. 56 | * Fix figure/table references. 57 | * Explain Labels/captions for plot axis. 58 | * Make Fig 2 (context switches) less confusing. 59 | 60 | Review 2: 61 | * Discuss deployment issues. (feasibility of wide acceptance) 62 | * Possibility/performance of porting to major router vendor product. 63 | * More detailed discussion of the OWAMP implementation. 64 | Review 3: 65 | * Rewrite fully. 66 | * Add roles picture for Section II(Protocol design) 67 | * Fix figure/table refs. (III-B-1 vs 2) 68 | * Add NTP error references. 69 | Attila Pasztor and Darryl Veitch, Precision Based Timeing Without GPS, 70 | ACM SIGMETRICS, A, Marina Del Rey, LA, June 2002 71 | * Apply owamp to unstable path. 72 | 73 | --------------------------- 74 | Diagnostic message in denied response messages 75 | 76 | -------------------------------------------------------------------------------- /owamp/owamp/bench/timeintervals.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | 6 | /* 7 | * assuming 512k L2 cache, so keeping has bucket memory well below 128 4-byte 8 | * entries by using 64 buckets - power of two. 9 | */ 10 | 11 | main(){ 12 | register u_int32_t i,curr,prev; 13 | register u_int32_t val; 14 | register u_int32_t min,max,tmp; 15 | u_int32_t under_min=0,over_max=0; 16 | u_int32_t buckets[64]; 17 | struct timeval ts[2]; 18 | 19 | memset(buckets,0,sizeof(buckets)); 20 | memset(ts,0,sizeof(ts)); 21 | 22 | /* 23 | * First do a "short" test that should take ~10 seconds to 24 | * get an estimate of max/min to determine bucket ranges. 25 | * (estimating 5usec per gettimeofday() call to make this guess 26 | * of 2 million iterations of the loop.) 27 | */ 28 | curr=0; prev=1; 29 | min=~0; max=0; 30 | gettimeofday(&ts[prev],NULL); 31 | for(i=0;i<2000000;i++){ 32 | /* 33 | * Assuming software clock is monotonic 34 | */ 35 | gettimeofday(&ts[curr],NULL); 36 | 37 | val = ts[curr].tv_sec - ts[prev].tv_sec; 38 | if(val > 1){ 39 | fprintf(stderr,"val difference too huge!\n"); 40 | exit(1); 41 | } 42 | 43 | val *= 1000000; 44 | val += ts[curr].tv_usec; 45 | val -= ts[prev].tv_usec; 46 | 47 | max = (val > max)? val : max; 48 | min = (val < min)? val : min; 49 | 50 | prev = curr; 51 | curr = (curr+1) % 2; 52 | } 53 | 54 | /* 55 | * What range was seen in sub-sample? 56 | * Extend min and max a bit beyond what is seen in this sample. 57 | */ 58 | assert(max>min); 59 | tmp = max - min; 60 | tmp *= 0.05; 61 | max += tmp; 62 | min *= 0.9; 63 | 64 | min = 0; 65 | max = 63; 66 | /* 67 | * compute range for actual bucketing. 68 | * Using simple shift for bucketing. 69 | * Determine how many bits need to be shifted off. 70 | * nbuckets == 64 == 2^6, so we keep 6 bits of precision, then 71 | * count the number of bits that will need to be shifted off and lost. 72 | */ 73 | tmp = (max - min) >> 6; 74 | i=0; 75 | while(tmp){ 76 | i++; 77 | tmp >>= 1; 78 | } 79 | 80 | /* 81 | * save number of lost bits in 'tmp' var, reset max to the next 82 | * power of two over min. 83 | */ 84 | tmp = i; 85 | max = min+(1<<(6+tmp)); 86 | 87 | fprintf(stdout,"# min=%u usec, max=%u usec\n",min,max); 88 | fprintf(stdout,"# Loosing %u bits of precision from bucketing\n",tmp); 89 | 90 | /* 91 | * Now do a real test - about 5 min's or 60000000 samples 92 | * will hopefully be good. 93 | */ 94 | curr=0; prev=1; 95 | gettimeofday(&ts[prev],NULL); 96 | #if NOT 97 | for(i=0;i<600000;i++,prev=curr,curr=(curr+1)%2){ 98 | #endif 99 | for(i=0;i<60000000;i++,prev=curr,curr=(curr+1)%2){ 100 | /* 101 | * Assuming software clock is monotonic 102 | */ 103 | gettimeofday(&ts[curr],NULL); 104 | 105 | val = ts[curr].tv_sec - ts[prev].tv_sec; 106 | if(val > 1){ 107 | fprintf(stderr, 108 | "Real test!: val difference too huge!\n"); 109 | exit(1); 110 | } 111 | 112 | val *= 1000000; 113 | val += ts[curr].tv_usec; 114 | val -= ts[prev].tv_usec; 115 | 116 | if(val > max){ 117 | over_max++; 118 | continue; 119 | } 120 | if(val < min){ 121 | under_min++; 122 | continue; 123 | } 124 | 125 | /* 126 | * shift of bits of precision for bucketing. 127 | */ 128 | buckets[(val-min)>>tmp]++; 129 | } 130 | 131 | fprintf(stdout,"# min_bucket=%u\n# max_bucket=%u\n",min,max); 132 | fprintf(stdout,"# under_min=%u\n# over_max=%u\n\n",under_min,over_max); 133 | fprintf(stdout,"# Distribution follows: bucketn\tbucketc\tdelay(usec)\t\n"); 134 | 135 | fprintf(stdout,"<%u\t%u\t<%u\n",0,under_min,min); 136 | for(i=0;i<64;i++){ 137 | fprintf(stdout,"%u\t%u\t%u\n",i,buckets[i],min+(i<%u\t%u\t>%u\n",64,over_max,max); 140 | 141 | exit(0); 142 | } 143 | -------------------------------------------------------------------------------- /owamp/owamp/bench/timesyscall.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | main(){ 6 | int i=0; 7 | struct timeval val; 8 | struct timeval begin; 9 | struct timeval end; 10 | struct ntptimeval ntv; 11 | 12 | #ifndef STA_NANO 13 | fprintf(stderr,"!NANO\n"); 14 | #else 15 | fprintf(stderr,"NANO\n"); 16 | #endif 17 | gettimeofday(&begin,NULL); 18 | while(i<10000000){ 19 | #ifdef TESTNTP 20 | ntp_gettime(&ntv); 21 | #else 22 | gettimeofday(&val,NULL); 23 | #endif 24 | i++; 25 | } 26 | gettimeofday(&end,NULL); 27 | 28 | end.tv_sec -= begin.tv_sec; 29 | if(begin.tv_usec > end.tv_usec){ 30 | end.tv_sec--; 31 | end.tv_usec += 1000000; 32 | } 33 | end.tv_usec -= begin.tv_usec; 34 | 35 | fprintf(stdout,"loop took:%u.%u\n",end.tv_sec,end.tv_usec); 36 | 37 | exit(0); 38 | } 39 | -------------------------------------------------------------------------------- /owamp/owamp/bootstrap: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # $Id$ 4 | # 5 | ######################################################################### 6 | # # 7 | # Copyright (C) 2002 # 8 | # Internet2 # 9 | # All Rights Reserved # 10 | # # 11 | ######################################################################### 12 | # 13 | # File: bootstrap 14 | # 15 | # Author: Jeff Boote 16 | # Internet2 17 | # 18 | # Date: Wed Apr 17 13:15:07 EDT 2002 19 | # 20 | # Description: 21 | # This script is used to bootstrap the autobuild 22 | # process. 23 | # 24 | # RUNNING THIS SCRIPT IS NOT RECOMMENDED 25 | # (You should just use the "configure" script 26 | # that was bundled with the distribution if 27 | # at all possible.) 28 | # 29 | 30 | case "$1" in 31 | ac257) 32 | alias autoconf=autoconf257 33 | alias autoheader=autoheader257 34 | alias automake=automake17 35 | alias aclocal=aclocal17 36 | export AUTOCONF=autoconf257 37 | ;; 38 | *) 39 | ;; 40 | esac 41 | 42 | if test -x I2util/bootstrap.sh; then 43 | echo 44 | echo "## I2util/bootstrap.sh" 45 | echo 46 | cd I2util 47 | ./bootstrap.sh 48 | cd .. 49 | echo 50 | echo "## Finished I2util/bootstrap.sh" 51 | echo 52 | fi 53 | 54 | set -x 55 | aclocal -I config 56 | autoheader 57 | automake --add-missing --copy 58 | autoconf 59 | # run configure by hand. 60 | # ./configure $* 61 | -------------------------------------------------------------------------------- /owamp/owamp/conf/Makefile.am: -------------------------------------------------------------------------------- 1 | # 2 | # $Id$ 3 | # 4 | ######################################################################### 5 | # # 6 | # Copyright (C) 2002 # 7 | # Internet2 # 8 | # All Rights Reserved # 9 | # # 10 | ######################################################################### 11 | # 12 | # File: Makefile.am 13 | # 14 | # Author: Anatoly Karp 15 | # Internet2 16 | # 17 | # Date: Fri Oct 18 17:53:58 EDT 2002 18 | # 19 | # Description: constructing owamp conf files from templates 20 | # This doesn't really do this yet - it just provides 21 | # examples. 22 | noinst_DATA = owampd.conf owampd.limits owampd.init owampd.service owampd-cleanup 23 | noinst_DATA += twampd.conf twampd.limits twampd.init twampd.service 24 | EXTRA_DIST = owampd.conf owampd.rpm.conf owampd.limits owampd.init owampd.service owampd-cleanup 25 | EXTRA_DIST += twampd.conf twampd.rpm.conf twampd.limits twampd.init twampd.service 26 | -------------------------------------------------------------------------------- /owamp/owamp/conf/owampd-cleanup: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl -w 2 | 3 | use strict; 4 | 5 | use File::Basename; 6 | use File::Find; 7 | use Getopt::Std; 8 | 9 | my %opts; 10 | getopts('a:d:l:nv', \%opts); 11 | 12 | my $age = $opts{a} || 86400; 13 | my $data_dir = $opts{d} || '/var/lib/owamp/hierarchy/'; 14 | my $link_dir = $opts{l} || '/var/lib/owamp/catalog/'; 15 | my $dry_run = $opts{n}; 16 | my $verbose = $opts{v}; 17 | 18 | # find owampd processes 19 | my @owampd; 20 | my @procs = glob "'/proc/*/comm'"; 21 | for my $comm (@procs) { 22 | if (open(my $fh, "<", $comm)) { 23 | my $name = readline($fh); 24 | close($fh); 25 | if ($name eq "owampd\n") { 26 | push @owampd, dirname($comm) 27 | } 28 | } 29 | } 30 | 31 | # find open data files 32 | my %active; 33 | for my $proc (@owampd) { 34 | for my $fd (glob "'${proc}/fd/*'") { 35 | my $filename = readlink($fd); 36 | if ($filename =~ m/^$data_dir/) { 37 | $active{$filename} = 1; 38 | } 39 | } 40 | } 41 | 42 | # remove old data files 43 | my $ts = time - $age; 44 | find(sub{ 45 | my $current = $File::Find::name; 46 | 47 | if ($active{$current}) { 48 | if ($verbose) { 49 | print "Skipping active file: $current\n"; 50 | } 51 | return; 52 | } 53 | 54 | if (-f $_) { 55 | my $mtime = (stat(_))[9]; 56 | if ($mtime < $ts) { 57 | if ($verbose) { 58 | print "Removing old file: $current\n"; 59 | } 60 | 61 | if (!$dry_run) { 62 | if (!unlink($_)) { 63 | print "Could not remove file $current: $!\n"; 64 | } 65 | } 66 | } 67 | } 68 | }, $data_dir); 69 | 70 | # remove old links 71 | find(sub{ 72 | my $current = $File::Find::name; 73 | 74 | if (-l $_) { 75 | my $mtime = (lstat(_))[9]; 76 | if ($mtime < $ts and ! -f $_) { 77 | if ($verbose) { 78 | print "Removing old symlink: $current\n"; 79 | } 80 | 81 | if (!$dry_run) { 82 | if (!unlink($_)) { 83 | print "Could not remove link $current: $!\n"; 84 | } 85 | } 86 | } 87 | } 88 | }, $link_dir); 89 | -------------------------------------------------------------------------------- /owamp/owamp/conf/owampd.conf: -------------------------------------------------------------------------------- 1 | # 2 | # $Id$ 3 | # 4 | ######################################################################### 5 | # # 6 | # Copyright (C) 2002 # 7 | # Internet2 # 8 | # All Rights Reserved # 9 | # # 10 | ######################################################################### 11 | # 12 | # File: owampd.conf 13 | # 14 | # Author: Jeff W. Boote 15 | # Internet2 16 | # 17 | # Date: Tue Nov 05 13:34:07 MST 2002 18 | # 19 | # Description: 20 | # Example owampd.conf config file. 21 | 22 | # run as group/user - only used if effective uid is root. 23 | # (defaults to nil) 24 | user owamp 25 | group owamp 26 | 27 | # not really used, but what the heck. 28 | # (defaults to !verbose) 29 | verbose 30 | 31 | # where should syslog messages go? 32 | # (defaults to daemon) 33 | facility local5 34 | 35 | # The minimum severity of log messages to report to syslog. Useful for remote 36 | # syslog servers especially since can reduce log traffic on wire. Valid values: 37 | # FATAL - Just report error messages 38 | # WARN - In addition to FATAL messages, print non-fatal warnings 39 | # INFO - **DEFAULT** In addition to to everything in WARN, print some potentially helpful non-error messages 40 | # DEBUG - Print everything in INFO, and lots of other output that may or may not be useful 41 | # ALL - Print any error message regardless of level 42 | # NONE - Don't send any messages to syslog 43 | #loglevel INFO 44 | 45 | # include src file:line in log messages 46 | # keep this on, and help us with more specific bug reports! 47 | # (defaults to !loglocation) 48 | loglocation 49 | 50 | # location for owamp-server.pid and owamp-server.info files 51 | # (defaults to $cwd) 52 | #vardir /var/run 53 | 54 | # location for "recv" session files. 55 | # The "catalog" subdirectory is completely cleaned and recreated each time 56 | # owampd is restarted. DONT PUT ANYTHING IN THERE! 57 | # (defaults to $cwd) 58 | #datadir /big/enough 59 | 60 | # authmode - uncomment to make only Open. 61 | # (defaults to OAE) 62 | #authmode O 63 | 64 | # src address/port defaults to wildcard addr and standard(861) port. 65 | # To start owampd as a non-root user will require running on a non-standard 66 | # port. 67 | #srcnode localhost:861 # the default 68 | #srcnode localhost:8765 # run on a non-standard port 69 | 70 | # This is used to limit testing to a specific port range. The valid values are: 71 | # 0 (owampd will let the system to pick the port number (ephemeral) 72 | # low-high (A range. high must be larger than low.) 73 | testports 8760-9960 74 | 75 | # This is a factor applied to all disk limits to create a "soft" limit 76 | # for disk usage. The "hard" limit is applied when a test is requested. 77 | # If the estimated filesize of the test would put the "user class" over 78 | # the "disk" quota, then the test is denied. However, it is possible due 79 | # to "duplicate" packets that a test session file may end up larger than 80 | # this estimate. If that happens, and if the file is successfully saved to 81 | # disk - upon completion of the test, actual filesize is used to update the 82 | # disk usage in the resource broker process. At this point the "soft" limit 83 | # is applied - if the filesize causes the "user class" to go over the 84 | # "soft" quota (disk number multiplied by diskfudge) then the file is 85 | # immediately deleted. (I recommend a liberal factor here because if you get 86 | # lots of duplicates and need to apply a "soft" limit - the data will probably 87 | # be quite interesting. However, it is useful to have this factor so disk 88 | # usage is not as vulnerable to replay dos attacks of the test protocol.) 89 | # (defaults to 1.0 - or no soft limit.) 90 | diskfudge 3.0 91 | 92 | # dieby - amount of time to wait for child processes to gracefully terminate 93 | # before killing them with a SIGKILL. (default is 30 seconds) 94 | # This is in response to the master process receiving SIGTERM or SIGHUP. 95 | # (defaults to 5) 96 | #dieby 5 97 | 98 | # controltimeout - amount of time (seconds) to wait for an expected protocol 99 | # message. (owdp draft recommends 30 minutes in section 4) 100 | # (defaults to 1800) 101 | #controltimeout 1800 102 | 103 | # pbkdf2_count - number of iterations in the pbkdf2() algorithm 104 | # pbkdf2_count 2048 105 | 106 | # enddelay - amount of seconds to wait after send sessions are complete before 107 | # actually sending the stop sessions message. (double) 108 | #enddelay 1.0 109 | 110 | # maxcontrolsessions - maximum number of control sessions that can be 111 | # active concurrently. Further connections will be closed until the 112 | # limit is no longer exceeded. 113 | # (defaults to 0 - unlimited) 114 | #maxcontrolsessions 0 115 | -------------------------------------------------------------------------------- /owamp/owamp/conf/owampd.init: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # Init file for OWAMP daemon 4 | # 5 | # chkconfig: 2345 60 20 6 | # description: OWAMP daemon 7 | # 8 | # processname: owampd 9 | # 10 | 11 | 12 | OWAMPDBINDIR=/usr/bin 13 | CONFDIR=/etc/owamp-server 14 | OWAMPDVARDIR=/var/run 15 | PIDFILE=${OWAMPDVARDIR}/owamp-server.pid 16 | 17 | OWAMPD="${OWAMPDBINDIR}/owampd -c ${CONFDIR} -R ${OWAMPDVARDIR}" 18 | 19 | ulimit -n 4096 20 | 21 | ERROR=0 22 | ARGV="$@" 23 | if [ "x$ARGV" = "x" ] ; then 24 | ARGS="help" 25 | fi 26 | 27 | for ARG in $@ $ARGS 28 | do 29 | # check for pidfile 30 | if [ -f $PIDFILE ] ; then 31 | PID=`cat $PIDFILE` 32 | if [ "x$PID" != "x" ] && kill -0 $PID 2>/dev/null ; then 33 | STATUS="owamp-server (pid $PID) running" 34 | RUNNING=1 35 | else 36 | STATUS="owamp-server (pid $PID?) not running" 37 | RUNNING=0 38 | fi 39 | else 40 | STATUS="owamp-server (no pid file) not running" 41 | RUNNING=0 42 | fi 43 | 44 | case $ARG in 45 | start) 46 | if [ $RUNNING -eq 1 ]; then 47 | echo "$0 $ARG: owamp-server (pid $PID) already running" 48 | continue 49 | fi 50 | 51 | echo $OWAMPD 52 | 53 | if $OWAMPD ; then 54 | echo "$0 $ARG: owamp-server started" 55 | else 56 | echo "$0 $ARG: owamp-server could not be started" 57 | ERROR=3 58 | fi 59 | ;; 60 | stop) 61 | if [ $RUNNING -eq 0 ]; then 62 | echo "$0 $ARG: $STATUS" 63 | continue 64 | fi 65 | if kill $PID ; then 66 | echo "$0 $ARG: owamp-server stopped" 67 | else 68 | echo "$0 $ARG: owamp-server could not be stopped" 69 | ERROR=4 70 | fi 71 | ;; 72 | status) 73 | echo $STATUS 74 | if [ $RUNNING -eq 0 ]; then 75 | ERROR=3 76 | fi 77 | ;; 78 | cond-restart) 79 | if [ $RUNNING -eq 1 ]; then 80 | $0 stop; echo "waiting..."; sleep 10; $0 start; 81 | fi 82 | ;; 83 | restart) 84 | $0 stop; echo "waiting..."; sleep 10; $0 start; 85 | ;; 86 | # if [ $RUNNING -eq 0 ]; then 87 | # echo "$0 $ARG: owampd not running, trying to start" 88 | # if $OWAMPD ; then 89 | # echo "$0 $ARG: owampd started" 90 | # else 91 | # echo "$0 $ARG: owampd could not be started" 92 | # ERROR=5 93 | # fi 94 | # else 95 | # if kill -HUP $PID ; then 96 | # echo "$0 $ARG: owampd restarted" 97 | # else 98 | # echo "$0 $ARG: owampd could not be restarted" 99 | # ERROR=6 100 | # fi 101 | # fi 102 | # ;; 103 | *) 104 | echo "usage: $0 (start|stop|restart|help)" 105 | cat </dev/null ; then 33 | STATUS="twamp-server (pid $PID) running" 34 | RUNNING=1 35 | else 36 | STATUS="twamp-server (pid $PID?) not running" 37 | RUNNING=0 38 | fi 39 | else 40 | STATUS="twamp-server (no pid file) not running" 41 | RUNNING=0 42 | fi 43 | 44 | case $ARG in 45 | start) 46 | if [ $RUNNING -eq 1 ]; then 47 | echo "$0 $ARG: twamp-server (pid $PID) already running" 48 | continue 49 | fi 50 | 51 | echo $TWAMPD 52 | 53 | if $TWAMPD ; then 54 | echo "$0 $ARG: twamp-server started" 55 | else 56 | echo "$0 $ARG: twamp-server could not be started" 57 | ERROR=3 58 | fi 59 | ;; 60 | stop) 61 | if [ $RUNNING -eq 0 ]; then 62 | echo "$0 $ARG: $STATUS" 63 | continue 64 | fi 65 | if kill $PID ; then 66 | echo "$0 $ARG: twamp-server stopped" 67 | else 68 | echo "$0 $ARG: twamp-server could not be stopped" 69 | ERROR=4 70 | fi 71 | ;; 72 | status) 73 | echo $STATUS 74 | ;; 75 | cond-restart) 76 | if [ $RUNNING -eq 1 ]; then 77 | $0 stop; echo "waiting..."; sleep 10; $0 start; 78 | fi 79 | ;; 80 | restart) 81 | $0 stop; echo "waiting..."; sleep 10; $0 start; 82 | ;; 83 | # if [ $RUNNING -eq 0 ]; then 84 | # echo "$0 $ARG: twampd not running, trying to start" 85 | # if $TWAMPD ; then 86 | # echo "$0 $ARG: twampd started" 87 | # else 88 | # echo "$0 $ARG: twampd could not be started" 89 | # ERROR=5 90 | # fi 91 | # else 92 | # if kill -HUP $PID ; then 93 | # echo "$0 $ARG: twampd restarted" 94 | # else 95 | # echo "$0 $ARG: twampd could not be restarted" 96 | # ERROR=6 97 | # fi 98 | # fi 99 | # ;; 100 | *) 101 | echo "usage: $0 (start|stop|restart|help)" 102 | cat < 14 | 15 | static void foo(void) __attribute__ ((noreturn)); 16 | 17 | static void 18 | foo(void) 19 | { 20 | exit(1); 21 | } 22 | ])], 23 | ac_cv___attribute__=yes, 24 | ac_cv___attribute__=no)]) 25 | if test "$ac_cv___attribute__" = "yes"; then 26 | AC_DEFINE(HAVE___ATTRIBUTE__, 1, [define if your compiler has __attribute__]) 27 | fi 28 | AC_MSG_RESULT($ac_cv___attribute__) 29 | ]) 30 | -------------------------------------------------------------------------------- /owamp/owamp/config/test-driver: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | # test-driver - basic testsuite driver script. 3 | 4 | scriptversion=2018-03-07.03; # UTC 5 | 6 | # Copyright (C) 2011-2018 Free Software Foundation, Inc. 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 as published by 10 | # the Free Software Foundation; either version 2, or (at your option) 11 | # any later version. 12 | # 13 | # This program is distributed in the hope that it will be useful, 14 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | # GNU General Public License for more details. 17 | # 18 | # You should have received a copy of the GNU General Public License 19 | # along with this program. If not, see . 20 | 21 | # As a special exception to the GNU General Public License, if you 22 | # distribute this file as part of a program that contains a 23 | # configuration script generated by Autoconf, you may include it under 24 | # the same distribution terms that you use for the rest of that program. 25 | 26 | # This file is maintained in Automake, please report 27 | # bugs to or send patches to 28 | # . 29 | 30 | # Make unconditional expansion of undefined variables an error. This 31 | # helps a lot in preventing typo-related bugs. 32 | set -u 33 | 34 | usage_error () 35 | { 36 | echo "$0: $*" >&2 37 | print_usage >&2 38 | exit 2 39 | } 40 | 41 | print_usage () 42 | { 43 | cat <$log_file 2>&1 108 | estatus=$? 109 | 110 | if test $enable_hard_errors = no && test $estatus -eq 99; then 111 | tweaked_estatus=1 112 | else 113 | tweaked_estatus=$estatus 114 | fi 115 | 116 | case $tweaked_estatus:$expect_failure in 117 | 0:yes) col=$red res=XPASS recheck=yes gcopy=yes;; 118 | 0:*) col=$grn res=PASS recheck=no gcopy=no;; 119 | 77:*) col=$blu res=SKIP recheck=no gcopy=yes;; 120 | 99:*) col=$mgn res=ERROR recheck=yes gcopy=yes;; 121 | *:yes) col=$lgn res=XFAIL recheck=no gcopy=yes;; 122 | *:*) col=$red res=FAIL recheck=yes gcopy=yes;; 123 | esac 124 | 125 | # Report the test outcome and exit status in the logs, so that one can 126 | # know whether the test passed or failed simply by looking at the '.log' 127 | # file, without the need of also peaking into the corresponding '.trs' 128 | # file (automake bug#11814). 129 | echo "$res $test_name (exit status: $estatus)" >>$log_file 130 | 131 | # Report outcome to console. 132 | echo "${col}${res}${std}: $test_name" 133 | 134 | # Register the test result, and other relevant metadata. 135 | echo ":test-result: $res" > $trs_file 136 | echo ":global-test-result: $res" >> $trs_file 137 | echo ":recheck: $recheck" >> $trs_file 138 | echo ":copy-in-global-log: $gcopy" >> $trs_file 139 | 140 | # Local Variables: 141 | # mode: shell-script 142 | # sh-indentation: 2 143 | # eval: (add-hook 'before-save-hook 'time-stamp) 144 | # time-stamp-start: "scriptversion=" 145 | # time-stamp-format: "%:y-%02m-%02d.%02H" 146 | # time-stamp-time-zone: "UTC0" 147 | # time-stamp-end: "; # UTC" 148 | # End: 149 | -------------------------------------------------------------------------------- /owamp/owamp/design/api_design: -------------------------------------------------------------------------------- 1 | $Id$ 2 | 3 | API design goals: 4 | 5 | These design goals relate to a high-level api library for speaking the owamp 6 | protocol. The over-arching goal of the API is to support writing of the 7 | applications specified in the usage_cases document. Additionally, 8 | specific design goals for the implementation of the API are as follows: 9 | 10 | 1. Create a high-level API that makes it more simple for application/server 11 | developers to write owamp compliant applications. Specifically, the API should: 12 | A. Abstract away the actual message formatting including encryption 13 | B. Ensure protocol messages are only sent when valid 14 | 15 | 2. API should be efficient - minimize the amount of time between initial 16 | connection and availability for test session start. 17 | 18 | 3. API should as much as possible abstract away the 19 | encryption/authentication requirements. The application will need to 20 | manage the mapping from user->keyid and from keyid->shared_secret, but 21 | the actual CBC/AES encodeing/decoding of the data stream should be 22 | invisible to the user. 23 | 24 | 4. The actual call structure/data structures in the API should be 25 | designed in such a way as to make the API as easy as possible to 26 | interface to other languages. C, Perl, Java, and Python are the primary 27 | languages we envision applications being written in. 28 | -------------------------------------------------------------------------------- /owamp/owamp/design/decisions: -------------------------------------------------------------------------------- 1 | $Id$ 2 | 3 | 1. (Server) Develop as a standalone server 4 | A. Standalone 5 | not all systems run inetd 6 | easier to debug 7 | only reasonible way to apply system-wide resource limits 8 | 9 | 2. Send/Recieve roles should be separate processes from client/server 10 | A. select of single file descriptor - perhaps more accurate time 11 | B. localize clock mgmt to send/recv code/process 12 | C. Able to use same send/recv code in client and server 13 | 14 | 3. Concurrent server model 15 | use traditional accept/fork/exec 16 | resource limits applied using controlling parent process 17 | (Threads not portable enough yet... grr.) 18 | (pre-forking not worth it - few long-lived connections) 19 | (async i/o - not worth the complexity.) 20 | -------------------------------------------------------------------------------- /owamp/owamp/design/usage_scenerios: -------------------------------------------------------------------------------- 1 | $Id$ 2 | 3 | This document outlines the main usage scenerios or applications we envision 4 | using the owamp control protocol. 5 | 6 | 1. one-way ping 7 | description: 8 | User is curious about the current datarate. Wants to quickly see what 9 | is currently happening between his host and another. 10 | 11 | assumptions: 12 | typically unauthenticated mode 13 | short sessions/low data rates 14 | application is executing at either the sender or reciever host 15 | 16 | 2. extended test session 17 | description: 18 | User wants to diagnose a problematic link. Runs a session over 19 | that link to quantify what is happening. 20 | 21 | assumptions: prior agreement (key exchange setup) 22 | authenticated transaction 23 | either long time duration, or somewhat higher datarates 24 | application is usually executing at either the sender or reciever host 25 | (if not, then the sender or reciever is configuring the 26 | other endpoint on behalf of the client.) 27 | 28 | 3. production monitoring system 29 | description: 30 | Centralized monitoring system is collecting one-way measurements 31 | from a great number of hosts. It is setup to do simple analysis 32 | on the results, and notifies the administrator if results are greatly 33 | different then expected. 34 | 35 | assumptions: 36 | prior agreement (key exchange setup) 37 | authenticated transaction 38 | very long time duration - low data rates 39 | central monitor contacts owamp servers(recv) and has them contact 40 | open beacon owamp servers(send). 41 | The monitor collects data from the owamp server(recv) periodically 42 | during the sessions. 43 | 44 | 4. destructive tests of network links 45 | description: 46 | network admin wants to see what a link is capable of. 47 | 48 | assumptions: 49 | prior agreement 50 | control is probably on a non-standard port 51 | long time duration/high bandwidth 52 | recv side probably can't save data - runs processing on the fly 53 | to compute pre decided values 54 | -------------------------------------------------------------------------------- /owamp/owamp/doc/Makefile.am: -------------------------------------------------------------------------------- 1 | # 2 | # $Id$ 3 | # 4 | ######################################################################### 5 | # # 6 | # Copyright (C) 2006 # 7 | # Internet2 # 8 | # All Rights Reserved # 9 | # # 10 | ######################################################################### 11 | # 12 | # File: Makefile.am 13 | # 14 | # Author: Jeff Boote 15 | # Internet2 16 | # 17 | # Date: Sat Feb 4 13:30:20 MST 2006 18 | # 19 | # Description: 20 | 21 | dist_man1_MANS = owping.man owstats.man owfetch.man owup.man \ 22 | powstream.man twping.man 23 | dist_man5_MANS = owamp-server.conf.man owamp-server.limits.man owamp-server.pfs.man \ 24 | twamp-server.conf.man twamp-server.limits.man twamp-server.pfs.man 25 | dist_man8_MANS = owampd.man twampd.man 26 | 27 | EXTRA_DIST = index.html details.html owamp_arch.png milestones.html \ 28 | draft-shalunov-reordering-definition-02.txt owamp_infosheet.pdf \ 29 | owping_conn_opts.man owping_report.man owping_out_opts.man \ 30 | owping_test_opts.man owping.ms owstats.ms owfetch.ms owup.ms 31 | 32 | SOELIM=soelim 33 | 34 | CLEANFILES = owping.man owstats.man owfetch.man owup.man \ 35 | owampd.man twampd.man twping.man owamp-server.limits.man \ 36 | twamp-server.limits.man owamp-server.conf.man twamp-server.conf.man 37 | 38 | SUFFIXES = .man .ms 39 | 40 | .ms.man: 41 | $(SOELIM) $< > $@ 42 | 43 | if HAVE_MAN2HTML 44 | SUFFIXES += .man.html 45 | .man.man.html: 46 | man2html -r $< | grep -v Content-type | sed -e 's/..\/man[0-9]\///g' | sed -e 's/\.[0-9]\.html/.man.html/g' | sed -e 's/\.\.\///g' > $@ 47 | 48 | EXTRA_DIST += owamp-server.conf.man.html owamp-server.limits.man.html \ 49 | owampd.man.html owamp-server.pfs.man.html owfetch.man.html \ 50 | owping.man.html owping_report.man.html owstats.man.html \ 51 | owup.man.html powstream.man.html twampd.man.html \ 52 | twping.man.html 53 | endif 54 | -------------------------------------------------------------------------------- /owamp/owamp/doc/index.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/perfsonar/owamp/fcfa567ef7de26b36d4a94b3d82d71cf6ef52cc8/owamp/owamp/doc/index.html -------------------------------------------------------------------------------- /owamp/owamp/doc/milestones.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | OWAMP Version History 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 |
32 |

OWAMP Version History

33 | 34 |
http://e2epi.internet2.edu/owamp/
35 | 36 |
37 |
$Date$
38 |

39 | This document is an attempt to outline the major changes associated with each 40 | new release. This is not a comprehensive list. For complete details please see 41 | the cvs log messages as archived in the Changes file in the distribution. 42 |

43 |

Version 3.1 - 15-Jan-2008

44 |
    45 |
  • Minor protocol compliance fixes
  • 46 |
  • RPM support
  • 47 |
  • Documentation updates
  • 48 |
  • Add packet reordering to -M output
  • 49 |
  • Enable powstream to do both inbound and outbound tests
  • 50 |
51 | 52 |

Version 3.0c - 24-Feb-2007

53 |
    54 |
  • Many documentation fixes
  • 55 |
  • 56 | Added option to sub-set test results. See the new -N option 57 | of owping. 58 |
  • 59 |
  • 60 | Fixed bugs in powstream relating to summary data not always being 61 | properly flushed before powstream printed the filename. 62 |
  • 63 |
64 | 65 |

Version 3.0b - 02-Jan-2007

66 |
    67 |
  • Fixes a bug in the end-of-test waiting code for the receiver
  • 68 |
69 | 70 |

Version 3.0a - 05-Dec-2006

71 |
    72 |
  • Now compliant with RFC4656
  • 73 |
      74 |
    • Standard port number for owamp-control: TCP/861
    • 75 |
    • Minor protocol changes - encryption bits changed
    • 76 |
    77 |
  • Includes man-page for powstream
  • 78 |
79 | 80 |

Version 2.0c - 25-May-2006

81 |
    82 |
  • Fixed a bug in the statistics code that incorrectly magnified 83 | loss. (A single lost packet would cause a pattern of lost packets: 84 | one every 'timeout' later.)
  • 85 |
86 | 87 |

Version 2.0b - 11-May-2006

88 |
    89 |
  • Major enhancements to signal handling aspects of all applications 90 | in the distribution
  • 91 |
  • Graceful termination of sessions added using signal handling 92 | enhancements
  • 93 |
  • Man-page for owup(1) added
  • 94 |
95 | 96 |

Version 2.0a - 23-Mar-2006

97 |
    98 |
  • Added owup command-line utility
  • 99 |
  • Fixed bug in statistics output (maxerr was reporting maxdelay)
  • 100 |
  • Fixed bug in owampd server greeting message (incorrect start 101 | time was being reported)
  • 102 |
103 | 104 |

Version 2.0 - 15-Mar-2006

105 |
    106 |
  • Major changes to protocol - mostly in support of early termination 107 | of sessions
  • 108 |
  • Additional statistics now reported: TTL, Delay Variation 109 | (Jitter)
  • 110 |
  • NTP requirements relaxed
  • 111 |
  • Additional system ports: 112 |
      113 |
    • FreeBSD 4.7, 5.4, 6.0 (64-bit)
    • 114 |
    • Linux 2.4.21 (32-bit), 2.6.11 (64-bit)
    • 115 |
    • MacOS X 10.4.5
    • 116 |
    • Solaris 5.8
    • 117 |
    118 |
  • Man-pages for all supported applications
  • 119 |
  • Firewall options: Can specify port-ranges for tests
  • 120 |
  • Many, many bug fixes
  • 121 |
122 | 123 |
 
$Id$
124 | 125 | 126 | 127 | -------------------------------------------------------------------------------- /owamp/owamp/doc/owamp-cookbook.doc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/perfsonar/owamp/fcfa567ef7de26b36d4a94b3d82d71cf6ef52cc8/owamp/owamp/doc/owamp-cookbook.doc -------------------------------------------------------------------------------- /owamp/owamp/doc/owamp-cookbook.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/perfsonar/owamp/fcfa567ef7de26b36d4a94b3d82d71cf6ef52cc8/owamp/owamp/doc/owamp-cookbook.pdf -------------------------------------------------------------------------------- /owamp/owamp/doc/owamp-server.conf.ms: -------------------------------------------------------------------------------- 1 | .\" The first line of this file must contain the '"[e][r][t][v] line 2 | .\" to tell man to run the appropriate filter "t" for table. 3 | .\" vim: set filetype=nroff : 4 | .\" 5 | .\" $Id$ 6 | .\" 7 | .\"###################################################################### 8 | .\"# # 9 | .\"# Copyright (C) 2004 # 10 | .\"# Internet2 # 11 | .\"# All Rights Reserved # 12 | .\"# # 13 | .\"###################################################################### 14 | .\" 15 | .\" File: owamp-server.conf.ms 16 | .\" 17 | .\" Author: Jeff Boote 18 | .\" Internet2 19 | .\" 20 | .\" Date: Tue May 11 14:15:18 MDT 2004 21 | .\" 22 | .\" Description: 23 | .\" 24 | .\"Program name 25 | .ds prog owampd 26 | .\"Config name 27 | .ds conf owamp-server 28 | .\"Protocol name 29 | .ds proto OWAMP 30 | .\"Port number 31 | .ds port 861 32 | .TH owamp-server.conf 5 "$Date$" 33 | .SH NAME 34 | owamp-server.conf \- One-way latency daemon configuration file. 35 | .so nwampd_conf_desc.man 36 | .SH SEE ALSO 37 | owping(1), owampd(8), owamp-server.limits(5), owamp-server.pfs(5), pfstore(1), 38 | and the \%http://e2epi.internet2.edu/owamp/ web site. 39 | .SH ACKNOWLEDGMENTS 40 | This material is based in part on work supported by the National Science 41 | Foundation (NSF) under Grant No. ANI-0314723. Any opinions, findings and 42 | conclusions or recommendations expressed in this material are those of 43 | the author(s) and do not necessarily reflect the views of the NSF. 44 | -------------------------------------------------------------------------------- /owamp/owamp/doc/owamp-server.limits.ms: -------------------------------------------------------------------------------- 1 | '\"t 2 | .\" The first line of this file must contain the '"[e][r][t][v] line 3 | .\" to tell man to run the appropriate filter "t" for table. 4 | .\" vim: set filetype=nroff : 5 | .\" 6 | .\" $Id$ 7 | .\" 8 | .\"###################################################################### 9 | .\"# # 10 | .\"# Copyright (C) 2004 # 11 | .\"# Internet2 # 12 | .\"# All Rights Reserved # 13 | .\"# # 14 | .\"###################################################################### 15 | .\" 16 | .\" File: owamp-server.limits.ms 17 | .\" 18 | .\" Author: Jeff Boote 19 | .\" Internet2 20 | .\" 21 | .\" Date: Wed May 12 10:45:09 MDT 2004 22 | .\" 23 | .\" Description: 24 | .\" 25 | .\"Program name 26 | .ds prog owampd 27 | .\"Config name 28 | .ds conf owamp-server 29 | .TH owamp-server.limits 5 "$Date$" 30 | .SH NAME 31 | owamp-server.limits \- One-way latency server policy configuration file 32 | .so nwampd_limits_desc.man 33 | .SH EXAMPLES 34 | An initial \fIlimit\fR line might look like: 35 | .RS 36 | .HP 37 | limit root with \\ 38 | .br 39 | bandwidth=900m, \\ 40 | .br 41 | disk=2g, \\ 42 | .br 43 | allow_open_mode=off 44 | .RE 45 | .PP 46 | This would create a \fIlimitclass\fR named \fBroot\fR. Because no 47 | \fIparent\fR is 48 | specified, this must be the first \fIlimitclass\fR defined in the 49 | file. This \fIlimitclass\fR has very liberal limits (900m limit on 50 | bandwidth, and 2 GB of disk space). However, open mode authentication 51 | is not enabled for 52 | this \fIlimitclass\fR, so the connections that get these limits must 53 | successfully authenticate using an AES key derived from the pass-phrase 54 | in the \fBowamp-server.pfs\fR file. 55 | .PP 56 | If an administrator also wants to create a \fIlimitclass\fR that is used 57 | to deny all requests, they might add: 58 | .RS 59 | .HP 60 | limit jail with \\ 61 | .br 62 | parent=root, \\ 63 | .br 64 | bandwidth=1, \\ 65 | .br 66 | disk=1, \\ 67 | .br 68 | allow_open_mode=off 69 | .RE 70 | .PP 71 | This would create a \fIlimitclass\fR named \fBjail\fR. Because the limits 72 | for bandwidth and disk are so low, virtually all tests will be denied. 73 | \fIallow_open_mode\fR is off, so initial connections that are not in 74 | authenticated or encrypted mode will be dropped immediately. 75 | (It would not make much sense to assign a \fIuser\fR identity to this 76 | \fIlimitclass\fR. If you don't want connections from a particular \fIuser\fR 77 | identity the best thing to do is to remove that \fIuser\fR from 78 | the \fBowamp-server.pfs\fR file.) 79 | .PP 80 | If the administrator wanted to allow a limited amount of open tests, they 81 | could define a \fIlimitclass\fR like: 82 | .RS 83 | .HP 84 | limit open with \\ 85 | .br 86 | parent=root, \\ 87 | .br 88 | bandwidth=10k, \\ 89 | .br 90 | disk=10m, \\ 91 | .br 92 | allow_open_mode=on 93 | .RE 94 | .PP 95 | This could be used to allow testing by random connections. 96 | It limits those tests to 10 kilobits of bandwidth and 10 Mbytes of 97 | buffer space. 98 | .PP 99 | Now, these three \fIlimitclasses\fR might be assigned to specific connections 100 | in the following ways: 101 | .RS 102 | .PP 103 | # default open 104 | .br 105 | assign default \fBopen\fR 106 | .PP 107 | # badguys subnet 108 | .br 109 | assign net 192.168.1.0/24 \fBjail\fR 110 | .PP 111 | # network admins 112 | .br 113 | assign user joe \fBroot\fR 114 | .br 115 | assign user jim \fBroot\fR 116 | .br 117 | assign user bob \fBroot\fR 118 | .br 119 | .RE 120 | .PP 121 | This set of \fIassign\fR lines specifically denies access from any 122 | open mode connection from the \fBbadguys\fR subnet. It specifically 123 | allows access to authenticated or encrypted mode transactions that can 124 | authenticate as the \fIidentities\fR \fBjoe jim\fR or \fBbob\fR (even from 125 | the \fBbadguys\fR subnet). All other connections would match the 126 | \fIassign default\fR rule and get the limits associated with the \fBopen\fR 127 | \fIlimitclass\fR. 128 | .SH SEE ALSO 129 | owping(1), owampd(8), owamp-server.limits(5), owamp-server.pfs(5), pfstore(1), 130 | and the \%http://e2epi.internet2.edu/owamp/ web site. 131 | .SH ACKNOWLEDGMENTS 132 | This material is based in part on work supported by the National Science 133 | Foundation (NSF) under Grant No. ANI-0314723. Any opinions, findings and 134 | conclusions or recommendations expressed in this material are those of 135 | the author(s) and do not necessarily reflect the views of the NSF. 136 | -------------------------------------------------------------------------------- /owamp/owamp/doc/owamp-server.pfs.man: -------------------------------------------------------------------------------- 1 | .\" The first line of this file must contain the '"[e][r][t][v] line 2 | .\" to tell man to run the appropriate filter "t" for table. 3 | .\" vim: set filetype=nroff : 4 | .\" 5 | .\" $Id$ 6 | .\" 7 | .\"###################################################################### 8 | .\"# # 9 | .\"# Copyright (C) 2006 # 10 | .\"# Internet2 # 11 | .\"# All Rights Reserved # 12 | .\"# # 13 | .\"###################################################################### 14 | .\" 15 | .\" File: owamp-server.pfs.man 16 | .\" 17 | .\" Author: Jeff Boote 18 | .\" Internet2 19 | .\" 20 | .\" Date: Sun Nov 5 14:53:10 MST 2006 21 | .\" 22 | .\" Description: 23 | .\" 24 | .TH owamp-server.pfs 5 "$Date$" 25 | .SH NAME 26 | owamp-server.pfs \- One-way latency server pass-phrase store 27 | .SH DESCRIPTION 28 | The \fBowamp-server.pfs\fR file (owamp-server.pfs by default) is used to hold the 29 | identity/pass-phrase pairs needed for \fBowampd\fR to authenticate users. 30 | The format of this file is described in the pfstore(1) manual page. The 31 | location of this file is controlled by the \fB\-c\fR option to \fBowampd\fR. 32 | .PP 33 | \fBowampd\fR uses symmetric AES keys for authentication. These keys 34 | are derived from a shared secret (the pass-phrase) using the PBKDF2 35 | algorithm (\fBRFC 2898\fR) with an HMAC-SHA1 as the pseudorandom 36 | function. 37 | .PP 38 | Therefore, the 39 | \fBowping\fR client must have access to the exact same pass-phrase 40 | that the \fBowampd\fR server uses. Both the client and the server 41 | need to derive the same AES key for authentication 42 | to work. It is important that the system administrator and end user 43 | ensure the pass-phrase is not compromised. 44 | .PP 45 | If the \fBowping\fR client is able to authenticate using the identity and 46 | derived AES key, \fBowampd\fR will use the directives found in the 47 | \fBowamp-server.limits\fR file to map policy restrictions for this connection. 48 | .SH SECURITY CONSIDERATIONS 49 | The pass-phrases in the \fBowamp-server.pfs\fR file are not encrypted in any way. 50 | (They are simply hex encoded.) The 51 | security of these pass-phrases are completely dependent upon the security 52 | of the filesystem and the discretion of the system administrator. 53 | .SH RESTRICTIONS 54 | \fBIdentity\fR names are restricted to 80 characters. 55 | .SH SEE ALSO 56 | pfstore(1), owping(1), owampd(8), owamp-server.limits(5), 57 | and the \%http://e2epi.internet2.edu/owamp/ web site. 58 | .SH ACKNOWLEDGMENTS 59 | This material is based in part on work supported by the National Science 60 | Foundation (NSF) under Grant No. ANI-0314723. Any opinions, findings and 61 | conclusions or recommendations expressed in this material are those of 62 | the author(s) and do not necessarily reflect the views of the NSF. 63 | -------------------------------------------------------------------------------- /owamp/owamp/doc/owamp_arch.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/perfsonar/owamp/fcfa567ef7de26b36d4a94b3d82d71cf6ef52cc8/owamp/owamp/doc/owamp_arch.png -------------------------------------------------------------------------------- /owamp/owamp/doc/owamp_arch.vsd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/perfsonar/owamp/fcfa567ef7de26b36d4a94b3d82d71cf6ef52cc8/owamp/owamp/doc/owamp_arch.vsd -------------------------------------------------------------------------------- /owamp/owamp/doc/owamp_firewalls.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | OWAMP TCP/UDP Port Usage and Firewall Configuration 4 | 5 | 6 |

OWAMP TCP/UDP Port Usage and Firewall Configuration

7 | 8 |

owamp uses 2 different sets of ports:

9 | 10 |
    11 |
  1. Main daemon listening port for control connection 12 | (Default: TCP/861)

  2. Defined using the 13 | port portion of the srcnode configuration 14 | option from owamp-server.conf.
    16 |

    For example, to enable this on a typical RHEL 4 system, you 17 | would need to add the following line to 18 | /etc/sysconfig/iptables:

    19 |
    20 | -A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 861 -j ACCEPT
    21 | 
    22 |

    This should be 23 | added somewhere *after* the line that allows ESTABLISHED and 24 | RELATED connections through.

    (Note that this does not 25 | use the system-config-securitylevel script from Redhat. I have 26 | not been able to get that to do all the things I needed.)

    27 |
    28 | 29 |
  3. OWAMP test flows (Default: UDP/ephemeral range)
  4. 30 |
    31 |
    Defined using the testports configuration 32 | option from owamp-server.conf, or 33 | the -P option to owping. 35 |
    36 |
    37 |

    If you 38 | specified testports as 39 | 910-950 *, you would then need to enable 40 | this range in your firewall configuration. (If you do not 41 | specify a range, owamp will only work reliably if you have open 42 | access for the entire ephemeral port range.)

    It is 43 | important to note, that you can only specify the port for the 44 | local side of the test. This same range is used for specifying 45 | the local port for both sending and receiving test packets. 46 | Therefore, your firewall configuration will need to accept any 47 | packets arriving for this port range, or departing from this 48 | port range.

    On a typical RHEL 4 system, you would need 49 | to add the following line to /etc/sysconfig/iptables given this 50 | range:

    51 |
    52 | -A RH-Firewall-1-INPUT -m udp -p udp --dport 910:950 -j ACCEPT
    53 | 
    54 |

    The default rule for the OUTPUT chain is to allow 55 | anything through. If your firewall is more strict than this, 56 | you will need to explicitly allow this same range of UDP ports 57 | through that chain using the --sport option. 58 |

    59 |

    60 | * Note that this specific range would be a 61 | very bad idea because non-root users would not be able to 62 | run owping. (They could not bind the low-numbered port.) I 63 | have specifically picked this because I don't want my 64 | example to become a de facto port range specification for 65 | owamp test traffic, thereby allowing owamp traffic to be 66 | classified. 67 |

    68 |
    69 | 70 |
71 |

Example RHEL 4 /etc/sysconfig/iptables file

72 |
73 | *filter
74 | :INPUT ACCEPT [0:0]
75 | :FORWARD ACCEPT [0:0]
76 | :OUTPUT ACCEPT [0:0]
77 | :RH-Firewall-1-INPUT - [0:0]
78 | -A INPUT -j RH-Firewall-1-INPUT
79 | -A FORWARD -j RH-Firewall-1-INPUT
80 | -A RH-Firewall-1-INPUT -i lo -j ACCEPT
81 | -A RH-Firewall-1-INPUT -p icmp --icmp-type any -j ACCEPT
82 | -A RH-Firewall-1-INPUT -p 50 -j ACCEPT
83 | -A RH-Firewall-1-INPUT -p 51 -j ACCEPT
84 | -A RH-Firewall-1-INPUT -p udp --dport 5353 -d 224.0.0.251 -j ACCEPT
85 | -A RH-Firewall-1-INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
86 | # ssh
87 | -A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 22 -j ACCEPT
88 | # owamp-control listen port (srcnode)
89 | -A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 861 -j ACCEPT
90 | # owamp-test
91 | -A RH-Firewall-1-INPUT -m udp -p udp --dport 910:950 -j ACCEPT
92 | # reject anything that has not matched
93 | -A RH-Firewall-1-INPUT -j REJECT --reject-with icmp-host-prohibited
94 | COMMIT
95 | 
96 | 97 | -------------------------------------------------------------------------------- /owamp/owamp/doc/owamp_infosheet.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/perfsonar/owamp/fcfa567ef7de26b36d4a94b3d82d71cf6ef52cc8/owamp/owamp/doc/owamp_infosheet.pdf -------------------------------------------------------------------------------- /owamp/owamp/doc/owampd.ms: -------------------------------------------------------------------------------- 1 | .\" The first line of this file must contain the '"[e][r][t][v] line 2 | .\" to tell man to run the appropriate filter "t" for table. 3 | .\" vim: set filetype=nroff : 4 | .\" 5 | .\" $Id$ 6 | .\" 7 | .\"###################################################################### 8 | .\"# # 9 | .\"# Copyright (C) 2004 # 10 | .\"# Internet2 # 11 | .\"# All Rights Reserved # 12 | .\"# # 13 | .\"###################################################################### 14 | .\" 15 | .\" File: owampd.8 16 | .\" 17 | .\" Author: Jeff Boote 18 | .\" Internet2 19 | .\" 20 | .\" Date: Fri May 7 15:24:16 MDT 2004 21 | .\" 22 | .\" Description: 23 | .\" 24 | .de TQ 25 | .br 26 | .ns 27 | .TP \\$1 28 | .. 29 | .\"Program name 30 | .ds prog owampd 31 | .\"Protocol name 32 | .ds proto OWAMP 33 | .\"Port number 34 | .ds port 861 35 | .TH owampd 8 "$Date$" 36 | .SH NAME 37 | owampd \- One-way latency server. 38 | .SH SYNOPSIS 39 | .B owampd 40 | [\fIoptions\fR] 41 | .SH DESCRIPTION 42 | .B owampd 43 | is a server program specifically designed to run one side of one-way 44 | latency tests. The client program \fBowping\fR is available to run 45 | the other side of the test. 46 | .PP 47 | Aside from actually running the tests, the main function of \fBowampd\fR 48 | is to determine which tests are allowed, based upon the policy restrictions 49 | configured by the system administrator. 50 | .PP 51 | \fBowampd\fR was designed to be run as a stand-alone daemon process. It 52 | uses the classic accept/fork model of handling new requests. 53 | .PP 54 | Most of the command line options for \fBowampd\fR have analogous options 55 | in the \fBowamp-server.conf\fR file. The command line takes precedence. 56 | .SH OPTIONS 57 | .TP 58 | .so nwampd_opts.man 59 | .SH REQUIREMENTS 60 | The \fBowampd\fR daemon requires a very well synchronized and stable clock. 61 | \fBowampd\fR requires that \fBNTP\fR be running to synchronize 62 | the system clock. \fBNTP\fR needs to be setup in a more methodical way 63 | than on most systems for the results to be meaningful. Please see the 64 | \fBOWAMP\fR web site \%(http://e2epi.internet2.edu/owamp/) for details 65 | concerning proper configuration of \fBNTP\fR for \fBOWAMP\fR. 66 | .SH ERRORS 67 | \fBowampd\fR uses \fBsyslog\fR to output error messages including access 68 | information. The \fIfacility\fR configuration option is used to determine 69 | what \fBsyslog\fR facility is used. The levels used are as follows: 70 | .IP \fBLOG_ERR\fR 71 | Used for messages indicating fatal errors. The requested action will not 72 | be performed. 73 | .IP \fBLOG_WARNING\fR 74 | Used for messages indicating an unexpected or dangerous condition. 75 | .IP \fBLOG_INFO\fR 76 | Used for access messages. 77 | .IP \fBLOG_DEBUG\fR 78 | Used to indicate reasons for actions. For example, if an access is denied 79 | due to policy choices that will be noted with this log level. 80 | .PP 81 | These levels were chosen to give the system-administrator the ability to 82 | separate access log information from error log information in a straight 83 | forward manner. 84 | .SH SIGNALS 85 | . 86 | The \fBowampd\fR process makes use of a number of signals to perform 87 | IPC between the various processes involved: 88 | .TP 89 | \fBSIGALRM\fR 90 | Used throughout to set timers where appropriate. 91 | .TP 92 | \fBSIGCHLD\fR 93 | Used to keep track of the state of child processes. 94 | .TP 95 | .B SIGINT 96 | .TQ 97 | .B SIGTERM 98 | .TQ 99 | .B SIGHUP 100 | Used to terminate any \fBowampd\fR process. These signals are caught by the 101 | parent daemon and it manages the complete shutdown of all the \fBowampd\fR 102 | processes. 103 | .TP 104 | \fBSIGPIPE\fR 105 | Disabled throughout \fBowampd\fR. 106 | .TP 107 | \fBSIGUSR1\fR 108 | Used to tell a spawned off receiver/sender process that all control 109 | setup interaction is complete and the test can continue at the 110 | determined time. (This is an indication that the StartSessions message 111 | was received for those familiar with the \fBOWAMP\fR protocol.) 112 | .TP 113 | \fBSIGUSR2\fR 114 | Used to tell a spawned off receiver/sender process to terminate a session 115 | early. (This is an indication that a StopSessions message was received 116 | for those familiar with the \fBOWAMP\fR protocol.) 117 | .SH FILES 118 | owamp-server.pid 119 | .br 120 | owamp-server.conf 121 | .br 122 | owamp-server.limits 123 | .br 124 | owamp-server.pfs 125 | .SH ENVIRONMENT VARIABLES 126 | \fBOWAMP\fR uses environment variables for some debugging options. 127 | .TS 128 | lb lb 129 | _ _ 130 | lb li . 131 | OWAMP Environment Variable Description 132 | 133 | OWAMP_DEBUG_TIMEOFFSET Offset time by this amount (seconds) 134 | .TE 135 | .SH SEE ALSO 136 | There are more details on configuring the \fBowampd\fR daemon in the 137 | owamp-server.conf(5) manual page. Details on configuring the policy 138 | are in the owamp-server.limits(5) and owamp-server.pfs(5) manual pages. 139 | Information on the client is in the owping(1) manual page. 140 | For more of an overview of the full functionality and architecture, see 141 | the \%http://e2epi.internet2.edu/owamp/ web site. 142 | .SH ACKNOWLEDGMENTS 143 | This material is based in part on work supported by the National Science 144 | Foundation (NSF) under Grant No. ANI-0314723. Any opinions, findings and 145 | conclusions or recommendations expressed in this material are those of 146 | the author(s) and do not necessarily reflect the views of the NSF. 147 | -------------------------------------------------------------------------------- /owamp/owamp/doc/owping_conn_opts.man: -------------------------------------------------------------------------------- 1 | .\" ex: set tabstop=4 ai expandtab softtabstop=4 shiftwidth=4: 2 | .\" -*- mode: c-basic-indent: 4; tab-width: 4; indent-tabs-mode: nil -*- 3 | .\" The first line of this file must contain the '"[e][r][t][v] line 4 | .\" to tell man to run the appropriate filter "t" for table. 5 | .\" vim: set filetype=nroff : 6 | .\" 7 | .\" $Id$ 8 | .\" 9 | .\"###################################################################### 10 | .\"# # 11 | .\"# Copyright (C) 2007 # 12 | .\"# Internet2 # 13 | .\"# All Rights Reserved # 14 | .\"# # 15 | .\"###################################################################### 16 | .\" 17 | .\" File: owping_conn_opts.man 18 | .\" 19 | .\" Author: Jeff W. Boote 20 | .\" Internet2 21 | .\" 22 | .\" Date: Sat Feb 24 03:57:37 MST 2007 23 | .\" 24 | .\" Description: 25 | .\" This file is included into owping.1, owfetch.1, owup.1 and 26 | .\" is not useful as a man-page on its own. 27 | .\" 28 | .SS Connection/Authentication Options: 29 | .TP 30 | \fB\-4\fR 31 | .br 32 | Forces the client to use IPv4 addresses only. 33 | .RS 34 | .IP Default: 35 | Unset. Client will use IPv4 or IPv6 address, but tries IPv6 first. 36 | .RE 37 | .TP 38 | \fB\-6\fR 39 | .br 40 | Forces the client to use IPv6 addresses only. 41 | .RS 42 | .IP Default: 43 | Unset. Client will use IPv4 or IPv6 address, but tries IPv6 first. 44 | .RE 45 | .TP 46 | \fB\-A\fR \fIauthmode\fB 47 | .br 48 | Specify the authentication modes the client is willing to use for 49 | communication. \fIauthmode\fR should be set as a character string with 50 | any or all of the characters "AEO". The modes are: 51 | .RS 52 | .IP \fBA\fR 53 | [\fBA\fR]uthenticated. This mode encrypts the control connection and 54 | digitally signs part of each test packet. 55 | .IP \fBE\fR 56 | [\fBE\fR]ncrypted. This mode encrypts the control connection and 57 | encrypts each test packet in full. 58 | .IP \fBO\fR 59 | [\fBO\fR]pen. No encryption of any kind is done. 60 | .PP 61 | The client can specify all the modes with which it is willing to communicate. 62 | The most strict mode that both the \fB\*[proto]\fR server and the 63 | \fB\*[proto]\fR client are willing to use 64 | will be selected. Authenticated and Encrypted modes require a "shared secret" 65 | in the form of a pass-phrase that is used to generate the AES and HMAC-SHA1 66 | session keys. 67 | .IP Default: 68 | "AEO". 69 | .RE 70 | .TP 71 | \fB\-k\fR \fIpfsfile\fR 72 | .br 73 | Use the pass-phrase in \fIpfsfile\fR for 74 | \fIusername\fR to derive the symmetric AES key used for encryption. 75 | \fIusername\fR must have a valid entry in \fIpfsfile\fR. 76 | \fIpfsfile\fR can be generated as described in the pfstore(1) manual 77 | page. 78 | .RS 79 | .IP Default: 80 | Unset. (If the \fB\-u\fR option was specified without the \fB-k\fR, the 81 | user will be prompted for a \fIpassphrase\fR.) 82 | .RE 83 | .TP 84 | \fB\-S\fR \fIsrcaddr\fR 85 | .br 86 | Bind the local address of the client socket to \fIsrcaddr\fR. \fIsrcaddr\fR 87 | can be specified using a DNS name or using standard textual notations for 88 | the IP addresses. (IPv6 addresses are of course supported.) 89 | .RS 90 | .IP Default: 91 | Unspecified (wild-card address selection). 92 | .RE 93 | .TP 94 | \fB\-B\fR \fIinterface\fR 95 | .br 96 | Bind the client sockets to the network interface \fIinterface\fR with 97 | SO_BINDTODEVICE. 98 | .RS 99 | .IP Default: 100 | Unspecified (sockets not bound to a particular interface). 101 | .RE 102 | .TP 103 | \fB\-Z\fR 104 | .br 105 | Do not specify sender and receiver IP addresses for tests packets when 106 | creating a TWAMP session. This allows the UDP test packets to pass through 107 | some types of NAT. This option is not available for OWAMP. 108 | .RS 109 | .IP Default: 110 | Unspecified (addresses for test packets are defined by the client). 111 | .RE 112 | .TP 113 | \fB\-u\fR \fIusername\fR 114 | .br 115 | Specify the username that identifies the shared secret (pass-phrase) 116 | used to derive the AES and HMAC-SHA1 session keys for 117 | authenticated and encrypted modes. If the \fB\-k\fR option is specified, 118 | the pass-phrase is retrieved from the \fIpfsfile\fR, 119 | otherwise the user is prompted for a pass-phrase. 120 | .RS 121 | .IP Default: 122 | Unset. 123 | .RE 124 | -------------------------------------------------------------------------------- /owamp/owamp/doc/owping_report.man: -------------------------------------------------------------------------------- 1 | .\" ex: set tabstop=4 ai expandtab softtabstop=4 shiftwidth=4: 2 | .\" -*- mode: c-basic-indent: 4; tab-width: 4; indent-tabs-mode: nil -*- 3 | .\" The first line of this file must contain the '"[e][r][t][v] line 4 | .\" to tell man to run the appropriate filter "t" for table. 5 | .\" vim: set filetype=nroff : 6 | .\" 7 | .\" $Id$ 8 | .\" 9 | .\"###################################################################### 10 | .\"# # 11 | .\"# Copyright (C) 2007 # 12 | .\"# Internet2 # 13 | .\"# All Rights Reserved # 14 | .\"# # 15 | .\"###################################################################### 16 | .\" 17 | .\" File: owping_report.man 18 | .\" 19 | .\" Author: Jeff W. Boote 20 | .\" Internet2 21 | .\" 22 | .\" Date: Sat Feb 24 04:09:01 MST 2007 23 | .\" 24 | .\" Description: 25 | .\" This file is included into owping.1, owfetch.1, owstats.1 and 26 | .\" is not useful as a man-page on its own. 27 | .\" 28 | .PP 29 | \fB\*[proto]\fR supports three reporting formats. A textual summary that was 30 | designed to be as similar to the results that \fBping\fR produces as 31 | possible. A machine readable summary format (\fI\-M\fR). And finally 32 | a raw format that prints out the data from each and every packet in as 33 | compact of a format as possible (\fI\-R\fR). 34 | The textual summary also allows the information from each packet to be 35 | reported using the \fI\-v\fR option. The default textual summary will 36 | be used if neither the \fI\-M\fR or the \fI\-R\fR options are specified. 37 | It includes: 38 | .TP 39 | SID 40 | .br 41 | Session Identifier. This value is unique for every test session. 42 | .TP 43 | Sent, Lost, Duplicates 44 | .br 45 | Number of packets that were sent, lost, and duplicated as seen by \fB\*[proto]\fR. 46 | .TP 47 | Min Delay, Median Delay, Max Delay, Error Estimate 48 | .br 49 | Minimum, median and maximum delay seen for sample. Maximum error estimate for 50 | the sample. (The median is determined using a histogram, so the resolution 51 | of this value is bounded by the \fI\-b\fR parameter. This can lead to misleading 52 | results, for example, for very small values of latency it is possible to 53 | see a value for the median that is greater than the maximum, but this is 54 | simply due to the resolution of the median measurement.) 55 | .TP 56 | Jitter 57 | .br 58 | An estimate of how "stable" the delay samples are. \fB\*[proto]\fR reports 59 | the the 95th percentile of delay - 50th percentile of delay. 60 | .TP 61 | Additional percentiles 62 | .br 63 | If the \fI\-a\fR option is used, those additional percentiles from the 64 | sample are displayed. 65 | .TP 66 | TTL (hops) information 67 | .br 68 | As a packet traverses the network, the IP TTL field is decremented each 69 | time the packet crosses a router. \fB\*[proto]\fR has been designed to 70 | collect the TTL information from the packets. The \fB\*[proto]\fR 71 | sender sets the TTL of all outgoing packets to 255. The \fB\*[proto]\fR 72 | receiver retrieves the TTL from the packet. The normal textual 73 | report uses this information to report the number of hops (number of 74 | routers) the packet traversed. The number of distinct values is reported 75 | as well as the minimum and maximum number of hops seen in the given session. 76 | The other reporting formats just report raw TTL values as seen in the packets. 77 | (It should be noted that if the number of hops reported seems unusually 78 | large, it probably means the \fB\*[proto]\fR sender was not able to set the 79 | TTL value correctly. The \fBtraceroute(1)\fR program can be used to 80 | verify what \fB\*[proto]\fR is reporting.) 81 | .TP 82 | Reordering 83 | .br 84 | Finally \fB\*[proto]\fR reports the amount of re-ordering it observed. A 85 | description of the metric used to report this can be found at: 86 | .br 87 | \%http://www.internet2.edu/performance/owamp/draft-shalunov-reordering-definition-02.txt.html 88 | -------------------------------------------------------------------------------- /owamp/owamp/doc/owstats.ms: -------------------------------------------------------------------------------- 1 | '\"t 2 | .\" The first line of this file must contain the '"[e][r][t][v] line 3 | .\" to tell man to run the appropriate filter "t" for table. 4 | .\" vim: set filetype=nroff : 5 | .\" 6 | .\" $Id$ 7 | .\" 8 | .\"###################################################################### 9 | .\"# # 10 | .\"# Copyright (C) 2004 # 11 | .\"# Internet2 # 12 | .\"# All Rights Reserved # 13 | .\"# # 14 | .\"###################################################################### 15 | .\" 16 | .\" File: owstats.man 17 | .\" 18 | .\" Author: Jeff Boote 19 | .\" Internet2 20 | .\" 21 | .\" Date: Wed Apr 28 08:48:05 MDT 2004 22 | .\" 23 | .\" Description: 24 | .\" 25 | .\"Protocol name 26 | .ds proto OWAMP 27 | .TH owstats 1 "$Date$" 28 | .SH NAME 29 | owstats \- Command line application used to parse \fBOWAMP\fR data files. 30 | .SH SYNOPSIS 31 | .B owstats 32 | [\fIoptions\fR] datafile.owp [datafile2.owp ...] 33 | .SH DESCRIPTION 34 | \fBowstats\fR is a command line application that is used to parse \fBOWAMP\fR 35 | data files. It is used to display the results in a number of different 36 | textual formats. 37 | .so owping_report.man 38 | .SH OPTIONS 39 | .TP 40 | \fB\-h\fR 41 | .br 42 | Print a usage message and exit. 43 | .RS 44 | .IP Default: 45 | Unset. 46 | .RE 47 | .so owping_out_opts.man 48 | .SH EXAMPLES 49 | .LP 50 | \fBowstats datafile.owp\fR 51 | .IP 52 | Report the summary statistics from the file datafile.owp. 53 | .LP 54 | \fBowstats -a 5,95 datafile.owp\fR 55 | .IP 56 | Report the summary statistics from the file datafile.owp. Also, 57 | report the 5th and 95th percentile of delay as an extra statistics. 58 | .LP 59 | \fBowstats -R datafile.owp\fR 60 | .IP 61 | Print out the packets in a more machine readable format with no 62 | statistics computed at all. 63 | .LP 64 | \fBowstats -v datafile.owp\fR 65 | .IP 66 | Show individual delays for each packet with summary statistics 67 | printed at the end. 68 | .LP 69 | \fBowstats -M datafile.owp\fR 70 | .IP 71 | Print out summary statistics in a more computer pars-able format. 72 | .LP 73 | \fBowstats datafile1.owp datafile2.owp datafile3.owp\fR 74 | .IP 75 | Print out summary statistics for multiple files. 76 | .SH SEE ALSO 77 | owampd(8), owping(1), owfetch(1) and the \fBOWAMP\fR web site 78 | \%(http://e2epi.internet2.edu/owamp/). 79 | .SH ACKNOWLEDGMENTS 80 | This material is based in part on work supported by the National Science 81 | Foundation (NSF) under Grant No. ANI-0314723. Any opinions, findings and 82 | conclusions or recommendations expressed in this material are those of 83 | the author(s) and do not necessarily reflect the views of the NSF. 84 | -------------------------------------------------------------------------------- /owamp/owamp/doc/owup.ms: -------------------------------------------------------------------------------- 1 | '\"t 2 | .\" The first line of this file must contain the '"[e][r][t][v] line 3 | .\" to tell man to run the appropriate filter "t" for table. 4 | .\" vim: set filetype=nroff : 5 | .\" 6 | .\" $Id$ 7 | .\" 8 | .\"###################################################################### 9 | .\"# # 10 | .\"# Copyright (C) 2006 # 11 | .\"# Internet2 # 12 | .\"# All Rights Reserved # 13 | .\"# # 14 | .\"###################################################################### 15 | .\" 16 | .\" File: owup.1 17 | .\" 18 | .\" Author: Jeff Boote 19 | .\" Internet2 20 | .\" 21 | .\" Date: Thu May 11 17:25:22 MDT 2006 22 | .\" 23 | .\" Description: 24 | .\" 25 | .\"Protocol name 26 | .ds proto OWAMP 27 | .TH owup 1 "$Date$" 28 | .SH NAME 29 | owup \- Client application to query the server for uptime information 30 | .SH SYNOPSIS 31 | .B owup 32 | [\fIoptions\fR] servhost 33 | .SH DESCRIPTION 34 | \fBowup\fR is a command line client application used to 35 | fetch uptime information from the server. The \fBowampd\fR greeting 36 | message provides uptime information. This can be useful information 37 | for clients that run long-duration test and for monitoring purposes. 38 | .PP 39 | .I servhost 40 | can be specified using rfc2396 and rfc2732 syntax for both host and 41 | port specification: 42 | .TP 43 | .I node:port 44 | .br 45 | IPv4 syntax where node is either a DNS name or a numeric host address string 46 | consisting of a dotted decimal IPv4 address. The \fI\:port\fR is an optional 47 | port specifier to contact servers running on a non-default port and 48 | can be left off in most cases. 49 | This syntax also works for IPv6 addresses specified using DNS names. 50 | .TP 51 | .I [node]:port 52 | IPv6 syntax where node is specified using a numeric IPv6 host address 53 | string. The []'s are required only if the optional \fI\:port\fR port 54 | specifier is used. 55 | .SH OPTIONS 56 | .TP 57 | \fB\-h\fR 58 | .br 59 | Print a usage message and exit. 60 | .RS 61 | .IP Default: 62 | Unset. 63 | .RE 64 | .so owping_conn_opts.man 65 | .SH EXAMPLES 66 | .LP 67 | \fBowup somehost.com 68 | .IP 69 | Contact host somehost.com. Fetch the uptime information and display it. 70 | .SH SEE ALSO 71 | owampd(8), owping(1), owstats(1), aespasswd(1) and 72 | the \%http://e2epi.internet2.edu/owamp/ web site. 73 | .SH ACKNOWLEDGMENTS 74 | This material is based in part on work supported by the National Science 75 | Foundation (NSF) under Grant No. ANI-0314723. Any opinions, findings and 76 | conclusions or recommendations expressed in this material are those of 77 | the author(s) and do not necessarily reflect the views of the NSF. 78 | -------------------------------------------------------------------------------- /owamp/owamp/doc/twamp-server.conf.ms: -------------------------------------------------------------------------------- 1 | .\" The first line of this file must contain the '"[e][r][t][v] line 2 | .\" to tell man to run the appropriate filter "t" for table. 3 | .\" vim: set filetype=nroff : 4 | .\" 5 | .\"###################################################################### 6 | .\"# # 7 | .\"# Copyright (C) 2004 # 8 | .\"# Internet2 # 9 | .\"# All Rights Reserved # 10 | .\"# # 11 | .\"###################################################################### 12 | .\" 13 | .\" File: twamp-server.conf.ms 14 | .\" 15 | .\" Author: Jeff Boote 16 | .\" Internet2 17 | .\" 18 | .\" Date: Tue May 11 14:15:18 MDT 2004 19 | .\" 20 | .\" Description: 21 | .\" 22 | .\"Program name 23 | .ds prog twampd 24 | .\"Config name 25 | .ds conf twamp-server 26 | .\"Protocol name 27 | .ds proto TWAMP 28 | .\"Port number 29 | .ds port 862 30 | .TH twamp-server.conf 5 31 | .SH NAME 32 | twamp-server.conf \- Two-way active measurement daemon configuration file. 33 | .so nwampd_conf_desc.man 34 | .SH SEE ALSO 35 | twping(1), twampd(8), twamp-server.limits(5), twamp-server.pfs(5), pfstore(1), 36 | and the \%http://e2epi.internet2.edu/owamp/ web site. 37 | .SH ACKNOWLEDGMENTS 38 | This material is based in part on work supported by the National Science 39 | Foundation (NSF) under Grant No. ANI-0314723. Any opinions, findings and 40 | conclusions or recommendations expressed in this material are those of 41 | the author(s) and do not necessarily reflect the views of the NSF. 42 | -------------------------------------------------------------------------------- /owamp/owamp/doc/twamp-server.limits.ms: -------------------------------------------------------------------------------- 1 | '\"t 2 | .\" The first line of this file must contain the '"[e][r][t][v] line 3 | .\" to tell man to run the appropriate filter "t" for table. 4 | .\" vim: set filetype=nroff : 5 | .\" 6 | .\"###################################################################### 7 | .\"# # 8 | .\"# Copyright (C) 2004 # 9 | .\"# Internet2 # 10 | .\"# All Rights Reserved # 11 | .\"# # 12 | .\"###################################################################### 13 | .\" 14 | .\" File: twamp-server.limits.ms 15 | .\" 16 | .\" Author: Jeff Boote 17 | .\" Internet2 18 | .\" 19 | .\" Date: Wed May 12 10:45:09 MDT 2004 20 | .\" 21 | .\" Description: 22 | .\" 23 | .\"Program name 24 | .ds prog twampd 25 | .\"Config name 26 | .ds conf twamp-server 27 | .TH twamp-server.limits 5 28 | .SH NAME 29 | twamp-server.limits \- Two-way active measurement server policy configuration file 30 | .so nwampd_limits_desc.man 31 | .SH EXAMPLES 32 | An initial \fIlimit\fR line might look like: 33 | .RS 34 | .HP 35 | limit root with \\ 36 | .br 37 | bandwidth=900m, \\ 38 | .br 39 | allow_open_mode=off 40 | .RE 41 | .PP 42 | This would create a \fIlimitclass\fR named \fBroot\fR. Because no 43 | \fIparent\fR is 44 | specified, this must be the first \fIlimitclass\fR defined in the 45 | file. This \fIlimitclass\fR has a very liberal limit for bandwidth 46 | (900m). However, open mode authentication is not enabled for this 47 | \fIlimitclass\fR, so the connections that get these limits must 48 | successfully authenticate using an AES key derived from the 49 | pass-phrase in the \fBtwamp-server.pfs\fR file. 50 | .PP 51 | If an administrator also wants to create a \fIlimitclass\fR that is used 52 | to deny all requests, they might add: 53 | .RS 54 | .HP 55 | limit jail with \\ 56 | .br 57 | parent=root, \\ 58 | .br 59 | bandwidth=1, \\ 60 | .br 61 | allow_open_mode=off 62 | .RE 63 | .PP 64 | This would create a \fIlimitclass\fR named \fBjail\fR. Because the 65 | limit for bandwidth is so low, virtually all tests will be denied. 66 | \fIallow_open_mode\fR is off, so initial connections that are not in 67 | authenticated or encrypted mode will be dropped immediately. 68 | (It would not make much sense to assign a \fIuser\fR identity to this 69 | \fIlimitclass\fR. If you don't want connections from a particular \fIuser\fR 70 | identity the best thing to do is to remove that \fIuser\fR from 71 | the \fBtwamp-server.pfs\fR file.) 72 | .PP 73 | If the administrator wanted to allow a limited amount of open tests, they 74 | could define a \fIlimitclass\fR like: 75 | .RS 76 | .HP 77 | limit open with \\ 78 | .br 79 | parent=root, \\ 80 | .br 81 | bandwidth=10k, \\ 82 | .br 83 | allow_open_mode=on 84 | .RE 85 | .PP 86 | This could be used to allow testing by random connections. 87 | It limits those tests to 10 kilobits of bandwidth. 88 | .PP 89 | Now, these three \fIlimitclasses\fR might be assigned to specific connections 90 | in the following ways: 91 | .RS 92 | .PP 93 | # default open 94 | .br 95 | assign default \fBopen\fR 96 | .PP 97 | # badguys subnet 98 | .br 99 | assign net 192.168.1.0/24 \fBjail\fR 100 | .PP 101 | # network admins 102 | .br 103 | assign user joe \fBroot\fR 104 | .br 105 | assign user jim \fBroot\fR 106 | .br 107 | assign user bob \fBroot\fR 108 | .br 109 | .RE 110 | .PP 111 | This set of \fIassign\fR lines specifically denies access from any 112 | open mode connection from the \fBbadguys\fR subnet. It specifically 113 | allows access to authenticated or encrypted mode transactions that can 114 | authenticate as the \fIidentities\fR \fBjoe jim\fR or \fBbob\fR (even from 115 | the \fBbadguys\fR subnet). All other connections would match the 116 | \fIassign default\fR rule and get the limits associated with the \fBopen\fR 117 | \fIlimitclass\fR. 118 | .SH SEE ALSO 119 | twping(1), twampd(8), twamp-server.limits(5), twamp-server.pfs(5), pfstore(1), 120 | and the \%http://e2epi.internet2.edu/owamp/ web site. 121 | .SH ACKNOWLEDGMENTS 122 | This material is based in part on work supported by the National Science 123 | Foundation (NSF) under Grant No. ANI-0314723. Any opinions, findings and 124 | conclusions or recommendations expressed in this material are those of 125 | the author(s) and do not necessarily reflect the views of the NSF. 126 | -------------------------------------------------------------------------------- /owamp/owamp/doc/twamp-server.pfs.man: -------------------------------------------------------------------------------- 1 | .\" The first line of this file must contain the '"[e][r][t][v] line 2 | .\" to tell man to run the appropriate filter "t" for table. 3 | .\" vim: set filetype=nroff : 4 | .\" 5 | .\" $Id$ 6 | .\" 7 | .\"###################################################################### 8 | .\"# # 9 | .\"# Copyright (C) 2006 # 10 | .\"# Internet2 # 11 | .\"# All Rights Reserved # 12 | .\"# # 13 | .\"###################################################################### 14 | .\" 15 | .\" File: twamp-server.pfs.man 16 | .\" 17 | .\" Author: Jeff Boote 18 | .\" Internet2 19 | .\" 20 | .\" Date: Sun Nov 5 14:53:10 MST 2006 21 | .\" 22 | .\" Description: 23 | .\" 24 | .TH twamp-server.pfs 5 "$Date$" 25 | .SH NAME 26 | twamp-server.pfs \- One-way latency server pass-phrase store 27 | .SH DESCRIPTION 28 | The \fBtwamp-server.pfs\fR file is used to hold the identity/pass-phrase pairs 29 | needed for \fBtwampd\fR to authenticate users. The format of this file 30 | is described in the pfstore(1) manual page. The location of this 31 | file is controlled by the \fB\-c\fR option to \fBtwampd\fR. 32 | .PP 33 | \fBtwampd\fR uses symmetric AES keys for authentication. These keys 34 | are derived from a shared secret (the pass-phrase) using the PBKDF2 35 | algorithm (\fBRFC 2898\fR) with an HMAC-SHA1 as the pseudorandom 36 | function. 37 | .PP 38 | Therefore, the 39 | \fBtwping\fR client must have access to the exact same pass-phrase 40 | that the \fBtwampd\fR server uses. Both the client and the server 41 | need to derive the same AES key for authentication 42 | to work. It is important that the system administrator and end user 43 | ensure the pass-phrase is not compromised. 44 | .PP 45 | If the \fBtwping\fR client is able to authenticate using the identity and 46 | derived AES key, \fBtwampd\fR will use the directives found in the 47 | \fBtwamp-server.limits\fR file to map policy restrictions for this connection. 48 | .SH SECURITY CONSIDERATIONS 49 | The pass-phrases in the \fBtwamp-server.pfs\fR file are not encrypted in any way. 50 | (They are simply hex encoded.) The 51 | security of these pass-phrases are completely dependent upon the security 52 | of the filesystem and the discretion of the system administrator. 53 | .SH RESTRICTIONS 54 | \fBIdentity\fR names are restricted to 80 characters. 55 | .SH SEE ALSO 56 | pfstore(1), twping(1), twampd(8), twamp-server.limits(5), 57 | and the \%http://e2epi.internet2.edu/owamp/ web site. 58 | .SH ACKNOWLEDGMENTS 59 | This material is based in part on work supported by the National Science 60 | Foundation (NSF) under Grant No. ANI-0314723. Any opinions, findings and 61 | conclusions or recommendations expressed in this material are those of 62 | the author(s) and do not necessarily reflect the views of the NSF. 63 | -------------------------------------------------------------------------------- /owamp/owamp/doc/twampd.ms: -------------------------------------------------------------------------------- 1 | .\" The first line of this file must contain the '"[e][r][t][v] line 2 | .\" to tell man to run the appropriate filter "t" for table. 3 | .\" vim: set filetype=nroff : 4 | .\" 5 | .\"###################################################################### 6 | .\"# # 7 | .\"# Copyright (C) 2015 # 8 | .\"# Brocade Communications # 9 | .\"# All Rights Reserved # 10 | .\"# # 11 | .\"###################################################################### 12 | .\" 13 | .\" File: twampd.8 14 | .\" 15 | .\" Author: Robert Shearman 16 | .\" Brocade Communications 17 | .\" 18 | .\" Date: Fri May 7 15:24:16 MDT 2004 19 | .\" 20 | .\" Description: 21 | .\" Based on owampd.ms 22 | .\" 23 | .de TQ 24 | .br 25 | .ns 26 | .TP \\$1 27 | .. 28 | .\"Program name 29 | .ds prog twampd 30 | .\"Protocol name 31 | .ds proto TWAMP 32 | .\"Port number 33 | .ds port 862 34 | .TH twampd 8 35 | .SH NAME 36 | twampd \- Two-way active measurement server. 37 | .SH SYNOPSIS 38 | .B twampd 39 | [\fIoptions\fR] 40 | .SH DESCRIPTION 41 | .B twampd 42 | is a server program that allows a client to perform two-way or 43 | round-trip latency measurements. The application of timestamps in the 44 | reflector enables greater accuracy over the other most common facility 45 | for round-trip measurements, \fIICMP Echo Request/Reply\fR. 46 | .PP 47 | Aside from running the tests, the main function of \fBtwampd\fR 48 | is to determine which tests are allowed, based upon the policy restrictions 49 | configured by the system administrator. 50 | .PP 51 | \fBtwampd\fR was designed to be run as a stand-alone daemon process. It 52 | uses the classic accept/fork model of handling new requests. 53 | .PP 54 | Most of the command line options for \fBtwampd\fR have analogous options 55 | in the \fBtwamp-server.conf\fR file. The command line takes precedence. 56 | .SH OPTIONS 57 | .TP 58 | .so nwampd_opts.man 59 | .SH REQUIREMENTS 60 | Unlike \fBOWAMP\fR, the \fBTWAMP\fR protocol does not require a well 61 | synchronized clock. However, the clock should be stable. 62 | .SH ERRORS 63 | \fBtwampd\fR uses \fBsyslog\fR to output error messages including access 64 | information. The \fIfacility\fR configuration option is used to determine 65 | what \fBsyslog\fR facility is used. The levels used are as follows: 66 | .IP \fBLOG_ERR\fR 67 | Used for messages indicating fatal errors. The requested action will not 68 | be performed. 69 | .IP \fBLOG_WARNING\fR 70 | Used for messages indicating an unexpected or dangerous condition. 71 | .IP \fBLOG_INFO\fR 72 | Used for access messages. 73 | .IP \fBLOG_DEBUG\fR 74 | Used to indicate reasons for actions. For example, if an access is denied 75 | due to policy choices that will be noted with this log level. 76 | .PP 77 | These levels were chosen to give the system-administrator the ability to 78 | separate access log information from error log information in a straight 79 | forward manner. 80 | .SH SIGNALS 81 | . 82 | The \fBtwampd\fR process makes use of a number of signals to perform 83 | IPC between the various processes involved: 84 | .TP 85 | \fBSIGALRM\fR 86 | Used throughout to set timers where appropriate. 87 | .TP 88 | \fBSIGCHLD\fR 89 | Used to keep track of the state of child processes. 90 | .TP 91 | .B SIGINT 92 | .TQ 93 | .B SIGTERM 94 | .TQ 95 | .B SIGHUP 96 | Used to terminate any \fBtwampd\fR process. These signals are caught by the 97 | parent daemon and it manages the complete shutdown of all the \fBtwampd\fR 98 | processes. 99 | .TP 100 | \fBSIGPIPE\fR 101 | Disabled throughout \fBtwampd\fR. 102 | .TP 103 | \fBSIGUSR1\fR 104 | Used to tell a spawned off receiver/sender process that all control 105 | setup interaction is complete and the test can continue at the 106 | determined time. (This is an indication that the StartSessions message 107 | was received for those familiar with the \fBTWAMP\fR protocol.) 108 | .TP 109 | \fBSIGUSR2\fR 110 | Used to tell a spawned off receiver/sender process to terminate a session 111 | early. (This is an indication that a StopSessions message was received 112 | for those familiar with the \fBTWAMP\fR protocol.) 113 | .SH FILES 114 | twamp-server.pid 115 | .br 116 | twamp-server.conf 117 | .br 118 | twamp-server.limits 119 | .br 120 | twamp-server.pfs 121 | .SH ENVIRONMENT VARIABLES 122 | \fBtwampd\fR uses environment variables for some debugging options. 123 | .TS 124 | lb lb 125 | _ _ 126 | lb li . 127 | Environment Variable Description 128 | 129 | OWAMP_DEBUG_TIMEOFFSET Offset time by this amount (seconds) 130 | .TE 131 | .SH SEE ALSO 132 | There are more details on configuring the \fBtwampd\fR daemon in the 133 | twamp-server.conf(5) manual page. Details on configuring the policy 134 | are in the twamp-server.limits(5) and twamp-server.pfs(5) manual pages. 135 | Information on the client is in the twping(1) manual page. 136 | For more of an overview of the full functionality and architecture, see 137 | the \%http://e2epi.internet2.edu/owamp/ web site. 138 | .SH ACKNOWLEDGMENTS 139 | This material is based in part on work supported by the National Science 140 | Foundation (NSF) under Grant No. ANI-0314723. Any opinions, findings and 141 | conclusions or recommendations expressed in this material are those of 142 | the author(s) and do not necessarily reflect the views of the NSF. 143 | -------------------------------------------------------------------------------- /owamp/owamp/exp-vector/rijndael-alg-ref.h: -------------------------------------------------------------------------------- 1 | /* rijndael-alg-ref.h v2.0 August '99 2 | * Reference ANSI C code 3 | * authors: Paulo Barreto 4 | * Vincent Rijmen, K.U.Leuven 5 | */ 6 | #ifndef __RIJNDAEL_ALG_H 7 | #define __RIJNDAEL_ALG_H 8 | 9 | #define MAXBC (256/32) 10 | #define MAXKC (256/32) 11 | #define MAXROUNDS 14 12 | 13 | typedef unsigned char word8; 14 | typedef unsigned short word16; 15 | typedef unsigned long word32; 16 | 17 | 18 | int rijndaelKeySched (word8 k[4][MAXKC], int keyBits, int blockBits, 19 | word8 rk[MAXROUNDS+1][4][MAXBC]); 20 | int rijndaelEncrypt (word8 a[4][MAXBC], int keyBits, int blockBits, 21 | word8 rk[MAXROUNDS+1][4][MAXBC]); 22 | int rijndaelEncryptRound (word8 a[4][MAXBC], int keyBits, int blockBits, 23 | word8 rk[MAXROUNDS+1][4][MAXBC], int rounds); 24 | int rijndaelDecrypt (word8 a[4][MAXBC], int keyBits, int blockBits, 25 | word8 rk[MAXROUNDS+1][4][MAXBC]); 26 | int rijndaelDecryptRound (word8 a[4][MAXBC], int keyBits, int blockBits, 27 | word8 rk[MAXROUNDS+1][4][MAXBC], int rounds); 28 | 29 | #endif /* __RIJNDAEL_ALG_H */ 30 | -------------------------------------------------------------------------------- /owamp/owamp/exp-vector/rijndael-api-ref.h: -------------------------------------------------------------------------------- 1 | /* rijndael-api-ref.h v2.0 August '99 2 | * Reference ANSI C code 3 | */ 4 | 5 | /* AES Cipher header file for ANSI C Submissions 6 | Lawrence E. Bassham III 7 | Computer Security Division 8 | National Institute of Standards and Technology 9 | 10 | April 15, 1998 11 | 12 | This sample is to assist implementers developing to the Cryptographic 13 | API Profile for AES Candidate Algorithm Submissions. Please consult this 14 | document as a cross-reference. 15 | 16 | ANY CHANGES, WHERE APPROPRIATE, TO INFORMATION PROVIDED IN THIS FILE 17 | MUST BE DOCUMENTED. CHANGES ARE ONLY APPROPRIATE WHERE SPECIFIED WITH 18 | THE STRING "CHANGE POSSIBLE". FUNCTION CALLS AND THEIR PARAMETERS CANNOT 19 | BE CHANGED. STRUCTURES CAN BE ALTERED TO ALLOW IMPLEMENTERS TO INCLUDE 20 | IMPLEMENTATION SPECIFIC INFORMATION. 21 | */ 22 | 23 | /* Includes: 24 | Standard include files 25 | */ 26 | 27 | #include 28 | #include "rijndael-alg-ref.h" 29 | 30 | /* Defines: 31 | Add any additional defines you need 32 | */ 33 | 34 | #define DIR_ENCRYPT 0 /* Are we encrpyting? */ 35 | #define DIR_DECRYPT 1 /* Are we decrpyting? */ 36 | #define MODE_ECB 1 /* Are we ciphering in ECB mode? */ 37 | #define MODE_CBC 2 /* Are we ciphering in CBC mode? */ 38 | #define MODE_CFB1 3 /* Are we ciphering in 1-bit CFB mode? */ 39 | #define TRUE 1 40 | #define FALSE 0 41 | #define BITSPERBLOCK 128 /* Default number of bits in a cipher block */ 42 | 43 | /* Error Codes - CHANGE POSSIBLE: inclusion of additional error codes */ 44 | #define BAD_KEY_DIR -1 /* Key direction is invalid, e.g., 45 | unknown value */ 46 | #define BAD_KEY_MAT -2 /* Key material not of correct 47 | length */ 48 | #define BAD_KEY_INSTANCE -3 /* Key passed is not valid */ 49 | #define BAD_CIPHER_MODE -4 /* Params struct passed to 50 | cipherInit invalid */ 51 | #define BAD_CIPHER_STATE -5 /* Cipher in wrong state (e.g., not 52 | initialized) */ 53 | #define BAD_CIPHER_INSTANCE -7 54 | 55 | 56 | /* CHANGE POSSIBLE: inclusion of algorithm specific defines */ 57 | #define MAX_KEY_SIZE 64 /* # of ASCII char's needed to 58 | represent a key */ 59 | #define MAX_IV_SIZE BITSPERBLOCK/8 /* # bytes needed to 60 | represent an IV */ 61 | 62 | /* Typedefs: 63 | 64 | Typedef'ed data storage elements. Add any algorithm specific 65 | parameters at the bottom of the structs as appropriate. 66 | */ 67 | 68 | typedef unsigned char BYTE; 69 | 70 | /* The structure for key information */ 71 | typedef struct { 72 | BYTE direction; /* Key used for encrypting or decrypting? */ 73 | int keyLen; /* Length of the key */ 74 | char keyMaterial[MAX_KEY_SIZE+1]; /* Raw key data in ASCII, 75 | e.g., user input or KAT values */ 76 | /* The following parameters are algorithm dependent, replace or 77 | add as necessary */ 78 | int blockLen; /* block length */ 79 | word8 keySched[MAXROUNDS+1][4][MAXBC]; /* key schedule */ 80 | } keyInstance; 81 | 82 | /* The structure for cipher information */ 83 | typedef struct { 84 | BYTE mode; /* MODE_ECB, MODE_CBC, or MODE_CFB1 */ 85 | BYTE IV[MAX_IV_SIZE]; /* A possible Initialization Vector for 86 | ciphering */ 87 | /* Add any algorithm specific parameters needed here */ 88 | int blockLen; /* Sample: Handles non-128 bit block sizes 89 | (if available) */ 90 | } cipherInstance; 91 | 92 | 93 | /* Function protoypes */ 94 | /* CHANGED: makeKey(): parameter blockLen added 95 | this parameter is absolutely necessary if you want to 96 | setup the round keys in a variable block length setting 97 | cipherInit(): parameter blockLen added (for obvious reasons) 98 | */ 99 | int makeKey(keyInstance *key, BYTE direction, int keyLen, char *keyMaterial); 100 | 101 | int cipherInit(cipherInstance *cipher, BYTE mode, char *IV); 102 | 103 | int blockEncrypt(cipherInstance *cipher, keyInstance *key, BYTE *input, 104 | int inputLen, BYTE *outBuffer); 105 | 106 | int blockDecrypt(cipherInstance *cipher, keyInstance *key, BYTE *input, 107 | int inputLen, BYTE *outBuffer); 108 | int cipherUpdateRounds(cipherInstance *cipher, keyInstance *key, BYTE *input, 109 | int inputLen, BYTE *outBuffer, int Rounds); 110 | -------------------------------------------------------------------------------- /owamp/owamp/externals.txt: -------------------------------------------------------------------------------- 1 | # Do not delete or edit this file unless you REALLY know what you are doing! 2 | # Use this file with "svn propset svn:externals -F externals.txt ." 3 | # -jeff 4 | # this should normally be at 'trunk' of I2util. Once this is 'branched' 5 | # it should be modified in the 'branch' to point at a specific 6 | # version of I2util 7 | #I2util http://anonsvn.internet2.edu/svn/I2util/tags/I2util_1.1 8 | I2util http://anonsvn.internet2.edu/svn/I2util/trunk 9 | -------------------------------------------------------------------------------- /owamp/owamp/owamp/Makefile.am: -------------------------------------------------------------------------------- 1 | # 2 | # $Id$ 3 | # 4 | ######################################################################### 5 | # # 6 | # Copyright (C) 2002 # 7 | # Internet2 # 8 | # All Rights Reserved # 9 | # # 10 | ######################################################################### 11 | # 12 | # File: Makefile.am 13 | # 14 | # Author: Jeff Boote 15 | # Internet2 16 | # 17 | # Date: Wed Apr 17 13:54:29 EDT 2002 18 | # 19 | # Description: libowamp build description. 20 | 21 | AM_CPPFLAGS = $(OWPINCS) $(I2UTILINCS) 22 | 23 | lib_LIBRARIES = libowamp.a 24 | libowamp_a_SOURCES = api.c capi.c sapi.c context.c error.c owampP.h \ 25 | protocol.c io.c endpoint.c time.c arithm64.c \ 26 | rijndael-alg-fst.c rijndael-alg-fst.h \ 27 | rijndael-api-fst.c rijndael-api-fst.h \ 28 | schedule.c stats.c 29 | 30 | EXTRA_DIST = owamp.h 31 | 32 | # Need to rewrite this test slightly before making it a build test... 33 | #TESTS = rijndael-test-fst 34 | #noinst_PROGRAMS = rijndael-test-fst 35 | #test_hash_SOURCES = rijndael-test-fst.c 36 | -------------------------------------------------------------------------------- /owamp/owamp/owamp/bc.txt: -------------------------------------------------------------------------------- 1 | /* Simple script to compute Q[] series from the Knuth S algorithm 2 | ** (vol.2 p.133). 3 | ** Usage: bc -ql bc.txt 4 | */ 5 | scale=1000 6 | obase=16 7 | l=l(2); 8 | cur=l(2); 9 | q[0]=0.0; 10 | for (i=1; i < 25; i++){ 11 | q[i] = q[i-1] + cur 12 | cur = (cur * l) / (i + 1.0) 13 | print q[i]*(2^64) 14 | print "\n" 15 | } 16 | -------------------------------------------------------------------------------- /owamp/owamp/owamp/config.h.in: -------------------------------------------------------------------------------- 1 | /* owamp/config.h.in. Generated from configure.ac by autoheader. */ 2 | 3 | /* "name of sysconfdir under prefix" */ 4 | #undef AUTOCONF_SYSCONFDIR 5 | 6 | /* Define to 1 if you have the `bind' function. */ 7 | #undef HAVE_BIND 8 | 9 | /* Define to 1 if you have the `connect' function. */ 10 | #undef HAVE_CONNECT 11 | 12 | /* Define to 1 if you have the declaration of `fseeko', and to 0 if you don't. 13 | */ 14 | #undef HAVE_DECL_FSEEKO 15 | 16 | /* Define to 1 if you have the declaration of `optreset', and to 0 if you 17 | don't. */ 18 | #undef HAVE_DECL_OPTRESET 19 | 20 | /* Define to 1 if you have the `dirfd' function. */ 21 | #undef HAVE_DIRFD 22 | 23 | /* Define to 1 if `d_fd' is a member of `DIR'. */ 24 | #undef HAVE_DIR_D_FD 25 | 26 | /* Define to 1 if `d_namlen' is a member of `DIR'. */ 27 | #undef HAVE_DIR_D_NAMLEN 28 | 29 | /* Define to 1 if you have the header file. */ 30 | #undef HAVE_ERRNO_H 31 | 32 | /* Define to 1 if you have the `getaddrinfo' function. */ 33 | #undef HAVE_GETADDRINFO 34 | 35 | /* Define to 1 if you have the header file. */ 36 | #undef HAVE_I2UTIL_CONF_H 37 | 38 | /* Define to 1 if you have the header file. */ 39 | #undef HAVE_I2UTIL_UTIL_H 40 | 41 | /* Define to 1 if you have the header file. */ 42 | #undef HAVE_INTTYPES_H 43 | 44 | /* Define to 1 if you have the `cap' library (-lcap). */ 45 | #undef HAVE_LIBCAP 46 | 47 | /* Define to 1 if your system has a GNU libc compatible `malloc' function, and 48 | to 0 otherwise. */ 49 | #undef HAVE_MALLOC 50 | 51 | /* Define to 1 if you have the header file. */ 52 | #undef HAVE_MEMORY_H 53 | 54 | /* Define to 1 if you have the `memset' function. */ 55 | #undef HAVE_MEMSET 56 | 57 | /* Define to 1 if you have the `mergesort' function. */ 58 | #undef HAVE_MERGESORT 59 | 60 | /* Define to 1 if you have the header file. */ 61 | #undef HAVE_NETDB_H 62 | 63 | /* Define to 1 if you have the `socket' function. */ 64 | #undef HAVE_SOCKET 65 | 66 | /* Define to 1 if you have the header file. */ 67 | #undef HAVE_STDINT_H 68 | 69 | /* Define to 1 if you have the header file. */ 70 | #undef HAVE_STDLIB_H 71 | 72 | /* Define to 1 if you have the header file. */ 73 | #undef HAVE_STRINGS_H 74 | 75 | /* Define to 1 if you have the header file. */ 76 | #undef HAVE_STRING_H 77 | 78 | /* Define to 1 if `sa_len' is a member of `struct sockaddr'. */ 79 | #undef HAVE_STRUCT_SOCKADDR_SA_LEN 80 | 81 | /* Define to 1 if you have the header file. */ 82 | #undef HAVE_SYS_MMAN_H 83 | 84 | /* Define to 1 if you have the header file. */ 85 | #undef HAVE_SYS_PARAM_H 86 | 87 | /* Define to 1 if you have the header file. */ 88 | #undef HAVE_SYS_SOCKET_H 89 | 90 | /* Define to 1 if you have the header file. */ 91 | #undef HAVE_SYS_STAT_H 92 | 93 | /* Define to 1 if you have the header file. */ 94 | #undef HAVE_SYS_TIMEX_H 95 | 96 | /* Define to 1 if you have the header file. */ 97 | #undef HAVE_SYS_TIME_H 98 | 99 | /* Define to 1 if you have the header file. */ 100 | #undef HAVE_SYS_TYPES_H 101 | 102 | /* Define to 1 if you have the header file. */ 103 | #undef HAVE_UNISTD_H 104 | 105 | /* define if your compiler has __attribute__ */ 106 | #undef HAVE___ATTRIBUTE__ 107 | 108 | /* MAN2HTML man-page converter */ 109 | #undef MAN2HTML 110 | 111 | /* Define to the address where bug reports for this package should be sent. */ 112 | #undef PACKAGE_BUGREPORT 113 | 114 | /* Define to the full name of this package. */ 115 | #undef PACKAGE_NAME 116 | 117 | /* Define to the full name and version of this package. */ 118 | #undef PACKAGE_STRING 119 | 120 | /* Define to the one symbol short name of this package. */ 121 | #undef PACKAGE_TARNAME 122 | 123 | /* Define to the home page for this package. */ 124 | #undef PACKAGE_URL 125 | 126 | /* Define to the version of this package. */ 127 | #undef PACKAGE_VERSION 128 | 129 | /* "The RPM version number" */ 130 | #undef PATCH_LEVEL 131 | 132 | /* The size of `uint64_t', as computed by sizeof. */ 133 | #undef SIZEOF_UINT64_T 134 | 135 | /* The size of `unsigned long', as computed by sizeof. */ 136 | #undef SIZEOF_UNSIGNED_LONG 137 | 138 | /* The size of `unsigned long long', as computed by sizeof. */ 139 | #undef SIZEOF_UNSIGNED_LONG_LONG 140 | 141 | /* The size of `void *', as computed by sizeof. */ 142 | #undef SIZEOF_VOID_P 143 | 144 | /* Define to 1 if you have the ANSI C header files. */ 145 | #undef STDC_HEADERS 146 | 147 | /* Define to 1 if you can safely include both and . */ 148 | #undef TIME_WITH_SYS_TIME 149 | 150 | /* Enable large inode numbers on Mac OS X 10.5. */ 151 | #ifndef _DARWIN_USE_64_BIT_INODE 152 | # define _DARWIN_USE_64_BIT_INODE 1 153 | #endif 154 | 155 | /* Number of bits in a file offset, on hosts where this is settable. */ 156 | #undef _FILE_OFFSET_BITS 157 | 158 | /* "Use glibc features." */ 159 | #undef _GNU_SOURCE 160 | 161 | /* Define for large files, on AIX-style hosts. */ 162 | #undef _LARGE_FILES 163 | 164 | /* "get decl for msg_control on Solaris" */ 165 | #undef _XOPEN_SOURCE 166 | 167 | /* "get decl for sockaddr_storage on Solaris" */ 168 | #undef __EXTENSIONS__ 169 | 170 | /* Define to empty if `const' does not conform to ANSI C. */ 171 | #undef const 172 | 173 | /* Define to rpl_malloc if the replacement function should be used. */ 174 | #undef malloc 175 | -------------------------------------------------------------------------------- /owamp/owamp/owamp/error.c: -------------------------------------------------------------------------------- 1 | /* 2 | ** $Id$ 3 | */ 4 | /************************************************************************ 5 | * * 6 | * Copyright (C) 2002 * 7 | * Internet2 * 8 | * All Rights Reserved * 9 | * * 10 | ************************************************************************/ 11 | /* 12 | ** File: error.c 13 | ** 14 | ** Author: Jeff W. Boote 15 | ** Anatoly Karp 16 | ** 17 | ** Date: Fri Mar 29 15:36:44 2002 18 | ** 19 | ** Description: 20 | */ 21 | #include 22 | 23 | #include 24 | #include 25 | 26 | void 27 | OWPError_( 28 | OWPContext ctx, 29 | OWPErrSeverity severity, 30 | OWPErrType etype, 31 | const char *fmt, 32 | ... 33 | ) 34 | { 35 | va_list ap; 36 | 37 | va_start(ap,fmt); 38 | 39 | if(ctx && ctx->eh){ 40 | I2ErrLogVT(ctx->eh,(int)severity,etype,fmt,ap); 41 | } 42 | else{ 43 | char buff[_OWP_ERR_MAXSTRING]; 44 | 45 | vsnprintf(buff,sizeof(buff),fmt,ap); 46 | fwrite(buff,sizeof(char),strlen(buff),stderr); 47 | fwrite("\n",sizeof(char),1,stderr); 48 | } 49 | va_end(ap); 50 | 51 | return; 52 | } 53 | 54 | int 55 | OWPReportLevelByName( 56 | const char *name 57 | ) 58 | { 59 | if(!strncasecmp(name,"fatal",6)){ 60 | return (int) OWPErrFATAL; 61 | } 62 | else if(!strncasecmp(name,"warning",8)){ 63 | return (int) OWPErrWARNING; 64 | } 65 | else if(!strncasecmp(name,"info",5)){ 66 | return (int) OWPErrINFO; 67 | } 68 | else if(!strncasecmp(name,"debug",6)){ 69 | return (int) OWPErrDEBUG; 70 | } 71 | else if(!strncasecmp(name,"all",4)){ 72 | return (int) OWPErrOK; 73 | } 74 | else if(!strncasecmp(name,"none",5)){ 75 | return 0; 76 | } 77 | 78 | return -1; 79 | } 80 | -------------------------------------------------------------------------------- /owamp/owamp/owamp/ques.dat: -------------------------------------------------------------------------------- 1 | # These are hex encoded values of the series 2 | # Q[k] = ln2/(1)! + (ln2)^2/(2)! + ... (ln2)^k/(k)!, 3 | # each multiplied by 2^64. There are altogether 18 terms - 4 | # at the 18th term and afterwards the difference between 5 | # Q[k] and 1 is less than 1/(2^64) 6 | 7 | # These values can now be used for Knuth algorithm S. 8 | 9 | # to split up into long int hex-encoded values: 10 | # perl -lwne 'next unless m/^[A-Z]/; $_=~ m/(.{8})(.{8})/; \ 11 | # print "0x$1, 0x$2,"' ques.dat 12 | 13 | B17217F7D1CF79AB 14 | EEF193F6D75A96FC 15 | FD27186259AAF6C2 16 | FF9D6DD050F4C5A7 17 | FFF4CFCFEF1E626B 18 | FFFEE81886E1C62F 19 | FFFFE7FE850E0BB5 20 | FFFFFE2A8731B17D 21 | FFFFFFDFAC6EEADC 22 | FFFFFFFDF9640067 23 | FFFFFFFFE22EC79C 24 | FFFFFFFFFE6A9DED 25 | FFFFFFFFFFEBFF81 26 | FFFFFFFFFFFF1417 27 | FFFFFFFFFFFFF5CE 28 | FFFFFFFFFFFFFF95 29 | FFFFFFFFFFFFFFFB 30 | FFFFFFFFFFFFFFFF 31 | -------------------------------------------------------------------------------- /owamp/owamp/owamp/rijndael-alg-fst.h: -------------------------------------------------------------------------------- 1 | /** 2 | * rijndael-alg-fst.h 3 | * 4 | * @version 3.0 (December 2000) 5 | * 6 | * Optimised ANSI C code for the Rijndael cipher (now AES) 7 | * 8 | * @author Vincent Rijmen 9 | * @author Antoon Bosselaers 10 | * @author Paulo Barreto 11 | * 12 | * This code is hereby placed in the public domain. 13 | * 14 | * THIS SOFTWARE IS PROVIDED BY THE AUTHORS ''AS IS'' AND ANY EXPRESS 15 | * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 16 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 17 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE 18 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 19 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 20 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 21 | * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 22 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 23 | * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 24 | * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 | */ 26 | #ifndef __RIJNDAEL_ALG_FST_H 27 | #define __RIJNDAEL_ALG_FST_H 28 | 29 | #define MAXKC (256/32) 30 | #define MAXKB (256/8) 31 | #define MAXNR 14 32 | 33 | typedef uint8_t u8; 34 | typedef uint16_t u16; 35 | typedef uint32_t u32; 36 | 37 | int rijndaelKeySetupEnc(u32 rk[/*4*(Nr + 1)*/], const u8 cipherKey[], int keyBits); 38 | int rijndaelKeySetupDec(u32 rk[/*4*(Nr + 1)*/], const u8 cipherKey[], int keyBits); 39 | void rijndaelEncrypt(const u32 rk[/*4*(Nr + 1)*/], int Nr, const u8 pt[16], u8 ct[16]); 40 | void rijndaelDecrypt(const u32 rk[/*4*(Nr + 1)*/], int Nr, const u8 ct[16], u8 pt[16]); 41 | 42 | #ifdef INTERMEDIATE_VALUE_KAT 43 | void rijndaelEncryptRound(const u32 rk[/*4*(Nr + 1)*/], int Nr, u8 block[16], int rounds); 44 | void rijndaelDecryptRound(const u32 rk[/*4*(Nr + 1)*/], int Nr, u8 block[16], int rounds); 45 | #endif /* INTERMEDIATE_VALUE_KAT */ 46 | 47 | #endif /* __RIJNDAEL_ALG_FST_H */ 48 | -------------------------------------------------------------------------------- /owamp/owamp/owamp/rijndael-api-fst.h: -------------------------------------------------------------------------------- 1 | /** 2 | * rijndael-api-fst.h 3 | * 4 | * @version 2.9 (December 2000) 5 | * 6 | * Optimised ANSI C code for the Rijndael cipher (now AES) 7 | * 8 | * @author Vincent Rijmen 9 | * @author Antoon Bosselaers 10 | * @author Paulo Barreto 11 | * 12 | * This code is hereby placed in the public domain. 13 | * 14 | * THIS SOFTWARE IS PROVIDED BY THE AUTHORS ''AS IS'' AND ANY EXPRESS 15 | * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 16 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 17 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE 18 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 19 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 20 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 21 | * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 22 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 23 | * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 24 | * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 | * 26 | * Acknowledgements: 27 | * 28 | * We are deeply indebted to the following people for their bug reports, 29 | * fixes, and improvement suggestions to this implementation. Though we 30 | * tried to list all contributions, we apologise in advance for any 31 | * missing reference. 32 | * 33 | * Andrew Bales 34 | * Markus Friedl 35 | * John Skodon 36 | */ 37 | 38 | #ifndef __RIJNDAEL_API_FST_H 39 | #define __RIJNDAEL_API_FST_H 40 | 41 | #include 42 | 43 | #include 44 | #include 45 | 46 | /* Generic Defines */ 47 | #define DIR_ENCRYPT 0 /* Are we encrpyting? */ 48 | #define DIR_DECRYPT 1 /* Are we decrpyting? */ 49 | #define MODE_ECB 1 /* Are we ciphering in ECB mode? */ 50 | #define MODE_CBC 2 /* Are we ciphering in CBC mode? */ 51 | #define MODE_CFB1 3 /* Are we ciphering in 1-bit CFB mode? */ 52 | #define TRUE 1 53 | #define FALSE 0 54 | #define BITSPERBLOCK 128 /* Default number of bits in a cipher block */ 55 | 56 | /* Error Codes */ 57 | #define BAD_KEY_DIR -1 /* Key direction is invalid, e.g., unknown value */ 58 | #define BAD_KEY_MAT -2 /* Key material not of correct length */ 59 | #define BAD_KEY_INSTANCE -3 /* Key passed is not valid */ 60 | #define BAD_CIPHER_MODE -4 /* Params struct passed to cipherInit invalid */ 61 | #define BAD_CIPHER_STATE -5 /* Cipher in wrong state (e.g., not initialized) */ 62 | #define BAD_BLOCK_LENGTH -6 63 | #define BAD_CIPHER_INSTANCE -7 64 | #define BAD_DATA -8 /* Data contents are invalid, e.g., invalid padding */ 65 | #define BAD_OTHER -9 /* Unknown error */ 66 | 67 | /* Algorithm-specific Defines */ 68 | #define MAX_KEY_SIZE 64 /* # of ASCII char's needed to represent a key */ 69 | #define MAX_IV_SIZE 16 /* # bytes needed to represent an IV */ 70 | 71 | /* Typedefs */ 72 | 73 | typedef unsigned char BYTE; 74 | 75 | /* The structure for key information */ 76 | typedef struct { 77 | /*BYTE direction;*/ /* Key used for encrypting or decrypting? */ 78 | int Nr; /* key-length-dependent number of rounds */ 79 | u32 rk[4*(MAXNR + 1)]; /* key schedule */ 80 | } keyInstance; 81 | 82 | /* Function prototypes */ 83 | 84 | int makeKey(keyInstance *key, BYTE direction, char *keyMaterial); 85 | void bytes2Key(keyInstance *key, BYTE *keyMaterial); 86 | 87 | int cipherInit(BYTE *binIV, char *hexIV); 88 | 89 | int blockEncrypt(BYTE *binIV, keyInstance *key, 90 | const BYTE *input, int inputLen, BYTE *outBuffer); 91 | 92 | int blockDecrypt(BYTE *binIV, keyInstance *key, 93 | const BYTE *input, int inputLen, BYTE *outBuffer); 94 | #endif /* __RIJNDAEL_API_FST_H */ 95 | -------------------------------------------------------------------------------- /owamp/owamp/owampd/Makefile.am: -------------------------------------------------------------------------------- 1 | # 2 | # $Id$ 3 | # 4 | ######################################################################### 5 | # # 6 | # Copyright (C) 2002 # 7 | # Internet2 # 8 | # All Rights Reserved # 9 | # # 10 | ######################################################################### 11 | # 12 | # File: Makefile.am 13 | # 14 | # Author: Jeff Boote 15 | # Internet2 16 | # 17 | # Date: Wed Apr 17 15:11:34 EDT 2002 18 | # 19 | # Description: owampd build description 20 | 21 | # possible solution to conf dir location 22 | AM_CFLAGS = $(OWP_PREFIX_CFLAGS) 23 | 24 | AM_CPPFLAGS = $(OWPINCS) $(I2UTILINCS) 25 | 26 | bin_PROGRAMS = owampd twampd 27 | owampd_SOURCES = owampdP.h owampd.c policy.h policy.c fts.h fts.c 28 | owampd_LDADD = $(OWPLIBS) $(MALLOCDEBUGLIBS) -lI2util 29 | owampd_DEPENDENCIES = $(OWPLIBDEPS) $(I2UTILLIBDEPS) 30 | 31 | twampd_SOURCES = owampdP.h twampd.c policy.h policy.c fts.h fts.c 32 | twampd_LDADD = $(owampd_LDADD) 33 | twampd_DEPENDENCIES = $(owampd_DEPENDENCIES) 34 | -------------------------------------------------------------------------------- /owamp/owamp/owampd/owampdP.h: -------------------------------------------------------------------------------- 1 | /* 2 | * $Id$ 3 | */ 4 | /************************************************************************ 5 | * * 6 | * Copyright (C) 2002 * 7 | * Internet2 * 8 | * All Rights Reserved * 9 | * * 10 | ************************************************************************/ 11 | /* 12 | * File: owampdP.h 13 | * 14 | * Author: Jeff W. Boote 15 | * Internet2 16 | * 17 | * Date: Mon Jun 03 15:31:22 MDT 2002 18 | * 19 | * Description: 20 | */ 21 | #ifndef _OWAMPDP_H_ 22 | #define _OWAMPDP_H_ 23 | 24 | #ifndef OWAMPD_CONF_FILE 25 | #ifdef TWAMP 26 | #define OWAMPD_CONF_FILE "twamp-server.conf" 27 | #else 28 | #define OWAMPD_CONF_FILE "owamp-server.conf" 29 | #endif 30 | #endif 31 | 32 | /* 33 | * Types 34 | */ 35 | typedef struct { 36 | 37 | I2Boolean verbose; 38 | I2Boolean help; 39 | 40 | char cwd[MAXPATHLEN]; 41 | char *confdir; 42 | char *vardir; 43 | char *passwd; 44 | 45 | char *datadir; 46 | 47 | char *authmode; 48 | uint32_t auth_mode; /* cooked version of authmode */ 49 | char *srcnode; 50 | 51 | OWPPortRange portspec; 52 | 53 | char *user; 54 | char *group; 55 | 56 | OWPBoolean allowroot; 57 | 58 | double diskfudge; 59 | uint32_t dieby; 60 | uint32_t controltimeout; 61 | #ifdef TWAMP 62 | uint32_t testtimeout; 63 | #endif 64 | uint32_t pbkdf2_count; 65 | uint32_t maxcontrolsessions; 66 | #ifdef DEBUG 67 | void *childwait; 68 | #endif 69 | I2Boolean daemon; 70 | 71 | I2Boolean setEndDelay; 72 | double endDelay; 73 | } owampd_opts; 74 | 75 | #endif /* _OWAMPDP_H_ */ 76 | -------------------------------------------------------------------------------- /owamp/owamp/owampd/twampd.c: -------------------------------------------------------------------------------- 1 | /*! \file twampd.c */ 2 | /* 3 | * $Id$ 4 | */ 5 | /************************************************************************ 6 | * * 7 | * Copyright (C) 2014 * 8 | * Brocade Communications * 9 | * Apache License Version 2.0 * 10 | * * 11 | ************************************************************************/ 12 | #define TWAMP 13 | #include "owampd.c" 14 | -------------------------------------------------------------------------------- /owamp/owamp/owping/Makefile.am: -------------------------------------------------------------------------------- 1 | # 2 | # $Id$ 3 | # 4 | ######################################################################### 5 | # # 6 | # Copyright (C) 2002 # 7 | # Internet2 # 8 | # All Rights Reserved # 9 | # # 10 | ######################################################################### 11 | # 12 | # File: Makefile.am 13 | # 14 | # Author: Jeff Boote 15 | # Internet2 16 | # 17 | # Date: Wed Apr 17 17:53:58 EDT 2002 18 | # 19 | # Description: owping build description. 20 | 21 | AM_CPPFLAGS = $(OWPINCS) $(I2UTILINCS) 22 | AM_CFLAGS = $(OWP_PREFIX_CFLAGS) 23 | 24 | bin_PROGRAMS = owping twping 25 | owping_SOURCES = owping.c owpingP.h 26 | owping_LDADD = $(OWPLIBS) $(MALLOCDEBUGLIBS) -lI2util 27 | owping_DEPENDENCIES = $(OWPLIBDEPS) $(I2UTILLIBDEPS) 28 | # Unfortunately, automake doesn't follow the BSD tradition here... 29 | RM = rm -f 30 | owping_LINKS = owstats$(exeext) owfetch$(exeext) owup$(exeext) 31 | 32 | owstats$(exeext): owping$(exeext) 33 | @if test -f $@; then $(RM) $@; fi; \ 34 | $(LN_S) owping $@; 35 | 36 | owfetch$(exeext): owping$(exeext) 37 | @if test -f $@; then $(RM) $@; fi; \ 38 | $(LN_S) owping $@; 39 | 40 | owup$(exeext): owping$(exeext) 41 | @if test -f $@; then $(RM) $@; fi; \ 42 | $(LN_S) owping $@; 43 | 44 | all-local: $(owping_LINKS) 45 | CLEANFILES = $(owping_LINKS) 46 | 47 | twping_SOURCES = twping.c owpingP.h 48 | twping_LDADD = $(owping_LDADD) 49 | twping_DEPENDENCIES = $(owping_DEPENDENCIES) 50 | 51 | # 52 | # Someday perhaps this will be generated by automake... 53 | # 54 | install-exec-hook: 55 | @cd $(DESTDIR)$(bindir) && \ 56 | if test -f owping; then \ 57 | for l in $(owping_LINKS); do \ 58 | if test -f $$l; then $(RM) $$l; fi; \ 59 | echo "$(LN_S) $(DESTDIR)$(bindir)/owping $(DESTDIR)$(bindir)/$$l"; \ 60 | $(LN_S) owping $$l; \ 61 | done; \ 62 | fi 63 | 64 | -------------------------------------------------------------------------------- /owamp/owamp/owping/owpingP.h: -------------------------------------------------------------------------------- 1 | /* 2 | * ex: set tabstop=4 ai expandtab softtabstop=4 shiftwidth=4: 3 | * -*- mode: c-basic-indent: 4; tab-width: 4; indent-tabls-mode: nil -*- 4 | * $Id$ 5 | */ 6 | /************************************************************************ 7 | * * 8 | * Copyright (C) 2002 * 9 | * Internet2 * 10 | * All Rights Reserved * 11 | * * 12 | ************************************************************************/ 13 | /* 14 | * File: owpingP.h 15 | * 16 | * Author: Jeff Boote 17 | * Internet2 18 | * 19 | * Date: Thu Apr 25 13:00:00 2002 20 | * 21 | * Description: 22 | */ 23 | #ifndef _owpingp_h_ 24 | #define _owpingp_h_ 25 | 26 | #define _OWPING_DEF_TMPDIR "/tmp" 27 | #define _OWPING_PATH_SEPARATOR "/" 28 | #define _OWPING_TMPFILEFMT "owamp.XXXXXX" 29 | 30 | #define _OWPING_SUM_EXT ".sum" 31 | #define _OWPING_DEF_EXT ".txt" 32 | #define _OWPING_INC_EXT ".i" 33 | 34 | /* 35 | * Reasonable limits on these so dynamic memory is not needed. 36 | */ 37 | #define MAX_PASSPROMPT 256 38 | #define MAX_PASSPHRASE 256 39 | 40 | /* 41 | * Application "context" structure 42 | */ 43 | typedef struct { 44 | /* 45 | ** Command line options 46 | */ 47 | struct { 48 | /* Flags */ 49 | 50 | I2Boolean v4only; /* -4 */ 51 | I2Boolean v6only; /* -6 */ 52 | 53 | I2Boolean records; /* -v */ 54 | unsigned long rec_limit; /* -vN */ 55 | I2Boolean quiet; /* -Q */ 56 | I2Boolean raw; /* -R */ 57 | I2Boolean machine; /* -M */ 58 | I2Boolean display_unix_ts; /* -U */ 59 | 60 | I2Boolean to; /* -t */ 61 | I2Boolean from; /* -f */ 62 | char *save_to_test; /* -T */ 63 | char *save_from_test; /* -F */ 64 | 65 | char *authmode; /* -A */ 66 | char *identity; /* -u */ 67 | char *pffile; /* -k */ 68 | uint32_t numPackets; /* -c */ 69 | 70 | double lossThreshold; /* -L */ 71 | I2Boolean setEndDelay; 72 | double endDelay; /* -E */ 73 | double delayStart; /* -z */ 74 | 75 | float *percentiles; /* -a */ 76 | uint32_t npercentiles; 77 | char units; /* -n */ 78 | uint32_t numBucketPackets; /* -N */ 79 | float bucket_width; /* -b */ 80 | 81 | char *savedir; /* -d */ 82 | I2Boolean printfiles; /* -p */ 83 | char *srcaddr; /* -S */ 84 | char *interface; /* -B */ 85 | I2Boolean zero_addr; /* -Z */ 86 | 87 | OWPPortRange portspec; /* -P */ 88 | 89 | #ifdef DEBUG 90 | void *childwait; /* -w */ 91 | #endif 92 | 93 | uint32_t padding; /* -s */ 94 | 95 | } opt; 96 | 97 | char *remote_test; 98 | char *remote_serv; 99 | 100 | uint32_t auth_mode; 101 | uint32_t typeP; 102 | 103 | OWPContext lib_ctx; 104 | OWPControl cntrl; 105 | 106 | float mean_wait; /* default slot value */ 107 | uint32_t nslots; 108 | OWPSlot *slots; 109 | 110 | OWPPortRangeRec portrec; 111 | } ow_ping_trec, *ow_ping_t; 112 | 113 | #endif 114 | -------------------------------------------------------------------------------- /owamp/owamp/owping/twping.c: -------------------------------------------------------------------------------- 1 | /*! \file twping.c */ 2 | /* 3 | * $Id$ 4 | */ 5 | /************************************************************************ 6 | * * 7 | * Copyright (C) 2014 * 8 | * Brocade Communications * 9 | * Apache License Version 2.0 * 10 | * * 11 | ************************************************************************/ 12 | #define TWAMP 13 | #include "owping.c" 14 | -------------------------------------------------------------------------------- /owamp/owamp/powstream/Makefile.am: -------------------------------------------------------------------------------- 1 | # 2 | # $Id$ 3 | # 4 | ######################################################################### 5 | # # 6 | # Copyright (C) 2002 # 7 | # Internet2 # 8 | # All Rights Reserved # 9 | # # 10 | ######################################################################### 11 | # 12 | # File: Makefile.am 13 | # 14 | # Author: Jeff Boote 15 | # Internet2 16 | # 17 | # Date: Tue Sep 3 13:06:13 MDT 2002 18 | # 19 | # Description: powstream build description. 20 | 21 | AM_CPPFLAGS = $(OWPINCS) $(I2UTILINCS) 22 | AM_CFLAGS = $(OWP_PREFIX_CFLAGS) 23 | 24 | bin_PROGRAMS = powstream 25 | 26 | powstream_SOURCES = powstream.c powstreamP.h 27 | powstream_LDADD = $(OWPLIBS) -lI2util $(MALLOCDEBUGLIBS) 28 | powstream_DEPENDENCIES = $(OWPLIBDEPS) $(I2UTILLIBDEPS) 29 | -------------------------------------------------------------------------------- /owamp/owamp/powstream/powstreamP.h: -------------------------------------------------------------------------------- 1 | /* 2 | * $Id$ 3 | */ 4 | /************************************************************************ 5 | * * 6 | * Copyright (C) 2002 * 7 | * Internet2 * 8 | * All Rights Reserved * 9 | * * 10 | ************************************************************************/ 11 | /* 12 | * File: powstreamP.h 13 | * 14 | * Author: Jeff Boote 15 | * Internet2 16 | * 17 | * Date: Tue Sep 3 15:44:17 MDT 2002 18 | * 19 | * Description: 20 | */ 21 | #ifndef _powstreamp_h_ 22 | #define _powstreamp_h_ 23 | 24 | #include 25 | 26 | /* 27 | * Bound of the RTT in seconds. This application needs an estimate of how 28 | * long it takes to request a test session. It uses this estimate to make 29 | * sure that it has enough time to make the test requests before those 30 | * tests actually need to start. (It times the first connection to get 31 | * a good idea, but does not dynamically modifiy the number of sessions 32 | * per series based on changes to the RTT over time.) This constant 33 | * is used to bound that estimate. i.e. we hope that the RTT never gets 34 | * worse then this value, or the initial value retrieved dynamically. 35 | * If the RTT gets worse than this, there will be breaks between the 36 | * sessions. 37 | */ 38 | #define SETUP_ESTIMATE 10 39 | 40 | /* 41 | * Lock file name. This file is created in the output directory to ensure 42 | * there is not more than one powstream process writing there. 43 | */ 44 | #define POWLOCK ".powlock" 45 | #define POWTMPFILEFMT "pow.XXXXXX" 46 | #define POW_INC_EXT ".i" 47 | #define POW_SUM_EXT ".sum" 48 | 49 | /* 50 | * Reasonable limits on these so dynamic memory is not needed. 51 | */ 52 | #define MAX_PASSPROMPT 256 53 | #define MAX_PASSPHRASE 256 54 | 55 | /* 56 | * Application "context" structure 57 | */ 58 | typedef struct { 59 | /* 60 | ** Command line options 61 | */ 62 | struct { 63 | /* Flags */ 64 | 65 | OWPBoolean v4only; /* -4 */ 66 | OWPBoolean v6only; /* -6 */ 67 | 68 | char *srcaddr; /* -S */ 69 | char *interface; /* -B */ 70 | char *authmode; /* -A */ 71 | char *identity; /* -u */ 72 | char *pffile; /* -k */ 73 | #ifdef DEBUG 74 | I2Boolean childwait; /* -w */ 75 | #endif 76 | 77 | uint32_t numPackets; /* -c */ 78 | double lossThreshold; /* -L (seconds) */ 79 | double meanWait; /* -i (seconds) */ 80 | uint32_t padding; /* -s */ 81 | OWPBoolean sender; /* -t */ 82 | OWPPortRangeRec port_range; /* -P */ 83 | 84 | char *savedir; /* -d */ 85 | I2Boolean printfiles; /* -p */ 86 | I2Boolean display_unix_ts; /* -U */ 87 | int facility; /* -e */ 88 | /* -r stderr too */ 89 | int verbose; /* -v verbose */ 90 | double bucketWidth; /* -b (seconds) */ 91 | uint32_t numBucketPackets; /* -N */ 92 | uint32_t delayStart; /* -z */ 93 | 94 | uint32_t retryDelay; /* -I */ 95 | 96 | I2Boolean setEndDelay; 97 | double endDelay; /* -E */ 98 | 99 | } opt; 100 | 101 | char *remote_test; 102 | char *remote_serv; 103 | 104 | uint32_t auth_mode; 105 | 106 | OWPContext lib_ctx; 107 | } powapp_trec, *powapp_t; 108 | 109 | typedef struct pow_cntrl_rec{ 110 | OWPContext ctx; 111 | OWPControl cntrl; 112 | OWPControl fetch; 113 | OWPScheduleContext sctx; 114 | OWPSID sid; 115 | OWPNum64 *nextSessionStart; 116 | OWPNum64 nextSessionStartNum; 117 | OWPNum64 nextSessionEndNum; 118 | OWPNum64 currentSessionStartNum; 119 | OWPNum64 currentSessionEndNum; 120 | OWPTimeStamp prev_runtime; 121 | 122 | FILE *fp; 123 | FILE *testfp; 124 | char fname[PATH_MAX]; 125 | uint32_t numPackets; 126 | OWPBoolean call_stop; 127 | OWPBoolean session_started; 128 | } pow_cntrl_rec, *pow_cntrl; 129 | 130 | #endif 131 | -------------------------------------------------------------------------------- /owamp/owamp/selinux/Makefile.am: -------------------------------------------------------------------------------- 1 | noinst_DATA = owamp-server.fc owamp-server.te twamp-server.fc twamp-server.te 2 | EXTRA_DIST = owamp-server.fc owamp-server.te twamp-server.fc twamp-server.te 3 | -------------------------------------------------------------------------------- /owamp/owamp/selinux/owamp-server.fc: -------------------------------------------------------------------------------- 1 | /etc/owamp-server(/.*)? gen_context(system_u:object_r:owampd_etc_t,s0) 2 | 3 | /usr/bin/owampd -- gen_context(system_u:object_r:owampd_exec_t,s0) 4 | 5 | /usr/lib/systemd/system/owamp-server\.service -- gen_context(system_u:object_r:owampd_unit_file_t,s0) 6 | 7 | /var/lib/owamp(/.*)? gen_context(system_u:object_r:owampd_var_lib_t,s0) 8 | 9 | /var/run/owamp-server\.info -- gen_context(system_u:object_r:owampd_pid_t,s0) 10 | /var/run/owamp-server\.pid -- gen_context(system_u:object_r:owampd_pid_t,s0) 11 | -------------------------------------------------------------------------------- /owamp/owamp/selinux/owamp-server.te: -------------------------------------------------------------------------------- 1 | policy_module(owamp-server, 1.0.0) 2 | 3 | require { 4 | type passwd_file_t; 5 | type sssd_var_lib_t; 6 | }; 7 | 8 | ######################################## 9 | # 10 | # Declarations 11 | # 12 | 13 | type owampd_t; 14 | type owampd_exec_t; 15 | init_daemon_domain(owampd_t, owampd_exec_t) 16 | 17 | type owampd_etc_t; 18 | files_type(owampd_etc_t) 19 | 20 | type owampd_unit_file_t; 21 | systemd_unit_file(owampd_unit_file_t) 22 | 23 | type owampd_var_lib_t; 24 | files_type(owampd_var_lib_t) 25 | 26 | type owampd_pid_t; 27 | files_pid_file(owampd_pid_t) 28 | 29 | type owampd_tmp_t; 30 | files_tmp_file(owampd_tmp_t); 31 | 32 | type owamp_port_t; 33 | corenet_port(owamp_port_t); 34 | 35 | type owamp_test_port_t; 36 | corenet_port(owamp_test_port_t); 37 | 38 | ######################################## 39 | # 40 | # owampd policy 41 | # 42 | 43 | # daemonize 44 | allow owampd_t self:capability { setgid setuid }; 45 | allow owampd_t self:process { fork setpgid setrlimit signal_perms }; 46 | allow owampd_t passwd_file_t:file { getattr open read }; 47 | 48 | # syslog 49 | logging_send_syslog_msg(owampd_t) 50 | 51 | # resolver 52 | sysnet_dns_name_resolve(owampd_t) 53 | 54 | # read configuration 55 | allow owampd_t owampd_etc_t:dir search_dir_perms; 56 | allow owampd_t owampd_etc_t:file read_file_perms; 57 | 58 | # write pid files 59 | allow owampd_t owampd_pid_t:file { create_file_perms rw_file_perms }; 60 | files_pid_filetrans(owampd_t, owampd_pid_t, file) 61 | 62 | # write /var/lib/owamp 63 | manage_dirs_pattern(owampd_t, owampd_var_lib_t, owampd_var_lib_t) 64 | manage_files_pattern(owampd_t, owampd_var_lib_t, owampd_var_lib_t) 65 | manage_lnk_files_pattern(owampd_t, owampd_var_lib_t, owampd_var_lib_t) 66 | 67 | # create files in /tmp 68 | manage_files_pattern(owampd_t, owampd_tmp_t, owampd_tmp_t) 69 | files_tmp_filetrans(owampd_t, owampd_tmp_t, file) 70 | 71 | # network server 72 | allow owampd_t self:capability net_bind_service; 73 | corenet_tcp_bind_generic_node(owampd_t) 74 | allow owampd_t owamp_port_t:tcp_socket { name_bind }; 75 | allow owampd_t self:tcp_socket { listen accept }; 76 | corenet_udp_bind_generic_node(owampd_t) 77 | allow owampd_t owamp_test_port_t:udp_socket { name_bind }; 78 | allow owampd_t owampd_var_lib_t:file map; 79 | allow owampd_t sssd_var_lib_t:dir search; -------------------------------------------------------------------------------- /owamp/owamp/selinux/twamp-server.fc: -------------------------------------------------------------------------------- 1 | /etc/twamp-server(/.*)? gen_context(system_u:object_r:twampd_etc_t,s0) 2 | 3 | /usr/bin/twampd -- gen_context(system_u:object_r:twampd_exec_t,s0) 4 | 5 | /usr/lib/systemd/system/twamp-server\.service -- gen_context(system_u:object_r:twampd_unit_file_t,s0) 6 | 7 | /var/lib/twamp(/.*)? gen_context(system_u:object_r:twampd_var_lib_t,s0) 8 | 9 | /var/run/twamp-server\.info -- gen_context(system_u:object_r:twampd_pid_t,s0) 10 | /var/run/twamp-server\.pid -- gen_context(system_u:object_r:twampd_pid_t,s0) 11 | -------------------------------------------------------------------------------- /owamp/owamp/selinux/twamp-server.te: -------------------------------------------------------------------------------- 1 | policy_module(twamp-server, 1.0.0) 2 | 3 | require { 4 | type passwd_file_t; 5 | type sssd_var_lib_t; 6 | }; 7 | 8 | ######################################## 9 | # 10 | # Declarations 11 | # 12 | 13 | type twampd_t; 14 | type twampd_exec_t; 15 | init_daemon_domain(twampd_t, twampd_exec_t) 16 | 17 | type twampd_etc_t; 18 | files_type(twampd_etc_t) 19 | 20 | type twampd_unit_file_t; 21 | systemd_unit_file(twampd_unit_file_t) 22 | 23 | type twampd_var_lib_t; 24 | files_type(twampd_var_lib_t) 25 | 26 | type twampd_pid_t; 27 | files_pid_file(twampd_pid_t) 28 | 29 | type twamp_port_t; 30 | corenet_port(twamp_port_t); 31 | 32 | type twamp_test_port_t; 33 | corenet_port(twamp_test_port_t); 34 | 35 | ######################################## 36 | # 37 | # twampd policy 38 | # 39 | 40 | # daemonize 41 | allow twampd_t self:capability { setgid setuid }; 42 | allow twampd_t self:process { fork setpgid setrlimit signal_perms }; 43 | allow twampd_t passwd_file_t:file { getattr open read }; 44 | 45 | # syslog 46 | logging_send_syslog_msg(twampd_t) 47 | 48 | # resolver 49 | sysnet_dns_name_resolve(twampd_t) 50 | 51 | # read configuration 52 | allow twampd_t twampd_etc_t:dir search_dir_perms; 53 | allow twampd_t twampd_etc_t:file read_file_perms; 54 | 55 | # write pid files 56 | allow twampd_t twampd_pid_t:file { create_file_perms rw_file_perms }; 57 | files_pid_filetrans(twampd_t, twampd_pid_t, file) 58 | 59 | # write /var/lib/twamp 60 | manage_dirs_pattern(twampd_t, twampd_var_lib_t, twampd_var_lib_t) 61 | manage_files_pattern(twampd_t, twampd_var_lib_t, twampd_var_lib_t) 62 | 63 | # network server 64 | allow twampd_t self:capability net_bind_service; 65 | corenet_tcp_bind_generic_node(twampd_t) 66 | allow twampd_t twamp_port_t:tcp_socket { name_bind }; 67 | allow twampd_t self:tcp_socket { listen accept }; 68 | corenet_udp_bind_generic_node(twampd_t) 69 | allow twampd_t twamp_test_port_t:udp_socket { name_bind }; 70 | allow twampd_t twampd_var_lib_t:file map; 71 | allow twampd_t sssd_var_lib_t:dir search; -------------------------------------------------------------------------------- /owamp/owamp/test/Makefile.am: -------------------------------------------------------------------------------- 1 | # 2 | # $Id$ 3 | # 4 | ######################################################################### 5 | # # 6 | # Copyright (C) 2003 # 7 | # Internet2 # 8 | # All Rights Reserved # 9 | # # 10 | ######################################################################### 11 | # 12 | # File: Makefile.am 13 | # 14 | # Author: Jeff Boote 15 | # Internet2 16 | # 17 | # Date: Mon Oct 20 13:52:56 MDT 2003 18 | # 19 | # Description: owtvec build description. 20 | 21 | AM_CPPFLAGS = $(OWPINCS) $(I2UTILINCS) 22 | AM_CFLAGS = $(OWP_PREFIX_CFLAGS) 23 | 24 | check_PROGRAMS = owtvec owstats owping_enc owping_clear owe2e_clear owe2e_auth owe2e_enc twping_enc twping_clear hmac twe2e_clear twe2e_auth twe2e_enc 25 | TESTS = $(check_PROGRAMS) 26 | 27 | owtvec_SOURCES = owtvec.c 28 | owtvec_LDADD = $(OWPLIBS) -lI2util $(MALLOCDEBUGLIBS) 29 | owtvec_DEPENDENCIES = $(OWPLIBDEPS) $(I2UTILLIBDEPS) 30 | 31 | owstats_SOURCES = owstats.c owtest_utils.c owtest_utils.h 32 | owstats_LDADD = $(OWPLIBS) -lI2util $(MALLOCDEBUGLIBS) 33 | owstats_DEPENDENCIES = $(OWPLIBDEPS) $(I2UTILLIBDEPS) 34 | 35 | owping_clear_SOURCES = owping_clear.c owtest_utils.c owtest_utils.h server.c server.h session_setup.c session_setup.h 36 | owping_clear_LDADD = $(OWPLIBS) -lI2util $(MALLOCDEBUGLIBS) -lpthread -lcrypto 37 | owping_clear_DEPENDENCIES = $(OWPLIBDEPS) $(I2UTILLIBDEPS) 38 | 39 | owping_enc_SOURCES = owping_enc.c owtest_utils.c owtest_utils.h server.c server.h session_setup.c session_setup.h 40 | owping_enc_LDADD = $(OWPLIBS) -lI2util $(MALLOCDEBUGLIBS) -lpthread -lcrypto 41 | owping_enc_DEPENDENCIES = $(OWPLIBDEPS) $(I2UTILLIBDEPS) 42 | 43 | owe2e_clear_SOURCES = owe2e_clear.c owtest_utils.c owtest_utils.h e2e_utils.c e2e_utils.h 44 | owe2e_clear_LDADD = $(OWPLIBS) -lI2util $(MALLOCDEBUGLIBS) -lpthread 45 | owe2e_clear_DEPENDENCIES = $(OWPLIBDEPS) $(I2UTILLIBDEPS) 46 | 47 | owe2e_auth_SOURCES = owe2e_auth.c owtest_utils.c owtest_utils.h e2e_utils.c e2e_utils.h 48 | owe2e_auth_LDADD = $(OWPLIBS) -lI2util $(MALLOCDEBUGLIBS) -lpthread 49 | owe2e_auth_DEPENDENCIES = $(OWPLIBDEPS) $(I2UTILLIBDEPS) 50 | 51 | owe2e_enc_SOURCES = owe2e_enc.c owtest_utils.c owtest_utils.h e2e_utils.c e2e_utils.h 52 | owe2e_enc_LDADD = $(OWPLIBS) -lI2util $(MALLOCDEBUGLIBS) -lpthread 53 | owe2e_enc_DEPENDENCIES = $(OWPLIBDEPS) $(I2UTILLIBDEPS) 54 | 55 | twping_enc_SOURCES = twping_enc.c owtest_utils.c owtest_utils.h server.c server.h session_setup.c session_setup.h 56 | twping_enc_LDADD = $(OWPLIBS) -lI2util $(MALLOCDEBUGLIBS) -lpthread -lcrypto 57 | twping_enc_DEPENDENCIES = $(OWPLIBDEPS) $(I2UTILLIBDEPS) 58 | 59 | twping_clear_SOURCES = twping_clear.c owtest_utils.c owtest_utils.h server.c server.h session_setup.c session_setup.h 60 | twping_clear_LDADD = $(OWPLIBS) -lI2util $(MALLOCDEBUGLIBS) -lpthread -lcrypto 61 | twping_clear_DEPENDENCIES = $(OWPLIBDEPS) $(I2UTILLIBDEPS) 62 | 63 | twe2e_clear_SOURCES = twe2e_clear.c owtest_utils.c owtest_utils.h e2e_utils.c e2e_utils.h 64 | twe2e_clear_LDADD = $(OWPLIBS) -lI2util $(MALLOCDEBUGLIBS) -lpthread 65 | twe2e_clear_DEPENDENCIES = $(OWPLIBDEPS) $(I2UTILLIBDEPS) 66 | 67 | twe2e_auth_SOURCES = twe2e_auth.c owtest_utils.c owtest_utils.h e2e_utils.c e2e_utils.h 68 | twe2e_auth_LDADD = $(OWPLIBS) -lI2util $(MALLOCDEBUGLIBS) -lpthread 69 | twe2e_auth_DEPENDENCIES = $(OWPLIBDEPS) $(I2UTILLIBDEPS) 70 | 71 | twe2e_enc_SOURCES = twe2e_enc.c owtest_utils.c owtest_utils.h e2e_utils.c e2e_utils.h 72 | twe2e_enc_LDADD = $(OWPLIBS) -lI2util $(MALLOCDEBUGLIBS) -lpthread 73 | twe2e_enc_DEPENDENCIES = $(OWPLIBDEPS) $(I2UTILLIBDEPS) 74 | 75 | hmac_SOURCES = hmac.c 76 | hmac_LDADD = $(OWPLIBS) -lI2util $(MALLOCDEBUGLIBS) -lcrypto 77 | hmac_DEPENDENCIES = $(OWPLIBDEPS) $(I2UTILLIBDEPS) 78 | -------------------------------------------------------------------------------- /owamp/owamp/test/README: -------------------------------------------------------------------------------- 1 | This directory holds owamp unit tests: 2 | 3 | owtvec: This application uses the AES based Exponential 4 | Deviates functions from the owamp library and 5 | verifies the implementation successfully produces 6 | the expected results from Appendix B of the OWAMP 7 | specification. 8 | 9 | owstats: read a reference session message and verify it can 10 | be parsed and statistics can be generated 11 | 12 | owping_clear: 13 | owping_enc: 14 | use the owamp client protocol api to generate and send 15 | messages to a simiulated server, which validates them 16 | and then returns appropriate responses 17 | 18 | owe2e_clear: 19 | owe2e_auth: 20 | owe2e_enc: 21 | launch owping/owampd child processes and capture 22 | the test output - verify there were no errors 23 | 24 | twping_clear: 25 | twping_enc: 26 | use the twamp client protocol api to generate and send 27 | messages to a simiulated server, which validates them 28 | and then returns appropriate responses 29 | 30 | twe2e_clear: 31 | twe2e_auth: 32 | twe2e_enc: 33 | launch twping/twampd child processes and capture 34 | the test output - verify there were no errors 35 | -------------------------------------------------------------------------------- /owamp/owamp/test/e2e_utils.h: -------------------------------------------------------------------------------- 1 | /* 2 | * File: e2e_utils.h 3 | * 4 | * Author: Erik Reid 5 | * GÉANT 6 | * 7 | * Description: end-to-end process utililities 8 | */ 9 | 10 | typedef int(*output_verification_handler)(const char *); 11 | 12 | int verify_owping_output(const char *output); 13 | int verify_twping_output(const char *output); 14 | 15 | typedef enum _protocol {OWAMP, TWAMP} PROTOCOL; 16 | int e2e_test(PROTOCOL protocol, const char *authmode, output_verification_handler); 17 | -------------------------------------------------------------------------------- /owamp/owamp/test/owe2e_auth.c: -------------------------------------------------------------------------------- 1 | /* 2 | * File: owe2e_auth.c 3 | * 4 | * Author: Erik Reid 5 | * GÉANT 6 | * 7 | * Description: Basic twping client control setup test in authenticated mode 8 | */ 9 | #include "./e2e_utils.h" 10 | 11 | /* 12 | * Function: main 13 | * 14 | * Description: launch owping and owampd child processes 15 | * perform a measurement and validate the output 16 | * 17 | * In Args: argc, argv (unused) 18 | * 19 | * Out Args: 20 | * 21 | * Scope: unit test (run using make check) 22 | * Returns: non-zero in case of error 23 | * Side Effect: 24 | */ 25 | int 26 | main( 27 | int argc __attribute__((unused)), 28 | char **argv 29 | ) { 30 | 31 | return e2e_test(OWAMP, "A", verify_owping_output); 32 | 33 | } 34 | 35 | 36 | -------------------------------------------------------------------------------- /owamp/owamp/test/owe2e_clear.c: -------------------------------------------------------------------------------- 1 | /* 2 | * File: owe2e_clear.c 3 | * 4 | * Author: Erik Reid 5 | * GÉANT 6 | * 7 | * Description: Basic twping client control setup test in clear mode 8 | */ 9 | #include "./e2e_utils.h" 10 | 11 | /* 12 | * Function: main 13 | * 14 | * Description: launch owping and owampd child processes 15 | * perform a measurement and validate the output 16 | * 17 | * In Args: argc, argv (unused) 18 | * 19 | * Out Args: 20 | * 21 | * Scope: unit test (run using make check) 22 | * Returns: non-zero in case of error 23 | * Side Effect: 24 | */ 25 | int 26 | main( 27 | int argc __attribute__((unused)), 28 | char **argv 29 | ) { 30 | 31 | return e2e_test(OWAMP, "O", verify_owping_output); 32 | 33 | } 34 | 35 | 36 | -------------------------------------------------------------------------------- /owamp/owamp/test/owe2e_enc.c: -------------------------------------------------------------------------------- 1 | /* 2 | * File: owe2e_enc.c 3 | * 4 | * Author: Erik Reid 5 | * GÉANT 6 | * 7 | * Description: Basic twping client control setup test in encrypted mode 8 | */ 9 | #include "./e2e_utils.h" 10 | 11 | /* 12 | * Function: main 13 | * 14 | * Description: launch owping and owampd child processes 15 | * perform a measurement and validate the output 16 | * 17 | * In Args: argc, argv (unused) 18 | * 19 | * Out Args: 20 | * 21 | * Scope: unit test (run using make check) 22 | * Returns: non-zero in case of error 23 | * Side Effect: 24 | */ 25 | int 26 | main( 27 | int argc __attribute__((unused)), 28 | char **argv 29 | ) { 30 | 31 | return e2e_test(OWAMP, "E", verify_owping_output); 32 | 33 | } 34 | 35 | 36 | -------------------------------------------------------------------------------- /owamp/owamp/test/owping_clear.c: -------------------------------------------------------------------------------- 1 | /* 2 | * File: owping1.c 3 | * 4 | * Author: Erik Reid 5 | * GÉANT 6 | * 7 | * Description: Basic owping client control setup test 8 | */ 9 | 10 | #include 11 | 12 | #include 13 | #include 14 | #include 15 | #include 16 | 17 | #include "./server.h" 18 | #include "./session_setup.h" 19 | 20 | #define NUM_TEST_SLOTS 19 21 | #define NUM_TEST_PACKETS 8 22 | #define SID_VALUE "some SID value!!" 23 | 24 | 25 | 26 | /* 27 | * Function: main 28 | * 29 | * Description: launch a simulated owamp server & send commands 30 | * so they can be validated in do_control_setup_server 31 | * 32 | * In Args: argc, argv (unused) 33 | * 34 | * Out Args: 35 | * 36 | * Scope: unit test (run using make check) 37 | * Returns: non-zero in case of error 38 | * Side Effect: 39 | */ 40 | int 41 | main( 42 | int argc __attribute__((unused)), 43 | char **argv 44 | ) { 45 | 46 | struct _server_test_params test_params; 47 | 48 | memset(&test_params, 0, sizeof test_params); 49 | test_params.input.expected_modes = OWP_MODE_OPEN; 50 | test_params.input.expected_num_test_slots = NUM_TEST_SLOTS; 51 | test_params.input.expected_num_test_packets = NUM_TEST_PACKETS; 52 | assert(sizeof test_params.input.sid <= sizeof SID_VALUE); // configuration sanity 53 | memcpy(test_params.input.sid, SID_VALUE, sizeof test_params.input.sid); 54 | 55 | if (session_setup_test( 56 | argv, 57 | OWP_MODE_OPEN, 58 | NUM_TEST_PACKETS, 59 | NUM_TEST_SLOTS, 60 | &test_params, 61 | OWPControlOpen, 62 | NULL)) { 63 | fprintf(stderr, "ping client detected an error\n"); 64 | return 1; 65 | } 66 | 67 | return !test_params.output.sent_greeting || 68 | !test_params.output.setup_response_ok || 69 | !test_params.output.sent_server_start || 70 | !test_params.output.sent_accept_session || 71 | !test_params.output.test_complete; 72 | } 73 | -------------------------------------------------------------------------------- /owamp/owamp/test/owping_enc.c: -------------------------------------------------------------------------------- 1 | /* 2 | * File: owping_enc.c 3 | * 4 | * Author: Erik Reid 5 | * GÉANT 6 | * 7 | * Description: Basic owping client control setup test in encrypted/authenticated mode 8 | */ 9 | 10 | #include 11 | 12 | #include 13 | #include 14 | #include 15 | #include 16 | 17 | #include "./server.h" 18 | #include "./session_setup.h" 19 | 20 | #define NUM_TEST_SLOTS 44 21 | #define NUM_TEST_PACKETS 27 22 | #define SID_VALUE "really crazy sid" 23 | 24 | 25 | 26 | /* 27 | * Function: main 28 | * 29 | * Description: launch a simulated owamp server & send commands 30 | * so they can be validated in do_control_setup_server 31 | * 32 | * In Args: argc, argv (unused) 33 | * 34 | * Out Args: 35 | * 36 | * Scope: unit test (run using make check) 37 | * Returns: non-zero in case of error 38 | * Side Effect: 39 | */ 40 | int 41 | main( 42 | int argc __attribute__((unused)), 43 | char **argv 44 | ) { 45 | 46 | struct _server_test_params test_params; 47 | 48 | memset(&test_params, 0, sizeof test_params); 49 | test_params.input.expected_modes = OWP_MODE_ENCRYPTED; 50 | test_params.input.expected_num_test_slots = NUM_TEST_SLOTS; 51 | test_params.input.expected_num_test_packets = NUM_TEST_PACKETS; 52 | assert(sizeof test_params.input.sid <= sizeof SID_VALUE); // configuration sanity 53 | memcpy(test_params.input.sid, SID_VALUE, sizeof test_params.input.sid); 54 | 55 | if (session_setup_test( 56 | argv, 57 | OWP_MODE_ENCRYPTED, 58 | NUM_TEST_PACKETS, 59 | NUM_TEST_SLOTS, 60 | &test_params, 61 | OWPControlOpen, 62 | default_passphrase_callback)) { 63 | fprintf(stderr, "ping client detected an error\n"); 64 | return 1; 65 | } 66 | 67 | return !test_params.output.sent_greeting || 68 | !test_params.output.setup_response_ok || 69 | !test_params.output.sent_server_start || 70 | !test_params.output.sent_accept_session || 71 | !test_params.output.test_complete; 72 | } 73 | -------------------------------------------------------------------------------- /owamp/owamp/test/owtest_utils.h: -------------------------------------------------------------------------------- 1 | /* 2 | * File: owtest_utils.h 3 | * 4 | * Author: Erik Reid 5 | * GÉANT 6 | * 7 | * Description: declarations for shared test methods/structs 8 | */ 9 | 10 | #define TMPNAME_FMT "owtest.XXXXXX" 11 | 12 | FILE *tmpFile(void); 13 | FILE *tmpSessionDataFile(const char *hex); 14 | void rmdir_recursive(const char *dir_name); 15 | 16 | OWPContext tmpContext(char **argv); 17 | 18 | struct _server_params { 19 | char *socket_path; 20 | int (*client_proc)(int, void*); 21 | void *test_context; 22 | }; 23 | 24 | void *run_server(struct _server_params *); 25 | 26 | int count_occurrences(const char *haystack, const char *needle); 27 | 28 | 29 | -------------------------------------------------------------------------------- /owamp/owamp/test/owtvec.c: -------------------------------------------------------------------------------- 1 | /* 2 | * $Id$ 3 | */ 4 | /************************************************************************ 5 | * * 6 | * Copyright (C) 2003 * 7 | * Internet2 * 8 | * All Rights Reserved * 9 | * * 10 | ************************************************************************/ 11 | /* 12 | * File: owtvec.c 13 | * 14 | * Author: Jeff W. Boote 15 | * Internet2 16 | * 17 | * Date: Mon Oct 20 13:55:38 MDT 2003 18 | * 19 | * Description: 20 | */ 21 | #include 22 | #include 23 | 24 | #include 25 | #include 26 | #include 27 | #include 28 | #include 29 | #include 30 | 31 | int 32 | main( 33 | int argc __attribute__((unused)), 34 | char **argv 35 | ) { 36 | char *progname; 37 | I2LogImmediateAttr ia; 38 | I2ErrHandle eh; 39 | OWPContext ctx; 40 | uint8_t seed[16]; 41 | char *seedvals[4] = { 42 | "2872979303ab47eeac028dab3829dab2", 43 | "0102030405060708090a0b0c0d0e0f00", 44 | "deadbeefdeadbeefdeadbeefdeadbeef", 45 | "feed0feed1feed2feed3feed4feed5ab"}; 46 | char *expected_sums[4] = { 47 | "000f4479bd317381", 48 | "000f433686466a62", 49 | "000f416c8884d2d3", 50 | "000f3f0b4b416ec8"}; 51 | unsigned int nice[] = {1,10,100,1000,100000,1000000}; 52 | unsigned int i,j,n; 53 | OWPExpContext exp; 54 | OWPNum64 eval; 55 | OWPNum64 sum; 56 | 57 | 58 | ia.line_info = (I2NAME | I2MSG); 59 | #ifdef DEBUG 60 | ia.line_info |= (I2LINE | I2FILE); 61 | #endif 62 | ia.fp = stderr; 63 | 64 | progname = (progname = strrchr(argv[0], '/')) ? progname+1 : *argv; 65 | 66 | /* 67 | * Start an error logging session for reporing errors to the 68 | * standard error 69 | */ 70 | eh = I2ErrOpen(progname, I2ErrLogImmediate, &ia, NULL, NULL); 71 | if(! eh) { 72 | fprintf(stderr, "%s : Couldn't init error module\n", progname); 73 | exit(1); 74 | } 75 | 76 | /* 77 | * Initialize library with configuration functions. 78 | */ 79 | if( !(ctx = OWPContextCreate(eh))){ 80 | I2ErrLog(eh, "Unable to initialize OWP library."); 81 | exit(1); 82 | } 83 | 84 | for(i=0;i 11 | 12 | #include 13 | #include 14 | #include 15 | #include 16 | 17 | #include "./server.h" 18 | #include "./session_setup.h" 19 | 20 | #define NUM_TEST_SLOTS 99 21 | #define NUM_TEST_PACKETS 41 22 | #define SID_VALUE "different SID!!?" 23 | 24 | 25 | 26 | /* 27 | * Function: main 28 | * 29 | * Description: launch a simulated twamp server & send commands 30 | * so they can be validated in do_control_setup_server 31 | * 32 | * In Args: argc, argv (unused) 33 | * 34 | * Out Args: 35 | * 36 | * Scope: unit test (run using make check) 37 | * Returns: non-zero in case of error 38 | * Side Effect: 39 | */ 40 | int 41 | main( 42 | int argc __attribute__((unused)), 43 | char **argv 44 | ) { 45 | 46 | struct _server_test_params test_params; 47 | 48 | memset(&test_params, 0, sizeof test_params); 49 | test_params.input.expected_modes = OWP_MODE_OPEN; 50 | test_params.input.expected_num_test_slots = 0; 51 | test_params.input.expected_num_test_packets = 0; 52 | assert(sizeof test_params.input.sid <= sizeof SID_VALUE); // configuration sanity 53 | memcpy(test_params.input.sid, SID_VALUE, sizeof test_params.input.sid); 54 | 55 | if (session_setup_test( 56 | argv, 57 | OWP_MODE_OPEN, 58 | NUM_TEST_PACKETS, 59 | NUM_TEST_SLOTS, 60 | &test_params, 61 | TWPControlOpen, 62 | NULL)) { 63 | fprintf(stderr, "ping client detected an error\n"); 64 | return 1; 65 | } 66 | 67 | return !test_params.output.sent_greeting || 68 | !test_params.output.setup_response_ok || 69 | !test_params.output.sent_server_start || 70 | !test_params.output.sent_accept_session || 71 | !test_params.output.test_complete; 72 | } 73 | -------------------------------------------------------------------------------- /owamp/owamp/test/twping_enc.c: -------------------------------------------------------------------------------- 1 | /* 2 | * File: twping1.c 3 | * 4 | * Author: Erik Reid 5 | * GÉANT 6 | * 7 | * Description: Basic twping client control setup test 8 | */ 9 | 10 | #include 11 | 12 | #include 13 | #include 14 | #include 15 | #include 16 | 17 | #include "./server.h" 18 | #include "./session_setup.h" 19 | 20 | #define NUM_TEST_SLOTS 15 21 | #define NUM_TEST_PACKETS 18 22 | #define SID_VALUE "this is the SID!" 23 | 24 | 25 | /* 26 | * Function: main 27 | * 28 | * Description: launch a simulated twamp server & send commands 29 | * so they can be validated in do_control_setup_server 30 | * 31 | * In Args: argc, argv (unused) 32 | * 33 | * Out Args: 34 | * 35 | * Scope: unit test (run using make check) 36 | * Returns: non-zero in case of error 37 | * Side Effect: 38 | */ 39 | int 40 | main( 41 | int argc __attribute__((unused)), 42 | char **argv 43 | ) { 44 | 45 | struct _server_test_params test_params; 46 | 47 | memset(&test_params, 0, sizeof test_params); 48 | test_params.input.expected_modes = OWP_MODE_ENCRYPTED; 49 | test_params.input.expected_num_test_slots = 0; 50 | test_params.input.expected_num_test_packets = 0; 51 | assert(sizeof test_params.input.sid <= sizeof SID_VALUE); // configuration sanity 52 | memcpy(test_params.input.sid, SID_VALUE, sizeof test_params.input.sid); 53 | 54 | if (session_setup_test( 55 | argv, 56 | OWP_MODE_ENCRYPTED, 57 | NUM_TEST_PACKETS, 58 | NUM_TEST_SLOTS, 59 | &test_params, 60 | TWPControlOpen, 61 | default_passphrase_callback)) { 62 | fprintf(stderr, "ping client detected an error\n"); 63 | return 1; 64 | } 65 | 66 | return !test_params.output.sent_greeting || 67 | !test_params.output.setup_response_ok || 68 | !test_params.output.sent_server_start || 69 | !test_params.output.sent_accept_session || 70 | !test_params.output.test_complete; 71 | } 72 | -------------------------------------------------------------------------------- /owamp/owamp/unibuild-packaging/deb/apparmor/usr.sbin.owampd: -------------------------------------------------------------------------------- 1 | # vim:syntax=apparmor 2 | 3 | #include 4 | 5 | /usr/sbin/owampd { 6 | #include 7 | #include 8 | #include 9 | 10 | capability setgid, 11 | capability setuid, 12 | 13 | /etc/owamp-server/** r, 14 | 15 | /var/lib/owamp/** rwk, 16 | 17 | / r, 18 | 19 | /{,var/}run/owamp-server.pid rwk, 20 | /{,var/}run/owamp-server.info rw, 21 | 22 | # Site-specific additions and overrides. See local/README for details. 23 | #include 24 | } 25 | -------------------------------------------------------------------------------- /owamp/owamp/unibuild-packaging/deb/apparmor/usr.sbin.twampd: -------------------------------------------------------------------------------- 1 | # vim:syntax=apparmor 2 | 3 | #include 4 | 5 | /usr/sbin/twampd { 6 | #include 7 | #include 8 | #include 9 | 10 | capability setgid, 11 | capability setuid, 12 | 13 | /etc/twamp-server/** r, 14 | 15 | /var/lib/twamp/** rwk, 16 | 17 | / r, 18 | 19 | /{,var/}run/twamp-server.pid rwk, 20 | /{,var/}run/twamp-server.info rw, 21 | 22 | # Site-specific additions and overrides. See local/README for details. 23 | #include 24 | } 25 | -------------------------------------------------------------------------------- /owamp/owamp/unibuild-packaging/deb/compat: -------------------------------------------------------------------------------- 1 | 10 2 | -------------------------------------------------------------------------------- /owamp/owamp/unibuild-packaging/deb/control: -------------------------------------------------------------------------------- 1 | Source: owamp 2 | Section: net 3 | Priority: optional 4 | Maintainer: perfSONAR developers 5 | Build-Depends: debhelper (>= 10), dh-apparmor, dh-autoreconf, dh-exec, libi2util-dev (>= 1.4), 6 | libcap-dev, libssl-dev 7 | Standards-Version: 3.9.8 8 | Homepage: http://www.perfsonar.net 9 | Vcs-Git: https://github.com/perfsonar/owamp 10 | Vcs-Browser: https://github.com/perfsonar/owamp/tree/master 11 | 12 | Package: owamp-client 13 | Architecture: any 14 | Depends: ${shlibs:Depends}, ${misc:Depends}, libcap2-bin 15 | Description: OWAMP command line client utilities 16 | OWAMP is a client/server package that allows one to measure the 17 | latency between hosts. Unlike ping, which can only measure the 18 | bidirectional delay, OWAMP enables you to measure the unidirectional 19 | delay between two hosts. It is an implementation of the One-Way Active 20 | Measurement Protocol as defined by RFC4656. 21 | . 22 | This package contains command line client utilities for performing 23 | measurements with an owamp server. 24 | 25 | Package: owamp-server 26 | Architecture: any 27 | Depends: ${shlibs:Depends}, ${misc:Depends}, adduser, lsb-base, 28 | ntp | time-daemon, 29 | Description: OWAMP daemon 30 | OWAMP is a client/server package that allows one to measure the 31 | latency between hosts. Unlike ping, which can only measure the 32 | bidirectional delay, OWAMP enables you to measure the unidirectional 33 | delay between two hosts. It is an implementation of the One-Way Active 34 | Measurement Protocol as defined by RFC4656. 35 | . 36 | This package contains the owamp server. 37 | 38 | Package: twamp-client 39 | Architecture: any 40 | Depends: ${shlibs:Depends}, ${misc:Depends}, libcap2-bin 41 | Description: TWAMP command line client utilities 42 | TWAMP is a client/server package that allows one to measure the 43 | latency between hosts. Like ping, TWAMP enables you to measure the 44 | two-way or round-trip delay between two hosts. It is an implementation 45 | of the Two-Way Active Measurement Protocol as defined by RFC5357. 46 | . 47 | This package contains command line client utilities for performing 48 | measurements with an twamp server. 49 | 50 | Package: twamp-server 51 | Architecture: any 52 | Depends: ${shlibs:Depends}, ${misc:Depends}, adduser, lsb-base, 53 | ntp | time-daemon 54 | Description: TWAMP daemon 55 | TWAMP is a client/server package that allows one to measure the 56 | latency between hosts. Like ping, TWAMP enables you to measure the 57 | two-way or round-trip delay between two hosts. It is an implementation 58 | of the Two-Way Active Measurement Protocol as defined by RFC5357. 59 | . 60 | This package contains the twamp server. 61 | -------------------------------------------------------------------------------- /owamp/owamp/unibuild-packaging/deb/copyright: -------------------------------------------------------------------------------- 1 | Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ 2 | Upstream-Name: owamp 3 | Source: http://software.internet2.edu/owamp/ 4 | 5 | Files: * 6 | Copyright: 2002 Internet2 7 | 2011-2023 perfSONAR project 8 | License: Apache-2.0 9 | 10 | Files: debian/* 11 | Copyright: 2014-2023 perfSONAR project 12 | License: Apache-2.0 13 | 14 | License: Apache-2.0 15 | Licensed under the Apache License, Version 2.0 (the "License"); 16 | you may not use this file except in compliance with the License. 17 | You may obtain a copy of the License at 18 | . 19 | http://www.apache.org/licenses/LICENSE-2.0 20 | . 21 | Unless required by applicable law or agreed to in writing, software 22 | distributed under the License is distributed on an "AS IS" BASIS, 23 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 24 | See the License for the specific language governing permissions and 25 | limitations under the License. 26 | . 27 | On Debian systems, the complete text of the Apache version 2.0 license 28 | can be found in "/usr/share/common-licenses/Apache-2.0". 29 | -------------------------------------------------------------------------------- /owamp/owamp/unibuild-packaging/deb/owamp-client.doc: -------------------------------------------------------------------------------- 1 | doc/draft-shalunov-reordering-definition-02.txt 2 | -------------------------------------------------------------------------------- /owamp/owamp/unibuild-packaging/deb/owamp-client.install: -------------------------------------------------------------------------------- 1 | usr/bin/owfetch 2 | usr/bin/owping 3 | usr/bin/owstats 4 | usr/bin/owup 5 | usr/bin/powstream 6 | usr/share/man/man1/owfetch.1 7 | usr/share/man/man1/owping.1 8 | usr/share/man/man1/owstats.1 9 | usr/share/man/man1/owup.1 10 | usr/share/man/man1/powstream.1 11 | -------------------------------------------------------------------------------- /owamp/owamp/unibuild-packaging/deb/owamp-client.postinst: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # postinst script for owamp-client 3 | # 4 | # see: dh_installdeb(1) 5 | 6 | set -e 7 | 8 | # summary of how this script can be called: 9 | # * `configure' 10 | # * `abort-upgrade' 11 | # * `abort-remove' `in-favour' 12 | # 13 | # * `abort-remove' 14 | # * `abort-deconfigure' `in-favour' 15 | # `removing' 16 | # 17 | # for details, see http://www.debian.org/doc/debian-policy/ or 18 | # the debian-policy package 19 | 20 | 21 | case "$1" in 22 | configure) 23 | # capabilities required for SO_BINDTODEVICE 24 | setcap "cap_net_raw+p" /usr/bin/owping 25 | setcap "cap_net_raw+p" /usr/bin/powstream 26 | ;; 27 | 28 | abort-upgrade|abort-remove|abort-deconfigure) 29 | ;; 30 | 31 | *) 32 | echo "postinst called with unknown argument \`$1'" >&2 33 | exit 1 34 | ;; 35 | esac 36 | 37 | # dh_installdeb will replace this with shell code automatically 38 | # generated by other debhelper scripts. 39 | 40 | #DEBHELPER# 41 | 42 | exit 0 43 | -------------------------------------------------------------------------------- /owamp/owamp/unibuild-packaging/deb/owamp-server.init: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | ### BEGIN INIT INFO 3 | # Provides: owamp-server 4 | # Required-Start: $network $local_fs $remote_fs 5 | # Required-Stop: $network $local_fs $remote_fs 6 | # Default-Start: 2 3 4 5 7 | # Default-Stop: 0 1 6 8 | # Short-Description: OWAMP server 9 | # Description: OWAMP is a client/server package that allows one to measure the 10 | # latency between hosts. Unlike ping, which can only measure the 11 | # bidirectional delay, OWAMP enables you to measure the unidirectional 12 | # delay between two hosts. It is an implementation of the One-Way Active 13 | # Measurement Protocol as defined by RFC4656. 14 | ### END INIT INFO 15 | 16 | # Author: Valentin Vidic 17 | 18 | # PATH should only include /usr/* if it runs after the mountnfs.sh script 19 | PATH=/sbin:/usr/sbin:/bin:/usr/bin 20 | DESC="OWAMP server" # Introduce a short description here 21 | NAME=owamp-server # Introduce the short server's name here 22 | DAEMON=/usr/sbin/owampd # Introduce the server's location here 23 | PIDFILE=/var/run/$NAME.pid 24 | SCRIPTNAME=/etc/init.d/$NAME 25 | 26 | # Arguments to run the daemon with 27 | DAEMON_ARGS="-c /etc/owamp-server -R /var/run" 28 | 29 | # Set resource limits for the service 30 | ulimit -n 4096 31 | 32 | # Exit if the package is not installed 33 | [ -x $DAEMON ] || exit 0 34 | 35 | # Read configuration variable file if it is present 36 | [ -r /etc/default/$NAME ] && . /etc/default/$NAME 37 | 38 | # Load the VERBOSE setting and other rcS variables 39 | . /lib/init/vars.sh 40 | 41 | # Define LSB log_* functions. 42 | # Depend on lsb-base (>= 3.0-6) to ensure that this file is present. 43 | . /lib/lsb/init-functions 44 | 45 | # 46 | # Function that starts the daemon/service 47 | # 48 | do_start() 49 | { 50 | # Return 51 | # 0 if daemon has been started 52 | # 1 if daemon was already running 53 | # 2 if daemon could not be started 54 | start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON --test > /dev/null \ 55 | || return 1 56 | start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON -- \ 57 | $DAEMON_ARGS > /dev/null 2>&1 \ 58 | || return 2 59 | # Add code here, if necessary, that waits for the process to be ready 60 | # to handle requests from services started subsequently which depend 61 | # on this one. As a last resort, sleep for some time. 62 | } 63 | 64 | # 65 | # Function that stops the daemon/service 66 | # 67 | do_stop() 68 | { 69 | # Return 70 | # 0 if daemon has been stopped 71 | # 1 if daemon was already stopped 72 | # 2 if daemon could not be stopped 73 | # other if a failure occurred 74 | start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 --pidfile $PIDFILE --exec $DAEMON 75 | RETVAL="$?" 76 | [ "$RETVAL" = 2 ] && return 2 77 | # Wait for children to finish too if this is a daemon that forks 78 | # and if the daemon is only ever run from this initscript. 79 | # If the above conditions are not satisfied then add some other code 80 | # that waits for the process to drop all resources that could be 81 | # needed by services started subsequently. A last resort is to 82 | # sleep for some time. 83 | start-stop-daemon --stop --quiet --oknodo --retry=0/30/KILL/5 --exec $DAEMON 84 | [ "$?" = 2 ] && return 2 85 | # Many daemons don't delete their pidfiles when they exit. 86 | rm -f $PIDFILE 87 | return "$RETVAL" 88 | } 89 | 90 | case "$1" in 91 | start) 92 | log_daemon_msg "Starting $DESC" "$NAME" 93 | do_start 94 | case "$?" in 95 | 0|1) log_end_msg 0 ;; 96 | 2) log_end_msg 1 ;; 97 | esac 98 | ;; 99 | stop) 100 | log_daemon_msg "Stopping $DESC" "$NAME" 101 | do_stop 102 | case "$?" in 103 | 0|1) log_end_msg 0 ;; 104 | 2) log_end_msg 1 ;; 105 | esac 106 | ;; 107 | status) 108 | status_of_proc "$DAEMON" "$NAME" && exit 0 || exit $? 109 | ;; 110 | restart|force-reload) 111 | log_daemon_msg "Restarting $DESC" "$NAME" 112 | do_stop 113 | case "$?" in 114 | 0|1) 115 | do_start 116 | case "$?" in 117 | 0) log_end_msg 0 ;; 118 | 1) log_end_msg 1 ;; # Old process is still running 119 | *) log_end_msg 1 ;; # Failed to start 120 | esac 121 | ;; 122 | *) 123 | # Failed to stop 124 | log_end_msg 1 125 | ;; 126 | esac 127 | ;; 128 | *) 129 | echo "Usage: $SCRIPTNAME {start|stop|status|restart|force-reload}" >&2 130 | exit 3 131 | ;; 132 | esac 133 | 134 | : 135 | -------------------------------------------------------------------------------- /owamp/owamp/unibuild-packaging/deb/owamp-server.install: -------------------------------------------------------------------------------- 1 | #! /usr/bin/dh-exec 2 | usr/share/man/man5/owamp-server.conf.5 3 | usr/share/man/man5/owamp-server.limits.5 4 | usr/share/man/man5/owamp-server.pfs.5 5 | usr/share/man/man8/owampd.8 6 | usr/bin/owampd usr/sbin 7 | conf/owampd.limits => etc/owamp-server/owamp-server.limits 8 | conf/owampd.rpm.conf => etc/owamp-server/owamp-server.conf 9 | conf/owampd-cleanup => etc/cron.daily/owamp-server 10 | debian/apparmor/usr.sbin.owampd etc/apparmor.d 11 | -------------------------------------------------------------------------------- /owamp/owamp/unibuild-packaging/deb/owamp-server.postinst: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # postinst script for owamp-server 3 | # 4 | # see: dh_installdeb(1) 5 | 6 | set -e 7 | 8 | # summary of how this script can be called: 9 | # * `configure' 10 | # * `abort-upgrade' 11 | # * `abort-remove' `in-favour' 12 | # 13 | # * `abort-remove' 14 | # * `abort-deconfigure' `in-favour' 15 | # `removing' 16 | # 17 | # for details, see http://www.debian.org/doc/debian-policy/ or 18 | # the debian-policy package 19 | 20 | 21 | case "$1" in 22 | configure) 23 | # Rename configuration files 24 | if dpkg-maintscript-helper supports mv_conffile; then 25 | dpkg-maintscript-helper mv_conffile \ 26 | /etc/owampd/owampd.conf \ 27 | /etc/owamp-server/owamp-server.conf \ 28 | 3.5.0~1.rc1-2~ -- "$@" 29 | dpkg-maintscript-helper mv_conffile \ 30 | /etc/owampd/owampd.limits \ 31 | /etc/owamp-server/owamp-server.limits \ 32 | 3.5.0~1.rc1-2~ -- "$@" 33 | fi 34 | if [ -d /etc/owampd ]; then 35 | rmdir --ignore-fail-on-non-empty /etc/owampd 36 | fi 37 | 38 | # Remove old init script 39 | if dpkg-maintscript-helper supports rm_conffile; then 40 | dpkg-maintscript-helper rm_conffile \ 41 | /etc/init.d/owampd \ 42 | 3.5.0~1.rc1-2~ -- "$@" 43 | fi 44 | 45 | if ! getent passwd owamp > /dev/null ; then 46 | adduser --system --group --home /var/lib/owamp --quiet \ 47 | --no-create-home --disabled-login owamp 48 | fi 49 | 50 | install -d -oowamp -gowamp -m750 /var/lib/owamp /var/lib/owamp/hierarchy 51 | ;; 52 | 53 | abort-upgrade|abort-remove|abort-deconfigure) 54 | ;; 55 | 56 | *) 57 | echo "postinst called with unknown argument \`$1'" >&2 58 | exit 1 59 | ;; 60 | esac 61 | 62 | # dh_installdeb will replace this with shell code automatically 63 | # generated by other debhelper scripts. 64 | 65 | #DEBHELPER# 66 | 67 | exit 0 68 | -------------------------------------------------------------------------------- /owamp/owamp/unibuild-packaging/deb/owamp-server.postrm: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # postrm script for owamp-server 3 | # 4 | # see: dh_installdeb(1) 5 | 6 | set -e 7 | 8 | # summary of how this script can be called: 9 | # * `remove' 10 | # * `purge' 11 | # * `upgrade' 12 | # * `failed-upgrade' 13 | # * `abort-install' 14 | # * `abort-install' 15 | # * `abort-upgrade' 16 | # * `disappear' 17 | # 18 | # for details, see http://www.debian.org/doc/debian-policy/ or 19 | # the debian-policy package 20 | 21 | 22 | case "$1" in 23 | purge) 24 | deluser --system --quiet owamp || true 25 | rm -rf /var/lib/owamp/ 26 | ;; 27 | 28 | remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear) 29 | # Rename configuration files 30 | if dpkg-maintscript-helper supports mv_conffile; then 31 | dpkg-maintscript-helper mv_conffile \ 32 | /etc/owampd/owampd.conf \ 33 | /etc/owamp-server/owamp-server.conf \ 34 | 3.5.0~1.rc1-2~ -- "$@" 35 | dpkg-maintscript-helper mv_conffile \ 36 | /etc/owampd/owampd.limits \ 37 | /etc/owamp-server/owamp-server.limits \ 38 | 3.5.0~1.rc1-2~ -- "$@" 39 | fi 40 | 41 | # Remove old init script 42 | if dpkg-maintscript-helper supports rm_conffile; then 43 | dpkg-maintscript-helper rm_conffile \ 44 | /etc/init.d/owampd \ 45 | 3.5.0~1.rc1-2~ -- "$@" 46 | fi 47 | ;; 48 | 49 | *) 50 | echo "postrm called with unknown argument \`$1'" >&2 51 | exit 1 52 | ;; 53 | esac 54 | 55 | # dh_installdeb will replace this with shell code automatically 56 | # generated by other debhelper scripts. 57 | 58 | #DEBHELPER# 59 | 60 | exit 0 61 | -------------------------------------------------------------------------------- /owamp/owamp/unibuild-packaging/deb/owamp-server.preinst: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # preinst script for owamp-server 3 | # 4 | # see: dh_installdeb(1) 5 | 6 | set -e 7 | 8 | # summary of how this script can be called: 9 | # * `install' 10 | # * `install' 11 | # * `upgrade' 12 | # * `abort-upgrade' 13 | # for details, see http://www.debian.org/doc/debian-policy/ or 14 | # the debian-policy package 15 | 16 | 17 | case "$1" in 18 | install|upgrade) 19 | # Rename configuration files 20 | if dpkg-maintscript-helper supports mv_conffile; then 21 | dpkg-maintscript-helper mv_conffile \ 22 | /etc/owampd/owampd.conf \ 23 | /etc/owamp-server/owamp-server.conf \ 24 | 3.5.0~1.rc1-2~ -- "$@" 25 | dpkg-maintscript-helper mv_conffile \ 26 | /etc/owampd/owampd.limits \ 27 | /etc/owamp-server/owamp-server.limits \ 28 | 3.5.0~1.rc1-2~ -- "$@" 29 | fi 30 | 31 | # Remove old init script 32 | if dpkg-maintscript-helper supports rm_conffile; then 33 | dpkg-maintscript-helper rm_conffile \ 34 | /etc/init.d/owampd \ 35 | 3.5.0~1.rc1-2~ -- "$@" 36 | fi 37 | update-rc.d owampd remove >/dev/null 38 | ;; 39 | 40 | abort-upgrade) 41 | ;; 42 | 43 | *) 44 | echo "preinst called with unknown argument \`$1'" >&2 45 | exit 1 46 | ;; 47 | esac 48 | 49 | # dh_installdeb will replace this with shell code automatically 50 | # generated by other debhelper scripts. 51 | 52 | #DEBHELPER# 53 | 54 | exit 0 55 | -------------------------------------------------------------------------------- /owamp/owamp/unibuild-packaging/deb/owamp-server.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=OWAMP server 3 | After=network.target 4 | 5 | [Service] 6 | Type=forking 7 | PIDFile=/var/run/owamp-server.pid 8 | ExecStart=/usr/sbin/owampd -c /etc/owamp-server -R /var/run 9 | LimitNOFILE=4096 10 | Restart=on-failure 11 | 12 | [Install] 13 | WantedBy=multi-user.target 14 | -------------------------------------------------------------------------------- /owamp/owamp/unibuild-packaging/deb/patches/man.diff: -------------------------------------------------------------------------------- 1 | Description: Fix manpage warnings 2 | 3 | Index: b/doc/owping_report.man 4 | =================================================================== 5 | --- a/doc/owping_report.man 2025-05-28 12:20:27.148345681 -0400 6 | +++ b/doc/owping_report.man 2025-05-28 12:20:28.682464616 -0400 7 | @@ -83,5 +83,5 @@ 8 | .br 9 | Finally \fB\*[proto]\fR reports the amount of re-ordering it observed. A 10 | description of the metric used to report this can be found at: 11 | -.br 12 | -\%http://www.internet2.edu/performance/owamp/draft-shalunov-reordering-definition-02.txt.html 13 | +.nf 14 | +http://www.internet2.edu/performance/owamp/draft-shalunov-reordering-definition-02.txt.html 15 | Index: b/doc/owping_test_opts.man 16 | =================================================================== 17 | --- a/doc/owping_test_opts.man 2025-05-28 12:20:27.148565303 -0400 18 | +++ b/doc/owping_test_opts.man 2025-05-28 12:20:28.683302358 -0400 19 | @@ -70,15 +70,15 @@ 20 | _ 21 | CS3 011000 Broadcast Video TV & live events 22 | _ 23 | -AF31 011010 Multimedia Streaming Streaming video and audio 24 | -AF32 011100 \^ \^ 25 | -AF33 011110 \^ \^ 26 | +AF31 011010 Multimedia Streaming 27 | +AF32 011100 \^ Streaming video 28 | +AF33 011110 \^ and audio 29 | _ 30 | CS4 100000 Real-Time Interactive Video conf and gaming 31 | _ 32 | -AF41 100010 Multimedia Conferencing H.323 video conferencing 33 | -AF42 100100 \^ \^ 34 | -AF43 100110 \^ \^ 35 | +AF41 100010 Multimedia Conferencing 36 | +AF42 100100 \^ H.323 video 37 | +AF43 100110 \^ conferencing 38 | _ 39 | CS5 101000 Signaling Video conf and gaming 40 | _ 41 | -------------------------------------------------------------------------------- /owamp/owamp/unibuild-packaging/deb/patches/series: -------------------------------------------------------------------------------- 1 | autotools.diff 2 | man.diff 3 | -------------------------------------------------------------------------------- /owamp/owamp/unibuild-packaging/deb/rules: -------------------------------------------------------------------------------- 1 | #!/usr/bin/make -f 2 | # -*- makefile -*- 3 | # Sample debian/rules that uses debhelper. 4 | # 5 | # This file was originally written by Joey Hess and Craig Small. 6 | # As a special exception, when this file is copied by dh-make into a 7 | # dh-make output file, you may use that output file without restriction. 8 | # This special exception was added by Craig Small in version 0.37 of dh-make. 9 | # 10 | # Modified to make a template file for a multi-binary package with separated 11 | # build-arch and build-indep targets by Bill Allombert 2001 12 | 13 | # Uncomment this to turn on verbose mode. 14 | #export DH_VERBOSE=1 15 | 16 | # see FEATURE AREAS in dpkg-buildflags(1) 17 | export DEB_BUILD_MAINT_OPTIONS = reproducible=-timeless 18 | export DEB_BUILD_OPTIONS = noopt 19 | 20 | # This has to be exported to make some magic below work. 21 | export DH_OPTIONS 22 | 23 | %: 24 | dh $@ --with autoreconf,systemd 25 | 26 | override_dh_auto_configure: 27 | dh_auto_configure -- \ 28 | --with-I2util=no 29 | 30 | ifeq ($(filter $(DEB_HOST_ARCH), amd64),) 31 | override_dh_auto_test: 32 | endif 33 | 34 | override_dh_install: 35 | dh_install 36 | dh_apparmor --profile-name=usr.sbin.owampd -p owamp-server 37 | dh_apparmor --profile-name=usr.sbin.twampd -p twamp-server 38 | 39 | # Ubuntu dbgsym.ddeb are currently not supported by reprepro 40 | override_dh_strip: 41 | dh_strip --no-automatic-dbgsym 42 | -------------------------------------------------------------------------------- /owamp/owamp/unibuild-packaging/deb/source/format: -------------------------------------------------------------------------------- 1 | 3.0 (quilt) 2 | -------------------------------------------------------------------------------- /owamp/owamp/unibuild-packaging/deb/tests/control: -------------------------------------------------------------------------------- 1 | Tests: owampd, owup, owping, owstats, twampd, twping 2 | Restrictions: needs-root 3 | -------------------------------------------------------------------------------- /owamp/owamp/unibuild-packaging/deb/tests/owampd: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -e 4 | 5 | service owamp-server status 6 | 7 | pgrep -l owampd 8 | -------------------------------------------------------------------------------- /owamp/owamp/unibuild-packaging/deb/tests/owping: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -e 4 | 5 | owping localhost 6 | -------------------------------------------------------------------------------- /owamp/owamp/unibuild-packaging/deb/tests/owstats: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -e 4 | 5 | owping -F $AUTOPKGTEST_TMP/stats localhost 6 | 7 | owstats $AUTOPKGTEST_TMP/stats 8 | -------------------------------------------------------------------------------- /owamp/owamp/unibuild-packaging/deb/tests/owup: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -e 4 | 5 | owup localhost 2>&1 6 | -------------------------------------------------------------------------------- /owamp/owamp/unibuild-packaging/deb/tests/twampd: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -e 4 | 5 | service twamp-server status 6 | 7 | pgrep -l twampd 8 | -------------------------------------------------------------------------------- /owamp/owamp/unibuild-packaging/deb/tests/twping: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -e 4 | 5 | twping localhost 6 | -------------------------------------------------------------------------------- /owamp/owamp/unibuild-packaging/deb/twamp-client.install: -------------------------------------------------------------------------------- 1 | usr/bin/twping 2 | usr/share/man/man1/twping.1 3 | -------------------------------------------------------------------------------- /owamp/owamp/unibuild-packaging/deb/twamp-client.postinst: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # postinst script for twamp-client 3 | # 4 | # see: dh_installdeb(1) 5 | 6 | set -e 7 | 8 | # summary of how this script can be called: 9 | # * `configure' 10 | # * `abort-upgrade' 11 | # * `abort-remove' `in-favour' 12 | # 13 | # * `abort-remove' 14 | # * `abort-deconfigure' `in-favour' 15 | # `removing' 16 | # 17 | # for details, see http://www.debian.org/doc/debian-policy/ or 18 | # the debian-policy package 19 | 20 | 21 | case "$1" in 22 | configure) 23 | # capabilities required for SO_BINDTODEVICE 24 | setcap "cap_net_raw+p" /usr/bin/twping 25 | ;; 26 | 27 | abort-upgrade|abort-remove|abort-deconfigure) 28 | ;; 29 | 30 | *) 31 | echo "postinst called with unknown argument \`$1'" >&2 32 | exit 1 33 | ;; 34 | esac 35 | 36 | # dh_installdeb will replace this with shell code automatically 37 | # generated by other debhelper scripts. 38 | 39 | #DEBHELPER# 40 | 41 | exit 0 42 | -------------------------------------------------------------------------------- /owamp/owamp/unibuild-packaging/deb/twamp-server.init: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | ### BEGIN INIT INFO 3 | # Provides: twamp-server 4 | # Required-Start: $network $local_fs $remote_fs 5 | # Required-Stop: $network $local_fs $remote_fs 6 | # Default-Start: 2 3 4 5 7 | # Default-Stop: 0 1 6 8 | # Short-Description: TWAMP server 9 | # Description: TWAMP is a client/server package that allows one to measure the 10 | # latency between hosts. Like ping, TWAMP enables you to measure the 11 | # two-way or round-trip delay between two hosts. It is an implementation 12 | # of the Two-Way Active Measurement Protocol as defined by RFC5357. 13 | ### END INIT INFO 14 | 15 | # Author: Valentin Vidic 16 | 17 | # PATH should only include /usr/* if it runs after the mountnfs.sh script 18 | PATH=/sbin:/usr/sbin:/bin:/usr/bin 19 | DESC="TWAMP server" # Introduce a short description here 20 | NAME=twamp-server # Introduce the short server's name here 21 | DAEMON=/usr/sbin/twampd # Introduce the server's location here 22 | PIDFILE=/var/run/$NAME.pid 23 | SCRIPTNAME=/etc/init.d/$NAME 24 | 25 | # Arguments to run the daemon with 26 | DAEMON_ARGS="-c /etc/twamp-server -R /var/run" 27 | 28 | # Set resource limits for the service 29 | ulimit -n 4096 30 | 31 | # Exit if the package is not installed 32 | [ -x $DAEMON ] || exit 0 33 | 34 | # Read configuration variable file if it is present 35 | [ -r /etc/default/$NAME ] && . /etc/default/$NAME 36 | 37 | # Load the VERBOSE setting and other rcS variables 38 | . /lib/init/vars.sh 39 | 40 | # Define LSB log_* functions. 41 | # Depend on lsb-base (>= 3.0-6) to ensure that this file is present. 42 | . /lib/lsb/init-functions 43 | 44 | # 45 | # Function that starts the daemon/service 46 | # 47 | do_start() 48 | { 49 | # Return 50 | # 0 if daemon has been started 51 | # 1 if daemon was already running 52 | # 2 if daemon could not be started 53 | start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON --test > /dev/null \ 54 | || return 1 55 | start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON -- \ 56 | $DAEMON_ARGS > /dev/null 2>&1 \ 57 | || return 2 58 | # Add code here, if necessary, that waits for the process to be ready 59 | # to handle requests from services started subsequently which depend 60 | # on this one. As a last resort, sleep for some time. 61 | } 62 | 63 | # 64 | # Function that stops the daemon/service 65 | # 66 | do_stop() 67 | { 68 | # Return 69 | # 0 if daemon has been stopped 70 | # 1 if daemon was already stopped 71 | # 2 if daemon could not be stopped 72 | # other if a failure occurred 73 | start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 --pidfile $PIDFILE --exec $DAEMON 74 | RETVAL="$?" 75 | [ "$RETVAL" = 2 ] && return 2 76 | # Wait for children to finish too if this is a daemon that forks 77 | # and if the daemon is only ever run from this initscript. 78 | # If the above conditions are not satisfied then add some other code 79 | # that waits for the process to drop all resources that could be 80 | # needed by services started subsequently. A last resort is to 81 | # sleep for some time. 82 | start-stop-daemon --stop --quiet --oknodo --retry=0/30/KILL/5 --exec $DAEMON 83 | [ "$?" = 2 ] && return 2 84 | # Many daemons don't delete their pidfiles when they exit. 85 | rm -f $PIDFILE 86 | return "$RETVAL" 87 | } 88 | 89 | case "$1" in 90 | start) 91 | log_daemon_msg "Starting $DESC" "$NAME" 92 | do_start 93 | case "$?" in 94 | 0|1) log_end_msg 0 ;; 95 | 2) log_end_msg 1 ;; 96 | esac 97 | ;; 98 | stop) 99 | log_daemon_msg "Stopping $DESC" "$NAME" 100 | do_stop 101 | case "$?" in 102 | 0|1) log_end_msg 0 ;; 103 | 2) log_end_msg 1 ;; 104 | esac 105 | ;; 106 | status) 107 | status_of_proc "$DAEMON" "$NAME" && exit 0 || exit $? 108 | ;; 109 | restart|force-reload) 110 | log_daemon_msg "Restarting $DESC" "$NAME" 111 | do_stop 112 | case "$?" in 113 | 0|1) 114 | do_start 115 | case "$?" in 116 | 0) log_end_msg 0 ;; 117 | 1) log_end_msg 1 ;; # Old process is still running 118 | *) log_end_msg 1 ;; # Failed to start 119 | esac 120 | ;; 121 | *) 122 | # Failed to stop 123 | log_end_msg 1 124 | ;; 125 | esac 126 | ;; 127 | *) 128 | echo "Usage: $SCRIPTNAME {start|stop|status|restart|force-reload}" >&2 129 | exit 3 130 | ;; 131 | esac 132 | 133 | : 134 | -------------------------------------------------------------------------------- /owamp/owamp/unibuild-packaging/deb/twamp-server.install: -------------------------------------------------------------------------------- 1 | #! /usr/bin/dh-exec 2 | usr/share/man/man5/twamp-server.conf.5 3 | usr/share/man/man5/twamp-server.limits.5 4 | usr/share/man/man5/twamp-server.pfs.5 5 | usr/share/man/man8/twampd.8 6 | usr/bin/twampd usr/sbin 7 | conf/twampd.limits => etc/twamp-server/twamp-server.limits 8 | conf/twampd.rpm.conf => etc/twamp-server/twamp-server.conf 9 | debian/apparmor/usr.sbin.twampd etc/apparmor.d 10 | -------------------------------------------------------------------------------- /owamp/owamp/unibuild-packaging/deb/twamp-server.postinst: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # postinst script for twamp-server 3 | # 4 | # see: dh_installdeb(1) 5 | 6 | set -e 7 | 8 | # summary of how this script can be called: 9 | # * `configure' 10 | # * `abort-upgrade' 11 | # * `abort-remove' `in-favour' 12 | # 13 | # * `abort-remove' 14 | # * `abort-deconfigure' `in-favour' 15 | # `removing' 16 | # 17 | # for details, see http://www.debian.org/doc/debian-policy/ or 18 | # the debian-policy package 19 | 20 | 21 | case "$1" in 22 | configure) 23 | if [ -d /etc/twampd ]; then 24 | rmdir --ignore-fail-on-non-empty /etc/twampd 25 | fi 26 | 27 | if ! getent passwd twamp > /dev/null ; then 28 | adduser --system --group --home /var/lib/twamp --quiet \ 29 | --no-create-home --disabled-login twamp 30 | fi 31 | 32 | install -d -otwamp -gtwamp -m750 /var/lib/twamp 33 | ;; 34 | 35 | abort-upgrade|abort-remove|abort-deconfigure) 36 | ;; 37 | 38 | *) 39 | echo "postinst called with unknown argument \`$1'" >&2 40 | exit 1 41 | ;; 42 | esac 43 | 44 | # dh_installdeb will replace this with shell code automatically 45 | # generated by other debhelper scripts. 46 | 47 | #DEBHELPER# 48 | 49 | exit 0 50 | -------------------------------------------------------------------------------- /owamp/owamp/unibuild-packaging/deb/twamp-server.postrm: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # postrm script for twamp-server 3 | # 4 | # see: dh_installdeb(1) 5 | 6 | set -e 7 | 8 | # summary of how this script can be called: 9 | # * `remove' 10 | # * `purge' 11 | # * `upgrade' 12 | # * `failed-upgrade' 13 | # * `abort-install' 14 | # * `abort-install' 15 | # * `abort-upgrade' 16 | # * `disappear' 17 | # 18 | # for details, see http://www.debian.org/doc/debian-policy/ or 19 | # the debian-policy package 20 | 21 | 22 | case "$1" in 23 | purge) 24 | deluser --system --quiet twamp || true 25 | rm -rf /var/lib/twamp/ 26 | ;; 27 | 28 | remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear) 29 | ;; 30 | 31 | *) 32 | echo "postrm called with unknown argument \`$1'" >&2 33 | exit 1 34 | ;; 35 | esac 36 | 37 | # dh_installdeb will replace this with shell code automatically 38 | # generated by other debhelper scripts. 39 | 40 | #DEBHELPER# 41 | 42 | exit 0 43 | -------------------------------------------------------------------------------- /owamp/owamp/unibuild-packaging/deb/twamp-server.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=TWAMP server 3 | After=network.target 4 | 5 | [Service] 6 | Type=forking 7 | PIDFile=/var/run/twamp-server.pid 8 | ExecStart=/usr/sbin/twampd -c /etc/twamp-server -R /var/run 9 | LimitNOFILE=4096 10 | Restart=on-failure 11 | 12 | [Install] 13 | WantedBy=multi-user.target 14 | -------------------------------------------------------------------------------- /owamp/owamp/unibuild-packaging/owamp-00-root-test.patch: -------------------------------------------------------------------------------- 1 | diff -rupN owamp-orig/test/e2e_utils.c owamp/test/e2e_utils.c 2 | --- owamp-orig/test/e2e_utils.c 2023-01-23 16:39:27.329553470 +0000 3 | +++ owamp/test/e2e_utils.c 2023-01-23 16:40:34.734731960 +0000 4 | @@ -125,6 +125,7 @@ int launch_xwampd( 5 | protocol == OWAMP ? "../owampd/owampd" : "../owampd/twampd", 6 | "-c", config_dir, 7 | "-R", config_dir, 8 | + "-f", 9 | "-v", 10 | "-Z", 11 | "-f", 12 | -------------------------------------------------------------------------------- /unibuild-order: -------------------------------------------------------------------------------- 1 | changequote()dnl 2 | changecom()dnl 3 | # 4 | # Build Order for pScheduler Packages for use with Unibuild 5 | # 6 | 7 | # Packages must be listed in an order where dependent packages are 8 | # built after their dependencies. 9 | # 10 | # Options that can be added to a package line: 11 | # 12 | # --bundle b Include the package in bundle b and not the default 13 | # full bundle. 14 | # 15 | # Note that there is no need to make decisions for RPM- or Debian-only 16 | # builds in this file; if there is no packaging information for an OS 17 | # family in with the sources, it will not be built. 18 | # 19 | 20 | owamp 21 | --------------------------------------------------------------------------------