├── Readme.md ├── docs ├── amazon.md ├── dns.md ├── ipv6.md ├── software-defined-networks.md ├── tinc.md └── vpn.md ├── github.com ├── Gorian │ └── tinc-automation │ │ ├── README.md │ │ └── tinc-setup.ubuntu.sh ├── Youscribe │ └── tinc-cookbook │ │ ├── .gitignore │ │ ├── .kitchen.yml │ │ ├── Berksfile │ │ ├── Gemfile │ │ ├── README.md │ │ ├── Thorfile │ │ ├── Vagrantfile │ │ ├── attributes │ │ └── default.rb │ │ ├── chefignore │ │ ├── files │ │ └── default │ │ │ ├── upstart-tinc-all.conf │ │ │ └── upstart-tinc.conf │ │ ├── libraries │ │ └── default.rb │ │ ├── metadata.rb │ │ ├── recipes │ │ ├── core.rb │ │ ├── default.rb │ │ ├── install.rb │ │ ├── ppa.rb │ │ └── upstart.rb │ │ ├── resources │ │ └── .network.rb.swp │ │ └── templates │ │ └── default │ │ ├── host.erb │ │ ├── nets.boot.erb │ │ └── tinc.conf.erb ├── bluemonk │ ├── ipaddress │ │ ├── .document │ │ ├── .gitignore │ │ ├── CHANGELOG.rdoc │ │ ├── LICENSE │ │ ├── README.rdoc │ │ ├── Rakefile │ │ ├── VERSION │ │ ├── ipaddress.gemspec │ │ ├── lib │ │ │ ├── ipaddress.rb │ │ │ └── ipaddress │ │ │ │ ├── ipv4.rb │ │ │ │ ├── ipv6.rb │ │ │ │ └── prefix.rb │ │ └── test │ │ │ ├── ipaddress │ │ │ ├── ipv4_test.rb │ │ │ ├── ipv6_test.rb │ │ │ └── prefix_test.rb │ │ │ ├── ipaddress_test.rb │ │ │ └── test_helper.rb │ └── net-dns │ │ ├── .gitignore │ │ ├── .rspec │ │ ├── .travis.yml │ │ ├── CHANGELOG.md │ │ ├── Gemfile │ │ ├── README.md │ │ ├── Rakefile │ │ ├── THANKS.rdoc │ │ ├── demo │ │ ├── check_soa.rb │ │ └── threads.rb │ │ ├── lib │ │ └── net │ │ │ ├── dns.rb │ │ │ └── dns │ │ │ ├── core_ext.rb │ │ │ ├── header.rb │ │ │ ├── names.rb │ │ │ ├── packet.rb │ │ │ ├── question.rb │ │ │ ├── resolver.rb │ │ │ ├── resolver │ │ │ ├── socks.rb │ │ │ └── timeouts.rb │ │ │ ├── rr.rb │ │ │ ├── rr │ │ │ ├── a.rb │ │ │ ├── aaaa.rb │ │ │ ├── classes.rb │ │ │ ├── cname.rb │ │ │ ├── hinfo.rb │ │ │ ├── mr.rb │ │ │ ├── mx.rb │ │ │ ├── ns.rb │ │ │ ├── null.rb │ │ │ ├── ptr.rb │ │ │ ├── soa.rb │ │ │ ├── srv.rb │ │ │ ├── txt.rb │ │ │ └── types.rb │ │ │ └── version.rb │ │ ├── net-dns.gemspec │ │ ├── spec │ │ ├── fixtures │ │ │ └── resolv.conf │ │ ├── spec_helper.rb │ │ └── unit │ │ │ └── resolver │ │ │ ├── dns_timeout_spec.rb │ │ │ ├── tcp_timeout_spec.rb │ │ │ └── udp_timeout_spec.rb │ │ └── test │ │ ├── header_test.rb │ │ ├── names_test.rb │ │ ├── packet_test.rb │ │ ├── question_test.rb │ │ ├── resolver_test.rb │ │ ├── rr │ │ ├── a_test.rb │ │ ├── aaaa_test.rb │ │ ├── classes_test.rb │ │ ├── cname_test.rb │ │ ├── hinfo_test.rb │ │ ├── mr_test.rb │ │ ├── mx_test.rb │ │ ├── ns_test.rb │ │ └── types_test.rb │ │ ├── rr_test.rb │ │ └── test_helper.rb ├── duritong │ └── puppet-tinc │ │ ├── files │ │ └── CentOS │ │ │ └── tinc.sysconfig │ │ ├── lib │ │ └── puppet │ │ │ └── parser │ │ │ └── functions │ │ │ └── tinc_keygen.rb │ │ ├── manifests │ │ ├── base.pp │ │ ├── centos.pp │ │ ├── debian.pp │ │ ├── init.pp │ │ ├── puppetmaster.pp │ │ └── vpn_net.pp │ │ ├── spec │ │ ├── spec.opts │ │ ├── spec_helper.rb │ │ └── unit │ │ │ └── parser │ │ │ └── functions │ │ │ └── tinc_keygen.rb │ │ └── templates │ │ ├── host.erb │ │ ├── tinc-down.erb │ │ ├── tinc-up.erb │ │ └── tinc.conf.erb ├── example42 │ └── puppet-tinc │ │ ├── .fixtures.yml │ │ ├── .gemfile │ │ ├── .gitignore │ │ ├── .project │ │ ├── .travis.yml │ │ ├── LICENSE │ │ ├── Modulefile │ │ ├── README.md │ │ ├── Rakefile │ │ ├── manifests │ │ ├── init.pp │ │ ├── params.pp │ │ ├── spec.pp │ │ └── tunnel.pp │ │ ├── spec │ │ ├── classes │ │ │ └── tinc_spec.rb │ │ └── spec_helper.rb │ │ └── templates │ │ ├── host.conf.erb │ │ ├── init.redhat │ │ ├── spec.erb │ │ ├── tinc-up.erb │ │ └── tinc.conf.erb ├── gsliepen │ └── tinc │ │ ├── .gitignore │ │ ├── AUTHORS │ │ ├── COPYING │ │ ├── COPYING.README │ │ ├── Makefile.am │ │ ├── NEWS │ │ ├── README │ │ ├── README.android │ │ ├── README.git │ │ ├── THANKS │ │ ├── configure.ac │ │ ├── doc │ │ ├── CONNECTIVITY │ │ ├── Makefile.am │ │ ├── NETWORKING │ │ ├── PROTOCOL │ │ ├── SECURITY2 │ │ ├── sample-config │ │ │ ├── hosts │ │ │ │ ├── alpha │ │ │ │ └── beta │ │ │ ├── rsa_key.priv │ │ │ ├── tinc-down │ │ │ ├── tinc-up │ │ │ └── tinc.conf │ │ ├── tinc.conf.5.in │ │ ├── tinc.texi │ │ ├── tincd.8.in │ │ └── tincinclude.texi.in │ │ ├── m4 │ │ ├── Makefile.am │ │ ├── README │ │ ├── attribute.m4 │ │ ├── lzo.m4 │ │ ├── openssl.m4 │ │ └── zlib.m4 │ │ └── src │ │ ├── Makefile.am │ │ ├── avl_tree.c │ │ ├── avl_tree.h │ │ ├── bsd │ │ ├── device.c │ │ ├── tunemu.c │ │ └── tunemu.h │ │ ├── conf.c │ │ ├── conf.h │ │ ├── connection.c │ │ ├── connection.h │ │ ├── cygwin │ │ └── device.c │ │ ├── device.h │ │ ├── dropin.c │ │ ├── dropin.h │ │ ├── dummy_device.c │ │ ├── edge.c │ │ ├── edge.h │ │ ├── ethernet.h │ │ ├── event.c │ │ ├── event.h │ │ ├── fake-gai-errnos.h │ │ ├── fake-getaddrinfo.c │ │ ├── fake-getaddrinfo.h │ │ ├── fake-getnameinfo.c │ │ ├── fake-getnameinfo.h │ │ ├── getopt.c │ │ ├── getopt.h │ │ ├── getopt1.c │ │ ├── graph.c │ │ ├── graph.h │ │ ├── have.h │ │ ├── ipv4.h │ │ ├── ipv6.h │ │ ├── linux │ │ └── device.c │ │ ├── list.c │ │ ├── list.h │ │ ├── logger.c │ │ ├── logger.h │ │ ├── meta.c │ │ ├── meta.h │ │ ├── mingw │ │ ├── common.h │ │ └── device.c │ │ ├── multicast_device.c │ │ ├── net.c │ │ ├── net.h │ │ ├── net_packet.c │ │ ├── net_setup.c │ │ ├── net_socket.c │ │ ├── netutl.c │ │ ├── netutl.h │ │ ├── node.c │ │ ├── node.h │ │ ├── pidfile.c │ │ ├── pidfile.h │ │ ├── process.c │ │ ├── process.h │ │ ├── protocol.c │ │ ├── protocol.h │ │ ├── protocol_auth.c │ │ ├── protocol_edge.c │ │ ├── protocol_key.c │ │ ├── protocol_misc.c │ │ ├── protocol_subnet.c │ │ ├── raw_socket_device.c │ │ ├── route.c │ │ ├── route.h │ │ ├── solaris │ │ └── device.c │ │ ├── subnet.c │ │ ├── subnet.h │ │ ├── system.h │ │ ├── tincd.c │ │ ├── uml_device.c │ │ ├── utils.c │ │ ├── utils.h │ │ ├── vde_device.c │ │ ├── xalloc.h │ │ └── xmalloc.c ├── guiambros │ └── aws-cloud-init │ │ └── aws-cloud-init.sh ├── jvasile │ └── tinc-rollout │ │ ├── COPYING │ │ ├── README.md │ │ └── tinc_rollout.py ├── makefu │ └── shack-retiolum │ │ ├── README │ │ ├── build_arch.sh │ │ ├── build_debian.sh │ │ ├── build_debian_clean.sh │ │ ├── build_ec2.sh │ │ ├── build_no.de.sh │ │ ├── hosts │ │ ├── ITART │ │ ├── Lassulus │ │ ├── UTART │ │ ├── alphalabs │ │ ├── also │ │ ├── foobaz │ │ ├── kaah │ │ ├── krebs │ │ ├── miefda901 │ │ ├── miefdahome │ │ ├── miefdat │ │ ├── no_omo │ │ ├── pa_sharepoint │ │ ├── pfleidi │ │ ├── pornocauster │ │ ├── supernode │ │ ├── tart │ │ └── ytart │ │ └── install.sh ├── mhameed │ └── tincconfig │ │ ├── nets.boot │ │ └── vpn │ │ ├── .gitignore │ │ ├── hosts │ │ ├── arnvda │ │ ├── droid │ │ ├── europa │ │ ├── fog │ │ ├── io │ │ ├── jupiter │ │ ├── mars │ │ ├── mist │ │ ├── moon │ │ ├── neptune │ │ ├── pluto │ │ ├── saturn │ │ └── venus │ │ ├── tinc-down │ │ └── tinc-up ├── ryd │ └── chaosvpn │ │ ├── .gitignore │ │ ├── BSDmakefile │ │ ├── Documentation │ │ ├── CodeStyle.txt │ │ └── Maintainer.txt │ │ ├── INSTALL │ │ ├── INSTALL.Windows │ │ ├── LICENCE │ │ ├── Makefile │ │ ├── NEWS │ │ ├── README │ │ ├── addrmask.c │ │ ├── addrmask.h │ │ ├── ar.c │ │ ├── ar.h │ │ ├── chaosvpn-backend-encrypt-and-sign.pl │ │ ├── chaosvpn-client.pl │ │ ├── chaosvpn.conf │ │ ├── chaosvpn.conf.apple │ │ ├── chaosvpn.conf.freebsd │ │ ├── chaosvpn.conf.openbsd │ │ ├── chaosvpn.h │ │ ├── chaosvpn.spec │ │ ├── config.c │ │ ├── contrib │ │ ├── chaosvpn.graph.pl │ │ ├── chaosvpn.nodehistory.pl │ │ └── graph │ │ │ ├── README │ │ │ ├── chaosvpn.graph │ │ │ └── crontab │ │ ├── crypto.c │ │ ├── cvconf.l │ │ ├── cvconf.y │ │ ├── daemon.c │ │ ├── debian │ │ ├── .gitignore │ │ ├── build-all.sh │ │ ├── changelog │ │ ├── compat │ │ ├── control │ │ ├── copyright │ │ ├── default │ │ ├── dirs │ │ ├── docs │ │ ├── init.d │ │ ├── lintian-overrides │ │ ├── manpages │ │ ├── postinst │ │ ├── postrm │ │ ├── ppp.ip-up │ │ ├── preinst │ │ ├── prerm │ │ ├── rules │ │ ├── scripts │ │ │ └── calcdebversion │ │ ├── source.lintian-overrides │ │ └── source │ │ │ └── format │ │ ├── freebsd.rc.d │ │ ├── fs.c │ │ ├── httplib │ │ ├── Makefile │ │ ├── http_get.c │ │ ├── http_parseurl.c │ │ ├── httplib.h │ │ └── test.c │ │ ├── list.h │ │ ├── log.c │ │ ├── main.c │ │ ├── man │ │ ├── chaosvpn.1 │ │ └── chaosvpn.conf.5 │ │ ├── nsis │ │ ├── Makefile │ │ ├── chaosknoten1.bmp │ │ ├── chaosvpn.conf │ │ └── chaosvpn.nsi │ │ ├── parser.c │ │ ├── pidfile.c │ │ ├── string │ │ ├── string.h │ │ ├── string_clear.c │ │ ├── string_concat.c │ │ ├── string_concat_sprintf.c │ │ ├── string_concatb.c │ │ ├── string_equals.c │ │ ├── string_free.c │ │ ├── string_get.c │ │ ├── string_hexdump.c │ │ ├── string_init.c │ │ ├── string_initfromstringz.c │ │ ├── string_lazyinit.c │ │ ├── string_move.c │ │ ├── string_putc.c │ │ ├── string_putint.c │ │ ├── string_read.c │ │ └── test.c │ │ ├── strnatcmp.c │ │ ├── strnatcmp.h │ │ ├── test_addrmask.c │ │ ├── tinc.c │ │ ├── tun.c │ │ ├── uncompress.c │ │ ├── version.h │ │ └── warzone.conf ├── trema │ └── trema │ │ ├── .gitignore │ │ ├── .ruby-version │ │ ├── .travis.yml │ │ ├── .yardopts │ │ ├── Doxyfile │ │ ├── Gemfile │ │ ├── README.md │ │ ├── Rakefile │ │ ├── bin │ │ ├── quality │ │ ├── trema │ │ └── trema-config │ │ ├── build.rb │ │ ├── cruise.rb │ │ ├── features │ │ ├── .nav │ │ ├── README.md │ │ ├── core │ │ │ ├── get_pid_by_trema_name.feature │ │ │ ├── packetin_filter.feature │ │ │ ├── switch_manager.feature │ │ │ └── trema-config.feature │ │ ├── dsl │ │ │ └── switch_port_specifier.feature │ │ ├── examples │ │ │ ├── dumper.feature │ │ │ ├── hello_trema.feature │ │ │ ├── learning_switch.feature │ │ │ ├── list_switches.feature │ │ │ ├── message.set_config.feature │ │ │ ├── message.vendor-action.feature │ │ │ ├── multi_learning_switch.feature │ │ │ ├── openflow_message.echo.feature │ │ │ ├── openflow_message.features_request.feature │ │ │ ├── openflow_message.hello.feature │ │ │ ├── packet_in.feature │ │ │ ├── packetin_filter_config.feature │ │ │ ├── patch_panel.feature │ │ │ ├── repeater_hub.feature │ │ │ ├── switch_info.feature │ │ │ └── switch_monitor.feature │ │ ├── handlers │ │ │ └── switch_ready.feature │ │ ├── step_definitions │ │ │ ├── misc_steps.rb │ │ │ ├── send_packets_steps.rb │ │ │ └── stats_steps.rb │ │ ├── support │ │ │ ├── env.rb │ │ │ └── hooks.rb │ │ ├── switch_event │ │ │ ├── C-add_forward_entry.feature │ │ │ ├── C-delete_forward_entry.feature │ │ │ ├── C-dump_forward_entries.feature │ │ │ ├── C-set_forward_entries.feature │ │ │ ├── README.md │ │ │ ├── add_forward_entry.feature │ │ │ ├── delete_forward_entry.feature │ │ │ ├── dump_forward_entries.feature │ │ │ └── set_forward_entries.feature │ │ └── trema_commands │ │ │ ├── README.md │ │ │ ├── dump_flows.feature │ │ │ ├── help.feature │ │ │ ├── help_option.feature │ │ │ ├── kill.feature │ │ │ ├── killall.feature │ │ │ ├── port_down.feature │ │ │ ├── port_up.feature │ │ │ ├── reset_stats.feature │ │ │ ├── run.feature │ │ │ ├── send_packets.feature │ │ │ ├── show_stats.feature │ │ │ ├── up.feature │ │ │ ├── version.feature │ │ │ └── version_option.feature │ │ ├── ruby │ │ ├── .gitignore │ │ ├── blocker.rb │ │ ├── extconf.rb │ │ ├── sub-process.rb │ │ └── trema │ │ │ ├── action-common.c │ │ │ ├── action-common.h │ │ │ ├── action.rb │ │ │ ├── aggregate-stats-reply.rb │ │ │ ├── app.rb │ │ │ ├── barrier-reply.c │ │ │ ├── barrier-reply.h │ │ │ ├── barrier-request.c │ │ │ ├── barrier-request.h │ │ │ ├── cli.rb │ │ │ ├── command.rb │ │ │ ├── command │ │ │ ├── dump_flows.rb │ │ │ ├── kill.rb │ │ │ ├── killall.rb │ │ │ ├── netns.rb │ │ │ ├── port_down.rb │ │ │ ├── port_up.rb │ │ │ ├── reset_stats.rb │ │ │ ├── ruby.rb │ │ │ ├── run.rb │ │ │ ├── send_packets.rb │ │ │ ├── shell.rb │ │ │ ├── show_stats.rb │ │ │ ├── up.rb │ │ │ └── version.rb │ │ │ ├── compat.h │ │ │ ├── controller.c │ │ │ ├── controller.h │ │ │ ├── controller.rb │ │ │ ├── custom-switch.rb │ │ │ ├── daemon.rb │ │ │ ├── default-logger.c │ │ │ ├── default-logger.h │ │ │ ├── default-logger.rb │ │ │ ├── desc-stats-reply.rb │ │ │ ├── dsl.rb │ │ │ ├── dsl │ │ │ ├── configuration.rb │ │ │ ├── context.rb │ │ │ ├── custom-switch.rb │ │ │ ├── link.rb │ │ │ ├── netns.rb │ │ │ ├── parser.rb │ │ │ ├── rswitch.rb │ │ │ ├── run.rb │ │ │ ├── runner.rb │ │ │ ├── stanza.rb │ │ │ ├── switch.rb │ │ │ ├── syntax-error.rb │ │ │ ├── syntax.rb │ │ │ ├── vhost.rb │ │ │ └── vswitch.rb │ │ │ ├── echo-reply.c │ │ │ ├── echo-reply.h │ │ │ ├── echo-request.c │ │ │ ├── echo-request.h │ │ │ ├── echo.c │ │ │ ├── echo.h │ │ │ ├── enqueue.rb │ │ │ ├── error.c │ │ │ ├── error.h │ │ │ ├── exact-match.rb │ │ │ ├── executables.rb │ │ │ ├── features-reply.c │ │ │ ├── features-reply.h │ │ │ ├── features-request.c │ │ │ ├── features-request.h │ │ │ ├── flow-mod.c │ │ │ ├── flow-mod.h │ │ │ ├── flow-removed.c │ │ │ ├── flow-removed.h │ │ │ ├── flow-stats-reply.rb │ │ │ ├── flow.rb │ │ │ ├── get-config-reply.c │ │ │ ├── get-config-reply.h │ │ │ ├── get-config-request.c │ │ │ ├── get-config-request.h │ │ │ ├── hardware-switch.rb │ │ │ ├── hello.c │ │ │ ├── hello.h │ │ │ ├── host.rb │ │ │ ├── link.rb │ │ │ ├── list-switches-reply.c │ │ │ ├── list-switches-reply.h │ │ │ ├── mac.rb │ │ │ ├── match.c │ │ │ ├── match.h │ │ │ ├── monkey-patch │ │ │ ├── integer.rb │ │ │ ├── integer │ │ │ │ ├── base-conversions.rb │ │ │ │ ├── ranges.rb │ │ │ │ └── validators.rb │ │ │ ├── module.rb │ │ │ ├── module │ │ │ │ ├── class-method.rb │ │ │ │ └── deprecation.rb │ │ │ ├── string.rb │ │ │ └── string │ │ │ │ └── inflectors.rb │ │ │ ├── netns.rb │ │ │ ├── network-component.rb │ │ │ ├── ofctl.rb │ │ │ ├── open-vswitch.rb │ │ │ ├── openflow-error.c │ │ │ ├── openflow-error.h │ │ │ ├── openflow-switch.rb │ │ │ ├── ordered-hash.rb │ │ │ ├── packet-in.c │ │ │ ├── packet-in.h │ │ │ ├── packet-queue.rb │ │ │ ├── packetin-filter.rb │ │ │ ├── path.rb │ │ │ ├── phost.rb │ │ │ ├── port-mod.c │ │ │ ├── port-mod.h │ │ │ ├── port-stats-reply.rb │ │ │ ├── port-status-add.rb │ │ │ ├── port-status-delete.rb │ │ │ ├── port-status-modify.rb │ │ │ ├── port-status.c │ │ │ ├── port-status.h │ │ │ ├── port.c │ │ │ ├── port.h │ │ │ ├── process.rb │ │ │ ├── queue-get-config-reply.c │ │ │ ├── queue-get-config-reply.h │ │ │ ├── queue-get-config-request.c │ │ │ ├── queue-get-config-request.h │ │ │ ├── queue-stats-reply.rb │ │ │ ├── ruby-switch.rb │ │ │ ├── send-out-port.rb │ │ │ ├── set-config.c │ │ │ ├── set-config.h │ │ │ ├── set-eth-addr.rb │ │ │ ├── set-eth-dst-addr.rb │ │ │ ├── set-eth-src-addr.rb │ │ │ ├── set-ip-addr.rb │ │ │ ├── set-ip-dst-addr.rb │ │ │ ├── set-ip-src-addr.rb │ │ │ ├── set-ip-tos.rb │ │ │ ├── set-transport-dst-port.rb │ │ │ ├── set-transport-port.rb │ │ │ ├── set-transport-src-port.rb │ │ │ ├── set-vlan-priority.rb │ │ │ ├── set-vlan-vid.rb │ │ │ ├── shell.rb │ │ │ ├── shell │ │ │ ├── down.rb │ │ │ ├── killall.rb │ │ │ ├── link.rb │ │ │ ├── reset_stats.rb │ │ │ ├── run.rb │ │ │ ├── send_packets.rb │ │ │ ├── show_stats.rb │ │ │ ├── up.rb │ │ │ ├── vhost.rb │ │ │ └── vswitch.rb │ │ │ ├── stats-helper.rb │ │ │ ├── stats-reply.c │ │ │ ├── stats-reply.h │ │ │ ├── stats-request.c │ │ │ ├── stats-request.h │ │ │ ├── strip-vlan-header.rb │ │ │ ├── switch-daemon.rb │ │ │ ├── switch-disconnected.c │ │ │ ├── switch-disconnected.h │ │ │ ├── switch-event.c │ │ │ ├── switch-event.h │ │ │ ├── switch-manager.rb │ │ │ ├── switch.c │ │ │ ├── switch.h │ │ │ ├── switch.rb │ │ │ ├── table-stats-reply.rb │ │ │ ├── timers.rb │ │ │ ├── trema-ruby-utils.c │ │ │ ├── trema-ruby-utils.h │ │ │ ├── trema.c │ │ │ ├── tremashark.rb │ │ │ ├── util.rb │ │ │ ├── vendor-action.rb │ │ │ ├── vendor-stats-reply.rb │ │ │ ├── vendor.c │ │ │ ├── vendor.h │ │ │ └── version.rb │ │ ├── spec │ │ ├── spec_helper.rb │ │ ├── support │ │ │ ├── action.rb │ │ │ ├── mandatory-option.rb │ │ │ ├── matchers │ │ │ │ └── constant.rb │ │ │ ├── openflow-message.rb │ │ │ └── port-status.rb │ │ ├── trema │ │ │ ├── app_spec.rb │ │ │ ├── barrier-reply_spec.rb │ │ │ ├── barrier-request_spec.rb │ │ │ ├── cli_spec.rb │ │ │ ├── controller_spec.rb │ │ │ ├── default-logger_spec.rb │ │ │ ├── dsl │ │ │ │ ├── configuration_spec.rb │ │ │ │ ├── link_spec.rb │ │ │ │ ├── run_spec.rb │ │ │ │ ├── runner_spec.rb │ │ │ │ ├── switch_spec.rb │ │ │ │ ├── syntax_spec.rb │ │ │ │ ├── vhost_spec.rb │ │ │ │ └── vswitch_spec.rb │ │ │ ├── echo-reply_spec.rb │ │ │ ├── echo-request_spec.rb │ │ │ ├── enqueue_spec.rb │ │ │ ├── error_spec.rb │ │ │ ├── executables_spec.rb │ │ │ ├── features-reply_spec.rb │ │ │ ├── features-request_spec.rb │ │ │ ├── flow-mod_spec.rb │ │ │ ├── flow-removed_spec.rb │ │ │ ├── get-config-reply_spec.rb │ │ │ ├── get-config-request_spec.rb │ │ │ ├── hardware-switch_spec.rb │ │ │ ├── hello_spec.rb │ │ │ ├── host_spec.rb │ │ │ ├── link_spec.rb │ │ │ ├── list-switches-reply_spec.rb │ │ │ ├── mac_spec.rb │ │ │ ├── match_spec.rb │ │ │ ├── open-vswitch_spec.rb │ │ │ ├── openflow-error_spec.rb │ │ │ ├── packet-in_spec.rb │ │ │ ├── packet-out_spec.rb │ │ │ ├── packetin-filter_spec.rb │ │ │ ├── port-mod_spec.rb │ │ │ ├── port-status-add_spec.rb │ │ │ ├── port-status-delete_spec.rb │ │ │ ├── port-status-modify_spec.rb │ │ │ ├── port-status_spec.rb │ │ │ ├── port_spec.rb │ │ │ ├── process_spec.rb │ │ │ ├── queue-get-config-reply_spec.rb │ │ │ ├── queue-get-config-request_spec.rb │ │ │ ├── send-out-port_spec.rb │ │ │ ├── set-config_spec.rb │ │ │ ├── set-eth-addr_spec.rb │ │ │ ├── set-ip-addr_spec.rb │ │ │ ├── set-ip-tos_spec.rb │ │ │ ├── set-transport-dst-port_spec.rb │ │ │ ├── set-transport-src-port_spec.rb │ │ │ ├── set-vlan-priority_spec.rb │ │ │ ├── set-vlan-vid_spec.rb │ │ │ ├── shell │ │ │ │ ├── vhost_spec.rb │ │ │ │ └── vswitch_spec.rb │ │ │ ├── stats-reply_spec.rb │ │ │ ├── stats-request_spec.rb │ │ │ ├── strip-vlan-header_spec.rb │ │ │ ├── switch-daemon_spec.rb │ │ │ ├── switch-disconnected_spec.rb │ │ │ ├── switch-manager_spec.rb │ │ │ ├── tremashark_spec.rb │ │ │ ├── util_spec.rb │ │ │ ├── vendor-action_spec.rb │ │ │ └── vendor_spec.rb │ │ └── trema_spec.rb │ │ ├── src │ │ ├── examples │ │ │ ├── cbench_switch │ │ │ │ ├── README │ │ │ │ ├── cbench-switch.rb │ │ │ │ └── cbench_switch.c │ │ │ ├── dumper │ │ │ │ ├── dumper.c │ │ │ │ ├── dumper.conf │ │ │ │ └── dumper.rb │ │ │ ├── hello_trema │ │ │ │ ├── .gitignore │ │ │ │ ├── README.md │ │ │ │ ├── hello-trema.rb │ │ │ │ ├── hello_trema.c │ │ │ │ └── sample.conf │ │ │ ├── learning_switch │ │ │ │ ├── README │ │ │ │ ├── fdb.rb │ │ │ │ ├── learning-switch.rb │ │ │ │ ├── learning_switch.c │ │ │ │ └── learning_switch.conf │ │ │ ├── list_switches │ │ │ │ ├── README │ │ │ │ ├── list-switches.rb │ │ │ │ ├── list_switches.c │ │ │ │ └── list_switches.conf │ │ │ ├── match_compare │ │ │ │ ├── match-compare.conf │ │ │ │ └── match-compare.rb │ │ │ ├── multi_learning_switch │ │ │ │ ├── README │ │ │ │ ├── multi-learning-switch.rb │ │ │ │ ├── multi_learning_switch.c │ │ │ │ └── multi_learning_switch.conf │ │ │ ├── openflow_message │ │ │ │ ├── README │ │ │ │ ├── echo.c │ │ │ │ ├── echo.rb │ │ │ │ ├── example.rb │ │ │ │ ├── features-request.rb │ │ │ │ ├── features_request.c │ │ │ │ ├── hello.c │ │ │ │ ├── hello.rb │ │ │ │ ├── set-config.rb │ │ │ │ ├── set_config.c │ │ │ │ ├── vendor-action.rb │ │ │ │ └── vendor_action.c │ │ │ ├── openflow_switch │ │ │ │ ├── echo_switch.c │ │ │ │ └── hello_switch.c │ │ │ ├── packet_in │ │ │ │ ├── README │ │ │ │ ├── packet-in.rb │ │ │ │ ├── packet_in.c │ │ │ │ └── packet_in.conf │ │ │ ├── packetin_filter_config │ │ │ │ ├── README │ │ │ │ ├── add_filter.c │ │ │ │ ├── delete_filter.c │ │ │ │ ├── delete_filter_strict.c │ │ │ │ ├── dump_filter.c │ │ │ │ ├── dump_filter_strict.c │ │ │ │ ├── packetin_filter_config.c │ │ │ │ ├── packetin_filter_config.conf │ │ │ │ ├── utils.c │ │ │ │ └── utils.h │ │ │ ├── patch_panel │ │ │ │ ├── network.conf │ │ │ │ ├── patch-panel.conf │ │ │ │ └── patch-panel.rb │ │ │ ├── repeater_hub │ │ │ │ ├── README │ │ │ │ ├── repeater-hub.rb │ │ │ │ ├── repeater-hub_spec.rb │ │ │ │ ├── repeater_hub.c │ │ │ │ └── repeater_hub.conf │ │ │ ├── simple_router │ │ │ │ ├── README │ │ │ │ ├── arp-table.rb │ │ │ │ ├── interface.rb │ │ │ │ ├── router-utils.rb │ │ │ │ ├── routing-table.rb │ │ │ │ ├── simple-router.rb │ │ │ │ ├── simple_router.conf │ │ │ │ ├── simple_router_netns.conf │ │ │ │ └── simple_router_network.conf │ │ │ ├── switch_event_config │ │ │ │ ├── .gitignore │ │ │ │ ├── add_forward_entry.c │ │ │ │ ├── delete_forward_entry.c │ │ │ │ ├── dump_forward_entries.c │ │ │ │ ├── network.conf │ │ │ │ └── set_forward_entries.c │ │ │ ├── switch_info │ │ │ │ ├── README │ │ │ │ ├── switch-info.rb │ │ │ │ ├── switch_info.c │ │ │ │ └── switch_info.conf │ │ │ ├── switch_monitor │ │ │ │ ├── switch-monitor.conf │ │ │ │ ├── switch-monitor.rb │ │ │ │ └── switch_monitor.c │ │ │ └── traffic_monitor │ │ │ │ ├── counter.c │ │ │ │ ├── counter.h │ │ │ │ ├── counter.rb │ │ │ │ ├── fdb.c │ │ │ │ ├── fdb.h │ │ │ │ ├── fdb.rb │ │ │ │ ├── traffic-monitor.rb │ │ │ │ ├── traffic_monitor.c │ │ │ │ └── traffic_monitor.conf │ │ ├── lib │ │ │ ├── arp.h │ │ │ ├── bool.h │ │ │ ├── buffer.c │ │ │ ├── buffer.h │ │ │ ├── byteorder.c │ │ │ ├── byteorder.h │ │ │ ├── checks.h │ │ │ ├── chibach.c │ │ │ ├── chibach.h │ │ │ ├── chibach_private.c │ │ │ ├── chibach_private.h │ │ │ ├── daemon.c │ │ │ ├── daemon.h │ │ │ ├── doubly_linked_list.c │ │ │ ├── doubly_linked_list.h │ │ │ ├── ether.c │ │ │ ├── ether.h │ │ │ ├── etherip.h │ │ │ ├── event_forward_interface.c │ │ │ ├── event_forward_interface.h │ │ │ ├── event_handler.c │ │ │ ├── event_handler.h │ │ │ ├── hash_table.c │ │ │ ├── hash_table.h │ │ │ ├── icmp.h │ │ │ ├── igmp.h │ │ │ ├── ipv4.h │ │ │ ├── ipv6.h │ │ │ ├── linked_list.c │ │ │ ├── linked_list.h │ │ │ ├── log.c │ │ │ ├── log.h │ │ │ ├── management_interface.c │ │ │ ├── management_interface.h │ │ │ ├── management_service_interface.c │ │ │ ├── management_service_interface.h │ │ │ ├── match.h │ │ │ ├── match_table.c │ │ │ ├── match_table.h │ │ │ ├── message_queue.c │ │ │ ├── message_queue.h │ │ │ ├── messenger.c │ │ │ ├── messenger.h │ │ │ ├── openflow_application_interface.c │ │ │ ├── openflow_application_interface.h │ │ │ ├── openflow_message.c │ │ │ ├── openflow_message.h │ │ │ ├── openflow_service_interface.h │ │ │ ├── openflow_switch_interface.c │ │ │ ├── openflow_switch_interface.h │ │ │ ├── packet_info.c │ │ │ ├── packet_info.h │ │ │ ├── packet_parser.c │ │ │ ├── packetin_filter_interface.c │ │ │ ├── packetin_filter_interface.h │ │ │ ├── persistent_storage.c │ │ │ ├── persistent_storage.h │ │ │ ├── secure_channel.c │ │ │ ├── secure_channel.h │ │ │ ├── stat.c │ │ │ ├── stat.h │ │ │ ├── tcp.h │ │ │ ├── timer.c │ │ │ ├── timer.h │ │ │ ├── trema.c │ │ │ ├── trema.h │ │ │ ├── trema.hpp │ │ │ ├── trema_private.c │ │ │ ├── trema_private.h │ │ │ ├── trema_wrapper.c │ │ │ ├── trema_wrapper.h │ │ │ ├── udp.h │ │ │ ├── utility.c │ │ │ ├── utility.h │ │ │ ├── wrapper.c │ │ │ └── wrapper.h │ │ ├── management │ │ │ ├── application.c │ │ │ ├── echo.c │ │ │ ├── set_logging_level.c │ │ │ ├── show_stats.c │ │ │ └── trema_manager │ │ ├── packetin_filter │ │ │ ├── README │ │ │ └── packetin_filter.c │ │ ├── switch_manager │ │ │ ├── README │ │ │ ├── cookie_table.c │ │ │ ├── cookie_table.h │ │ │ ├── dpid_table.c │ │ │ ├── dpid_table.h │ │ │ ├── event_forward_entry_manipulation.c │ │ │ ├── event_forward_entry_manipulation.h │ │ │ ├── ofpmsg_recv.c │ │ │ ├── ofpmsg_recv.h │ │ │ ├── ofpmsg_send.c │ │ │ ├── ofpmsg_send.h │ │ │ ├── secure_channel_listener.c │ │ │ ├── secure_channel_listener.h │ │ │ ├── secure_channel_receiver.c │ │ │ ├── secure_channel_receiver.h │ │ │ ├── secure_channel_sender.c │ │ │ ├── secure_channel_sender.h │ │ │ ├── service_interface.c │ │ │ ├── service_interface.h │ │ │ ├── switch.c │ │ │ ├── switch.h │ │ │ ├── switch_manager.c │ │ │ ├── switch_manager.h │ │ │ ├── switch_option.c │ │ │ ├── switch_option.h │ │ │ ├── switchinfo.h │ │ │ ├── xid_table.c │ │ │ └── xid_table.h │ │ └── tremashark │ │ │ ├── README │ │ │ ├── packet_capture.c │ │ │ ├── pcap_private.h │ │ │ ├── pcap_queue.c │ │ │ ├── pcap_queue.h │ │ │ ├── plugin │ │ │ ├── .gitignore │ │ │ ├── packet-trema │ │ │ │ ├── .gitignore │ │ │ │ ├── Makefile │ │ │ │ ├── Makefile.am │ │ │ │ ├── Makefile.common │ │ │ │ ├── moduleinfo.h │ │ │ │ ├── packet-trema.c │ │ │ │ └── plugin.c │ │ │ └── user_dlts │ │ │ ├── queue.c │ │ │ ├── queue.h │ │ │ ├── stdin_relay.c │ │ │ ├── syslog_relay.c │ │ │ └── tremashark.c │ │ ├── trema │ │ ├── trema-config │ │ ├── trema.gemspec │ │ ├── unittests │ │ ├── buffer_stubs.c │ │ ├── cmockery_trema.c │ │ ├── cmockery_trema.h │ │ ├── lib │ │ │ ├── buffer_test.c │ │ │ ├── byteorder_test.c │ │ │ ├── daemon_test.c │ │ │ ├── doubly_linked_list_test.c │ │ │ ├── ether_test.c │ │ │ ├── event_forward_interface_test.c │ │ │ ├── hash_table_test.c │ │ │ ├── linked_list_test.c │ │ │ ├── log_test.c │ │ │ ├── management_interface_test.c │ │ │ ├── management_service_interface_test.c │ │ │ ├── match_table_test.c │ │ │ ├── message_queue_test.c │ │ │ ├── messenger_test.c │ │ │ ├── openflow_application_interface_test.c │ │ │ ├── openflow_message_test.c │ │ │ ├── packet_info_test.c │ │ │ ├── packet_parser_test.c │ │ │ ├── packetin_filter_interface_test.c │ │ │ ├── persistent_storage_test.c │ │ │ ├── stat_test.c │ │ │ ├── test_packets │ │ │ │ ├── arp_rep.cap │ │ │ │ ├── arp_req.cap │ │ │ │ ├── icmp6_echo_rep.cap │ │ │ │ ├── icmp6_echo_req.cap │ │ │ │ ├── icmp_echo_rep.cap │ │ │ │ ├── icmp_echo_req.cap │ │ │ │ ├── igmp_query_v2.cap │ │ │ │ ├── ipx.cap │ │ │ │ ├── lldp.cap │ │ │ │ ├── lldp_over_ip.cap │ │ │ │ ├── rarp_req.cap │ │ │ │ ├── tcp.cap │ │ │ │ ├── tcp_syn.cap │ │ │ │ ├── udp.cap │ │ │ │ ├── udp_frag_head.cap │ │ │ │ ├── udp_frag_next.cap │ │ │ │ ├── vtag_icmp_echo_rep.cap │ │ │ │ └── vtag_icmp_echo_req.cap │ │ │ ├── timer_test.c │ │ │ ├── trema_private_test.c │ │ │ ├── trema_test.c │ │ │ ├── utility_test.c │ │ │ └── wrapper_test.c │ │ ├── packetin_filter │ │ │ └── packetin_filter_test.c │ │ ├── switch_manager │ │ │ └── switch_manager_test.c │ │ └── wrapper_stubs.c │ │ └── vendor │ │ ├── .gitignore │ │ ├── README.md │ │ ├── cmockery-20110428.tar.gz │ │ ├── oflops-0.03.trema1.tar.gz │ │ ├── oflops_no_snmp+1.0.0.diff │ │ ├── openflow-1.0.0.tar.gz │ │ ├── openflow.git.tar.gz │ │ ├── openvswitch-1.2.2.trema1.tar.gz │ │ ├── openvswitch-1.2.2_librt-check.diff │ │ ├── packet-openflow.diff │ │ ├── phost │ │ ├── doc │ │ │ ├── COPYING │ │ │ └── README │ │ └── src │ │ │ ├── .gitignore │ │ │ ├── Makefile │ │ │ ├── arp.c │ │ │ ├── arp.h │ │ │ ├── cli.c │ │ │ ├── cli.h │ │ │ ├── cmdif.c │ │ │ ├── cmdif.h │ │ │ ├── common.c │ │ │ ├── common.h │ │ │ ├── eth.c │ │ │ ├── eth.h │ │ │ ├── ethdev.c │ │ │ ├── ethdev.h │ │ │ ├── icmp.c │ │ │ ├── icmp.h │ │ │ ├── ipv4.c │ │ │ ├── ipv4.h │ │ │ ├── log.c │ │ │ ├── log.h │ │ │ ├── phost.c │ │ │ ├── phost.h │ │ │ ├── stats.c │ │ │ ├── stats.h │ │ │ ├── tap.c │ │ │ ├── tap.h │ │ │ ├── trx.c │ │ │ ├── trx.h │ │ │ ├── udp.c │ │ │ ├── udp.h │ │ │ ├── utils.c │ │ │ └── utils.h │ │ └── ruby-ifconfig-1.2 │ │ ├── COPYING │ │ ├── Changelog │ │ ├── INSTALL │ │ ├── README │ │ ├── Rakefile │ │ ├── TODO │ │ ├── ifconfig_examples │ │ ├── darwin.txt │ │ ├── dragonflybsd.txt │ │ ├── dragonflybsd_netstat.txt │ │ ├── freebsd.txt │ │ ├── freebsd_netstat.txt │ │ ├── linux.txt │ │ ├── linux_ethernet.txt │ │ ├── netbsd.txt │ │ ├── openbsd.txt │ │ └── sunos.txt │ │ ├── lib │ │ ├── ifconfig.rb │ │ └── ifconfig │ │ │ ├── bsd │ │ │ ├── ifconfig.rb │ │ │ ├── interface_types.rb │ │ │ └── network_types.rb │ │ │ ├── common │ │ │ ├── ifconfig.rb │ │ │ ├── interface_types.rb │ │ │ └── network_types.rb │ │ │ ├── linux │ │ │ ├── ifconfig.rb │ │ │ ├── interface_types.rb │ │ │ └── network_types.rb │ │ │ └── sunos │ │ │ ├── ifconfig.rb │ │ │ ├── interface_types.rb │ │ │ └── network_types.rb │ │ ├── setup.rb │ │ └── test │ │ ├── test_bsd.rb │ │ ├── test_darwin.rb │ │ ├── test_dragonflybsd.rb │ │ ├── test_helper.rb │ │ ├── test_linux.rb │ │ ├── test_netbsd.rb │ │ ├── test_openbsd.rb │ │ ├── test_sunos.rb │ │ └── unit │ │ ├── tc_darwin.rb │ │ ├── tc_dragonflybsd.rb │ │ ├── tc_freebsd.rb │ │ ├── tc_linux.rb │ │ ├── tc_netbsd.rb │ │ ├── tc_openbsd.rb │ │ └── tc_sunos.rb ├── yanosz │ └── bbkeys │ │ ├── .gitignore │ │ ├── README.md │ │ ├── backup │ │ ├── collectd │ │ ├── fastd3 │ │ ├── felicitas │ │ ├── jenkins │ │ ├── kif │ │ ├── paul │ │ └── paula └── zmap │ └── zmap │ ├── .gitignore │ ├── AUTHORS │ ├── CHANGELOG │ ├── CMakeLists.txt │ ├── INSTALL │ ├── LICENSE │ ├── README │ ├── conf │ ├── blacklist.conf │ └── zmap.conf │ ├── examples │ ├── banner-grab-go │ │ ├── README │ │ ├── banner.go │ │ └── http-req │ ├── banner-grab │ │ ├── Makefile │ │ ├── README │ │ ├── banner-grab-tcp.c │ │ └── http-req │ ├── forge-socket │ │ ├── Makefile │ │ ├── README │ │ └── forge-socket.c │ └── udp-probes │ │ ├── README │ │ ├── citrix_1604.pkt │ │ ├── db2disco_523.pkt │ │ ├── digi1_2362.pkt │ │ ├── digi2_2362.pkt │ │ ├── digi3_2362.pkt │ │ ├── dns_53.pkt │ │ ├── ipmi_623.pkt │ │ ├── mdns_5353.pkt │ │ ├── mssql_1434.pkt │ │ ├── natpmp_5351.pkt │ │ ├── netbios_137.pkt │ │ ├── ntp_123.pkt │ │ ├── pca_nq_5632.pkt │ │ ├── pca_st_5632.pkt │ │ ├── portmap_111.pkt │ │ ├── sentinel_5093.pkt │ │ ├── snmp1_161.pkt │ │ ├── snmp2_161.pkt │ │ ├── upnp_1900.pkt │ │ ├── wdbrpc_17185.pkt │ │ └── wsd_3702.pkt │ ├── lib │ ├── blacklist.c │ ├── blacklist.h │ ├── constraint.c │ ├── constraint.h │ ├── logger.c │ ├── logger.h │ ├── pbm.c │ ├── pbm.h │ ├── random.c │ ├── random.h │ ├── redis.c │ ├── redis.h │ ├── rijndael-alg-fst.c │ ├── rijndael-alg-fst.h │ ├── stack.c │ ├── stack.h │ ├── xalloc.c │ └── xalloc.h │ ├── src │ ├── .gitignore │ ├── CMakeLists.txt │ ├── aesrand.c │ ├── aesrand.h │ ├── cyclic.c │ ├── cyclic.h │ ├── expression.c │ ├── expression.h │ ├── fieldset.c │ ├── fieldset.h │ ├── filter.c │ ├── filter.h │ ├── get_gateway.c │ ├── get_gateway.h │ ├── lexer.l │ ├── monitor.c │ ├── monitor.h │ ├── output_modules │ │ ├── module_csv.c │ │ ├── module_json.c │ │ ├── module_redis.c │ │ ├── module_redis.h │ │ ├── output_modules.c │ │ └── output_modules.h │ ├── parser.y │ ├── probe_modules │ │ ├── module_icmp_echo.c │ │ ├── module_tcp_synscan.c │ │ ├── module_udp.c │ │ ├── packet.c │ │ ├── packet.h │ │ ├── probe_modules.c │ │ └── probe_modules.h │ ├── recv.c │ ├── recv.h │ ├── send.c │ ├── send.h │ ├── state.c │ ├── state.h │ ├── types.h │ ├── validate.c │ ├── validate.h │ ├── zmap.1 │ ├── zmap.c │ ├── zopt.ggo │ └── zopt_compat.c │ └── zmap_conf_install.cmake.in ├── projects.txt └── sh └── pull /docs/amazon.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | - [Setting up a DNS Server in Amazon EC2, 2012.09](http://engineering.secondmarket.com/post/32692700987/setting-up-a-dns-server-in-amazon-ec2) 4 | - [Automating setup of Amazon AWS EC2 Instances](http://wrgms.com/post/34075931500/amazonaws) 5 | - [How we use EC2 Instance tagging](https://engineering.gosquared.com/how-we-use-ec2-instance-tagging) 6 | 7 | 8 | 9 | 10 | ## Haproxy for autoscaling 11 | - [Amazon Auto Scaling with Puppet, PuppetDB and Haproxy, 2013.08](http://imcol.in/2013/08/amazon-autoscale-with-puppet-puppetdb-and-haproxy/) 12 | 13 | 14 | ## Hosts file approach: 15 | - [Networking in EC2, 2009.03](http://ec2dream.blogspot.de/2009/03/networking-in-ec2.html) 16 | - [How can I keep my /etc/hosts file up to date with multiple ec2 instances](http://serverfault.com/questions/316695/how-can-i-keep-my-etc-hosts-file-up-to-date-with-multiple-ec2-instances) 17 | 18 | 19 | 20 | ## Route53 21 | - http://shlomoswidler.com/2010/12/using-aws-route-53-to-keep-track-of-ec2-instances.html 22 | 23 | 24 | ## Cloudformation: 25 | - http://s3.amazonaws.com/cloudformation-examples/BoostrappingApplicationsWithAWSCloudFormation.pdf 26 | -------------------------------------------------------------------------------- /docs/dns.md: -------------------------------------------------------------------------------- 1 | ## Naming Schemes: 2 | - [A PROPER SERVER NAMING SCHEME, 2014.07](http://mnx.io/blog/a-proper-server-naming-scheme/), [HN Discussion](https://news.ycombinator.com/item?id=8010247) 3 | - http://namingschemes.com/ 4 | 5 | 6 | - http://engineering.wingify.com/dynamic-cdn/ 7 | 8 | 9 | 10 | Servers: 11 | - [Knot DNS: A high-performance, authoritative DNS server](https://lwn.net/Articles/606968/) 12 | https://www.knot-dns.cz/ 13 | -------------------------------------------------------------------------------- /docs/ipv6.md: -------------------------------------------------------------------------------- 1 | ## IPv6 links 2 | - [IPv6 - sage@guug Stuttgart, 2012.07](http://www.guug.de/lokal/stuttgart/folien/sage-guug-stuttgart-20120717.pdf) 3 | - [IPv6 - Migration, Betrieb und Deployment, 2013](http://chemnitzer.linux-tage.de/2013/vortraege/folien/149_ipv6.pdf) 4 | -------------------------------------------------------------------------------- /docs/software-defined-networks.md: -------------------------------------------------------------------------------- 1 | 2 | - http://www.sdncentral.com/comprehensive-list-of-open-source-sdn-projects/ 3 | 4 | 5 | - [The BIRD Internet Routing Daemon](http://bird.network.cz/?get_doc) 6 | - http://www.nanog.org/meetings/nanog48/presentations/Monday/Filip_BIRD_final_N48.pdf 7 | - http://www.peeringday.eu/media/document/5.-ondrej-filip.pdf 8 | 9 | 10 | - [Twitter - Testing OpenFlow](http://twistertesting.com/use-cases-page/) 11 | - https://github.com/Luxoft/Twister 12 | - http://twistertesting.com/download/Twister_presentation.pdf 13 | 14 | 15 | - [Trema](http://trema.github.io/trema/) 16 | - https://github.com/trema/trema 17 | - http://trema-10min.heroku.com/#1 18 | - https://groups.google.com/forum/?fromgroups#!forum/trema-dev 19 | - http://www.sdncentral.com/projects/trema -------------------------------------------------------------------------------- /docs/vpn.md: -------------------------------------------------------------------------------- 1 | ### VPN Mesh: 2 | - vpmn.googlecode.com/files/scg08_vpmn_r1.pdf‎ 3 | 4 | 5 | ### VPN Solutions: 6 | - http://www.tinc-vpn.org 7 | - https://www.zerotier.com/quickstart.html 8 | - http://www.neorouter.com/ 9 | - http://www.freelan.org/page/faq 10 | - http://vtun.sourceforge.net/features.html 11 | - http://openvpn.net/index.php/access-server/overview.html 12 | - http://ipsec-tools.sourceforge.net/ 13 | 14 | - http://software.schmorp.de/pkg/gvpe.html 15 | - http://habrahabr.ru/post/150151/ (List of Projects) 16 | 17 | (http://www.youtube.com/watch?feature=player_detailpage&v=R7P_vvz1AP8#t=178) 18 | - cloudVPN 19 | - socialVPN 20 | - n2n 21 | - VDE 22 | 23 | 24 | ## Tunneling: 25 | - http://pagekite.net/ -------------------------------------------------------------------------------- /github.com/Gorian/tinc-automation/README.md: -------------------------------------------------------------------------------- 1 | tinc-automation 2 | =============== 3 | 4 | scripts for automating deployment of tinc 5 | -------------------------------------------------------------------------------- /github.com/Youscribe/tinc-cookbook/.gitignore: -------------------------------------------------------------------------------- 1 | .vagrant 2 | Berksfile.lock 3 | *~ 4 | *# 5 | .#* 6 | \#*# 7 | .*.sw[a-z] 8 | *.un~ 9 | /cookbooks 10 | 11 | # Bundler 12 | Gemfile.lock 13 | bin/* 14 | .bundle/* 15 | 16 | .kitchen/ 17 | .kitchen.local.yml 18 | -------------------------------------------------------------------------------- /github.com/Youscribe/tinc-cookbook/.kitchen.yml: -------------------------------------------------------------------------------- 1 | --- 2 | driver_plugin: vagrant 3 | driver_config: 4 | require_chef_omnibus: true 5 | 6 | platforms: 7 | - name: ubuntu-12.04 8 | driver_config: 9 | box: opscode-ubuntu-12.04 10 | box_url: https://opscode-vm.s3.amazonaws.com/vagrant/opscode_ubuntu-12.04_provisionerless.box 11 | - name: ubuntu-10.04 12 | driver_config: 13 | box: opscode-ubuntu-10.04 14 | box_url: https://opscode-vm.s3.amazonaws.com/vagrant/opscode_ubuntu-10.04_provisionerless.box 15 | - name: centos-6.4 16 | driver_config: 17 | box: opscode-centos-6.4 18 | box_url: https://opscode-vm.s3.amazonaws.com/vagrant/opscode_centos-6.4_provisionerless.box 19 | - name: centos-5.9 20 | driver_config: 21 | box: opscode-centos-5.9 22 | box_url: https://opscode-vm.s3.amazonaws.com/vagrant/opscode_centos-5.9_provisionerless.box 23 | 24 | suites: 25 | - name: default 26 | run_list: [] 27 | attributes: {} 28 | -------------------------------------------------------------------------------- /github.com/Youscribe/tinc-cookbook/Berksfile: -------------------------------------------------------------------------------- 1 | site :opscode 2 | 3 | metadata 4 | -------------------------------------------------------------------------------- /github.com/Youscribe/tinc-cookbook/Gemfile: -------------------------------------------------------------------------------- 1 | source 'https://rubygems.org' 2 | 3 | gem 'berkshelf' 4 | gem 'test-kitchen', :group => :integration 5 | gem 'kitchen-vagrant', :group => :integration 6 | -------------------------------------------------------------------------------- /github.com/Youscribe/tinc-cookbook/README.md: -------------------------------------------------------------------------------- 1 | Description 2 | =========== 3 | Chef cookbook to manage and install tinc 4 | 5 | NOT WORKING, UNDER HEAVY DEV. Feel free to pull request ;) 6 | 7 | Requirements 8 | ============ 9 | 10 | Attributes 11 | ========== 12 | 13 | Usage 14 | ===== 15 | 16 | -------------------------------------------------------------------------------- /github.com/Youscribe/tinc-cookbook/Thorfile: -------------------------------------------------------------------------------- 1 | # encoding: utf-8 2 | 3 | require 'bundler' 4 | require 'bundler/setup' 5 | require 'berkshelf/thor' 6 | 7 | begin 8 | require 'kitchen/thor_tasks' 9 | Kitchen::ThorTasks.new 10 | rescue LoadError 11 | puts ">>>>> Kitchen gem not loaded, omitting tasks" unless ENV['CI'] 12 | end 13 | -------------------------------------------------------------------------------- /github.com/Youscribe/tinc-cookbook/attributes/default.rb: -------------------------------------------------------------------------------- 1 | default[:tinc][:net][:default][:device] = "/dev/net/tun" 2 | default[:tinc][:net][:default][:interface] = "tun0" 3 | default[:tinc][:net][:default][:bind_to] = "eth0" 4 | default[:tinc][:net][:default][:mode] = "router" 5 | default[:tinc][:net][:default][:name] = node[:hostname].gsub("-", "_") 6 | default[:tinc][:net][:default][:external_ipaddress] = node[:ipaddress] 7 | 8 | default[:tinc][:net][:default][:cipher] = "blowfish" 9 | default[:tinc][:net][:default][:digest] = "sha1" 10 | default[:tinc][:net][:default][:compression] = "0" 11 | 12 | default[:tinc][:net][:default][:tcponly] = false 13 | 14 | #default[:tinc][:net][:default][:internal_ipaddress] = "192.16.0.1" 15 | default[:tinc][:net][:default][:internal_netmask] = "255.255.255.0" 16 | 17 | case node[:platform] 18 | when "debian" 19 | default[:tinc][:init] = "none" 20 | default['tinc']['ppa'] = false 21 | when "ubuntu" 22 | default['tinc']['init'] = "other" 23 | default['tinc']['ppa'] = true 24 | else 25 | default[:tinc][:init] = "other" 26 | default['tinc']['ppa'] = false 27 | end 28 | -------------------------------------------------------------------------------- /github.com/Youscribe/tinc-cookbook/files/default/upstart-tinc-all.conf: -------------------------------------------------------------------------------- 1 | description "Tinc VPN (start all networks)" 2 | 3 | start on filesystem 4 | 5 | task 6 | 7 | pre-start script 8 | test -r /etc/tinc/nets.boot || { stop; exit 0; } 9 | end script 10 | 11 | script 12 | egrep '^[ ]*[a-zA-Z0-9_-]+' /etc/tinc/nets.boot | while read net args; do 13 | if initctl list|mawk '$1=="tinc" && $2=="(" INSTANCE ")" && $3~/start\// { exit 1 }' INSTANCE="$net"; then 14 | start tinc NETWORK="$net" 15 | fi 16 | done 17 | end script 18 | -------------------------------------------------------------------------------- /github.com/Youscribe/tinc-cookbook/files/default/upstart-tinc.conf: -------------------------------------------------------------------------------- 1 | description "Tinc vpn" 2 | 3 | stop on runlevel [!2345] 4 | 5 | respawn 6 | respawn limit 5 30 7 | 8 | oom never 9 | 10 | pre-start script 11 | test -x /usr/sbin/tincd || { stop; exit 0; } 12 | end script 13 | 14 | instance $NETWORK 15 | 16 | exec /usr/sbin/tincd -n "$NETWORK" -D 17 | -------------------------------------------------------------------------------- /github.com/Youscribe/tinc-cookbook/metadata.rb: -------------------------------------------------------------------------------- 1 | maintainer "Guilhem Lettron" 2 | maintainer_email "guilhem.lettron@youscribe.com" 3 | license "Apache 2.0" 4 | description "Installs/Configures tinc" 5 | long_description IO.read(File.join(File.dirname(__FILE__), 'README.md')) 6 | version "0.0.4" 7 | depends "apt" 8 | suggests "network_interfaces" 9 | -------------------------------------------------------------------------------- /github.com/Youscribe/tinc-cookbook/recipes/core.rb: -------------------------------------------------------------------------------- 1 | # 2 | # Cookbook Name:: tinc 3 | # Recipe:: core 4 | # 5 | # Author:: Guilhem Lettron 6 | # 7 | # Copyright 20012, Societe Publica. 8 | # 9 | # Licensed under the Apache License, Version 2.0 (the "License"); 10 | # you may not use this file except in compliance with the License. 11 | # You may obtain a copy of the License at 12 | # 13 | # http://www.apache.org/licenses/LICENSE-2.0 14 | # 15 | # Unless required by applicable law or agreed to in writing, software 16 | # distributed under the License is distributed on an "AS IS" BASIS, 17 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | # See the License for the specific language governing permissions and 19 | # limitations under the License. 20 | # -------------------------------------------------------------------------------- /github.com/Youscribe/tinc-cookbook/recipes/install.rb: -------------------------------------------------------------------------------- 1 | if node['tinc']['ppa'] 2 | include_recipe "tinc::ppa" 3 | end 4 | 5 | package "tinc" 6 | -------------------------------------------------------------------------------- /github.com/Youscribe/tinc-cookbook/recipes/ppa.rb: -------------------------------------------------------------------------------- 1 | # 2 | # Cookbook Name:: tinc 3 | # Recipe:: ppa 4 | # 5 | # Author:: Guilhem Lettron 6 | # 7 | # Copyright 20012, Societe Publica. 8 | # 9 | # Licensed under the Apache License, Version 2.0 (the "License"); 10 | # you may not use this file except in compliance with the License. 11 | # You may obtain a copy of the License at 12 | # 13 | # http://www.apache.org/licenses/LICENSE-2.0 14 | # 15 | # Unless required by applicable law or agreed to in writing, software 16 | # distributed under the License is distributed on an "AS IS" BASIS, 17 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | # See the License for the specific language governing permissions and 19 | # limitations under the License. 20 | # 21 | 22 | apt_repository "tinc guilhem-fr ppa" do 23 | repo_name "tinc_ppa" 24 | uri "http://ppa.launchpad.net/guilhem-fr/tinc/ubuntu" 25 | distribution node[:lsb][:codename] 26 | components ["main"] 27 | keyserver "keyserver.ubuntu.com" 28 | key "97F87FBF" 29 | end 30 | 31 | -------------------------------------------------------------------------------- /github.com/Youscribe/tinc-cookbook/resources/.network.rb.swp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mindreframer/networking-stuff/890b041877465f31475d4692f23a973bcb8ccecc/github.com/Youscribe/tinc-cookbook/resources/.network.rb.swp -------------------------------------------------------------------------------- /github.com/Youscribe/tinc-cookbook/templates/default/host.erb: -------------------------------------------------------------------------------- 1 | Address = <%= @ipaddress %> 2 | 3 | Cipher = <%= @cipher %> 4 | 5 | Digest = <%= @digest %> 6 | 7 | Compression = <%= @compression %> 8 | 9 | <% @subnets.each do |subnet| -%> 10 | Subnet = <%= subnet %> 11 | <% end -%> 12 | 13 | <% if @tcponly -%> 14 | TCPOnly = yes 15 | <% end -%> 16 | 17 | <%= @public_key %> 18 | -------------------------------------------------------------------------------- /github.com/Youscribe/tinc-cookbook/templates/default/nets.boot.erb: -------------------------------------------------------------------------------- 1 | ## This file contains all names of the networks to be started on system startup. 2 | <% @networks.each do |network| -%> 3 | <%= network %> 4 | <% end -%> 5 | -------------------------------------------------------------------------------- /github.com/Youscribe/tinc-cookbook/templates/default/tinc.conf.erb: -------------------------------------------------------------------------------- 1 | <% @hosts_ConnectTo.sort.each do |host| -%> 2 | ConnectTo = <%= host %> 3 | <% end -%> 4 | 5 | Device = <%= @device %> 6 | 7 | <% if @external_ipaddress -%> 8 | BindToAddress = <%= @external_ipaddress %> 9 | <% elsif %> 10 | BindToInterface = <%= @bind_to %> 11 | <% end -%> 12 | 13 | Interface = <%= @interface %> 14 | 15 | Mode = <%= @mode %> 16 | 17 | Name = <%= @name %> 18 | -------------------------------------------------------------------------------- /github.com/bluemonk/ipaddress/.document: -------------------------------------------------------------------------------- 1 | README.rdoc 2 | lib/**/*.rb 3 | bin/* 4 | features/**/*.feature 5 | LICENSE 6 | -------------------------------------------------------------------------------- /github.com/bluemonk/ipaddress/.gitignore: -------------------------------------------------------------------------------- 1 | *.sw? 2 | .DS_Store 3 | coverage 4 | rdoc 5 | pkg 6 | server.rb 7 | ipaddr.html 8 | -------------------------------------------------------------------------------- /github.com/bluemonk/ipaddress/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2009-2011 Marco Ceresa 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining 4 | a copy of this software and associated documentation files (the 5 | "Software"), to deal in the Software without restriction, including 6 | without limitation the rights to use, copy, modify, merge, publish, 7 | distribute, sublicense, and/or sell copies of the Software, and to 8 | permit persons to whom the Software is furnished to do so, subject to 9 | the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be 12 | included in all copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 15 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 16 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 17 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 18 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 19 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 20 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | -------------------------------------------------------------------------------- /github.com/bluemonk/ipaddress/VERSION: -------------------------------------------------------------------------------- 1 | 0.8.0 -------------------------------------------------------------------------------- /github.com/bluemonk/ipaddress/test/test_helper.rb: -------------------------------------------------------------------------------- 1 | require 'rubygems' 2 | require 'test/unit' 3 | 4 | $LOAD_PATH.unshift(File.dirname(__FILE__)) 5 | $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib')) 6 | require 'ipaddress' 7 | 8 | module Test::Unit 9 | 10 | class TestCase 11 | 12 | def self.must(name, &block) 13 | test_name = "test_#{name.gsub(/\s+/,'_')}".to_sym 14 | defined = instance_method(test_name) rescue false 15 | raise "#{test_name} is already defined in #{self}" if defined 16 | if block_given? 17 | define_method(test_name, &block) 18 | else 19 | define_method(test_name) do 20 | flunk "No implementation provided for #{name}" 21 | end 22 | end 23 | end 24 | 25 | end 26 | end 27 | 28 | 29 | -------------------------------------------------------------------------------- /github.com/bluemonk/net-dns/.gitignore: -------------------------------------------------------------------------------- 1 | # Bundler 2 | .bundle 3 | pkg/* 4 | Gemfile.lock 5 | 6 | # YARD 7 | .yardoc 8 | yardoc/ 9 | -------------------------------------------------------------------------------- /github.com/bluemonk/net-dns/.rspec: -------------------------------------------------------------------------------- 1 | --colour -------------------------------------------------------------------------------- /github.com/bluemonk/net-dns/.travis.yml: -------------------------------------------------------------------------------- 1 | language: ruby 2 | 3 | rvm: 4 | - 1.8.7 5 | - 1.9.2 6 | - 1.9.3 7 | - 2.0.0 8 | # - jruby-18mode 9 | # - jruby-19mode 10 | - rbx-18mode 11 | # - ruby-head 12 | # - jruby-head 13 | 14 | notifications: 15 | recipients: 16 | - weppos@weppos.net 17 | 18 | matrix: 19 | allow_failures: 20 | - rvm: 2.0.0 21 | -------------------------------------------------------------------------------- /github.com/bluemonk/net-dns/Gemfile: -------------------------------------------------------------------------------- 1 | source "http://rubygems.org" 2 | 3 | # Specify your gem's dependencies in whois.gemspec 4 | gemspec 5 | -------------------------------------------------------------------------------- /github.com/bluemonk/net-dns/THANKS.rdoc: -------------------------------------------------------------------------------- 1 | Many thanks to these wonderful people: 2 | 3 | - Paul Barry for his excellent article on May07 issue of LinuxJournal, for the kind words and for bug reports 4 | - Dan Janowski (and his SRV RR) 5 | - Joshua Abraham 6 | - Ben April 7 | - Gene Rogers 8 | - Nicholas Veeser 9 | - Gildas Cherruel 10 | - Alex Dalitz 11 | - Cory Wright 12 | - Nicolas Pugnant 13 | - Andrea Peltrin 14 | - Giovanni Corriga 15 | - Luca Russo 16 | - Pierguido Lambri 17 | - Andrea Pampuri 18 | - _koo_ 19 | - Oyku Gencay 20 | - Eric Liedtke 21 | - Justin Mercier 22 | - Daniel Berger 23 | and all #ruby-lang people 24 | 25 | -------------------------------------------------------------------------------- /github.com/bluemonk/net-dns/demo/threads.rb: -------------------------------------------------------------------------------- 1 | require 'rubygems' if "#{RUBY_VERSION}" < "1.9.0" 2 | require 'net/dns' 3 | 4 | a = ["ibm.com", "sun.com", "redhat.com"] 5 | 6 | threads = [] 7 | 8 | for dom in a 9 | threads << Thread.new(dom) do |domain| 10 | res = Net::DNS::Resolver.new 11 | res.query(domain, Net::DNS::NS).each_nameserver do |ns| 12 | puts "Domain #{domain} has nameserver #{ns}" 13 | end 14 | puts "" 15 | end 16 | end 17 | 18 | threads.each do |t| 19 | t.join 20 | end 21 | 22 | 23 | -------------------------------------------------------------------------------- /github.com/bluemonk/net-dns/lib/net/dns/version.rb: -------------------------------------------------------------------------------- 1 | module Net 2 | module DNS 3 | module Version 4 | 5 | MAJOR = 0 6 | MINOR = 8 7 | PATCH = 0 8 | BUILD = nil 9 | 10 | STRING = [MAJOR, MINOR, PATCH, BUILD].compact.join(".") 11 | end 12 | 13 | VERSION = Version::STRING 14 | 15 | end 16 | end -------------------------------------------------------------------------------- /github.com/bluemonk/net-dns/spec/fixtures/resolv.conf: -------------------------------------------------------------------------------- 1 | search corporate.thoughtworks.com 2 | nameserver 192.168.1.1 3 | nameserver 192.168.1.2 4 | nameserver 192.168.1.3 192.168.1.4 5 | -------------------------------------------------------------------------------- /github.com/bluemonk/net-dns/spec/spec_helper.rb: -------------------------------------------------------------------------------- 1 | require 'rspec' 2 | require 'net/dns' 3 | 4 | unless defined?(SPEC_ROOT) 5 | SPEC_ROOT = File.expand_path("../", __FILE__) 6 | end 7 | 8 | # Requires supporting ruby files with custom matchers and macros, etc, 9 | # in spec/support/ and its subdirectories. 10 | Dir[File.join(SPEC_ROOT, "support/**/*.rb")].each { |f| require f } 11 | 12 | RSpec.configure do |config| 13 | # config.mock_with :mocha 14 | # config.syntax = :expect 15 | config.order = :random 16 | end 17 | -------------------------------------------------------------------------------- /github.com/bluemonk/net-dns/test/names_test.rb: -------------------------------------------------------------------------------- 1 | require 'test_helper' 2 | require 'net/dns/names' 3 | 4 | class NamesTest < Test::Unit::TestCase 5 | include Net::DNS::Names 6 | 7 | def test_long_names 8 | assert_nothing_raised do 9 | pack_name('a' * 63) 10 | end 11 | assert_raises ArgumentError do 12 | pack_name('a' * 64) 13 | end 14 | assert_nothing_raised do 15 | pack_name(['a' * 63, 'b' * 63, 'c' * 63, 'd' * 63].join('.')) 16 | end 17 | assert_raises ArgumentError do 18 | pack_name(['a' * 63, 'b' * 63, 'c' * 63, 'd' * 63, 'e'].join('.')) 19 | end 20 | end 21 | end 22 | -------------------------------------------------------------------------------- /github.com/bluemonk/net-dns/test/test_helper.rb: -------------------------------------------------------------------------------- 1 | $:.unshift(File.dirname(__FILE__) + '/../lib') 2 | 3 | require 'test/unit' 4 | require 'net/dns' -------------------------------------------------------------------------------- /github.com/duritong/puppet-tinc/files/CentOS/tinc.sysconfig: -------------------------------------------------------------------------------- 1 | # Extra options to be passed to tincd. 2 | # EXTRA="-d" 3 | -------------------------------------------------------------------------------- /github.com/duritong/puppet-tinc/manifests/base.pp: -------------------------------------------------------------------------------- 1 | class tinc::base { 2 | package { 3 | 'tinc' : 4 | ensure => installed, 5 | } 6 | service { 7 | tinc : 8 | ensure => running, 9 | enable => true, 10 | hasstatus => true, 11 | require => Package[tinc], 12 | } 13 | file { 14 | "/etc/tinc/nets.boot" : 15 | ensure => present, 16 | require => Package['tinc'], 17 | before => Service['tinc'], 18 | owner => root, 19 | group => 0, 20 | mode => 0600 ; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /github.com/duritong/puppet-tinc/manifests/centos.pp: -------------------------------------------------------------------------------- 1 | class tinc::centos inherits tinc::base { 2 | file { 3 | '/etc/sysconfig/tinc' : 4 | source => ["puppet:///modules/site_tinc/CentOS/${::fqdn}/tinc.sysconfig", 5 | "puppet:///modules/site_tinc/tinc.sysconfig", 6 | "puppet:///modules/tinc/${::operatingsystem}/tinc.sysconfig"], 7 | require => Package['tinc'], 8 | notify => Service['tinc'], 9 | owner => root, 10 | group => 0, 11 | mode => 0644 ; 12 | } 13 | Service['tinc'] { 14 | hasstatus => true, 15 | hasrestart => true 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /github.com/duritong/puppet-tinc/manifests/debian.pp: -------------------------------------------------------------------------------- 1 | class tinc::debian inherits tinc::base { 2 | Service['tinc'] { 3 | hasstatus => false, 4 | pattern => 'tincd', 5 | hasrestart => true 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /github.com/duritong/puppet-tinc/manifests/init.pp: -------------------------------------------------------------------------------- 1 | class tinc( 2 | $manage_shorewall = false 3 | ) { 4 | require bridge_utils 5 | case $::operatingsystem { 6 | centos: { include tinc::centos } 7 | debian: { include tinc::debian } 8 | default: { include tinc::base } 9 | } 10 | if $manage_shorewall { 11 | include shorewall::rules::tinc 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /github.com/duritong/puppet-tinc/manifests/puppetmaster.pp: -------------------------------------------------------------------------------- 1 | class tinc::puppetmaster($tinc_storage_path){ 2 | file{$tinc_storage_path: 3 | ensure => directory, 4 | owner => root, group => puppet, mode => '0660'; 5 | } 6 | 7 | File_line<<| tag == 'tinc_hosts_file' |>> 8 | } 9 | -------------------------------------------------------------------------------- /github.com/duritong/puppet-tinc/spec/spec.opts: -------------------------------------------------------------------------------- 1 | --format 2 | s 3 | --colour 4 | --loadby 5 | mtime 6 | --backtrace 7 | -------------------------------------------------------------------------------- /github.com/duritong/puppet-tinc/spec/spec_helper.rb: -------------------------------------------------------------------------------- 1 | require 'pathname' 2 | dir = Pathname.new(__FILE__).parent 3 | $LOAD_PATH.unshift(dir, dir + 'lib', dir + '../lib') 4 | require 'puppet' 5 | gem 'rspec', '>= 1.2.9' 6 | require 'spec/autorun' 7 | 8 | Dir[File.join(File.dirname(__FILE__), 'support', '*.rb')].each do |support_file| 9 | require support_file 10 | end 11 | 12 | # We need this because the RAL uses 'should' as a method. This 13 | # allows us the same behaviour but with a different method name. 14 | class Object 15 | alias :must :should 16 | end 17 | -------------------------------------------------------------------------------- /github.com/duritong/puppet-tinc/templates/host.erb: -------------------------------------------------------------------------------- 1 | Address = <%= scope.lookupvar("::ipaddress_#{tinc_interface.gsub('.','_')}") %> 2 | Port = <%= port %> 3 | Compression = <%= compression %> # 0=no,11=best lzo 4 | # 5 | 6 | <%= tinc_keys[1] %> 7 | -------------------------------------------------------------------------------- /github.com/duritong/puppet-tinc/templates/tinc-down.erb: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | brctl delif <%= real_tinc_bridge_interface %> $INTERFACE 4 | 5 | -------------------------------------------------------------------------------- /github.com/duritong/puppet-tinc/templates/tinc-up.erb: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | grep <%= real_tinc_bridge_interface %> /proc/net/dev | awk -F: '{ print $1 }' | grep -q <%= real_tinc_bridge_interface %> 4 | if [ $? -gt 0 ]; then 5 | brctl addbr <%= real_tinc_bridge_interface %> 6 | ifconfig <%= tinc_internal_interface %> 0.0.0.0 7 | ifconfig <%= real_tinc_bridge_interface %> <%= real_tinc_internal_ip %> netmask 255.255.255.0 8 | brctl addif <%= real_tinc_bridge_interface %> <%= tinc_internal_interface %> 9 | ifconfig <%= tinc_internal_interface %> up 10 | fi 11 | 12 | ifconfig $INTERFACE 0.0.0.0 13 | brctl addif <%= real_tinc_bridge_interface %> $INTERFACE 14 | ifconfig $INTERFACE up 15 | <% if override_mtu -%> 16 | ifconfig $INTERFACE mtu <%= override_mtu.to_i %> 17 | <% end -%> 18 | -------------------------------------------------------------------------------- /github.com/duritong/puppet-tinc/templates/tinc.conf.erb: -------------------------------------------------------------------------------- 1 | Name = <%= fqdn_tinc %> 2 | AddressFamily = ipv4 3 | Device = /dev/net/tun 4 | #PMTU = 1440 5 | Mode = switch 6 | #Mode = router 7 | 8 | BindToInterface = <%= tinc_interface.to_s %> 9 | 10 | <% tinc_hosts.to_a.reject{|h| h.to_s == scope.lookupvar('::fqdn') }.each do |connect_to_host| -%> 11 | ConnectTo = <%= connect_to_host %> 12 | <% end -%> -------------------------------------------------------------------------------- /github.com/example42/puppet-tinc/.fixtures.yml: -------------------------------------------------------------------------------- 1 | fixtures: 2 | repositories: 3 | "puppi": "git://github.com/example42/puppi.git" 4 | "monitor": "git://github.com/example42/puppet-monitor.git" 5 | "firewall": "git://github.com/example42/puppet-firewall.git" 6 | "iptables": "git://github.com/example42/puppet-iptables.git" 7 | "concat": "git://github.com/example42/puppet-concat.git" 8 | symlinks: 9 | "tinc": "#{source_dir}" 10 | 11 | -------------------------------------------------------------------------------- /github.com/example42/puppet-tinc/.gemfile: -------------------------------------------------------------------------------- 1 | source :rubygems 2 | 3 | puppetversion = ENV['PUPPET_VERSION'] 4 | gem 'puppet', puppetversion, :require => false 5 | gem 'puppet-lint' 6 | gem 'puppetlabs_spec_helper', '>= 0.1.0' 7 | -------------------------------------------------------------------------------- /github.com/example42/puppet-tinc/.gitignore: -------------------------------------------------------------------------------- 1 | /.gradle 2 | /metadata.json 3 | /.rvmrc 4 | build 5 | pkg/ 6 | Session.vim 7 | spec/fixtures 8 | .*.sw[a-z] 9 | *.un~ 10 | -------------------------------------------------------------------------------- /github.com/example42/puppet-tinc/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | tinc 4 | 5 | 6 | 7 | 8 | 9 | org.cloudsmith.geppetto.pp.dsl.ui.modulefileBuilder 10 | 11 | 12 | 13 | 14 | org.eclipse.xtext.ui.shared.xtextBuilder 15 | 16 | 17 | 18 | 19 | 20 | org.cloudsmith.geppetto.pp.dsl.ui.puppetNature 21 | org.eclipse.xtext.ui.shared.xtextNature 22 | 23 | 24 | -------------------------------------------------------------------------------- /github.com/example42/puppet-tinc/.travis.yml: -------------------------------------------------------------------------------- 1 | language: ruby 2 | rvm: 3 | - 1.8.7 4 | - 1.9.3 5 | script: 6 | - "rake spec SPEC_OPTS='--format documentation'" 7 | env: 8 | - PUPPET_VERSION="~> 2.6.0" 9 | - PUPPET_VERSION="~> 2.7.0" 10 | - PUPPET_VERSION="~> 3.0.0" 11 | - PUPPET_VERSION="~> 3.1.0" 12 | matrix: 13 | exclude: 14 | - rvm: 1.9.3 15 | env: PUPPET_VERSION="~> 2.6.0" 16 | gemfile: .gemfile 17 | 18 | gemfile: .gemfile 19 | notifications: 20 | email: 21 | - al@lab42.it 22 | -------------------------------------------------------------------------------- /github.com/example42/puppet-tinc/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (C) 2013 Alessandro Franceschi / Lab42 2 | 3 | for the relevant commits Copyright (C) by the respective authors. 4 | 5 | Contact Lab42 at: info@lab42.it 6 | 7 | Licensed under the Apache License, Version 2.0 (the "License"); 8 | you may not use this file except in compliance with the License. 9 | You may obtain a copy of the License at 10 | 11 | http://www.apache.org/licenses/LICENSE-2.0 12 | 13 | Unless required by applicable law or agreed to in writing, software 14 | distributed under the License is distributed on an "AS IS" BASIS, 15 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | See the License for the specific language governing permissions and 17 | limitations under the License. 18 | -------------------------------------------------------------------------------- /github.com/example42/puppet-tinc/Modulefile: -------------------------------------------------------------------------------- 1 | name 'example42-tinc' 2 | version '2.0.11' 3 | 4 | author 'Alessandro Franceschi' 5 | license 'Apache2' 6 | project_page 'http://www.example42.com' 7 | source 'https://github.com/example42/puppet-tinc' 8 | summary 'Puppet module for tinc' 9 | description 'This module installs and manages tinc. Check README.rdoc for details. Puppi is required for some common functions: you can install them without using the whole module. Monitor and firewall dependencies are needed only if the relevant features are enabled' 10 | dependency 'example42/puppi', '>=2.0.0' 11 | -------------------------------------------------------------------------------- /github.com/example42/puppet-tinc/Rakefile: -------------------------------------------------------------------------------- 1 | require 'rubygems' 2 | require 'puppetlabs_spec_helper/rake_tasks' 3 | require 'puppet-lint' 4 | PuppetLint.configuration.send("disable_80chars") 5 | PuppetLint.configuration.send('disable_class_parameter_defaults') 6 | -------------------------------------------------------------------------------- /github.com/example42/puppet-tinc/manifests/spec.pp: -------------------------------------------------------------------------------- 1 | # Class: tinc::spec 2 | # 3 | # This class is used only for rpsec-puppet tests 4 | # Can be taken as an example on how to do custom classes but should not 5 | # be modified. 6 | # 7 | # == Usage 8 | # 9 | # This class is not intended to be used directly. 10 | # Use it as reference 11 | # 12 | class tinc::spec inherits tinc { 13 | 14 | # This just a test to override the arguments of an existing resource 15 | # Note that you can achieve this same result with just: 16 | # class { "tinc": template => "tinc/spec.erb" } 17 | 18 | File['tinc.conf'] { 19 | content => template('tinc/spec.erb'), 20 | } 21 | 22 | } 23 | -------------------------------------------------------------------------------- /github.com/example42/puppet-tinc/spec/spec_helper.rb: -------------------------------------------------------------------------------- 1 | require 'puppetlabs_spec_helper/module_spec_helper' 2 | -------------------------------------------------------------------------------- /github.com/example42/puppet-tinc/templates/host.conf.erb: -------------------------------------------------------------------------------- 1 | # File Managed by Puppet 2 | 3 | # The real IP address of this tinc host. Can be used by other tinc hosts. 4 | Address = <%= ipaddress %> 5 | 6 | # Portnumber for incoming connections. Default is 655. 7 | Port = <%= port %> 8 | 9 | # Subnet on the virtual private network that is local for this host. 10 | Subnet = <%= real_subnet %> 11 | 12 | # Cipher = cipher (blowfish) 13 | # ClampMSS = yes | no (yes) 14 | # Compression = level (0) 15 | # Digest = digest (sha1) 16 | # IndirectData = yes | no (no) 17 | # MACLength = length (4) 18 | # PMTU = mtu (1514) 19 | # PMTUDiscovery = yes | no (yes) 20 | # Port = port (655) 21 | # PublicKeyFile = filename [obsolete] 22 | # Subnet = address[/prefixlength[#weight]] 23 | # TCPOnly = yes | no (no [obsolete]) 24 | 25 | # The public key generated by `tincd -n example -K' is stored here 26 | -----BEGIN RSA PUBLIC KEY----- 27 | ... 28 | -----END RSA PUBLIC KEY----- 29 | -------------------------------------------------------------------------------- /github.com/example42/puppet-tinc/templates/spec.erb: -------------------------------------------------------------------------------- 1 | # This is a template used only for rspec tests 2 | 3 | # Yaml of the whole scope 4 | <%= scope.to_hash.reject { |k,v| !( k.is_a?(String) && v.is_a?(String) ) }.to_yaml %> 5 | 6 | # Custom Options 7 | <%= options['opt_a'] %> 8 | <%= options['opt_b'] %> 9 | -------------------------------------------------------------------------------- /github.com/example42/puppet-tinc/templates/tinc-up.erb: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # File Managed by Puppet 3 | 4 | # Bridge Mode 5 | ifconfig $INTERFACE 0.0.0.0 6 | brctl addif bridge $INTERFACE 7 | ifconfig $INTERFACE up 8 | 9 | -------------------------------------------------------------------------------- /github.com/gsliepen/tinc/.gitignore: -------------------------------------------------------------------------------- 1 | Makefile 2 | Makefile.in 3 | *.o 4 | *.a 5 | /config.* 6 | /src/tincd 7 | /autom4te.cache 8 | /aclocal.m4 9 | /compile 10 | /configure 11 | /depcomp 12 | /install-sh 13 | /missing 14 | INSTALL 15 | .deps 16 | stamp-h1 17 | /src/device.c 18 | -------------------------------------------------------------------------------- /github.com/gsliepen/tinc/AUTHORS: -------------------------------------------------------------------------------- 1 | Main tinc authors: 2 | - Guus Sliepen 3 | - Ivo Timmermans (inactive) 4 | 5 | Significant contributions from: 6 | - Michael Tokarev 7 | - Florian Forster 8 | - Grzegorz Dymarek 9 | - Max Rijevski 10 | - Scott Lamb 11 | - Julien Muchembled 12 | - Timothy Redaelli 13 | - Brandon Black 14 | - Loïc Grenié 15 | 16 | These files are from other sources: 17 | * lib/pidfile.h and lib/pidfile.c are by Martin Schulze, taken from 18 | the syslog 1.3 sources. 19 | 20 | * src/bsd/tunemu.c and tunemu.h are by Friedrich Schöller 21 | 22 | 23 | Also some of the macro files in the directory m4, and their 24 | accompanying files in lib, were taken from GNU fileutils. 25 | 26 | Please see the file THANKS for more information on contributions from 27 | users. 28 | -------------------------------------------------------------------------------- /github.com/gsliepen/tinc/COPYING.README: -------------------------------------------------------------------------------- 1 | The following applies to tinc: 2 | 3 | This program is released under the GPL with the additional exemption that 4 | compiling, linking, and/or using OpenSSL is allowed. You may provide binary 5 | packages linked to the OpenSSL libraries, provided that all other requirements 6 | of the GPL are met. 7 | 8 | The following applies to the LZO library: 9 | 10 | Hereby I grant a special exception to the tinc VPN project 11 | (http://tinc.nl.linux.org/) to link the LZO library with the OpenSSL library 12 | (http://www.openssl.org). 13 | 14 | Markus F.X.J. Oberhumer 15 | 16 | When tinc is compiled with the --enable-tunemu option, the resulting binary 17 | falls under the GPL version 3 or later. 18 | 19 | 20 | -------------------------------------------------------------------------------- /github.com/gsliepen/tinc/Makefile.am: -------------------------------------------------------------------------------- 1 | ## Process this file with automake to get Makefile.in 2 | 3 | AUTOMAKE_OPTIONS = gnu 4 | 5 | SUBDIRS = m4 src doc 6 | 7 | ACLOCAL_AMFLAGS = -I m4 8 | 9 | EXTRA_DIST = COPYING.README README.android 10 | 11 | ChangeLog: 12 | git log > ChangeLog 13 | -------------------------------------------------------------------------------- /github.com/gsliepen/tinc/README.android: -------------------------------------------------------------------------------- 1 | Quick how-o cross compile tinc for android (done from $HOME/android/): 2 | 3 | - Download android NDK and setup local ARM toolchain: 4 | wget http://dl.google.com/android/ndk/android-ndk-r8b-linux-x86.tar.bz2 5 | tar xfj android-ndk-r8b-linux-x86.tar.bz2 6 | ./android-ndk-r8b/build/tools/make-standalone-toolchain.sh --platform=android-5 --install-dir=/tmp/my-android-toolchain 7 | 8 | - Download and cross-compile openSSL for ARM: 9 | wget http://www.openssl.org/source/openssl-1.0.1c.tar.gz 10 | tar xfz openssl-1.0.1c.tar.gz 11 | cd openssl-1.0.1c 12 | ./Configure dist 13 | make CC=/tmp/my-android-toolchain/bin/arm-linux-androideabi-gcc AR="/tmp/my-android-toolchain/bin/arm-linux-androideabi-ar r" RANLIB=/tmp/my-android-toolchain/bin/arm-linux-androideabi-ranlib 14 | 15 | - Clone and cross-compile tinc: 16 | git clone git://tinc-vpn.org/tinc 17 | cd tinc 18 | autoreconf -fsi 19 | CC=/tmp/my-android-toolchain/bin/arm-linux-androideabi-gcc ./configure --host=arm-linux --disable-lzo --with-openssl-lib=$HOME/android/openssl-1.0.1c --with-openssl-include=$HOME/android/openssl-1.0.1c/include/ 20 | make -j5 21 | -------------------------------------------------------------------------------- /github.com/gsliepen/tinc/README.git: -------------------------------------------------------------------------------- 1 | Before you can start compiling tinc from a fresh git clone, you have 2 | to install the very latest versions of the following packages: 3 | 4 | - OpenSSL 5 | - zlib 6 | - lzo 7 | - GCC 8 | - automake 9 | - autoconf 10 | - gettext 11 | 12 | Then you have to let the autotools create all the autogenerated files, using 13 | this command: 14 | 15 | autoreconf -fsi 16 | 17 | If you change configure.in or any Makefile.am file, you will have to rerun 18 | autoreconf. After this, you can run configure and make as usual. To create a 19 | tarball suitable for release, run: 20 | 21 | make dist 22 | 23 | To clean up your working copy so that no autogenerated files remain, run: 24 | 25 | git clean -f 26 | -------------------------------------------------------------------------------- /github.com/gsliepen/tinc/doc/sample-config/hosts/alpha: -------------------------------------------------------------------------------- 1 | # Sample host configuration file 2 | 3 | # The real IP address of this tinc host. Can be used by other tinc hosts. 4 | Address = 123.234.35.67 5 | 6 | # Portnumber for incoming connections. Default is 655. 7 | Port = 655 8 | 9 | # Subnet on the virtual private network that is local for this host. 10 | Subnet = 192.168.1.0/24 11 | 12 | # The public key generated by `tincd -n example -K' is stored here 13 | -----BEGIN RSA PUBLIC KEY----- 14 | ... 15 | -----END RSA PUBLIC KEY----- 16 | -------------------------------------------------------------------------------- /github.com/gsliepen/tinc/doc/sample-config/hosts/beta: -------------------------------------------------------------------------------- 1 | # Sample host configuration file 2 | # This file was generated by host beta. 3 | 4 | # The real IP address of this tinc host. Can be used by other tinc hosts. 5 | Address = 123.45.67.189 6 | 7 | # Portnumber for incoming connections. Default is 655. 8 | Port = 6500 9 | 10 | # Subnet on the virtual private network that is local for this host. 11 | Subnet = 192.168.2.0/24 12 | 13 | # The public key generated by `tincd -n example -K' is stored here 14 | -----BEGIN RSA PUBLIC KEY----- 15 | ... 16 | -----END RSA PUBLIC KEY----- 17 | -------------------------------------------------------------------------------- /github.com/gsliepen/tinc/doc/sample-config/rsa_key.priv: -------------------------------------------------------------------------------- 1 | # Generate this file with `tincd -n example -K` 2 | -------------------------------------------------------------------------------- /github.com/gsliepen/tinc/doc/sample-config/tinc-down: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # This file closes down the tap device. 3 | 4 | ifconfig $INTERFACE down 5 | -------------------------------------------------------------------------------- /github.com/gsliepen/tinc/doc/sample-config/tinc-up: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # This file sets up the tap device. 3 | # It gives you the freedom to do anything you want with it. 4 | # Use the correct name for the tap device: 5 | # The environment variable $INTERFACE is set to the right name 6 | # on most platforms, but if it doesn't work try to set it manually. 7 | 8 | # Give it the right ip and netmask. Remember, the subnet of the 9 | # tap device must be larger than that of the individual Subnets 10 | # as defined in the host configuration file! 11 | ifconfig $INTERFACE 192.168.1.1 netmask 255.255.0.0 12 | -------------------------------------------------------------------------------- /github.com/gsliepen/tinc/doc/sample-config/tinc.conf: -------------------------------------------------------------------------------- 1 | # Sample tinc configuration file 2 | 3 | # This is a comment. 4 | # Spaces and tabs are eliminated. 5 | # The = sign isn't strictly necessary any longer, though you may want 6 | # to leave it in as it improves readability :) 7 | # Variable names are treated case insensitive. 8 | 9 | # The name of this tinc host. Required. 10 | Name = alpha 11 | 12 | # The internet host to connect with. 13 | # Comment these out to make yourself a listen-only connection 14 | # You must use the name of another tinc host. 15 | # May be used multiple times for redundance. 16 | ConnectTo = beta 17 | 18 | # The tap device tinc will use. 19 | # Default is /dev/tap0 for ethertap or FreeBSD, 20 | # /dev/tun0 for Solaris and OpenBSD, 21 | # and /dev/net/tun for Linux tun/tap device. 22 | Device = /dev/net/tun 23 | -------------------------------------------------------------------------------- /github.com/gsliepen/tinc/doc/tincinclude.texi.in: -------------------------------------------------------------------------------- 1 | @set VERSION @VERSION@ 2 | @set PACKAGE @PACKAGE@ 3 | @set sysconfdir @sysconfdir@ 4 | @set localstatedir @localstatedir@ 5 | -------------------------------------------------------------------------------- /github.com/gsliepen/tinc/m4/Makefile.am: -------------------------------------------------------------------------------- 1 | ## Process this file with automake to produce Makefile.in -*-Makefile-*- 2 | 3 | EXTRA_DIST = README *.m4 4 | 5 | -------------------------------------------------------------------------------- /github.com/gsliepen/tinc/m4/README: -------------------------------------------------------------------------------- 1 | These files are used by a program called aclocal (part of the GNU automake 2 | package). aclocal uses these files to create aclocal.m4 which is in turn 3 | used by autoconf to create the configure script at the the top level in 4 | this distribution. 5 | 6 | The Makefile.am file in this directory is automatically generated 7 | from the template file, Makefile.am.in. The generation will fail 8 | if you don't have all the right tools. 9 | -------------------------------------------------------------------------------- /github.com/gsliepen/tinc/m4/attribute.m4: -------------------------------------------------------------------------------- 1 | dnl Check to find out whether function attributes are supported. 2 | dnl If they are not, #define them to be nothing. 3 | 4 | AC_DEFUN([tinc_ATTRIBUTE], 5 | [ 6 | AC_CACHE_CHECK([for working $1 attribute], tinc_cv_attribute_$1, 7 | [ 8 | tempcflags="$CFLAGS" 9 | CFLAGS="$CFLAGS -Wall -Werror" 10 | AC_COMPILE_IFELSE( 11 | [AC_LANG_SOURCE( 12 | [void test(void) __attribute__ (($1)); 13 | void test(void) { return; } 14 | ], 15 | )], 16 | [tinc_cv_attribute_$1=yes], 17 | [tinc_cv_attribute_$1=no] 18 | ) 19 | CFLAGS="$tempcflags" 20 | ]) 21 | 22 | if test ${tinc_cv_attribute_$1} = no; then 23 | AC_DEFINE([$1], [], [Defined if the $1 attribute is not supported.]) 24 | fi 25 | ]) 26 | -------------------------------------------------------------------------------- /github.com/gsliepen/tinc/src/fake-gai-errnos.h: -------------------------------------------------------------------------------- 1 | /* 2 | * fake library for ssh 3 | * 4 | * This file is included in getaddrinfo.c and getnameinfo.c. 5 | * See getaddrinfo.c and getnameinfo.c. 6 | */ 7 | 8 | /* for old netdb.h */ 9 | #ifndef EAI_NODATA 10 | #define EAI_NODATA 1 11 | #endif 12 | 13 | #ifndef EAI_MEMORY 14 | #define EAI_MEMORY 2 15 | #endif 16 | 17 | #ifndef EAI_FAMILY 18 | #define EAI_FAMILY 3 19 | #endif 20 | -------------------------------------------------------------------------------- /github.com/gsliepen/tinc/src/fake-getnameinfo.h: -------------------------------------------------------------------------------- 1 | #ifndef _FAKE_GETNAMEINFO_H 2 | #define _FAKE_GETNAMEINFO_H 3 | 4 | #if !HAVE_DECL_GETNAMEINFO 5 | int getnameinfo(const struct sockaddr *sa, size_t salen, char *host, 6 | size_t hostlen, char *serv, size_t servlen, int flags); 7 | #endif /* !HAVE_GETNAMEINFO */ 8 | 9 | #ifndef NI_MAXSERV 10 | # define NI_MAXSERV 32 11 | #endif /* !NI_MAXSERV */ 12 | #ifndef NI_MAXHOST 13 | # define NI_MAXHOST 1025 14 | #endif /* !NI_MAXHOST */ 15 | 16 | #endif /* _FAKE_GETNAMEINFO_H */ 17 | -------------------------------------------------------------------------------- /github.com/gsliepen/tinc/src/graph.h: -------------------------------------------------------------------------------- 1 | /* 2 | graph.h -- header for graph.c 3 | Copyright (C) 2001-2012 Guus Sliepen , 4 | 2001-2005 Ivo Timmermans 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 along 17 | with this program; if not, write to the Free Software Foundation, Inc., 18 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 19 | */ 20 | 21 | #ifndef __TINC_GRAPH_H__ 22 | #define __TINC_GRAPH_H__ 23 | 24 | extern void graph(void); 25 | extern void dump_graph(void); 26 | 27 | #endif /* __TINC_GRAPH_H__ */ 28 | -------------------------------------------------------------------------------- /github.com/gsliepen/tinc/src/xalloc.h: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #ifndef PARAMS 4 | # if defined PROTOTYPES || (defined __STDC__ && __STDC__) 5 | # define PARAMS(Args) Args 6 | # else 7 | # define PARAMS(Args) () 8 | # endif 9 | #endif 10 | 11 | /* Exit value when the requested amount of memory is not available. 12 | The caller may set it to some other value. */ 13 | extern int xalloc_exit_failure; 14 | 15 | /* FIXME: describe */ 16 | extern char *const xalloc_msg_memory_exhausted; 17 | 18 | /* FIXME: describe */ 19 | extern void (*xalloc_fail_func) (int); 20 | 21 | void *xmalloc PARAMS ((size_t n)) __attribute__ ((__malloc__)); 22 | void *xmalloc_and_zero PARAMS ((size_t n)) __attribute__ ((__malloc__)); 23 | void *xcalloc PARAMS ((size_t n, size_t s)); 24 | void *xrealloc PARAMS ((void *p, size_t n)) __attribute__ ((__malloc__)); 25 | 26 | char *xstrdup PARAMS ((const char *s)) __attribute__ ((__malloc__)); 27 | 28 | extern int xasprintf(char **strp, const char *fmt, ...); 29 | extern int xvasprintf(char **strp, const char *fmt, va_list ap); 30 | -------------------------------------------------------------------------------- /github.com/makefu/shack-retiolum/README: -------------------------------------------------------------------------------- 1 | This directory contains the build and install scripts for shack-retiolum 2 | 3 | 1. build_arch 4 | arch linux build script 5 | 2. build_debian 6 | debian build script 7 | 3. build_ec2 8 | Amazon ec2 base instance build script 9 | 4. install.sh 10 | configures the tinc daemon 11 | $1 is the nickname 12 | $2 is the ip-address 13 | hosts.tar contains the currently available hosts 14 | -------------------------------------------------------------------------------- /github.com/makefu/shack-retiolum/build_arch.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | sudo pacman -S openssl gcc lzo 4 | curl http://www.tinc-vpn.org/packages/tinc-1.0.13.tar.gz | tar xz 5 | cd tinc-1.0.13 6 | ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var 7 | make 8 | sudo make install 9 | cd .. 10 | 11 | echo "overwriting python to python2" 12 | sed 's/\/usr\/bin\/python/\/usr\/bin\/python2/g' install.sh >install2.sh 13 | mv install2.sh install.sh 14 | 15 | -------------------------------------------------------------------------------- /github.com/makefu/shack-retiolum/build_debian.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -x 3 | MYIP=10.0.7.7.55 4 | 5 | apt-get install tinc git curl python 6 | 7 | git clone https://github.com/makefu/shack-retiolum.git 8 | 9 | cd shack-retiolum 10 | 11 | ./install.sh `hostname` $MYIP 12 | 13 | rm shack-retiolum 14 | # for autostart 15 | echo "retiolum" >> /etc/tinc/nets.boot 16 | echo "EXTRA=\"\"" >> /etc/default/tinc 17 | -------------------------------------------------------------------------------- /github.com/makefu/shack-retiolum/build_debian_clean.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -xe 3 | MYIP=10.0.7.7.55 4 | 5 | apt-get install tinc git curl gcc gcc-dev build-essential libssl-dev python 6 | 7 | git clone https://github.com/makefu/shack-retiolum.git 8 | 9 | mkdir build 10 | cd build 11 | curl http://www.oberhumer.com/opensource/lzo/download/lzo-2.04.tar.gz | tar 12 | xz 13 | cd lzo-2.04 14 | ./configure --prefix=/usr 15 | make 16 | sudo make install 17 | cd .. 18 | curl http://www.tinc-vpn.org/packages/tinc-1.0.13.tar.gz | tar xz 19 | cd tinc-1.0.13 20 | ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var 21 | make 22 | sudo make install 23 | cd ../.. 24 | 25 | cd shack-retiolum 26 | ./install.sh `hostname` $MYIP 27 | 28 | rm shack-retiolum 29 | # for autostart 30 | echo "retiolum" >> /etc/tinc/nets.boot 31 | echo "EXTRA=\"--user=tincd --chroot\"" >> /etc/default/tinc 32 | -------------------------------------------------------------------------------- /github.com/makefu/shack-retiolum/build_ec2.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | sudo yum install -y gcc openssl-devel 4 | mkdir build 5 | cd build 6 | curl http://www.oberhumer.com/opensource/lzo/download/lzo-2.04.tar.gz | tar xz 7 | cd lzo-2.04 8 | ./configure --prefix=/usr 9 | make 10 | sudo make install 11 | cd .. 12 | curl http://www.tinc-vpn.org/packages/tinc-1.0.13.tar.gz | tar xz 13 | cd tinc-1.0.13 14 | ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var 15 | make 16 | sudo make install 17 | -------------------------------------------------------------------------------- /github.com/makefu/shack-retiolum/build_no.de.sh: -------------------------------------------------------------------------------- 1 | pkgin in lzo gcc-tools gcc-compiler gcc34 2 | -------------------------------------------------------------------------------- /github.com/makefu/shack-retiolum/hosts/ITART: -------------------------------------------------------------------------------- 1 | Subnet = 10.7.7.22 2 | -----BEGIN RSA PUBLIC KEY----- 3 | MIGJAoGBANihbPlgirJ63MpMX283M+SjW6JgEhXmt1zcRuOyunbUq6Yt+w4sVtN8 4 | n2dZ960cTnAXkM1mvMhIcI5p6ZwfdorThJV2+F9eb+84x3GiDLTZ2eL0UefxOSLG 5 | OILFFu5t4Y82MCreyHV4GZDrb2Sz0L1t6r8DmyU91MjXkYBLq5g/AgMBAAE= 6 | -----END RSA PUBLIC KEY----- 7 | -------------------------------------------------------------------------------- /github.com/makefu/shack-retiolum/hosts/Lassulus: -------------------------------------------------------------------------------- 1 | Subnet = 10.7.7.11 2 | -----BEGIN RSA PUBLIC KEY----- 3 | MIIBCgKCAQEAsj1PCibKOfF68gmFQ+wwyfhUWpqKqpznrJX1dZ+daae7l7nBHvsE 4 | H0QwkiMmk3aZy1beq3quM6gX13aT+/wMfWnLyuvT11T5C9JEf/IS91STpM2BRN+R 5 | +P/DhbuDcW4UsdEe6uwQDGEJbXRN5ZA7GI0bmcYcwHJ9SQmW5v7P9Z3oZ+09hMD+ 6 | 1cZ3HkPN7weSdMLMPpUpmzCsI92cXGW0xRC4iBEt1ZeBwjkLCRsBFBGcUMuKWwVa 7 | 9sovca0q3DUar+kikEKVrVy26rZUlGuBLobMetDGioSawWkRSxVlfZvTHjAK5JzU 8 | O6y6hj0yQ1sp6W2JjU8ntDHf63aM71dB9QIDAQAB 9 | -----END RSA PUBLIC KEY----- 10 | -------------------------------------------------------------------------------- /github.com/makefu/shack-retiolum/hosts/UTART: -------------------------------------------------------------------------------- 1 | Subnet = 10.7.7.66 2 | -----BEGIN RSA PUBLIC KEY----- 3 | MIIBCgKCAQEA1tFgR6xxNZavtG44QEAEzKQixJqO9MuO5hUcklH87Sml+Mz+Ptz/ 4 | r8Vhmvc1NhL0d8h1VJSrzjAyYuBR0LKSGRYxHby/M9AqBjUHUhDM83ogV/CbSifs 5 | TlBcKuvPkGVALN6LYcPXjzKzBI7X1ictqts9K3CoCWgjRld63noczvNnwVdHNawX 6 | ckQdjzxMAgwtJW0hWfDr1Uhq3sVEFnHLzFJuLsnc6gDzKvP/ETQ6KINv43B9UerS 7 | HzFK3ntViohW4K/p6i4gBNxFfYnuNLqnY+O/hc0/fFdKE36eLD8ngPURo3/As6Le 8 | KlPEMBwIIJQpS7GP4BIUK/qPE9J7McU6wQIDAQAB 9 | -----END RSA PUBLIC KEY----- 10 | -------------------------------------------------------------------------------- /github.com/makefu/shack-retiolum/hosts/alphalabs: -------------------------------------------------------------------------------- 1 | Subnet = 10.7.7.10 2 | -----BEGIN RSA PUBLIC KEY----- 3 | MIIBCgKCAQEAvUAbMmmOFn+4kOvJAvmi0R/XCQa1YBlkjUvC6Pmt0Q8gV1DodXjB 4 | DgwP8yhLcxaVy2Hk82aJvNTUrfMeB2sdt1RJHQiEPQkHthdp8Spm0Px4uTiMjmFB 5 | ev91xi00eCCGIKsXdh/qso1K7EDHt9MEVHOvSlkawWzoyJ6AaHStW1ElwDdGjZpl 6 | 0YWrhx4Gk5X7pCp3LKkQJFfGtqoqGOVg2JjqK3qMsAdRo6QvYDqjFzARed/D0k55 7 | kcKXjBJAVxoU/CqGfS/Lr0fL8tdYgXaAXvPO9dbr1t0KyOUY2KRNBePeSvRp/etb 8 | H0LBPsO9F7PQiPI3DBoWCYgsuj/hBXapvwIDAQAB 9 | -----END RSA PUBLIC KEY----- 10 | -------------------------------------------------------------------------------- /github.com/makefu/shack-retiolum/hosts/also: -------------------------------------------------------------------------------- 1 | Subnet = 10.7.7.23 2 | -----BEGIN RSA PUBLIC KEY----- 3 | MIIBCgKCAQEAsnF1eyd/R4qXMGo8UEZ98hnJK+6ZEKUubgdzEwAuSxK40B6nX8Ry 4 | Euy3v3s0ps/GMdE52gUbFB+bhM99hHiKW+7zcxnoMJ69a9yK6VG0Im+7ib0WTliZ 5 | llgUfRETQd/2KaIfJWH/nVsBuK0hp1LscroWcoO08BCw6v94q3He8502Bk/ZYZQF 6 | wD7Y6LldipWKo/K9YtIU3zD3taj2NGnetOc0BRRncSgGiicXJKhtfcs+Ti2Y/ITz 7 | bFkHnFgB0KnhjwJBumxdmgjHWknlwVkROvmzIgyoXxqEw31bF+g/XzA7RTMXsiFM 8 | w0SZ15k4HG5L1PWpUyY2Th5yIjMW+sSrhQIDAQAB 9 | -----END RSA PUBLIC KEY----- 10 | -------------------------------------------------------------------------------- /github.com/makefu/shack-retiolum/hosts/foobaz: -------------------------------------------------------------------------------- 1 | -----BEGIN RSA PUBLIC KEY----- 2 | MIIBCgKCAQEA4wJHcyS3PI2rugPbhQy5qLKQwtaOIsLV367b9Pq6VLKEly2dWAZx 3 | xvFmdKRbm/n/HaRzX+vyDuhWOxkzrF0NLNrrU58Rw5suHfNU2ryuO1QB2sIGMj1R 4 | QXwB+W6MNM5OamBkLLo740aPvVjfud9tc3yrUg6mTCJP1tbRLgHyDy6DT3s5WGvO 5 | R6bfYRjdzVLjwqqn5P/ED51gBgDmJEhoWzQ4IzBSO+mxRrkvwfPQNiTSrrQBAiU7 6 | r5lstDzEY8qDdwY6t1w91hxm34LLJ/gQr9uvXGF/GThm4J8Ndlj4tOl8UmFbo3Nz 7 | 6Zm0b2JZ4dWbA/NXp7Sf9qKC5duQkAPb1QIDAQAB 8 | -----END RSA PUBLIC KEY----- 9 | -------------------------------------------------------------------------------- /github.com/makefu/shack-retiolum/hosts/kaah: -------------------------------------------------------------------------------- 1 | Address = kaah.ath.cx 2 | Subnet = 10.7.7.21 3 | 4 | -----BEGIN RSA PUBLIC KEY----- 5 | MIIBCgKCAQEAtd9+R7NYs/5LmXoFakuoFzdO/8hy4MMeGjdDqbubKyJmIO/nvQWS 6 | TQns55znLgPIapUtCijxphoQrcTB5LijVXFj/2uipqiOJHVmhA80NiQgYhrFG++x 7 | 9AQie2c04xqq+6Bptjs8vnQS6odLsBAiY1OJDpaEPZqzrpSMnYzEwPWqOAzzbVRd 8 | SFDokIhm62xmDK0+M4H8l3zmMnInnxdHd0fMhBJr5lXXqdzXJ3zluU6fZyHysF4c 9 | OnvFrGNrc3MPpgmzULVUUVg+Z4NeQYa5LuhXA9xia0R5d8ALCi34L4tAvCfSi1Lu 10 | RSUiJHeWDvNzwIy9+hxofqqcJqA05kyGLQIDAQAB 11 | -----END RSA PUBLIC KEY----- 12 | -------------------------------------------------------------------------------- /github.com/makefu/shack-retiolum/hosts/krebs: -------------------------------------------------------------------------------- 1 | Subnet = 10.7.7.156 2 | -----BEGIN RSA PUBLIC KEY----- 3 | MIIBCgKCAQEAl6vUmUL8w8r2gUTpUF8QWx0U3nzDPao2I7l0WU1NnGcR8DVug7YN 4 | 595guvDkRGcM4eYGizgVYVvDCmjTQRXRn57ucVud2bGE1NGtdomVs6wggpgzLiaf 5 | m9BJwsigoCyMv+8ewGfc+D10TupulcIiZSp/RAewYlX0rhmgdsEGnCt+TWvXRsIa 6 | kY1pvt4YeKjs2ctib3OmaPuNokK4ophxSpdZ5arjHCaiVMj2O6pPAQbU7WFY63Fw 7 | UP64cAmtqBM+uMteT7bdG1jT3KZS6W7Dy8rIBd+pp+vB656A5PhrDcGEUMFSXqPD 8 | BwIxhV7OAejSn4XjrZyd5eNtMOQKopIMQwIDAQAB 9 | -----END RSA PUBLIC KEY----- 10 | 11 | -------------------------------------------------------------------------------- /github.com/makefu/shack-retiolum/hosts/miefda901: -------------------------------------------------------------------------------- 1 | Subnet = 10.7.7.22 2 | -----BEGIN RSA PUBLIC KEY----- 3 | MIIBCgKCAQEApbEYmHf0vEDYa/2aVvWVxEGgC+JJlXcArdxkQooSIpnZfSAfsH0S 4 | MFz8v7UkM7EJSwDsFWf+gxyoAORdFpdQm+XQoDqWVZ1e0isYtNluP2C/51s3lu2F 5 | kVLZ+86el7zd4unHG+6CHmyaBcO5yV6VU8WFeuinB2+ojnujOWlHgOipMOrxsab8 6 | vwcH/0k/iR9BjH9xzo+kwhzqG0plLkQnvsvVyDN/gQj0Euz6YHfgo5c2gxQKKH7h 7 | Bv6prIxCbpY7WMMtg0z+OlyGkQefVRl18kZwoNtOFlh5NBe7imYcH+wyhhQ9rqnN 8 | VoHpJw4lNOuWfy3Af28kYDQ7KnPGYFq4nwIDAQAB 9 | -----END RSA PUBLIC KEY----- 10 | -------------------------------------------------------------------------------- /github.com/makefu/shack-retiolum/hosts/miefdahome: -------------------------------------------------------------------------------- 1 | Subnet = 10.7.7.30 2 | -----BEGIN RSA PUBLIC KEY----- 3 | MIIBCgKCAQEAopwKn000XAcoI61OqQ7cjgrPHm/jHmuB1LHeCUggWMOD78WDFNzq 4 | 8/l9ASlU9kbSZFhoMuBR5BPWgciYWsC1EqY1nRAc/Si1rUHnJw+Xcyl0MNsZ7Cef 5 | WaFRvC1VNC3qlQp5/e+fi46oOp4i+BqlFSxe7Jrr0EVyBVTOw8rMGToqDsOih6M9 6 | SFvmVMOnqh7n8LEOUtAL4nID59k7CTXzoNhXc0cEJoBkC2YCexonb4ru/J8F2BRG 7 | Y3yzHYVskBrrPie1JNhfUHGCABIbtODTiHQYH8NFTYzdBnVV88IWqiTBbmKcRf+j 8 | zEyGyXu/3YLFfjmsi7ysT+BWLIPvkyr7/wIDAQAB 9 | -----END RSA PUBLIC KEY----- 10 | -------------------------------------------------------------------------------- /github.com/makefu/shack-retiolum/hosts/miefdat: -------------------------------------------------------------------------------- 1 | Subnet = 10.7.7.20 2 | 3 | -----BEGIN RSA PUBLIC KEY----- 4 | MIIBCgKCAQEAvCestFRcrr10nzSzc1l4Flkv6ZG5ijGneZBeDaP+bB3GhFx0BYzP 5 | CQjcCFTcExVVAorknjX1/rjT60+dSBuJoH/pEeloPowtwm6YVgfhcQD/5qRHmAPF 6 | Ss1pdiTVtyi0BmcqDGoOTcR/tR4v2LBEDnxK89wWIFWbeDeR6UyjD2psbFBal8Zd 7 | TmkuBTg1OGPVhB+BmuKSqPBt6AtLV+0fKHdrTOVNwF2W/8lCVTd3uCVtnUEeTLrW 8 | KA8h9C0K2gAxxhJTF3pJtR/YQPpgwXRg3CfzMKsvHNOsqfMnnk/WFM0vrSJSi2El 9 | xCD5Pm/BPZyA8B4vhz8im4hWofOP2/JiNwIDAQAB 10 | -----END RSA PUBLIC KEY----- 11 | -------------------------------------------------------------------------------- /github.com/makefu/shack-retiolum/hosts/no_omo: -------------------------------------------------------------------------------- 1 | Subnet = 10.7.7.111 2 | -----BEGIN RSA PUBLIC KEY----- 3 | MIIBCgKCAQEAuHQEeowvxRkoHJUw6cUp431pnoIy4MVv7kTLgWEK46nzgZtld9LM 4 | ZdNMJB9CuOVVMHEaiY6Q5YchUmapGxwEObc0y+8zQxTPw3I4q0GkSJqKLPrsTpkn 5 | sgEkHPfs2GVdtIBXDn9I8i5JsY2+U8QF8fbIQSOO08/Vpa3nknDAMege9yEa3NFm 6 | s/+x+2pS+xV6uzf/H21XNv0oufInXwZH1NCNXAy5I2V6pz7BmAHilVOGCT7g2zn6 7 | GasmofiYEnro4V5s8gDlQkb7bCZEIA9EgX/HP6fZJQezSUHcDCQFI0vg26xywbr6 8 | 5+9tTn8fN2mWS5+Pdmx3haX1qFcBP5HglwIDAQAB 9 | -----END RSA PUBLIC KEY----- 10 | -------------------------------------------------------------------------------- /github.com/makefu/shack-retiolum/hosts/pa_sharepoint: -------------------------------------------------------------------------------- 1 | Address = pa-sharepoint.informatik.ba-stuttgart.de 2 | Subnet = 10.7.7.5 3 | -----BEGIN RSA PUBLIC KEY----- 4 | MIGJAoGBAKSle+5vi8j+auGIC41PwFRPdzuyhP/paAEht+9mWpTYYC1meyPDwQR8 5 | EPNLwj1ccjsAvhubfaDmI3B13cBQx5q1BbTCK81Y5RS1tj384kvAabJAtKsz3aIg 6 | 1hWXjiDJUGNpQhKsD7IIg4lkkDcgOBAbdtXlynCQXdQL+YjLTavBAgMBAAE= 7 | -----END RSA PUBLIC KEY----- 8 | -------------------------------------------------------------------------------- /github.com/makefu/shack-retiolum/hosts/pfleidi: -------------------------------------------------------------------------------- 1 | Subnet = 10.7.7.177 2 | -----BEGIN RSA PUBLIC KEY----- 3 | MIIBCgKCAQEAwdoS19bbKmVncJcf+uT5nNpyuR8SL9ekd+XMoKBpoqDf0r7ap3F2 4 | HLNI82NSbSAA4zdASrfrDl75sJ05VIIsueNAwMkFc72YNA9CPBFGcvCNVi0d4XcC 5 | t6voNrgCVaxT77MVBAnohT7+HfYmkTTSrLaDKusRx7ybz6ZaRO9i2peC2VWKVIjP 6 | m3QlvPeTpIJg/nGEBNO3rotBPxpMEB+fJnWxfBHRlt9klK3VhLaXCLUt5KcJ2SA4 7 | q3BFQbptUfI+d6OSA9btJerdtZ3PVBqlIJ45b3RDUWMborVg6jQ7S4WBzARe1eKs 8 | SHHk0aR5LoiSGiNVGTDlxLVe1UT1dF8voQIDAQAB 9 | -----END RSA PUBLIC KEY----- 10 | -------------------------------------------------------------------------------- /github.com/makefu/shack-retiolum/hosts/pornocauster: -------------------------------------------------------------------------------- 1 | Subnet = 10.7.7.42 2 | -----BEGIN RSA PUBLIC KEY----- 3 | MIIBCgKCAQEAnztrijsfao+fmNtwAjqwIDKsRaMP3ECsq2T2zqKvxwCyXk69G9bG 4 | RFhWjgaawS9ZhnHSlgWK/vtoR0O9NxpzdU/mvdQijbVGxM02DegjO9qDSIe8EGmA 5 | kscW4nDqYtw4rtjOVPfnNiWXbcWD8eiYR0kcSWmSvfOpVvdhTETqduTx5HRHyEFD 6 | JRQYR/tJSvVWXmM670PENAPNJFJ4VSJR60s5A+bFT7J/uw7HzJXX28LygJz73Dj2 7 | 2a4ev0WcZQngLq072h/91R/TOpg+ogUDVhXkQtKyFj7im0287JTL4bXGofZBhzaf 8 | +h9dFGs1QLoNyhG/cgt9fog7boSXTelAiQIDAQAB 9 | -----END RSA PUBLIC KEY----- 10 | -------------------------------------------------------------------------------- /github.com/makefu/shack-retiolum/hosts/supernode: -------------------------------------------------------------------------------- 1 | Address = 46.252.21.5 2 | Subnet = 10.7.7.1 3 | -----BEGIN RSA PUBLIC KEY----- 4 | MIIBCgKCAQEAr3DlBmQxP9UTBCkohK8FCYSk2td4Ov5lQYvC3Adx04lEWHfp+0nP 5 | sShYqqN9Aj3iCqj/DHx5jGuSqjyTmmFWIOMM9IwKMo2Oiz/PcBM56N6gzIHuR5wj 6 | +0bV0NRhePD2Tqo3zsEly9Hxw7xmz8azm5l4GcyOtgdRV7R1T3j/jB/9Kv2sj2Y7 7 | 1zhSedCxjt/+NosiZZGE2JhLjzMgsCZSroAIKCZ3X/DP81mTTRxibjol82/Qn61I 8 | b7GbuuB7SwjtZ+9xjsExN1JX5+AFuw9a3AkYuKWLpP50YY16/OTPq7flmB/EtK+Z 9 | rrESIYKtX7pJbLc8Ywi0hBL5oPm07q+0BQIDAQAB 10 | -----END RSA PUBLIC KEY----- 11 | -------------------------------------------------------------------------------- /github.com/makefu/shack-retiolum/hosts/tart: -------------------------------------------------------------------------------- 1 | Subnet = 10.7.7.123 2 | -----BEGIN RSA PUBLIC KEY----- 3 | MIGJAoGBALvZ4rLz0soCzkyOraC1aKtJzfVqYd2je6rkuaV12CLybCUc6YXaW/HP 4 | rzJyDGmdh355kU4FNNyjnWP/U/juhMaeYFyTUWCRVXdqvDdeiEe/EJ0g+fFGKvPY 5 | DEFo3VMCEkrXKuwDBQP02b4xmAWWnVBityGv5tgDFjl9uXh/SzL1AgMBAAE= 6 | -----END RSA PUBLIC KEY----- 7 | -------------------------------------------------------------------------------- /github.com/makefu/shack-retiolum/hosts/ytart: -------------------------------------------------------------------------------- 1 | Subnet = 10.7.7.201 2 | -----BEGIN RSA PUBLIC KEY----- 3 | MIIBCgKCAQEA2yCCN8nAPmZNL75Jr+FtfP5jmyuqg7IpgfW03L3s8Gg7NB1eTQAg 4 | UFPh13cj4lZleZOl3Yus7yx4HxMO8tYCptqnRPyP+UXrxvL+kECS4J3rLzjH/eOM 5 | 0oAxuEe+DOa5R9Vj2bRtTouePlEvXDpgZZcDnedutRUYFGLNvkoWxu0RGqfQaJmd 6 | 7KtOk1NJn9efNqwpl6ejPj5A+ivh2T1vAMWherM60JTjjhNGiSP4so0WG8PlBPYc 7 | GKnmMSQl0u5n10uTvLoVvnSfLj/QvL3d8abTrFV2lRqaCTJy+lxgkS1A5AnsTP1G 8 | OBbm/Gk9hRuYy2iP6FQ65q64/JfoeoqpPwIDAQAB 9 | -----END RSA PUBLIC KEY----- 10 | -------------------------------------------------------------------------------- /github.com/mhameed/tincconfig/nets.boot: -------------------------------------------------------------------------------- 1 | ## This file contains all names of the networks to be started on system startup. 2 | vpn 3 | -------------------------------------------------------------------------------- /github.com/mhameed/tincconfig/vpn/.gitignore: -------------------------------------------------------------------------------- 1 | rsa_key.priv 2 | tinc.conf 3 | -------------------------------------------------------------------------------- /github.com/mhameed/tincconfig/vpn/hosts/arnvda: -------------------------------------------------------------------------------- 1 | subnet = 10.1.1.6 2 | tcponly = yes 3 | 4 | -----BEGIN RSA PUBLIC KEY----- 5 | MIIBCgKCAQEA0xuz2eZipO/6WwnFQ+m8KV538yJve5+hrdeu+5TY2Gz3UHCQIDjy 6 | 3VgwlJ2pgkRchDBeDMmJsV/dZNmg5zVkpr34CD5HquL3utLEEdET9zkMPHhxQXP6 7 | 5TQmN8ea0v1mIe/6/PA0rvDXH2dQkj7kz3C/vntrofgglbJxxONRX5DAa7XcxBXo 8 | 9ub3lqD595pzCsa6h+X8X2aJNkp9xISyZo4wrb1fr14qF+OUocso4oy7Pk0iY2yg 9 | USd/xopcOVGDrcaPQIt/v7XxVYDMysT+B6ByJYipcGLbL4G9FyrkmWg1vXvyGZOh 10 | OeI85VkAVRVoqRR/esnUX5vuyil/u27zTQIDAQAB 11 | -----END RSA PUBLIC KEY----- 12 | -------------------------------------------------------------------------------- /github.com/mhameed/tincconfig/vpn/hosts/droid: -------------------------------------------------------------------------------- 1 | subnet = 10.1.1.30 2 | tcponly = yes 3 | 4 | -----BEGIN RSA PUBLIC KEY----- 5 | MIIBCgKCAQEA06m9fWzZz1e+70QU/4rkh7i7Y2LmvHZnsXHqI6BYKZw56Hd0ROR2 6 | ESMxE32wtDStR3//N0JT02g32oNkTPpPytnRqSI8kXOiwqkh+tMBq6I0AbZiBLj8 7 | AwDA7Vmpv99wyOK9acBxMoKRfm9dOr6ko+XXkWGsR8T405JqJ7Ux0E7YQYkkp0K3 8 | ln7pYx9Sh4DOe7bXKfUNxpBWEbGEcezuY+/VAaQoImUUxfEF5xlykdT1KMcS3jSu 9 | MZd8NMVWaB9gJeFNHq6+q0B6km7j/kXdwm/RZ2OaHNH15WCUTv6FQrkseRXnz3pe 10 | E4JYJba38z789U9Eacb+JSOgK0OYDKISwwIDAQAB 11 | -----END RSA PUBLIC KEY----- 12 | -------------------------------------------------------------------------------- /github.com/mhameed/tincconfig/vpn/hosts/europa: -------------------------------------------------------------------------------- 1 | subnet = 10.1.1.20 2 | -----BEGIN RSA PUBLIC KEY----- 3 | MIIBCgKCAQEAtWGzKto+OU6d8c0pkrYO8avqWcWfCf3fRyQ0x+RA3rGwaaIkyBCb 4 | XkFZqlh6R2RHZsRSrtYwpfPvCMXIp6+Z05++h9InjxO7f8JqtFyhFnBQxzJ89fIH 5 | tVdmh3J7Z/YjN6drIRL9TiCKZ4kDK1Uq1TX4OtZwvX8qRwHOkL3aWZc8Vi4NpQlA 6 | pjvOOiyNFpUSKAdn5BtMQRwcLCMTw9jKVp+v1sL3XZLGKfnqoXMe+/UOW9Bqsf3Y 7 | j5ET48GURwopmAr/S6OMFr6Qjnak34QgS2Vu1dD4UM6AN2an9OSkyxLiXkv8JBbG 8 | MGFbLIv+S6LzAOHjn81R0Baf6nIKvfc46QIDAQAB 9 | -----END RSA PUBLIC KEY----- 10 | -------------------------------------------------------------------------------- /github.com/mhameed/tincconfig/vpn/hosts/fog: -------------------------------------------------------------------------------- 1 | Address = 138.38.108.179 2 | port = 59200 3 | Subnet = 10.1.1.5 4 | TCPOnly = yes 5 | 6 | -----BEGIN RSA PUBLIC KEY----- 7 | MIIBCgKCAQEAuYm6zDcTiSGsipzg3TEipGcfCwiRadAkK3GBk2Z3jE+Aww+2G9KN 8 | 8CF4pMryp9BuaWvWNoekEs9j2RbBttFwpdZRT77kuMj50dzreyI9BZ3c7rdtwK6e 9 | m2VGgv8QnLywg0Yd81cJNIAQw8t3Adz40Ie5sINgMSJAMLQCc6HF23xrpYWn7eCJ 10 | iX598GCsFPkBPNSms7t1Fr0wXMKIymDBLCr+XT1hXymH+fjqTvMIPCtIhUKmcL1p 11 | 1WSGXXmIR7SdIanSBeJhT0x0frG0GvTYTUDpTlfLF+64qvmK2xOUifUGjFabRyFl 12 | 2jgWLLMGy8htaKEUl0TuPEWiShICVqdyRQIDAQAB 13 | -----END RSA PUBLIC KEY----- 14 | -------------------------------------------------------------------------------- /github.com/mhameed/tincconfig/vpn/hosts/io: -------------------------------------------------------------------------------- 1 | subnet = 10.1.1.111 2 | 3 | -----BEGIN RSA PUBLIC KEY----- 4 | MIIBCgKCAQEAq1fH8+6R592L1JC7sUjVw+1ZwGVEXqtW9ax6CKn5GXpYJxfmKQ6W 5 | XRWgOw/Y1+OBvlFoBA8zQDUZPA8X88MhTMH6tGTwF+wUt8VPPmLp9QASyvVWXNiH 6 | KPRyrmyeVIjf9NGJElijR3uGP4pczWF/Dmo++oHz0UrTUTLHVzNw5tNVpJUspxrL 7 | R02M3/b1dT3iEu8/bgjN8bLYtgAV12Ny258PsWSydWxOizxDKhmgW4/D5pG7uFyL 8 | GcAHaP9y4zigbDF91+/1gl8N7tVa5pnrJrDiL6dx1lpxNU8O16tmSI4PItv6s3X0 9 | EJ2Aei1s0ip/uvLjS4/cj+BChINcWN9KFQIDAQAB 10 | -----END RSA PUBLIC KEY----- 11 | -------------------------------------------------------------------------------- /github.com/mhameed/tincconfig/vpn/hosts/jupiter: -------------------------------------------------------------------------------- 1 | address = 10.0.0.5 2 | Subnet = 10.1.1.3 3 | 4 | TCPOnly = yes 5 | 6 | 7 | -----BEGIN RSA PUBLIC KEY----- 8 | MIIBCgKCAQEA8sn5GVqkpLlihT8kvgSmEDwDkvJnE/AO6ysQKe7u7AdntCaEWDl1 9 | L8zQlVjx0QAJRuTx6IufXcBvGQj8+IsYNvOnOstPbKyVCtluE+CNV1gaMfQPbLM5 10 | DDOCxRq30zrd1ad8MRyqqbntbwOxyHRVF/2AT8dnMJSZz9Z1i+dacmIojoU05vJn 11 | H0DkgAHQI+5aYf/ALeYGiUCgrTPPtHCeESxu5qgIg2TvYK3lrA6Zi3XJbGHy6AMM 12 | zkbyhAcw9onIIvUD8150noPeiwgcr78ZoCGiJXhzdwo6Zha47k0w4pkAQR4TV74e 13 | 5F7IzTrgzthcDYNt46MaRbAX8TqqXsJx1wIDAQAB 14 | -----END RSA PUBLIC KEY----- 15 | -------------------------------------------------------------------------------- /github.com/mhameed/tincconfig/vpn/hosts/mars: -------------------------------------------------------------------------------- 1 | subnet = 10.1.1.9 2 | TCPOnly = yes 3 | -----BEGIN RSA PUBLIC KEY----- 4 | MIIBCgKCAQEAxwdB8pG00DuasAfvVwFs9ocirVn7/mx1K0X6b4eu1o0zv/mBB+Ch 5 | 4KrZw4cjcazcYqNJTY5I/LDVd0lMjMDneyvCkhPBXOqAyFutO1MDo0Bn9Wyl1ssr 6 | BoOACGOU1Z05egbo8lo6M8dEfQlgjOfSpH0gzxOqFnOClqYSmV3YiWw94cpvquzV 7 | s8Yzt1lMVR5e4L+qEEy6bZO990xg/iozs/mCiYSqdEgS24BusHhVl7QDSY7IYXo1 8 | ZD7AZtBKy9I1nPjmjA0c/l/PwPK4z10AYau8Sc0KMazk6Z5jIoz7E7l7+xwwjnVG 9 | 2hp06UqEam+SClFiKUrPRfNJr+rXAtQ0QwIDAQAB 10 | -----END RSA PUBLIC KEY----- 11 | -------------------------------------------------------------------------------- /github.com/mhameed/tincconfig/vpn/hosts/mist: -------------------------------------------------------------------------------- 1 | subnet = 10.1.1.13 2 | tcponly = yes 3 | 4 | -----BEGIN RSA PUBLIC KEY----- 5 | MIIBCgKCAQEA8G8aq+N/FvB9GAO77X5ZiwwExOndIN9LQJ+xGe4lCbzJLcQ5F+Xl 6 | uEZeX/rKnV4B/TSdzf9h+1L9F68eVd8m0W4P+IwSNzxUPQ/6zDh7lQz/Z5lq+MlW 7 | T959y2mrLTX8RgglghVC7dwkwLx7ZkhKd93b6dvL5ZT3tMByoL21KAVwfYq3UUFc 8 | Q64BvgjpQvwO+5xI9Rq9G9+VaKgTGoHlhcTC45caGQFnE/4tv/d3e9bld9R7cNlr 9 | CqtP6IGIgdIot6gqsnslrBeyDl6S9jq7J0eR2eYCPHAkM5darDQGMCb/OUwVvWbS 10 | I3gBmBxU0hdsnCUPKXxLJ0n6/Ur3Y/dfxQIDAQAB 11 | -----END RSA PUBLIC KEY----- 12 | -------------------------------------------------------------------------------- /github.com/mhameed/tincconfig/vpn/hosts/moon: -------------------------------------------------------------------------------- 1 | subnet = 10.1.1.12 2 | TCPOnly = yes 3 | -----BEGIN RSA PUBLIC KEY----- 4 | MIIBCgKCAQEAsoQpZI4U0D4XFE+7ntj8kUAjNnFoXXsDjU4npR38DnggrcFmXAZK 5 | HBPBaSSYA8mH94/Z0rwLCIjd3bbP/YgrFxpLAxda6oAj/+WNZa3Pt5h3aVjGc91X 6 | SmQsM5xmYRuIYKoDsQkRClw/8QvlHvREZI9nvOksXh14U3wTWM0V7krARBsQ8iaf 7 | h0dKcyxfF/IX3+kQ+3Se2x29AZ+5QtFRTU1j0UncN/EVaOl2deGlgehU4f3h0zKL 8 | VDKVAFbulJ69c9K8s+wc3ax2Q5vRJjumGD8Zjt/W2tddekrZ/hd6wJmuH64HK1+z 9 | 7q1Il2Ec8YiAjCltaA/mbWiLxzVTfx2BTwIDAQAB 10 | -----END RSA PUBLIC KEY----- 11 | -------------------------------------------------------------------------------- /github.com/mhameed/tincconfig/vpn/hosts/neptune: -------------------------------------------------------------------------------- 1 | subnet = 10.1.1.7 2 | -----BEGIN RSA PUBLIC KEY----- 3 | MIIBCgKCAQEAuxgOk1KM4jMlBGyW4tSv19+13iNJ8DBwp0hPJ4u8ff1+wJrGt/NS 4 | zVzPqmMXcvgXh38uIemdupAZ4Tj/9SRvUpOFQhiA6buPhsnpQgo1D/vhP/v+Fppx 5 | DxFTGj327g6akufV3mQMF8mYsNbMFqywd5ZZpZMmxkMDTGppaEDswFcWuxHGfpoa 6 | Z1tBrV8VwCYBJMbXu6BOFnt8C8PEebNxZMvEK8KBUYQcrf5VigBSrjn9c6xJrWSB 7 | IwhxuZiqtycbJmh+PsIp1UPDcFE10iQQzNH9lQttI3P4T1c8dj+ORqI/PV5GFzH/ 8 | a47v5rOC7fEeghEailMUTciTFIu2SamDKQIDAQAB 9 | -----END RSA PUBLIC KEY----- 10 | -------------------------------------------------------------------------------- /github.com/mhameed/tincconfig/vpn/hosts/pluto: -------------------------------------------------------------------------------- 1 | Subnet = 10.1.1.10 2 | -----BEGIN RSA PUBLIC KEY----- 3 | MIIBCgKCAQEAp704mqibOHS7XhGBsinvz7oBv0R+a8U9nnqETtPbytm4mcknF8/y 4 | C+DCotGYymodo74x0TW20ISZOquHYtQ/Jm2bhsj1HDaIyDk2/XlVRVVvqDqrTYUP 5 | Ww0tFCx06ABpQgQOYs1V937Lo9942M7YD7+um4MlMlxmQOsI+P/Efy0Qbo+6KupV 6 | FJEfvfBFRda+cK4dMrqjI+pHrXJzKI+LkgvMLaNEJQJ6WJ5GAKjzX2qTCOCqPj/J 7 | 3a9dy18x3ANAcWZwayNHEsxMxHUs7R1HdmxfQ3CxKemw2GTp5ztsqBHdFSL1aKwC 8 | CTveiVuWWbHnCMzhECZDb1ZsTDnoGA8tDQIDAQAB 9 | -----END RSA PUBLIC KEY----- 10 | -------------------------------------------------------------------------------- /github.com/mhameed/tincconfig/vpn/hosts/saturn: -------------------------------------------------------------------------------- 1 | subnet = 10.1.1.4 2 | TCPOnly = yes 3 | -----BEGIN RSA PUBLIC KEY----- 4 | MIIBCgKCAQEAtyTkdJ3CwRxsA3GUutDvNZL5mf6mI4CbzJePMZlaYrDBdM7l3P6L 5 | SljrwYbm+fB1RQheDcxJZmI7gkhGhQHw+3m1rWgMv/1vH+160hLLrHq0cMuGdcH4 6 | 7ZDz7XrhKtjVMWsI8OnSad7Grl9xb3Y+kECfUl2ed/4mDqqWseIij955rUao8YyH 7 | DIrNlUrA9RXzvYmjgP9CJ9Arot6dOE8XOHsG5Mn/YgNr5qpPrgpqoLcPCMrtX0oY 8 | FdX1PpO2s8ziarDzLqAY6we7WVsJUn4TRcPrc9yjxYBt91CBnQY+nr0XCfJ4ALWK 9 | GbOiQt3tmov8bgmxVf+9lflql3vbnuNIcwIDAQAB 10 | -----END RSA PUBLIC KEY----- 11 | -------------------------------------------------------------------------------- /github.com/mhameed/tincconfig/vpn/hosts/venus: -------------------------------------------------------------------------------- 1 | subnet = 10.1.1.11 2 | -----BEGIN RSA PUBLIC KEY----- 3 | MIIBCgKCAQEApS72j0SBmLoLsr8mYAuYanV99ZzJ8Oe1BbYiIiivjxw8JOfekTLC 4 | 21+xwA+Fw1tH9jAJGcFgH865YLXc9m8UjAfxqMgrhrZGZH9KLswRULz8OszFP4XJ 5 | cOoAm2zdtRgz9yo/PrRNS4RyD+G1ffFteRsijwENF9s0DIeBERCSuVYmjhBAJgqi 6 | vooo3+vGWVDdQOPqunEg/XbOktPx+bIx9o7m0KnYRwsKUFhRTGKYZY6k9sEbcA+A 7 | mOMQW6KMSnOfP00n9OKt2k3FgR4N8EELjQpzDyoXmJ0k6YLHQczhxixNR8vByIoG 8 | 1q7q2zLzAtfa3GoV3d0cIV8J+VcLDX02ZwIDAQAB 9 | -----END RSA PUBLIC KEY----- 10 | -------------------------------------------------------------------------------- /github.com/mhameed/tincconfig/vpn/tinc-down: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # This file closes down the tap device. 3 | 4 | ifconfig $INTERFACE down 5 | -------------------------------------------------------------------------------- /github.com/mhameed/tincconfig/vpn/tinc-up: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | modprobe tun 3 | tincpath=/etc/tinc/vpn 4 | hname=`grep -iP "^name" ${tincpath}/tinc.conf | sed 's/.*=\s*//'` 5 | addr=`grep -iP "subnet" ${tincpath}/hosts/$hname | sed 's/.*=\s*//'` 6 | ifconfig $INTERFACE $addr netmask 255.255.255.0 7 | 8 | -------------------------------------------------------------------------------- /github.com/ryd/chaosvpn/.gitignore: -------------------------------------------------------------------------------- 1 | *~ 2 | *.o 3 | chaosvpn 4 | lex.yy.c 5 | y.tab.c 6 | y.tab.h 7 | undef.config 8 | undef 9 | foobar* 10 | up.sh 11 | .cproject 12 | .project 13 | CHANGES 14 | build-stamp 15 | .#* 16 | test_addrmask 17 | -------------------------------------------------------------------------------- /github.com/ryd/chaosvpn/BSDmakefile: -------------------------------------------------------------------------------- 1 | 2 | all: 3 | gmake all 4 | 5 | clean: 6 | gmake clean 7 | 8 | bsdinstall: 9 | gmake DESTDIR=$(DESTDIR) bsdinstall 10 | 11 | install: bsdinstall 12 | -------------------------------------------------------------------------------- /github.com/ryd/chaosvpn/Documentation/CodeStyle.txt: -------------------------------------------------------------------------------- 1 | @# Code Style ## 2 | 3 | I don't wanna enforce any code style, so please see this 4 | document more as a guideline to make the style of this 5 | code more unique and on this way more easy to read. This 6 | make write here more easy, cause a lot of people working 7 | on this project. 8 | 9 | ### Braces ### 10 | 11 | static char * 12 | my_function(char* param1, char* param2) 13 | { 14 | ... 15 | } 16 | 17 | if (condition) { 18 | ... 19 | } else { 20 | ... 21 | } 22 | 23 | So, for function, the braces goes to the next line, everywhere 24 | else, put it to the same line. 25 | 26 | ### Spaces/Taps ### 27 | 28 | Not clear at this point - let's fine a solution. 29 | 30 | -------------------------------------------------------------------------------- /github.com/ryd/chaosvpn/Documentation/Maintainer.txt: -------------------------------------------------------------------------------- 1 | Sven-Haegar Koch 2 | Jens Muecke 3 | Hans-Christian Esperer 4 | cinus 5 | Bandicoot 6 | Sven Moritz Hallberg 7 | Dennis Schreiber 8 | elmar 9 | 10 | -------------------------------------------------------------------------------- /github.com/ryd/chaosvpn/INSTALL.Windows: -------------------------------------------------------------------------------- 1 | Building ChaosVPN for Windows 2 | ============================= 3 | 4 | First, follow all the instructions building tinc for Windows: 5 | 6 | http://tinc-vpn.org/examples/cross-compiling-windows-binary/ 7 | 8 | Then, get the ChaosVPN sources, and run: 9 | 10 | make CC=i686-w64-mingw32-gcc INCLUDES=-I$HOME/mingw/usr/local/include LIBDIRS=-L$HOME/mingw/usr/local/lib 11 | 12 | Installing on Windows 13 | ===================== 14 | 15 | This part is not done yet. You need to edit chaosvpn.conf and change the 16 | directories where you installed chaosvpn and tincd.exe. 17 | -------------------------------------------------------------------------------- /github.com/ryd/chaosvpn/NEWS: -------------------------------------------------------------------------------- 1 | Please check debian/changelog for a short overview of changes. 2 | 3 | Look at the git log for complete infos. 4 | -------------------------------------------------------------------------------- /github.com/ryd/chaosvpn/README: -------------------------------------------------------------------------------- 1 | This repository contains the config generator for the ChaosVPN. For 2 | information on how to join the ChaosVPN, read INSTALL. 3 | 4 | It is intended to be small enough for embedded routing devices 5 | which runs OpenWRT as well as standard x86 hardware. 6 | 7 | First services which will be available over the ChaosVPN are 8 | the warzone project, the ChaosPhone and the CCC xmpp server. 9 | 10 | More information about the ChaosVPN is available at: 11 | https://wiki.hamburg.ccc.de/ChaosVPN 12 | 13 | You can report bugs on github: 14 | https://github.com/ryd/chaosvpn/issues 15 | -------------------------------------------------------------------------------- /github.com/ryd/chaosvpn/contrib/graph/README: -------------------------------------------------------------------------------- 1 | Requires "graphviz" package. 2 | 3 | This script will create a graph with limited view. The connections from 4 | primary servers are visible as well as the connections on the local machine. 5 | 6 | You need to enable the $tincd_graphdumpfile variable in chaosvpn.conf. 7 | -------------------------------------------------------------------------------- /github.com/ryd/chaosvpn/contrib/graph/crontab: -------------------------------------------------------------------------------- 1 | # Start the script every 5 minutes 2 | */5 * * * * root /usr/local/sbin/chaosvpn.graph 3 | -------------------------------------------------------------------------------- /github.com/ryd/chaosvpn/debian/.gitignore: -------------------------------------------------------------------------------- 1 | files 2 | chaosvpn.debhelper.log 3 | chaosvpn.postinst.debhelper 4 | chaosvpn.postrm.debhelper 5 | chaosvpn.prerm.debhelper 6 | chaosvpn.substvars 7 | -------------------------------------------------------------------------------- /github.com/ryd/chaosvpn/debian/build-all.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # Build chaosvpn.deb for all my chroot environments 4 | # 5 | 6 | set -e 7 | 8 | git checkout debian/changelog 9 | version="$( dpkg-parsechangelog --format dpkg | perl -ne '/^Version:\s+(.*)$/ && print "$1";' )" 10 | [ -z "$version" ] && exit 1 11 | 12 | git checkout debian/changelog 13 | debchange --noquery --preserve --force-bad-version --newversion "${version}~sdinetG1" "Compiled $version for Debian Sid/Unstable" 14 | derebuild sid 15 | 16 | git checkout debian/changelog 17 | debchange --noquery --preserve --force-bad-version --newversion "${version}~sdinetF1" "Compiled $version for Debian Wheezy" 18 | derebuild wheezy 19 | 20 | git checkout debian/changelog 21 | debchange --noquery --preserve --force-bad-version --newversion "${version}~sdinetE1" "Compiled $version for Debian Squeeze" 22 | derebuild squeeze 23 | 24 | git checkout debian/changelog 25 | debchange --noquery --preserve --force-bad-version --newversion "${version}~sdinetD1" "Compiled $version for Debian Lenny" 26 | derebuild lenny 27 | 28 | git checkout debian/changelog 29 | exit 0 30 | -------------------------------------------------------------------------------- /github.com/ryd/chaosvpn/debian/compat: -------------------------------------------------------------------------------- 1 | 7 2 | -------------------------------------------------------------------------------- /github.com/ryd/chaosvpn/debian/control: -------------------------------------------------------------------------------- 1 | Source: chaosvpn 2 | Section: net 3 | Priority: extra 4 | Maintainer: ChaosVPN Mailinglist 5 | Uploaders: Sven-Haegar Koch 6 | Build-Depends: debhelper (>= 7.0.15~), bison, flex, libssl-dev (>= 0.9.8), zlib1g-dev 7 | Standards-Version: 3.9.3 8 | Homepage: http://github.com/ryd/chaosvpn 9 | 10 | Package: chaosvpn 11 | Architecture: any 12 | Depends: tinc (>= 1.0.13~), ${shlibs:Depends}, ${misc:Depends}, perl-base (>= 5.8.0), bash (>= 2), iproute 13 | Description: Config generator to setup connection to ChaosVPN 14 | ChaosVPN is a tinc based VPN intended to connect Chaos and Hackerspaces, 15 | and their active members. 16 | . 17 | This software downloads the central node configuration, verifies it, 18 | creates tinc configs based on it and takes care of (re)starting tincd. 19 | . 20 | It replaces the "old" ChaosVPN from 2006. 21 | Homepage: http://wiki.hamburg.ccc.de/ChaosVPN 22 | -------------------------------------------------------------------------------- /github.com/ryd/chaosvpn/debian/default: -------------------------------------------------------------------------------- 1 | # Defaults for chaosvpn initscript 2 | # sourced by /etc/init.d/chaosvpn 3 | # installed at /etc/default/chaosvpn by the maintainer scripts 4 | 5 | # 6 | # This is a POSIX shell fragment 7 | # 8 | 9 | # which networks to startup, each one needs its own config file 10 | # put them in /etc/tinc and specify their names here seperated by whitespaces 11 | # 12 | # The defaults are: 13 | # chaosvpn.conf - to participate on chaosvpn connecting hackerspaces 14 | # warzone.conf - to participate on warzone/CTF/experiments network 15 | # 16 | CONFIGS="chaosvpn.conf" 17 | 18 | # should we start automatically at boot? 19 | RUN="no" 20 | -------------------------------------------------------------------------------- /github.com/ryd/chaosvpn/debian/dirs: -------------------------------------------------------------------------------- 1 | /etc/tinc 2 | /usr/sbin 3 | /usr/share/man/man1 4 | /usr/share/man/man5 5 | -------------------------------------------------------------------------------- /github.com/ryd/chaosvpn/debian/docs: -------------------------------------------------------------------------------- 1 | README 2 | -------------------------------------------------------------------------------- /github.com/ryd/chaosvpn/debian/lintian-overrides: -------------------------------------------------------------------------------- 1 | postrm-contains-additional-updaterc.d-calls /etc/init.d/remove 2 | changelog-should-mention-nmu 3 | latest-debian-changelog-entry-without-new-version 4 | debian-revision-should-not-be-zero 5 | -------------------------------------------------------------------------------- /github.com/ryd/chaosvpn/debian/manpages: -------------------------------------------------------------------------------- 1 | man/chaosvpn.1 2 | man/chaosvpn.conf.5 3 | -------------------------------------------------------------------------------- /github.com/ryd/chaosvpn/debian/ppp.ip-up: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # refretch chaosvpn config from backend and restart its tinc daemon 3 | 4 | if [ -x /etc/init.d/chaosvpn ] ; then 5 | /usr/sbin/invoke-rc.d chaosvpn reload 6 | fi 7 | 8 | exit 0 9 | -------------------------------------------------------------------------------- /github.com/ryd/chaosvpn/debian/preinst: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # preinst script for chaosvpn 3 | # 4 | # see: dh_installdeb(1) 5 | 6 | set -e 7 | 8 | # summary of how this script can be called: 9 | # * `install' 10 | # * `install' 11 | # * `upgrade' 12 | # * `abort-upgrade' 13 | # for details, see http://www.debian.org/doc/debian-policy/ or 14 | # the debian-policy package 15 | 16 | 17 | case "$1" in 18 | install|upgrade) 19 | ;; 20 | 21 | abort-upgrade) 22 | ;; 23 | 24 | *) 25 | echo "preinst called with unknown argument \`$1'" >&2 26 | exit 1 27 | ;; 28 | esac 29 | 30 | if dpkg-maintscript-helper supports rm_conffile 2>/dev/null; then 31 | dpkg-maintscript-helper rm_conffile /etc/cron.d/chaosvpn 2.06-0 -- "$@" 32 | elif [ -e /etc/cron.d/chaosvpn ] ; then 33 | mv /etc/cron.d/chaosvpn /etc/cron.d/chaosvpn.dpkg-old || true 34 | fi 35 | 36 | # dh_installdeb will replace this with shell code automatically 37 | # generated by other debhelper scripts. 38 | 39 | #DEBHELPER# 40 | 41 | exit 0 42 | -------------------------------------------------------------------------------- /github.com/ryd/chaosvpn/debian/source.lintian-overrides: -------------------------------------------------------------------------------- 1 | dh-make-template-in-source 2 | maintainer-upload-has-incorrect-version-number 3 | diff-contains-git-control-dir .git 4 | native-package-with-dash-version 5 | latest-debian-changelog-entry-without-new-version 6 | debian-revision-should-not-be-zero 7 | -------------------------------------------------------------------------------- /github.com/ryd/chaosvpn/debian/source/format: -------------------------------------------------------------------------------- 1 | 1.0 2 | -------------------------------------------------------------------------------- /github.com/ryd/chaosvpn/httplib/Makefile: -------------------------------------------------------------------------------- 1 | CC=gcc 2 | INCLUDES=-I/usr/local/include 3 | LIBDIRS=-L/usr/local/lib 4 | CFLAGS=-std=c99 -D_POSIX_C_SOURCE=2 -D_BSD_SOURCE -D_FILE_OFFSET_BITS=64 -O0 -Wall -g 5 | LIB= 6 | 7 | STRINGSRC=../string/string_clear.c ../string/string_concatb.c ../string/string_concat_sprintf.c ../string/string_putc.c ../string/string_putint.c ../string/string_concat.c ../string/string_free.c ../string/string_get.c ../string/string_init.c ../string/string_equals.c ../string/string_move.c ../string/string_initfromstringz.c ../string/string_lazyinit.c 8 | SRC = http_get.c http_parseurl.c $(STRINGSRC) 9 | STRINGOBJ=$(patsubst %.c,%.o,$(STRINGSRC)) 10 | OBJ=$(patsubst %.c,%.o,$(SRC)) 11 | 12 | NAME = test_httplib 13 | 14 | $(NAME): test.o $(OBJ) 15 | $(CC) -o $@ test.o $(OBJ) $(LIB) $(LIBDIRS) 16 | 17 | %.o: %.c 18 | $(CC) $(CFLAGS) -o $(patsubst %.c,%.o,$<) -c $< 19 | 20 | clean: 21 | rm -f *.o $(NAME) 22 | 23 | -------------------------------------------------------------------------------- /github.com/ryd/chaosvpn/httplib/httplib.h: -------------------------------------------------------------------------------- 1 | #ifndef __HTTPLIB_H 2 | #define __HTTPLIB_H 3 | 4 | #include 5 | #include "../string/string.h" 6 | 7 | static const int HTTP_EOK = 0; 8 | static const int HTTP_EINVURL = 5; 9 | static const int HTTP_ENOMEM = 2; 10 | static const int HTTP_ENETERR = 3; 11 | static const int HTTP_ESRVERR = 4; 12 | 13 | extern int http_parseurl(struct string*, struct string*, int*, struct string*); 14 | int http_get(struct string*, struct string*, time_t, struct string*, int*, struct string*); 15 | 16 | #endif 17 | -------------------------------------------------------------------------------- /github.com/ryd/chaosvpn/httplib/test.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | #include "../string/string.h" 5 | #include "httplib.h" 6 | 7 | static void die(char*); 8 | 9 | int 10 | main(int argc, char** argv) 11 | { 12 | struct string buffer; 13 | struct string inp; 14 | struct string em; 15 | struct string ua; 16 | int res, ser; 17 | 18 | --argc; ++argv; 19 | 20 | if (!*argv) die("No URL spec'd"); 21 | puts(*argv); 22 | 23 | string_initfromstringz(&inp, *argv); 24 | string_initfromstringz(&ua, "testclient"); 25 | string_lazyinit(&buffer, 8192); 26 | string_lazyinit(&em, 512); 27 | printf("calling geturl: %d\n", res = http_get(&inp, &buffer, 123, &ua, &ser, &em)); 28 | if (res == 0) { 29 | if (ser == 200) { 30 | printf("Res: %s\n", buffer.s); 31 | } else { 32 | printf("Err: %d\n", ser); 33 | printf("Res: %s\n", buffer.s); 34 | } 35 | } 36 | 37 | } 38 | 39 | static void 40 | die(char* msg) 41 | { 42 | puts(msg); 43 | exit(1); 44 | } 45 | -------------------------------------------------------------------------------- /github.com/ryd/chaosvpn/nsis/Makefile: -------------------------------------------------------------------------------- 1 | all: installer 2 | 3 | chaosvpn.exe: ../chaosvpn 4 | cp ../chaosvpn chaosvpn.exe 5 | strip chaosvpn.exe 6 | 7 | LICENSE.txt: ../LICENCE 8 | cp ../LICENCE LICENSE.txt 9 | todos LICENSE.txt 10 | 11 | README.txt: ../README 12 | cp ../README README.txt 13 | todos README.txt 14 | 15 | chaosvpn.1.html: ../man/chaosvpn.1 16 | w3mman2html $< > $@ 17 | 18 | chaosvpn.conf.5.html: ../man/chaosvpn.conf.5 19 | w3mman2html $< > $@ 20 | 21 | installer: chaosvpn.nsi chaosvpn.exe chaosvpn.conf LICENSE.txt README.txt chaosvpn.1.html chaosvpn.conf.5.html 22 | makensis $< 23 | 24 | clean: 25 | rm -f *.txt *.exe *.html 26 | 27 | .PHONY: installer clean 28 | -------------------------------------------------------------------------------- /github.com/ryd/chaosvpn/nsis/chaosknoten1.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mindreframer/networking-stuff/890b041877465f31475d4692f23a973bcb8ccecc/github.com/ryd/chaosvpn/nsis/chaosknoten1.bmp -------------------------------------------------------------------------------- /github.com/ryd/chaosvpn/string/string_clear.c: -------------------------------------------------------------------------------- 1 | #include "string.h" 2 | 3 | void 4 | string_clear(struct string*s) 5 | { 6 | s->_u._s.length = 0; 7 | } 8 | -------------------------------------------------------------------------------- /github.com/ryd/chaosvpn/string/string_concat.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | #include "string.h" 5 | 6 | int 7 | string_concat(struct string* s, const char* sta) 8 | { 9 | if (string_concatb(s, sta, strlen(sta) + 1)) return 1; 10 | s->_u._s.length--; 11 | return 0; 12 | } 13 | -------------------------------------------------------------------------------- /github.com/ryd/chaosvpn/string/string_concatb.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | #include "string.h" 5 | 6 | int 7 | string_concatb(struct string* s, const char* sta, uintptr_t len) 8 | { 9 | uintptr_t growby; 10 | char* buf; 11 | 12 | if (len > (s->_u._s.size - s->_u._s.length)) { 13 | growby = s->_u._s.growby; 14 | while ((s->_u._s.size + growby - s->_u._s.length) < len) { 15 | growby += s->_u._s.growby; 16 | if ((s->_u._s.size + growby) < s->_u._s.size) return 1; 17 | } 18 | buf = realloc(s->s, s->_u._s.size + growby); 19 | memset(buf+s->_u._s.size, 0, growby); 20 | if (!buf) return 1; 21 | s->_u._s.size += growby; 22 | s->s = buf; 23 | } 24 | memcpy(s->s + s->_u._s.length, sta, len); 25 | s->_u._s.length += len; 26 | return 0; 27 | } 28 | -------------------------------------------------------------------------------- /github.com/ryd/chaosvpn/string/string_equals.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | #include "string.h" 5 | 6 | /** 7 | * checks if two strings are equal. 8 | * @returns 0 if the two strings are equal, otherwise nonzero 9 | */ 10 | int 11 | string_equals(struct string* s1, struct string* s2) 12 | { 13 | uintptr_t i; 14 | 15 | if (s1 == s2) return 0; 16 | if (s1->s == s2->s) return 0; 17 | if (s1->_u._s.length != s2->_u._s.length) return 1; 18 | 19 | for (i = 0; i < s1->_u._s.length; i++) if (s1->s[i] != s2->s[i]) return 1; 20 | return 0; 21 | } 22 | -------------------------------------------------------------------------------- /github.com/ryd/chaosvpn/string/string_free.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #include "string.h" 4 | 5 | void 6 | string_free(struct string* s) 7 | { 8 | if (s->s) { 9 | free(s->s); 10 | s->s = NULL; 11 | s->_u._s.size = 0; 12 | s->_u._s.length = 0; 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /github.com/ryd/chaosvpn/string/string_get.c: -------------------------------------------------------------------------------- 1 | #include "string.h" 2 | 3 | char* 4 | string_get(struct string* s) 5 | { 6 | return s->s; 7 | } 8 | 9 | -------------------------------------------------------------------------------- /github.com/ryd/chaosvpn/string/string_init.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #include "string.h" 4 | 5 | int 6 | string_init(struct string* s, uintptr_t size, uintptr_t growby) 7 | { 8 | s->_u._s.length = 0; 9 | s->s = malloc(size); 10 | if (!s->s) { 11 | s->_u._s.size = 0; 12 | s->_u._s.growby = growby; 13 | } else { 14 | memset(s->s, 0, size); 15 | s->_u._s.size = size; 16 | s->_u._s.growby = growby; 17 | } 18 | return 0; 19 | } 20 | -------------------------------------------------------------------------------- /github.com/ryd/chaosvpn/string/string_initfromstringz.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #include "string.h" 4 | 5 | int 6 | string_initfromstringz(struct string* s, const char *is) 7 | { 8 | uintptr_t l; 9 | 10 | l = strlen(is); 11 | string_lazyinit(s, l); 12 | return string_concatb(s, is, l); 13 | } 14 | -------------------------------------------------------------------------------- /github.com/ryd/chaosvpn/string/string_lazyinit.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #include "string.h" 4 | 5 | void 6 | string_lazyinit(struct string* s, uintptr_t growby) 7 | { 8 | s->_u._s.length = 0; 9 | s->s = NULL; 10 | s->_u._s.size = 0; 11 | s->_u._s.growby = growby; 12 | } 13 | -------------------------------------------------------------------------------- /github.com/ryd/chaosvpn/string/string_move.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | #include "string.h" 5 | 6 | /** 7 | * Moves a string from one struct string to another. The old struct 8 | * will be cleared and can be reused. If it is not reused, there is 9 | * no need to free it. 10 | */ 11 | void 12 | string_move(struct string* s1, struct string* s2) 13 | { 14 | memcpy(s2, s1, sizeof(struct string)); 15 | s1->s = NULL; 16 | s1->_u._s.size = 0; 17 | s1->_u._s.length = 0; 18 | } 19 | -------------------------------------------------------------------------------- /github.com/ryd/chaosvpn/string/string_putc.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | #include "string.h" 5 | 6 | int 7 | string_putc(struct string* s, char c) 8 | { 9 | uintptr_t growby; 10 | char* buf; 11 | 12 | if (s->_u._s.size == s->_u._s.length) { 13 | growby = s->_u._s.growby; 14 | buf = realloc(s->s, s->_u._s.size + growby); 15 | if (!buf) return 1; 16 | memset(buf+s->_u._s.size, 0, growby); 17 | s->_u._s.size += growby; 18 | s->s = buf; 19 | } 20 | *(s->s + s->_u._s.length) = c; 21 | ++s->_u._s.length; 22 | return 0; 23 | } 24 | -------------------------------------------------------------------------------- /github.com/ryd/chaosvpn/string/string_putint.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | #include "string.h" 6 | 7 | #define MAXSTRINGLEN 32 8 | 9 | // ugly 10 | int string_putint(struct string* s, int i) 11 | { 12 | char buf[MAXSTRINGLEN]; 13 | int len; 14 | 15 | len = snprintf(buf, MAXSTRINGLEN, "%d", i); 16 | 17 | if (len >= (MAXSTRINGLEN - 1)) { 18 | (void)fputs("error: increase MAXSTRINGLEN in string_putint\n", stderr); 19 | exit(1); 20 | } 21 | 22 | return string_concatb(s, buf, len); 23 | } 24 | -------------------------------------------------------------------------------- /github.com/ryd/chaosvpn/string/string_read.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | 6 | #include "string.h" 7 | 8 | int 9 | string_read(struct string* s, const int fd, const size_t len, intptr_t* bytes_read) 10 | { 11 | uintptr_t growby; 12 | char* buf; 13 | 14 | if (len > (s->_u._s.size - s->_u._s.length)) { 15 | growby = s->_u._s.growby; 16 | while ((s->_u._s.size + growby - s->_u._s.length) < len) { 17 | growby += s->_u._s.growby; 18 | if ((s->_u._s.size + growby) < s->_u._s.size) return 1; 19 | } 20 | buf = realloc(s->s, s->_u._s.size + growby); 21 | if (!buf) return 1; 22 | memset(buf+s->_u._s.size, 0, growby); 23 | s->_u._s.size += growby; 24 | s->s = buf; 25 | } 26 | 27 | *bytes_read = read(fd, s->s + s->_u._s.length, len); 28 | 29 | if (*bytes_read > 0) 30 | s->_u._s.length += *bytes_read; 31 | return 0; 32 | } 33 | -------------------------------------------------------------------------------- /github.com/ryd/chaosvpn/string/test.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | #include "string.h" 5 | 6 | int main(int argc, char** argv) 7 | { 8 | struct string args; 9 | int i; int j; int k; 10 | 11 | string_init(&args, 1, 1); 12 | string_concatb(&args, "foo", 3); 13 | string_concatb(&args, "b", 1); 14 | printf("%d\n", args._u._s.length); 15 | for (i = 0; i < argc; i++) string_concat(&args, *argv++); 16 | puts(string_get(&args)); 17 | string_free(&args); 18 | 19 | for (j = 1; j <= 3; j++) { 20 | for (k = 1; k <= 200; k+=50) { 21 | printf("Testing with isize=%d growby=%d\n", j, k); 22 | string_init(&args, j, k); 23 | for (i = 0; i < 100; i++) { 24 | string_concat(&args, "test"); 25 | } 26 | printf("100x test == %d len, %d size, %d grow\n", args._u._s.length, 27 | args._u._s.size, args._u._s.growby); 28 | string_free(&args); 29 | } 30 | } 31 | 32 | return 0; 33 | } 34 | -------------------------------------------------------------------------------- /github.com/ryd/chaosvpn/version.h: -------------------------------------------------------------------------------- 1 | #define VERSION "2.18~alpha" 2 | -------------------------------------------------------------------------------- /github.com/trema/trema/.ruby-version: -------------------------------------------------------------------------------- 1 | 2.0.0 2 | -------------------------------------------------------------------------------- /github.com/trema/trema/.travis.yml: -------------------------------------------------------------------------------- 1 | language: ruby 2 | 3 | script: "rake travis" 4 | 5 | rvm: 6 | - 1.8.7 7 | 8 | branches: 9 | only: 10 | - master 11 | - develop 12 | 13 | before_install: 14 | - sudo apt-get update -qq 15 | - sudo apt-get install libpcap-dev -qq 16 | - gem install bundler 17 | 18 | notifications: 19 | webhooks: http://trema-hubot.herokuapp.com/hubot/travis?room=1 20 | -------------------------------------------------------------------------------- /github.com/trema/trema/.yardopts: -------------------------------------------------------------------------------- 1 | --no-private 2 | --readme README.md 3 | ruby/trema/**/*.rb 4 | ruby/trema/**/*.c 5 | -------------------------------------------------------------------------------- /github.com/trema/trema/Gemfile: -------------------------------------------------------------------------------- 1 | source "https://rubygems.org" 2 | 3 | 4 | # Include dependencies from trema.gemspec. DRY! 5 | gemspec 6 | 7 | 8 | # Add dependencies required to use your gem here. 9 | # Example: 10 | # gem "activesupport", ">= 2.3.5" 11 | 12 | 13 | # Add dependencies to develop your gem here. 14 | # Include everything needed to run rake, tests, features, etc. 15 | group :development do 16 | gem "aruba", "~> 0.5.3" 17 | gem "cucumber", "~> 1.3.8" 18 | gem "flay", "~> 2.4.0" 19 | gem "flog", "~> 4.1.2" 20 | gem "rcov", "~> 1.0.0" if RUBY_VERSION < "1.9.0" 21 | gem "redcarpet", "~> 2.3.0" if RUBY_VERSION < "1.9.0" 22 | gem "redcarpet", "~> 3.0.0" if RUBY_VERSION >= "1.9.0" 23 | gem "reek", "~> 1.3.3" 24 | gem "relish", "~> 0.7" 25 | gem "rspec", "~> 2.14.1" 26 | gem "yard", "~> 0.8.7.1" 27 | end 28 | 29 | 30 | ### Local variables: 31 | ### mode: Ruby 32 | ### coding: utf-8-unix 33 | ### indent-tabs-mode: nil 34 | ### End: 35 | -------------------------------------------------------------------------------- /github.com/trema/trema/bin/quality: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | # 3 | # Copyright (C) 2008-2013 NEC Corporation 4 | # 5 | # This program is free software; you can redistribute it and/or modify 6 | # it under the terms of the GNU General Public License, version 2, as 7 | # published by the Free Software Foundation. 8 | # 9 | # This program is distributed in the hope that it will be useful, 10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | # GNU General Public License for more details. 13 | # 14 | # You should have received a copy of the GNU General Public License along 15 | # with this program; if not, write to the Free Software Foundation, Inc., 16 | # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 17 | # 18 | 19 | 20 | if ARGV.empty? 21 | system "rake quality" 22 | else 23 | system %Q{rake quality QUALITY_TARGETS="#{ ARGV.join ' ' }"} 24 | end 25 | 26 | 27 | ### Local variables: 28 | ### mode: Ruby 29 | ### coding: utf-8-unix 30 | ### indent-tabs-mode: nil 31 | ### End: 32 | -------------------------------------------------------------------------------- /github.com/trema/trema/build.rb: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env ruby 2 | # 3 | # Trema build script 4 | # 5 | # Copyright (C) 2008-2013 NEC Corporation 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, version 2, as 9 | # published by the Free Software Foundation. 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 along 17 | # with this program; if not, write to the Free Software Foundation, Inc., 18 | # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 19 | # 20 | 21 | 22 | Dir.chdir File.dirname( __FILE__ ) do 23 | result = system( "bundle exec rake #{ ARGV.join ' ' }" ) 24 | abort "#{ $0 } aborted!" unless result 25 | end 26 | 27 | 28 | ### Local variables: 29 | ### mode: Ruby 30 | ### coding: utf-8 31 | ### indent-tabs-mode: nil 32 | ### End: 33 | -------------------------------------------------------------------------------- /github.com/trema/trema/features/README.md: -------------------------------------------------------------------------------- 1 | ## Issues 2 | 3 | This documentation is 4 | [open source](https://github.com/trema/trema/tree/develop/features), 5 | and a work in progress. If you find it incomplete or confusing, please 6 | [submit an isssue](https://github.com/trema/trema/issues), or, better 7 | yet, [a pull request](https://github.com/trema/trema/pulls). 8 | -------------------------------------------------------------------------------- /github.com/trema/trema/features/dsl/switch_port_specifier.feature: -------------------------------------------------------------------------------- 1 | @wip 2 | Feature: Switch Port Specifier 3 | By adding a postfix (`:port#`) to the switch's name found in the `link` directive you can specify the exact port number to be used when the link is created. 4 | 5 | vswitch( "switch" ) { dpid 0xabc } 6 | vhost "host1" 7 | vhost "host2" 8 | vhost "host3" 9 | link "host1", "switch:1" # Connects host1 to switch-port #1 10 | link "host2", "switch:2" # Connects host2 to switch-port #2 11 | link "host3", "switch:3" # Connects host3 to switch-port #3 12 | 13 | The reason why this feature required is that if the port number is not explicitly specified, trema randomly determines this. Which might be sufficient for some simple test cases but it is inadequate for other complex test cases. 14 | 15 | Therefore, if you wish to test your controllers rigorously on a configured virtual network you might find the `switch_name:port_number` syntax useful. It is also useful to be able to send packets to destined hosts or switches via the specified ports by using `SendOutPort` actions. 16 | -------------------------------------------------------------------------------- /github.com/trema/trema/features/examples/hello_trema.feature: -------------------------------------------------------------------------------- 1 | Feature: "Hello Trema!" example 2 | 3 | The "Hello Trema!" example ([trema]/src/examples/hello_trema/) is one 4 | of the simplest OpenFlow controller implementation. The basic 5 | functionality of this controller is to establish a secure channel connection 6 | with an OpenFlow switch and output the "Hello [switch's dpid]!" message. 7 | 8 | This demonstrates a minimum template for Trema applications written in Ruby 9 | or C. Hence it's a good starting point to learn about Trema programming. 10 | 11 | Background: 12 | Given I cd to "../../src/examples/hello_trema/" 13 | 14 | @slow_process 15 | Scenario: Run the Ruby example 16 | When I run `trema run ./hello-trema.rb -c sample.conf` interactively 17 | Then the output should contain "Hello 0xabc!" within the timeout period 18 | 19 | @slow_process 20 | Scenario: Run the C example 21 | Given I compile "hello_trema.c" into "hello_trema" 22 | When I run `trema run ./hello_trema -c sample.conf` interactively 23 | Then the output should contain "Hello 0xabc!" within the timeout period 24 | -------------------------------------------------------------------------------- /github.com/trema/trema/features/examples/list_switches.feature: -------------------------------------------------------------------------------- 1 | Feature: "List Switches" sample application 2 | 3 | In order to learn how to get the list of OpenFlow switches 4 | As a developer using Trema 5 | I want to execute "List Switches" sample application 6 | 7 | Background: 8 | Given a file named "list_switches.conf" with: 9 | """ 10 | vswitch { datapath_id 0x1 } 11 | vswitch { datapath_id 0x2 } 12 | vswitch { datapath_id 0x3 } 13 | vswitch { datapath_id 0x4 } 14 | """ 15 | 16 | @slow_process 17 | Scenario: Run "List Switches" C example 18 | Given I run `trema run ../../objects/examples/list_switches/list_switches -c list_switches.conf` 19 | Then the file "../../tmp/log/list_switches.log" should contain "switches = 0x1, 0x2, 0x3, 0x4" 20 | 21 | @slow_process 22 | Scenario: Run "List Switches" Ruby example 23 | Given I run `trema run ../../src/examples/list_switches/list-switches.rb -c list_switches.conf` 24 | Then the file "../../tmp/log/ListSwitches.log" should contain "switches = 0x1, 0x2, 0x3, 0x4" 25 | -------------------------------------------------------------------------------- /github.com/trema/trema/features/examples/message.vendor-action.feature: -------------------------------------------------------------------------------- 1 | Feature: "Vendor Action" sample application 2 | 3 | In order to learn how to send Vendor Action 4 | As a developer using Trema 5 | I want to execute "Vendor Action" sample application 6 | 7 | Background: 8 | Given a file named "vendor_action.conf" with: 9 | """ 10 | vswitch( "vendor_action" ) { datapath_id "0xabc" } 11 | """ 12 | 13 | @slow_process 14 | Scenario: Run "Packet In" C example 15 | Given I run `trema run ../../objects/examples/openflow_message/vendor_action -c vendor_action.conf -d` 16 | And wait until "vendor_action" is up 17 | Then the file "../../tmp/log/openflowd.vendor_action.log" should contain "actions=note:54.72.65.6d.61.00" 18 | 19 | @slow_process 20 | Scenario: Run "Packet In" Ruby example 21 | Given I run `trema run ../../src/examples/openflow_message/vendor-action.rb -c vendor_action.conf -d` 22 | And wait until "VendorActionSampleController" is up 23 | Then the file "../../tmp/log/openflowd.vendor_action.log" should contain "actions=note:54.72.65.6d.61.00" 24 | -------------------------------------------------------------------------------- /github.com/trema/trema/features/trema_commands/README.md: -------------------------------------------------------------------------------- 1 | The `trema` command comes with several sub-commands you can use to 2 | run your own controllers on emulated network envrionments. 3 | 4 | For a full list of sub-commands, run the `trema` command with no arguments: 5 | 6 | ``` 7 | $ ./trema 8 | ``` 9 | -------------------------------------------------------------------------------- /github.com/trema/trema/features/trema_commands/help.feature: -------------------------------------------------------------------------------- 1 | Feature: help command 2 | 3 | In order to understand how to use Trema 4 | As a developer using Trema 5 | I want to read the help message of trema command 6 | 7 | Scenario: List sub-commands 8 | When I run `trema help` 9 | Then the output should contain "dump_flows" 10 | And the output should contain "help" 11 | And the output should contain "kill" 12 | And the output should contain "killall" 13 | And the output should contain "netns" 14 | And the output should contain "reset_stats" 15 | And the output should contain "ruby" 16 | And the output should contain "run" 17 | And the output should contain "send_packets" 18 | And the output should contain "show_stats" 19 | And the output should contain "up" 20 | And the output should contain "version" 21 | 22 | Scenario: List global options 23 | When I run `trema help` 24 | Then the output should contain "--help" 25 | And the output should contain "-v, --verbose" 26 | And the output should contain "--version" 27 | -------------------------------------------------------------------------------- /github.com/trema/trema/features/trema_commands/help_option.feature: -------------------------------------------------------------------------------- 1 | Feature: --help option 2 | 3 | Use the --help option or just type trema to display the usage of trema command. 4 | 5 | Scenario: trema --help 6 | When I run `trema --help` 7 | Then the output should match /^NAME/ 8 | And the output should match /^SYNOPSIS/ 9 | And the output should match /^VERSION/ 10 | And the output should match /^GLOBAL OPTIONS/ 11 | And the output should match /^COMMANDS/ 12 | 13 | Scenario: trema 14 | When I run `trema` 15 | Then the output should match /^NAME/ 16 | And the output should match /^SYNOPSIS/ 17 | And the output should match /^VERSION/ 18 | And the output should match /^GLOBAL OPTIONS/ 19 | And the output should match /^COMMANDS/ 20 | -------------------------------------------------------------------------------- /github.com/trema/trema/features/trema_commands/killall.feature: -------------------------------------------------------------------------------- 1 | Feature: killall command 2 | 3 | In order to cleanup the previous trema session 4 | As a developer using Trema 5 | I want to execute "trema killall" command 6 | 7 | @slow_process 8 | Scenario: trema killall 9 | Given a file named "switch_monitor.conf" with: 10 | """ 11 | vswitch { datapath_id 0x1 } 12 | vswitch { datapath_id 0x2 } 13 | vswitch { datapath_id 0x3 } 14 | 15 | vhost "host1" 16 | vhost "host2" 17 | vhost "host3" 18 | 19 | link "0x1", "host1" 20 | link "0x2", "host2" 21 | link "0x3", "host3" 22 | """ 23 | And I successfully run `trema run ../../objects/examples/switch_monitor/switch_monitor -c switch_monitor.conf -d` 24 | And wait until "switch_monitor" is up 25 | When I run `trema killall` 26 | Then switch_manager is terminated 27 | And switch is terminated 28 | And phost is terminated 29 | And ovs-openflowd is terminated 30 | And switch_monitor is terminated 31 | -------------------------------------------------------------------------------- /github.com/trema/trema/features/trema_commands/up.feature: -------------------------------------------------------------------------------- 1 | Feature: up command 2 | 3 | In order to restart killed processes 4 | As a developer using Trema 5 | I want to execute "trema up" command 6 | 7 | Background: 8 | Given a file named "switch_monitor.conf" with: 9 | """ 10 | vswitch { datapath_id 0x1 } 11 | vswitch { datapath_id 0x2 } 12 | vswitch { datapath_id 0x3 } 13 | 14 | vhost "host1" 15 | vhost "host2" 16 | vhost "host3" 17 | 18 | link "0x1", "host1" 19 | link "0x2", "host2" 20 | link "0x3", "host3" 21 | """ 22 | And I successfully run `trema run ../../src/examples/switch_monitor/switch-monitor.rb -c switch_monitor.conf -d` 23 | And I run `trema kill 0x1 0x2 0x3` 24 | And I run `trema kill host1 host2 host3` 25 | 26 | @slow_process 27 | Scenario: up a switch 28 | When I run `trema up 0x1` 29 | Then the vswitch "0x1" is running 30 | 31 | @wip 32 | Scenario: up a host 33 | 34 | -------------------------------------------------------------------------------- /github.com/trema/trema/features/trema_commands/version.feature: -------------------------------------------------------------------------------- 1 | Feature: version command 2 | 3 | In order to know the current version of Trema 4 | As a developer using Trema 5 | I want to execute "trema version" command 6 | 7 | Scenario: trema version 8 | When I run `trema version` 9 | Then the output should match /trema version \d+\.\d+.\d+/ 10 | -------------------------------------------------------------------------------- /github.com/trema/trema/features/trema_commands/version_option.feature: -------------------------------------------------------------------------------- 1 | Feature: --version option 2 | 3 | Use the --version option to display the current runtime version. 4 | 5 | Scenario: trema --version 6 | When I run `trema --version` 7 | Then the output should match /trema version \d+\.\d+.\d+/ 8 | -------------------------------------------------------------------------------- /github.com/trema/trema/ruby/.gitignore: -------------------------------------------------------------------------------- 1 | *.o 2 | Makefile 3 | mkmf.log 4 | trema.so 5 | -------------------------------------------------------------------------------- /github.com/trema/trema/ruby/trema/action.rb: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2008-2013 NEC Corporation 3 | # 4 | # This program is free software; you can redistribute it and/or modify 5 | # it under the terms of the GNU General Public License, version 2, as 6 | # published by the Free Software Foundation. 7 | # 8 | # This program is distributed in the hope that it will be useful, 9 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | # GNU General Public License for more details. 12 | # 13 | # You should have received a copy of the GNU General Public License along 14 | # with this program; if not, write to the Free Software Foundation, Inc., 15 | # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 16 | # 17 | 18 | 19 | module Trema 20 | # 21 | # A base action class just for defining a meta-type for all action 22 | # classes. 23 | # 24 | class Action 25 | end 26 | end 27 | 28 | 29 | ### Local variables: 30 | ### mode: Ruby 31 | ### coding: utf-8-unix 32 | ### indent-tabs-mode: nil 33 | ### End: 34 | -------------------------------------------------------------------------------- /github.com/trema/trema/ruby/trema/command/killall.rb: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2008-2013 NEC Corporation 3 | # 4 | # This program is free software; you can redistribute it and/or modify 5 | # it under the terms of the GNU General Public License, version 2, as 6 | # published by the Free Software Foundation. 7 | # 8 | # This program is distributed in the hope that it will be useful, 9 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | # GNU General Public License for more details. 12 | # 13 | # You should have received a copy of the GNU General Public License along 14 | # with this program; if not, write to the Free Software Foundation, Inc., 15 | # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 16 | # 17 | 18 | 19 | require "trema/util" 20 | 21 | 22 | module Trema 23 | module Command 24 | include Trema::Util 25 | 26 | 27 | def trema_killall 28 | cleanup_current_session 29 | end 30 | end 31 | end 32 | 33 | 34 | ### Local variables: 35 | ### mode: Ruby 36 | ### coding: utf-8 37 | ### indent-tabs-mode: nil 38 | ### End: 39 | -------------------------------------------------------------------------------- /github.com/trema/trema/ruby/trema/command/version.rb: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2008-2013 NEC Corporation 3 | # 4 | # This program is free software; you can redistribute it and/or modify 5 | # it under the terms of the GNU General Public License, version 2, as 6 | # published by the Free Software Foundation. 7 | # 8 | # This program is distributed in the hope that it will be useful, 9 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | # GNU General Public License for more details. 12 | # 13 | # You should have received a copy of the GNU General Public License along 14 | # with this program; if not, write to the Free Software Foundation, Inc., 15 | # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 16 | # 17 | 18 | 19 | require "trema/version" 20 | 21 | 22 | module Trema 23 | module Command 24 | def trema_version 25 | puts "trema version #{ Trema::VERSION }" 26 | end 27 | end 28 | end 29 | 30 | 31 | ### Local variables: 32 | ### mode: Ruby 33 | ### coding: utf-8 34 | ### indent-tabs-mode: nil 35 | ### End: 36 | -------------------------------------------------------------------------------- /github.com/trema/trema/ruby/trema/compat.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2008-2013 NEC Corporation 3 | * 4 | * This program is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License, version 2, as 6 | * published by the Free Software Foundation. 7 | * 8 | * This program is distributed in the hope that it will be useful, 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | * GNU General Public License for more details. 12 | * 13 | * You should have received a copy of the GNU General Public License along 14 | * with this program; if not, write to the Free Software Foundation, Inc., 15 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 16 | */ 17 | 18 | 19 | #ifndef COMPAT_H 20 | #define COMPAT_H 21 | 22 | 23 | #ifndef RARRAY_LEN 24 | #define RARRAY_LEN( ary ) RARRAY( ary )->len 25 | #endif 26 | 27 | 28 | #endif // COMPAT_H 29 | 30 | 31 | /* 32 | * Local variables: 33 | * c-basic-offset: 2 34 | * indent-tabs-mode: nil 35 | * End: 36 | */ 37 | -------------------------------------------------------------------------------- /github.com/trema/trema/ruby/trema/default-logger.rb: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2008-2013 NEC Corporation 3 | # 4 | # This program is free software; you can redistribute it and/or modify 5 | # it under the terms of the GNU General Public License, version 2, as 6 | # published by the Free Software Foundation. 7 | # 8 | # This program is distributed in the hope that it will be useful, 9 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | # GNU General Public License for more details. 12 | # 13 | # You should have received a copy of the GNU General Public License along 14 | # with this program; if not, write to the Free Software Foundation, Inc., 15 | # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 16 | # 17 | 18 | 19 | module Trema 20 | module DefaultLogger 21 | end 22 | end 23 | 24 | 25 | ### Local variables: 26 | ### mode: Ruby 27 | ### coding: utf-8 28 | ### indent-tabs-mode: nil 29 | ### End: 30 | -------------------------------------------------------------------------------- /github.com/trema/trema/ruby/trema/dsl.rb: -------------------------------------------------------------------------------- 1 | # 2 | # Trema network DSL. 3 | # 4 | # Copyright (C) 2008-2013 NEC Corporation 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, version 2, as 8 | # published by the Free Software Foundation. 9 | # 10 | # This program is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # GNU General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU General Public License along 16 | # with this program; if not, write to the Free Software Foundation, Inc., 17 | # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 18 | # 19 | 20 | 21 | require "trema/dsl/configuration" 22 | require "trema/dsl/parser" 23 | require "trema/dsl/runner" 24 | require "trema/dsl/syntax" 25 | require "trema/path" 26 | 27 | 28 | ### Local variables: 29 | ### mode: Ruby 30 | ### coding: utf-8-unix 31 | ### indent-tabs-mode: nil 32 | ### End: 33 | -------------------------------------------------------------------------------- /github.com/trema/trema/ruby/trema/dsl/syntax-error.rb: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2008-2013 NEC Corporation 3 | # 4 | # This program is free software; you can redistribute it and/or modify 5 | # it under the terms of the GNU General Public License, version 2, as 6 | # published by the Free Software Foundation. 7 | # 8 | # This program is distributed in the hope that it will be useful, 9 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | # GNU General Public License for more details. 12 | # 13 | # You should have received a copy of the GNU General Public License along 14 | # with this program; if not, write to the Free Software Foundation, Inc., 15 | # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 16 | # 17 | 18 | 19 | module Trema 20 | module DSL 21 | class SyntaxError < StandardError 22 | end 23 | end 24 | end 25 | 26 | 27 | ### Local variables: 28 | ### mode: Ruby 29 | ### coding: utf-8-unix 30 | ### indent-tabs-mode: nil 31 | ### End: 32 | -------------------------------------------------------------------------------- /github.com/trema/trema/ruby/trema/echo-reply.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2008-2013 NEC Corporation 3 | * 4 | * This program is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License, version 2, as 6 | * published by the Free Software Foundation. 7 | * 8 | * This program is distributed in the hope that it will be useful, 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | * GNU General Public License for more details. 12 | * 13 | * You should have received a copy of the GNU General Public License along 14 | * with this program; if not, write to the Free Software Foundation, Inc., 15 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 16 | */ 17 | 18 | 19 | #ifndef ECHO_REPLY_H 20 | #define ECHO_REPLY_H 21 | 22 | 23 | #include "ruby.h" 24 | 25 | 26 | extern VALUE cEchoReply; 27 | 28 | 29 | void Init_echo_reply( void ); 30 | 31 | 32 | #endif // ECHO_REPLY_H 33 | 34 | 35 | /* 36 | * Local variables: 37 | * c-basic-offset: 2 38 | * indent-tabs-mode: nil 39 | * End: 40 | */ 41 | -------------------------------------------------------------------------------- /github.com/trema/trema/ruby/trema/echo-request.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2008-2013 NEC Corporation 3 | * 4 | * This program is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License, version 2, as 6 | * published by the Free Software Foundation. 7 | * 8 | * This program is distributed in the hope that it will be useful, 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | * GNU General Public License for more details. 12 | * 13 | * You should have received a copy of the GNU General Public License along 14 | * with this program; if not, write to the Free Software Foundation, Inc., 15 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 16 | */ 17 | 18 | 19 | #ifndef ECHO_REQUEST_H 20 | #define ECHO_REQUEST_H 21 | 22 | 23 | #include "ruby.h" 24 | 25 | 26 | extern VALUE cEchoRequest; 27 | 28 | 29 | void Init_echo_request( void ); 30 | 31 | 32 | #endif // ECHO_REQUEST_H 33 | 34 | 35 | /* 36 | * Local variables: 37 | * c-basic-offset: 2 38 | * indent-tabs-mode: nil 39 | * End: 40 | */ 41 | -------------------------------------------------------------------------------- /github.com/trema/trema/ruby/trema/exact-match.rb: -------------------------------------------------------------------------------- 1 | # 2 | # A syntax sugar class for creating an exact match object. 3 | # 4 | # Copyright (C) 2008-2013 NEC Corporation 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, version 2, as 8 | # published by the Free Software Foundation. 9 | # 10 | # This program is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # GNU General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU General Public License along 16 | # with this program; if not, write to the Free Software Foundation, Inc., 17 | # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 18 | # 19 | 20 | 21 | module Trema 22 | class ExactMatch 23 | def self.from message 24 | Match.from message 25 | end 26 | end 27 | end 28 | 29 | 30 | ### Local variables: 31 | ### mode: Ruby 32 | ### coding: utf-8-unix 33 | ### indent-tabs-mode: nil 34 | ### End: 35 | -------------------------------------------------------------------------------- /github.com/trema/trema/ruby/trema/match.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2008-2013 NEC Corporation 3 | * 4 | * This program is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License, version 2, as 6 | * published by the Free Software Foundation. 7 | * 8 | * This program is distributed in the hope that it will be useful, 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | * GNU General Public License for more details. 12 | * 13 | * You should have received a copy of the GNU General Public License along 14 | * with this program; if not, write to the Free Software Foundation, Inc., 15 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 16 | */ 17 | 18 | 19 | #include "ruby.h" 20 | #include "trema.h" 21 | 22 | 23 | extern VALUE cMatch; 24 | 25 | 26 | void Init_match( void ); 27 | 28 | 29 | /* 30 | * Local variables: 31 | * c-basic-offset: 2 32 | * indent-tabs-mode: nil 33 | * End: 34 | */ 35 | -------------------------------------------------------------------------------- /github.com/trema/trema/ruby/trema/monkey-patch/integer/base-conversions.rb: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2008-2013 NEC Corporation 3 | # 4 | # This program is free software; you can redistribute it and/or modify 5 | # it under the terms of the GNU General Public License, version 2, as 6 | # published by the Free Software Foundation. 7 | # 8 | # This program is distributed in the hope that it will be useful, 9 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | # GNU General Public License for more details. 12 | # 13 | # You should have received a copy of the GNU General Public License along 14 | # with this program; if not, write to the Free Software Foundation, Inc., 15 | # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 16 | # 17 | 18 | 19 | module MonkeyPatch 20 | module Integer 21 | module BaseConversions 22 | def to_hex 23 | "%#x" % self 24 | end 25 | end 26 | end 27 | end 28 | 29 | 30 | ### Local variables: 31 | ### mode: Ruby 32 | ### coding: utf-8-unix 33 | ### indent-tabs-mode: nil 34 | ### End: 35 | -------------------------------------------------------------------------------- /github.com/trema/trema/ruby/trema/monkey-patch/string.rb: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2008-2013 NEC Corporation 3 | # 4 | # This program is free software; you can redistribute it and/or modify 5 | # it under the terms of the GNU General Public License, version 2, as 6 | # published by the Free Software Foundation. 7 | # 8 | # This program is distributed in the hope that it will be useful, 9 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | # GNU General Public License for more details. 12 | # 13 | # You should have received a copy of the GNU General Public License along 14 | # with this program; if not, write to the Free Software Foundation, Inc., 15 | # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 16 | # 17 | 18 | 19 | require "trema/monkey-patch/string/inflectors" 20 | 21 | 22 | class String 23 | include MonkeyPatch::String::Inflectors 24 | end 25 | 26 | 27 | ### Local variables: 28 | ### mode: Ruby 29 | ### coding: utf-8-unix 30 | ### indent-tabs-mode: nil 31 | ### End: 32 | -------------------------------------------------------------------------------- /github.com/trema/trema/ruby/trema/openflow-switch.rb: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2008-2013 NEC Corporation 3 | # 4 | # This program is free software; you can redistribute it and/or modify 5 | # it under the terms of the GNU General Public License, version 2, as 6 | # published by the Free Software Foundation. 7 | # 8 | # This program is distributed in the hope that it will be useful, 9 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | # GNU General Public License for more details. 12 | # 13 | # You should have received a copy of the GNU General Public License along 14 | # with this program; if not, write to the Free Software Foundation, Inc., 15 | # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 16 | # 17 | 18 | 19 | require "trema/network-component" 20 | 21 | 22 | module Trema 23 | # 24 | # Keeps a list of {HardwareSwitch} and {OpenVswitch} 25 | # 26 | class OpenflowSwitch < NetworkComponent 27 | end 28 | end 29 | 30 | 31 | ### Local variables: 32 | ### mode: Ruby 33 | ### coding: utf-8-unix 34 | ### indent-tabs-mode: nil 35 | ### End: 36 | -------------------------------------------------------------------------------- /github.com/trema/trema/ruby/trema/port-mod.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2008-2013 NEC Corporation 3 | * 4 | * This program is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License, version 2, as 6 | * published by the Free Software Foundation. 7 | * 8 | * This program is distributed in the hope that it will be useful, 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | * GNU General Public License for more details. 12 | * 13 | * You should have received a copy of the GNU General Public License along 14 | * with this program; if not, write to the Free Software Foundation, Inc., 15 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 16 | */ 17 | 18 | 19 | #include "ruby.h" 20 | #include "trema.h" 21 | 22 | 23 | extern VALUE cPortMod; 24 | 25 | 26 | void Init_port_mod( void ); 27 | 28 | 29 | /* 30 | * Local variables: 31 | * c-basic-offset: 2 32 | * indent-tabs-mode: nil 33 | * End: 34 | */ 35 | -------------------------------------------------------------------------------- /github.com/trema/trema/ruby/trema/shell/down.rb: -------------------------------------------------------------------------------- 1 | # 2 | # down command of Trema shell. 3 | # 4 | # Copyright (C) 2008-2013 NEC Corporation 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, version 2, as 8 | # published by the Free Software Foundation. 9 | # 10 | # This program is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # GNU General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU General Public License along 16 | # with this program; if not, write to the Free Software Foundation, Inc., 17 | # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 18 | # 19 | 20 | 21 | require "trema/dsl" 22 | 23 | 24 | module Trema 25 | module Shell 26 | def down name 27 | OpenflowSwitch[ name ].shutdown! 28 | end 29 | end 30 | end 31 | 32 | 33 | ### Local variables: 34 | ### mode: Ruby 35 | ### coding: utf-8 36 | ### indent-tabs-mode: nil 37 | ### End: 38 | -------------------------------------------------------------------------------- /github.com/trema/trema/ruby/trema/shell/killall.rb: -------------------------------------------------------------------------------- 1 | # 2 | # killall command of Trema shell. 3 | # 4 | # Copyright (C) 2008-2013 NEC Corporation 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, version 2, as 8 | # published by the Free Software Foundation. 9 | # 10 | # This program is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # GNU General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU General Public License along 16 | # with this program; if not, write to the Free Software Foundation, Inc., 17 | # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 18 | # 19 | 20 | 21 | require "trema/dsl" 22 | 23 | 24 | module Trema 25 | module Shell 26 | def killall 27 | cleanup_current_session 28 | true 29 | end 30 | end 31 | end 32 | 33 | 34 | ### Local variables: 35 | ### mode: Ruby 36 | ### coding: utf-8 37 | ### indent-tabs-mode: nil 38 | ### End: 39 | -------------------------------------------------------------------------------- /github.com/trema/trema/ruby/trema/stats-request.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2008-2013 NEC Corporation 3 | * 4 | * This program is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License, version 2, as 6 | * published by the Free Software Foundation. 7 | * 8 | * This program is distributed in the hope that it will be useful, 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | * GNU General Public License for more details. 12 | * 13 | * You should have received a copy of the GNU General Public License along 14 | * with this program; if not, write to the Free Software Foundation, Inc., 15 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 16 | */ 17 | 18 | 19 | #ifndef STATS_REQUEST_H 20 | #define STATS_REQUEST_H 21 | 22 | 23 | #include "ruby.h" 24 | 25 | 26 | extern VALUE cStatsRequest; 27 | 28 | 29 | void Init_stats_request( void ); 30 | 31 | 32 | #endif // STATS_REQUEST_H 33 | 34 | 35 | /* 36 | * Local variables: 37 | * c-basic-offset: 2 38 | * indent-tabs-mode: nil 39 | * End: 40 | */ 41 | -------------------------------------------------------------------------------- /github.com/trema/trema/ruby/trema/switch-event.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2013 NEC Corporation 3 | * 4 | * This program is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License, version 2, as 6 | * published by the Free Software Foundation. 7 | * 8 | * This program is distributed in the hope that it will be useful, 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | * GNU General Public License for more details. 12 | * 13 | * You should have received a copy of the GNU General Public License along 14 | * with this program; if not, write to the Free Software Foundation, Inc., 15 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 16 | */ 17 | 18 | #ifndef SWITCH_EVENT_H_ 19 | #define SWITCH_EVENT_H_ 20 | 21 | #include "ruby.h" 22 | 23 | extern VALUE mSwitchEvent; 24 | 25 | void Init_switch_event( void ); 26 | 27 | #endif /* SWITCH_EVENT_H_ */ 28 | -------------------------------------------------------------------------------- /github.com/trema/trema/ruby/trema/switch.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2008-2013 NEC Corporation 3 | * 4 | * This program is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License, version 2, as 6 | * published by the Free Software Foundation. 7 | * 8 | * This program is distributed in the hope that it will be useful, 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | * GNU General Public License for more details. 12 | * 13 | * You should have received a copy of the GNU General Public License along 14 | * with this program; if not, write to the Free Software Foundation, Inc., 15 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 16 | */ 17 | 18 | 19 | #ifndef SWITCH_H 20 | #define SWITCH_H 21 | 22 | 23 | #include "ruby.h" 24 | 25 | 26 | extern VALUE cSwitch; 27 | 28 | 29 | void Init_switch( void ); 30 | 31 | 32 | #endif // SWITCH_H 33 | 34 | 35 | /* 36 | * Local variables: 37 | * c-basic-offset: 2 38 | * indent-tabs-mode: nil 39 | * End: 40 | */ 41 | -------------------------------------------------------------------------------- /github.com/trema/trema/ruby/trema/version.rb: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2008-2013 NEC Corporation 3 | # 4 | # This program is free software; you can redistribute it and/or modify 5 | # it under the terms of the GNU General Public License, version 2, as 6 | # published by the Free Software Foundation. 7 | # 8 | # This program is distributed in the hope that it will be useful, 9 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | # GNU General Public License for more details. 12 | # 13 | # You should have received a copy of the GNU General Public License along 14 | # with this program; if not, write to the Free Software Foundation, Inc., 15 | # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 16 | # 17 | 18 | 19 | module Trema 20 | VERSION = "0.4.2" 21 | end 22 | 23 | 24 | ### Local variables: 25 | ### mode: Ruby 26 | ### coding: utf-8 27 | ### indent-tabs-mode: nil 28 | ### End: 29 | -------------------------------------------------------------------------------- /github.com/trema/trema/spec/support/matchers/constant.rb: -------------------------------------------------------------------------------- 1 | RSpec::Matchers.define :have_constant do | const, klass | 2 | match do | owner | 3 | const_defined = owner.const_defined?( const ) 4 | klass_match = owner.const_get( const ).class == klass unless klass.nil? 5 | klass.nil? ? const_defined : ( const_defined && klass_match ) 6 | end 7 | 8 | failure_message_for_should do | actual | 9 | msg = "constant #{ expected[ 0 ] } not defined in #{ actual }" 10 | msg += " as a #{ expected[ 1 ] }" unless expected[ 1 ].nil? 11 | msg 12 | end 13 | 14 | failure_message_for_should_not do | actual | 15 | msg = "constant #{ expected[ 0 ] } is defined in #{ actual }" 16 | msg += " as a #{ expected[ 1 ] }" unless expected[ 1 ].nil? 17 | msg 18 | end 19 | 20 | description do 21 | msg = "have constant #{ const }" 22 | msg += " defined with class #{ klass }" unless klass.nil? 23 | msg 24 | end 25 | end 26 | -------------------------------------------------------------------------------- /github.com/trema/trema/src/examples/cbench_switch/README: -------------------------------------------------------------------------------- 1 | This directory includes a dedicated OpenFlow controller implementation 2 | for "cbench" OpenFlow controller benchmark suite. 3 | 4 | 5 | # How to Run 6 | 7 | Run this controller 8 | 9 | % ./trema run ./objects/examples/cbench_switch/cbench_switch 10 | 11 | then, on another terminal 12 | 13 | % ./objects/oflops/bin/cbench --switches 1 --loops 10 --delay 1000 14 | 15 | 16 | or, the following automatically executes a series of benchmarks: 17 | 18 | % ./build.rb cbench 19 | 20 | 21 | Enjoy! 22 | -------------------------------------------------------------------------------- /github.com/trema/trema/src/examples/dumper/dumper.conf: -------------------------------------------------------------------------------- 1 | vswitch("dumper") { datapath_id "0xabc" } 2 | 3 | vhost("host1") 4 | vhost("host2") 5 | 6 | link "dumper", "host1" 7 | link "dumper", "host2" 8 | -------------------------------------------------------------------------------- /github.com/trema/trema/src/examples/hello_trema/.gitignore: -------------------------------------------------------------------------------- 1 | hello_trema 2 | 3 | -------------------------------------------------------------------------------- /github.com/trema/trema/src/examples/hello_trema/README.md: -------------------------------------------------------------------------------- 1 | See https://www.relishapp.com/trema/trema/docs/examples/hello-trema-example 2 | 3 | -------------------------------------------------------------------------------- /github.com/trema/trema/src/examples/hello_trema/hello-trema.rb: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2008-2013 NEC Corporation 3 | # 4 | # This program is free software; you can redistribute it and/or modify 5 | # it under the terms of the GNU General Public License, version 2, as 6 | # published by the Free Software Foundation. 7 | # 8 | # This program is distributed in the hope that it will be useful, 9 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | # GNU General Public License for more details. 12 | # 13 | # You should have received a copy of the GNU General Public License along 14 | # with this program; if not, write to the Free Software Foundation, Inc., 15 | # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 16 | # 17 | 18 | 19 | class HelloTrema < Controller 20 | def switch_ready datapath_id 21 | info "Hello %#x!" % datapath_id 22 | end 23 | end 24 | 25 | 26 | ### Local variables: 27 | ### mode: Ruby 28 | ### coding: utf-8 29 | ### indent-tabs-mode: nil 30 | ### End: 31 | -------------------------------------------------------------------------------- /github.com/trema/trema/src/examples/hello_trema/sample.conf: -------------------------------------------------------------------------------- 1 | vswitch { datapath_id "0xabc" } 2 | -------------------------------------------------------------------------------- /github.com/trema/trema/src/examples/learning_switch/README: -------------------------------------------------------------------------------- 1 | This directory includes an OpenFlow controller that controls a single 2 | OpenFlow switch and emulates a layer 2 switch. 3 | 4 | 5 | # How to run (C version) 6 | 7 | % ./trema run ./objects/examples/learning_switch/learning_switch -c ./src/examples/learning_switch/learning_switch.conf 8 | 9 | 10 | # How to run (Ruby version) 11 | 12 | % ./trema run ./src/examples/learning_switch/learning-switch.rb -c ./src/examples/learning_switch/learning_switch.conf 13 | 14 | 15 | Enjoy! 16 | -------------------------------------------------------------------------------- /github.com/trema/trema/src/examples/learning_switch/learning_switch.conf: -------------------------------------------------------------------------------- 1 | vswitch("lsw") { 2 | datapath_id "0xabc" 3 | } 4 | 5 | vhost ("host1") { 6 | ip "192.168.0.1" 7 | netmask "255.255.0.0" 8 | mac "00:00:00:01:00:01" 9 | } 10 | 11 | vhost ("host2") { 12 | ip "192.168.0.2" 13 | netmask "255.255.0.0" 14 | mac "00:00:00:01:00:02" 15 | } 16 | 17 | link "lsw", "host1" 18 | link "lsw", "host2" 19 | -------------------------------------------------------------------------------- /github.com/trema/trema/src/examples/list_switches/README: -------------------------------------------------------------------------------- 1 | This directory includes an example that demonstrates how you can 2 | retrieve the list of OpenFlow switches currently connected. 3 | 4 | # How to Run (C version) 5 | 6 | Run this: 7 | 8 | % ./trema run -c ./src/examples/list_switches/list_switches.conf ./objects/examples/list_switches/list_switches 9 | 10 | then you will be able to see the list of switches (datapath ids) 11 | periodically. 12 | 13 | switches = 0xe0, 0xe1, 0xe2, 0xe3 14 | 15 | # How to Run (Ruby version) 16 | 17 | % ./trema run -c ./src/examples/list_switches/list_switches.conf ./src/examples/list_switches/list-switches.rb 18 | 19 | Enjoy! 20 | -------------------------------------------------------------------------------- /github.com/trema/trema/src/examples/list_switches/list_switches.conf: -------------------------------------------------------------------------------- 1 | vswitch { 2 | datapath_id "0xe0" 3 | } 4 | 5 | vswitch { 6 | datapath_id "0xe1" 7 | } 8 | 9 | vswitch { 10 | datapath_id "0xe2" 11 | } 12 | 13 | vswitch { 14 | datapath_id "0xe3" 15 | } 16 | -------------------------------------------------------------------------------- /github.com/trema/trema/src/examples/match_compare/match-compare.conf: -------------------------------------------------------------------------------- 1 | vswitch { dpid "0xabc" } 2 | 3 | vhost { 4 | ip "192.168.0.1" 5 | netmask "255.255.0.0" 6 | mac "00:00:00:01:00:01" 7 | } 8 | 9 | vhost { 10 | ip "192.168.0.2" 11 | netmask "255.255.0.0" 12 | mac "00:00:00:01:00:02" 13 | } 14 | 15 | vhost { 16 | ip "10.0.0.1" 17 | netmask "255.0.0.0" 18 | mac "00:00:00:01:01:01" 19 | } 20 | 21 | vhost { 22 | ip "10.0.0.2" 23 | netmask "255.0.0.0" 24 | mac "00:00:00:01:01:02" 25 | } 26 | 27 | link "0xabc", "192.168.0.1" 28 | link "0xabc", "192.168.0.2" 29 | link "0xabc", "10.0.0.1" 30 | link "0xabc", "10.0.0.2" 31 | -------------------------------------------------------------------------------- /github.com/trema/trema/src/examples/multi_learning_switch/README: -------------------------------------------------------------------------------- 1 | This directory includes an OpenFlow controller that emulates multiple 2 | layer 2 switches. 3 | 4 | 5 | # How to run (C version) 6 | 7 | % ./trema run ./objects/examples/multi_learning_switch/multi_learning_switch -c ./src/examples/multi_learning_switch/multi_learning_switch.conf 8 | 9 | # How to run (Ruby version) 10 | 11 | % ./trema run ./src/examples/multi_learning_switch/multi-learning-switch.rb -c ./src/examples/multi_learning_switch/multi_learning_switch.conf 12 | 13 | 14 | Enjoy! 15 | -------------------------------------------------------------------------------- /github.com/trema/trema/src/examples/multi_learning_switch/multi_learning_switch.conf: -------------------------------------------------------------------------------- 1 | vswitch("multi_learning1") { datapath_id "0x1" } 2 | vswitch("multi_learning2") { datapath_id "0x2" } 3 | vswitch("multi_learning3") { datapath_id "0x3" } 4 | vswitch("multi_learning4") { datapath_id "0x4" } 5 | 6 | vhost("host1") 7 | vhost("host2") 8 | vhost("host3") 9 | vhost("host4") 10 | 11 | link "multi_learning1", "host1" 12 | link "multi_learning2", "host2" 13 | link "multi_learning3", "host3" 14 | link "multi_learning4", "host4" 15 | link "multi_learning1", "multi_learning2" 16 | link "multi_learning2", "multi_learning3" 17 | link "multi_learning3", "multi_learning4" 18 | -------------------------------------------------------------------------------- /github.com/trema/trema/src/examples/openflow_message/README: -------------------------------------------------------------------------------- 1 | This directory includes some small examples that sends a single type 2 | of OpenFlow messages. These examples are mainly used for testing Trema 3 | itself, but maybe useful for the reference of Trema API. 4 | 5 | 6 | # How to run 7 | 8 | See features/example.message.*.feature 9 | 10 | 11 | Enjoy! 12 | -------------------------------------------------------------------------------- /github.com/trema/trema/src/examples/packet_in/README: -------------------------------------------------------------------------------- 1 | This directory includes an example of handling packet_in message. 2 | 3 | 4 | # How to Run 5 | 6 | Run this: 7 | 8 | % ./trema run ./objects/examples/packet_in/packet_in 9 | 10 | then on another terminal, send a packet to generate packet_in. 11 | 12 | % ./trema send_packets --source 192.168.0.1 --dest 192.168.0.2 13 | 14 | This will cause a dumped packet_in message to be displayed on the 15 | first terminal. 16 | -------------------------------------------------------------------------------- /github.com/trema/trema/src/examples/packet_in/packet_in.conf: -------------------------------------------------------------------------------- 1 | vswitch { dpid "0xabc" } 2 | 3 | vhost { 4 | ip "192.168.0.1" 5 | netmask "255.255.0.0" 6 | mac "00:00:00:01:00:01" 7 | } 8 | vhost { 9 | ip "192.168.0.2" 10 | netmask "255.255.0.0" 11 | mac "00:00:00:01:00:02" 12 | } 13 | 14 | link "0xabc", "192.168.0.1" 15 | link "0xabc", "192.168.0.2" 16 | -------------------------------------------------------------------------------- /github.com/trema/trema/src/examples/packetin_filter_config/README: -------------------------------------------------------------------------------- 1 | This directory includes examples that demonstrate how you can 2 | add/delete/dump Packet-In filters. 3 | 4 | # How to Run 5 | 6 | % ./trema run -c ./src/examples/packetin_filter_config/packetin_filter_config.conf -d 7 | 8 | % TREMA_HOME=`pwd` ./objects/examples/packetin_filter_config/add_filter 9 | % TREMA_HOME=`pwd` ./objects/examples/packetin_filter_config/dump_filter 10 | % TREMA_HOME=`pwd` ./objects/examples/packetin_filter_config/dump_filter_strict 11 | % TREMA_HOME=`pwd` ./objects/examples/packetin_filter_config/delete_filter_strict 12 | % TREMA_HOME=`pwd` ./objects/examples/packetin_filter_config/delete_filter 13 | -------------------------------------------------------------------------------- /github.com/trema/trema/src/examples/packetin_filter_config/packetin_filter_config.conf: -------------------------------------------------------------------------------- 1 | run { 2 | path "./objects/examples/dumper/dumper" 3 | } 4 | 5 | event :port_status => "dumper", :packet_in => "filter", :state_notify => "dumper" 6 | filter :lldp => "dumper", :packet_in => "dumper" 7 | 8 | -------------------------------------------------------------------------------- /github.com/trema/trema/src/examples/patch_panel/network.conf: -------------------------------------------------------------------------------- 1 | vswitch("patch") { 2 | datapath_id "0xabc" 3 | } 4 | 5 | vhost ("host1") { 6 | ip "192.168.0.1" 7 | } 8 | 9 | vhost ("host2") { 10 | ip "192.168.0.2" 11 | } 12 | 13 | link "patch", "host1" 14 | link "patch", "host2" 15 | -------------------------------------------------------------------------------- /github.com/trema/trema/src/examples/patch_panel/patch-panel.conf: -------------------------------------------------------------------------------- 1 | 1 2 2 | -------------------------------------------------------------------------------- /github.com/trema/trema/src/examples/repeater_hub/README: -------------------------------------------------------------------------------- 1 | This directory includes a OpenFlow controller that emulates a repeater 2 | hub. It repeats any ethernet frames from one port to other ports. 3 | 4 | # How to Run 5 | 6 | % ./trema run -c ./src/examples/repeater_hub/repeater_hub.conf 7 | 8 | Enjoy! 9 | -------------------------------------------------------------------------------- /github.com/trema/trema/src/examples/repeater_hub/repeater_hub.conf: -------------------------------------------------------------------------------- 1 | vswitch("repeater_hub") { 2 | datapath_id "0xabc" 3 | } 4 | 5 | vhost("host1") { 6 | promisc "On" 7 | ip "192.168.0.1" 8 | netmask "255.255.0.0" 9 | mac "00:00:00:01:00:01" 10 | } 11 | 12 | vhost("host2") { 13 | promisc "On" 14 | ip "192.168.0.2" 15 | netmask "255.255.0.0" 16 | mac "00:00:00:01:00:02" 17 | } 18 | 19 | vhost("host3") { 20 | promisc "On" 21 | ip "192.168.0.3" 22 | netmask "255.255.0.0" 23 | mac "00:00:00:01:00:03" 24 | } 25 | 26 | link "repeater_hub", "host1" 27 | link "repeater_hub", "host2" 28 | link "repeater_hub", "host3" 29 | -------------------------------------------------------------------------------- /github.com/trema/trema/src/examples/simple_router/README: -------------------------------------------------------------------------------- 1 | This directory includes an OpenFlow controller that controls a single 2 | OpenFlow switch and emulates a router. 3 | 4 | # How to run 5 | 6 | Run this 7 | 8 | % sudo trema run ./src/examples/simple_router/simple-router.rb -c ./src/examples/simple_router/simple_router_netns.conf -d 9 | 10 | and send packets like as follows. 11 | 12 | % sudo ip netns exec host1 ping 192.168.2.2 13 | 14 | Then check flow entries in OpenFlow switch. 15 | 16 | % sudo trema dump_flows 0x1 17 | 18 | This will display flow entries created by the controller. -------------------------------------------------------------------------------- /github.com/trema/trema/src/examples/simple_router/simple_router.conf: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | $interface = [ 4 | { 5 | :port => 2, 6 | :hwaddr => "00:00:00:01:00:01", 7 | :ipaddr => "192.168.1.1", 8 | :masklen => 24 9 | }, 10 | { 11 | :port => 1, 12 | :hwaddr => "00:00:00:01:00:02", 13 | :ipaddr => "192.168.2.1", 14 | :masklen => 24 15 | } 16 | ] 17 | 18 | $route = [ 19 | { 20 | :destination => "0.0.0.0", 21 | :masklen => 0, 22 | :nexthop => "192.168.1.2" 23 | } 24 | ] 25 | -------------------------------------------------------------------------------- /github.com/trema/trema/src/examples/simple_router/simple_router_netns.conf: -------------------------------------------------------------------------------- 1 | vswitch { dpid "0x1" } 2 | 3 | netns ( "host1" ) { 4 | ip "192.168.1.2" 5 | netmask "255.255.255.0" 6 | route :net=>"0.0.0.0/0", :gw=>"192.168.1.1" 7 | } 8 | netns ( "host2" ) { 9 | ip "192.168.2.2" 10 | netmask "255.255.255.0" 11 | route :net=>"0.0.0.0/0", :gw=>"192.168.2.1" 12 | } 13 | 14 | link "host1", "0x1" 15 | link "host2", "0x1" 16 | -------------------------------------------------------------------------------- /github.com/trema/trema/src/examples/simple_router/simple_router_network.conf: -------------------------------------------------------------------------------- 1 | vswitch ( "switch" ) { 2 | datapath_id "0x1" 3 | } 4 | 5 | link "switch", "eth1" 6 | link "switch", "eth0" 7 | -------------------------------------------------------------------------------- /github.com/trema/trema/src/examples/switch_event_config/.gitignore: -------------------------------------------------------------------------------- 1 | add_forward_entry 2 | delete_forward_entry 3 | dump_forward_entries 4 | set_forward_entries 5 | switch_event_config_add.conf 6 | 7 | -------------------------------------------------------------------------------- /github.com/trema/trema/src/examples/switch_event_config/network.conf: -------------------------------------------------------------------------------- 1 | vswitch { datapath_id 0x1 } 2 | vswitch { datapath_id 0x2 } -------------------------------------------------------------------------------- /github.com/trema/trema/src/examples/switch_info/README: -------------------------------------------------------------------------------- 1 | This directory includes examples that shows how to get switch information using features-request message. 2 | 3 | 4 | # How to run (C version) 5 | 6 | % ./trema run ./objects/examples/switch_info/switch_info -c src/examples/switch_info/switch_info.conf 7 | 8 | # How to run (Ruby version) 9 | 10 | % ./trema run ./src/examples/switch_info/switch_info.rb -c src/examples/switch_info/switch_info.conf 11 | 12 | 13 | Enjoy! 14 | -------------------------------------------------------------------------------- /github.com/trema/trema/src/examples/switch_info/switch_info.conf: -------------------------------------------------------------------------------- 1 | vswitch { 2 | datapath_id "0xabc" 3 | } 4 | -------------------------------------------------------------------------------- /github.com/trema/trema/src/examples/switch_monitor/switch-monitor.conf: -------------------------------------------------------------------------------- 1 | vswitch { datapath_id 0x1 } 2 | vswitch { datapath_id 0x2 } 3 | vswitch { datapath_id 0x3 } 4 | -------------------------------------------------------------------------------- /github.com/trema/trema/src/examples/traffic_monitor/traffic_monitor.conf: -------------------------------------------------------------------------------- 1 | vswitch { 2 | datapath_id "0xabc" 3 | } 4 | 5 | vhost ("host1") { 6 | ip "192.168.0.1" 7 | mac "00:00:00:00:00:01" 8 | } 9 | 10 | vhost ("host2") { 11 | ip "192.168.0.2" 12 | mac "00:00:00:00:00:02" 13 | } 14 | 15 | link "0xabc", "host1" 16 | link "0xabc", "host2" 17 | -------------------------------------------------------------------------------- /github.com/trema/trema/src/packetin_filter/README: -------------------------------------------------------------------------------- 1 | This directory includes packet-in filter component. 2 | 3 | packet out 4 | .---------------------------------------. 5 | v | 6 | +----------+ +-----------+ +-------+ 7 | | switch | * 1 | packet in | 1 * | trema | 8 | | daemon | --------> | filter | --------> | apps | 9 | +----------+ packet in +-----------+ packet in +-------+ 10 | ^ 1 11 | | 12 | | 13 | v 1 14 | +----------+ 15 | | openflow | 16 | | switch | 17 | +----------+ 18 | -------------------------------------------------------------------------------- /github.com/trema/trema/src/switch_manager/README: -------------------------------------------------------------------------------- 1 | This directory includes OpenFlow switch management components: 2 | 3 | - Switch manager accepts connections from OpenFlow switches, then 4 | delegates the accepted connections to a switch daemon. 5 | 6 | - Switch daemon starts a new secure channel with a OpenFlow switch. 7 | 8 | 9 | connect 10 | .-------------------------------------------. 11 | v | 12 | +---------+ +--------+ +----------+ 13 | | switch | 1 * | switch | 1 1 | openflow | 14 | | manager | --------> | daemon | <--------> | switch | 15 | +---------+ fork and +--------+ openflow +----------+ 16 | exec ^ messages 17 | | 18 | | packet in, etc. 19 | v 20 | trema apps 21 | -------------------------------------------------------------------------------- /github.com/trema/trema/src/tremashark/plugin/.gitignore: -------------------------------------------------------------------------------- 1 | /.deps 2 | /*.a 3 | /*.so 4 | /TAGS 5 | /tmp 6 | wireshark* 7 | -------------------------------------------------------------------------------- /github.com/trema/trema/src/tremashark/plugin/packet-trema/.gitignore: -------------------------------------------------------------------------------- 1 | /.deps 2 | /*.a 3 | /*.so 4 | /TAGS 5 | /tmp 6 | -------------------------------------------------------------------------------- /github.com/trema/trema/src/tremashark/plugin/packet-trema/plugin.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Do not modify this file. 3 | * 4 | * It is created automatically by Makefile or Makefile.nmake. 5 | */ 6 | 7 | #ifdef HAVE_CONFIG_H 8 | # include "config.h" 9 | #endif 10 | 11 | #include 12 | 13 | #include "moduleinfo.h" 14 | 15 | #ifndef ENABLE_STATIC 16 | G_MODULE_EXPORT const gchar version[] = VERSION; 17 | 18 | /* Start the functions we need for the plugin stuff */ 19 | 20 | G_MODULE_EXPORT void 21 | plugin_register (void) 22 | { 23 | {extern void proto_register_trema (void); proto_register_trema ();} 24 | } 25 | 26 | G_MODULE_EXPORT void 27 | plugin_reg_handoff(void) 28 | { 29 | {extern void proto_reg_handoff_trema (void); proto_reg_handoff_trema ();} 30 | } 31 | #endif 32 | -------------------------------------------------------------------------------- /github.com/trema/trema/src/tremashark/plugin/user_dlts: -------------------------------------------------------------------------------- 1 | # This file is automatically generated, DO NOT MODIFY. 2 | "User 0 (DLT=147)","trema","0","","0","" 3 | -------------------------------------------------------------------------------- /github.com/trema/trema/trema: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | 3 | 4 | exec File.join( File.dirname( __FILE__ ), "./bin/trema" ), *ARGV 5 | 6 | 7 | ### Local variables: 8 | ### mode: Ruby 9 | ### coding: utf-8 10 | ### indent-tabs-mode: nil 11 | ### End: 12 | -------------------------------------------------------------------------------- /github.com/trema/trema/trema-config: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | 3 | 4 | exec File.join( File.dirname( __FILE__ ), "./bin/trema-config" ), *ARGV 5 | 6 | 7 | ### Local variables: 8 | ### mode: Ruby 9 | ### coding: utf-8 10 | ### indent-tabs-mode: nil 11 | ### End: 12 | -------------------------------------------------------------------------------- /github.com/trema/trema/unittests/lib/test_packets/arp_rep.cap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mindreframer/networking-stuff/890b041877465f31475d4692f23a973bcb8ccecc/github.com/trema/trema/unittests/lib/test_packets/arp_rep.cap -------------------------------------------------------------------------------- /github.com/trema/trema/unittests/lib/test_packets/arp_req.cap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mindreframer/networking-stuff/890b041877465f31475d4692f23a973bcb8ccecc/github.com/trema/trema/unittests/lib/test_packets/arp_req.cap -------------------------------------------------------------------------------- /github.com/trema/trema/unittests/lib/test_packets/icmp6_echo_rep.cap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mindreframer/networking-stuff/890b041877465f31475d4692f23a973bcb8ccecc/github.com/trema/trema/unittests/lib/test_packets/icmp6_echo_rep.cap -------------------------------------------------------------------------------- /github.com/trema/trema/unittests/lib/test_packets/icmp6_echo_req.cap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mindreframer/networking-stuff/890b041877465f31475d4692f23a973bcb8ccecc/github.com/trema/trema/unittests/lib/test_packets/icmp6_echo_req.cap -------------------------------------------------------------------------------- /github.com/trema/trema/unittests/lib/test_packets/icmp_echo_rep.cap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mindreframer/networking-stuff/890b041877465f31475d4692f23a973bcb8ccecc/github.com/trema/trema/unittests/lib/test_packets/icmp_echo_rep.cap -------------------------------------------------------------------------------- /github.com/trema/trema/unittests/lib/test_packets/icmp_echo_req.cap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mindreframer/networking-stuff/890b041877465f31475d4692f23a973bcb8ccecc/github.com/trema/trema/unittests/lib/test_packets/icmp_echo_req.cap -------------------------------------------------------------------------------- /github.com/trema/trema/unittests/lib/test_packets/igmp_query_v2.cap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mindreframer/networking-stuff/890b041877465f31475d4692f23a973bcb8ccecc/github.com/trema/trema/unittests/lib/test_packets/igmp_query_v2.cap -------------------------------------------------------------------------------- /github.com/trema/trema/unittests/lib/test_packets/ipx.cap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mindreframer/networking-stuff/890b041877465f31475d4692f23a973bcb8ccecc/github.com/trema/trema/unittests/lib/test_packets/ipx.cap -------------------------------------------------------------------------------- /github.com/trema/trema/unittests/lib/test_packets/lldp.cap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mindreframer/networking-stuff/890b041877465f31475d4692f23a973bcb8ccecc/github.com/trema/trema/unittests/lib/test_packets/lldp.cap -------------------------------------------------------------------------------- /github.com/trema/trema/unittests/lib/test_packets/lldp_over_ip.cap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mindreframer/networking-stuff/890b041877465f31475d4692f23a973bcb8ccecc/github.com/trema/trema/unittests/lib/test_packets/lldp_over_ip.cap -------------------------------------------------------------------------------- /github.com/trema/trema/unittests/lib/test_packets/rarp_req.cap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mindreframer/networking-stuff/890b041877465f31475d4692f23a973bcb8ccecc/github.com/trema/trema/unittests/lib/test_packets/rarp_req.cap -------------------------------------------------------------------------------- /github.com/trema/trema/unittests/lib/test_packets/tcp.cap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mindreframer/networking-stuff/890b041877465f31475d4692f23a973bcb8ccecc/github.com/trema/trema/unittests/lib/test_packets/tcp.cap -------------------------------------------------------------------------------- /github.com/trema/trema/unittests/lib/test_packets/tcp_syn.cap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mindreframer/networking-stuff/890b041877465f31475d4692f23a973bcb8ccecc/github.com/trema/trema/unittests/lib/test_packets/tcp_syn.cap -------------------------------------------------------------------------------- /github.com/trema/trema/unittests/lib/test_packets/udp.cap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mindreframer/networking-stuff/890b041877465f31475d4692f23a973bcb8ccecc/github.com/trema/trema/unittests/lib/test_packets/udp.cap -------------------------------------------------------------------------------- /github.com/trema/trema/unittests/lib/test_packets/udp_frag_head.cap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mindreframer/networking-stuff/890b041877465f31475d4692f23a973bcb8ccecc/github.com/trema/trema/unittests/lib/test_packets/udp_frag_head.cap -------------------------------------------------------------------------------- /github.com/trema/trema/unittests/lib/test_packets/udp_frag_next.cap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mindreframer/networking-stuff/890b041877465f31475d4692f23a973bcb8ccecc/github.com/trema/trema/unittests/lib/test_packets/udp_frag_next.cap -------------------------------------------------------------------------------- /github.com/trema/trema/unittests/lib/test_packets/vtag_icmp_echo_rep.cap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mindreframer/networking-stuff/890b041877465f31475d4692f23a973bcb8ccecc/github.com/trema/trema/unittests/lib/test_packets/vtag_icmp_echo_rep.cap -------------------------------------------------------------------------------- /github.com/trema/trema/unittests/lib/test_packets/vtag_icmp_echo_req.cap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mindreframer/networking-stuff/890b041877465f31475d4692f23a973bcb8ccecc/github.com/trema/trema/unittests/lib/test_packets/vtag_icmp_echo_req.cap -------------------------------------------------------------------------------- /github.com/trema/trema/vendor/.gitignore: -------------------------------------------------------------------------------- 1 | /cmockery-20110428 2 | /oflops-0.03.trema1 3 | /openflow-1.0.0 4 | /openflow.git 5 | /openvswitch-1.2.2.trema1 6 | /phost 7 | -------------------------------------------------------------------------------- /github.com/trema/trema/vendor/cmockery-20110428.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mindreframer/networking-stuff/890b041877465f31475d4692f23a973bcb8ccecc/github.com/trema/trema/vendor/cmockery-20110428.tar.gz -------------------------------------------------------------------------------- /github.com/trema/trema/vendor/oflops-0.03.trema1.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mindreframer/networking-stuff/890b041877465f31475d4692f23a973bcb8ccecc/github.com/trema/trema/vendor/oflops-0.03.trema1.tar.gz -------------------------------------------------------------------------------- /github.com/trema/trema/vendor/openflow-1.0.0.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mindreframer/networking-stuff/890b041877465f31475d4692f23a973bcb8ccecc/github.com/trema/trema/vendor/openflow-1.0.0.tar.gz -------------------------------------------------------------------------------- /github.com/trema/trema/vendor/openflow.git.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mindreframer/networking-stuff/890b041877465f31475d4692f23a973bcb8ccecc/github.com/trema/trema/vendor/openflow.git.tar.gz -------------------------------------------------------------------------------- /github.com/trema/trema/vendor/openvswitch-1.2.2.trema1.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mindreframer/networking-stuff/890b041877465f31475d4692f23a973bcb8ccecc/github.com/trema/trema/vendor/openvswitch-1.2.2.trema1.tar.gz -------------------------------------------------------------------------------- /github.com/trema/trema/vendor/openvswitch-1.2.2_librt-check.diff: -------------------------------------------------------------------------------- 1 | diff --git a/configure.ac b/configure.ac 2 | index 99ed8f0..de43aae 100644 3 | --- a/configure.ac 4 | +++ b/configure.ac 5 | @@ -13,7 +13,7 @@ 6 | # limitations under the License. 7 | 8 | AC_PREREQ(2.64) 9 | -AC_INIT(openvswitch, 1.2.2, ovs-bugs@openvswitch.org) 10 | +AC_INIT(openvswitch, 1.2.2.trema1, ovs-bugs@openvswitch.org) 11 | NX_BUILDNR 12 | AC_CONFIG_SRCDIR([datapath/datapath.c]) 13 | AC_CONFIG_MACRO_DIR([m4]) 14 | @@ -41,6 +41,7 @@ AC_SYS_LARGEFILE 15 | 16 | AC_SEARCH_LIBS([pow], [m]) 17 | AC_SEARCH_LIBS([clock_gettime], [rt]) 18 | +AC_SEARCH_LIBS([timer_create], [rt]) 19 | 20 | OVS_CHECK_COVERAGE 21 | OVS_CHECK_NDEBUG 22 | -------------------------------------------------------------------------------- /github.com/trema/trema/vendor/packet-openflow.diff: -------------------------------------------------------------------------------- 1 | diff --git a/utilities/wireshark_dissectors/openflow/packet-openflow.c b/utilities/wireshark_dissectors/openflow/packet-openflow.c 2 | index aea00f8..8d98335 100644 3 | --- a/utilities/wireshark_dissectors/openflow/packet-openflow.c 4 | +++ b/utilities/wireshark_dissectors/openflow/packet-openflow.c 5 | @@ -766,7 +766,7 @@ static gint ett_ofp_error_msg_data = -1; 6 | void proto_reg_handoff_openflow() 7 | { 8 | openflow_handle = create_dissector_handle(dissect_openflow, proto_openflow); 9 | - dissector_add(TCP_PORT_FILTER, global_openflow_proto, openflow_handle); 10 | + dissector_add_uint(TCP_PORT_FILTER, global_openflow_proto, openflow_handle); 11 | } 12 | 13 | #define NO_STRINGS NULL 14 | -------------------------------------------------------------------------------- /github.com/trema/trema/vendor/phost/src/.gitignore: -------------------------------------------------------------------------------- 1 | .depends 2 | cli 3 | phost 4 | -------------------------------------------------------------------------------- /github.com/trema/trema/vendor/phost/src/common.c: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2009-2013 NEC Corporation 3 | 4 | This program is free software; you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License, version 2, as 6 | published by the Free Software Foundation. 7 | 8 | This program is distributed in the hope that it will be useful, 9 | but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | GNU General Public License for more details. 12 | 13 | You should have received a copy of the GNU General Public License along 14 | with this program; if not, write to the Free Software Foundation, Inc., 15 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 16 | */ 17 | 18 | #include "common.h" 19 | -------------------------------------------------------------------------------- /github.com/trema/trema/vendor/phost/src/common.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2009-2013 NEC Corporation 3 | 4 | This program is free software; you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License, version 2, as 6 | published by the Free Software Foundation. 7 | 8 | This program is distributed in the hope that it will be useful, 9 | but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | GNU General Public License for more details. 12 | 13 | You should have received a copy of the GNU General Public License along 14 | with this program; if not, write to the Free Software Foundation, Inc., 15 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 16 | */ 17 | 18 | #ifndef _COMMON_H_ 19 | #define _COMMON_H_ 20 | 21 | #include 22 | 23 | #define PKT_BUF_SIZE 1522 24 | 25 | #endif /* _COMMON_H_ */ 26 | -------------------------------------------------------------------------------- /github.com/trema/trema/vendor/ruby-ifconfig-1.2/Changelog: -------------------------------------------------------------------------------- 1 | Version 1.2 2 | - All IP addresses (v4 and v6) are ipaddr objects now. 3 | - Rework unit tests to run from rake 4 | 5 | Version 1.1 6 | - New features courtesy of Jeremy Tregunna 7 | * Fixed "command not found" error when executing "netstat" on some of the BSD's 8 | * Added support for Darwin and DragonFly BSD 9 | * Added unit tests for Darwin and DragonFly as well as ifconfig examples 10 | * Added three methods (1 public, 2 private) to common/ifconfig.rb: 11 | - valid_addr? - Checks the supplied type and executes one of two private 12 | methods to verify that the specified address is valid. Returns false if not. 13 | 14 | - valid_v4? and valid_v6? private methods will return true if the supplied 15 | address is a valid ipv4 or ipv6 address (respectfully). 16 | 17 | -------------------------------------------------------------------------------- /github.com/trema/trema/vendor/ruby-ifconfig-1.2/Rakefile: -------------------------------------------------------------------------------- 1 | require 'rake' 2 | require 'rake/testtask' 3 | 4 | $VERBOSE = true 5 | 6 | desc "Run all unit tests" 7 | task :default => [ :test_units ] 8 | 9 | desc "Run the unit tests in test/" 10 | task :test_units do 11 | Dir.glob('test/unit/*').each do |t| 12 | puts `/usr/bin/env ruby #{t}` 13 | end 14 | end 15 | -------------------------------------------------------------------------------- /github.com/trema/trema/vendor/ruby-ifconfig-1.2/TODO: -------------------------------------------------------------------------------- 1 | $Id: TODO,v 1.1.1.1 2005/07/02 19:10:57 hobe Exp $ 2 | 3 | Clean up code to reduce duplicate code as much as possible. 4 | 5 | Test on more platforms 6 | 7 | Add concept of 'sub platform'. For example BSD->NetBSD1.4 might be different 8 | from BSD->NetBSD1.5 9 | -------------------------------------------------------------------------------- /github.com/trema/trema/vendor/ruby-ifconfig-1.2/ifconfig_examples/darwin.txt: -------------------------------------------------------------------------------- 1 | lo0: flags=8049 mtu 16384 2 | inet6 ::1 prefixlen 128 3 | inet6 fe80::1 prefixlen 64 scopeid 0x1 4 | inet 127.0.0.1 netmask 0xff000000 5 | gif0: flags=8010 mtu 1280 6 | stf0: flags=0<> mtu 1280 7 | en0: flags=8863 mtu 1500 8 | inet6 fe80::203:93ff:fe0a:1676 prefixlen 64 scopeid 0x4 9 | inet 192.168.0.14 netmask 0xffffff00 broadcast 192.168.0.255 10 | inet6 2001:5c0:8116::203:93ff:fe0a:1676 prefixlen 64 autoconf 11 | ether 00:03:93:0a:16:76 12 | media: autoselect (100baseTX ) status: active 13 | supported media: none autoselect 10baseT/UTP 10baseT/UTP 10baseT/UTP 100baseTX 100baseTX 100baseTX 14 | fw0: flags=8822 mtu 2030 15 | lladdr 00:03:93:ff:fe:0a:16:76 16 | media: autoselect status: inactive 17 | supported media: autoselect 18 | -------------------------------------------------------------------------------- /github.com/trema/trema/vendor/ruby-ifconfig-1.2/ifconfig_examples/dragonflybsd.txt: -------------------------------------------------------------------------------- 1 | rl0: flags=8843 mtu 1500 2 | inet6 fe80::202:44ff:fe8f:bb15%rl0 prefixlen 64 scopeid 0x2 3 | inet 192.168.1.24 netmask 0xffffff00 broadcast 192.168.1.255 4 | ether 00:02:44:8f:bb:15 5 | media: Ethernet autoselect (100baseTX ) 6 | status: active 7 | lo0: flags=8049 mtu 16384 8 | inet6 ::1 prefixlen 128 9 | inet6 fe80::1%lo0 prefixlen 64 scopeid 0x4 10 | inet 127.0.0.1 netmask 0xff000000 11 | -------------------------------------------------------------------------------- /github.com/trema/trema/vendor/ruby-ifconfig-1.2/ifconfig_examples/dragonflybsd_netstat.txt: -------------------------------------------------------------------------------- 1 | ppp0: flags=8010 mtu 1500 2 | sl0: flags=c010 mtu 552 3 | faith0: flags=8002 mtu 1500 4 | Name Mtu Network Address Ipkts Ierrs Opkts Oerrs Coll 5 | rl0 1500 00:02:44:8f:bb:15 606 0 549 0 0 6 | rl0 1500 fe80:2::202 fe80:2::202:44ff: 0 - 0 - - 7 | rl0 1500 192.168.1 192.168.1.24 605 - 544 - - 8 | lo0 16384 0 0 0 0 0 9 | lo0 16384 ::1/128 ::1 0 - 0 - - 10 | lo0 16384 fe80:4::1/6 fe80:4::1 0 - 0 - - 11 | lo0 16384 127 127.0.0.1 0 - 0 - - 12 | ppp0* 1500 0 0 0 0 0 13 | sl0* 552 0 0 0 0 0 14 | faith0* 1500 0 0 0 0 0 15 | -------------------------------------------------------------------------------- /github.com/trema/trema/vendor/ruby-ifconfig-1.2/ifconfig_examples/freebsd.txt: -------------------------------------------------------------------------------- 1 | xl0: flags=8843 mtu 1500 2 | options=3 3 | inet 192.168.0.2 netmask 0xffffff00 broadcast 192.168.0.255 4 | inet6 fe80::201:2ff:fec6:4bea%xl0 prefixlen 64 scopeid 0x1 5 | ether 00:01:02:c6:4b:ea 6 | media: Ethernet autoselect (100baseTX ) 7 | status: active 8 | rl0: flags=8943 mtu 1500 9 | inet 10.0.0.10 netmask 0xffffff00 broadcast 10.0.0.255 10 | inet6 fe80::200:21ff:fe03:8e1%rl0 prefixlen 64 scopeid 0x1 11 | ether 00:00:21:03:08:e1 12 | media: Ethernet autoselect (100baseTX ) 13 | status: active 14 | lo0: flags=8049 mtu 16384 15 | inet6 ::1 prefixlen 128 16 | inet6 fe80::1%lo0 prefixlen 64 scopeid 0x2 17 | inet 127.0.0.1 netmask 0xff000000 18 | -------------------------------------------------------------------------------- /github.com/trema/trema/vendor/ruby-ifconfig-1.2/ifconfig_examples/netbsd.txt: -------------------------------------------------------------------------------- 1 | cs0: flags=8863 mtu 1500 2 | address: 08:00:2b:81:62:ca 3 | media: Ethernet 10baseT 4 | status: active 5 | inet 192.168.0.3 netmask 0xffffff00 broadcast 192.168.0.255 6 | inet6 fe80::a00:2bff:fe81:62ca%cs0 prefixlen 64 scopeid 0x1 7 | lo0: flags=8009 mtu 33220 8 | inet 127.0.0.1 netmask 0xff000000 9 | inet6 fe80::1%lo0 prefixlen 64 scopeid 0x2 10 | inet6 ::1 prefixlen 128 11 | -------------------------------------------------------------------------------- /github.com/trema/trema/vendor/ruby-ifconfig-1.2/ifconfig_examples/sunos.txt: -------------------------------------------------------------------------------- 1 | lo0: flags=1000849 mtu 8232 index 1 2 | inet 127.0.0.1 netmask ff000000 3 | inet6 ::1/128 4 | bge0: flags=1000843 mtu 1500 index 2 5 | inet 10.32.4.138 netmask ffffff00 broadcast 10.32.4.255 6 | ether 0:3:ba:42:9d:ef 7 | inet6 fe80::a00:20ff:fe72:9724/10 8 | le1: flags=1000843 mtu 1500 index 3 9 | inet 172.16.254.99 netmask ffff0000 broadcast 172.16.255.255 10 | ether 8:0:20:1d:71:eb 11 | -------------------------------------------------------------------------------- /github.com/trema/trema/vendor/ruby-ifconfig-1.2/lib/ifconfig/bsd/network_types.rb: -------------------------------------------------------------------------------- 1 | # $Id: network_types.rb,v 1.1.1.1 2005/07/02 19:10:58 hobe Exp $ 2 | # 3 | require 'ifconfig/common/network_types' 4 | -------------------------------------------------------------------------------- /github.com/trema/trema/vendor/ruby-ifconfig-1.2/lib/ifconfig/sunos/network_types.rb: -------------------------------------------------------------------------------- 1 | # $Id: network_types.rb,v 1.1.1.1 2005/07/02 19:10:57 hobe Exp $ 2 | # 3 | 4 | require 'ifconfig/common/network_types' 5 | -------------------------------------------------------------------------------- /github.com/trema/trema/vendor/ruby-ifconfig-1.2/test/test_bsd.rb: -------------------------------------------------------------------------------- 1 | #!/usr/bin/ruby -w 2 | 3 | $: << File.dirname(__FILE__) + "/../lib" 4 | 5 | require 'ifconfig' 6 | require 'pp' 7 | 8 | ifcfg = IO.readlines('../ifconfig_examples/freebsd.txt').join 9 | netstat = IO.readlines('../ifconfig_examples/freebsd_netstat.txt').join 10 | 11 | ifconfig = IfconfigWrapper.new('BSD',ifcfg,netstat).parse 12 | 13 | puts "Interfaces: (ifconfig.interfaces)" 14 | pp ifconfig.interfaces 15 | 16 | puts "\nrl0 mac address: (ifconfig['rl0'].mac)" 17 | pp ifconfig['rl0'].mac 18 | 19 | puts "\nIpV4 addresses on rl0: (ifconfig['rl0'].addresses('inet'))" 20 | pp ifconfig['rl0'].addresses('inet') 21 | 22 | puts "\nAll addresses reported by ifconfig: (ifconfig.addresses)" 23 | pp ifconfig.addrs_with_type 24 | 25 | puts "\nList of address types for rl0: (ifconfig['rl0'].addr_types)" 26 | pp ifconfig['rl0'].addr_types 27 | 28 | puts "\niconfig.each { block }" 29 | ifconfig.each do |iface| 30 | pp iface.name if iface.up? 31 | end 32 | 33 | puts 34 | s = ifconfig.to_s 35 | puts s 36 | -------------------------------------------------------------------------------- /github.com/trema/trema/vendor/ruby-ifconfig-1.2/test/test_darwin.rb: -------------------------------------------------------------------------------- 1 | #!/usr/bin/ruby -w 2 | 3 | $: << File.dirname(__FILE__) + "/../lib" 4 | 5 | require 'ifconfig' 6 | require 'pp' 7 | 8 | sample = IO.readlines('../ifconfig_examples/darwin.txt').join 9 | ifconfig = IfconfigWrapper.new('BSD',sample).parse 10 | 11 | puts "Interfaces: (ifconfig.interfaces)" 12 | pp ifconfig.interfaces 13 | 14 | puts "\nen0 mac address: (ifconfig['en0'].mac)" 15 | pp ifconfig['en0'].mac 16 | 17 | puts "\nIpV4 addresses on en0: (ifconfig['en0'].addresses('inet'))" 18 | pp ifconfig['en0'].addresses('inet') 19 | 20 | puts "\nAll addresses reported by ifconfig: (ifconfig.addresses)" 21 | pp ifconfig.addrs_with_type 22 | 23 | puts "\nList of address types for en0: (ifconfig['en0'].addr_types)" 24 | pp ifconfig['en0'].addr_types 25 | 26 | puts "\niconfig.each { block }" 27 | ifconfig.each do |iface| 28 | pp iface.name if iface.up? 29 | end 30 | 31 | puts 32 | s = ifconfig.to_s 33 | puts s 34 | -------------------------------------------------------------------------------- /github.com/trema/trema/vendor/ruby-ifconfig-1.2/test/test_dragonflybsd.rb: -------------------------------------------------------------------------------- 1 | #!/usr/bin/ruby -w 2 | 3 | $: << File.dirname(__FILE__) + "/../lib" 4 | 5 | require 'ifconfig' 6 | require 'pp' 7 | 8 | ifcfg = IO.readlines('../ifconfig_examples/dragonflybsd.txt').join 9 | netstat = IO.readlines('../ifconfig_examples/dragonflybsd_netstat.txt').join 10 | 11 | ifconfig = IfconfigWrapper.new('BSD',ifcfg,netstat).parse 12 | 13 | puts "Interfaces: (ifconfig.interfaces)" 14 | pp ifconfig.interfaces 15 | 16 | puts "\nrl0 mac address: (ifconfig['rl0'].mac)" 17 | pp ifconfig['rl0'].mac 18 | 19 | puts "\nIpV4 addresses on rl0: (ifconfig['rl0'].addresses('inet'))" 20 | pp ifconfig['rl0'].addresses('inet') 21 | 22 | puts "\nAll addresses reported by ifconfig: (ifconfig.addresses)" 23 | pp ifconfig.addrs_with_type 24 | 25 | puts "\nList of address types for rl0: (ifconfig['rl0'].addr_types)" 26 | pp ifconfig['rl0'].addr_types 27 | 28 | puts "\niconfig.each { block }" 29 | ifconfig.each do |iface| 30 | pp iface.name if iface.up? 31 | end 32 | 33 | puts 34 | s = ifconfig.to_s 35 | puts s 36 | -------------------------------------------------------------------------------- /github.com/trema/trema/vendor/ruby-ifconfig-1.2/test/test_helper.rb: -------------------------------------------------------------------------------- 1 | $: << File.dirname(__FILE__)+'/../lib' 2 | require 'ifconfig' 3 | require 'test/unit' 4 | require 'pp' 5 | -------------------------------------------------------------------------------- /github.com/trema/trema/vendor/ruby-ifconfig-1.2/test/test_linux.rb: -------------------------------------------------------------------------------- 1 | #!/usr/bin/ruby -w 2 | 3 | $: << File.dirname(__FILE__) + "/../lib" 4 | 5 | 6 | require 'ifconfig' 7 | require 'pp' 8 | 9 | sample = IO.readlines('../ifconfig_examples/linux.txt').join 10 | ifconfig = IfconfigWrapper.new('Linux',sample).parse 11 | 12 | puts "Interfaces: (ifconfig.interfaces)" 13 | pp ifconfig.interfaces 14 | 15 | puts "\neth0 mac address: (ifconfig['eth0'].mac)" 16 | pp ifconfig['eth0'].mac 17 | 18 | puts "\nIpV4 addresses on eth0: (ifconfig['eth0'].addresses('inet'))" 19 | pp ifconfig['eth0'].addresses('inet') 20 | 21 | puts "\nAll addresses reported by ifconfig: (ifconfig.addresses)" 22 | pp ifconfig.addrs_with_type 23 | 24 | puts "\niconfig.each { block }" 25 | ifconfig.each do |iface| 26 | pp iface.name if iface.up? 27 | end 28 | 29 | puts 30 | s = ifconfig.to_s 31 | puts s 32 | -------------------------------------------------------------------------------- /github.com/trema/trema/vendor/ruby-ifconfig-1.2/test/test_netbsd.rb: -------------------------------------------------------------------------------- 1 | #!/usr/bin/ruby -w 2 | 3 | $: << File.dirname(__FILE__) + "/../lib" 4 | 5 | require 'ifconfig' 6 | require 'pp' 7 | 8 | sample = IO.readlines('../ifconfig_examples/netbsd.txt').join 9 | ifconfig = IfconfigWrapper.new('BSD',sample).parse 10 | 11 | puts "Interfaces: (ifconfig.interfaces)" 12 | pp ifconfig.interfaces 13 | 14 | puts "\ncs0 mac address: (ifconfig['cs0'].mac)" 15 | pp ifconfig['cs0'].mac 16 | 17 | puts "\nIpV4 addresses on cs0: (ifconfig['cs0'].addresses('inet'))" 18 | pp ifconfig['cs0'].addresses('inet') 19 | 20 | puts "\nAll addresses reported by ifconfig: (ifconfig.addresses)" 21 | pp ifconfig.addrs_with_type 22 | 23 | puts "\nList of address types for cs0: (ifconfig['cs0'].addr_types)" 24 | pp ifconfig['cs0'].addr_types 25 | 26 | puts "\niconfig.each { block }" 27 | ifconfig.each do |iface| 28 | pp iface.name if iface.up? 29 | end 30 | 31 | puts 32 | s = ifconfig.to_s 33 | puts s 34 | -------------------------------------------------------------------------------- /github.com/trema/trema/vendor/ruby-ifconfig-1.2/test/test_openbsd.rb: -------------------------------------------------------------------------------- 1 | #!/usr/bin/ruby -w 2 | 3 | $: << File.dirname(__FILE__) + "/../lib" 4 | 5 | require 'ifconfig' 6 | require 'pp' 7 | 8 | sample = IO.readlines('../ifconfig_examples/openbsd.txt').join 9 | ifconfig = IfconfigWrapper.new('BSD',sample).parse 10 | 11 | puts "Interfaces: (ifconfig.interfaces)" 12 | pp ifconfig.interfaces 13 | 14 | puts "\nxl0 mac address: (ifconfig['xl0'].mac)" 15 | pp ifconfig['xl0'].mac 16 | 17 | puts "\nIpV4 addresses on xl0: (ifconfig['xl0'].addresses('inet'))" 18 | pp ifconfig['xl0'].addresses('inet') 19 | 20 | puts "\nAll addresses reported by ifconfig: (ifconfig.addresses)" 21 | pp ifconfig.addrs_with_type 22 | 23 | puts "\nList of address types for xl0: (ifconfig['xl0'].addr_types)" 24 | pp ifconfig['xl0'].addr_types 25 | 26 | puts "\niconfig.each { block }" 27 | ifconfig.each do |iface| 28 | pp iface.name if iface.up? 29 | end 30 | 31 | puts 32 | s = ifconfig.to_s 33 | puts s 34 | -------------------------------------------------------------------------------- /github.com/trema/trema/vendor/ruby-ifconfig-1.2/test/test_sunos.rb: -------------------------------------------------------------------------------- 1 | #!/usr/bin/ruby -w 2 | 3 | $: << File.dirname(__FILE__) + "/../lib" 4 | 5 | # 6 | #imaptest1# netstat -in 7 | #Name Mtu Net/Dest Address Ipkts Ierrs Opkts Oerrs Collis Queue 8 | #lo0 8232 0.0.0.0 0.0.0.4 267824 0 267824 0 0 0 9 | #bge0 1500 10.0.0.0 10.32.4.138 10935939 0 7741167 0 0 0 10 | require 'ifconfig' 11 | require 'pp' 12 | 13 | sample = IO.readlines('../ifconfig_examples/sunos.txt').join 14 | ifconfig = IfconfigWrapper.new('SunOS',sample).parse 15 | 16 | puts "Interfaces: (ifconfig.interfaces)" 17 | pp ifconfig.interfaces 18 | 19 | puts "\nbge0 mac address: (ifconfig['bge0'].mac)" 20 | pp ifconfig['bge0'].mac 21 | 22 | puts "\nIpV4 addresses on bge0: (ifconfig['bge0'].addresses('inet'))" 23 | pp ifconfig['bge0'].addresses('inet') 24 | 25 | puts "\nAll addresses reported by ifconfig: (ifconfig.addresses)" 26 | pp ifconfig.addrs_with_type 27 | 28 | puts "\niconfig.each { block }" 29 | ifconfig.each do |iface| 30 | pp iface.name if iface.up? 31 | end 32 | 33 | puts 34 | s = ifconfig.to_s 35 | puts s 36 | -------------------------------------------------------------------------------- /github.com/yanosz/bbkeys/.gitignore: -------------------------------------------------------------------------------- 1 | *~ 2 | -------------------------------------------------------------------------------- /github.com/yanosz/bbkeys/README.md: -------------------------------------------------------------------------------- 1 | bbkeys 2 | ====== 3 | 4 | This repository contains all keys used in ff-kbu's backbone vpn 5 | -------------------------------------------------------------------------------- /github.com/yanosz/bbkeys/backup: -------------------------------------------------------------------------------- 1 | Subnet=172.27.255.8/32 2 | Address=backup.kbu.freifunk.net 3 | Compression=9 4 | 5 | -----BEGIN RSA PUBLIC KEY----- 6 | MIIBCgKCAQEAykFSGNAXqwmc9VCqHn/QbsC/kfE7vs+crPK/UoapVH/IWHpGXITc 7 | /f0zXh3+0JCyWNE/DzzE6h6ayEmWZ4pKAQxle6TfZa1fkDwU5snxImyUMsM6FrtN 8 | GT8X5OGVQ8HCvd1s2uzgk8RDLppAQcGu51+74OFqUBrc566WXtfqtZpwO7QosAPz 9 | dW8TYQVU+g97ICvtwGbaSFDJh9C1FW+fpdRzKpvp6a9s8Ma5OBX1NymZf1Mh4htM 10 | IUVhu65lKuTV2K/2Z3vI+lxAha7tg24+nEw4zeAtdphuLKhN94mvzeeitQj9d9qF 11 | xv3KZIp3XPkriSyjJw7REk/KADQ6O379TwIDAQAB 12 | -----END RSA PUBLIC KEY----- 13 | -------------------------------------------------------------------------------- /github.com/yanosz/bbkeys/collectd: -------------------------------------------------------------------------------- 1 | Subnet=172.27.255.6 2 | Address=collectd.kbu.freifunk.net 3 | Compression=9 4 | 5 | -----BEGIN RSA PUBLIC KEY----- 6 | MIIBCgKCAQEA4ucPczCFsFBLgk/sQ2LgmOXLJWMLW0X5tzI5+tj/NN0x27RwJ+04 7 | kyLqsYPE5mRuSBAQMOgAqwwCE/3djQNENh5XKS9WIJKjEpShYMjiIiSq6bA3TaH9 8 | njlGC9jb5HskbgXyu51sMyXEYacRBRplcxZ+p02Fws5YVUgnTSAAzc1SQGFtguhk 9 | 1HBd/p4o/3acPJZ3SbrHPtXshjcfjk8UO3txgtgmSvAjjCJSp/fxpOkHj++lZOLf 10 | uwigujW+XZq3C3wE9yWPlrtuugkIwyxRm5/XAjXKpEsKqTbhajiOwXDi0f/gLFqK 11 | oOo85rdq1q1TZ/u6kTOS8t2pDfLpVyOl0QIDAQAB 12 | -----END RSA PUBLIC KEY----- 13 | 14 | -------------------------------------------------------------------------------- /github.com/yanosz/bbkeys/fastd3: -------------------------------------------------------------------------------- 1 | Subnet=172.27.255.9/32 2 | #Subnet=172.27.0.0/16 # Not to be used - packet loss 3 | 4 | #Subnet=172.27.8.0/21 # Not to be used - packet loss 5 | 6 | -----BEGIN RSA PUBLIC KEY----- 7 | MIIBCgKCAQEAwxKV1I1kcwP0pbpKIPXbv87KM9vyoiavUs/2aKCzO4GrC4R1D93+ 8 | rZ1Vw3PQ7OHaJ4Al/3IaInym9YdnM0ePduCV8MLiiHtyAqJNpOL6uBmzA6hgwDWe 9 | jaa2uaaDcejo11JXGi4rqKgzqSucxF/G/8+l6kkbAbzP09qKHGbi8TAelWKSnHjT 10 | H5+O+5YDXghxVKAvNELDNIek3FjH/WU215AkCsb5QylSJeeXpCl/g/OapgxO6oLN 11 | nAGYAVDcJpCGVt5GWQNWrMLYkB3VMQAoIFgSqVpfVbYk/u/LkwPtl0AWx0l8S10d 12 | 7SKN/O2b4S0AujxIDtgsGubFCz0XrU6JMQIDAQAB 13 | -----END RSA PUBLIC KEY----- 14 | -------------------------------------------------------------------------------- /github.com/yanosz/bbkeys/felicitas: -------------------------------------------------------------------------------- 1 | Subnet=172.27.255.4/32 2 | Subnet=195.54.164.203/32 3 | Compression=9 4 | Address=felicitas.kbu.freifunk.net 5 | 6 | -----BEGIN RSA PUBLIC KEY----- 7 | MIIBCgKCAQEA1kB3a9C1+b+ZwAs8JbPkXRBYOmXWvldgwV7sXa9tnIzGn9HgIPxD 8 | WyXwmrj+yomAkgEu+ziWrFZkvZtF7M61k42xlusBrMgTmUmIPSoBZRJhFFpugD0F 9 | dgzVwpldP+2eDbrqq1dmtqL6IItHUhCeYSE9pNSVCstp4f3V4zIN9r77uk37jEaq 10 | SiHN5gaGLG8q+907yu9KSGD8bNDw3+Iz5weC+dKK/UpCUK+rdID5F+SFRUMA19yR 11 | Zod9ZSDR8okeUUkYsFyIhtryCNGv8YQrGZMUGuqO+b2HmGqbhUbdJJ+E6jwYMSoK 12 | PE7qye7o1B0Tmh1y9CuL5e3fsJp0BCjimQIDAQAB 13 | -----END RSA PUBLIC KEY----- 14 | -------------------------------------------------------------------------------- /github.com/yanosz/bbkeys/jenkins: -------------------------------------------------------------------------------- 1 | Subnet=172.27.255.7/32 2 | 3 | -----BEGIN RSA PUBLIC KEY----- 4 | MIIBCgKCAQEA2yQB+RewoQduIIwPpNizk0S0uG4E9F1d/ldi0I7ouBrJN3muv4aV 5 | MHqWV4/FN+S1QVZ05PU0NPlMIPu4fv6pFiED7r9ICezvbyOh8dtKjZWRPT+k8AY/ 6 | aTmge/J/T1bo5cfts9wG0FlO7fTHd7Od9ufzmdKrQal4dVFrxqj9y814dkTBd7zQ 7 | wF+xwWMeTXMCO7H4pp0HKN9cp67zfHoy8VlQaWRfOajExliJaGr+3P4LkagNgJzI 8 | e9yc254QSp/484RkwGmAFPuZG4qLdIabCRkeMMGXWtfWF+CYPyiOHzvhF91Q+oSV 9 | tRgOcgikAPzj67lCm75WzvNSCul+ZVZrTQIDAQAB 10 | -----END RSA PUBLIC KEY----- 11 | -------------------------------------------------------------------------------- /github.com/yanosz/bbkeys/kif: -------------------------------------------------------------------------------- 1 | Subnet=172.27.255.5/32 2 | Subnet=195.54.164.204/32 3 | Subnet=172.27.0.0/21 4 | Subnet=172.27.0.0/15 5 | Address=kif.kbu.freifunk.net 6 | 7 | 8 | -----BEGIN RSA PUBLIC KEY----- 9 | MIIBCgKCAQEAr2gULqcqmqH/Tt/dpldI+Su4FHlgSX+uDnI72q1sje905hGGVK9p 10 | 6wj4ZJJLCSbgrAFfPLaaOwoWUxXEZA8O+6QvSU1BnBo1lkGgvcrSlytecHoLu00V 11 | xj6S6CYJUBtkDU3g76ZU1cwciKD3QyaP+uiIP2NALIgxDq5EegNX4J/3YLwj5jbx 12 | PU4iRbtBTuMpOYEynwnWLC31DVEakDn3g3US3Yg2HjKBvZe7dRnYqPEaPj6YJHCK 13 | NLZslIi3vtvH3qXJtPXLGgxAm2J+XSiJnvu6siRPNvhvp2Fu7Vj5DH61mqR0gcAs 14 | JP6fCfMhozPXClAKQyG0nRm8ca960/ho/QIDAQAB 15 | -----END RSA PUBLIC KEY----- 16 | -------------------------------------------------------------------------------- /github.com/yanosz/bbkeys/paul: -------------------------------------------------------------------------------- 1 | Subnet=172.27.255.3/32 #Paul selbst 2 | Subnet=0.0.0.0/0 3 | Compression=9 4 | Address=paul.kbu.freifunk.net 5 | 6 | -----BEGIN RSA PUBLIC KEY----- 7 | MIIBCgKCAQEA8yWSDKn0i8oRca5GOasa/02xeJg0Rb7DXPFEbygpShu8quoWBpOB 8 | d4f+Sc3fuDrZUEEvQBmAQ5PNAby0VsiAmlGpD+UCONxp/DYC2iMDEgtz1hUtEHG7 9 | aOChVZ97HFyaSuH6T3o0/MNRDHyJWGCO95uvjiJKOizAtCz0uFLhN7/2Vl2Z+Da0 10 | OIEvNCFq4crml00DuRKnoUlNxxA9DZrOGwG07ef+5cGpu+G5D05TltnC9q3+s5Qm 11 | 1uFcU29OMg0HC8lCtg+RrQybHsbltsfkS1pFEsA/FsqSXN/UqLf4HQAt5yhdxLyr 12 | 7aGcY3bDcP8LVOSMnB3nC9vZp4t7VGJosQIDAQAB 13 | -----END RSA PUBLIC KEY----- 14 | -------------------------------------------------------------------------------- /github.com/yanosz/bbkeys/paula: -------------------------------------------------------------------------------- 1 | Compression=9 2 | Address=paula.kbu.freifunk.net 3 | Subnet=172.27.255.1/32 #Paula 4 | Subnet=172.27.255.2/32 #www 5 | 6 | 7 | -----BEGIN RSA PUBLIC KEY----- 8 | MIIBCgKCAQEAzW2kJKzp7aSIwOeOAIPTAcmucvifQx3ZGD6Vj4Z1vzSI+GCEk5R3 9 | CtrZHM2ukCZVA9NBcYMOOXdwka8VldFVFcMB0q44Ik1OnqibVnWqUpezWTNgk2C9 10 | OlB6zcY4b6UuUN/UjKoYx5u4jk44n8CrGZtMlx0x6iUUNSOkjwWiP7Mi1KLeIvcr 11 | JekUbYNaY5ctv5A/Nd2pfcQpQSnHHbq1z6HPSeFc8eISe6NmljaTgFj3zy5nZsUd 12 | ab6sKdjpyTAntHwG+YZKiP6U3XA4YdDoj+ODN3FHpLUjOfrw/Czb2tVDWsqU8QA0 13 | ykj1CCeKVbRaU7PbgQPmHWih2dUPXd4OKQIDAQAB 14 | -----END RSA PUBLIC KEY----- 15 | -------------------------------------------------------------------------------- /github.com/zmap/zmap/.gitignore: -------------------------------------------------------------------------------- 1 | *.o 2 | *.a 3 | *.pyc 4 | *~ 5 | \#* 6 | src/zmap 7 | CMakeFiles 8 | *.cmake 9 | Makefile 10 | CMakeCache.txt 11 | src/zopt.h 12 | src/zopt.c 13 | lexer.c 14 | lexer.h 15 | parser.c 16 | parser.h 17 | install_manifest.txt 18 | -------------------------------------------------------------------------------- /github.com/zmap/zmap/AUTHORS: -------------------------------------------------------------------------------- 1 | Zakir Durumeric 2 | J. Alex Halderman 3 | Eric Wustrow 4 | 5 | David Adrian 6 | HD Moore 7 | 8 | -------------------------------------------------------------------------------- /github.com/zmap/zmap/CHANGELOG: -------------------------------------------------------------------------------- 1 | 1.0.0 2013-8-16 2 | Initial public release. 3 | 4 | 1.0.1 2013-8-17 5 | BUGFIX Issue #4 "Missing module_ssldb? Redis module won't compile." 6 | - removed dependencies on ssldb (zakir) 7 | SUPPORT Issue #3 "Error after running make" 8 | - added documentation that zmap requires 64-bit system 9 | SUPPORT Issue #1 "Failure at calloc for 'ip_seen' on KVM VPSs?" 10 | - added documentation on memory requirements for zmap 11 | 12 | 1.0.2 2013-8-18 13 | BUGFIX Issue #14 "gcc 4.7.2 -Wunprototyped-calls error with recv_run." 14 | - changed recv_run header to match def in recv.c 15 | 16 | 1.0.3 2013-8-19 17 | BUGFIX Issues 21,28 "fixed get_gateway malloc/memset errors" 18 | BUGFIX Issue 24 "Makefile does not respect LDFLAGS" 19 | - changed = to += for CFLAGS, LDFAGS, and LDLIBS 20 | -------------------------------------------------------------------------------- /github.com/zmap/zmap/conf/zmap.conf: -------------------------------------------------------------------------------- 1 | ### Probe Module to use 2 | #probe-module tcp_synscan 3 | 4 | 5 | ### Destination port to scan 6 | #target-port 443 7 | 8 | ### Scan rate in packets/sec 9 | #rate 10000 10 | 11 | ### Scan rate in bandwidth (bits/sec); overrides `rate` 12 | #bandwidth 1M # 1mbps 13 | 14 | 15 | ### Blacklist file to use. We encourage you to exclude 16 | ### RFC1918, IANA reserved, and multicast networks, 17 | ### in addition to those who have opted out of your 18 | ### network scans. 19 | blacklist-file "/etc/zmap/blacklist.conf" 20 | 21 | ### Optionally print a summary at the end 22 | #summary 23 | -------------------------------------------------------------------------------- /github.com/zmap/zmap/examples/banner-grab-go/http-req: -------------------------------------------------------------------------------- 1 | GET / HTTP/1.1 2 | Host: %s 3 | 4 | -------------------------------------------------------------------------------- /github.com/zmap/zmap/examples/banner-grab/Makefile: -------------------------------------------------------------------------------- 1 | 2 | 3 | CFLAGS+=-I../../lib/ -Wall 4 | LDFLAGS+=-lpcap -levent -levent_extra -lm 5 | VPATH=../../lib/ 6 | 7 | # from dpkg-buildflags --get CFLAGS, but use stack-protector-all and fPIC 8 | GCCHARDENING=-g -O2 -fstack-protector-all --param=ssp-buffer-size=4 -Wformat -Wformat-security -Werror=format-security -fPIC 9 | # from gpkg-buildflags --get LDFLAGS, + -z,now 10 | LDHARDENING=-Wl,-Bsymbolic-functions -Wl,-z,relro,-z,now 11 | 12 | CFLAGS+=$(GCCHARDENING) 13 | LDFLAGS+=$(LDHARDENING) 14 | 15 | 16 | all: banner-grab-tcp 17 | 18 | banner-grab-tcp: banner-grab-tcp.o logger.o 19 | $(CC) $(CFLAGS) $^ -o $@ $(LDFLAGS) 20 | 21 | clean: 22 | rm -f banner-grab-tcp *.o 23 | -------------------------------------------------------------------------------- /github.com/zmap/zmap/examples/banner-grab/http-req: -------------------------------------------------------------------------------- 1 | GET / HTTP/1.1 2 | Host: %s 3 | 4 | -------------------------------------------------------------------------------- /github.com/zmap/zmap/examples/forge-socket/Makefile: -------------------------------------------------------------------------------- 1 | 2 | 3 | CFLAGS+=-I../../lib/ -I../../forge_socket -Wall 4 | LDFLAGS+=-lpcap -levent -levent_extra -lm 5 | VPATH=../../lib/ 6 | 7 | # from dpkg-buildflags --get CFLAGS, but use stack-protector-all and fPIC 8 | GCCHARDENING=-g -O2 -fstack-protector-all --param=ssp-buffer-size=4 -Wformat -Wformat-security -Werror=format-security -fPIC 9 | # from gpkg-buildflags --get LDFLAGS, + -z,now 10 | LDHARDENING=-Wl,-Bsymbolic-functions -Wl,-z,relro,-z,now 11 | 12 | CFLAGS+=$(GCCHARDENING) 13 | LDFLAGS+=$(LDHARDENING) 14 | 15 | 16 | all: forge-socket 17 | 18 | forge-socket: forge-socket.o logger.o 19 | $(CC) $(CFLAGS) $^ -o $@ $(LDFLAGS) 20 | 21 | clean: 22 | rm -f forge-socket *.o 23 | -------------------------------------------------------------------------------- /github.com/zmap/zmap/examples/udp-probes/citrix_1604.pkt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mindreframer/networking-stuff/890b041877465f31475d4692f23a973bcb8ccecc/github.com/zmap/zmap/examples/udp-probes/citrix_1604.pkt -------------------------------------------------------------------------------- /github.com/zmap/zmap/examples/udp-probes/db2disco_523.pkt: -------------------------------------------------------------------------------- 1 | DB2GETADDRSQL05000 -------------------------------------------------------------------------------- /github.com/zmap/zmap/examples/udp-probes/digi1_2362.pkt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mindreframer/networking-stuff/890b041877465f31475d4692f23a973bcb8ccecc/github.com/zmap/zmap/examples/udp-probes/digi1_2362.pkt -------------------------------------------------------------------------------- /github.com/zmap/zmap/examples/udp-probes/digi2_2362.pkt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mindreframer/networking-stuff/890b041877465f31475d4692f23a973bcb8ccecc/github.com/zmap/zmap/examples/udp-probes/digi2_2362.pkt -------------------------------------------------------------------------------- /github.com/zmap/zmap/examples/udp-probes/digi3_2362.pkt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mindreframer/networking-stuff/890b041877465f31475d4692f23a973bcb8ccecc/github.com/zmap/zmap/examples/udp-probes/digi3_2362.pkt -------------------------------------------------------------------------------- /github.com/zmap/zmap/examples/udp-probes/dns_53.pkt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mindreframer/networking-stuff/890b041877465f31475d4692f23a973bcb8ccecc/github.com/zmap/zmap/examples/udp-probes/dns_53.pkt -------------------------------------------------------------------------------- /github.com/zmap/zmap/examples/udp-probes/ipmi_623.pkt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mindreframer/networking-stuff/890b041877465f31475d4692f23a973bcb8ccecc/github.com/zmap/zmap/examples/udp-probes/ipmi_623.pkt -------------------------------------------------------------------------------- /github.com/zmap/zmap/examples/udp-probes/mdns_5353.pkt: -------------------------------------------------------------------------------- 1 |  _services_dns-sd_udplocal  -------------------------------------------------------------------------------- /github.com/zmap/zmap/examples/udp-probes/mssql_1434.pkt: -------------------------------------------------------------------------------- 1 |  -------------------------------------------------------------------------------- /github.com/zmap/zmap/examples/udp-probes/natpmp_5351.pkt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /github.com/zmap/zmap/examples/udp-probes/netbios_137.pkt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mindreframer/networking-stuff/890b041877465f31475d4692f23a973bcb8ccecc/github.com/zmap/zmap/examples/udp-probes/netbios_137.pkt -------------------------------------------------------------------------------- /github.com/zmap/zmap/examples/udp-probes/ntp_123.pkt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mindreframer/networking-stuff/890b041877465f31475d4692f23a973bcb8ccecc/github.com/zmap/zmap/examples/udp-probes/ntp_123.pkt -------------------------------------------------------------------------------- /github.com/zmap/zmap/examples/udp-probes/pca_nq_5632.pkt: -------------------------------------------------------------------------------- 1 | NQ -------------------------------------------------------------------------------- /github.com/zmap/zmap/examples/udp-probes/pca_st_5632.pkt: -------------------------------------------------------------------------------- 1 | ST -------------------------------------------------------------------------------- /github.com/zmap/zmap/examples/udp-probes/portmap_111.pkt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mindreframer/networking-stuff/890b041877465f31475d4692f23a973bcb8ccecc/github.com/zmap/zmap/examples/udp-probes/portmap_111.pkt -------------------------------------------------------------------------------- /github.com/zmap/zmap/examples/udp-probes/sentinel_5093.pkt: -------------------------------------------------------------------------------- 1 | z -------------------------------------------------------------------------------- /github.com/zmap/zmap/examples/udp-probes/snmp1_161.pkt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mindreframer/networking-stuff/890b041877465f31475d4692f23a973bcb8ccecc/github.com/zmap/zmap/examples/udp-probes/snmp1_161.pkt -------------------------------------------------------------------------------- /github.com/zmap/zmap/examples/udp-probes/snmp2_161.pkt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mindreframer/networking-stuff/890b041877465f31475d4692f23a973bcb8ccecc/github.com/zmap/zmap/examples/udp-probes/snmp2_161.pkt -------------------------------------------------------------------------------- /github.com/zmap/zmap/examples/udp-probes/upnp_1900.pkt: -------------------------------------------------------------------------------- 1 | M-SEARCH * HTTP/1.1 2 | Host:239.255.255.250:1900 3 | ST:upnp:rootdevice 4 | Man:"ssdp:discover" 5 | MX:3 6 | 7 | 8 | -------------------------------------------------------------------------------- /github.com/zmap/zmap/examples/udp-probes/wdbrpc_17185.pkt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mindreframer/networking-stuff/890b041877465f31475d4692f23a973bcb8ccecc/github.com/zmap/zmap/examples/udp-probes/wdbrpc_17185.pkt -------------------------------------------------------------------------------- /github.com/zmap/zmap/examples/udp-probes/wsd_3702.pkt: -------------------------------------------------------------------------------- 1 | 2 | 3 | urn:schemas-xmlsoap-org:ws:2005:04:discoveryhttp://schemas.xmlsoap.org/ws/2005/04/discovery/Probeurn:uuid:ce04dad0-5d2c-4026-9146-1aabfc1e4111wsdp:Device 4 | -------------------------------------------------------------------------------- /github.com/zmap/zmap/lib/blacklist.h: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | #ifndef BLACKLIST_H 5 | #define BLACKLIST_H 6 | 7 | uint32_t blacklist_lookup_index(uint64_t index); 8 | int blacklist_is_allowed(uint32_t s_addr); 9 | void blacklist_prefix(char *ip, int prefix_len); 10 | void whitelist_prefix(char *ip, int prefix_len); 11 | int blacklist_init(char *whitelist, char *blacklist, 12 | char **whitelist_entries, 13 | size_t whitelist_entries_len, 14 | char **blacklist_entries, 15 | size_t blacklist_entries_len); 16 | uint64_t blacklist_count_allowed(); 17 | uint64_t blacklist_count_not_allowed(); 18 | 19 | #endif 20 | -------------------------------------------------------------------------------- /github.com/zmap/zmap/lib/constraint.h: -------------------------------------------------------------------------------- 1 | #ifndef CONSTRAINT_H 2 | #define CONSTRAINT_H 3 | 4 | #include 5 | 6 | typedef struct _constraint constraint_t; 7 | typedef unsigned int value_t; 8 | 9 | constraint_t* constraint_init(value_t value); 10 | void constraint_free(constraint_t *con); 11 | void constraint_set(constraint_t *con, uint32_t prefix, int len, value_t value); 12 | value_t constraint_lookup_ip(constraint_t *con, uint32_t address); 13 | uint64_t constraint_count_ips(constraint_t *con, value_t value); 14 | uint32_t constraint_lookup_index(constraint_t *con, uint64_t index, value_t value); 15 | void constraint_paint_value(constraint_t *con, value_t value); 16 | 17 | #endif //_CONSTRAINT_H 18 | -------------------------------------------------------------------------------- /github.com/zmap/zmap/lib/logger.h: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | #ifndef LOGGER_H 5 | #define LOGGER_H 6 | 7 | enum LogLevel { LOG_FATAL, LOG_ERROR, LOG_WARN, LOG_INFO, LOG_DEBUG, LOG_TRACE, 8 | NUM_LOGLEVELS }; 9 | 10 | int log_fatal(const char *loggerName, const char *logMessage, ...) __attribute__((noreturn)); 11 | 12 | int log_error(const char *loggerName, const char *logMessage, ...); 13 | 14 | int log_warn(const char *loggerName, const char *logMessage, ...); 15 | 16 | int log_info(const char *loggerName, const char *logMessage, ...); 17 | 18 | int log_debug(const char *loggerName, const char *logMessage, ...); 19 | 20 | int log_trace(const char *loggerName, const char *logMessage, ...); 21 | 22 | int log_init(FILE *stream, enum LogLevel level); 23 | 24 | size_t dstrftime(char *, size_t, const char *, double); 25 | 26 | double now(); 27 | 28 | #endif // _LOGGER_H 29 | 30 | -------------------------------------------------------------------------------- /github.com/zmap/zmap/lib/pbm.h: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | uint64_t** pbm_init(void); 4 | int pbm_check(uint64_t **b, uint32_t v); 5 | void pbm_set(uint64_t **b, uint32_t v); 6 | -------------------------------------------------------------------------------- /github.com/zmap/zmap/lib/random.c: -------------------------------------------------------------------------------- 1 | /* 2 | * ZMap Copyright 2013 Regents of the University of Michigan 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not 5 | * use this file except in compliance with the License. You may obtain a copy 6 | * of the License at http://www.apache.org/licenses/LICENSE-2.0 7 | */ 8 | 9 | #include "random.h" 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | 16 | #define RANDSRC "/dev/urandom" 17 | 18 | int random_bytes(void *dst, size_t n) 19 | { 20 | FILE *f = fopen(RANDSRC, "rb"); 21 | assert(f); 22 | size_t r = fread(dst, n, 1, f); 23 | fclose(f); 24 | if (r < 1) { 25 | return 0; 26 | } 27 | return 1; 28 | } 29 | -------------------------------------------------------------------------------- /github.com/zmap/zmap/lib/random.h: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | #ifndef RANDOM_H 5 | #define RANDOM_H 6 | 7 | int random_bytes(void *dst, size_t n); 8 | 9 | #endif 10 | -------------------------------------------------------------------------------- /github.com/zmap/zmap/lib/stack.c: -------------------------------------------------------------------------------- 1 | #include "stack.h" 2 | #include "../lib/xalloc.h" 3 | 4 | #include 5 | 6 | struct stack { 7 | size_t max_size; 8 | size_t cur_size; 9 | void** arr; 10 | }; 11 | 12 | stack_t* alloc_stack(size_t size) 13 | { 14 | stack_t* stack = xmalloc(sizeof(stack_t)); 15 | stack->arr = xcalloc(size, sizeof(void*)); 16 | stack->max_size = size; 17 | stack->cur_size = 0; 18 | return stack; 19 | } 20 | 21 | void free_stack(stack_t* stack) 22 | { 23 | xfree(stack->arr); 24 | xfree(stack); 25 | } 26 | 27 | void push(stack_t* stack, void* elt) 28 | { 29 | if (stack->cur_size == stack->max_size) { 30 | stack->max_size *= 2; 31 | xrealloc(stack->arr, stack->max_size); 32 | } 33 | stack->arr[stack->cur_size++] = elt; 34 | } 35 | 36 | void* pop(stack_t* stack) 37 | { 38 | void* res = stack->arr[--stack->cur_size]; 39 | return res; 40 | } 41 | -------------------------------------------------------------------------------- /github.com/zmap/zmap/lib/stack.h: -------------------------------------------------------------------------------- 1 | #ifndef ZMAP_STACK_H 2 | #define ZMAP_STACK_H 3 | 4 | #include 5 | 6 | struct stack; 7 | typedef struct stack stack_t; 8 | 9 | stack_t* alloc_stack(size_t size); 10 | void free_stack(stack_t* stack); 11 | 12 | void push(stack_t* stack, void* elt); 13 | void* pop(stack_t* stack); 14 | 15 | #endif /* ZMAP_STACK_H */ -------------------------------------------------------------------------------- /github.com/zmap/zmap/lib/xalloc.c: -------------------------------------------------------------------------------- 1 | #include "xalloc.h" 2 | #include "../lib/logger.h" 3 | 4 | #include 5 | 6 | void die() __attribute__((noreturn)); 7 | 8 | void* xcalloc(size_t count, size_t size) 9 | { 10 | void* res = calloc(count, size); 11 | if (res == NULL) { 12 | die(); 13 | } 14 | return res; 15 | } 16 | 17 | void xfree(void *ptr) 18 | { 19 | free(ptr); 20 | } 21 | 22 | void* xmalloc(size_t size) 23 | { 24 | void* res = malloc(size); 25 | if (res == NULL) { 26 | die(); 27 | } 28 | return res; 29 | } 30 | 31 | void* xrealloc(void *ptr, size_t size) 32 | { 33 | void* res = realloc(ptr, size); 34 | if (res == NULL) { 35 | die(); 36 | } 37 | return res; 38 | } 39 | 40 | void die() 41 | { 42 | log_fatal("zmap", "Out of memory"); 43 | } 44 | 45 | -------------------------------------------------------------------------------- /github.com/zmap/zmap/lib/xalloc.h: -------------------------------------------------------------------------------- 1 | #ifndef ZMAP_ALLOC_H 2 | #define ZMAP_ALLOC_H 3 | 4 | #include 5 | 6 | void* xcalloc(size_t count, size_t size); 7 | 8 | void xfree(void *ptr); 9 | 10 | void* xmalloc(size_t size); 11 | 12 | void* xrealloc(void *ptr, size_t size); 13 | 14 | #endif -------------------------------------------------------------------------------- /github.com/zmap/zmap/src/.gitignore: -------------------------------------------------------------------------------- 1 | lexer.c 2 | lexer.h 3 | parser.c 4 | parser.h 5 | -------------------------------------------------------------------------------- /github.com/zmap/zmap/src/aesrand.h: -------------------------------------------------------------------------------- 1 | /* 2 | * ZMap Copyright 2013 Regents of the University of Michigan 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not 5 | * use this file except in compliance with the License. You may obtain a copy 6 | * of the License at http://www.apache.org/licenses/LICENSE-2.0 7 | */ 8 | 9 | #include 10 | 11 | #ifndef AESRAND_H 12 | #define AESRAND_H 13 | 14 | void aesrand_init(uint32_t seed); 15 | 16 | uint64_t aesrand_getword(void); 17 | 18 | #endif 19 | -------------------------------------------------------------------------------- /github.com/zmap/zmap/src/cyclic.h: -------------------------------------------------------------------------------- 1 | /* 2 | * ZMap Copyright 2013 Regents of the University of Michigan 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not 5 | * use this file except in compliance with the License. You may obtain a copy 6 | * of the License at http://www.apache.org/licenses/LICENSE-2.0 7 | */ 8 | 9 | #include 10 | 11 | #ifndef CYCLIC_H 12 | #define CYCLIC_H 13 | 14 | int cyclic_init(uint32_t, uint32_t); 15 | 16 | // get next IP address to scan 17 | uint32_t cyclic_get_next_ip(void); 18 | 19 | // what IP address was returned last 20 | uint32_t cyclic_get_curr_ip(void); 21 | 22 | // what primitive root was generated for this current scan 23 | uint32_t cyclic_get_primroot(void); 24 | 25 | #endif 26 | -------------------------------------------------------------------------------- /github.com/zmap/zmap/src/expression.h: -------------------------------------------------------------------------------- 1 | #ifndef ZMAP_TREE_H 2 | #define ZMAP_TREE_H 3 | 4 | #include "fieldset.h" 5 | 6 | #include 7 | #include 8 | #include 9 | #include 10 | 11 | enum operation { 12 | GT, LT, EQ, NEQ, AND, OR, LT_EQ, GT_EQ 13 | }; 14 | 15 | enum node_type { 16 | OP, FIELD, STRING, INT 17 | }; 18 | 19 | struct field_id { 20 | int index; 21 | char *fieldname; 22 | }; 23 | 24 | union node_value { 25 | struct field_id field; 26 | char *string_literal; 27 | uint64_t int_literal; 28 | enum operation op; 29 | }; 30 | 31 | typedef struct node { 32 | struct node *left_child; 33 | struct node *right_child; 34 | enum node_type type; 35 | union node_value value; 36 | } node_t; 37 | 38 | node_t* make_op_node(enum operation op); 39 | 40 | node_t* make_field_node(char *fieldname); 41 | 42 | node_t* make_string_node(char *literal); 43 | 44 | node_t* make_int_node(int literal); 45 | 46 | int evaluate_expression(node_t *root, fieldset_t *fields); 47 | 48 | void print_expression(node_t *root); 49 | 50 | #endif /* ZMAP_TREE_H */ -------------------------------------------------------------------------------- /github.com/zmap/zmap/src/filter.h: -------------------------------------------------------------------------------- 1 | #ifndef ZMAP_FILTER_H 2 | #define ZMAP_FILTER_H 3 | 4 | #include "expression.h" 5 | #include "fieldset.h" 6 | 7 | struct output_filter { 8 | node_t *expression; 9 | }; 10 | 11 | int parse_filter_string(char *filter); 12 | 13 | int validate_filter(node_t *root, fielddefset_t *fields); 14 | 15 | #endif /* ZMAP_FILTER_H */ -------------------------------------------------------------------------------- /github.com/zmap/zmap/src/get_gateway.h: -------------------------------------------------------------------------------- 1 | /* 2 | * ZMap Copyright 2013 Regents of the University of Michigan 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not 5 | * use this file except in compliance with the License. You may obtain a copy 6 | * of the License at http://www.apache.org/licenses/LICENSE-2.0 7 | */ 8 | 9 | #ifndef GET_GATEWAY_H 10 | #define GET_GATEWAY_H 11 | 12 | #include 13 | 14 | int get_hw_addr(struct in_addr *gw_ip, char *iface, unsigned char *hw_mac); 15 | int get_default_gw(struct in_addr *gw, char *iface); 16 | int get_iface_ip(char *iface, struct in_addr *ip); 17 | 18 | #endif 19 | -------------------------------------------------------------------------------- /github.com/zmap/zmap/src/lexer.l: -------------------------------------------------------------------------------- 1 | %{ 2 | #pragma GCC diagnostic ignored "-Wredundant-decls" 3 | #include 4 | #include "parser.h" 5 | 6 | %} 7 | 8 | %option noinput 9 | %option nounput 10 | %% 11 | [0-9]+ yylval.int_literal = (uint64_t) atoll(yytext); return T_NUMBER; 12 | \n /* Ignore end of line */ 13 | [ \t]+ /* Ignore whitespace */ 14 | != return T_NOT_EQ; 15 | >= return T_GT_EQ; 16 | "<=" return T_LT_EQ; 17 | && return T_AND; 18 | "||" return T_OR; 19 | = return '='; 20 | ">" return '>'; 21 | "<" return '<'; 22 | "(" return '('; 23 | ")" return ')'; 24 | [a-zA-Z][a-zA-Z0-9]+ yylval.string_literal = strdup(yytext); return T_FIELD; 25 | 26 | %% -------------------------------------------------------------------------------- /github.com/zmap/zmap/src/monitor.h: -------------------------------------------------------------------------------- 1 | /* 2 | * ZMap Copyright 2013 Regents of the University of Michigan 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not 5 | * use this file except in compliance with the License. You may obtain a copy 6 | * of the License at http://www.apache.org/licenses/LICENSE-2.0 7 | */ 8 | 9 | #ifndef MONITOR_H 10 | #define MONITOR_H 11 | 12 | void monitor_run(); 13 | 14 | #endif 15 | -------------------------------------------------------------------------------- /github.com/zmap/zmap/src/output_modules/module_redis.h: -------------------------------------------------------------------------------- 1 | /* 2 | * ZMap Copyright 2013 Regents of the University of Michigan 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not 5 | * use this file except in compliance with the License. You may obtain a copy 6 | * of the License at http://www.apache.org/licenses/LICENSE-2.0 7 | */ 8 | 9 | #include 10 | 11 | int redismodule_init(struct state_conf *conf); 12 | 13 | int redismodule_newip(ipaddr_n_t saddr, ipaddr_n_t daddr, 14 | port_n_t sport, port_n_t dport, struct timeval* t, 15 | const char *response_type, int is_repeat, 16 | int in_cooldown, const u_char *packet); 17 | 18 | int redismodule_close(struct state_conf* c, 19 | struct state_send* s, struct state_recv* r); 20 | -------------------------------------------------------------------------------- /github.com/zmap/zmap/src/recv.h: -------------------------------------------------------------------------------- 1 | /* 2 | * ZMap Copyright 2013 Regents of the University of Michigan 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not 5 | * use this file except in compliance with the License. You may obtain a copy 6 | * of the License at http://www.apache.org/licenses/LICENSE-2.0 7 | */ 8 | 9 | #ifndef RECV_H 10 | #define RECV_H 11 | 12 | int recv_update_pcap_stats(void); 13 | int recv_run(pthread_mutex_t *recv_ready_mutex); 14 | 15 | #endif //_RECV_H 16 | -------------------------------------------------------------------------------- /github.com/zmap/zmap/src/send.h: -------------------------------------------------------------------------------- 1 | /* 2 | * ZMap Copyright 2013 Regents of the University of Michigan 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not 5 | * use this file except in compliance with the License. You may obtain a copy 6 | * of the License at http://www.apache.org/licenses/LICENSE-2.0 7 | */ 8 | 9 | #ifndef SEND_H 10 | #define SEND_H 11 | 12 | int get_socket(void); 13 | int get_dryrun_socket(void); 14 | int send_init(void); 15 | int send_run(int); 16 | 17 | #endif //SEND_H 18 | -------------------------------------------------------------------------------- /github.com/zmap/zmap/src/types.h: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #ifndef TYPES_H_ 4 | #define TYPES_H_ 5 | typedef uint32_t ipaddr_n_t; // IPv4 address network order 6 | typedef uint32_t ipaddr_h_t; // IPv4 address host order 7 | typedef uint16_t port_n_t; // port network order 8 | typedef uint16_t port_h_t; // port host order 9 | typedef unsigned char macaddr_t; 10 | 11 | #endif 12 | -------------------------------------------------------------------------------- /github.com/zmap/zmap/src/validate.h: -------------------------------------------------------------------------------- 1 | /* 2 | * ZMap Copyright 2013 Regents of the University of Michigan 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not 5 | * use this file except in compliance with the License. You may obtain a copy 6 | * of the License at http://www.apache.org/licenses/LICENSE-2.0 7 | */ 8 | 9 | #ifndef VALIDATE_H 10 | #define VALIDATE_H 11 | 12 | #define VALIDATE_BYTES 16 13 | 14 | void validate_init(); 15 | void validate_gen(const uint32_t src, const uint32_t dst, uint8_t output[VALIDATE_BYTES]); 16 | 17 | #endif//_VALIDATE_H 18 | -------------------------------------------------------------------------------- /github.com/zmap/zmap/src/zopt_compat.c: -------------------------------------------------------------------------------- 1 | #if __GNUC__ < 4 2 | #error "gcc version >= 4 is required" 3 | #elif __GNUC_MINOR__ >= 6 4 | #pragma GCC diagnostic ignored "-Wunused-but-set-variable" 5 | #endif 6 | 7 | #include "zopt.c" 8 | -------------------------------------------------------------------------------- /github.com/zmap/zmap/zmap_conf_install.cmake.in: -------------------------------------------------------------------------------- 1 | foreach(conf_file ${CONF_FILES}) 2 | message(STATUS "${conf_file}") 3 | if(NOT EXISTS "/etc/zmap/${conf_file}") 4 | file(INSTALL "conf/${conf_file}" DESTINATION "/etc/zmap") 5 | endif() 6 | endforeach() 7 | -------------------------------------------------------------------------------- /projects.txt: -------------------------------------------------------------------------------- 1 | https://github.com/bluemonk/ipaddress.git 2 | https://github.com/bluemonk/net-dns.git 3 | https://github.com/duritong/puppet-tinc.git 4 | https://github.com/example42/puppet-tinc.git 5 | https://github.com/Gorian/tinc-automation.git 6 | https://github.com/gsliepen/tinc.git 7 | https://github.com/guiambros/aws-cloud-init.git 8 | https://github.com/jvasile/tinc-rollout.git 9 | https://github.com/makefu/shack-retiolum.git 10 | https://github.com/mhameed/tincconfig.git 11 | https://github.com/Myatu/puppet-l2mesh/.git 12 | https://github.com/ryd/chaosvpn.git 13 | https://github.com/trema/trema.git 14 | https://github.com/yanosz/bbkeys.git 15 | https://github.com/Youscribe/tinc-cookbook.git 16 | https://github.com/zmap/zmap.git 17 | https://github.com/rafael-santiago/pig.git 18 | --------------------------------------------------------------------------------