├── .env ├── .gitignore ├── .gitlab-ci.yml ├── .mailmap ├── .travis.yml ├── MAINTAINERS ├── Makefile.in ├── README.md ├── check_maintainers.py ├── ci ├── build-all └── build-kernel ├── common ├── .gitignore ├── ker-numtables.c └── serdes-utils.c ├── configure ├── include └── irati │ ├── kernel-msg.h │ ├── kucommon.h │ └── serdes-utils.h ├── kernel ├── .gitignore ├── Makefile.in ├── buffer.c ├── buffer.h ├── cidm.c ├── cidm.h ├── common.c ├── common.h ├── configure ├── connection.c ├── connection.h ├── core.c ├── ctrldev.c ├── ctrldev.h ├── debug.h ├── default-plugin.c ├── delim-ps-default.c ├── delim-ps-default.h ├── delim-ps.h ├── delim.c ├── delim.h ├── dtcp-conf-utils.c ├── dtcp-conf-utils.h ├── dtcp-ps-default.c ├── dtcp-ps-default.h ├── dtcp-ps.h ├── dtcp.c ├── dtcp.h ├── dtp-conf-utils.c ├── dtp-conf-utils.h ├── dtp-ps-default.c ├── dtp-ps-default.h ├── dtp-ps.h ├── dtp-utils.c ├── dtp-utils.h ├── dtp.c ├── dtp.h ├── du.c ├── du.h ├── efcp-str.h ├── efcp-utils.c ├── efcp-utils.h ├── efcp.c ├── efcp.h ├── iodev.c ├── iodev.h ├── ipcp-factories.c ├── ipcp-factories.h ├── ipcp-instances.c ├── ipcp-instances.h ├── ipcp-utils.c ├── ipcp-utils.h ├── ipcps │ ├── Makefile.in │ ├── load.sh │ ├── normal-ipcp.c │ ├── normal-ipcp.mod │ ├── shim-eth-core.c │ ├── shim-eth.mod │ ├── shim-hv-core.c │ ├── shim-tcp-udp.c │ ├── shim-tcp-udp.mod │ ├── unload.sh │ └── vmpi-bufs.c ├── kfa-utils.c ├── kfa-utils.h ├── kfa.c ├── kfa.h ├── kipcm-utils.c ├── kipcm-utils.h ├── kipcm.c ├── kipcm.h ├── logs.h ├── pci.c ├── pci.h ├── pff-ps-default.c ├── pff-ps-default.h ├── pff-ps.h ├── pff.c ├── pff.h ├── pidm.c ├── pidm.h ├── pim.c ├── pim.h ├── policies.c ├── policies.h ├── ps-factory.c ├── ps-factory.h ├── rds │ ├── rbmp.c │ ├── rbmp.h │ ├── rds.c │ ├── rds.h │ ├── rfifo.c │ ├── rfifo.h │ ├── ringq.c │ ├── ringq.h │ ├── rmap.c │ ├── rmap.h │ ├── rmem.c │ ├── rmem.h │ ├── robjects.c │ ├── robjects.h │ ├── rqueue.c │ ├── rqueue.h │ ├── rref.c │ ├── rref.h │ ├── rstr.c │ ├── rstr.h │ ├── rtimer.c │ ├── rtimer.h │ ├── rwq.c │ └── rwq.h ├── rina-default-plugin.mod ├── rina-device.c ├── rina-device.h ├── rina-irati-core.mod ├── rinarp │ ├── Makefile.in │ ├── arp826-arm.c │ ├── arp826-arm.h │ ├── arp826-core.c │ ├── arp826-maps.c │ ├── arp826-maps.h │ ├── arp826-rxtx.c │ ├── arp826-rxtx.h │ ├── arp826-tables.c │ ├── arp826-tables.h │ ├── arp826-utils.c │ ├── arp826-utils.h │ ├── arp826.h │ ├── arp826.mod │ ├── rinarp.c │ ├── rinarp.h │ └── rinarp.mod ├── rmt-ps-default.c ├── rmt-ps-default.h ├── rmt-ps.h ├── rmt.c ├── rmt.h ├── sdup-crypto-ps-default.c ├── sdup-crypto-ps-default.h ├── sdup-crypto-ps.h ├── sdup-errc-ps-default.c ├── sdup-errc-ps-default.h ├── sdup-errc-ps.h ├── sdup-ttl-ps-default.c ├── sdup-ttl-ps-default.h ├── sdup-ttl-ps.h ├── sdup.c ├── sdup.h ├── utils.c ├── utils.h └── vmpi │ ├── Makefile.in │ ├── prepare-guest-kvm.sh │ ├── prepare-guest-xen.sh │ ├── prepare-host-kvm.sh │ ├── prepare-host-xen.sh │ ├── unprepare-guest-kvm.sh │ ├── unprepare-guest-xen.sh │ ├── unprepare-host-kvm.sh │ ├── unprepare-host-xen.sh │ ├── update-rina-vmpi.sh │ ├── vmpi-bufs.h │ ├── vmpi-guest-impl-kvm.c │ ├── vmpi-guest-impl-xen.c │ ├── vmpi-guest-impl.h │ ├── vmpi-guest.c │ ├── vmpi-host-impl-kvm.c │ ├── vmpi-host-impl-xen.c │ ├── vmpi-host-impl.h │ ├── vmpi-host.c │ ├── vmpi-iovec.c │ ├── vmpi-iovec.h │ ├── vmpi-provider.c │ ├── vmpi-stats.c │ ├── vmpi-stats.h │ ├── vmpi-test.c │ ├── vmpi.h │ ├── xen-mpi-back-common.h │ ├── xen-mpi-back-interface.c │ ├── xen-mpi-back-xenbus.c │ └── xen-mpi-ioring.h ├── librina ├── .changelog-amend ├── .gitignore ├── .mailmap ├── INSTALL ├── LICENSE ├── LICENSE-protobuf ├── Makefile.am ├── README ├── README.md ├── bootstrap ├── build-aux │ ├── .gitignore │ ├── git-version-gen │ └── gitlog-to-changelog ├── configure.ac ├── doc │ ├── .gitignore │ ├── Makefile.am │ ├── Makefile.inc │ ├── doxygen.cfg.in │ └── installation-prerequisites.md ├── include │ ├── .gitignore │ ├── Makefile.am │ └── librina │ │ ├── Makefile.am │ │ ├── application.h │ │ ├── cdap_rib_structures.h │ │ ├── cdap_v2.h │ │ ├── common.h │ │ ├── concurrency.h │ │ ├── configuration.h │ │ ├── console.h │ │ ├── enrollment.h │ │ ├── exceptions.h │ │ ├── faux-sockets.h │ │ ├── internal-events.h │ │ ├── ipc-api.h │ │ ├── ipc-daemons.h │ │ ├── ipc-manager.h │ │ ├── ipc-process.h │ │ ├── irm.h │ │ ├── librina.h │ │ ├── likely.h │ │ ├── logs.h │ │ ├── patterns.h │ │ ├── plugin-info.h │ │ ├── rib_v2.h │ │ ├── sdu-protection.h │ │ ├── security-manager.h │ │ ├── time.h │ │ ├── timer.h │ │ └── tlshand-authp.h ├── m4 │ ├── .gitignore │ ├── ax_check_compile_flag.m4 │ ├── ax_compare_version.m4 │ ├── ax_have_syscall.m4 │ ├── ax_jni_include_dir.m4 │ ├── ax_pkg_swig.m4 │ ├── ax_prog_doxygen.m4 │ ├── ax_prog_jar.m4 │ ├── ax_prog_javac.m4 │ ├── ax_prog_javac_works.m4 │ ├── ax_selector_disable.m4 │ └── ax_selector_enable.m4 ├── src │ ├── .gitignore │ ├── CDAP.proto │ ├── Makefile.am │ ├── Makefile.inc │ ├── application.cc │ ├── auth-policies.proto │ ├── cdap_v2.cc │ ├── common.cc │ ├── concurrency.cc │ ├── configuration.cc │ ├── console.cc │ ├── core.cc │ ├── core.h │ ├── ctrl.c │ ├── ctrl.h │ ├── exceptions.cc │ ├── faux-sockets.cc │ ├── internal-events.cc │ ├── ipc-api.cc │ ├── ipc-daemons.cc │ ├── ipc-manager.cc │ ├── ipc-process.cc │ ├── irm.cc │ ├── irm.proto │ ├── jsoncpp │ │ ├── json │ │ │ ├── autolink.h │ │ │ ├── config.h │ │ │ ├── features.h │ │ │ ├── forwards.h │ │ │ ├── json.h │ │ │ ├── reader.h │ │ │ ├── value.h │ │ │ └── writer.h │ │ ├── json_batchallocator.h │ │ ├── json_internalarray.inl │ │ ├── json_internalmap.inl │ │ ├── json_reader.cpp │ │ ├── json_value.cpp │ │ ├── json_valueiterator.inl │ │ └── json_writer.cpp │ ├── librina.cc │ ├── librina.pc.in │ ├── librinajsoncpp.pc.in │ ├── logs.cc │ ├── plugin-info.cc │ ├── proto2inc │ ├── rib_v2.cc │ ├── sdu-protection.cc │ ├── security-manager.cc │ ├── test-linking.cc │ ├── test-rib.cc │ ├── time.cc │ ├── timer.cc │ ├── tlshand-authp.cc │ ├── utils.cc │ └── utils.h ├── test │ ├── .gitignore │ ├── Makefile.am │ ├── Makefile.inc │ ├── SWIGTest.java │ ├── run-java.in │ ├── test-01.cc │ ├── test-02.cc │ ├── test-03.cc │ ├── test-concurrency.cc │ ├── test-parsers.cc │ └── test-timer.cc └── wrap │ ├── .gitignore │ ├── Makefile.am │ ├── librina.i │ ├── rina-api │ ├── Makefile.am │ ├── include │ │ ├── Makefile.am │ │ └── rina │ │ │ ├── Makefile.am │ │ │ └── api.h │ ├── java │ │ └── Makefile.am │ ├── rinapi.i │ └── src │ │ ├── Makefile.am │ │ ├── librina-api.pc.in │ │ └── rina-api.cc │ └── stdlist.i ├── load-irati-modules ├── misc ├── code-stats ├── emacs │ └── emacs ├── switch_license └── vim │ └── vimrc ├── plugins ├── Makefile ├── cong_avoidance │ ├── .gitignore │ ├── Makefile │ ├── cas-plugin-ps.c │ ├── cas-plugin.manifest │ ├── cas-plugin.mod │ ├── dtcp-ps-cas.c │ └── rmt-ps-cas.c ├── dctcp │ ├── .gitignore │ ├── Makefile │ ├── README.md │ ├── dctcp-plugin-ps.c │ ├── dctcp-plugin.manifest │ ├── dctcp-plugin.mod │ ├── dtcp-ps-dctcp.c │ └── rmt-ps-dctcp.c ├── dummy │ ├── .gitignore │ ├── Makefile │ ├── dtcp-ps-dummy.c │ ├── dtp-ps-dummy.c │ ├── dummy-plugin-ps.c │ ├── dummy-plugin.mod │ ├── pft-ps-dummy.c │ └── rmt-ps-dummy.c ├── example-sm-plugin │ ├── .gitignore │ ├── Makefile │ ├── plugin.cc │ ├── sm-example.cc │ └── sm-example.manifest ├── lfa │ ├── .gitignore │ ├── Makefile │ ├── pff-lfa.manifest │ ├── pff-lfa.mod │ └── ps.c ├── multipath │ ├── .gitignore │ ├── Makefile │ ├── mp-plugin-ps.c │ ├── pff-multipath.manifest │ ├── pff-multipath.mod │ └── pff-ps-multipath.c ├── qta_mux │ ├── .gitignore │ ├── Makefile │ ├── README.md │ ├── qta-mux-debug.c │ ├── qta-mux-debug.h │ ├── qta-mux-plugin.manifest │ ├── qta-mux-plugin.mod │ └── qta-mux.c ├── rdsr-ps │ ├── Makefile │ ├── README │ ├── cdrr │ │ ├── .gitignore │ │ ├── Makefile │ │ ├── README │ │ ├── cdrr.manifest │ │ ├── dtcp-ps-cdrr.c │ │ └── dtcp-ps-cdrr.mod │ ├── ecn │ │ ├── .gitignore │ │ ├── Makefile │ │ ├── README │ │ ├── ecn.manifest │ │ ├── rmt-ps-ecn.c │ │ └── rmt-ps-ecn.mod │ ├── fare │ │ ├── .gitignore │ │ ├── Makefile │ │ ├── README │ │ ├── fa-ps-fare.cpp │ │ └── fare.manifest │ └── pffb │ │ ├── .gitignore │ │ ├── Makefile │ │ ├── README │ │ ├── pff-ps-pffb.c │ │ ├── pff-ps-pffb.mod │ │ └── pffb.manifest └── red │ ├── .gitignore │ ├── Makefile │ ├── dtcp-ps-debug.c │ ├── dtcp-ps-debug.h │ ├── dtcp-ps-red.c │ ├── red-plugin.manifest │ ├── red-plugin.mod │ ├── red-ps.c │ ├── rmt-ps-debug.c │ ├── rmt-ps-debug.h │ └── rmt-ps-red.c ├── rina-tools ├── .changelog-amend ├── .gitignore ├── INSTALL ├── LICENSE ├── Makefile.am ├── README ├── README.md ├── bootstrap ├── build-aux │ ├── .gitignore │ ├── git-version-gen │ └── gitlog-to-changelog ├── configure.ac ├── doc │ ├── Makefile.am │ └── installation-prerequisites.md ├── m4 │ ├── .gitignore │ ├── ax_check_compile_flag.m4 │ ├── ax_prog_java.m4 │ ├── ax_prog_java_works.m4 │ ├── ax_python_module.m4 │ └── ax_selector_enable.m4 └── src │ ├── .gitignore │ ├── Makefile.am │ ├── common │ ├── Makefile.am │ ├── application.cc │ ├── application.h │ ├── server.cc │ ├── server.h │ ├── tclap │ │ ├── Arg.h │ │ ├── ArgException.h │ │ ├── ArgTraits.h │ │ ├── CmdLine.h │ │ ├── CmdLineInterface.h │ │ ├── CmdLineOutput.h │ │ ├── Constraint.h │ │ ├── DocBookOutput.h │ │ ├── HelpVisitor.h │ │ ├── IgnoreRestVisitor.h │ │ ├── Makefile.am │ │ ├── MultiArg.h │ │ ├── MultiSwitchArg.h │ │ ├── OptionalUnlabeledTracker.h │ │ ├── StandardTraits.h │ │ ├── StdOutput.h │ │ ├── SwitchArg.h │ │ ├── UnlabeledMultiArg.h │ │ ├── UnlabeledValueArg.h │ │ ├── ValueArg.h │ │ ├── ValuesConstraint.h │ │ ├── VersionVisitor.h │ │ ├── Visitor.h │ │ ├── XorHandler.h │ │ └── ZshCompletionOutput.h │ ├── utils.cc │ └── utils.h │ ├── irati-ctl │ ├── key-managers │ ├── Makefile.am │ ├── Makefile.inc │ ├── ckm.cc │ ├── ckm.h │ ├── km-common.cc │ ├── km-common.h │ ├── km.proto │ ├── kma.cc │ ├── kma.h │ └── main.cc │ ├── mac2ifname │ ├── Makefile.am │ └── mac2ifname.c │ ├── manager │ ├── Makefile.am │ ├── Makefile.inc │ ├── dif-template-manager.cc │ ├── dif-template-manager.h │ ├── main.cc │ ├── mgr-ctl │ ├── net-manager.cc │ ├── net-manager.h │ ├── nm.proto │ └── promise.cc │ ├── rina-bug-report.in │ ├── rina-mem-stats.py │ ├── rina-show-plots.py │ ├── rina-wrap │ ├── rinacat │ ├── Makefile.am │ ├── README.md │ └── rinacat.c │ ├── rinaperf-client-loop.in │ ├── rlite │ ├── CDAP.proto │ ├── Makefile.am │ ├── Makefile.inc │ ├── README │ ├── cdap.cpp │ ├── cdap.hpp │ ├── cpputils.hpp │ ├── fdfwd.cpp │ ├── fdfwd.hpp │ ├── iporina.proto │ ├── iporinad.cpp │ ├── proto2inc │ ├── rina-echo-async.c │ ├── rina-gw.cpp │ └── rinaperf.c │ ├── tgen-apps │ ├── Makefile.am │ ├── README.md │ ├── ra_base_client.h │ ├── ra_base_server.h │ ├── ra_commons.h │ ├── test_client_base.h │ ├── test_commons.h │ ├── tg-client.cpp │ └── tg-server.cpp │ └── util-scripts │ ├── process_qta_test.sh │ ├── qta-port-monitor.sh │ └── rmt-port-monitor.sh ├── rinad ├── .changelog-amend ├── .gitignore ├── INSTALL ├── LICENSE ├── LICENSE-jsoncpp ├── LICENSE-protobuf ├── LICENSE-tclap ├── Makefile.am ├── README ├── README.md ├── bootstrap ├── build-aux │ ├── .gitignore │ ├── git-version-gen │ └── gitlog-to-changelog ├── configure.ac ├── doc │ └── Makefile.am ├── etc │ ├── .gitignore │ ├── Makefile.am │ ├── da.map.orig │ ├── default.dif.orig │ ├── ipcmanager.conf.orig.in │ ├── shim-eth-vlan.dif.orig │ └── wpa_supplicant.conf.orig.in ├── m4 │ ├── .gitignore │ ├── ax_check_compile_flag.m4 │ ├── ax_compare_version.m4 │ ├── ax_jni_include_dir.m4 │ ├── ax_pkg_swig.m4 │ ├── ax_prog_jar.m4 │ ├── ax_prog_javac.m4 │ ├── ax_prog_javac_works.m4 │ └── ax_selector_enable.m4 ├── src │ ├── .gitignore │ ├── Makefile.am │ ├── TODO │ ├── common │ │ ├── .gitignore │ │ ├── Makefile.am │ │ ├── concurrency.h │ │ ├── configuration.cc │ │ ├── configuration.h │ │ ├── debug.cc │ │ ├── debug.h │ │ ├── encoder.cc │ │ ├── encoder.h │ │ ├── encoders │ │ │ ├── .gitignore │ │ │ ├── ApplicationProcessNamingInfoMessage.proto │ │ │ ├── CommonMessages.proto │ │ │ ├── ConnectionPoliciesMessage.proto │ │ │ ├── DIFAllocatorMessages.proto │ │ │ ├── DataTransferConstantsMessage.proto │ │ │ ├── DirectoryForwardingTableEntryArrayMessage.proto │ │ │ ├── DirectoryForwardingTableEntryMessage.proto │ │ │ ├── EnrollmentInformationMessage.proto │ │ │ ├── FlowMessage.proto │ │ │ ├── FlowStateGroupMessage.proto │ │ │ ├── FlowStateMessage.proto │ │ │ ├── MA-IPCP.proto │ │ │ ├── Makefile.am │ │ │ ├── Makefile.inc │ │ │ ├── NeighborArrayMessage.proto │ │ │ ├── NeighborMessage.proto │ │ │ ├── PolicyDescriptorMessage.proto │ │ │ ├── QoSCubeArrayMessage.proto │ │ │ ├── QoSCubeMessage.proto │ │ │ ├── QoSSpecification.proto │ │ │ ├── RIBObjectData.proto │ │ │ ├── RoutingForwarding.proto │ │ │ ├── WhatevercastNameArrayMessage.proto │ │ │ ├── WhatevercastNameMessage.proto │ │ │ └── proto2inc │ │ ├── librinad.pc.in │ │ ├── rina-configuration.cc │ │ ├── rina-configuration.h │ │ └── tclap │ │ │ ├── Arg.h │ │ │ ├── ArgException.h │ │ │ ├── ArgTraits.h │ │ │ ├── CmdLine.h │ │ │ ├── CmdLineInterface.h │ │ │ ├── CmdLineOutput.h │ │ │ ├── Constraint.h │ │ │ ├── DocBookOutput.h │ │ │ ├── HelpVisitor.h │ │ │ ├── IgnoreRestVisitor.h │ │ │ ├── Makefile.am │ │ │ ├── MultiArg.h │ │ │ ├── MultiSwitchArg.h │ │ │ ├── OptionalUnlabeledTracker.h │ │ │ ├── StandardTraits.h │ │ │ ├── StdOutput.h │ │ │ ├── SwitchArg.h │ │ │ ├── UnlabeledMultiArg.h │ │ │ ├── UnlabeledValueArg.h │ │ │ ├── ValueArg.h │ │ │ ├── ValuesConstraint.h │ │ │ ├── VersionVisitor.h │ │ │ ├── Visitor.h │ │ │ ├── XorHandler.h │ │ │ └── ZshCompletionOutput.h │ ├── ipcm │ │ ├── .cf_version │ │ ├── .gitignore │ │ ├── Makefile.am │ │ ├── addon.cc │ │ ├── addon.h │ │ ├── addons │ │ │ ├── Makefile.am │ │ │ ├── console.cc │ │ │ ├── console.h │ │ │ ├── ma │ │ │ │ ├── Makefile.am │ │ │ │ ├── agent.cc │ │ │ │ ├── agent.h │ │ │ │ ├── bgtm.cc │ │ │ │ ├── bgtm.h │ │ │ │ ├── confm.cc │ │ │ │ ├── confm.h │ │ │ │ ├── flowm.cc │ │ │ │ ├── flowm.h │ │ │ │ ├── ribf.cc │ │ │ │ ├── ribf.h │ │ │ │ ├── ribs │ │ │ │ │ ├── Makefile.am │ │ │ │ │ ├── ipcp_obj.cc │ │ │ │ │ ├── ipcp_obj.h │ │ │ │ │ ├── ribd_v1.cc │ │ │ │ │ └── ribd_v1.h │ │ │ │ └── tests │ │ │ │ │ └── commmTest.cc │ │ │ ├── mobility-manager.cc │ │ │ ├── mobility-manager.h │ │ │ ├── scripting.cc │ │ │ └── scripting.h │ │ ├── app-handlers.cc │ │ ├── app-handlers.h │ │ ├── catalog.cc │ │ ├── catalog.h │ │ ├── configuration.cc │ │ ├── configuration.h │ │ ├── dif-allocator.cc │ │ ├── dif-allocator.h │ │ ├── dif-template-manager.cc │ │ ├── dif-template-manager.h │ │ ├── dif-validator.cc │ │ ├── dif-validator.h │ │ ├── flow-alloc-handlers.cc │ │ ├── flow-alloc-handlers.h │ │ ├── helpers.cc │ │ ├── include │ │ │ ├── Makefile.am │ │ │ └── ipcm │ │ │ │ ├── Makefile.am │ │ │ │ └── policy.h │ │ ├── ip-vpn-manager.cc │ │ ├── ip-vpn-manager.h │ │ ├── ipcm.cc │ │ ├── ipcm.h │ │ ├── ipcp-handlers.cc │ │ ├── ipcp-handlers.h │ │ ├── ipcp.cc │ │ ├── ipcp.h │ │ ├── main.cc │ │ ├── misc-handlers.cc │ │ ├── misc-handlers.h │ │ ├── policies-handlers.cc │ │ ├── process-event-listener.cc │ │ ├── process-event-listener.h │ │ ├── rinad-ipcm.pc.in │ │ └── test-empty.cc │ └── ipcp │ │ ├── .gitignore │ │ ├── Makefile.am │ │ ├── components.cc │ │ ├── components.h │ │ ├── enrollment-task.cc │ │ ├── enrollment-task.h │ │ ├── flow-allocator.cc │ │ ├── flow-allocator.h │ │ ├── ipc-process.cc │ │ ├── ipc-process.h │ │ ├── ipcp-logging.h │ │ ├── ipcp-plugins.in │ │ ├── main.cc │ │ ├── namespace-manager.cc │ │ ├── namespace-manager.h │ │ ├── normal-ipc-process.cc │ │ ├── plugins │ │ ├── Makefile.am │ │ ├── default │ │ │ ├── Makefile.am │ │ │ ├── default.manifest │ │ │ ├── enrollment-task-ps.cc │ │ │ ├── flow-allocator-ps.cc │ │ │ ├── namespace-manager-ps.cc │ │ │ ├── plugin.cc │ │ │ ├── resource-allocator-ps.cc │ │ │ ├── rina-default-plugin.manifest │ │ │ ├── routing-ps.cc │ │ │ ├── routing-ps.h │ │ │ ├── security-manager-ps.cc │ │ │ ├── static-routing-ps.cc │ │ │ ├── test-encoders.cc │ │ │ └── test-routing.cc │ │ ├── nsm-address-change │ │ │ ├── Makefile.am │ │ │ ├── nsm-address-change-plugin.cc │ │ │ └── nsm-address-change.manifest │ │ ├── sm-auth-psoc │ │ │ ├── Makefile.am │ │ │ ├── sm-auth-psoc-plugin.cc │ │ │ └── sm-auth-psoc.manifest │ │ ├── sm-cbac │ │ │ ├── Makefile.am │ │ │ ├── Makefile.inc │ │ │ ├── proto2inc │ │ │ ├── security-manager-cbac.cc │ │ │ ├── security-manager-cbac.h │ │ │ ├── sm-cbac-plugin.cc │ │ │ ├── sm-cbac.manifest │ │ │ └── sm-cbac.proto │ │ └── sm-passwd │ │ │ ├── Makefile.am │ │ │ ├── security-manager-passwd.cc │ │ │ └── sm-passwd.manifest │ │ ├── resource-allocator.cc │ │ ├── resource-allocator.h │ │ ├── rib-daemon.cc │ │ ├── rib-daemon.h │ │ ├── rinad-ipcp.pc.in │ │ ├── routing.cc │ │ ├── security-manager.cc │ │ ├── shim-wifi │ │ ├── shim-wifi-ipc-process.cc │ │ ├── shim-wifi-ipc-process.h │ │ ├── wpa_controller.cc │ │ ├── wpa_controller.h │ │ └── wpa_supplicant │ │ │ ├── build_config.h │ │ │ ├── common.h │ │ │ ├── includes.h │ │ │ ├── os.h │ │ │ ├── os_unix.c │ │ │ ├── wpa_ctrl.c │ │ │ ├── wpa_ctrl.h │ │ │ ├── wpa_debug.h │ │ │ └── wpabuf.h │ │ ├── test-encoders.cc │ │ ├── utils.cc │ │ └── utils.h ├── tools │ ├── .gitignore │ ├── Makefile.am │ └── backtrace-demangler.in └── wrap │ ├── Makefile.am │ ├── java │ └── Makefile.am │ ├── librina.i │ ├── librinad.i │ └── stdlist.i ├── tests ├── README-tests.md ├── conf │ ├── da.map │ ├── default.dif │ ├── format_config_files.sh │ ├── ipcmanager.conf-appovereth │ ├── ipcmanager.conf-appovershimhv │ ├── ipcmanager.conf-appovertcpudp │ ├── ipcmanager.conf-mad │ ├── ipcmanager.conf-normalovereth1 │ ├── ipcmanager.conf-normalovereth2 │ ├── ipcmanager.conf-normalovernormalovereth1 │ ├── ipcmanager.conf-normalovernormalovereth2 │ ├── ipcmanager.conf-normalovershimhv1 │ ├── ipcmanager.conf-normalovershimhv2 │ ├── ipcmanager.conf-normalovertcpudp1 │ ├── ipcmanager.conf-normalovertcpudp2 │ ├── ipcp-qta-mux.dif │ ├── security-tls.dif │ ├── security.dif │ ├── security2.dif │ ├── shim-eth-vlan.dif │ ├── shim-eth-vlan2.dif │ ├── shim-hv.dif │ ├── shim-hv2.dif │ ├── shim-tcp-udp.dif │ ├── vm-to-vm.dif │ ├── vm-to-vm │ │ ├── ipcmanager.conf-pm │ │ ├── ipcmanager.conf-vm.1 │ │ └── ipcmanager.conf-vm.2 │ ├── vpn.dif │ ├── vpn │ │ ├── ipcmanager.conf-pm.i2cat │ │ ├── ipcmanager.conf-pm.nxw │ │ ├── ipcmanager.conf-vm.i2cat │ │ └── ipcmanager.conf-vm.nxw │ └── vpn2.dif └── rinarp.py └── unload-irati-modules /.env: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # -*- sh -*- 3 | 4 | # 5 | # Written by: Francesco Salvestrini 6 | # 7 | 8 | # 9 | # This file contains scripts-wide parameters 10 | # 11 | 12 | BUILDDIR=`pwd`/build 13 | MAKEFLAGS="-j1" 14 | 15 | if test -z "$ME" ; then 16 | echo "File badly sourced !!!" 17 | exit 1 18 | fi 19 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | /inst 3 | tags 4 | Makefile 5 | 6 | /include/.autotools 7 | /include/.cproject 8 | /include/.project 9 | /include/.settings/ 10 | 11 | /plugins/.autotools 12 | /plugins/.cproject 13 | /plugins/.project 14 | /plugins/.settings/ 15 | -------------------------------------------------------------------------------- /.gitlab-ci.yml: -------------------------------------------------------------------------------- 1 | stages: 2 | - buildstack 3 | 4 | before_script: 5 | - mkdir build 6 | - mkdir install 7 | 8 | after_script: 9 | - sudo chown -R gitlab-runner:gitlab-runner . 10 | 11 | build_stack: 12 | stage: buildstack 13 | script: 14 | - sudo ./configure --prefix ~/install 15 | - cd build/librina 16 | - sudo make check-functional 17 | - cd ../.. 18 | - sudo make install 19 | - cd build/rinad 20 | - sudo make check 21 | -------------------------------------------------------------------------------- /Makefile.in: -------------------------------------------------------------------------------- 1 | KERNBUILDDIR=@KERNBUILDDIR@ 2 | INSTALLDIR=@INSTALLDIR@ 3 | MAKEFLAGS="-j1" 4 | 5 | all: ker librina rinad rinatools plugins 6 | 7 | ker: 8 | cd kernel && $(MAKE) 9 | 10 | librina: 11 | cd build/librina && $(MAKE) $(MAKEFLAGS) 12 | 13 | rinad: 14 | cd build/rinad && $(MAKE) $(MAKEFLAGS) 15 | 16 | rinatools: 17 | cd build/rina-tools && $(MAKE) $(MAKEFLAGS) 18 | 19 | plugins: 20 | cd plugins && $(MAKE) $(MAKEFLAGS) INSTALLDIR=$(INSTALLDIR) KDIR=$(KERNBUILDDIR) 21 | 22 | clean: ker_clean librina_clean rinad_clean rinatools_clean plugins_clean 23 | 24 | ker_clean: 25 | cd kernel && $(MAKE) clean 26 | 27 | librina_clean: 28 | cd build/librina && $(MAKE) clean 29 | 30 | rinad_clean: 31 | cd build/rinad && $(MAKE) clean 32 | 33 | rinatools_clean: 34 | cd build/rina-tools && $(MAKE) clean 35 | 36 | plugins_clean: 37 | cd plugins && $(MAKE) clean KDIR=$(KERNBUILDDIR) INSTALLDIR=$(INSTALLDIR) 38 | 39 | install: ker_install librina_install rinad_install rinatools_install plugins_install 40 | 41 | ker_install: 42 | cd kernel && $(MAKE) && $(MAKE) install 43 | 44 | librina_install: 45 | cd build/librina && $(MAKE) install installcheck 46 | 47 | rinad_install: 48 | cd build/rinad && $(MAKE) install installcheck 49 | 50 | rinatools_install: 51 | cd build/rina-tools && $(MAKE) install installcheck 52 | 53 | plugins_install: 54 | cd plugins && $(MAKE) KDIR=$(KERNBUILDDIR) INSTALLDIR=$(INSTALLDIR) && $(MAKE) install KDIR=$(KERNBUILDDIR) INSTALLDIR=$(INSTALLDIR) 55 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IRATI/stack/726b535c908f8a74e8c68dd493cfbb1bd8726546/README.md -------------------------------------------------------------------------------- /ci/build-all: -------------------------------------------------------------------------------- 1 | #!/bin/bash -e 2 | 3 | export INSTALL_PREFIX=~/install 4 | export PKG_CONFIG_PATH=$INSTALL_PREFIX/lib/pkgconfig 5 | export LD_LIBRARY_PATH=$INSTALL_PREFIX/lib:$LD_LIBRARY_PATH 6 | export VERSION=1.2.0 7 | 8 | # Install version 2.6.1 of Protocol Buffers 9 | wget https://github.com/google/protobuf/releases/download/v2.6.1/protobuf-2.6.1.tar.gz 10 | tar -xvzf protobuf-2.6.1.tar.gz 11 | pushd protobuf-2.6.1 12 | ./configure && make 13 | sudo make install 14 | popd 15 | sudo ldconfig 16 | 17 | # Run the IRATI stack build script 18 | mkdir build 19 | mkdir -p $INSTALL_PREFIX 20 | ./configure --prefix $INSTALL_PREFIX 21 | sudo make install 22 | cd build/librina 23 | make check-functional 24 | cd ../.. 25 | cd build/rinad 26 | sudo make check 27 | -------------------------------------------------------------------------------- /ci/build-kernel: -------------------------------------------------------------------------------- 1 | #!/bin/bash -eu 2 | 3 | readonly GCC_MAJOR_VERSION=$(echo '#include 4 | void main() { printf("%u\n", __GNUC__); }' | gcc -x c - -o /tmp/getgccversion && /tmp/getgccversion) 5 | 6 | # Fetch the kernel code 7 | wget https://www.kernel.org/pub/linux/kernel/v${KERNEL_VERSION:0:1}.x/linux-${KERNEL_VERSION}.tar.gz 8 | tar xzf linux-${KERNEL_VERSION}.tar.gz 9 | 10 | # Configure and prepare kernel 11 | pushd linux-${KERNEL_VERSION} 12 | compiler_file=compiler-gcc${GCC_MAJOR_VERSION}.h 13 | if [ ! -f include/linux/${compiler_file} -a ! -h include/linux/${compiler_file} ] 14 | then 15 | # Fix compilation of old kernels with recent GCC 16 | pushd include/linux 17 | if [ -f compiler-gcc5.h -a $GCC_MAJOR_VERSION -gt 5 ] 18 | then 19 | ln -sv compiler-gcc5.h ${compiler_file} 20 | else 21 | ln -sv compiler-gcc4.h ${compiler_file} 22 | fi 23 | popd 24 | fi 25 | make mrproper 26 | make defconfig 27 | make modules_prepare 28 | popd 29 | 30 | # Build only the kernel 31 | ./configure --kernbuilddir $PWD/linux-${KERNEL_VERSION} --no-user 32 | make ker 33 | -------------------------------------------------------------------------------- /common/.gitignore: -------------------------------------------------------------------------------- 1 | .autotools 2 | .project 3 | .cproject 4 | /.settings/ 5 | -------------------------------------------------------------------------------- /kernel/.gitignore: -------------------------------------------------------------------------------- 1 | # 2 | # NOTE! Don't add files that are generated in specific 3 | # subdirectories here. Add them in the ".gitignore" file 4 | # in that subdirectory instead. 5 | # 6 | # NOTE! Please use 'git ls-files -i --exclude-standard' 7 | # command after changing this file, to see if there are 8 | # any tracked files which get ignored after the change. 9 | # 10 | # Normal rules 11 | # 12 | .* 13 | *.o 14 | *.o.* 15 | *.a 16 | *.s 17 | *.ko 18 | *.so 19 | *.so.dbg 20 | *.mod.c 21 | *.i 22 | *.lst 23 | *.symtypes 24 | *.order 25 | *.elf 26 | *.bin 27 | *.tar 28 | *.gz 29 | *.bz2 30 | *.lzma 31 | *.xz 32 | *.lz4 33 | *.lzo 34 | *.patch 35 | *.gcno 36 | *.dwo 37 | *.symvers 38 | ker-numtables.c 39 | serdes-utils.c 40 | -------------------------------------------------------------------------------- /kernel/buffer.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Buffers 3 | * 4 | * Francesco Salvestrini 5 | * 6 | * This program is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 2 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 19 | */ 20 | 21 | #ifndef RINA_BUFFER_H 22 | #define RINA_BUFFER_H 23 | 24 | /* NOTE: Creates an uninitialized buffer (data might be garbage) */ 25 | struct buffer * buffer_create(uint32_t size); 26 | struct buffer * buffer_create_ni(uint32_t size); 27 | 28 | int buffer_destroy(struct buffer * b); 29 | 30 | /* NOTE: The following function may return -1 */ 31 | ssize_t buffer_length(const struct buffer * b); 32 | 33 | /* NOTE: Returns the raw buffer memory, watch-out ... */ 34 | const void * buffer_data_ro(const struct buffer * b); /* Read only */ 35 | 36 | #endif 37 | -------------------------------------------------------------------------------- /kernel/cidm.h: -------------------------------------------------------------------------------- 1 | /* 2 | * CIDM (CEP-IDs Manager) 3 | * 4 | * Francesco Salvestrini 5 | * Miquel Tarzan 6 | * 7 | * This program is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; either version 2 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program; if not, write to the Free Software 19 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 20 | */ 21 | 22 | #ifndef CIDM_H 23 | #define CIDM_H 24 | 25 | #include "common.h" 26 | 27 | struct cidm; 28 | 29 | struct cidm * cidm_create(void); 30 | int cidm_destroy(struct cidm * instance); 31 | 32 | cep_id_t cidm_allocate(struct cidm * instance); 33 | int cidm_release(struct cidm * instance, 34 | cep_id_t cep_id); 35 | 36 | #endif 37 | -------------------------------------------------------------------------------- /kernel/connection.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Connection 3 | * 4 | * Francesco Salvestrini 5 | * Sander Vrijders 6 | * Leonardo Bergesio 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 of the License, or 11 | * (at your option) 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, write to the Free Software 20 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 21 | */ 22 | 23 | #ifndef RINA_CONNECTION_H 24 | #define RINA_CONNECTION_H 25 | 26 | #include 27 | 28 | #include "common.h" 29 | #include "efcp-str.h" 30 | 31 | struct connection * connection_create(void); 32 | struct connection * connection_dup_from_user(const struct connection __user * c); 33 | int connection_destroy(struct connection * conn); 34 | 35 | #endif 36 | -------------------------------------------------------------------------------- /kernel/iodev.h: -------------------------------------------------------------------------------- 1 | /* 2 | * IRATI I/O device 3 | * 4 | * Vincenzo Maffione 5 | * 6 | * This program is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 2 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 19 | */ 20 | 21 | #ifndef IRATI_IODEV_H 22 | #define IRATI_IODEV_H 23 | 24 | #include 25 | 26 | int iodev_init(void); 27 | void iodev_fini(void); 28 | 29 | struct iowaitqs { 30 | wait_queue_head_t read_wqueue; 31 | wait_queue_head_t write_wqueue; 32 | }; 33 | 34 | #endif 35 | -------------------------------------------------------------------------------- /kernel/ipcps/Makefile.in: -------------------------------------------------------------------------------- 1 | # 2 | # Makefile for RINA IPC Processes (IPCPS) 3 | # 4 | # Written by Francesco Salvestrini 5 | # 6 | 7 | ccflags-y += -I$(src)/.. 8 | ccflags-y += -I$(src)../vmpi 9 | ccflags-y += -Wtype-limits 10 | ccflags-y += -DCONFIG_RINA_SHIM_TCP_UDP_BUFFER_SIZE=$(TCP_UDP_BUFFER_SIZE) 11 | ifeq ($(REGRESSION_TESTS),y) 12 | ccflags-y += -DCONFIG_RINA_SHIM_ETH_VLAN_REGRESSION_TESTS 13 | endif 14 | 15 | EXTRA_CFLAGS := -I$(PWD)/../include 16 | 17 | obj-m += normal-ipcp.o 18 | obj-m += shim-eth.o 19 | shim-eth-y := \ 20 | shim-eth-core.o 21 | obj-m += shim-tcp-udp.o 22 | 23 | ifeq ($(HAVE_VMPI),y) 24 | obj-m += shim-hv.o 25 | shim-hv-y := shim-hv-core.o vmpi-bufs.o 26 | endif 27 | -------------------------------------------------------------------------------- /kernel/ipcps/load.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -x 4 | 5 | # prepare the host 6 | 7 | sudo modprobe vhost 8 | sudo insmod ./shim-hv.ko 9 | sudo insmod ../vmpi/vmpi-virtio-host.ko 10 | sudo chmod a+rwx /dev/vhost-mpi 11 | -------------------------------------------------------------------------------- /kernel/ipcps/normal-ipcp.mod: -------------------------------------------------------------------------------- 1 | /home/terminet/stack/kernel/ipcps/normal-ipcp.o 2 | 3 | -------------------------------------------------------------------------------- /kernel/ipcps/shim-eth.mod: -------------------------------------------------------------------------------- 1 | /home/terminet/stack/kernel/ipcps/shim-eth-core.o 2 | 3 | -------------------------------------------------------------------------------- /kernel/ipcps/shim-tcp-udp.mod: -------------------------------------------------------------------------------- 1 | /home/terminet/stack/kernel/ipcps/shim-tcp-udp.o 2 | 3 | -------------------------------------------------------------------------------- /kernel/ipcps/unload.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -x 4 | 5 | # unprepare the host 6 | 7 | sudo rmmod vmpi-virtio-host 8 | sudo rmmod shim-hv 9 | -------------------------------------------------------------------------------- /kernel/pidm.h: -------------------------------------------------------------------------------- 1 | /* 2 | * PIDM (Port-IDs Manager) 3 | * 4 | * Francesco Salvestrini 5 | * 6 | * This program is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 2 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 19 | */ 20 | 21 | #ifndef RINA_PIDM_H 22 | #define RINA_PIDM_H 23 | 24 | #include "common.h" 25 | 26 | struct pidm; 27 | 28 | struct pidm * pidm_create(struct dentry* dbg_dir); 29 | int pidm_destroy(struct pidm * instance); 30 | 31 | port_id_t pidm_allocate(struct pidm * instance); 32 | int pidm_release(struct pidm * instance, 33 | port_id_t id); 34 | 35 | #endif 36 | -------------------------------------------------------------------------------- /kernel/rds/rbmp.h: -------------------------------------------------------------------------------- 1 | /* 2 | * RINA Bitmaps 3 | * 4 | * Francesco Salvestrini 5 | * 6 | * This program is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 2 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 19 | */ 20 | 21 | #ifndef RINA_RBMP_H 22 | #define RINA_RBMP_H 23 | 24 | struct rbmp; 25 | 26 | struct rbmp * rbmp_create(size_t bits, ssize_t offset); 27 | struct rbmp * rbmp_create_ni(size_t bits, ssize_t offset); 28 | int rbmp_destroy(struct rbmp * b); 29 | 30 | ssize_t rbmp_allocate(struct rbmp * instance); 31 | int rbmp_release(struct rbmp * instance, 32 | ssize_t id); 33 | bool rbmp_is_id_ok(struct rbmp * b, ssize_t id); 34 | 35 | #endif 36 | -------------------------------------------------------------------------------- /kernel/rds/rds.h: -------------------------------------------------------------------------------- 1 | /* 2 | * RINA Data Structures 3 | * 4 | * Francesco Salvestrini 5 | * 6 | * This program is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 2 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 19 | */ 20 | 21 | #ifndef RINA_RDS_H 22 | #define RINA_RDS_H 23 | 24 | /* FIXME: This file is bad attitude and must be removed */ 25 | 26 | #include "rbmp.h" 27 | #include "rfifo.h" 28 | #include "rmap.h" 29 | #include "rmem.h" 30 | #include "rqueue.h" 31 | #include "rref.h" 32 | #include "rtimer.h" 33 | #include "rwq.h" 34 | #include "rstr.h" 35 | #include "ringq.h" 36 | 37 | bool regression_tests_rds(void); 38 | 39 | #endif 40 | -------------------------------------------------------------------------------- /kernel/rds/rmem.h: -------------------------------------------------------------------------------- 1 | /* 2 | * RINA Memory 3 | * 4 | * Francesco Salvestrini 5 | * 6 | * This program is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 2 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 19 | */ 20 | 21 | #ifndef RINA_RMEM_H 22 | #define RINA_RMEM_H 23 | 24 | #include 25 | 26 | void * rkmalloc(size_t size, gfp_t flags); 27 | void * rkzalloc(size_t size, gfp_t flags); 28 | void rkfree(void * ptr); 29 | void rms_dump(void); 30 | 31 | #include 32 | 33 | #define bzero(DEST, LEN) do { (void) memset(DEST, 0, LEN); } while (0) 34 | 35 | #endif 36 | -------------------------------------------------------------------------------- /kernel/rds/rref.h: -------------------------------------------------------------------------------- 1 | /* 2 | * RINA References 3 | * 4 | * Francesco Salvestrini 5 | * 6 | * This program is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 2 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 19 | */ 20 | 21 | #ifndef RINA_RREF_H 22 | #define RINA_RREF_H 23 | 24 | #include 25 | 26 | struct rref; 27 | 28 | struct rref * rref_create(ssize_t count); 29 | struct rref * rref_create_ni(ssize_t count); 30 | int rref_destroy(struct rref * r); 31 | 32 | ssize_t rref_inc(struct rref * r); 33 | ssize_t rref_dec(struct rref * r); 34 | ssize_t rref_value(struct rref * r); 35 | 36 | #endif 37 | -------------------------------------------------------------------------------- /kernel/rds/rstr.h: -------------------------------------------------------------------------------- 1 | /* 2 | * RINA Strings 3 | * 4 | * Francesco Salvestrini 5 | * 6 | * This program is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 2 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 19 | */ 20 | 21 | #ifndef RINA_RSTR_H 22 | #define RINA_RSTR_H 23 | 24 | #include 25 | 26 | #include 27 | 28 | /* FIXME: This file and all associated definitions must disappear */ 29 | 30 | string_t * string_from_user(const char __user * src); 31 | int string_dup(const string_t * src, string_t ** dst); 32 | int string_cmp(const string_t * a, const string_t * b); 33 | int string_len(const string_t * s); 34 | 35 | char * rkstrdup_gfp(const char * s, gfp_t flags); 36 | char * rkstrdup(const char * s); 37 | char * rkstrdup_ni(const char * s); 38 | char * get_zero_length_string(void); 39 | 40 | #endif 41 | -------------------------------------------------------------------------------- /kernel/rina-default-plugin.mod: -------------------------------------------------------------------------------- 1 | /home/terminet/stack/kernel/default-plugin.o 2 | 3 | -------------------------------------------------------------------------------- /kernel/rina-device.h: -------------------------------------------------------------------------------- 1 | /* 2 | * RINA virtual network device (rina_device) 3 | * At the moment only for IP support 4 | * 5 | * Leonardo Bergesio 6 | * 7 | * This program is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; either version 2 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program; if not, write to the Free Software 19 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 20 | */ 21 | /* For net_device related code */ 22 | 23 | #ifndef RINA_IP_DEV_H 24 | #define RINA_IP_DEV_H 25 | 26 | #include 27 | #include "common.h" 28 | 29 | #define ipaddr_t __be32 30 | 31 | struct ipcp_instance; 32 | 33 | struct rina_device; 34 | 35 | struct rina_device* rina_dev_create(string_t *name, 36 | struct ipcp_instance* kfa_ipcp, 37 | port_id_t port); 38 | int rina_dev_destroy(struct rina_device *rina_dev); 39 | int rina_dev_rcv(struct sk_buff *skb, 40 | struct rina_device *rina_dev); 41 | 42 | #endif 43 | -------------------------------------------------------------------------------- /kernel/rinarp/Makefile.in: -------------------------------------------------------------------------------- 1 | # 2 | # Makefile for the RINA ARP (RINARP) layer 3 | # 4 | # Written by Francesco Salvestrini 5 | # 6 | 7 | ccflags-y += -I${src}/.. 8 | ccflags-y += -Wtype-limits -DCONFIG_RINARP=y 9 | ifeq ($(REGRESSION_TESTS),y) 10 | ccflags-y += -DCONFIG_ARP826_REGRESSION_TESTS 11 | endif 12 | 13 | EXTRA_CFLAGS := -I$(PWD)/../include 14 | 15 | obj-m += arp826.o 16 | arp826-y := \ 17 | arp826-tables.o \ 18 | arp826-rxtx.o \ 19 | arp826-arm.o \ 20 | arp826-maps.o \ 21 | arp826-utils.o \ 22 | arp826-core.o 23 | 24 | obj-m += rinarp.o 25 | -------------------------------------------------------------------------------- /kernel/rinarp/arp826-arm.h: -------------------------------------------------------------------------------- 1 | /* 2 | * An ARP RFC-826 (wonnabe) compliant implementation 3 | * 4 | * Francesco Salvestrini 5 | * 6 | * This program is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 2 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 19 | */ 20 | 21 | #ifndef ARP826_ARM_H 22 | #define ARP826_ARM_H 23 | 24 | #include 25 | 26 | #include "arp826-utils.h" 27 | 28 | int arm_init(void); 29 | int arm_fini(void); 30 | 31 | /* Marks a resolution, takes the ownership of all the passed data */ 32 | int arm_resolve(struct net_device * device, 33 | uint16_t ptype, 34 | struct gpa * spa, 35 | struct gha * sha, 36 | struct gpa * tpa, 37 | struct gha * tha); 38 | 39 | #endif 40 | -------------------------------------------------------------------------------- /kernel/rinarp/arp826.mod: -------------------------------------------------------------------------------- 1 | /home/terminet/stack/kernel/rinarp/arp826-tables.o /home/terminet/stack/kernel/rinarp/arp826-rxtx.o /home/terminet/stack/kernel/rinarp/arp826-arm.o /home/terminet/stack/kernel/rinarp/arp826-maps.o /home/terminet/stack/kernel/rinarp/arp826-utils.o /home/terminet/stack/kernel/rinarp/arp826-core.o 2 | 3 | -------------------------------------------------------------------------------- /kernel/rinarp/rinarp.mod: -------------------------------------------------------------------------------- 1 | /home/terminet/stack/kernel/rinarp/rinarp.o 2 | 3 | -------------------------------------------------------------------------------- /kernel/sdup-errc-ps-default.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Default policy set for SDUP Error check 3 | * 4 | * Ondrej Lichtner 5 | * 6 | * This program is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 2 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 19 | */ 20 | 21 | #ifndef SDUP_ERRC_PS_DEFAULT_H 22 | #define SDUP_ERRC_PS_DEFAULT_H 23 | 24 | #include "sdup-errc-ps.h" 25 | 26 | int default_sdup_add_error_check_policy(struct sdup_errc_ps * ps, 27 | struct du * du); 28 | 29 | int default_sdup_check_error_check_policy(struct sdup_errc_ps * ps, 30 | struct du * du); 31 | 32 | struct ps_base * sdup_errc_ps_default_create(struct rina_component * component); 33 | 34 | void sdup_errc_ps_default_destroy(struct ps_base * bps); 35 | 36 | #endif 37 | -------------------------------------------------------------------------------- /kernel/sdup-ttl-ps-default.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Default policy set for SDUP TTL 3 | * 4 | * Ondrej Lichtner 5 | * 6 | * This program is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 2 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 19 | */ 20 | 21 | #ifndef SDUP_TTL_PS_DEFAULT_H 22 | #define SDUP_TTL_PS_DEFAULT_H 23 | 24 | #include "sdup-ttl-ps.h" 25 | 26 | int default_sdup_set_lifetime_limit_policy(struct sdup_ttl_ps * ps, 27 | struct du * du); 28 | 29 | int default_sdup_get_lifetime_limit_policy(struct sdup_ttl_ps * ps, 30 | struct du * du); 31 | 32 | int default_sdup_dec_check_lifetime_limit_policy(struct sdup_ttl_ps * ps, 33 | struct du * du); 34 | 35 | struct ps_base * sdup_ttl_ps_default_create(struct rina_component * component); 36 | 37 | void sdup_ttl_ps_default_destroy(struct ps_base * bps); 38 | 39 | #endif 40 | -------------------------------------------------------------------------------- /kernel/utils.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Utilities 3 | * 4 | * Francesco Salvestrini 5 | * 6 | * This program is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 2 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 19 | */ 20 | 21 | #ifndef RINA_UTILS_H 22 | #define RINA_UTILS_H 23 | 24 | bool is_value_in_range(int value, int min_value, int max_value); 25 | 26 | /* Syscalls */ 27 | char * strdup_from_user(const char __user * src); 28 | 29 | #include "rds/rds.h" 30 | 31 | #endif 32 | -------------------------------------------------------------------------------- /kernel/vmpi/Makefile.in: -------------------------------------------------------------------------------- 1 | # 2 | # Makefile for Virtual MPI (VMPI) 3 | # 4 | # Written by Vincenzo Maffione 5 | # Francesco Salvestrini 6 | # 7 | 8 | ccflags-y += -I${src}/.. 9 | ccflags-y += -I${src}/../ipcps 10 | ccflags-y += -Wtype-limits 11 | 12 | EXTRA_CFLAGS := -I$(PWD)/../../include 13 | 14 | obj-m += vmpi-provider.o 15 | 16 | obj-$(CONFIG_VMPI_KVM_GUEST) += vmpi-kvm-guest.o 17 | 18 | vmpi-kvm-guest-y := \ 19 | vmpi-guest-impl-kvm.o vmpi-guest.o \ 20 | vmpi-iovec.o vmpi-stats.o 21 | 22 | obj-$(CONFIG_VMPI_KVM_HOST) += vmpi-kvm-host.o 23 | 24 | vmpi-kvm-host-y := \ 25 | vmpi-host-impl-kvm.o vmpi-host.o \ 26 | vmpi-iovec.o vmpi-stats.o 27 | 28 | ifdef NO 29 | obj-$(CONFIG_VMPI_XEN_GUEST) += vmpi-xen-guest.o 30 | 31 | vmpi-xen-guest-y := \ 32 | vmpi-guest-impl-xen.o vmpi-guest.o \ 33 | vmpi-iovec.o vmpi-stats.o 34 | 35 | obj-$(CONFIG_VMPI_XEN_HOST) += vmpi-xen-host.o 36 | 37 | vmpi-xen-host-y := \ 38 | vmpi-host-impl-xen.o xen-mpi-back-interface.o \ 39 | xen-mpi-back-xenbus.o vmpi-host.o \ 40 | vmpi-iovec.o vmpi-stats.o 41 | endif 42 | -------------------------------------------------------------------------------- /kernel/vmpi/prepare-guest-kvm.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # prepare the guest 4 | 5 | set -x 6 | 7 | sudo modprobe virtio-ring 8 | sudo modprobe virtio-pci 9 | 10 | lsmod | grep vmpi_bufs || sudo insmod vmpi-bufs.ko 11 | lsmod | grep vmpi_provider || sudo insmod vmpi-provider.ko 12 | lsmod | grep vmpi_guest_kvm || sudo insmod vmpi-guest-kvm.ko 13 | 14 | lsmod | grep vmpi_test || sudo insmod vmpi-test.ko 15 | [ -c /dev/vmpi-test ] && sudo chmod a+rwx /dev/vmpi-test 16 | -------------------------------------------------------------------------------- /kernel/vmpi/prepare-guest-xen.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # prepare the guest 4 | 5 | set -x 6 | 7 | sudo insmod vmpi-bufs.ko 8 | sudo insmod vmpi-provider.ko 9 | sudo insmod vmpi-guest-xen.ko 10 | -------------------------------------------------------------------------------- /kernel/vmpi/prepare-host-kvm.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -x 4 | 5 | # prepare the host 6 | 7 | sudo modprobe vhost 8 | 9 | lsmod | grep vmpi_bufs || sudo insmod vmpi-bufs.ko 10 | lsmod | grep vmpi_provider || sudo insmod vmpi-provider.ko 11 | lsmod | grep vmpi_host_kvm || sudo insmod vmpi-host-kvm.ko 12 | [ -c /dev/vhost-mpi ] && sudo chmod a+rwx /dev/vhost-mpi 13 | 14 | lsmod | grep vmpi_test || sudo insmod vmpi-test.ko 15 | [ -c /dev/vmpi-test ] && sudo chmod a+rwx /dev/vmpi-test 16 | -------------------------------------------------------------------------------- /kernel/vmpi/unprepare-guest-kvm.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # unprepare the guest 4 | 5 | set -x 6 | 7 | lsmod | grep vmpi_test && sudo rmmod vmpi-test 8 | lsmod | grep vmpi_guest_kvm && sudo rmmod vmpi-guest-kvm 9 | lsmod | grep vmpi_provider && sudo rmmod vmpi-provider 10 | lsmod | grep vmpi_bufs && sudo rmmod vmpi-bufs 11 | -------------------------------------------------------------------------------- /kernel/vmpi/unprepare-guest-xen.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # unprepare the guest 4 | 5 | set -x 6 | 7 | sudo rmmod vmpi-guest-xen 8 | sudo rmmod vmpi-provider 9 | sudo rmmod vmpi-bufs 10 | -------------------------------------------------------------------------------- /kernel/vmpi/unprepare-host-kvm.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -x 4 | 5 | # unprepare the host 6 | 7 | lsmod | grep vmpi_test && sudo rmmod vmpi-test 8 | lsmod | grep vmpi_host_kvm && sudo rmmod vmpi-host-kvm 9 | lsmod | grep vmpi_provider && sudo rmmod vmpi-provider 10 | lsmod | grep vmpi_bufs && sudo rmmod vmpi-bufs 11 | -------------------------------------------------------------------------------- /kernel/vmpi/unprepare-host-xen.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | 4 | usage() 5 | { 6 | echo "USAGE: $0 " 7 | exit 8 | } 9 | 10 | cleandir() 11 | { 12 | local param=${1} 13 | local key 14 | local result 15 | 16 | result=$(sudo xenstore-list ${param}) 17 | for key in ${result}; do 18 | sudo xenstore-rm ${param}/${key} 19 | done 20 | } 21 | 22 | 23 | echo "$1" | grep -o "^[0-9]\+$" 24 | if test "$?" != 0; then 25 | usage 26 | fi 27 | 28 | sudo rmmod vmpi-host-xen 29 | sudo rmmod vmpi-provider 30 | sudo rmmod vmpi-bufs 31 | 32 | FRONTEND_ID="$1" # DomID of the frontend we want to teardown 33 | 34 | cleandir /local/domain/${FRONTEND_ID}/device/mpi/0 35 | cleandir /local/domain/0/backend/mpi/${FRONTEND_ID}/0 36 | 37 | -------------------------------------------------------------------------------- /kernel/vmpi/update-rina-vmpi.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | 4 | set-x 5 | # To be executed in the vmpi folder 6 | IRATI_REPO=~/git/irati 7 | 8 | rm *.patch 9 | 10 | git format-patch rina..master 11 | patches=$(ls *.patch) 12 | mv ${patches} ${IRATI_REPO} 13 | 14 | pushd ${IRATI_REPO} 15 | for patch in ${patches}; do 16 | git am --directory=linux/net/rina/vmpi --exclude=linux/net/rina/vmpi/user-vmpi-test.c --exclude=linux/net/rina/vmpi/*.sh ${patch} 17 | done 18 | rm *.patch 19 | popd 20 | 21 | #git checkout rina 22 | #git merge master 23 | 24 | -------------------------------------------------------------------------------- /kernel/vmpi/vmpi-iovec.h: -------------------------------------------------------------------------------- 1 | /* 2 | * iovec helpers for VMPI 3 | * 4 | * Vincenzo Maffione 5 | * 6 | * This program is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 2 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 19 | */ 20 | 21 | #include 22 | 23 | 24 | size_t iovec_to_buf(struct iovec **iov, unsigned int *iovcnt, 25 | void *to, size_t len); 26 | 27 | size_t iovec_from_buf(struct iovec **iov, unsigned int *iovcnt, 28 | const void *from, size_t len); 29 | -------------------------------------------------------------------------------- /kernel/vmpi/vmpi-stats.h: -------------------------------------------------------------------------------- 1 | #ifndef __VMPI_STATS_H__ 2 | #define __VMPI_STATS_H__ 3 | 4 | struct vmpi_stats { 5 | unsigned int rxres; 6 | unsigned int rxint; 7 | unsigned int txreq; 8 | unsigned int txres; 9 | unsigned int txint; 10 | }; 11 | 12 | int vmpi_stats_init(struct vmpi_stats *); 13 | void vmpi_stats_fini(struct vmpi_stats *); 14 | 15 | #endif /* __VMPI_STATS_H__ */ 16 | -------------------------------------------------------------------------------- /librina/.changelog-amend: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IRATI/stack/726b535c908f8a74e8c68dd493cfbb1bd8726546/librina/.changelog-amend -------------------------------------------------------------------------------- /librina/.gitignore: -------------------------------------------------------------------------------- 1 | *~ 2 | *.swp 3 | 4 | *.orig 5 | 6 | .deps 7 | .libs 8 | .dirstamp 9 | .directory 10 | .autotools 11 | .fuse* 12 | .settings/ 13 | 14 | Makefile 15 | Makefile.in 16 | 17 | TAGS 18 | 19 | /.version 20 | /.tarball-version 21 | 22 | /AUTHORS 23 | /ChangeLog 24 | /NEWS 25 | 26 | /autom4te.cache 27 | /aclocal.m4 28 | /configure 29 | /config.log 30 | /config.status 31 | /confdefs.h 32 | /conftest.c 33 | /conftest.err 34 | 35 | /libtool 36 | 37 | /*.tar.gz 38 | 39 | /wrap/java 40 | /wrap/rina-api/rina-api.o 41 | /src/irati 42 | /src/ker-numtables.c 43 | /src/serdes-utils.c 44 | 45 | /.project 46 | /.cproject 47 | -------------------------------------------------------------------------------- /librina/.mailmap: -------------------------------------------------------------------------------- 1 | Francesco 2 | -------------------------------------------------------------------------------- /librina/README: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IRATI/stack/726b535c908f8a74e8c68dd493cfbb1bd8726546/librina/README -------------------------------------------------------------------------------- /librina/README.md: -------------------------------------------------------------------------------- 1 | README -------------------------------------------------------------------------------- /librina/bootstrap: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # -*- sh -*- 3 | 4 | # 5 | # bootstrap 6 | # 7 | # Written by: Francesco Salvestrini 8 | # 9 | 10 | ME=bootstrap 11 | 12 | # Start from scratch 13 | rm -r -f autom4te.cache 14 | rm -f aclocal.m4 15 | 16 | DIRS=". `cat configure.ac|grep AC_CONFIG_SUBDIRS|sed -e 's,^.*\[,,' -e 's,\].*,,'`" 17 | 18 | echo "${ME}: Bootstrapping autotools" 19 | 20 | for i in $DIRS ; do 21 | (cd $i && echo "${ME}: Bootstrapping autotools in $PWD" && autoreconf -i -f -Wall $@) || { 22 | echo "${ME}: Cannot bootstrap autotools into $PWD" 23 | exit 1 24 | } 25 | done 26 | 27 | echo "${ME}: Autotools bootstrapped successfully" 28 | -------------------------------------------------------------------------------- /librina/build-aux/.gitignore: -------------------------------------------------------------------------------- 1 | /compile 2 | /config.guess 3 | /config.sub 4 | /depcomp 5 | /install-sh 6 | /ltmain.sh 7 | /missing 8 | /py-compile 9 | /ar-lib 10 | /test-driver 11 | -------------------------------------------------------------------------------- /librina/doc/.gitignore: -------------------------------------------------------------------------------- 1 | /doxygen.cfg 2 | /doxygen 3 | -------------------------------------------------------------------------------- /librina/doc/Makefile.am: -------------------------------------------------------------------------------- 1 | # 2 | # Makefile.am 3 | # 4 | # Written by: Francesco Salvestrini 5 | # 6 | 7 | include Makefile.inc 8 | 9 | EXTRA_DIST = 10 | BUILT_SOURCES = 11 | MOSTLYCLEANFILES = $(DX_CLEANFILES) 12 | 13 | ## FIXME: Remove this workaround 14 | ##EXTRA_DIST += *.md 15 | 16 | EXTRA_DIST += doxygen.cfg.in 17 | 18 | if DX_COND_doc 19 | 20 | MOSTLYCLEANFILES += $(DX_CLEANFILES) 21 | 22 | edit = $(SED) \ 23 | -e 's|@abs_top_srcdir[@]|$(abs_top_srcdir)|g' \ 24 | -e 's|@abs_top_builddir[@]|$(abs_top_builddir)|g' \ 25 | -e 's|@PACKAGE_VERSION[@]|$(PACKAGE_VERSION)|g' \ 26 | -e 's|@PACKAGE_NAME[@]|$(PACKAGE_NAME)|g' 27 | 28 | BUILT_SOURCES += doxygen.cfg 29 | MOSTLYCLEANFILES += doxygen.cfg 30 | 31 | doxygen.cfg: Makefile doxygen.cfg.in 32 | rm -f $@ $@.tmp 33 | srcdir=''; \ 34 | test -f ./$@.in || srcdir=$(srcdir)/; \ 35 | $(edit) $${srcdir}$@.in >$@.tmp 36 | chmod a-w $@.tmp 37 | mv $@.tmp $@ 38 | 39 | if DX_COND_pdf 40 | pdf-local: doxygen.cfg doxygen-run doxygen-pdf 41 | endif DX_COND_pdf 42 | 43 | if DX_COND_html 44 | html-local: doxygen.cfg doxygen-run 45 | endif DX_COND_html 46 | 47 | endif 48 | -------------------------------------------------------------------------------- /librina/doc/installation-prerequisites.md: -------------------------------------------------------------------------------- 1 | Required packages: 2 | 3 | * A C++ compiler 4 | * libnl-3 (libnl-3-dev) 5 | * libnl-3-genl (libnl-3-genl) 6 | 7 | Optional packages: 8 | 9 | * swig >= 2.0 (excluding versions in the range [2.0.4, 2.0.8] 10 | 11 | Francesco -------------------------------------------------------------------------------- /librina/include/.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IRATI/stack/726b535c908f8a74e8c68dd493cfbb1bd8726546/librina/include/.gitignore -------------------------------------------------------------------------------- /librina/include/Makefile.am: -------------------------------------------------------------------------------- 1 | # 2 | # Makefile.am 3 | # 4 | # Written by: Francesco Salvestrini 5 | # 6 | 7 | SUBDIRS = librina -------------------------------------------------------------------------------- /librina/include/librina/Makefile.am: -------------------------------------------------------------------------------- 1 | # 2 | # Makefile.am 3 | # 4 | # Written by: Francesco Salvestrini 5 | # 6 | 7 | nobase_pkginclude_HEADERS = \ 8 | librina.h \ 9 | logs.h \ 10 | common.h \ 11 | ipc-api.h \ 12 | application.h \ 13 | configuration.h \ 14 | internal-events.h \ 15 | ipc-daemons.h \ 16 | ipc-manager.h \ 17 | ipc-process.h \ 18 | faux-sockets.h \ 19 | security-manager.h \ 20 | tlshand-authp.h \ 21 | likely.h \ 22 | cdap_v2.h \ 23 | rib_v2.h \ 24 | cdap_rib_structures.h \ 25 | irm.h \ 26 | enrollment.h \ 27 | sdu-protection.h \ 28 | patterns.h \ 29 | exceptions.h \ 30 | concurrency.h \ 31 | time.h \ 32 | timer.h \ 33 | plugin-info.h \ 34 | console.h 35 | -------------------------------------------------------------------------------- /librina/include/librina/faux-sockets.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Faux sockets 3 | * 4 | * Eduard Grasa 5 | * Francesco Salvestrini 6 | * 7 | * This library is free software; you can redistribute it and/or 8 | * modify it under the terms of the GNU Lesser General Public 9 | * License as published by the Free Software Foundation; either 10 | * version 2.1 of the License, or (at your option) any later version. 11 | * 12 | * This library is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | * Lesser General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Lesser General Public 18 | * License along with this library; if not, write to the Free Software 19 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 20 | * MA 02110-1301 USA 21 | */ 22 | 23 | #ifndef LIBRINA_FAUX_SOCKETS_H 24 | #define LIBRINA_FAUX_SOCKETS_H 25 | 26 | #ifdef __cplusplus 27 | 28 | namespace rina { 29 | 30 | } 31 | 32 | #endif 33 | 34 | #endif 35 | -------------------------------------------------------------------------------- /librina/include/librina/librina.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Faux sockets 3 | * 4 | * Francesco Salvestrini 5 | * 6 | * This library is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU Lesser General Public 8 | * License as published by the Free Software Foundation; either 9 | * version 2.1 of the License, or (at your option) any later version. 10 | * 11 | * This library is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | * Lesser General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Lesser General Public 17 | * License along with this library; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 19 | * MA 02110-1301 USA 20 | */ 21 | 22 | #ifndef LIBRINA_H 23 | #define LIBRINA_H 24 | 25 | #ifdef __cplusplus 26 | 27 | #include "librina/common.h" 28 | #include "librina/application.h" 29 | #include "librina/ipc-manager.h" 30 | //#include "librina/ipc-process.h" 31 | //#include "librina/faux-sockets.h" 32 | //#include "librina/cdap.h" 33 | //#include "librina/sdu-protection.h" 34 | 35 | #endif 36 | #endif 37 | -------------------------------------------------------------------------------- /librina/include/librina/likely.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Branch prediction Macros 3 | * 4 | * Marc Sune 5 | * 6 | * This library is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU Lesser General Public 8 | * License as published by the Free Software Foundation; either 9 | * version 2.1 of the License, or (at your option) any later version. 10 | * 11 | * This library is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | * Lesser General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Lesser General Public 17 | * License along with this library; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 19 | * MA 02110-1301 USA 20 | */ 21 | 22 | #ifndef LIBRINA_LIKELY_H 23 | #define LIBRINA_LIKELY_H 24 | 25 | #ifndef likely 26 | #define likely(x) __builtin_expect(((x)),1) 27 | #endif 28 | 29 | #ifndef unlikely 30 | #define unlikely(x) __builtin_expect(((x)),0) 31 | #endif 32 | 33 | #endif //LIBRINA_LIKELY_H 34 | -------------------------------------------------------------------------------- /librina/include/librina/plugin-info.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Plugin information retrieval from manifest manifest 3 | * 4 | * Vincenzo Maffione 5 | * 6 | * This program is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 2 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 19 | */ 20 | #ifndef __PLUGIN_INFO__ 21 | #define __PLUGIN_INFO__ 22 | 23 | #include 24 | #include 25 | 26 | #include 27 | #include 28 | 29 | namespace rina { 30 | 31 | int plugin_get_info(const std::string& plugin_name, 32 | const std::string& plugins_path, 33 | std::list& result); 34 | 35 | } // namespace rina 36 | 37 | #endif /* __PLUGIN_INFO__ */ 38 | -------------------------------------------------------------------------------- /librina/include/librina/sdu-protection.h: -------------------------------------------------------------------------------- 1 | /* 2 | * SDU Protection 3 | * 4 | * Francesco Salvestrini 5 | * 6 | * This library is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU Lesser General Public 8 | * License as published by the Free Software Foundation; either 9 | * version 2.1 of the License, or (at your option) any later version. 10 | * 11 | * This library is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | * Lesser General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Lesser General Public 17 | * License along with this library; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 19 | * MA 02110-1301 USA 20 | */ 21 | 22 | #ifndef LIBRINA_SDU_PROTECTION_H 23 | #define LIBRINA_SDU_PROTECTION_H 24 | 25 | #ifdef __cplusplus 26 | 27 | namespace rina { 28 | 29 | } 30 | 31 | #endif 32 | 33 | #endif 34 | -------------------------------------------------------------------------------- /librina/include/librina/time.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Time functionalities 3 | * 4 | * Francesco Salvestrini 5 | * 6 | * This library is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU Lesser General Public 8 | * License as published by the Free Software Foundation; either 9 | * version 2.1 of the License, or (at your option) any later version. 10 | * 11 | * This library is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | * Lesser General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Lesser General Public 17 | * License along with this library; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 19 | * MA 02110-1301 USA 20 | */ 21 | 22 | #ifndef LIBRINA_TIME_H 23 | #define LIBRINA_TIME_H 24 | 25 | #ifdef __cplusplus 26 | 27 | #include 28 | 29 | namespace rina { 30 | 31 | void busy_wait(clock_t wait); 32 | 33 | } 34 | 35 | #endif 36 | 37 | #endif 38 | -------------------------------------------------------------------------------- /librina/m4/.gitignore: -------------------------------------------------------------------------------- 1 | /libtool.m4 2 | /ltoptions.m4 3 | /ltsugar.m4 4 | /ltversion.m4 5 | /lt~obsolete.m4 6 | /pkg.m4 7 | -------------------------------------------------------------------------------- /librina/m4/ax_have_syscall.m4: -------------------------------------------------------------------------------- 1 | # 2 | # SYNOPSIS 3 | # 4 | # AX_HAVE_SYSCALL([syscall],[ACTION-IF-FOUND],[ACTION-IF-NOT-FOUND]) 5 | # 6 | # WRITTEN BY: 7 | # 8 | # Francesco Salvestrini 9 | # 10 | 11 | AC_DEFUN([AX_HAVE_SYSCALL], [dnl 12 | AC_MSG_CHECKING([for $1 syscall availability]) 13 | AC_CACHE_VAL([ax_cv_have_syscall_$1], [ 14 | AC_LINK_IFELSE([ 15 | AC_LANG_PROGRAM([ 16 | #include 17 | ], [ 18 | int i = __NR_$1; 19 | ]) 20 | ],[ 21 | ax_cv_have_syscall_$1=yes 22 | ],[ 23 | ax_cv_have_syscall_$1=no 24 | ]) 25 | ]) 26 | AS_IF([test "${ax_cv_have_syscall_$1}" = "yes"],[ 27 | AC_MSG_RESULT([yes]) 28 | $2 29 | ],[ 30 | AC_MSG_RESULT([no]) 31 | $3 32 | ]) 33 | ]) 34 | -------------------------------------------------------------------------------- /librina/m4/ax_selector_enable.m4: -------------------------------------------------------------------------------- 1 | # 2 | # SYNOPSIS 3 | # 4 | # AX_SELECTOR_ENABLE(FEATURE,[IF-WANT-FEATURE],[IF-DONT-WANT-FEATURE]) 5 | # 6 | # The feature is disabled by default, --enable- to manually switch 7 | # it on 8 | # 9 | # WRITTEN BY: 10 | # 11 | # Francesco Salvestrini 12 | # 13 | 14 | AC_DEFUN([AX_SELECTOR_ENABLE],[ 15 | pushdef([CANONICAL_UP], translit([$1], [a-z-], [A-Z_])) 16 | pushdef([CANONICAL_LOW], translit([$1], [A-Z-], [a-z_])) 17 | 18 | AC_MSG_CHECKING([whether $1 related features have been enabled]) 19 | 20 | AC_ARG_ENABLE([$1], 21 | AS_HELP_STRING([--enable-][$1],[enable $1 related features]),[ 22 | AS_IF([test ! $enableval = "no"],[ 23 | ax_cv_want_[]CANONICAL_LOW=yes 24 | ],[ 25 | ax_cv_want_[]CANONICAL_LOW=no 26 | ]) 27 | ],[ 28 | ax_cv_want_[]CANONICAL_LOW=no 29 | ]) 30 | AC_MSG_RESULT([${ax_cv_want_[]CANONICAL_LOW}]) 31 | AS_IF([test "${ax_cv_want_[]CANONICAL_LOW}" = "yes"],[$2],[$3]) 32 | 33 | AM_CONDITIONAL(BUILD_[]CANONICAL_UP, [test "${ax_cv_want_[]CANONICAL_LOW}" = "yes"]) 34 | 35 | AS_IF([test "${ax_cv_want_[]CANONICAL_LOW}" = "yes"],[ 36 | ax_cv_define_[]CANONICAL_LOW=1 37 | ],[ 38 | ax_cv_define_[]CANONICAL_LOW=0 39 | ]) 40 | 41 | AC_DEFINE_UNQUOTED(WANT_[]CANONICAL_UP, [${ax_cv_define_[]CANONICAL_LOW}], [Define if you want $1]) 42 | 43 | popdef([CANONICAL_LOW]) 44 | popdef([CANONICAL_UP]) 45 | ]) 46 | -------------------------------------------------------------------------------- /librina/src/.gitignore: -------------------------------------------------------------------------------- 1 | /stamp-h1 2 | /config.h 3 | /config.h.in 4 | 5 | /*.[ao] 6 | /*.l[ao] 7 | 8 | /librina.pc 9 | 10 | /test-linking 11 | 12 | /*.stamp 13 | /*.pb.* 14 | 15 | -------------------------------------------------------------------------------- /librina/src/exceptions.cc: -------------------------------------------------------------------------------- 1 | // 2 | // Exceptions 3 | // 4 | // Francesco Salvestrini 5 | // 6 | // This library is free software; you can redistribute it and/or 7 | // modify it under the terms of the GNU Lesser General Public 8 | // License as published by the Free Software Foundation; either 9 | // version 2.1 of the License, or (at your option) any later version. 10 | // 11 | // This library is distributed in the hope that it will be useful, 12 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | // Lesser General Public License for more details. 15 | // 16 | // You should have received a copy of the GNU Lesser General Public 17 | // License along with this library; if not, write to the Free Software 18 | // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 19 | // MA 02110-1301 USA 20 | // 21 | 22 | #include "librina/exceptions.h" 23 | 24 | namespace rina { 25 | 26 | const char * Exception::what() const throw() 27 | { return description_.c_str(); } 28 | 29 | } 30 | -------------------------------------------------------------------------------- /librina/src/faux-sockets.cc: -------------------------------------------------------------------------------- 1 | // 2 | // Faux sockets 3 | // 4 | // Francesco Salvestrini 5 | // 6 | // This library is free software; you can redistribute it and/or 7 | // modify it under the terms of the GNU Lesser General Public 8 | // License as published by the Free Software Foundation; either 9 | // version 2.1 of the License, or (at your option) any later version. 10 | // 11 | // This library is distributed in the hope that it will be useful, 12 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | // Lesser General Public License for more details. 15 | // 16 | // You should have received a copy of the GNU Lesser General Public 17 | // License along with this library; if not, write to the Free Software 18 | // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 19 | // MA 02110-1301 USA 20 | // 21 | 22 | #include "librina/faux-sockets.h" 23 | 24 | namespace rina { 25 | } 26 | 27 | -------------------------------------------------------------------------------- /librina/src/irm.proto: -------------------------------------------------------------------------------- 1 | syntax="proto2"; 2 | package rina.messages; 3 | option optimize_for = LITE_RUNTIME; 4 | 5 | message difProperties_t { 6 | optional int32 max_sdu_size = 1; // Maximum SDU size 7 | optional string dif_name = 2; // DIF name 8 | } 9 | 10 | // Values for the flags field. 11 | enum flowStateValues_t { 12 | FLOW_ALLOCATION_REQUESTED = 0; 13 | FLOW_ALLOCATED = 1; 14 | FLOW_DEALLOCATION_REQUESTED = 2; 15 | FLOW_DEALLOCATED = 3; 16 | } 17 | 18 | message flowInformation_t { 19 | optional string local_apn = 1; // Local app process name 20 | optional string local_api = 2; // Local app process instance 21 | optional string local_aen = 3; // Local app entity name 22 | optional string local_aei = 4; // Local app entity instance 23 | optional string remote_apn = 5; // Remote app process name 24 | optional string remote_api = 6; // Remote app process instance 25 | optional string remote_aen = 7; // Remote app entity name 26 | optional string remote_aei = 8; // Remote app entity instance 27 | optional string dif_name = 9; // The DIF that provides the flow 28 | optional int32 port_id = 10; // The port-id of the flow 29 | optional flowStateValues_t state = 11; // The state of the flow 30 | } -------------------------------------------------------------------------------- /librina/src/jsoncpp/json/autolink.h: -------------------------------------------------------------------------------- 1 | #ifndef JSON_AUTOLINK_H_INCLUDED 2 | # define JSON_AUTOLINK_H_INCLUDED 3 | 4 | # include "config.h" 5 | 6 | # ifdef JSON_IN_CPPTL 7 | # include 8 | # endif 9 | 10 | # if !defined(JSON_NO_AUTOLINK) && !defined(JSON_DLL_BUILD) && !defined(JSON_IN_CPPTL) 11 | # define CPPTL_AUTOLINK_NAME "json" 12 | # undef CPPTL_AUTOLINK_DLL 13 | # ifdef JSON_DLL 14 | # define CPPTL_AUTOLINK_DLL 15 | # endif 16 | # include "autolink.h" 17 | # endif 18 | 19 | #endif // JSON_AUTOLINK_H_INCLUDED 20 | -------------------------------------------------------------------------------- /librina/src/jsoncpp/json/features.h: -------------------------------------------------------------------------------- 1 | #ifndef CPPTL_JSON_FEATURES_H_INCLUDED 2 | # define CPPTL_JSON_FEATURES_H_INCLUDED 3 | 4 | # include "forwards.h" 5 | 6 | namespace Json { 7 | 8 | /** \brief Configuration passed to reader and writer. 9 | * This configuration object can be used to force the Reader or Writer 10 | * to behave in a standard conforming way. 11 | */ 12 | class JSON_API Features 13 | { 14 | public: 15 | /** \brief A configuration that allows all features and assumes all strings are UTF-8. 16 | * - C & C++ comments are allowed 17 | * - Root object can be any JSON value 18 | * - Assumes Value strings are encoded in UTF-8 19 | */ 20 | static Features all(); 21 | 22 | /** \brief A configuration that is strictly compatible with the JSON specification. 23 | * - Comments are forbidden. 24 | * - Root object must be either an array or an object value. 25 | * - Assumes Value strings are encoded in UTF-8 26 | */ 27 | static Features strictMode(); 28 | 29 | /** \brief Initialize the configuration like JsonConfig::allFeatures; 30 | */ 31 | Features(); 32 | 33 | /// \c true if comments are allowed. Default: \c true. 34 | bool allowComments_; 35 | 36 | /// \c true if root must be either an array or an object value. Default: \c false. 37 | bool strictRoot_; 38 | }; 39 | 40 | } // namespace Json 41 | 42 | #endif // CPPTL_JSON_FEATURES_H_INCLUDED 43 | -------------------------------------------------------------------------------- /librina/src/jsoncpp/json/forwards.h: -------------------------------------------------------------------------------- 1 | #ifndef JSON_FORWARDS_H_INCLUDED 2 | # define JSON_FORWARDS_H_INCLUDED 3 | 4 | # include "config.h" 5 | 6 | namespace Json { 7 | 8 | // writer.h 9 | class FastWriter; 10 | class StyledWriter; 11 | 12 | // reader.h 13 | class Reader; 14 | 15 | // features.h 16 | class Features; 17 | 18 | // value.h 19 | typedef int Int; 20 | typedef unsigned int UInt; 21 | class StaticString; 22 | class Path; 23 | class PathArgument; 24 | class Value; 25 | class ValueIteratorBase; 26 | class ValueIterator; 27 | class ValueConstIterator; 28 | #ifdef JSON_VALUE_USE_INTERNAL_MAP 29 | class ValueAllocator; 30 | class ValueMapAllocator; 31 | class ValueInternalLink; 32 | class ValueInternalArray; 33 | class ValueInternalMap; 34 | #endif // #ifdef JSON_VALUE_USE_INTERNAL_MAP 35 | 36 | } // namespace Json 37 | 38 | 39 | #endif // JSON_FORWARDS_H_INCLUDED 40 | -------------------------------------------------------------------------------- /librina/src/jsoncpp/json/json.h: -------------------------------------------------------------------------------- 1 | #ifndef JSON_JSON_H_INCLUDED 2 | # define JSON_JSON_H_INCLUDED 3 | 4 | # include "autolink.h" 5 | # include "value.h" 6 | # include "reader.h" 7 | # include "writer.h" 8 | # include "features.h" 9 | 10 | #endif // JSON_JSON_H_INCLUDED 11 | -------------------------------------------------------------------------------- /librina/src/librina.cc: -------------------------------------------------------------------------------- 1 | // 2 | // librina (placeholder) 3 | // 4 | // Francesco Salvestrini 5 | // 6 | // This library is free software; you can redistribute it and/or 7 | // modify it under the terms of the GNU Lesser General Public 8 | // License as published by the Free Software Foundation; either 9 | // version 2.1 of the License, or (at your option) any later version. 10 | // 11 | // This library is distributed in the hope that it will be useful, 12 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | // Lesser General Public License for more details. 15 | // 16 | // You should have received a copy of the GNU Lesser General Public 17 | // License along with this library; if not, write to the Free Software 18 | // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 19 | // MA 02110-1301 USA 20 | // 21 | 22 | #include 23 | 24 | #include "librina/librina.h" 25 | -------------------------------------------------------------------------------- /librina/src/librina.pc.in: -------------------------------------------------------------------------------- 1 | prefix=@prefix@ 2 | libdir=@libdir@ 3 | includedir=@includedir@ 4 | 5 | Name: LibRINA 6 | Description: RINA support libraries 7 | Version: @PACKAGE_VERSION@ 8 | URL: @PACKAGE_URL@ 9 | Requires: protobuf >= @LIBPROTOBUF_MIN_VERSION@ 10 | Libs: -L${libdir} -lrina 11 | Libs.private: -lpthread @LIBPROTOBUF_LIBS@ 12 | Cflags: -I${includedir} @LIBPROTOBUF_CFLAGS@ 13 | -------------------------------------------------------------------------------- /librina/src/librinajsoncpp.pc.in: -------------------------------------------------------------------------------- 1 | prefix=@prefix@ 2 | libdir=@libdir@ 3 | includedir=@includedir@ 4 | 5 | Name: LibRINA JSON CPP 6 | Description: JSON parser for C++ 7 | Version: @PACKAGE_VERSION@ 8 | URL: @PACKAGE_URL@ 9 | Libs: -L${libdir} -lrinajsoncpp 10 | Cflags: -I${includedir} 11 | -------------------------------------------------------------------------------- /librina/src/proto2inc: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # 4 | # proto2inc 5 | # 6 | # Written by: Francesco Salvestrini 7 | # 8 | 9 | rm Makefile.inc 10 | 11 | cat > Makefile.inc <> Makefile.inc << EOF 20 | $name.stamp: $name.proto 21 | rm -f $name.tmp 22 | touch $name.tmp 23 | \$(PROTOC) -I\$(builddir) -I\$(srcdir) \\ 24 | --cpp_out=\$(builddir) \\ 25 | \$(srcdir)/$name.proto 26 | mv -f $name.tmp \$@ 27 | 28 | $name.pb.h $name.pb.cc: $name.stamp 29 | if test -f \$@; then :; else \\ 30 | trap 'rm -rf $name.lock $name.stamp' 1 2 13 15; \\ 31 | if mkdir $name.lock 2>/dev/null; then \\ 32 | rm -f $name.stamp; \\ 33 | \$(MAKE) \$(AM_MAKEFLAGS) $name.stamp; \\ 34 | result=\$\$?; rm -rf $name.lock; exit \$\$result; \\ 35 | else \\ 36 | while test -d $name.lock; do sleep 1; done; \\ 37 | test -f $name.stamp; \\ 38 | fi; \\ 39 | fi 40 | 41 | DISTCLEANFILES += \\ 42 | $name.pb.h $name.pb.cc $name.stamp 43 | 44 | MOSTLYCLEANFILES += \\ 45 | $name.tmp 46 | 47 | EXTRA_DIST += \\ 48 | $name.proto 49 | 50 | protoSOURCES += $name.pb.cc $name.pb.h 51 | 52 | 53 | EOF 54 | 55 | done 56 | -------------------------------------------------------------------------------- /librina/src/sdu-protection.cc: -------------------------------------------------------------------------------- 1 | // 2 | // SDU Protection 3 | // 4 | // Eduard Grasa 5 | // Leonardo Bergesio 6 | // Francesco Salvestrini 7 | // 8 | // This library is free software; you can redistribute it and/or 9 | // modify it under the terms of the GNU Lesser General Public 10 | // License as published by the Free Software Foundation; either 11 | // version 2.1 of the License, or (at your option) any later version. 12 | // 13 | // This library 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 GNU 16 | // Lesser General Public License for more details. 17 | // 18 | // You should have received a copy of the GNU Lesser General Public 19 | // License along with this library; if not, write to the Free Software 20 | // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 21 | // MA 02110-1301 USA 22 | // 23 | 24 | #include "librina/sdu-protection.h" 25 | 26 | namespace rina { 27 | } 28 | -------------------------------------------------------------------------------- /librina/src/test-linking.cc: -------------------------------------------------------------------------------- 1 | // 2 | // Linking test program 3 | // 4 | // Francesco Salvestrini 5 | // 6 | // This library is free software; you can redistribute it and/or 7 | // modify it under the terms of the GNU Lesser General Public 8 | // License as published by the Free Software Foundation; either 9 | // version 2.1 of the License, or (at your option) any later version. 10 | // 11 | // This library is distributed in the hope that it will be useful, 12 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | // Lesser General Public License for more details. 15 | // 16 | // You should have received a copy of the GNU Lesser General Public 17 | // License along with this library; if not, write to the Free Software 18 | // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 19 | // MA 02110-1301 USA 20 | // 21 | 22 | #include 23 | 24 | #include "librina/common.h" 25 | 26 | int main(int argc, char * argv[]) 27 | { 28 | rina::initialize("test", "/tmp/test"); 29 | 30 | return EXIT_SUCCESS; 31 | } 32 | -------------------------------------------------------------------------------- /librina/src/time.cc: -------------------------------------------------------------------------------- 1 | // 2 | // Time facilities 3 | // 4 | // Francesco Salvestrini 5 | // 6 | // This library is free software; you can redistribute it and/or 7 | // modify it under the terms of the GNU Lesser General Public 8 | // License as published by the Free Software Foundation; either 9 | // version 2.1 of the License, or (at your option) any later version. 10 | // 11 | // This library is distributed in the hope that it will be useful, 12 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | // Lesser General Public License for more details. 15 | // 16 | // You should have received a copy of the GNU Lesser General Public 17 | // License along with this library; if not, write to the Free Software 18 | // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 19 | // MA 02110-1301 USA 20 | // 21 | 22 | #include "librina/time.h" 23 | 24 | namespace rina { 25 | 26 | void busy_wait(clock_t wait) 27 | { 28 | clock_t start = clock(); 29 | clock_t end = clock(); 30 | 31 | while (((double) (end - start)) / CLOCKS_PER_SEC < wait) 32 | end = clock(); 33 | } 34 | 35 | } 36 | -------------------------------------------------------------------------------- /librina/src/utils.cc: -------------------------------------------------------------------------------- 1 | // 2 | // Utilities 3 | // 4 | // Francesco Salvestrini 5 | // 6 | // This library is free software; you can redistribute it and/or 7 | // modify it under the terms of the GNU Lesser General Public 8 | // License as published by the Free Software Foundation; either 9 | // version 2.1 of the License, or (at your option) any later version. 10 | // 11 | // This library is distributed in the hope that it will be useful, 12 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | // Lesser General Public License for more details. 15 | // 16 | // You should have received a copy of the GNU Lesser General Public 17 | // License along with this library; if not, write to the Free Software 18 | // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 19 | // MA 02110-1301 USA 20 | // 21 | 22 | #include 23 | 24 | size_t get_page_size() 25 | { return sysconf(_SC_PAGE_SIZE); } 26 | -------------------------------------------------------------------------------- /librina/src/utils.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Utilities 3 | * 4 | * Francesco Salvestrini 5 | * 6 | * This library is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU Lesser General Public 8 | * License as published by the Free Software Foundation; either 9 | * version 2.1 of the License, or (at your option) any later version. 10 | * 11 | * This library is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | * Lesser General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Lesser General Public 17 | * License along with this library; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 19 | * MA 02110-1301 USA 20 | */ 21 | 22 | #ifndef LIBRINA_UTILS_H 23 | #define LIBRINA_UTILS_H 24 | 25 | #ifdef __cplusplus 26 | 27 | #define __stringify(X) #X 28 | #define stringify(X) __stringify(X) 29 | 30 | size_t get_page_size(); 31 | 32 | #endif 33 | 34 | #endif 35 | -------------------------------------------------------------------------------- /librina/test/.gitignore: -------------------------------------------------------------------------------- 1 | /run-java 2 | /*.class 3 | /*.[ao] 4 | 5 | /test-01 6 | /test-02 7 | /test-03 8 | /test-core 9 | /test-netlink-manager 10 | /test-concurrency 11 | /test-netlink-parsers 12 | /test-librina 13 | /test-syscalls 14 | /test-cdap 15 | /test-timer 16 | -------------------------------------------------------------------------------- /librina/test/run-java.in: -------------------------------------------------------------------------------- 1 | #!@SHELL@ 2 | 3 | # 4 | # run-java-test 5 | # 6 | # Written by: Francesco Salvestrini 7 | # Eduard Grasa 8 | # 9 | 10 | me="run-java" 11 | 12 | CP=@builddir@:@abs_top_builddir@/wrap/java 13 | 14 | TEST=$1 15 | 16 | echo "$me: Compiling Java test $TEST ..." 17 | @JAVAC@ -classpath $CP $1 || { 18 | echo "$me: Cannot compile $1" 19 | exit 1 20 | } 21 | 22 | #LP=@abs_top_builddir@/src:$@top_builddir@/wrap/java:@libdir@ 23 | LP=@libdir@ 24 | 25 | CLASS=`echo $TEST | sed -e 's,\.java\$,,'` 26 | 27 | echo "$me: Running Java class $CLASS ..." 28 | LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$LP java -classpath $CP $CLASS || { 29 | echo "$me: Cannot run $CLASS" 30 | exit 1 31 | } 32 | 33 | echo "$me: Completed successfully" 34 | -------------------------------------------------------------------------------- /librina/test/test-03.cc: -------------------------------------------------------------------------------- 1 | // 2 | // Test 03 3 | // 4 | // Eduard Grasa 5 | // Francesco Salvestrini 6 | // 7 | // This library is free software; you can redistribute it and/or 8 | // modify it under the terms of the GNU Lesser General Public 9 | // License as published by the Free Software Foundation; either 10 | // version 2.1 of the License, or (at your option) any later version. 11 | // 12 | // This library is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | // Lesser General Public License for more details. 16 | // 17 | // You should have received a copy of the GNU Lesser General Public 18 | // License along with this library; if not, write to the Free Software 19 | // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 20 | // MA 02110-1301 USA 21 | // 22 | 23 | #include "librina/librina.h" 24 | 25 | int main() 26 | { 27 | return 1; 28 | } 29 | -------------------------------------------------------------------------------- /librina/wrap/.gitignore: -------------------------------------------------------------------------------- 1 | *.l[ao] 2 | -------------------------------------------------------------------------------- /librina/wrap/Makefile.am: -------------------------------------------------------------------------------- 1 | # 2 | # Makefile.am 3 | # 4 | # Written by: Francesco Salvestrini 5 | # 6 | 7 | SUBDIRS = \ 8 | rina-api 9 | 10 | EXTRA_DIST = \ 11 | librina.i \ 12 | stdlist.i 13 | -------------------------------------------------------------------------------- /librina/wrap/rina-api/Makefile.am: -------------------------------------------------------------------------------- 1 | SUBDIRS = \ 2 | src \ 3 | include 4 | 5 | EXTRA_DIST = \ 6 | rinapi.i 7 | -------------------------------------------------------------------------------- /librina/wrap/rina-api/include/Makefile.am: -------------------------------------------------------------------------------- 1 | 2 | SUBDIRS = \ 3 | rina 4 | -------------------------------------------------------------------------------- /librina/wrap/rina-api/include/rina/Makefile.am: -------------------------------------------------------------------------------- 1 | 2 | rina_apidir=$(includedir)/rina 3 | 4 | nobase_rina_api_HEADERS = \ 5 | api.h 6 | -------------------------------------------------------------------------------- /librina/wrap/rina-api/rinapi.i: -------------------------------------------------------------------------------- 1 | %module rinapi 2 | %{ 3 | /* Includes the header in the wrapper code */ 4 | #include "rina/api.h" 5 | %} 6 | 7 | %apply int { uint32_t }; 8 | %apply long { uint64_t }; 9 | %apply short { uint16_t }; 10 | %apply short { uint8_t }; 11 | 12 | // Type typemaps for marshalling char ** 13 | %typemap(jni) char ** "jstring" 14 | %typemap(jtype) char ** "java.lang.String" 15 | %typemap(jstype) char ** "java.lang.String" 16 | 17 | // Typemaps for char ** as a parameter output type 18 | %typemap(in) char ** (char *ppstring = 0) %{ 19 | $1 = &ppstring; 20 | %} 21 | %typemap(argout) char ** { 22 | // Give Java proxy the C pointer (of newly created object) 23 | jclass clazz = (*jenv)->FindClass(jenv, "jstring"); 24 | jfieldID fid = (*jenv)->GetFieldID(jenv, clazz, "swigCPtr", "J"); 25 | jlong cPtr = 0; 26 | *(char **)&cPtr = *$1; 27 | (*jenv)->SetLongField(jenv, $input, fid, cPtr); 28 | } 29 | %typemap(javain) char ** "$javainput" 30 | 31 | /* Parse the header file to generate wrappers */ 32 | %include "rina/api.h" 33 | -------------------------------------------------------------------------------- /librina/wrap/rina-api/src/Makefile.am: -------------------------------------------------------------------------------- 1 | # 2 | # Makefile.am 3 | 4 | librina_api_la_SOURCES = \ 5 | rina-api.cc 6 | 7 | librina_api_la_LDFLAGS = 8 | librina_api_la_LIBADD = \ 9 | $(top_builddir)/src/librina.la \ 10 | -ldl 11 | librina_api_la_CPPFLAGS = \ 12 | $(CXX_SYSINCLUDES) \ 13 | -I$(top_srcdir)/include \ 14 | -I$(srcdir)/../include \ 15 | -I$(top_srcdir)/src \ 16 | $(CPPFLAGS_EXTRA) 17 | librina_api_la_CXXFLAGS = \ 18 | $(CXXFLAGS_EXTRA) 19 | 20 | lib_LTLIBRARIES = librina-api.la 21 | 22 | EXTRA_DIST = \ 23 | librina-api.pc.in 24 | 25 | edit = $(SED) \ 26 | -e 's|@PACKAGE_VERSION[@]|$(PACKAGE_VERSION)|g' \ 27 | -e 's|@PACKAGE_URL[@]|$(PACKAGE_URL)|g' \ 28 | -e 's|@prefix[@]|$(prefix)|g' \ 29 | -e 's|@includedir[@]|$(includedir)|g' \ 30 | -e 's|@libdir[@]|$(libdir)|g' 31 | 32 | 33 | librina-api.pc: Makefile librina-api.pc.in 34 | rm -f $@ $@.tmp 35 | srcdir=''; \ 36 | test -f ./$@.in || srcdir=$(srcdir)/; \ 37 | $(edit) $${srcdir}$@.in >$@.tmp 38 | chmod a-w $@.tmp 39 | mv $@.tmp $@ 40 | 41 | CLEANFILES = librina-api.pc 42 | 43 | pkgconfigdir = $(libdir)/pkgconfig 44 | pkgconfig_DATA = librina-api.pc 45 | 46 | -------------------------------------------------------------------------------- /librina/wrap/rina-api/src/librina-api.pc.in: -------------------------------------------------------------------------------- 1 | prefix=@prefix@ 2 | libdir=@libdir@ 3 | includedir=@includedir@ 4 | 5 | Name: RINA-API 6 | Description: RINA API wrapper for IRATI librina 7 | Version: @PACKAGE_VERSION@ 8 | URL: @PACKAGE_URL@ 9 | Requires: librina 10 | Libs: -L${libdir} -lrina-api 11 | Cflags: -I${includedir} 12 | -------------------------------------------------------------------------------- /load-irati-modules: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # -*- sh -*- 3 | 4 | # 5 | # Written by: Eduard Grasa 6 | # 7 | 8 | modprobe rina-irati-core irati_verbosity=7 9 | modprobe rina-default-plugin 10 | modprobe normal-ipcp 11 | modprobe shim-eth 12 | modprobe shim-tcp-udp 13 | -------------------------------------------------------------------------------- /misc/code-stats: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | 4 | function usage() 5 | { 6 | echo "USAGE: ./code-stats [ROOT_IRATI_DIR]" 7 | exit 1 8 | } 9 | 10 | function stats() 11 | { 12 | name=$1 13 | shift 14 | count=$(find $@ -type f -and \( -name "*.c" -or -name "*.h" -or -name "*.cc" -or -name "*.hpp" \)| grep -v "tclap" | grep -v "jsoncpp" | grep -v "\.mod\.c" | xargs wc -l | tail -n 1 | awk '{print $1}') 15 | printf "%-15s %10s lines\n" $name $count 16 | } 17 | 18 | if [ -n "$1" ]; then 19 | [ -d "$1" ] || usage 20 | cd "$1" 21 | fi 22 | 23 | [ -d "librina" ] || usage 24 | 25 | stats kernel linux/net/rina 26 | stats librina librina/include librina/src 27 | stats rinad rinad/src 28 | stats rina-tools rina-tools/src 29 | stats total linux/net/rina librina/include librina/src rinad/src rina-tools/src 30 | 31 | echo -e "\nCode editing statistics between IRATI 1.0.0 and current pristine development branch" 32 | git diff --stat v1.0.0 pristine-1.5 librina/ rinad/ rina-tools/src/ linux/net/rina plugins/ | tail -n 1 33 | -------------------------------------------------------------------------------- /misc/emacs/emacs: -------------------------------------------------------------------------------- 1 | (custom-set-variables 2 | ;; custom-set-variables was added by Custom. 3 | ;; If you edit it by hand, you could mess it up, so be careful. 4 | ;; Your init file should contain only one such instance. 5 | ;; If there is more than one, they won't work right. 6 | '(column-number-mode t) 7 | '(indent-tabs-mode nil) 8 | '(inhibit-startup-screen t) 9 | '(show-paren-mode t) 10 | '(size-indication-mode t) 11 | '(tool-bar-mode nil)) 12 | (custom-set-faces 13 | ;; custom-set-faces was added by Custom. 14 | ;; If you edit it by hand, you could mess it up, so be careful. 15 | ;; Your init file should contain only one such instance. 16 | ;; If there is more than one, they won't work right. 17 | ) 18 | -------------------------------------------------------------------------------- /plugins/Makefile: -------------------------------------------------------------------------------- 1 | directories=$(shell ls -d */) 2 | 3 | ifndef KREL 4 | KREL=`uname -r` 5 | endif 6 | 7 | ifndef KDIR 8 | KDIR=/lib/modules/$(KREL)/build 9 | endif 10 | 11 | ifndef IRATI_KSDIR 12 | IRATI_KSDIR=${PWD}/../kernel 13 | endif 14 | 15 | all: 16 | for i in $(directories); do \ 17 | cd $$i || exit 1; \ 18 | make INSTALLDIR=$(INSTALLDIR) KDIR=$(KDIR) IRATI_KSDIR=$(IRATI_KSDIR) KREL=$(KREL) || exit 1; \ 19 | cd ..; \ 20 | done 21 | 22 | clean: 23 | for i in $(directories); do \ 24 | cd $$i || exit 1; \ 25 | make INSTALLDIR=$(INSTALLDIR) KDIR=$(KDIR) IRATI_KSDIR=$(IRATI_KSDIR) KREL=$(KREL) clean || exit 1; \ 26 | cd ..; \ 27 | done 28 | 29 | install: 30 | for i in $(directories); do \ 31 | cd $$i || exit 1; \ 32 | make INSTALLDIR=$(INSTALLDIR) KDIR=$(KDIR) IRATI_KSDIR=$(IRATI_KSDIR) KREL=$(KREL) install || exit 1;\ 33 | cd ..; \ 34 | done 35 | -------------------------------------------------------------------------------- /plugins/cong_avoidance/.gitignore: -------------------------------------------------------------------------------- 1 | /*~ 2 | /*.o 3 | /.*.cmd 4 | /.tmp_versions 5 | /Module.symvers 6 | /modules.order 7 | /*.ko 8 | /*.mod.c 9 | /*.swp 10 | -------------------------------------------------------------------------------- /plugins/cong_avoidance/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # Written by Francesco Salvestrini 3 | # 4 | ifndef KREL 5 | KREL=`uname -r` 6 | endif 7 | 8 | ifndef KDIR 9 | KDIR=/lib/modules/$(KREL)/build 10 | endif 11 | 12 | ifndef IRATI_KSDIR 13 | IRATI_KSDIR=${PWD}/../../kernel 14 | endif 15 | 16 | ccflags-y = -Wtype-limits -I${src}/../../kernel -I${src}/../../include 17 | 18 | obj-m := cas-plugin.o 19 | cas-plugin-y := cas-plugin-ps.o rmt-ps-cas.o dtcp-ps-cas.o 20 | 21 | all: 22 | $(MAKE) -C $(KDIR) KBUILD_EXTRA_SYMBOLS=${IRATI_KSDIR}/Module.symvers M=$$PWD modules 23 | 24 | clean: 25 | rm -r -f *.o *.ko *.mod.c *.mod.o Module.symvers .*.cmd .tmp_versions modules.order 26 | 27 | install: 28 | $(MAKE) -C $(KDIR) M=$$PWD modules_install 29 | cp cas-plugin.manifest /lib/modules/$(KREL)/extra/ 30 | depmod -a 31 | 32 | uninstall: 33 | @echo "This target has not been implemented yet" 34 | @exit 1 35 | -------------------------------------------------------------------------------- /plugins/cong_avoidance/cas-plugin.manifest: -------------------------------------------------------------------------------- 1 | { 2 | "PluginName": "cas-plugin", 3 | "PluginVersion": "1", 4 | "PolicySets" : [ 5 | { 6 | "Name": "cas-ps", 7 | "Component": "rmt", 8 | "Version" : "1" 9 | }, 10 | { 11 | "Name": "cas-ps", 12 | "Component": "dtcp", 13 | "Version" : "1" 14 | } 15 | ] 16 | } 17 | -------------------------------------------------------------------------------- /plugins/cong_avoidance/cas-plugin.mod: -------------------------------------------------------------------------------- 1 | /home/terminet/stack/plugins/cong_avoidance/cas-plugin-ps.o /home/terminet/stack/plugins/cong_avoidance/rmt-ps-cas.o /home/terminet/stack/plugins/cong_avoidance/dtcp-ps-cas.o 2 | 3 | -------------------------------------------------------------------------------- /plugins/dctcp/.gitignore: -------------------------------------------------------------------------------- 1 | /*~ 2 | /*.o 3 | /.*.cmd 4 | /.tmp_versions 5 | /Module.symvers 6 | /modules.order 7 | /*.ko 8 | /*.mod.c 9 | /*.swp 10 | -------------------------------------------------------------------------------- /plugins/dctcp/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # Written by Francesco Salvestrini 3 | # 4 | 5 | ifndef KREL 6 | KREL=`uname -r` 7 | endif 8 | 9 | ifndef KDIR 10 | KDIR=/lib/modules/$(KREL)/build 11 | endif 12 | 13 | ifndef IRATI_KSDIR 14 | IRATI_KSDIR=${PWD}/../../kernel 15 | endif 16 | 17 | ccflags-y = -Wtype-limits -I${src}/../../kernel -I${src}/../../include 18 | 19 | obj-m := dctcp-plugin.o 20 | dctcp-plugin-y := dctcp-plugin-ps.o rmt-ps-dctcp.o dtcp-ps-dctcp.o 21 | 22 | all: 23 | $(MAKE) -C $(KDIR) KBUILD_EXTRA_SYMBOLS=${IRATI_KSDIR}/Module.symvers M=$$PWD modules 24 | 25 | clean: 26 | rm -r -f *.o *.ko *.mod.c *.mod.o Module.symvers .*.cmd .tmp_versions modules.order 27 | 28 | install: 29 | $(MAKE) -C $(KDIR) M=$$PWD modules_install 30 | cp dctcp-plugin.manifest /lib/modules/$(KREL)/extra/ 31 | depmod -a 32 | 33 | uninstall: 34 | @echo "This target has not been implemented yet" 35 | @exit 1 36 | -------------------------------------------------------------------------------- /plugins/dctcp/dctcp-plugin.manifest: -------------------------------------------------------------------------------- 1 | { 2 | "PluginName": "dctcp-plugin", 3 | "PluginVersion": "1", 4 | "PolicySets" : [ 5 | { 6 | "Name": "dctcp-ps", 7 | "Component": "rmt", 8 | "Version" : "1" 9 | }, 10 | { 11 | "Name": "dctcp-ps", 12 | "Component": "dtcp", 13 | "Version" : "1" 14 | } 15 | ] 16 | } 17 | -------------------------------------------------------------------------------- /plugins/dctcp/dctcp-plugin.mod: -------------------------------------------------------------------------------- 1 | /home/terminet/stack/plugins/dctcp/dctcp-plugin-ps.o /home/terminet/stack/plugins/dctcp/rmt-ps-dctcp.o /home/terminet/stack/plugins/dctcp/dtcp-ps-dctcp.o 2 | 3 | -------------------------------------------------------------------------------- /plugins/dummy/.gitignore: -------------------------------------------------------------------------------- 1 | /*~ 2 | /*.o 3 | /.*.cmd 4 | /.tmp_versions 5 | /Module.symvers 6 | /modules.order 7 | /*.ko 8 | /*.mod.c 9 | -------------------------------------------------------------------------------- /plugins/dummy/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # Written by Francesco Salvestrini 3 | # 4 | 5 | ifndef KREL 6 | KREL=`uname -r` 7 | endif 8 | 9 | ifndef KDIR 10 | KDIR=/lib/modules/$(KREL)/build 11 | endif 12 | 13 | ifndef IRATI_KSDIR 14 | IRATI_KSDIR=${PWD}/../../kernel 15 | endif 16 | 17 | ccflags-y = -Wtype-limits -I${src}/../../kernel -I${src}/../../include 18 | 19 | obj-m := dummy-plugin.o 20 | dummy-plugin-y := dummy-plugin-ps.o rmt-ps-dummy.o dtcp-ps-dummy.o dtp-ps-dummy.o pft-ps-dummy.o 21 | 22 | all: 23 | $(MAKE) -C $(KDIR) KBUILD_EXTRA_SYMBOLS=${IRATI_KSDIR}/Module.symvers M=$$PWD 24 | 25 | clean: 26 | rm -r -f *.o *.ko *.mod.c *.mod.o Module.symvers .*.cmd .tmp_versions modules.order 27 | 28 | install: 29 | $(MAKE) -C $(KDIR) M=$$PWD modules_install 30 | 31 | uninstall: 32 | @echo "This target has not been implemented yet" 33 | @exit 1 34 | -------------------------------------------------------------------------------- /plugins/dummy/dummy-plugin.mod: -------------------------------------------------------------------------------- 1 | /home/terminet/stack/plugins/dummy/dummy-plugin-ps.o /home/terminet/stack/plugins/dummy/rmt-ps-dummy.o /home/terminet/stack/plugins/dummy/dtcp-ps-dummy.o /home/terminet/stack/plugins/dummy/dtp-ps-dummy.o /home/terminet/stack/plugins/dummy/pft-ps-dummy.o 2 | 3 | -------------------------------------------------------------------------------- /plugins/example-sm-plugin/.gitignore: -------------------------------------------------------------------------------- 1 | *.o 2 | *.so 3 | -------------------------------------------------------------------------------- /plugins/example-sm-plugin/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # Written by Vincenzo Maffione 3 | # 4 | 5 | # Set INSTALLDIR environment variable to the directory containing 6 | # the IRATI installation 7 | 8 | ifndef INSTALLDIR 9 | $(error The INSTALLDIR environment variable is not set) 10 | endif 11 | 12 | PLUGIN_NAME = sm-example 13 | SOURCES = \ 14 | plugin.cc \ 15 | sm-example.cc 16 | 17 | CXX = g++ 18 | CXXFLAGS = -Wall -Werror -fPIC 19 | LDFLAGS = -shared -L $(INSTALLDIR)/lib 20 | LIBS = -lrina 21 | 22 | CXXFLAGS += -I $(INSTALLDIR)/include/rinad/ipcp 23 | CXXFLAGS += -I $(INSTALLDIR)/include/rinad 24 | CXXFLAGS += -I $(INSTALLDIR)/include 25 | 26 | OBJECTS = $(SOURCES:.cc=.o) 27 | 28 | all: $(PLUGIN_NAME).so 29 | 30 | $(PLUGIN_NAME).so: $(OBJECTS) 31 | $(CXX) $(LDFLAGS) $(OBJECTS) -o $@ 32 | 33 | .cc.o: 34 | $(CXX) -c $(CXXFLAGS) $< -o $@ 35 | 36 | clean: 37 | rm -f $(OBJECTS) $(PLUGIN_NAME).so 38 | 39 | install: 40 | install $(PLUGIN_NAME).so $(INSTALLDIR)/lib/rinad/ipcp 41 | install -m 0644 $(PLUGIN_NAME).manifest $(INSTALLDIR)/lib/rinad/ipcp 42 | 43 | uninstall: 44 | -rm $(INSTALLDIR)/lib/rinad/ipcp/$(PLUGIN_NAME).so $(INSTALLDIR)/lib/rinad/ipcp/$(PLUGIN_NAME).manifest 45 | -------------------------------------------------------------------------------- /plugins/example-sm-plugin/plugin.cc: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | #define IPCP_MODULE "security-manager-example-ps" 5 | #include "ipcp-logging.h" 6 | #include "components.h" 7 | 8 | 9 | namespace rinad { 10 | 11 | extern "C" rina::IPolicySet * 12 | createSecurityManagerExamplePs(rina::ApplicationEntity * ctx); 13 | 14 | extern "C" void 15 | destroySecurityManagerExamplePs(rina::IPolicySet * ps); 16 | 17 | extern "C" int 18 | get_factories(std::vector& factories) 19 | { 20 | struct rina::PsFactory factory; 21 | 22 | factory.info.name = "example"; 23 | factory.info.app_entity = rina::ApplicationEntity::SECURITY_MANAGER_AE_NAME; 24 | factory.create = createSecurityManagerExamplePs; 25 | factory.destroy = destroySecurityManagerExamplePs; 26 | factories.push_back(factory); 27 | 28 | return 0; 29 | } 30 | 31 | } // namespace rinad 32 | -------------------------------------------------------------------------------- /plugins/example-sm-plugin/sm-example.manifest: -------------------------------------------------------------------------------- 1 | { 2 | "PluginName": "sm-example", 3 | "PluginVersion": "1", 4 | "PolicySets" : [ 5 | { 6 | "Name": "example", 7 | "Component": "security-manager", 8 | "Version" : "1" 9 | } 10 | ] 11 | } 12 | -------------------------------------------------------------------------------- /plugins/lfa/.gitignore: -------------------------------------------------------------------------------- 1 | /*~ 2 | /*.o 3 | /.*.cmd 4 | /.tmp_versions 5 | /Module.symvers 6 | /modules.order 7 | /*.ko 8 | /*.mod.c 9 | -------------------------------------------------------------------------------- /plugins/lfa/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # Written by Francesco Salvestrini 3 | # 4 | 5 | ifndef KREL 6 | KREL=`uname -r` 7 | endif 8 | 9 | ifndef KDIR 10 | KDIR=/lib/modules/$(KREL)/build 11 | endif 12 | 13 | ifndef IRATI_KSDIR 14 | IRATI_KSDIR=${PWD}/../../kernel 15 | endif 16 | 17 | ccflags-y = -Wtype-limits -I${src}/../../kernel -I${src}/../../include 18 | 19 | obj-m := pff-lfa.o 20 | pff-lfa-y := ps.o 21 | 22 | all: 23 | $(MAKE) -C $(KDIR) KBUILD_EXTRA_SYMBOLS=${IRATI_KSDIR}/Module.symvers M=$$PWD 24 | 25 | clean: 26 | rm -r -f *.o *.ko *.mod.c *.mod.o Module.symvers .*.cmd .tmp_versions modules.order 27 | 28 | install: 29 | $(MAKE) -C $(KDIR) M=$$PWD modules_install 30 | cp pff-lfa.manifest /lib/modules/$(KREL)/extra/ 31 | depmod -a 32 | 33 | uninstall: 34 | @echo "This target has not been implemented yet" 35 | @exit 1 36 | -------------------------------------------------------------------------------- /plugins/lfa/pff-lfa.manifest: -------------------------------------------------------------------------------- 1 | { 2 | "PluginName": "pff-lfa", 3 | "PluginVersion": "1", 4 | "PolicySets" : [ 5 | { 6 | "Name": "lfa", 7 | "Component": "pff", 8 | "Version" : "1" 9 | } 10 | ] 11 | } 12 | -------------------------------------------------------------------------------- /plugins/lfa/pff-lfa.mod: -------------------------------------------------------------------------------- 1 | /home/terminet/stack/plugins/lfa/ps.o 2 | 3 | -------------------------------------------------------------------------------- /plugins/multipath/.gitignore: -------------------------------------------------------------------------------- 1 | /*~ 2 | /*.o 3 | /.*.cmd 4 | /.tmp_versions 5 | /Module.symvers 6 | /modules.order 7 | /*.ko 8 | /*.mod.c 9 | /*.swp 10 | -------------------------------------------------------------------------------- /plugins/multipath/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # Written by Francesco Salvestrini 3 | # 4 | 5 | ifndef KREL 6 | KREL=`uname -r` 7 | endif 8 | 9 | ifndef KDIR 10 | KDIR=/lib/modules/$(KREL)/build 11 | endif 12 | 13 | ifndef IRATI_KSDIR 14 | IRATI_KSDIR=${PWD}/../../kernel 15 | endif 16 | 17 | ccflags-y = -Wtype-limits -I${src}/../../kernel -I${src}/../../include 18 | 19 | obj-m := pff-multipath.o 20 | pff-multipath-y := mp-plugin-ps.o pff-ps-multipath.o 21 | 22 | all: 23 | $(MAKE) -C $(KDIR) KBUILD_EXTRA_SYMBOLS=${IRATI_KSDIR}/Module.symvers M=$$PWD 24 | 25 | clean: 26 | rm -r -f *.o *.ko *.mod.c *.mod.o Module.symvers .*.cmd .tmp_versions modules.order 27 | 28 | install: 29 | $(MAKE) -C $(KDIR) M=$$PWD modules_install 30 | cp pff-multipath.manifest /lib/modules/$(KREL)/extra/ 31 | depmod -a 32 | 33 | uninstall: 34 | @echo "This target has not been implemented yet" 35 | @exit 1 36 | -------------------------------------------------------------------------------- /plugins/multipath/pff-multipath.manifest: -------------------------------------------------------------------------------- 1 | { 2 | "PluginName": "pff-multipath", 3 | "PluginVersion": "1", 4 | "PolicySets" : [ 5 | { 6 | "Name": "multipath", 7 | "Component": "pff", 8 | "Version" : "1" 9 | } 10 | ] 11 | } 12 | -------------------------------------------------------------------------------- /plugins/multipath/pff-multipath.mod: -------------------------------------------------------------------------------- 1 | /home/terminet/stack/plugins/multipath/mp-plugin-ps.o /home/terminet/stack/plugins/multipath/pff-ps-multipath.o 2 | 3 | -------------------------------------------------------------------------------- /plugins/qta_mux/.gitignore: -------------------------------------------------------------------------------- 1 | /*~ 2 | /*.o 3 | /.*.cmd 4 | /.tmp_versions 5 | /Module.symvers 6 | /modules.order 7 | /*.ko 8 | /*.mod.c 9 | /*.swp 10 | -------------------------------------------------------------------------------- /plugins/qta_mux/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # Written by Francesco Salvestrini 3 | # 4 | 5 | ifndef KREL 6 | KREL=`uname -r` 7 | endif 8 | 9 | ifndef KDIR 10 | KDIR=/lib/modules/$(KREL)/build 11 | endif 12 | 13 | ifndef IRATI_KSDIR 14 | IRATI_KSDIR=${PWD}/../../kernel 15 | endif 16 | 17 | ccflags-y = -Wtype-limits -I${src}/../../kernel -I${src}/../../include 18 | 19 | obj-m := qta-mux-plugin.o 20 | qta-mux-plugin-y := qta-mux-debug.o qta-mux.o 21 | 22 | all: 23 | $(MAKE) -C $(KDIR) KBUILD_EXTRA_SYMBOLS=${IRATI_KSDIR}/Module.symvers M=$$PWD 24 | 25 | clean: 26 | rm -r -f *.o *.ko *.mod.c *.mod.o Module.symvers .*.cmd .tmp_versions modules.order 27 | 28 | install: 29 | $(MAKE) -C $(KDIR) M=$$PWD modules_install 30 | cp qta-mux-plugin.manifest /lib/modules/$(KREL)/extra/ 31 | depmod -a 32 | 33 | uninstall: 34 | @echo "This target has not been implemented yet" 35 | @exit 1 36 | -------------------------------------------------------------------------------- /plugins/qta_mux/qta-mux-plugin.manifest: -------------------------------------------------------------------------------- 1 | { 2 | "PluginName": "qta-mux-plugin", 3 | "PluginVersion": "1", 4 | "PolicySets" : [ 5 | { 6 | "Name": "qta-mux-ps", 7 | "Component": "rmt", 8 | "Version" : "1" 9 | } 10 | ] 11 | } 12 | -------------------------------------------------------------------------------- /plugins/qta_mux/qta-mux-plugin.mod: -------------------------------------------------------------------------------- 1 | /home/terminet/stack/plugins/qta_mux/qta-mux-debug.o /home/terminet/stack/plugins/qta_mux/qta-mux.o 2 | 3 | -------------------------------------------------------------------------------- /plugins/rdsr-ps/Makefile: -------------------------------------------------------------------------------- 1 | directories=$(shell ls -d */) 2 | 3 | ifndef INSTALLDIR 4 | $(error "INSTALLDIR is not set") 5 | endif 6 | 7 | ifndef KDIR 8 | $(error "KDIR is not set") 9 | endif 10 | 11 | ifndef KREL 12 | $(error "KREL is not set") 13 | endif 14 | 15 | all: 16 | for i in $(directories); do \ 17 | cd $$i || exit 1; \ 18 | make KDIR=$(KDIR) INSTALLDIR=$(INSTALLDIR) KREL=$(KREL) || exit 1; \ 19 | cd ..; \ 20 | done 21 | 22 | clean: 23 | for i in $(directories); do \ 24 | cd $$i || exit 1; \ 25 | make KDIR=$(KDIR) INSTALLDIR=$(INSTALLDIR) KREL=$(KREL) clean || exit 1; \ 26 | cd ..; \ 27 | done 28 | 29 | install: 30 | for i in $(directories); do \ 31 | cd $$i || exit 1; \ 32 | make KDIR=$(KDIR) INSTALLDIR=$(INSTALLDIR) KREL=$(KREL) install || exit 1;\ 33 | cd ..; \ 34 | done 35 | -------------------------------------------------------------------------------- /plugins/rdsr-ps/cdrr/.gitignore: -------------------------------------------------------------------------------- 1 | /*~ 2 | /*.o 3 | /.*.cmd 4 | /.tmp_versions 5 | /Module.symvers 6 | /modules.order 7 | /*.ko 8 | /*.mod.c 9 | /*.swp 10 | -------------------------------------------------------------------------------- /plugins/rdsr-ps/cdrr/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # Written by Francesco Salvestrini 3 | # 4 | # Author: Kewin Rausch 5 | # 6 | 7 | ifndef KREL 8 | KREL=`uname -r` 9 | endif 10 | 11 | ifndef KDIR 12 | KDIR=/lib/modules/$(KREL)/build 13 | endif 14 | 15 | ifndef IRATI_KSDIR 16 | IRATI_KSDIR=${PWD}/../../../kernel 17 | endif 18 | 19 | ccflags-y = -Wtype-limits -I${src}/../../../kernel -I${src}/../../../include 20 | 21 | obj-m := dtcp-ps-cdrr.o 22 | qta-mux-plugin-y := cdrr.o 23 | 24 | all: 25 | $(MAKE) -C $(KDIR) KBUILD_EXTRA_SYMBOLS=${IRATI_KSDIR}/Module.symvers M=$$PWD 26 | 27 | clean: 28 | rm -r -f *.o *.ko *.mod.c *.mod.o Module.symvers .*.cmd .tmp_versions modules.order 29 | 30 | install: 31 | $(MAKE) -C $(KDIR) M=$$PWD modules_install 32 | cp cdrr.manifest /lib/modules/$(KREL)/extra/ 33 | depmod -a 34 | 35 | uninstall: 36 | @echo "This target has not been implemented yet" 37 | @exit 1 38 | -------------------------------------------------------------------------------- /plugins/rdsr-ps/cdrr/cdrr.manifest: -------------------------------------------------------------------------------- 1 | { 2 | "PluginName": "cdrr", 3 | "PluginVersion": "1", 4 | "PolicySets" : [ 5 | { 6 | "Name": "cdrr", 7 | "Component": "dtcp", 8 | "Version" : "1" 9 | } 10 | ] 11 | } 12 | -------------------------------------------------------------------------------- /plugins/rdsr-ps/cdrr/dtcp-ps-cdrr.mod: -------------------------------------------------------------------------------- 1 | /home/terminet/stack/plugins/rdsr-ps/cdrr/dtcp-ps-cdrr.o 2 | 3 | -------------------------------------------------------------------------------- /plugins/rdsr-ps/ecn/.gitignore: -------------------------------------------------------------------------------- 1 | /*~ 2 | /*.o 3 | /.*.cmd 4 | /.tmp_versions 5 | /Module.symvers 6 | /modules.order 7 | /*.ko 8 | /*.mod.c 9 | /*.swp 10 | -------------------------------------------------------------------------------- /plugins/rdsr-ps/ecn/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # Written by Francesco Salvestrini 3 | # 4 | 5 | ifndef KREL 6 | KREL=`uname -r` 7 | endif 8 | 9 | ifndef KDIR 10 | KDIR=/lib/modules/$(KREL)/build 11 | endif 12 | 13 | ifndef IRATI_KSDIR 14 | IRATI_KSDIR=${PWD}/../../../kernel 15 | endif 16 | 17 | ccflags-y = -Wtype-limits -I${src}/../../../kernel -I${src}/../../../include 18 | 19 | obj-m := rmt-ps-ecn.o 20 | qta-mux-plugin-y := ecn.o 21 | 22 | all: 23 | $(MAKE) -C $(KDIR) KBUILD_EXTRA_SYMBOLS=${IRATI_KSDIR}/Module.symvers M=$$PWD 24 | 25 | clean: 26 | rm -r -f *.o *.ko *.mod.c *.mod.o Module.symvers .*.cmd .tmp_versions modules.order 27 | 28 | install: 29 | $(MAKE) -C $(KDIR) M=$$PWD modules_install 30 | cp ecn.manifest /lib/modules/$(KREL)/extra/ 31 | depmod -a 32 | 33 | uninstall: 34 | @echo "This target has not been implemented yet" 35 | @exit 1 36 | -------------------------------------------------------------------------------- /plugins/rdsr-ps/ecn/ecn.manifest: -------------------------------------------------------------------------------- 1 | { 2 | "PluginName": "ecn", 3 | "PluginVersion": "1", 4 | "PolicySets" : [ 5 | { 6 | "Name": "ecn", 7 | "Component": "rmt", 8 | "Version" : "1" 9 | } 10 | ] 11 | } 12 | -------------------------------------------------------------------------------- /plugins/rdsr-ps/ecn/rmt-ps-ecn.mod: -------------------------------------------------------------------------------- 1 | /home/terminet/stack/plugins/rdsr-ps/ecn/rmt-ps-ecn.o 2 | 3 | -------------------------------------------------------------------------------- /plugins/rdsr-ps/fare/.gitignore: -------------------------------------------------------------------------------- 1 | /*~ 2 | /*.o 3 | /*.so 4 | /.*.cmd 5 | /.tmp_versions 6 | /Module.symvers 7 | /modules.order 8 | /*.ko 9 | /*.mod.c 10 | /*.swp 11 | -------------------------------------------------------------------------------- /plugins/rdsr-ps/fare/Makefile: -------------------------------------------------------------------------------- 1 | # Set INSTALLDIR environment variable to the directory containing 2 | # the IRATI installation 3 | 4 | ifndef INSTALLDIR 5 | $(error The INSTALLDIR environment variable is not set) 6 | endif 7 | 8 | PLUGIN_NAME = fare 9 | SOURCES = fa-ps-fare.cc 10 | 11 | CXX = g++ 12 | CXXFLAGS = -Wall -Werror -fPIC 13 | LDFLAGS = -shared -L $(INSTALLDIR)/lib 14 | LIBS = -lrina 15 | 16 | CXXFLAGS += -I $(INSTALLDIR)/include/rinad/ipcp 17 | CXXFLAGS += -I $(INSTALLDIR)/include/rinad 18 | CXXFLAGS += -I $(INSTALLDIR)/include 19 | 20 | OBJECTS = $(SOURCES:.cc=.o) 21 | 22 | all: $(PLUGIN_NAME).so 23 | 24 | $(PLUGIN_NAME).so: $(OBJECTS) 25 | $(CXX) $(LDFLAGS) $(OBJECTS) -o $@ 26 | 27 | .cc.o: 28 | $(CXX) -c $(CXXFLAGS) $< -o $@ 29 | 30 | clean: 31 | rm -f $(OBJECTS) $(PLUGIN_NAME).so 32 | 33 | install: 34 | install $(PLUGIN_NAME).so $(INSTALLDIR)/lib/rinad/ipcp 35 | install -m 0644 $(PLUGIN_NAME).manifest $(INSTALLDIR)/lib/rinad/ipcp 36 | 37 | uninstall: 38 | -rm $(INSTALLDIR)/lib/rinad/ipcp/$(PLUGIN_NAME).so $(INSTALLDIR)/lib/rinad/ipcp/$(PLUGIN_NAME).manifest 39 | -------------------------------------------------------------------------------- /plugins/rdsr-ps/fare/README: -------------------------------------------------------------------------------- 1 | Flow Allocation Rate Enforcement policy for OpenIRATI. 2 | Author: Kewin Rausch 3 | 4 | ******************************************************************************** 5 | RESUME 6 | ******************************************************************************** 7 | This simply policy allows to extract, from the flow specifications, the average 8 | bandwidth value and assign it to the rate dtcp configuration sending rate. Such 9 | policy allows you to start AE instances which requires a personalized rate on 10 | the same QoS cube. -------------------------------------------------------------------------------- /plugins/rdsr-ps/fare/fare.manifest: -------------------------------------------------------------------------------- 1 | { 2 | "PluginName": "fare", 3 | "PluginVersion": "1", 4 | "PolicySets" : [ 5 | { 6 | "Name": "fare", 7 | "Component": "flow-allocator", 8 | "Version" : "1" 9 | } 10 | ] 11 | } 12 | -------------------------------------------------------------------------------- /plugins/rdsr-ps/pffb/.gitignore: -------------------------------------------------------------------------------- 1 | /*~ 2 | /*.o 3 | /.*.cmd 4 | /.tmp_versions 5 | /Module.symvers 6 | /modules.order 7 | /*.ko 8 | /*.mod.c 9 | /*.swp 10 | -------------------------------------------------------------------------------- /plugins/rdsr-ps/pffb/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # Written by Francesco Salvestrini 3 | # 4 | 5 | ifndef KREL 6 | KREL=`uname -r` 7 | endif 8 | 9 | ifndef KDIR 10 | KDIR=/lib/modules/$(KREL)/build 11 | endif 12 | 13 | ifndef IRATI_KSDIR 14 | IRATI_KSDIR=${PWD}/../../../kernel 15 | endif 16 | 17 | ccflags-y = -Wtype-limits -I${src}/../../../kernel -I${src}/../../../include 18 | 19 | obj-m := pff-ps-pffb.o 20 | qta-mux-plugin-y := pffb.o 21 | 22 | all: 23 | $(MAKE) -C $(KDIR) KBUILD_EXTRA_SYMBOLS=${IRATI_KSDIR}/Module.symvers M=$$PWD 24 | 25 | clean: 26 | rm -r -f *.o *.ko *.mod.c *.mod.o Module.symvers .*.cmd .tmp_versions modules.order 27 | 28 | install: 29 | $(MAKE) -C $(KDIR) M=$$PWD modules_install 30 | cp pffb.manifest /lib/modules/$(KREL)/extra/ 31 | depmod -a 32 | 33 | uninstall: 34 | @echo "This target has not been implemented yet" 35 | @exit 1 36 | -------------------------------------------------------------------------------- /plugins/rdsr-ps/pffb/README: -------------------------------------------------------------------------------- 1 | PDU Forwarding Flow Balancing policy for OpenIRATI. 2 | Author: Kewin Rausch 3 | 4 | ******************************************************************************** 5 | RESUME 6 | ******************************************************************************** 7 | This policy allow to select at compile time or at runtime (alpha) the preferred 8 | forwarding strategy to apply to packets which are flowing through the stack. -------------------------------------------------------------------------------- /plugins/rdsr-ps/pffb/pff-ps-pffb.mod: -------------------------------------------------------------------------------- 1 | /home/terminet/stack/plugins/rdsr-ps/pffb/pff-ps-pffb.o 2 | 3 | -------------------------------------------------------------------------------- /plugins/rdsr-ps/pffb/pffb.manifest: -------------------------------------------------------------------------------- 1 | { 2 | "PluginName": "pffb", 3 | "PluginVersion": "1", 4 | "PolicySets" : [ 5 | { 6 | "Name": "pffb", 7 | "Component": "pff", 8 | "Version" : "1" 9 | } 10 | ] 11 | } 12 | -------------------------------------------------------------------------------- /plugins/red/.gitignore: -------------------------------------------------------------------------------- 1 | /*~ 2 | /*.o 3 | /.*.cmd 4 | /.tmp_versions 5 | /Module.symvers 6 | /modules.order 7 | /*.ko 8 | /*.mod.c 9 | /*.swp 10 | -------------------------------------------------------------------------------- /plugins/red/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # Written by Francesco Salvestrini 3 | # 4 | 5 | ifndef KREL 6 | KREL=`uname -r` 7 | endif 8 | 9 | ifndef KDIR 10 | KDIR=/lib/modules/$(KREL)/build 11 | endif 12 | 13 | ifndef IRATI_KSDIR 14 | IRATI_KSDIR=${PWD}/../../kernel 15 | endif 16 | 17 | ccflags-y = -Wtype-limits -I${src}/../../kernel -I${src}/../../include 18 | 19 | obj-m := red-plugin.o 20 | red-plugin-y := rmt-ps-debug.o dtcp-ps-debug.o red-ps.o rmt-ps-red.o dtcp-ps-red.o 21 | 22 | all: 23 | $(MAKE) -C $(KDIR) KBUILD_EXTRA_SYMBOLS=${IRATI_KSDIR}/Module.symvers M=$$PWD 24 | 25 | clean: 26 | rm -r -f *.o *.ko *.mod.c *.mod.o Module.symvers .*.cmd .tmp_versions modules.order 27 | 28 | install: 29 | $(MAKE) -C $(KDIR) M=$$PWD modules_install 30 | cp red-plugin.manifest /lib/modules/$(KREL)/extra/ 31 | depmod -a 32 | 33 | uninstall: 34 | @echo "This target has not been implemented yet" 35 | @exit 1 36 | -------------------------------------------------------------------------------- /plugins/red/dtcp-ps-debug.h: -------------------------------------------------------------------------------- 1 | /* 2 | * TCP-like RED Congestion avoidance policy set 3 | * Debug operations for DTCP PS 4 | * 5 | * Leonardo Bergesio 6 | * 7 | * This program is free software; you can casistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; either version 2 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program; if not, write to the Free Software 19 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 20 | */ 21 | 22 | #define DTCP_DEBUG 0 23 | #define DTCP_DEBUG_SIZE 300000 24 | 25 | struct red_dtcp_debug { 26 | unsigned long ws_log[DTCP_DEBUG_SIZE]; 27 | unsigned int ws_index; 28 | struct list_head list; 29 | }; 30 | 31 | int red_dtcp_debug_proc_init(void); 32 | void red_dtcp_debug_proc_exit(void); 33 | struct red_dtcp_debug * red_dtcp_debug_create(void); 34 | -------------------------------------------------------------------------------- /plugins/red/red-plugin.manifest: -------------------------------------------------------------------------------- 1 | { 2 | "PluginName": "red-plugin", 3 | "PluginVersion": "1", 4 | "PolicySets" : [ 5 | { 6 | "Name": "red-ps", 7 | "Component": "rmt", 8 | "Version" : "1" 9 | }, 10 | { 11 | "Name": "red-ps", 12 | "Component": "dtcp", 13 | "Version" : "1" 14 | } 15 | ] 16 | } 17 | -------------------------------------------------------------------------------- /plugins/red/red-plugin.mod: -------------------------------------------------------------------------------- 1 | /home/terminet/stack/plugins/red/rmt-ps-debug.o /home/terminet/stack/plugins/red/dtcp-ps-debug.o /home/terminet/stack/plugins/red/red-ps.o /home/terminet/stack/plugins/red/rmt-ps-red.o /home/terminet/stack/plugins/red/dtcp-ps-red.o 2 | 3 | -------------------------------------------------------------------------------- /plugins/red/rmt-ps-debug.h: -------------------------------------------------------------------------------- 1 | /* 2 | * TCP-like RED Congestion avoidance policy set 3 | * Debug operations for RMT PS 4 | * 5 | * Leonardo Bergesio 6 | * 7 | * This program is free software; you can casistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; either version 2 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program; if not, write to the Free Software 19 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 20 | */ 21 | 22 | #include "common.h" 23 | #include 24 | 25 | #define RMT_DEBUG 0 26 | #define RMT_DEBUG_SIZE 300000 27 | 28 | struct red_rmt_debug { 29 | unsigned int q_log[RMT_DEBUG_SIZE][2]; 30 | unsigned int q_index; 31 | port_id_t port; 32 | struct red_stats stats; 33 | struct list_head list; 34 | }; 35 | 36 | int red_rmt_debug_proc_init(void); 37 | void red_rmt_debug_proc_exit(void); 38 | struct red_rmt_debug * red_rmt_debug_create(port_id_t port); 39 | -------------------------------------------------------------------------------- /rina-tools/.changelog-amend: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IRATI/stack/726b535c908f8a74e8c68dd493cfbb1bd8726546/rina-tools/.changelog-amend -------------------------------------------------------------------------------- /rina-tools/.gitignore: -------------------------------------------------------------------------------- 1 | *~ 2 | *.swp 3 | 4 | *.orig 5 | 6 | TAGS 7 | 8 | .deps 9 | .libs 10 | .dirstamp 11 | .directory 12 | .autotools 13 | .cproject 14 | .fuse* 15 | .project 16 | .settings/ 17 | 18 | Makefile 19 | Makefile.in 20 | 21 | /.version 22 | /.tarball-version 23 | 24 | /AUTHORS 25 | /ChangeLog 26 | /NEWS 27 | 28 | /autom4te.cache 29 | /aclocal.m4 30 | /configure 31 | /config.log 32 | /config.status 33 | /confdefs.h 34 | /conftest.c 35 | /conftest.err 36 | /libtool 37 | 38 | /*.tar.gz 39 | -------------------------------------------------------------------------------- /rina-tools/README: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IRATI/stack/726b535c908f8a74e8c68dd493cfbb1bd8726546/rina-tools/README -------------------------------------------------------------------------------- /rina-tools/README.md: -------------------------------------------------------------------------------- 1 | README -------------------------------------------------------------------------------- /rina-tools/bootstrap: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # -*- sh -*- 3 | 4 | # 5 | # bootstrap 6 | # 7 | # Written by: Francesco Salvestrini 8 | # 9 | 10 | ME=bootstrap 11 | 12 | # Start from scratch 13 | rm -r -f autom4te.cache 14 | rm -f aclocal.m4 15 | 16 | DIRS=". `cat configure.ac|grep AC_CONFIG_SUBDIRS|sed -e 's,^.*\[,,' -e 's,\].*,,'`" 17 | 18 | echo "${ME}: Bootstrapping autotools" 19 | 20 | for i in $DIRS ; do 21 | (cd $i && echo "${ME}: Bootstrapping autotools in $PWD" && autoreconf -i -f -Wall $@) || { 22 | echo "${ME}: Cannot bootstrap autotools into $PWD" 23 | exit 1 24 | } 25 | done 26 | 27 | echo "${ME}: Autotools bootstrapped successfully" 28 | -------------------------------------------------------------------------------- /rina-tools/build-aux/.gitignore: -------------------------------------------------------------------------------- 1 | /compile 2 | /config.guess 3 | /config.sub 4 | /depcomp 5 | /install-sh 6 | /ltmain.sh 7 | /missing 8 | /py-compile 9 | /ar-lib 10 | /test-driver 11 | -------------------------------------------------------------------------------- /rina-tools/doc/Makefile.am: -------------------------------------------------------------------------------- 1 | # 2 | # Makefile.am 3 | # 4 | # Written by: Francesco Salvestrini 5 | # 6 | 7 | EXTRA_DIST = \ 8 | installation-prerequisites.md 9 | -------------------------------------------------------------------------------- /rina-tools/doc/installation-prerequisites.md: -------------------------------------------------------------------------------- 1 | Required packages: 2 | 3 | * A C compiler 4 | * librina 5 | 6 | Optional packages: 7 | 8 | * Python (>=2.0) 9 | * python-mathplotlib 10 | 11 | Francesco -------------------------------------------------------------------------------- /rina-tools/m4/.gitignore: -------------------------------------------------------------------------------- 1 | /libtool.m4 2 | /ltoptions.m4 3 | /ltsugar.m4 4 | /ltversion.m4 5 | /lt~obsolete.m4 6 | /pkg.m4 7 | -------------------------------------------------------------------------------- /rina-tools/m4/ax_python_module.m4: -------------------------------------------------------------------------------- 1 | # 2 | # SYNOPSIS 3 | # 4 | # AX_PYTHON_MODULE(MODULE,[ACTION-IF-FOUND],[ACTION-IF-NOT-FOUND]) 5 | # 6 | # LICENSE 7 | # 8 | # @LICENSE_BEGIN@ 9 | # @LICENSE_END@ 10 | # 11 | # WRITTEN BY: 12 | # 13 | # Francesco Salvestrini 14 | # 15 | 16 | AC_DEFUN([AX_PYTHON_MODULE],[ 17 | AS_IF([test x"$PYTHON" = x""],[ 18 | AC_MSG_WARN([No python available, cannot check $1 module presence]) 19 | $3 20 | ],[ 21 | AC_MSG_CHECKING([Python module $1]) 22 | $PYTHON -c "import $1" >/dev/null 2>&1 23 | AS_IF([test $? -eq 0],[ 24 | AC_MSG_RESULT([yes]) 25 | $2 26 | ],[ 27 | AC_MSG_RESULT([no]) 28 | $3 29 | ]) 30 | ]) 31 | ]) 32 | -------------------------------------------------------------------------------- /rina-tools/src/.gitignore: -------------------------------------------------------------------------------- 1 | /stamp-h1 2 | /config.h 3 | /config.h.in 4 | 5 | *.[ao] 6 | 7 | /rina-mem-stats 8 | /rina-show-plots 9 | /rina-bug-report 10 | -------------------------------------------------------------------------------- /rina-tools/src/common/Makefile.am: -------------------------------------------------------------------------------- 1 | # 2 | # Makefile.am 3 | # 4 | # Written by: Francesco Salvestrini 5 | # 6 | 7 | SUBDIRS = tclap 8 | 9 | noinst_LTLIBRARIES = librinaapp.la 10 | 11 | librinaapp_la_CFLAGS = 12 | librinaapp_la_CPPFLAGS = \ 13 | $(LIBRINA_CFLAGS) \ 14 | $(CPPFLAGS_EXTRA) 15 | librinaapp_la_LIBADD = \ 16 | $(LIBRINA_LIBS) 17 | 18 | librinaapp_la_SOURCES = \ 19 | application.cc application.h \ 20 | server.cc server.h \ 21 | utils.cc utils.h -------------------------------------------------------------------------------- /rina-tools/src/common/tclap/Makefile.am: -------------------------------------------------------------------------------- 1 | # 2 | # Makefile.am 3 | # 4 | # Written by: Francesco Salvestrini 5 | # 6 | 7 | EXTRA_DIST = \ 8 | ArgException.h \ 9 | Arg.h \ 10 | ArgTraits.h \ 11 | CmdLine.h \ 12 | CmdLineInterface.h \ 13 | CmdLineOutput.h \ 14 | Constraint.h \ 15 | DocBookOutput.h \ 16 | HelpVisitor.h \ 17 | IgnoreRestVisitor.h \ 18 | Makefile \ 19 | Makefile.am \ 20 | Makefile.in \ 21 | MultiArg.h \ 22 | MultiSwitchArg.h \ 23 | OptionalUnlabeledTracker.h \ 24 | StandardTraits.h \ 25 | StdOutput.h \ 26 | SwitchArg.h \ 27 | UnlabeledMultiArg.h \ 28 | UnlabeledValueArg.h \ 29 | ValueArg.h \ 30 | ValuesConstraint.h \ 31 | VersionVisitor.h \ 32 | Visitor.h \ 33 | XorHandler.h \ 34 | ZshCompletionOutput.h 35 | -------------------------------------------------------------------------------- /rina-tools/src/common/tclap/Visitor.h: -------------------------------------------------------------------------------- 1 | 2 | /****************************************************************************** 3 | * 4 | * file: Visitor.h 5 | * 6 | * Copyright (c) 2003, Michael E. Smoot . 7 | * All rights reverved. 8 | * 9 | * See the file COPYING in the top directory of this distribution for 10 | * more information. 11 | * 12 | * THE SOFTWARE IS PROVIDED _AS IS_, WITHOUT WARRANTY OF ANY KIND, EXPRESS 13 | * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 14 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 15 | * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 16 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 17 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 18 | * DEALINGS IN THE SOFTWARE. 19 | * 20 | *****************************************************************************/ 21 | 22 | 23 | #ifndef TCLAP_VISITOR_H 24 | #define TCLAP_VISITOR_H 25 | 26 | namespace TCLAP { 27 | 28 | /** 29 | * A base class that defines the interface for visitors. 30 | */ 31 | class Visitor 32 | { 33 | public: 34 | 35 | /** 36 | * Constructor. Does nothing. 37 | */ 38 | Visitor() { } 39 | 40 | /** 41 | * Destructor. Does nothing. 42 | */ 43 | virtual ~Visitor() { } 44 | 45 | /** 46 | * Does nothing. Should be overridden by child. 47 | */ 48 | virtual void visit() { } 49 | }; 50 | 51 | } 52 | 53 | #endif 54 | -------------------------------------------------------------------------------- /rina-tools/src/key-managers/Makefile.am: -------------------------------------------------------------------------------- 1 | # 2 | # Makefile.am 3 | # 4 | # Written by: Eduard Grasa 5 | # 6 | 7 | CLEANFILES = 8 | MOSTLYCLEANFILES = 9 | EXTRA_DIST = 10 | bin_PROGRAMS = 11 | AM_INSTALLCHECK_STD_OPTIONS_EXEMPT = 12 | 13 | include $(srcdir)/Makefile.inc 14 | 15 | BUILT_SOURCES = $(protoSOURCES) 16 | 17 | key_managers_SOURCES = \ 18 | km-common.h km-common.cc \ 19 | ckm.cc ckm.h \ 20 | kma.cc kma.h \ 21 | main.cc \ 22 | $(protoSOURCES) 23 | key_managers_LDADD = $(LIBRINA_LIBS) -ldl \ 24 | ../common/librinaapp.la 25 | key_managers_CPPFLAGS = \ 26 | $(LIBRINA_CFLAGS) \ 27 | $(CPPFLAGS_EXTRA) \ 28 | $(LIBPROTOBUF_CFLAGS) \ 29 | -I$(srcdir)/../common 30 | key_managers_CXXFLAGS = \ 31 | $(CPPFLAGS_EXTRA) 32 | 33 | bin_PROGRAMS += key_managers 34 | AM_INSTALLCHECK_STD_OPTIONS_EXEMPT += key_managers 35 | -------------------------------------------------------------------------------- /rina-tools/src/key-managers/Makefile.inc: -------------------------------------------------------------------------------- 1 | protoSOURCES = 2 | DISTCLEANFILES = 3 | 4 | km.stamp: km.proto 5 | rm -f km.tmp 6 | touch km.tmp 7 | $(PROTOC) -I$(builddir) -I$(srcdir) \ 8 | --cpp_out=$(builddir) \ 9 | $(srcdir)/km.proto 10 | mv -f km.tmp $@ 11 | 12 | km.pb.h km.pb.cc: km.stamp 13 | if test -f $@; then :; else \ 14 | trap 'rm -rf km.lock km.stamp' 1 2 13 15; \ 15 | if mkdir km.lock 2>/dev/null; then \ 16 | rm -f km.stamp; \ 17 | $(MAKE) $(AM_MAKEFLAGS) km.stamp; \ 18 | result=$$?; rm -rf km.lock; exit $$result; \ 19 | else \ 20 | while test -d km.lock; do sleep 1; done; \ 21 | test -f km.stamp; \ 22 | fi; \ 23 | fi 24 | 25 | DISTCLEANFILES += \ 26 | km.pb.h km.pb.cc km.stamp 27 | 28 | MOSTLYCLEANFILES += \ 29 | km.tmp 30 | 31 | EXTRA_DIST += \ 32 | km.proto 33 | 34 | protoSOURCES += km.pb.cc km.pb.h 35 | 36 | 37 | -------------------------------------------------------------------------------- /rina-tools/src/key-managers/km.proto: -------------------------------------------------------------------------------- 1 | syntax="proto2"; 2 | package rina.messages; 3 | option optimize_for = LITE_RUNTIME; 4 | 5 | message key_container_t { 6 | optional string id = 1; // The Key container ID 7 | optional string state = 2; // The Key container state 8 | optional bytes private_key = 3; // The private key (encoded) 9 | optional bytes public_key = 4; // The public key (encoded) 10 | } -------------------------------------------------------------------------------- /rina-tools/src/mac2ifname/Makefile.am: -------------------------------------------------------------------------------- 1 | # 2 | # Makefile.am 3 | # 4 | # Written by: Vincenzo Maffione 5 | # 6 | 7 | bin_PROGRAMS = 8 | AM_INSTALLCHECK_STD_OPTIONS_EXEMPT = 9 | 10 | mac2ifname_SOURCES = mac2ifname.c 11 | 12 | bin_PROGRAMS += mac2ifname 13 | AM_INSTALLCHECK_STD_OPTIONS_EXEMPT += mac2ifname 14 | 15 | -------------------------------------------------------------------------------- /rina-tools/src/manager/Makefile.am: -------------------------------------------------------------------------------- 1 | # 2 | # Makefile.am 3 | # 4 | # Written by: Eduard Grasa 5 | # 6 | 7 | CLEANFILES = 8 | MOSTLYCLEANFILES = 9 | EXTRA_DIST = 10 | bin_PROGRAMS = 11 | bin_SCRIPTS = 12 | AM_INSTALLCHECK_STD_OPTIONS_EXEMPT = 13 | 14 | include $(srcdir)/Makefile.inc 15 | 16 | BUILT_SOURCES = $(protoSOURCES) 17 | 18 | net_manager_SOURCES = \ 19 | dif-template-manager.h dif-template-manager.cc \ 20 | net-manager.h net-manager.cc promise.cc \ 21 | main.cc \ 22 | $(protoSOURCES) 23 | net_manager_LDADD = \ 24 | $(LIBRINA_LIBS) \ 25 | $(LIBRINA_API_LIBS) -ldl \ 26 | $(LIBRINAJSONCPP_LIBS) -ldl \ 27 | $(LIBRINAD_LIBS) 28 | net_manager_CPPFLAGS = \ 29 | $(LIBRINA_CFLAGS) \ 30 | $(CPPFLAGS_EXTRA) \ 31 | $(LIBPROTOBUF_CFLAGS) \ 32 | $(LIBRINA_API_CFLAGS) \ 33 | -I$(srcdir)/../common \ 34 | $(LIBRINAD_CFLAGS) 35 | net_manager_CXXFLAGS = \ 36 | $(CPPFLAGS_EXTRA) 37 | 38 | bin_PROGRAMS += net_manager 39 | AM_INSTALLCHECK_STD_OPTIONS_EXEMPT += net_manager 40 | 41 | bin_SCRIPTS += mgr-ctl 42 | EXTRA_DIST += mgr-ctl 43 | -------------------------------------------------------------------------------- /rina-tools/src/manager/Makefile.inc: -------------------------------------------------------------------------------- 1 | protoSOURCES = 2 | DISTCLEANFILES = 3 | 4 | nm.stamp: nm.proto 5 | rm -f nm.tmp 6 | touch nm.tmp 7 | $(PROTOC) -I$(builddir) -I$(srcdir) \ 8 | --cpp_out=$(builddir) \ 9 | $(srcdir)/nm.proto 10 | mv -f nm.tmp $@ 11 | 12 | nm.pb.h nm.pb.cc: nm.stamp 13 | if test -f $@; then :; else \ 14 | trap 'rm -rf nm.lock nm.stamp' 1 2 13 15; \ 15 | if mkdir nm.lock 2>/dev/null; then \ 16 | rm -f nm.stamp; \ 17 | $(MAKE) $(AM_MAKEFLAGS) nm.stamp; \ 18 | result=$$?; rm -rf nm.lock; exit $$result; \ 19 | else \ 20 | while test -d nm.lock; do sleep 1; done; \ 21 | test -f nm.stamp; \ 22 | fi; \ 23 | fi 24 | 25 | DISTCLEANFILES += \ 26 | nm.pb.h nm.pb.cc nm.stamp 27 | 28 | MOSTLYCLEANFILES += \ 29 | nm.tmp 30 | 31 | EXTRA_DIST += \ 32 | nm.proto 33 | 34 | protoSOURCES += nm.pb.cc nm.pb.h 35 | 36 | 37 | -------------------------------------------------------------------------------- /rina-tools/src/manager/nm.proto: -------------------------------------------------------------------------------- 1 | syntax="proto2"; 2 | package rina.messages; 3 | option optimize_for = LITE_RUNTIME; 4 | 5 | message key_container_t { 6 | optional string id = 1; // The Key container ID 7 | optional string state = 2; // The Key container state 8 | optional bytes private_key = 3; // The private key (encoded) 9 | optional bytes public_key = 4; // The public key (encoded) 10 | } -------------------------------------------------------------------------------- /rina-tools/src/rina-bug-report.in: -------------------------------------------------------------------------------- 1 | #!@SHELL@ 2 | 3 | # 4 | # rina-bug-report 5 | # 6 | # Written by: Francesco Salvestrini 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 of the License, or 11 | # (at your option) 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, write to the Free Software 20 | # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 21 | # 22 | 23 | # This is a placeholder, the code in the other branch has to be merged in 24 | 25 | exit 1 26 | -------------------------------------------------------------------------------- /rina-tools/src/rina-wrap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IRATI/stack/726b535c908f8a74e8c68dd493cfbb1bd8726546/rina-tools/src/rina-wrap -------------------------------------------------------------------------------- /rina-tools/src/rinacat/Makefile.am: -------------------------------------------------------------------------------- 1 | # 2 | # Makefile.am 3 | # 4 | # Written by: Francesco Salvestrini 5 | # modified by Steve Bunch @ trianetworksystems.com 6 | # 7 | 8 | bin_PROGRAMS = 9 | AM_INSTALLCHECK_STD_OPTIONS_EXEMPT = 10 | 11 | rinacat_SOURCES = \ 12 | rinacat.c 13 | rinacat_LDADD = $(LIBRINA_LIBS) -lrt \ 14 | -lrina-api 15 | rinacat_CFLAGS = \ 16 | -std=gnu11 \ 17 | $(LIBRINA_CFLAGS) \ 18 | -I$(srcdir)/../common 19 | rinacat_CXXFLAGS = \ 20 | $(CPPFLAGS_EXTRA) 21 | 22 | bin_PROGRAMS += rinacat 23 | AM_INSTALLCHECK_STD_OPTIONS_EXEMPT += rinacat 24 | -------------------------------------------------------------------------------- /rina-tools/src/rlite/Makefile.am: -------------------------------------------------------------------------------- 1 | # 2 | # Makefile.am 3 | # 4 | 5 | bin_PROGRAMS = 6 | AM_INSTALLCHECK_STD_OPTIONS_EXEMPT = 7 | 8 | rinaperf_SOURCES = rinaperf.c 9 | rinaperf_LDADD = $(LIBRINA_API_LIBS) -lm 10 | rinaperf_CPPFLAGS = $(LIBRINA_API_CFLAGS) -pthread 11 | 12 | rina_echo_async_SOURCES = rina-echo-async.c 13 | rina_echo_async_LDADD = $(LIBRINA_API_LIBS) 14 | rina_echo_async_CPPFLAGS = $(LIBRINA_API_CFLAGS) 15 | 16 | rina_gw_SOURCES = rina-gw.cpp fdfwd.cpp 17 | rina_gw_LDADD = $(LIBRINA_API_LIBS) 18 | rina_gw_CPPFLAGS = $(LIBRINA_API_CFLAGS) -std=c++11 19 | 20 | MOSTLYCLEANFILES = 21 | EXTRA_DIST = 22 | include $(srcdir)/Makefile.inc 23 | 24 | noinst_LTLIBRARIES = \ 25 | libiporina.la 26 | 27 | BUILT_SOURCES = $(protoSOURCES) 28 | 29 | libiporina_la_SOURCES = \ 30 | $(protoSOURCES) \ 31 | libiporina_la_CPPFLAGS = \ 32 | -I$(builddir)/.. \ 33 | -I$(srcdir)/.. 34 | 35 | iporinad_SOURCES = iporinad.cpp fdfwd.cpp cdap.cpp 36 | iporinad_LDADD = $(LIBRINA_API_LIBS) libiporina.la 37 | iporinad_CPPFLAGS = $(LIBRINA_API_CFLAGS) -std=c++11 38 | 39 | bin_PROGRAMS += rinaperf rina-echo-async rina-gw iporinad 40 | AM_INSTALLCHECK_STD_OPTIONS_EXEMPT += rinaperf rina-echo-async rina-gw iporinad 41 | -------------------------------------------------------------------------------- /rina-tools/src/rlite/README: -------------------------------------------------------------------------------- 1 | ====== Example applications using the RINA API ====== 2 | 3 | This directory contains example programs written using the RINA POSIX-like 4 | API (available in the following file of the IRATI repository: 5 | librina/wrap/rina-api/include/rina/api.h). 6 | People willing to write native RINA applications or to port existing socket 7 | application to RINA can take these programs as reference examples for the 8 | API usage. 9 | 10 | The source files contained here are a copy of the original ones available 11 | in the rlite project repository (https://github.com/vmaffione/rlite), and 12 | they are stored in this directory only to ease the build process. 13 | Future updates to the original sources could (and should) be reflected here. 14 | -------------------------------------------------------------------------------- /rina-tools/src/rlite/iporina.proto: -------------------------------------------------------------------------------- 1 | syntax="proto2"; 2 | package gpb; 3 | option optimize_for = LITE_RUNTIME; 4 | 5 | message hello_msg_t { 6 | required string tun_subnet = 1; 7 | required string tun_src_addr = 2; 8 | required string tun_dst_addr = 3; 9 | required uint32 num_routes = 4; 10 | } 11 | 12 | message route_msg_t { 13 | required string route = 1; 14 | } 15 | -------------------------------------------------------------------------------- /rina-tools/src/rlite/proto2inc: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # 4 | # proto2inc 5 | # 6 | # Written by: Francesco Salvestrini 7 | # 8 | 9 | rm Makefile.inc 10 | 11 | cat > Makefile.inc <> Makefile.inc << EOF 20 | $name.stamp: $name.proto 21 | rm -f $name.tmp 22 | touch $name.tmp 23 | \$(PROTOC) -I\$(builddir) -I\$(srcdir) \\ 24 | --cpp_out=\$(builddir) \\ 25 | \$(srcdir)/$name.proto 26 | mv -f $name.tmp \$@ 27 | 28 | $name.pb.h $name.pb.cc: $name.stamp 29 | if test -f \$@; then :; else \\ 30 | trap 'rm -rf $name.lock $name.stamp' 1 2 13 15; \\ 31 | if mkdir $name.lock 2>/dev/null; then \\ 32 | rm -f $name.stamp; \\ 33 | \$(MAKE) \$(AM_MAKEFLAGS) $name.stamp; \\ 34 | result=\$\$?; rm -rf $name.lock; exit \$\$result; \\ 35 | else \\ 36 | while test -d $name.lock; do sleep 1; done; \\ 37 | test -f $name.stamp; \\ 38 | fi; \\ 39 | fi 40 | 41 | DISTCLEANFILES += \\ 42 | $name.pb.h $name.pb.cc $name.stamp 43 | 44 | MOSTLYCLEANFILES += \\ 45 | $name.tmp 46 | 47 | EXTRA_DIST += \\ 48 | $name.proto 49 | 50 | protoSOURCES += $name.pb.cc $name.pb.h 51 | 52 | 53 | EOF 54 | 55 | done 56 | -------------------------------------------------------------------------------- /rina-tools/src/tgen-apps/Makefile.am: -------------------------------------------------------------------------------- 1 | # 2 | # Makefile.am 3 | # 4 | 5 | bin_PROGRAMS = 6 | AM_INSTALLCHECK_STD_OPTIONS_EXEMPT = 7 | 8 | tg_server_SOURCES = tg-server.cpp 9 | tg_server_LDADD = $(LIBRINA_API_LIBS) 10 | tg_server_CPPFLAGS = $(LIBRINA_API_CFLAGS) -I$(srcdir)/../common -pthread -std=c++11 11 | 12 | tg_client_SOURCES = tg-client.cpp 13 | tg_client_LDADD = $(LIBRINA_API_LIBS) 14 | tg_client_CPPFLAGS = $(LIBRINA_API_CFLAGS) -I$(srcdir)/../common -pthread -std=c++11 15 | 16 | bin_PROGRAMS += tg-server tg-client 17 | AM_INSTALLCHECK_STD_OPTIONS_EXEMPT += tg-server tg-client 18 | -------------------------------------------------------------------------------- /rina-tools/src/tgen-apps/test_commons.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | #ifndef BUFF_SIZE 6 | #define BUFF_SIZE 10000 7 | #endif 8 | 9 | #define SDU_FLAG_INIT 1 10 | #define SDU_FLAG_FIN 2 11 | 12 | #pragma pack(push, 1) 13 | struct dataSDU { 14 | size_t Size; 15 | uint8_t Flags; 16 | uint32_t SeqId; 17 | long long SendTime; 18 | }; 19 | #pragma pack(pop) 20 | 21 | 22 | #pragma pack(push, 1) 23 | struct initSDU : public dataSDU { 24 | int QoSId; 25 | int FlowId; 26 | }; 27 | #pragma pack(pop) 28 | -------------------------------------------------------------------------------- /rina-tools/src/util-scripts/process_qta_test.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | if [ "$#" -ne 1 ]; then 3 | echo "ERROR: Illegal number of parameters" 4 | echo "USAGE: ./process_qta_test.sh " 5 | exit 1 6 | fi 7 | 8 | ulevel=1 9 | q_length=0 10 | new_time=0 11 | time_elapsed=0 12 | time_reference=0 13 | 14 | while IFS='' read -r line || [[ -n "$line" ]]; do 15 | if [[ $line == C/U* ]] || [[ $line == Queue* ]] || [[ $line == --* ]]; then 16 | continue 17 | fi 18 | 19 | if [[ $line == Urgency* ]]; then 20 | ulevel="${line//[!0-9]/}" 21 | echo "length; time" >> urgency_queue${ulevel}.csv 22 | old_time=0 23 | continue 24 | fi 25 | 26 | stringarray=($line) 27 | q_length=${stringarray[0]} 28 | new_time=${stringarray[1]} 29 | if [[ "$q_length" = "" ]]; then 30 | continue 31 | fi 32 | if [[ "$time_reference" = "0" ]]; then 33 | let "time_reference = $new_time" 34 | else 35 | let "time_elapsed = $new_time - $time_reference" 36 | fi 37 | echo "${q_length}; ${time_elapsed}" >> urgency_queue${ulevel}.csv 38 | done < "$1" 39 | -------------------------------------------------------------------------------- /rina-tools/src/util-scripts/rmt-port-monitor.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | if [ "$#" -ne 3 ]; then 3 | echo "ERROR: Illegal number of parameters" 4 | echo "USAGE: ./rmt-port-monitor.sh " 5 | exit 1 6 | fi 7 | 8 | echo "Monitoring IPCP $1, N-1 port $2 as fast as possible, saving data to $3" 9 | echo "Press [CTRL+C] to stop.." 10 | 11 | echo "//time(ms) rx_pdus tx_pdus queued_pdus dropped_pdus write_busy state" > $3 12 | 13 | counter=1 14 | time_ref=$(($(date +%s%N)/1000000)) 15 | while : 16 | do 17 | time=$(($(($(date +%s%N)/1000000)) - time_ref)) 18 | rx_pdus=$(head -n 1 "/sys/rina/ipcps/$1/rmt/n1_ports/$2/rx_pdus") 19 | tx_pdus=$(head -n 1 "/sys/rina/ipcps/$1/rmt/n1_ports/$2/tx_pdus") 20 | q_pdus=$(head -n 1 "/sys/rina/ipcps/$1/rmt/n1_ports/$2/queued_pdus") 21 | drop_pdus=$(head -n 1 "/sys/rina/ipcps/$1/rmt/n1_ports/$2/drop_pdus") 22 | wbusy=$(head -n 1 "/sys/rina/ipcps/$1/rmt/n1_ports/$2/wbusy") 23 | state=$(head -n 1 "/sys/rina/ipcps/$1/rmt/n1_ports/$2/state") 24 | 25 | echo "$time $rx_pdus $tx_pdus $q_pdus $drop_pdus $wbusy $state" >> $3 26 | counter=$((counter+1)) 27 | done 28 | -------------------------------------------------------------------------------- /rinad/.changelog-amend: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IRATI/stack/726b535c908f8a74e8c68dd493cfbb1bd8726546/rinad/.changelog-amend -------------------------------------------------------------------------------- /rinad/.gitignore: -------------------------------------------------------------------------------- 1 | *~ 2 | *.swp 3 | 4 | *.orig 5 | 6 | .deps 7 | .libs 8 | .dirstamp 9 | .directory 10 | .autotools 11 | .settings/ 12 | 13 | Makefile 14 | Makefile.in 15 | 16 | /.version 17 | /.tarball-version 18 | 19 | /AUTHORS 20 | /ChangeLog 21 | /NEWS 22 | 23 | /autom4te.cache 24 | /aclocal.m4 25 | /configure 26 | /config.log 27 | /config.status 28 | /confdefs.h 29 | /conftest.c 30 | /conftest.err 31 | 32 | /libtool 33 | 34 | /*.tar.gz 35 | 36 | /.project 37 | /.cproject 38 | 39 | -------------------------------------------------------------------------------- /rinad/LICENSE-tclap: -------------------------------------------------------------------------------- 1 | 2 | 3 | Copyright (c) 2003 Michael E. Smoot 4 | 5 | Permission is hereby granted, free of charge, to any person 6 | obtaining a copy of this software and associated documentation 7 | files (the "Software"), to deal in the Software without restriction, 8 | including without limitation the rights to use, copy, modify, merge, 9 | publish, distribute, sublicense, and/or sell copies of the Software, 10 | and to permit persons to whom the Software is furnished to do so, 11 | subject to the following conditions: 12 | 13 | The above copyright notice and this permission notice shall be 14 | included in all copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 17 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 18 | OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 19 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS 20 | BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN 21 | AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR 22 | IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | THE SOFTWARE. 24 | 25 | 26 | -------------------------------------------------------------------------------- /rinad/README: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IRATI/stack/726b535c908f8a74e8c68dd493cfbb1bd8726546/rinad/README -------------------------------------------------------------------------------- /rinad/README.md: -------------------------------------------------------------------------------- 1 | README -------------------------------------------------------------------------------- /rinad/bootstrap: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # -*- sh -*- 3 | 4 | # 5 | # bootstrap 6 | # 7 | # Written by: Francesco Salvestrini 8 | # 9 | 10 | ME=bootstrap 11 | 12 | # Start from scratch 13 | rm -r -f autom4te.cache 14 | rm -f aclocal.m4 15 | 16 | DIRS=". `cat configure.ac|grep AC_CONFIG_SUBDIRS|sed -e 's,^.*\[,,' -e 's,\].*,,'`" 17 | 18 | echo "${ME}: Bootstrapping autotools" 19 | 20 | for i in $DIRS ; do 21 | (cd $i && echo "${ME}: Bootstrapping autotools in $PWD" && autoreconf -i -f -Wall $@) || { 22 | echo "${ME}: Cannot bootstrap autotools into $PWD" 23 | exit 1 24 | } 25 | done 26 | 27 | echo "${ME}: Autotools bootstrapped successfully" 28 | -------------------------------------------------------------------------------- /rinad/build-aux/.gitignore: -------------------------------------------------------------------------------- 1 | /compile 2 | /config.guess 3 | /config.sub 4 | /depcomp 5 | /install-sh 6 | /ltmain.sh 7 | /missing 8 | /py-compile 9 | /ar-lib 10 | /test-driver 11 | -------------------------------------------------------------------------------- /rinad/doc/Makefile.am: -------------------------------------------------------------------------------- 1 | # 2 | # Makefile.am 3 | # 4 | # Written by: Francesco Salvestrini 5 | # 6 | 7 | EXTRA_DIST = 8 | -------------------------------------------------------------------------------- /rinad/etc/.gitignore: -------------------------------------------------------------------------------- 1 | /ipcmanager.conf 2 | -------------------------------------------------------------------------------- /rinad/etc/da.map.orig: -------------------------------------------------------------------------------- 1 | { 2 | "applicationToDIFMappings" : [ { 3 | "encodedAppName" : "traffic.generator.server-1--", 4 | "difName" : "normal.DIF" 5 | }, { 6 | "encodedAppName" : "traffic.generator.client-1--", 7 | "difName" : "normal.DIF" 8 | }, { 9 | "encodedAppName" : "rina.apps.echotime.server-1--", 10 | "difName" : "normal.DIF" 11 | }, { 12 | "encodedAppName" : "rina.apps.echotime.client-1--", 13 | "difName" : "normal.DIF" 14 | }] 15 | } -------------------------------------------------------------------------------- /rinad/etc/ipcmanager.conf.orig.in: -------------------------------------------------------------------------------- 1 | { 2 | "configFileVersion" : "1.4.1", 3 | "localConfiguration" : { 4 | "installationPath" : "@prefix@/bin", 5 | "libraryPath" : "@libdir@", 6 | "logPath" : "@localstatedir@/log", 7 | "consoleSocket" : "@runstatedir@/ipcm-console.sock", 8 | "system-name" : "pe1", 9 | "pluginsPaths" : ["@libdir@/rinad/ipcp"] 10 | }, 11 | "ipcProcessesToCreate" : [ { 12 | "type" : "shim-eth-vlan", 13 | "difName" : "110" 14 | }, { 15 | "type" : "normal-ipc", 16 | "difName" : "normal.DIF", 17 | "difsToRegisterAt" : ["110"] 18 | } ], 19 | "difConfigurations" : [ { 20 | "name" : "110", 21 | "template" : "shim-eth-vlan.dif" 22 | }, { 23 | "name" : "normal.DIF", 24 | "template" : "default.dif" 25 | } ] 26 | } 27 | -------------------------------------------------------------------------------- /rinad/etc/shim-eth-vlan.dif.orig: -------------------------------------------------------------------------------- 1 | { 2 | "difType" : "shim-eth-vlan", 3 | "configParameters" : { 4 | "interface-name" : "eth1" 5 | } 6 | } -------------------------------------------------------------------------------- /rinad/etc/wpa_supplicant.conf.orig.in: -------------------------------------------------------------------------------- 1 | #Control interface dir 2 | ctrl_interface=@runstatedir@/ 3 | 4 | # Automatic network selection behavior 5 | # 0 = do not automatically go through Interworking network selection 6 | # (i.e., require explicit interworking_select command for this; default) 7 | # 1 = perform Interworking network selection if one or more 8 | # credentials have been configured and scan did not find a 9 | # matching network block 10 | auto_interworking=0 11 | 12 | # Disaable Interworking 13 | interworking=0 14 | 15 | #Networks section 16 | 17 | network={ 18 | ssid="my_ssid_dif_name" 19 | #psk="password" 20 | psk= 21 | bssid=<1st AP's MAC> 22 | } 23 | 24 | network={ 25 | ssid="my_ssid_dif_name" 26 | #psk="password" 27 | psk= 28 | bssid=<2nd AP's MAC> 29 | } 30 | 31 | -------------------------------------------------------------------------------- /rinad/m4/.gitignore: -------------------------------------------------------------------------------- 1 | /libtool.m4 2 | /ltoptions.m4 3 | /ltsugar.m4 4 | /ltversion.m4 5 | /lt~obsolete.m4 6 | /pkg.m4 7 | -------------------------------------------------------------------------------- /rinad/src/.gitignore: -------------------------------------------------------------------------------- 1 | *.[ao] 2 | *.l[ao] 3 | 4 | /config.h 5 | /config.h.in 6 | /stamp-h1 7 | -------------------------------------------------------------------------------- /rinad/src/Makefile.am: -------------------------------------------------------------------------------- 1 | # 2 | # Makefile.am 3 | # 4 | # Written by: Francesco Salvestrini 5 | # 6 | 7 | SUBDIRS = common ipcp ipcm 8 | -------------------------------------------------------------------------------- /rinad/src/TODO: -------------------------------------------------------------------------------- 1 | IPCM: 2 | - Integrate inotify for monitoring the configuration file. 3 | This could be done by creating a separate thread that does 4 | select() (or poll()) on the inotify call descriptor. 5 | 6 | IPCP: 7 | - 8 | -------------------------------------------------------------------------------- /rinad/src/common/.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IRATI/stack/726b535c908f8a74e8c68dd493cfbb1bd8726546/rinad/src/common/.gitignore -------------------------------------------------------------------------------- /rinad/src/common/concurrency.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Concurrency utils for IPCP and IPCM 3 | * 4 | * Eduard GRASA 5 | * 6 | * This library is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU Lesser General Public 8 | * License as published by the Free Software Foundation; either 9 | * version 2.1 of the License, or (at your option) any later version. 10 | * 11 | * This library is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | * Lesser General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Lesser General Public 17 | * License along with this library; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 19 | * MA 02110-1301 USA 20 | */ 21 | 22 | #ifndef RINAD_CONCURRENCY_H 23 | #define RINAD_CONCURRENCY_H 24 | 25 | #ifdef __cplusplus 26 | 27 | #include 28 | 29 | #endif 30 | 31 | #endif 32 | -------------------------------------------------------------------------------- /rinad/src/common/debug.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Debugging utils 3 | * 4 | * Francesco Salvestrini 5 | * Vincenzo Maffione 6 | * 7 | * This library is free software; you can redistribute it and/or 8 | * modify it under the terms of the GNU Lesser General Public 9 | * License as published by the Free Software Foundation; either 10 | * version 2.1 of the License, or (at your option) any later version. 11 | * 12 | * This library is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | * Lesser General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Lesser General Public 18 | * License along with this library; if not, write to the Free Software 19 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 20 | * MA 02110-1301 USA 21 | */ 22 | 23 | #ifndef RINAD_DEBUG_H 24 | #define RINAD_DEBUG_H 25 | 26 | #include 27 | 28 | void dump_backtrace(void); 29 | 30 | #ifndef FLUSH_LOG 31 | //Force log flushing 32 | #define FLUSH_LOG(_lev_, _ss_)\ 33 | do{\ 34 | LOGF_##_lev_ ("%s", (_ss_).str().c_str());\ 35 | ss.str(std::string());\ 36 | }while (0) 37 | #endif //FLUSH_LOG 38 | 39 | #endif 40 | -------------------------------------------------------------------------------- /rinad/src/common/encoders/.gitignore: -------------------------------------------------------------------------------- 1 | /*.stamp 2 | /*.pb.* 3 | -------------------------------------------------------------------------------- /rinad/src/common/encoders/ApplicationProcessNamingInfoMessage.proto: -------------------------------------------------------------------------------- 1 | syntax="proto2"; 2 | package rina.messages; 3 | option optimize_for = LITE_RUNTIME; 4 | 5 | message applicationProcessNamingInfo_t { // carries the naming information of an application process 6 | required string applicationProcessName = 1; 7 | optional string applicationProcessInstance = 2; 8 | optional string applicationEntityName = 3; 9 | optional string applicationEntityInstance = 4; 10 | } 11 | -------------------------------------------------------------------------------- /rinad/src/common/encoders/CommonMessages.proto: -------------------------------------------------------------------------------- 1 | syntax="proto2"; 2 | package rina.messages; 3 | option optimize_for = LITE_RUNTIME; 4 | 5 | message objectValue_t { // value of an object 6 | optional int32 intval = 1; 7 | optional sint32 sintval = 2; 8 | optional int64 int64val = 3; 9 | optional sint64 sint64val = 4; 10 | optional string strval = 5; 11 | optional bytes byteval = 6; // arbitrary structure or message 12 | optional fixed32 floatval = 7; 13 | optional fixed64 doubleval = 8; 14 | } 15 | 16 | message nameValuePair_t { //A name-value pair 17 | optional string name = 1; 18 | optional objectValue_t value = 2; 19 | } 20 | 21 | message property_t { // carries the information of a name/value pair 22 | required string name = 1; 23 | required string value = 2; 24 | } 25 | 26 | message a_data_t { 27 | optional int32 sourceAddress = 1; 28 | optional int32 destAddress = 2; 29 | optional bytes cdapMessage = 3; 30 | } -------------------------------------------------------------------------------- /rinad/src/common/encoders/DIFAllocatorMessages.proto: -------------------------------------------------------------------------------- 1 | syntax="proto2"; 2 | package rina.messages; 3 | option optimize_for = LITE_RUNTIME; 4 | import "ApplicationProcessNamingInfoMessage.proto"; 5 | 6 | message app_name_to_dif_mapping_t{ //information about a directoryforwardingtable entry 7 | required applicationProcessNamingInfo_t applicationName = 1; 8 | required string difname = 2; 9 | optional uint64 seqnum = 3; 10 | } 11 | 12 | message app_name_to_dif_mapping_set_t{ //carries information about directoryforwardingtable entries 13 | repeated app_name_to_dif_mapping_t appdifmapping = 1; 14 | } -------------------------------------------------------------------------------- /rinad/src/common/encoders/DirectoryForwardingTableEntryArrayMessage.proto: -------------------------------------------------------------------------------- 1 | syntax="proto2"; 2 | package rina.messages; 3 | option optimize_for = LITE_RUNTIME; 4 | import "DirectoryForwardingTableEntryMessage.proto"; 5 | 6 | message directoryForwardingTableEntrySet_t{ //carries information about directoryforwardingtable entries 7 | repeated directoryForwardingTableEntry_t directoryForwardingTableEntry= 1; 8 | } -------------------------------------------------------------------------------- /rinad/src/common/encoders/DirectoryForwardingTableEntryMessage.proto: -------------------------------------------------------------------------------- 1 | syntax="proto2"; 2 | package rina.messages; 3 | option optimize_for = LITE_RUNTIME; 4 | import "ApplicationProcessNamingInfoMessage.proto"; 5 | 6 | message directoryForwardingTableEntry_t{ //information about a directoryforwardingtable entry 7 | required applicationProcessNamingInfo_t applicationName = 1; 8 | required uint64 ipcProcessSynonym = 2; 9 | optional uint64 seqnum = 3; 10 | } -------------------------------------------------------------------------------- /rinad/src/common/encoders/EnrollmentInformationMessage.proto: -------------------------------------------------------------------------------- 1 | syntax="proto2"; 2 | package rina.messages; 3 | option optimize_for = LITE_RUNTIME; 4 | 5 | message enrollmentInformation_t { // carries information about a member that requests enrollment to a DIF 6 | optional uint64 address = 1; 7 | repeated string supportingDifs = 2; 8 | optional bool startEarly = 3; 9 | optional string token = 4; // A value that carries a hash 10 | } -------------------------------------------------------------------------------- /rinad/src/common/encoders/FlowStateGroupMessage.proto: -------------------------------------------------------------------------------- 1 | syntax="proto2"; 2 | package rina.messages; 3 | option optimize_for = LITE_RUNTIME; 4 | import "FlowStateMessage.proto"; 5 | 6 | message flowStateObjectGroup_t{ //Contains the information of a flow service 7 | repeated flowStateObject_t flow_state_objects = 1; // A group of flow state objects 8 | } -------------------------------------------------------------------------------- /rinad/src/common/encoders/FlowStateMessage.proto: -------------------------------------------------------------------------------- 1 | syntax="proto2"; 2 | package rina.messages; 3 | option optimize_for = LITE_RUNTIME; 4 | 5 | message flowStateObject_t { // Contains the information of a flow state object 6 | optional string name = 1; // The name of the IPC Process 7 | repeated uint64 addresses = 2; // The active addresses of the IPC Process 8 | optional string neighbor_name = 3; // The name of the neighbor IPC Process 9 | repeated uint64 neighbor_addresses = 4; // The neighbor IPC Process active addresses 10 | optional uint32 cost = 5; // The cost associated to the N-1 flow 11 | optional uint32 sequence_number = 6; // A sequence number to be able to discard old information 12 | optional bool state = 7; // Tells if the N-1 flow is up or down 13 | optional uint32 age = 8; // Age of this FSO (in seconds) 14 | } -------------------------------------------------------------------------------- /rinad/src/common/encoders/Makefile.am: -------------------------------------------------------------------------------- 1 | # 2 | # Makefile.am 3 | # 4 | # Written by: Francesco Salvestrini 5 | # 6 | 7 | CLEANFILES = *.pb.h *.pb.c *.stamp 8 | MOSTLYCLEANFILES = 9 | EXTRA_DIST = 10 | 11 | include $(srcdir)/Makefile.inc 12 | 13 | noinst_LTLIBRARIES = \ 14 | libencoders.la 15 | 16 | BUILT_SOURCES = $(protoSOURCES) 17 | 18 | libencoders_la_SOURCES = \ 19 | $(protoSOURCES) 20 | libencoders_la_CPPFLAGS = \ 21 | -I$(builddir)/.. \ 22 | -I$(srcdir)/.. \ 23 | $(CPPFLAGS_EXTRA) 24 | -------------------------------------------------------------------------------- /rinad/src/common/encoders/NeighborArrayMessage.proto: -------------------------------------------------------------------------------- 1 | syntax="proto2"; 2 | package rina.messages; 3 | option optimize_for = LITE_RUNTIME; 4 | import "NeighborMessage.proto"; 5 | 6 | message neighbors_t{ //carries information about all the neighbors 7 | repeated neighbor_t neighbor = 1; 8 | } -------------------------------------------------------------------------------- /rinad/src/common/encoders/NeighborMessage.proto: -------------------------------------------------------------------------------- 1 | syntax="proto2"; 2 | package rina.messages; 3 | option optimize_for = LITE_RUNTIME; 4 | 5 | message neighbor_t{ //carries information about a neighbor 6 | optional string apname = 1; 7 | optional string apinstance = 2; 8 | optional string aename = 3; 9 | optional string aeinstance = 4; 10 | optional uint64 address = 5; 11 | repeated string supportingDifs = 6; 12 | } -------------------------------------------------------------------------------- /rinad/src/common/encoders/PolicyDescriptorMessage.proto: -------------------------------------------------------------------------------- 1 | syntax="proto2"; 2 | package rina.messages; 3 | option optimize_for = LITE_RUNTIME; 4 | import "CommonMessages.proto"; 5 | 6 | message policyDescriptor_t{ //Describes a policy 7 | optional string policyName = 1; //The name of the policy 8 | optional string policyImplName = 2; //The name of the implementation of the policy used in this DIF. Can be a hierarchical name 9 | optional string version = 3; //The version of the policy implementation 10 | repeated property_t policyParameters = 4; //The paramters of the policy 11 | } -------------------------------------------------------------------------------- /rinad/src/common/encoders/QoSCubeArrayMessage.proto: -------------------------------------------------------------------------------- 1 | syntax="proto2"; 2 | package rina.messages; 3 | option optimize_for = LITE_RUNTIME; 4 | import "QoSCubeMessage.proto"; 5 | 6 | message qosCubes_t{ //carries information about all the QoS cubes supported by a DIF 7 | repeated qosCube_t qosCube = 1; 8 | } -------------------------------------------------------------------------------- /rinad/src/common/encoders/RIBObjectData.proto: -------------------------------------------------------------------------------- 1 | syntax="proto2"; 2 | package rina.messages; 3 | option optimize_for = LITE_RUNTIME; 4 | 5 | message RIBObjectData_t { // value of a RIB object 6 | optional string class = 1; 7 | optional string name = 2; 8 | optional int64 instance = 3; 9 | optional string displayable_value = 4; 10 | } 11 | 12 | message RIBObjectDataList_t 13 | { 14 | repeated RIBObjectData_t objects = 1; 15 | } -------------------------------------------------------------------------------- /rinad/src/common/encoders/RoutingForwarding.proto: -------------------------------------------------------------------------------- 1 | syntax="proto2"; 2 | package rina.messages; 3 | option optimize_for = LITE_RUNTIME; 4 | 5 | message uint_list_t { 6 | repeated uint32 member = 1; //Members 7 | } 8 | 9 | //Contains the information of a routing table entry 10 | message rt_entry_t{ 11 | optional uint32 address = 1; //Destination address 12 | optional uint32 qos_id = 2; //The qos-id 13 | optional uint32 cost = 3; //A metric representing the cost to the next hop 14 | repeated uint_list_t next_hops = 4; //Next hop(s) addresses and its alternatives 15 | } 16 | 17 | //Contains the information of a PDU forwarding table entry 18 | message pduft_entry_t{ 19 | optional uint32 address = 1; //Destination address 20 | optional uint32 qos_id = 2; //The qos-id 21 | optional uint32 cost = 3; //A metric representing the cost to the next hop 22 | repeated uint_list_t port_ids = 4; //N-1 port-id(s) and its alternates 23 | } 24 | 25 | -------------------------------------------------------------------------------- /rinad/src/common/encoders/WhatevercastNameArrayMessage.proto: -------------------------------------------------------------------------------- 1 | syntax="proto2"; 2 | package rina.messages; 3 | option optimize_for = LITE_RUNTIME; 4 | import "WhatevercastNameMessage.proto"; 5 | 6 | message whatevercastNames_t{ //carries information about all the whatevercast names 7 | repeated whatevercastName_t whatevercastName = 1; 8 | } -------------------------------------------------------------------------------- /rinad/src/common/encoders/WhatevercastNameMessage.proto: -------------------------------------------------------------------------------- 1 | syntax="proto2"; 2 | package rina.messages; 3 | option optimize_for = LITE_RUNTIME; 4 | 5 | message whatevercastName_t{ 6 | required string name = 1; //The whatevercast name 7 | required string rule = 2; //The rule that selects one or more members of the set 8 | repeated bytes setMembers = 3; //The members of the whatevercast group 9 | } -------------------------------------------------------------------------------- /rinad/src/common/encoders/proto2inc: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # 4 | # proto2inc 5 | # 6 | # Written by: Francesco Salvestrini 7 | # 8 | 9 | rm Makefile.inc 10 | 11 | cat > Makefile.inc <> Makefile.inc << EOF 20 | $name.stamp: $name.proto 21 | rm -f $name.tmp 22 | touch $name.tmp 23 | \$(PROTOC) -I\$(builddir) -I\$(srcdir) \\ 24 | --cpp_out=\$(builddir) \\ 25 | \$(srcdir)/$name.proto 26 | mv -f $name.tmp \$@ 27 | 28 | $name.pb.h $name.pb.cc: $name.stamp 29 | if test -f \$@; then :; else \\ 30 | trap 'rm -rf $name.lock $name.stamp' 1 2 13 15; \\ 31 | if mkdir $name.lock 2>/dev/null; then \\ 32 | rm -f $name.stamp; \\ 33 | \$(MAKE) \$(AM_MAKEFLAGS) $name.stamp; \\ 34 | result=\$\$?; rm -rf $name.lock; exit \$\$result; \\ 35 | else \\ 36 | while test -d $name.lock; do sleep 1; done; \\ 37 | test -f $name.stamp; \\ 38 | fi; \\ 39 | fi 40 | 41 | DISTCLEANFILES += \\ 42 | $name.pb.h $name.pb.cc $name.stamp 43 | 44 | MOSTLYCLEANFILES += \\ 45 | $name.tmp 46 | 47 | EXTRA_DIST += \\ 48 | $name.proto 49 | 50 | protoSOURCES += $name.pb.cc $name.pb.h 51 | 52 | 53 | EOF 54 | 55 | done 56 | -------------------------------------------------------------------------------- /rinad/src/common/librinad.pc.in: -------------------------------------------------------------------------------- 1 | prefix=@prefix@ 2 | libdir=@libdir@ 3 | includedir=@includedir@ 4 | 5 | Name: RINAD 6 | Description: RINAD common utilities 7 | Version: @PACKAGE_VERSION@ 8 | URL: @PACKAGE_URL@ 9 | Requires: librina protobuf >= @LIBPROTOBUF_MIN_VERSION@ 10 | Libs: -L${libdir} -lrinad 11 | Cflags: -I${includedir} @LIBPROTOBUF_CFLAGS@ 12 | -------------------------------------------------------------------------------- /rinad/src/common/tclap/Makefile.am: -------------------------------------------------------------------------------- 1 | # 2 | # Makefile.am 3 | # 4 | # Written by: Francesco Salvestrini 5 | # 6 | 7 | EXTRA_DIST = \ 8 | ArgException.h \ 9 | Arg.h \ 10 | ArgTraits.h \ 11 | CmdLine.h \ 12 | CmdLineInterface.h \ 13 | CmdLineOutput.h \ 14 | Constraint.h \ 15 | DocBookOutput.h \ 16 | HelpVisitor.h \ 17 | IgnoreRestVisitor.h \ 18 | Makefile \ 19 | Makefile.am \ 20 | Makefile.in \ 21 | MultiArg.h \ 22 | MultiSwitchArg.h \ 23 | OptionalUnlabeledTracker.h \ 24 | StandardTraits.h \ 25 | StdOutput.h \ 26 | SwitchArg.h \ 27 | UnlabeledMultiArg.h \ 28 | UnlabeledValueArg.h \ 29 | ValueArg.h \ 30 | ValuesConstraint.h \ 31 | VersionVisitor.h \ 32 | Visitor.h \ 33 | XorHandler.h \ 34 | ZshCompletionOutput.h 35 | -------------------------------------------------------------------------------- /rinad/src/common/tclap/Visitor.h: -------------------------------------------------------------------------------- 1 | 2 | /****************************************************************************** 3 | * 4 | * file: Visitor.h 5 | * 6 | * Copyright (c) 2003, Michael E. Smoot . 7 | * All rights reverved. 8 | * 9 | * See the file COPYING in the top directory of this distribution for 10 | * more information. 11 | * 12 | * THE SOFTWARE IS PROVIDED _AS IS_, WITHOUT WARRANTY OF ANY KIND, EXPRESS 13 | * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 14 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 15 | * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 16 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 17 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 18 | * DEALINGS IN THE SOFTWARE. 19 | * 20 | *****************************************************************************/ 21 | 22 | 23 | #ifndef TCLAP_VISITOR_H 24 | #define TCLAP_VISITOR_H 25 | 26 | namespace TCLAP { 27 | 28 | /** 29 | * A base class that defines the interface for visitors. 30 | */ 31 | class Visitor 32 | { 33 | public: 34 | 35 | /** 36 | * Constructor. Does nothing. 37 | */ 38 | Visitor() { } 39 | 40 | /** 41 | * Destructor. Does nothing. 42 | */ 43 | virtual ~Visitor() { } 44 | 45 | /** 46 | * Does nothing. Should be overridden by child. 47 | */ 48 | virtual void visit() { } 49 | }; 50 | 51 | } 52 | 53 | #endif 54 | -------------------------------------------------------------------------------- /rinad/src/ipcm/.cf_version: -------------------------------------------------------------------------------- 1 | 1.1.1 2 | -------------------------------------------------------------------------------- /rinad/src/ipcm/.gitignore: -------------------------------------------------------------------------------- 1 | *.o 2 | 3 | /ipcm 4 | /test-empty 5 | 6 | /rinad-ipcm.pc 7 | -------------------------------------------------------------------------------- /rinad/src/ipcm/addons/Makefile.am: -------------------------------------------------------------------------------- 1 | # 2 | # Makefile.am 3 | # 4 | # Written by: Francesco Salvestrini 5 | # 6 | 7 | EXTRA_DIST = 8 | CLEANFILES = 9 | 10 | SUBDIRS= ma 11 | 12 | # 13 | #Addons 14 | # 15 | noinst_LTLIBRARIES = libaddons.la 16 | libaddons_la_SOURCES = \ 17 | console.cc \ 18 | scripting.cc \ 19 | mobility-manager.cc 20 | 21 | libaddons_la_CPPFLAGS = \ 22 | $(CPPFLAGS_EXTRA) \ 23 | $(LIBRINA_CFLAGS) \ 24 | -I$(srcdir)/../../ \ 25 | -I$(srcdir)/../../common 26 | 27 | libaddons_la_LIBADD = \ 28 | ma/libaddons_ma.la 29 | -------------------------------------------------------------------------------- /rinad/src/ipcm/addons/ma/Makefile.am: -------------------------------------------------------------------------------- 1 | # 2 | # Makefile.am 3 | # 4 | # Written by: Marc Sune 5 | # 6 | 7 | SUBDIRS = ribs 8 | 9 | noinst_LTLIBRARIES = libaddons_ma.la 10 | 11 | libaddons_ma_la_SOURCES = \ 12 | agent.cc \ 13 | bgtm.cc \ 14 | confm.cc \ 15 | flowm.cc \ 16 | ribf.cc 17 | 18 | libaddons_ma_la_CPPFLAGS = \ 19 | $(CPPFLAGS_EXTRA) \ 20 | $(LIBRINA_CFLAGS) \ 21 | -I$(srcdir)/../../../ \ 22 | -I$(srcdir)/../../../common \ 23 | -I${srcdir}/../../jsoncpp 24 | 25 | libaddons_ma_la_LIBADD = \ 26 | $(builddir)/../../../common/librinad.la \ 27 | ribs/librinad_ma_ribs.la \ 28 | $(LIBRINA_LIBS) 29 | 30 | -------------------------------------------------------------------------------- /rinad/src/ipcm/addons/ma/ribs/Makefile.am: -------------------------------------------------------------------------------- 1 | # 2 | # Makefile.am 3 | # 4 | # Written by: Marc Sune 5 | # 6 | 7 | SUBDIRS = 8 | 9 | EXTRA_DIST = 10 | CLEANFILES = 11 | 12 | noinst_LTLIBRARIES = librinad_ma_ribs.la 13 | 14 | librinad_ma_ribs_la_CFLAGS = 15 | librinad_ma_ribs_la_CPPFLAGS = \ 16 | $(CPPFLAGS_EXTRA) \ 17 | $(LIBRINA_CFLAGS) \ 18 | $(LIBPROTOBUF_CFLAGS) \ 19 | -I$(srcdir)/../../ \ 20 | -I$(srcdir)/../../../../common 21 | 22 | librinad_ma_ribs_la_LIBADD = \ 23 | $(LIBRINA_LIBS) \ 24 | $(LIBPROTOBUF_LIBS) 25 | 26 | librinad_ma_ribs_la_SOURCES = \ 27 | ipcp_obj.cc \ 28 | ribd_v1.cc 29 | -------------------------------------------------------------------------------- /rinad/src/ipcm/addons/ma/ribs/ribd_v1.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file ribdv1.h 3 | * @author Bernat Gaston 4 | * 5 | * @brief Management Agent RIB daemon v1 6 | */ 7 | 8 | #ifndef __RINAD_RIBD_V1_H__ 9 | #define __RINAD_RIBD_V1_H__ 10 | 11 | #include 12 | #include 13 | #include 14 | 15 | namespace rinad { 16 | namespace mad { 17 | namespace rib_v1 { 18 | 19 | /// 20 | /// Create v1 schema 21 | /// 22 | void createSchema(void); 23 | 24 | /// 25 | /// Create and initialize a RIB (populate static objects) 26 | /// 27 | rina::rib::rib_handle_t createRIB(void); 28 | 29 | /// 30 | /// Destroy a RIB 31 | /// 32 | void destroyRIB(const rina::rib::rib_handle_t& rib); 33 | 34 | /// 35 | /// Associate RIB to AE 36 | /// 37 | void associateRIBtoAE(const rina::rib::rib_handle_t& rib, 38 | const std::string& ae_name); 39 | 40 | /// 41 | /// Add a new IPCP object due to an external creation (e.g. CLI) 42 | /// 43 | void createIPCPObj(const rina::rib::rib_handle_t& rib, int ipcp_id); 44 | 45 | /// 46 | /// Add a new IPCP object due to an external creation (e.g. CLI) 47 | /// 48 | void destroyIPCPObj(const rina::rib::rib_handle_t& rib, int ipcp_id); 49 | 50 | } //namespace rib_v1 51 | } //namespace mad 52 | } //namespace rinad 53 | 54 | #endif /* __RINAD_RIBD_V1_H__ */ 55 | -------------------------------------------------------------------------------- /rinad/src/ipcm/addons/ma/tests/commmTest.cc: -------------------------------------------------------------------------------- 1 | /* 2 | * Test for the Communication task for the MA daemon 3 | * 4 | * Bernat Gaston 5 | * 6 | * This library is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU Lesser General Public 8 | * License as published by the Free Software Foundation; either 9 | * version 2.1 of the License, or (at your option) any later version. 10 | * 11 | * This library is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | * Lesser General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Lesser General Public 17 | * License along with this library; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 19 | * MA 02110-1301 USA 20 | */ 21 | 22 | #include "commm.h" 23 | 24 | 25 | bool getInstance_New_True 26 | { 27 | 28 | } 29 | 30 | bool CACEPManagerFactory_Test 31 | { 32 | 33 | } 34 | 35 | void main() 36 | { 37 | 38 | } 39 | -------------------------------------------------------------------------------- /rinad/src/ipcm/addons/scripting.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Scripting engine 3 | * 4 | * Vincenzo Maffione 5 | * Marc Sune 6 | * 7 | * This library is free software; you can redistribute it and/or 8 | * modify it under the terms of the GNU Lesser General Public 9 | * License as published by the Free Software Foundation; either 10 | * version 2.1 of the License, or (at your option) any later version. 11 | * 12 | * This library is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | * Lesser General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Lesser General Public 18 | * License along with this library; if not, write to the Free Software 19 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 20 | * MA 02110-1301 USA 21 | */ 22 | 23 | #ifndef __IPCM_SCRIPTING_H__ 24 | #define __IPCM_SCRIPTING_H__ 25 | 26 | #include 27 | #include 28 | #include 29 | 30 | #include "../addon.h" 31 | 32 | namespace rinad { 33 | 34 | 35 | class ScriptingEngine : public Addon{ 36 | 37 | public: 38 | ScriptingEngine(void); 39 | virtual ~ScriptingEngine(void); 40 | static const std::string NAME; 41 | }; 42 | 43 | } //namespace rinad 44 | 45 | #endif /* __IPCM_SCRIPTING_H__ */ 46 | -------------------------------------------------------------------------------- /rinad/src/ipcm/configuration.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Configuration reader for IPC Manager 3 | * 4 | * Sander Vrijders 5 | * Vincenzo Maffione 6 | * 7 | * This library is free software; you can redistribute it and/or 8 | * modify it under the terms of the GNU Lesser General Public 9 | * License as published by the Free Software Foundation; either 10 | * version 2.1 of the License, or (at your option) any later version. 11 | * 12 | * This library is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | * Lesser General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Lesser General Public 18 | * License along with this library; if not, write to the Free Software 19 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 20 | * MA 02110-1301 USA 21 | */ 22 | 23 | #ifndef __IPCM_CONFIGURATION_H__ 24 | #define __IPCM_CONFIGURATION_H__ 25 | 26 | #include 27 | 28 | #include "rina-configuration.h" 29 | 30 | namespace rinad { 31 | 32 | bool parse_configuration(std::string& file_loc); 33 | 34 | } 35 | #endif /* __IPCM_CONFIGURATION_H__ */ 36 | -------------------------------------------------------------------------------- /rinad/src/ipcm/include/Makefile.am: -------------------------------------------------------------------------------- 1 | # 2 | # Makefile.am 3 | # 4 | # Written by: Francesco Salvestrini 5 | # 6 | 7 | SUBDIRS = ipcm 8 | -------------------------------------------------------------------------------- /rinad/src/ipcm/include/ipcm/Makefile.am: -------------------------------------------------------------------------------- 1 | # 2 | # Makefile.am 3 | # 4 | # Written by: Francesco Salvestrini 5 | # 6 | 7 | ipcmincludedir = $(pkgincludedir)/ipcm 8 | 9 | nobase_ipcminclude_HEADERS = \ 10 | policy.h 11 | -------------------------------------------------------------------------------- /rinad/src/ipcm/include/ipcm/policy.h: -------------------------------------------------------------------------------- 1 | /* 2 | * IPC Manager - Policy 3 | * 4 | * Francesco Salvestrini 5 | * 6 | * This library is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU Lesser General Public 8 | * License as published by the Free Software Foundation; either 9 | * version 2.1 of the License, or (at your option) any later version. 10 | * 11 | * This library is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | * Lesser General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Lesser General Public 17 | * License along with this library; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 19 | * MA 02110-1301 USA 20 | */ 21 | 22 | #ifndef RINAD_IPCM_POLICY_H 23 | #define RINAD_IPCM_POLICY_H 24 | 25 | #endif 26 | -------------------------------------------------------------------------------- /rinad/src/ipcm/rinad-ipcm.pc.in: -------------------------------------------------------------------------------- 1 | prefix=@prefix@ 2 | libdir=@libdir@ 3 | includedir=@pkgincludedir@/ipcm 4 | pluginsdir=@pkglibdir@/ipcm 5 | 6 | Name: RINAd IPCM 7 | Description: RINA IPC Manager Daemon 8 | Version: @PACKAGE_VERSION@ 9 | URL: @PACKAGE_URL@ 10 | Requires: LibRINA >= @PACKAGE_VERSION@ 11 | Libs: -L${libdir} -lrina 12 | Libs.private: -lpthread 13 | Cflags: -I${includedir} 14 | -------------------------------------------------------------------------------- /rinad/src/ipcm/test-empty.cc: -------------------------------------------------------------------------------- 1 | // 2 | // An empty test 3 | // 4 | // First Last 5 | // 6 | // This library is free software; you can redistribute it and/or 7 | // modify it under the terms of the GNU Lesser General Public 8 | // License as published by the Free Software Foundation; either 9 | // version 2.1 of the License, or (at your option) any later version. 10 | // 11 | // This library is distributed in the hope that it will be useful, 12 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | // Lesser General Public License for more details. 15 | // 16 | // You should have received a copy of the GNU Lesser General Public 17 | // License along with this library; if not, write to the Free Software 18 | // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 19 | // MA 02110-1301 USA 20 | // 21 | 22 | #include 23 | 24 | int main(int argc, char * argv[]) 25 | { 26 | return EXIT_SUCCESS; 27 | } 28 | -------------------------------------------------------------------------------- /rinad/src/ipcp/.gitignore: -------------------------------------------------------------------------------- 1 | *.o 2 | *.swo 3 | *.swp 4 | 5 | /ipcp 6 | /test-encoders 7 | /test-pduftg 8 | 9 | /rinad-ipcp.pc 10 | /ipcp-plugins 11 | -------------------------------------------------------------------------------- /rinad/src/ipcp/ipcp-plugins.in: -------------------------------------------------------------------------------- 1 | #!@SHELL@ 2 | 3 | # 4 | # IPC Process daemon plugins helper 5 | # 6 | # Written by: Francesco Salvestrini 7 | # 8 | 9 | echo `PKG_CONFIG_PATH=$PKG_CONFIG_PATH:@PKG_CONFIG_PATH@ @PKG_CONFIG@ rinad-ipcp --variable=pluginsdir` 10 | -------------------------------------------------------------------------------- /rinad/src/ipcp/plugins/Makefile.am: -------------------------------------------------------------------------------- 1 | # 2 | # Makefile.am 3 | # 4 | # Written by: Francesco Salvestrini 5 | # 6 | 7 | SUBDIRS = default sm-auth-psoc sm-passwd sm-cbac nsm-address-change 8 | -------------------------------------------------------------------------------- /rinad/src/ipcp/plugins/default/rina-default-plugin.manifest: -------------------------------------------------------------------------------- 1 | { 2 | "PluginName": "rina-default-plugin", 3 | "PluginVersion": "1", 4 | "PolicySets" : [ 5 | { 6 | "Name": "default", 7 | "Component": "rmt", 8 | "Version" : "1" 9 | }, 10 | { 11 | "Name": "default", 12 | "Component": "pff", 13 | "Version" : "1" 14 | }, 15 | { 16 | "Name": "default", 17 | "Component": "dtp", 18 | "Version" : "1" 19 | }, 20 | { 21 | "Name": "default", 22 | "Component": "dtcp", 23 | "Version" : "1" 24 | }, 25 | { 26 | "Name": "default", 27 | "Component": "crypto", 28 | "Version" : "1" 29 | }, 30 | { 31 | "Name": "CRC32", 32 | "Component": "errc", 33 | "Version" : "1" 34 | }, 35 | { 36 | "Name": "default", 37 | "Component": "ttl", 38 | "Version" : "1" 39 | } 40 | ] 41 | } 42 | -------------------------------------------------------------------------------- /rinad/src/ipcp/plugins/nsm-address-change/Makefile.am: -------------------------------------------------------------------------------- 1 | # 2 | # Makefile.am 3 | # 4 | # Written by: Vincenzo Maffione 5 | # 6 | 7 | EXTRA_DIST = 8 | CLEANFILES = 9 | 10 | COMMONCPPFLAGS = \ 11 | $(CPPFLAGS_EXTRA) \ 12 | $(LIBRINA_CFLAGS) \ 13 | -I$(top_srcdir)/src \ 14 | -I$(top_srcdir)/src/common 15 | 16 | pluginsdir = $(pkglibdir)/ipcp 17 | plugins_LTLIBRARIES = 18 | 19 | nsm_address_change_la_CFLAGS = 20 | nsm_address_change_la_CPPFLAGS = \ 21 | $(COMMONCPPFLAGS) 22 | nsm_address_change_la_LIBADD = 23 | nsm_address_change_la_LDFLAGS = -module 24 | nsm_address_change_la_SOURCES = \ 25 | nsm-address-change-plugin.cc \ 26 | ../../components.h \ 27 | ../../components.cc 28 | 29 | plugins_LTLIBRARIES += nsm-address-change.la 30 | 31 | dist_plugins_DATA = nsm-address-change.manifest -------------------------------------------------------------------------------- /rinad/src/ipcp/plugins/nsm-address-change/nsm-address-change.manifest: -------------------------------------------------------------------------------- 1 | { 2 | "PluginName": "nsm-address-change", 3 | "PluginVersion": "1", 4 | "PolicySets" : [ 5 | { 6 | "Name": "address-change", 7 | "Component": "namespace-manager", 8 | "Version" : "1" 9 | } 10 | ] 11 | } -------------------------------------------------------------------------------- /rinad/src/ipcp/plugins/sm-auth-psoc/Makefile.am: -------------------------------------------------------------------------------- 1 | # 2 | # Makefile.am 3 | # 4 | # Written by: Vincenzo Maffione 5 | # 6 | 7 | EXTRA_DIST = 8 | CLEANFILES = 9 | 10 | COMMONCPPFLAGS = \ 11 | $(CPPFLAGS_EXTRA) \ 12 | $(LIBRINA_CFLAGS) \ 13 | -I$(top_srcdir)/src \ 14 | -I$(top_srcdir)/src/common 15 | 16 | pluginsdir = $(pkglibdir)/ipcp 17 | plugins_LTLIBRARIES = 18 | 19 | sm_auth_psoc_la_CFLAGS = 20 | sm_auth_psoc_la_CPPFLAGS = \ 21 | $(COMMONCPPFLAGS) 22 | sm_auth_psoc_la_LIBADD = 23 | sm_auth_psoc_la_LDFLAGS = -module 24 | sm_auth_psoc_la_SOURCES = \ 25 | sm-auth-psoc-plugin.cc \ 26 | ../../components.h \ 27 | ../../components.cc 28 | 29 | plugins_LTLIBRARIES += sm-auth-psoc.la 30 | 31 | dist_plugins_DATA = sm-auth-psoc.manifest 32 | -------------------------------------------------------------------------------- /rinad/src/ipcp/plugins/sm-auth-psoc/sm-auth-psoc.manifest: -------------------------------------------------------------------------------- 1 | { 2 | "PluginName": "sm-auth-psoc", 3 | "PluginVersion": "1", 4 | "PolicySets" : [ 5 | { 6 | "Name": "PSOC_authentication-password", 7 | "Component": "security-manager", 8 | "Version" : "1" 9 | }, { 10 | "Name": "PSOC_authentication-ssh2", 11 | "Component": "security-manager", 12 | "Version" : "1" 13 | }, { 14 | "Name": "PSOC_authentication-tlshandshake", 15 | "Component": "security-manager", 16 | "Version" : "1" 17 | } 18 | ] 19 | } 20 | -------------------------------------------------------------------------------- /rinad/src/ipcp/plugins/sm-cbac/Makefile.am: -------------------------------------------------------------------------------- 1 | # 2 | # Makefile.am 3 | # 4 | # Written by: Vincenzo Maffione 5 | # 6 | 7 | include Makefile.inc 8 | 9 | # EXTRA_DIST = 10 | CLEANFILES = *.pb.h *.pb.cc sm-cbac.stamp 11 | # MOSTLYCLEANFILES = 12 | # DISTCLEANFILES = 13 | # protoSOURCES = 14 | # 15 | # EXTRA_DIST += sm-cbac.proto 16 | # protoSOURCES += sm-cbac.pb.cc sm-cbac.pb.h 17 | # #DISTCLEANFILES += sm-cbac.pb.h 18 | # BUILT_SOURCES = 19 | #EXTRA_DIST = sm-cbac.proto 20 | 21 | COMMONCPPFLAGS = \ 22 | $(CPPFLAGS_EXTRA) \ 23 | $(LIBRINA_CFLAGS) \ 24 | -I$(top_srcdir)/src \ 25 | -I$(top_srcdir)/src/common 26 | 27 | COMMONLIBS = \ 28 | $(builddir)/../../../common/librinad.la \ 29 | $(LIBRINA_LIBS) 30 | 31 | pluginsdir = $(pkglibdir)/ipcp 32 | plugins_LTLIBRARIES = 33 | 34 | sm_cbac_la_CFLAGS = 35 | sm_cbac_la_CPPFLAGS = \ 36 | $(COMMONCPPFLAGS) \ 37 | $(LIBPROTOBUF_CFLAGS) 38 | sm_cbac_la_LIBADD = $(LIBPROTOBUF_LIBS) \ 39 | $(COMMONLIBS) -ldl 40 | 41 | 42 | sm_cbac_la_LDFLAGS = -module 43 | sm_cbac_la_SOURCES = \ 44 | sm-cbac-plugin.cc \ 45 | security-manager-cbac.cc \ 46 | security-manager-cbac.h \ 47 | ../../components.h \ 48 | ../../components.cc \ 49 | $(protoSOURCES) 50 | 51 | plugins_LTLIBRARIES += sm-cbac.la 52 | BUILT_SOURCES = $(protoSOURCES) 53 | dist_plugins_DATA = sm-cbac.manifest 54 | 55 | 56 | 57 | -------------------------------------------------------------------------------- /rinad/src/ipcp/plugins/sm-cbac/Makefile.inc: -------------------------------------------------------------------------------- 1 | EXTRA_DIST = 2 | CLEANFILES = 3 | DISTCLEANFILES = 4 | protoSOURCES = 5 | MOSTLYCLEANFILES = 6 | othersrcdir = $(srcdir)/../../../common/encoders 7 | 8 | sm-cbac.stamp: sm-cbac.proto 9 | rm -f sm-cbac.tmp 10 | touch sm-cbac.tmp 11 | $(PROTOC) -I$(builddir) -I$(srcdir) -I$(othersrcdir) \ 12 | --cpp_out=$(builddir) \ 13 | $(srcdir)/sm-cbac.proto $(othersrcdir)/ApplicationProcessNamingInfoMessage.proto 14 | mv -f sm-cbac.tmp $@ 15 | 16 | sm-cbac.pb.h sm-cbac.pb.cc: sm-cbac.stamp 17 | if test -f $@; then :; else \ 18 | trap 'rm -rf sm-cbac.lock sm-cbac.stamp' 1 2 13 15; \ 19 | if mkdir sm-cbac.lock 2>/dev/null; then \ 20 | rm -f sm-cbac.stamp; \ 21 | $(MAKE) $(AM_MAKEFLAGS) sm-cbac.stamp; \ 22 | result=$$?; rm -rf sm-cbac.lock; exit $$result; \ 23 | else \ 24 | while test -d sm-cbac.lock; do sleep 1; done; \ 25 | test -f sm-cbac.stamp; \ 26 | fi; \ 27 | fi 28 | DISTCLEANFILES += \ 29 | sm-cbac.pb.h sm-cbac.pb.cc sm-cbac.stamp 30 | 31 | MOSTLYCLEANFILES += \ 32 | sm-cbac.tmp 33 | 34 | EXTRA_DIST += \ 35 | sm-cbac.proto 36 | 37 | protoSOURCES += sm-cbac.pb.cc sm-cbac.pb.h 38 | -------------------------------------------------------------------------------- /rinad/src/ipcp/plugins/sm-cbac/proto2inc: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # 4 | # proto2inc 5 | # 6 | # Written by: Francesco Salvestrini 7 | # 8 | 9 | rm Makefile.inc 10 | 11 | cat > Makefile.inc <> Makefile.inc << EOF 20 | $name.stamp: $name.proto 21 | rm -f $name.tmp 22 | touch $name.tmp 23 | \$(PROTOC) -I\$(builddir) -I\$(srcdir) \\ 24 | --cpp_out=\$(builddir) \\ 25 | \$(srcdir)/$name.proto 26 | mv -f $name.tmp \$@ 27 | 28 | $name.pb.h $name.pb.cc: $name.stamp 29 | if test -f \$@; then :; else \\ 30 | trap 'rm -rf $name.lock $name.stamp' 1 2 13 15; \\ 31 | if mkdir $name.lock 2>/dev/null; then \\ 32 | rm -f $name.stamp; \\ 33 | \$(MAKE) \$(AM_MAKEFLAGS) $name.stamp; \\ 34 | result=\$\$?; rm -rf $name.lock; exit \$\$result; \\ 35 | else \\ 36 | while test -d $name.lock; do sleep 1; done; \\ 37 | test -f $name.stamp; \\ 38 | fi; \\ 39 | fi 40 | 41 | DISTCLEANFILES += \\ 42 | $name.pb.h $name.pb.cc $name.stamp 43 | 44 | MOSTLYCLEANFILES += \\ 45 | $name.tmp 46 | 47 | EXTRA_DIST += \\ 48 | $name.proto 49 | 50 | protoSOURCES += $name.pb.cc $name.pb.h 51 | 52 | 53 | EOF 54 | 55 | done 56 | -------------------------------------------------------------------------------- /rinad/src/ipcp/plugins/sm-cbac/sm-cbac-plugin.cc: -------------------------------------------------------------------------------- 1 | #define IPCP_MODULE "security-manager-ps-cbac" 2 | #include "../../ipcp-logging.h" 3 | 4 | #include "ipcp/components.h" 5 | #include "security-manager-cbac.h" 6 | 7 | namespace rinad { 8 | 9 | extern "C" rina::IPolicySet * 10 | createCBACPs(rina::ApplicationEntity * ctx) 11 | { 12 | IPCPSecurityManager * sm = dynamic_cast(ctx); 13 | if (!sm || !sm->get_application_process()) { 14 | return NULL; 15 | } 16 | IPCPRIBDaemon * rib_daemon = 17 | dynamic_cast(sm->get_application_process()->get_rib_daemon()); 18 | if (!rib_daemon) { 19 | return NULL; 20 | } 21 | // instantiate policy set here 22 | return new SecurityManagerCBACPs(sm); 23 | //return NULL; 24 | } 25 | 26 | extern "C" void 27 | destroyCBACPs(rina::IPolicySet * ps) 28 | { 29 | if (ps) { 30 | delete ps; 31 | } 32 | } 33 | 34 | extern "C" int 35 | get_factories(std::vector& factories) 36 | { 37 | struct rina::PsFactory cbac_factory; 38 | 39 | cbac_factory.info.name = "cbac"; 40 | cbac_factory.info.app_entity = rina::ApplicationEntity::SECURITY_MANAGER_AE_NAME; 41 | cbac_factory.create = createCBACPs; 42 | cbac_factory.destroy = destroyCBACPs; 43 | factories.push_back(cbac_factory); 44 | 45 | return 0; 46 | } 47 | 48 | } // namespace rinad 49 | -------------------------------------------------------------------------------- /rinad/src/ipcp/plugins/sm-cbac/sm-cbac.manifest: -------------------------------------------------------------------------------- 1 | { 2 | "PluginName": "sm-cbac", 3 | "PluginVersion": "1", 4 | "PolicySets" : [ 5 | { 6 | "Name": "cbac", 7 | "Component": "security-manager", 8 | "Version" : "1" 9 | } 10 | ] 11 | } -------------------------------------------------------------------------------- /rinad/src/ipcp/plugins/sm-cbac/sm-cbac.proto: -------------------------------------------------------------------------------- 1 | syntax="proto2"; 2 | package rina.messages; 3 | option optimize_for = LITE_RUNTIME; 4 | import "ApplicationProcessNamingInfoMessage.proto"; 5 | 6 | message smCapability_t { 7 | optional string ressource = 1; 8 | optional string operation = 2; 9 | } 10 | 11 | message smCbacToken_t { 12 | required uint32 token_id = 1; /*unsigned short*/ 13 | required uint32 ipcp_issuer_id = 2; /*unsigned short*/ 14 | required rina.messages.applicationProcessNamingInfo_t ipcp_issuer_name = 3; 15 | required rina.messages.applicationProcessNamingInfo_t ipcp_holder_name = 4; 16 | repeated string audience = 5; 17 | required uint32 issued_time = 6; /*int*/ 18 | required uint32 token_nbf = 7; 19 | required uint32 token_exp = 8; 20 | repeated smCapability_t token_cap = 9; 21 | } 22 | 23 | message smCbacTokenPlusSign_t { 24 | required smCbacToken_t token = 1; 25 | required bytes token_sign = 2; 26 | } -------------------------------------------------------------------------------- /rinad/src/ipcp/plugins/sm-passwd/Makefile.am: -------------------------------------------------------------------------------- 1 | # 2 | # Makefile.am 3 | # 4 | # Written by: Vincenzo Maffione 5 | # 6 | 7 | EXTRA_DIST = 8 | CLEANFILES = 9 | 10 | COMMONCPPFLAGS = \ 11 | $(CPPFLAGS_EXTRA) \ 12 | $(LIBRINA_CFLAGS) \ 13 | -I$(top_srcdir)/src \ 14 | -I$(top_srcdir)/src/common 15 | 16 | pluginsdir = $(pkglibdir)/ipcp 17 | plugins_LTLIBRARIES = 18 | 19 | sm_passwd_la_CFLAGS = 20 | sm_passwd_la_CPPFLAGS = \ 21 | $(COMMONCPPFLAGS) 22 | sm_passwd_la_LIBADD = 23 | sm_passwd_la_LDFLAGS = -module 24 | sm_passwd_la_SOURCES = \ 25 | security-manager-passwd.cc \ 26 | ../../components.h \ 27 | ../../components.cc 28 | 29 | plugins_LTLIBRARIES += sm-passwd.la 30 | 31 | dist_plugins_DATA = sm-passwd.manifest 32 | -------------------------------------------------------------------------------- /rinad/src/ipcp/plugins/sm-passwd/sm-passwd.manifest: -------------------------------------------------------------------------------- 1 | { 2 | "PluginName": "sm-passwd", 3 | "PluginVersion": "1", 4 | "PolicySets" : [ 5 | { 6 | "Name": "passwd", 7 | "Component": "security-manager", 8 | "Version" : "1" 9 | } 10 | ] 11 | } 12 | -------------------------------------------------------------------------------- /rinad/src/ipcp/rinad-ipcp.pc.in: -------------------------------------------------------------------------------- 1 | prefix=@prefix@ 2 | libdir=@libdir@ 3 | includedir=@pkgincludedir@/ipcp 4 | pluginsdir=@pkglibdir@/ipcp 5 | 6 | Name: RINAd IPCP 7 | Description: RINA IPC Process Daemon 8 | Version: @PACKAGE_VERSION@ 9 | URL: @PACKAGE_URL@ 10 | Requires: LibRINA >= @PACKAGE_VERSION@ 11 | Libs: -L${libdir} -lrina 12 | -------------------------------------------------------------------------------- /rinad/src/ipcp/shim-wifi/wpa_supplicant/includes.h: -------------------------------------------------------------------------------- 1 | /* 2 | * wpa_supplicant/hostapd - Default include files 3 | * Copyright (c) 2005-2006, Jouni Malinen 4 | * 5 | * This software may be distributed under the terms of the BSD license. 6 | * See README for more details. 7 | * 8 | * This header file is included into all C files so that commonly used header 9 | * files can be selected with OS specific ifdef blocks in one place instead of 10 | * having to have OS/C library specific selection in many files. 11 | */ 12 | 13 | #ifndef INCLUDES_H 14 | #define INCLUDES_H 15 | 16 | /* Include possible build time configuration before including anything else */ 17 | #include "build_config.h" 18 | 19 | #include 20 | #include 21 | #include 22 | #include 23 | #include 24 | #ifndef _WIN32_WCE 25 | #include 26 | #include 27 | #include 28 | #endif /* _WIN32_WCE */ 29 | #include 30 | 31 | #ifndef _MSC_VER 32 | #include 33 | #endif /* _MSC_VER */ 34 | 35 | #ifndef CONFIG_NATIVE_WINDOWS 36 | #include 37 | #include 38 | #include 39 | #ifndef __vxworks 40 | #include 41 | #include 42 | #endif /* __vxworks */ 43 | #endif /* CONFIG_NATIVE_WINDOWS */ 44 | 45 | #endif /* INCLUDES_H */ 46 | -------------------------------------------------------------------------------- /rinad/tools/.gitignore: -------------------------------------------------------------------------------- 1 | /backtrace-demangler -------------------------------------------------------------------------------- /rinad/tools/Makefile.am: -------------------------------------------------------------------------------- 1 | # 2 | # Makefile.am 3 | # 4 | # Written by: Francesco Salvestrini 5 | # 6 | 7 | SUBDIRS = 8 | EXTRA_DIST = 9 | DISTCLEANFILES = 10 | bin_PROGRAMS = 11 | bin_SCRIPTS = 12 | AM_INSTALLCHECK_STD_OPTIONS_EXEMPT = 13 | 14 | edit = $(SED) \ 15 | -e 's|@PACKAGE_VERSION[@]|$(PACKAGE_VERSION)|g' \ 16 | -e 's|@PACKAGE_NAME[@]|$(PACKAGE_NAME)|g' \ 17 | -e 's|@PACKAGE_URL[@]|$(PACKAGE_URL)|g' \ 18 | -e 's|@PACKAGE_BUGREPORT[@]|$(PACKAGE_BUGREPORT)|g' \ 19 | -e 's|@PERL[@]|$(PERL)|g' 20 | 21 | if HAVE_PERL 22 | backtrace-demangler: backtrace-demangler.in Makefile 23 | rm -f $@ $@.tmp 24 | srcdir=''; \ 25 | test -f ./$@.in || srcdir=$(srcdir)/; \ 26 | $(edit) $${srcdir}$@.in >$@.tmp 27 | chmod a-w $@.tmp 28 | chmod a+x $@.tmp 29 | mv $@.tmp $@ 30 | 31 | bin_SCRIPTS += backtrace-demangler 32 | DISTCLEANFILES += backtrace-demangler 33 | EXTRA_DIST += backtrace-demangler.in 34 | AM_INSTALLCHECK_STD_OPTIONS_EXEMPT += backtrace-demangler 35 | endif 36 | -------------------------------------------------------------------------------- /rinad/tools/backtrace-demangler.in: -------------------------------------------------------------------------------- 1 | #!@PERL@ 2 | 3 | # 4 | # backtrace-demangler 5 | # 6 | # (C) 2006 NeXtworks 7 | # 8 | # Francesco Salvestrini 9 | # 10 | 11 | my $me = "backtrace-demangler"; 12 | 13 | print "---------------------------------\n"; 14 | print "Copy && paste your backtrace then press CTRL+D:\n"; 15 | print "\n"; 16 | my @lines; 17 | while () { 18 | push(@lines, $_); 19 | } 20 | 21 | print "---------------------------------\n"; 22 | print "Demangled backtrace:\n"; 23 | print "\n"; 24 | foreach (@lines) { 25 | chomp(); 26 | if (m/^[ \t]*(.*)[ \t]+\[(0x[0-9a-fA-F]+)\][ \t]*$/) { 27 | my $executable = $1; 28 | my $address = $2; 29 | 30 | $executable =~ s,\(.*\),,; 31 | #print "Demangling $executable $address\n"; 32 | 33 | system("addr2line -e $executable $address"); 34 | } elsif (m/^[ \t]*$/) { 35 | } else { 36 | print "$me: Unhandled line '$_'\n"; 37 | } 38 | } 39 | print "---------------------------------\n"; 40 | 41 | exit 0; 42 | -------------------------------------------------------------------------------- /rinad/wrap/Makefile.am: -------------------------------------------------------------------------------- 1 | # 2 | # Makefile.am 3 | # 4 | # Written by: Francesco Salvestrini 5 | # 6 | 7 | SUBDIRS = java 8 | 9 | EXTRA_DIST = \ 10 | librinad.i \ 11 | stdlist.i 12 | -------------------------------------------------------------------------------- /tests/conf/da.map: -------------------------------------------------------------------------------- 1 | { 2 | "applicationToDIFMappings" : [ { 3 | "encodedAppName" : "rina.utils.apps.echo.server-1--", 4 | "difName" : "normal.DIF" 5 | }, { 6 | "encodedAppName" : "rina.utils.apps.echo.client-1--", 7 | "difName" : "normal.DIF" 8 | }, { 9 | "encodedAppName" : "rina.utils.apps.rinaperf.server-1--", 10 | "difName" : "normal.DIF" 11 | }, { 12 | "encodedAppName" : "rina.utils.apps.rinaperf.client-1--", 13 | "difName" : "normal.DIF" 14 | }] 15 | } -------------------------------------------------------------------------------- /tests/conf/format_config_files.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | for i in $(ls ipcmanager.conf*); do 4 | echo "Formatting '$i'" 5 | cp $i ttt 6 | cat ttt | json_reformat > $i 7 | done 8 | rm ttt 9 | -------------------------------------------------------------------------------- /tests/conf/ipcmanager.conf-appovereth: -------------------------------------------------------------------------------- 1 | { 2 | "configFileVersion": "1.4.1", 3 | "localConfiguration": { 4 | "installationPath": "/usr/local/irati/bin", 5 | "libraryPath": "/usr/local/irati/lib", 6 | "logPath": "/usr/local/irati/var/log", 7 | "consoleSocket": "/usr/local/irati/var/run/ipcm-console.sock", 8 | "pluginsPaths": [ 9 | "/usr/local/irati/lib/rinad/ipcp", 10 | "/lib/modules/4.1.10-irati/extra" 11 | ] 12 | }, 13 | "ipcProcessesToCreate": [ 14 | { 15 | "apName": "test-eth", 16 | "apInstance": "1", 17 | "difName": "300" 18 | } 19 | ], 20 | "difConfigurations": [ 21 | { 22 | "name": "300", 23 | "template": "shim-eth-vlan.dif" 24 | } 25 | ] 26 | } 27 | -------------------------------------------------------------------------------- /tests/conf/ipcmanager.conf-appovershimhv: -------------------------------------------------------------------------------- 1 | { 2 | "configFileVersion": "1.4.1", 3 | "localConfiguration": { 4 | "installationPath": "/usr/local/irati/bin", 5 | "libraryPath": "/usr/local/irati/lib", 6 | "logPath": "/usr/local/irati/var/log", 7 | "consoleSocket": "/usr/local/irati/var/run/ipcm-console.sock", 8 | "pluginsPaths": [ 9 | "/usr/local/irati/lib/rinad/ipcp", 10 | "/lib/modules/4.1.10-irati/extra" 11 | ] 12 | }, 13 | "ipcProcessesToCreate": [ 14 | { 15 | "apName": "test-hv", 16 | "apInstance": "1", 17 | "difName": "test-shim-dif-hv" 18 | } 19 | ], 20 | "difConfigurations": [ 21 | { 22 | "name": "test-shim-dif-hv", 23 | "template": "shim-hv.dif" 24 | } 25 | ] 26 | } 27 | -------------------------------------------------------------------------------- /tests/conf/ipcmanager.conf-appovertcpudp: -------------------------------------------------------------------------------- 1 | { 2 | "configFileVersion": "1.4.1", 3 | "localConfiguration" : { 4 | "installationPath" : "/usr/local/irati/bin", 5 | "libraryPath" : "/usr/local/irati/lib", 6 | "consolePort" : "/usr/local/irati/var/run/ipcm-console.sock" 7 | }, 8 | "ipcProcessesToCreate" : [ { 9 | "apName" : "test-shim", 10 | "apInstance" : "1", 11 | "difName" : "test.DIF" 12 | } ], 13 | "difConfigurations" : [ { 14 | "name" : "test.DIF", 15 | "template" : "shim-tcp-udp.dif" 16 | } ] 17 | } 18 | -------------------------------------------------------------------------------- /tests/conf/ipcmanager.conf-mad: -------------------------------------------------------------------------------- 1 | { 2 | "configFileVersion": "1.4.1", 3 | "localConfiguration": { 4 | "installationPath": "/usr/local/irati/bin", 5 | "libraryPath": "/usr/local/irati/lib", 6 | "logPath": "/usr/local/irati/var/log", 7 | "consoleSocket": "/usr/local/irati/var/run/ipcm-console.sock", 8 | "pluginsPaths": [ 9 | "/usr/local/irati/lib/rinad/ipcp", 10 | "/lib/modules/4.1.10-irati/extra" 11 | ] 12 | }, 13 | "ipcProcessesToCreate": [ 14 | { 15 | "apName": "normal-1.IPCP", 16 | "apInstance": "1", 17 | "difName": "normal.DIF", 18 | "difsToRegisterAt": [ 19 | ] 20 | } 21 | ], 22 | "difConfigurations": [ 23 | { 24 | "name": "normal.DIF", 25 | "template": "default.dif" 26 | } 27 | ], 28 | "addons" : { 29 | "mad" : { 30 | "managerAppName" : "rina.apps.mad-1--", 31 | "managerConnections" : [ 32 | { 33 | "managerAppName" : "rina.apps.manager-1--", 34 | "DIF" : "normal.DIF" 35 | } 36 | ] 37 | } 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /tests/conf/ipcmanager.conf-normalovereth1: -------------------------------------------------------------------------------- 1 | { 2 | "configFileVersion": "1.4.1", 3 | "localConfiguration": { 4 | "installationPath": "/usr/local/irati/bin", 5 | "libraryPath": "/usr/local/irati/lib", 6 | "logPath": "/usr/local/irati/var/log", 7 | "consoleSocket": "/usr/local/irati/var/run/ipcm-console.sock", 8 | "pluginsPaths": [ 9 | "/usr/local/irati/lib/rinad/ipcp", 10 | "/lib/modules/4.1.10-irati/extra" 11 | ] 12 | }, 13 | "ipcProcessesToCreate": [ 14 | { 15 | "apName": "test-eth", 16 | "apInstance": "1", 17 | "difName": "300" 18 | }, 19 | { 20 | "apName": "test1.IRATI", 21 | "apInstance": "1", 22 | "difName": "normal.DIF", 23 | "difsToRegisterAt": [ 24 | "300" 25 | ] 26 | } 27 | ], 28 | "difConfigurations": [ 29 | { 30 | "name": "300", 31 | "template": "shim-eth-vlan.dif" 32 | }, 33 | { 34 | "name": "normal.DIF", 35 | "template": "default.dif" 36 | } 37 | ] 38 | } 39 | -------------------------------------------------------------------------------- /tests/conf/ipcmanager.conf-normalovereth2: -------------------------------------------------------------------------------- 1 | { 2 | "configFileVersion": "1.4.1", 3 | "localConfiguration": { 4 | "installationPath": "/usr/local/irati/bin", 5 | "libraryPath": "/usr/local/irati/lib", 6 | "logPath": "/usr/local/irati/var/log", 7 | "consoleSocket": "/usr/local/irati/var/run/ipcm-console.sock", 8 | "pluginsPaths": [ 9 | "/usr/local/irati/lib/rinad/ipcp", 10 | "/lib/modules/4.1.10-irati/extra" 11 | ], 12 | "cdapTimeoutInMs": 10000 13 | }, 14 | "ipcProcessesToCreate": [ 15 | { 16 | "apName": "test-eth", 17 | "apInstance": "1", 18 | "difName": "300" 19 | }, 20 | { 21 | "apName": "test2.IRATI", 22 | "apInstance": "1", 23 | "difName": "normal.DIF", 24 | "difsToRegisterAt": [ 25 | "300" 26 | ] 27 | } 28 | ], 29 | "difConfigurations": [ 30 | { 31 | "name": "300", 32 | "template": "shim-eth-vlan.dif" 33 | }, 34 | { 35 | "name": "normal.DIF", 36 | "template": "default.dif" 37 | } 38 | ] 39 | } 40 | -------------------------------------------------------------------------------- /tests/conf/ipcmanager.conf-normalovernormalovereth1: -------------------------------------------------------------------------------- 1 | { 2 | "configFileVersion": "1.4.1", 3 | "localConfiguration": { 4 | "installationPath": "/usr/local/irati/bin", 5 | "libraryPath": "/usr/local/irati/lib", 6 | "logPath": "/usr/local/irati/var/log", 7 | "consoleSocket": "/usr/local/irati/var/run/ipcm-console.sock", 8 | "pluginsPaths": [ 9 | "/usr/local/irati/lib/rinad/ipcp", 10 | "/lib/modules/4.1.10-irati/extra" 11 | ] 12 | }, 13 | "ipcProcessesToCreate": [ 14 | { 15 | "apName": "test-eth", 16 | "apInstance": "1", 17 | "difName": "300" 18 | }, 19 | { 20 | "apName": "test1.IRATI", 21 | "apInstance": "1", 22 | "difName": "normal.DIF", 23 | "difsToRegisterAt": [ 24 | "300" 25 | ] 26 | }, 27 | { 28 | "apName": "Ada", 29 | "apInstance": "1", 30 | "difName": "fantastic.DIF", 31 | "difsToRegisterAt": [ 32 | "normal.DIF" 33 | ] 34 | } 35 | ], 36 | "difConfigurations": [ 37 | { 38 | "name": "fantastic.DIF", 39 | "template": "vpn.dif" 40 | }, 41 | { 42 | "name": "300", 43 | "template": "shim-eth-vlan.dif" 44 | }, 45 | { 46 | "name": "normal.DIF", 47 | "template": "default.dif" 48 | } 49 | ] 50 | } 51 | -------------------------------------------------------------------------------- /tests/conf/ipcmanager.conf-normalovernormalovereth2: -------------------------------------------------------------------------------- 1 | { 2 | "configFileVersion": "1.4.1", 3 | "localConfiguration": { 4 | "installationPath": "/usr/local/irati/bin", 5 | "libraryPath": "/usr/local/irati/lib", 6 | "logPath": "/usr/local/irati/var/log", 7 | "consoleSocket": "/usr/local/irati/var/run/ipcm-console.sock", 8 | "pluginsPaths": [ 9 | "/usr/local/irati/lib/rinad/ipcp", 10 | "/lib/modules/4.1.10-irati/extra" 11 | ] 12 | }, 13 | "ipcProcessesToCreate": [ 14 | { 15 | "apName": "test-eth", 16 | "apInstance": "1", 17 | "difName": "300" 18 | }, 19 | { 20 | "apName": "test2.IRATI", 21 | "apInstance": "1", 22 | "difName": "normal.DIF", 23 | "difsToRegisterAt": [ 24 | "300" 25 | ] 26 | }, 27 | { 28 | "apName": "Knuth", 29 | "apInstance": "1", 30 | "difName": "fantastic.DIF", 31 | "difsToRegisterAt": [ 32 | "normal.DIF" 33 | ] 34 | } 35 | ], 36 | "difConfigurations": [ 37 | { 38 | "name": "fantastic.DIF", 39 | "template": "vpn.dif" 40 | }, 41 | { 42 | "name": "300", 43 | "template": "shim-eth-vlan.dif" 44 | }, 45 | { 46 | "name": "normal.DIF", 47 | "template": "default.dif" 48 | } 49 | ] 50 | } 51 | -------------------------------------------------------------------------------- /tests/conf/ipcmanager.conf-normalovershimhv1: -------------------------------------------------------------------------------- 1 | { 2 | "configFileVersion": "1.4.1", 3 | "localConfiguration": { 4 | "installationPath": "/usr/local/irati/bin", 5 | "libraryPath": "/usr/local/irati/lib", 6 | "logPath": "/usr/local/irati/var/log", 7 | "consoleSocket": "/usr/local/irati/var/run/ipcm-console.sock", 8 | "pluginsPaths": [ 9 | "/usr/local/irati/lib/rinad/ipcp", 10 | "/lib/modules/4.1.10-irati/extra" 11 | ] 12 | }, 13 | "ipcProcessesToCreate": [ 14 | { 15 | "apName": "test-shim-hv.IPCP", 16 | "apInstance": "1", 17 | "difName": "test-shim-hv.DIF" 18 | }, 19 | { 20 | "apName": "test1.IRATI", 21 | "apInstance": "1", 22 | "difName": "test-normal.DIF", 23 | "difsToRegisterAt": [ 24 | "test-shim-hv.DIF" 25 | ] 26 | } 27 | ], 28 | "difConfigurations": [ 29 | { 30 | "name": "test-shim-hv.DIF", 31 | "template": "shim-hv.dif" 32 | }, 33 | { 34 | "name": "test-normal.DIF", 35 | "template": "default.dif" 36 | } 37 | ] 38 | } 39 | -------------------------------------------------------------------------------- /tests/conf/ipcmanager.conf-normalovershimhv2: -------------------------------------------------------------------------------- 1 | { 2 | "configFileVersion": "1.4.1", 3 | "localConfiguration": { 4 | "installationPath": "/usr/local/irati/bin", 5 | "libraryPath": "/usr/local/irati/lib", 6 | "logPath": "/usr/local/irati/var/log", 7 | "consoleSocket": "/usr/local/irati/var/run/ipcm-console.sock", 8 | "pluginsPaths": [ 9 | "/usr/local/irati/lib/rinad/ipcp", 10 | "/lib/modules/4.1.10-irati/extra" 11 | ] 12 | }, 13 | "ipcProcessesToCreate": [ 14 | { 15 | "apName": "test-shim-hv.IPCP", 16 | "apInstance": "1", 17 | "difName": "test-shim-hv.DIF" 18 | }, 19 | { 20 | "apName": "test2.IRATI", 21 | "apInstance": "1", 22 | "difName": "test-normal.DIF", 23 | "difsToRegisterAt": [ 24 | "test-shim-hv.DIF" 25 | ] 26 | } 27 | ], 28 | "difConfigurations": [ 29 | { 30 | "name": "test-shim-hv.DIF", 31 | "template": "shim-hv.dif" 32 | }, 33 | { 34 | "name": "test-normal.DIF", 35 | "template": "default.dif" 36 | } 37 | ] 38 | } 39 | -------------------------------------------------------------------------------- /tests/conf/ipcmanager.conf-normalovertcpudp1: -------------------------------------------------------------------------------- 1 | { 2 | "configFileVersion": "1.4.1", 3 | "localConfiguration": { 4 | "installationPath": "/usr/local/irati/bin", 5 | "libraryPath": "/usr/local/irati/lib", 6 | "logPath": "/usr/local/irati/var/log", 7 | "consoleSocket": "/usr/local/irati/var/run/ipcm-console.sock", 8 | "pluginsPaths": [ 9 | "/usr/local/irati/lib/rinad/ipcp", 10 | "/lib/modules/4.1.10-irati/extra" 11 | ] 12 | }, 13 | "ipcProcessesToCreate": [ 14 | { 15 | "apName": "test-eth", 16 | "apInstance": "1", 17 | "difName": "shim.DIF" 18 | }, 19 | { 20 | "apName": "test1.IRATI", 21 | "apInstance": "1", 22 | "difName": "normal.DIF", 23 | "difsToRegisterAt": [ 24 | "shim.DIF" 25 | ] 26 | } 27 | ], 28 | "difConfigurations": [ 29 | { 30 | "name" : "shim.DIF", 31 | "template" : "shim-tcp-udp.dif" 32 | }, 33 | { 34 | "name": "normal.DIF", 35 | "template": "default.dif" 36 | } 37 | ] 38 | } 39 | 40 | -------------------------------------------------------------------------------- /tests/conf/ipcmanager.conf-normalovertcpudp2: -------------------------------------------------------------------------------- 1 | { 2 | "configFileVersion": "1.4.1", 3 | "localConfiguration": { 4 | "installationPath": "/usr/local/irati/bin", 5 | "libraryPath": "/usr/local/irati/lib", 6 | "logPath": "/usr/local/irati/var/log", 7 | "consoleSocket": "/usr/local/irati/var/run/ipcm-console.sock", 8 | "pluginsPaths": [ 9 | "/usr/local/irati/lib/rinad/ipcp", 10 | "/lib/modules/4.1.10-irati/extra" 11 | ] 12 | }, 13 | "ipcProcessesToCreate": [ 14 | { 15 | "apName": "test-eth", 16 | "apInstance": "1", 17 | "difName": "shim.DIF" 18 | }, 19 | { 20 | "apName": "test2.IRATI", 21 | "apInstance": "1", 22 | "difName": "normal.DIF", 23 | "difsToRegisterAt": [ 24 | "shim.DIF" 25 | ] 26 | } 27 | ], 28 | "difConfigurations": [ 29 | { 30 | "name" : "shim.DIF", 31 | "template" : "shim-tcp-udp.dif" 32 | }, 33 | { 34 | "name": "normal.DIF", 35 | "template": "default.dif" 36 | } 37 | ] 38 | } 39 | -------------------------------------------------------------------------------- /tests/conf/shim-eth-vlan.dif: -------------------------------------------------------------------------------- 1 | { 2 | "difType" : "shim-eth-vlan", 3 | "configParameters" : { 4 | "interface-name" : "eth1" 5 | } 6 | } -------------------------------------------------------------------------------- /tests/conf/shim-eth-vlan2.dif: -------------------------------------------------------------------------------- 1 | { 2 | "difType" : "shim-eth-vlan", 3 | "configParameters" : { 4 | "interface-name" : "tap0" 5 | } 6 | } -------------------------------------------------------------------------------- /tests/conf/shim-hv.dif: -------------------------------------------------------------------------------- 1 | { 2 | "difType" : "shim-hv", 3 | "configParameters" : { 4 | "vmpi-id": "0" 5 | } 6 | } -------------------------------------------------------------------------------- /tests/conf/shim-hv2.dif: -------------------------------------------------------------------------------- 1 | { 2 | "difType" : "shim-hv", 3 | "configParameters" : { 4 | "vmpi-id": "1" 5 | } 6 | } -------------------------------------------------------------------------------- /tests/conf/shim-tcp-udp.dif: -------------------------------------------------------------------------------- 1 | { 2 | "difType" : "shim-tcp-udp", 3 | "configParameters" : { 4 | "hostname" : "84.88.40.131", 5 | "dirEntry" : "1:25:rina.apps.echotime.server0:12:84.88.40.1314:2426", 6 | "expReg" : "1:25:rina.apps.echotime.server0:4:2426" 7 | } 8 | } -------------------------------------------------------------------------------- /tests/conf/vm-to-vm.dif: -------------------------------------------------------------------------------- 1 | { 2 | "difType" : "normal-ipc", 3 | "knownIPCProcessAddresses": [ 4 | { 5 | "apName": "h.n.1.IPCP", 6 | "apInstance": "1", 7 | "address": 16 8 | }, 9 | { 10 | "apName": "g.n.1.IPCP", 11 | "apInstance": "1", 12 | "address": 17 13 | }, 14 | { 15 | "apName": "g.n.2.IPCP", 16 | "apInstance": "1", 17 | "address": 19 18 | } 19 | ] 20 | } -------------------------------------------------------------------------------- /tests/conf/vm-to-vm/ipcmanager.conf-pm: -------------------------------------------------------------------------------- 1 | { 2 | "configFileVersion": "1.4.1", 3 | "localConfiguration": { 4 | "installationPath": "/usr/local/irati/bin", 5 | "libraryPath": "/usr/local/irati/lib", 6 | "logPath": "/usr/local/irati/var/log", 7 | "consoleSocket": "/usr/local/irati/var/run/ipcm-console.sock", 8 | "pluginsPaths": [ 9 | "/usr/local/irati/lib/rinad/ipcp", 10 | "/lib/modules/4.1.10-irati/extra" 11 | ] 12 | }, 13 | "ipcProcessesToCreate": [ 14 | { 15 | "apName": "h.hv.1.IPCP", 16 | "apInstance": "1", 17 | "difName": "hv.1.DIF" 18 | }, 19 | { 20 | "apName": "h.hv.2.IPCP", 21 | "apInstance": "1", 22 | "difName": "hv.2.DIF" 23 | }, 24 | { 25 | "apName": "h.n.1.IPCP", 26 | "apInstance": "1", 27 | "difName": "n.DIF", 28 | "difsToRegisterAt": [ 29 | "hv.1.DIF", 30 | "hv.2.DIF" 31 | ] 32 | } 33 | ], 34 | "difConfigurations": [ 35 | { 36 | "name": "hv.1.DIF", 37 | "template": "shim-hv.dif" 38 | }, 39 | { 40 | "name": "hv.2.DIF", 41 | "template": "shim-hv2.dif" 42 | }, 43 | { 44 | "name": "n.DIF", 45 | "template": "vm-to-vm.dif" 46 | } 47 | ] 48 | } 49 | -------------------------------------------------------------------------------- /tests/conf/vm-to-vm/ipcmanager.conf-vm.1: -------------------------------------------------------------------------------- 1 | { 2 | "configFileVersion": "1.4.1", 3 | "localConfiguration": { 4 | "installationPath": "/usr/local/irati/bin", 5 | "libraryPath": "/usr/local/irati/lib", 6 | "logPath": "/usr/local/irati/var/log", 7 | "consoleSocket": "/usr/local/irati/var/run/ipcm-console.sock", 8 | "pluginsPaths": [ 9 | "/usr/local/irati/lib/rinad/ipcp", 10 | "/lib/modules/4.1.10-irati/extra" 11 | ] 12 | }, 13 | "ipcProcessesToCreate": [ 14 | { 15 | "apName": "g.hv.1.IPCP", 16 | "apInstance": "1", 17 | "difName": "hv.1.DIF" 18 | }, 19 | { 20 | "apName": "g.n.1.IPCP", 21 | "apInstance": "1", 22 | "difName": "n.DIF", 23 | "difsToRegisterAt": [ 24 | "hv.1.DIF" 25 | ] 26 | } 27 | ], 28 | "difConfigurations": [ 29 | { 30 | "name": "hv.1.DIF", 31 | "template": "shim-hv.dif" 32 | }, 33 | { 34 | "name": "n.DIF", 35 | "template": "vm-to-vm.dif" 36 | } 37 | ] 38 | } 39 | -------------------------------------------------------------------------------- /tests/conf/vm-to-vm/ipcmanager.conf-vm.2: -------------------------------------------------------------------------------- 1 | { 2 | "configFileVersion": "1.4.1", 3 | "localConfiguration": { 4 | "installationPath": "/usr/local/irati/bin", 5 | "libraryPath": "/usr/local/irati/lib", 6 | "logPath": "/usr/local/irati/var/log", 7 | "consoleSocket": "/usr/local/irati/var/run/ipcm-console.sock", 8 | "pluginsPaths": [ 9 | "/usr/local/irati/lib/rinad/ipcp", 10 | "/lib/modules/4.1.10-irati/extra" 11 | ] 12 | }, 13 | "ipcProcessesToCreate": [ 14 | { 15 | "apName": "g.hv.2.IPCP", 16 | "apInstance": "1", 17 | "difName": "hv.2.DIF" 18 | }, 19 | { 20 | "apName": "g.n.2.IPCP", 21 | "apInstance": "1", 22 | "difName": "n.DIF", 23 | "difsToRegisterAt": [ 24 | "hv.2.DIF" 25 | ] 26 | } 27 | ], 28 | "difConfigurations": [ 29 | { 30 | "name": "hv.2.DIF", 31 | "template": "shim-hv.dif" 32 | }, 33 | { 34 | "name": "n.DIF", 35 | "template": "vm-to-vm.dif" 36 | } 37 | ] 38 | } 39 | -------------------------------------------------------------------------------- /tests/conf/vpn.dif: -------------------------------------------------------------------------------- 1 | { 2 | "difType" : "normal-ipc", 3 | "knownIPCProcessAddresses": [ 4 | { 5 | "apName": "Ada", 6 | "apInstance": "1", 7 | "address": 5 8 | }, 9 | { 10 | "apName": "Knuth", 11 | "apInstance": "1", 12 | "address": 6 13 | } 14 | ] 15 | } -------------------------------------------------------------------------------- /tests/conf/vpn/ipcmanager.conf-pm.i2cat: -------------------------------------------------------------------------------- 1 | { 2 | "configFileVersion": "1.4.1", 3 | "localConfiguration": { 4 | "installationPath": "/usr/local/irati/bin", 5 | "libraryPath": "/usr/local/irati/lib", 6 | "logPath": "/usr/local/irati/var/log", 7 | "consoleSocket": "/usr/local/irati/var/run/ipcm-console.sock", 8 | "pluginsPaths": [ 9 | "/usr/local/irati/lib/rinad/ipcp", 10 | "/lib/modules/4.1.10-irati/extra" 11 | ] 12 | }, 13 | "ipcProcessesToCreate": [ 14 | { 15 | "apName": "h.hv.i2cat.IPCP", 16 | "apInstance": "1", 17 | "difName": "hv.i2cat.DIF" 18 | }, 19 | { 20 | "apName": "eth.i2cat.IPCP", 21 | "apInstance": "1", 22 | "difName": "300" 23 | }, 24 | { 25 | "apName": "h.n.i2cat.IPCP", 26 | "apInstance": "1", 27 | "difName": "n.DIF", 28 | "difsToRegisterAt": [ 29 | "hv.i2cat.DIF", 30 | "300" 31 | ] 32 | } 33 | ], 34 | "difConfigurations": [ 35 | { 36 | "name": "hv.i2cat.DIF", 37 | "template": "shim-hv.dif" 38 | }, 39 | { 40 | "name": "300", 41 | "template": "shim-eth-vlan2.dif" 42 | }, 43 | { 44 | "name": "n.DIF", 45 | "template": "vpn2.dif" 46 | } 47 | ] 48 | } 49 | -------------------------------------------------------------------------------- /tests/conf/vpn/ipcmanager.conf-pm.nxw: -------------------------------------------------------------------------------- 1 | { 2 | "configFileVersion": "1.4.1", 3 | "localConfiguration": { 4 | "installationPath": "/usr/local/irati/bin", 5 | "libraryPath": "/usr/local/irati/lib", 6 | "logPath": "/usr/local/irati/var/log", 7 | "consoleSocket": "/usr/local/irati/var/run/ipcm-console.sock", 8 | "pluginsPaths": [ 9 | "/usr/local/irati/lib/rinad/ipcp", 10 | "/lib/modules/4.1.10-irati/extra" 11 | ] 12 | }, 13 | "ipcProcessesToCreate": [ 14 | { 15 | "apName": "h.hv.nxw.IPCP", 16 | "apInstance": "1", 17 | "difName": "hv.nxw.DIF" 18 | }, 19 | { 20 | "apName": "eth.nxw.IPCP", 21 | "apInstance": "1", 22 | "difName": "300" 23 | }, 24 | { 25 | "apName": "h.n.nxw.IPCP", 26 | "apInstance": "1", 27 | "difName": "n.DIF", 28 | "difsToRegisterAt": [ 29 | "hv.nxw.DIF", 30 | "300" 31 | ] 32 | } 33 | ], 34 | "difConfigurations": [ 35 | { 36 | "name": "hv.nxw.DIF", 37 | "template": "shim-hv.dif" 38 | }, 39 | { 40 | "name": "300", 41 | "template": "shim-eth-vlan2.dif" 42 | }, 43 | { 44 | "name": "n.DIF", 45 | "template": "vpn2.dif" 46 | } 47 | ] 48 | } 49 | -------------------------------------------------------------------------------- /tests/conf/vpn/ipcmanager.conf-vm.i2cat: -------------------------------------------------------------------------------- 1 | { 2 | "configFileVersion": "1.4.1", 3 | "localConfiguration": { 4 | "installationPath": "/usr/local/irati/bin", 5 | "libraryPath": "/usr/local/irati/lib", 6 | "logPath": "/usr/local/irati/var/log", 7 | "consoleSocket": "/usr/local/irati/var/run/ipcm-console.sock", 8 | "pluginsPaths": [ 9 | "/usr/local/irati/lib/rinad/ipcp", 10 | "/lib/modules/4.1.10-irati/extra" 11 | ] 12 | } 13 | "ipcProcessesToCreate": [ 14 | { 15 | "apName": "g.hv.i2cat.IPCP", 16 | "apInstance": "1", 17 | "difName": "hv.i2cat.DIF" 18 | }, 19 | { 20 | "apName": "g.n.i2cat.IPCP", 21 | "apInstance": "1", 22 | "difName": "n.DIF", 23 | "difsToRegisterAt": [ 24 | "hv.i2cat.DIF" 25 | ] 26 | } 27 | ], 28 | "difConfigurations": [ 29 | { 30 | "name": "hv.i2cat.DIF", 31 | "template": "shim-hv.dif" 32 | }, 33 | { 34 | "name": "n.DIF", 35 | "template": "vpn2.dif" 36 | } 37 | ] 38 | } 39 | -------------------------------------------------------------------------------- /tests/conf/vpn/ipcmanager.conf-vm.nxw: -------------------------------------------------------------------------------- 1 | { 2 | "configFileVersion": "1.4.1", 3 | "localConfiguration": { 4 | "installationPath": "/usr/local/irati/bin", 5 | "libraryPath": "/usr/local/irati/lib", 6 | "logPath": "/usr/local/irati/var/log", 7 | "consoleSocket": "/usr/local/irati/var/run/ipcm-console.sock", 8 | "pluginsPaths": [ 9 | "/usr/local/irati/lib/rinad/ipcp", 10 | "/lib/modules/4.1.10-irati/extra" 11 | ] 12 | } 13 | "ipcProcessesToCreate": [ 14 | { 15 | "apName": "g.hv.nxw.IPCP", 16 | "apInstance": "1", 17 | "difName": "hv.nxw.DIF" 18 | }, 19 | { 20 | "apName": "g.n.nxw.IPCP", 21 | "apInstance": "1", 22 | "difName": "n.DIF", 23 | "difsToRegisterAt": [ 24 | "hv.nxw.DIF" 25 | ] 26 | } 27 | ], 28 | "difConfigurations": [ 29 | { 30 | "name": "hv.nxw.DIF", 31 | "template": "shim-hv.dif" 32 | }, 33 | { 34 | "name": "n.DIF", 35 | "template": "vpn2.dif" 36 | } 37 | ] 38 | } 39 | -------------------------------------------------------------------------------- /tests/conf/vpn2.dif: -------------------------------------------------------------------------------- 1 | { 2 | "difType" : "normal-ipc", 3 | "knownIPCProcessAddresses": [ 4 | { 5 | "apName": "h.n.nxw.IPCP", 6 | "apInstance": "1", 7 | "address": 16 8 | }, 9 | { 10 | "apName": "g.n.nxw.IPCP", 11 | "apInstance": "1", 12 | "address": 17 13 | }, 14 | { 15 | "apName": "h.n.i2cat.IPCP", 16 | "apInstance": "1", 17 | "address": 18 18 | }, 19 | { 20 | "apName": "g.n.i2cat.IPCP", 21 | "apInstance": "1", 22 | "address": 19 23 | } 24 | ] 25 | } -------------------------------------------------------------------------------- /unload-irati-modules: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # -*- sh -*- 3 | 4 | # 5 | # Written by: Eduard Grasa 6 | # 7 | 8 | rmmod shim-tcp-udp 9 | rmmod shim-eth 10 | rmmod rinarp 11 | rmmod arp826 12 | rmmod normal-ipcp 13 | rmmod rina-default-plugin 14 | rmmod rina-irati-core 15 | --------------------------------------------------------------------------------