From 6ab60d4920bb3199aee8cd872b930e9e3e808ba7 Mon Sep 17 00:00:00 2001 From: Nils Gillmann Date: Sat, 19 May 2018 14:43:13 +0000 Subject: Restructure contrib folder. contrib/pogen.sh -> bin/pogen.sh bootstrap: Use new pogen location and execute it. contrib/openvpn-tap32: Move to contrib/3rdparty/Windows/openvpn-tap32. contrib/gnunet-logo*: Move to contrib/branding/logo/ Delete old patches in contrib, predating git. Move buildbot data to contrib/ci/buildbot, move docker data to contrib/ci/docker. Create contrib/conf and populate it with config files found in contrib and bin. Move gns related data to contrib/gns. delete contrib/repeat.sh Move contrib/log.php into contrib/web/log.php. Create folder contrib/scripts and use it for most scripts in contrib. Remove trailing whitespace in doc/Makefile.am Signed-off-by: Nils Gillmann --- contrib/conf/colorit/colorit.conf | 30 +++ .../conf/editors/eclipse/gnunet_codingstyle.xml | 291 +++++++++++++++++++++ contrib/conf/gnunet/no_autostart_above_core.conf | 90 +++++++ contrib/conf/gnunet/no_forcestart.conf | 41 +++ contrib/conf/nss/nssswitch.conf | 25 ++ contrib/conf/wireshark/wireshark.lua | 150 +++++++++++ 6 files changed, 627 insertions(+) create mode 100644 contrib/conf/colorit/colorit.conf create mode 100644 contrib/conf/editors/eclipse/gnunet_codingstyle.xml create mode 100644 contrib/conf/gnunet/no_autostart_above_core.conf create mode 100644 contrib/conf/gnunet/no_forcestart.conf create mode 100644 contrib/conf/nss/nssswitch.conf create mode 100644 contrib/conf/wireshark/wireshark.lua (limited to 'contrib/conf') diff --git a/contrib/conf/colorit/colorit.conf b/contrib/conf/colorit/colorit.conf new file mode 100644 index 000000000..77d57aa59 --- /dev/null +++ b/contrib/conf/colorit/colorit.conf @@ -0,0 +1,30 @@ +dnl -*- m4 -*- +dnl vim:ft=m4 +dnl +dnl colorit(1) configuration for gnunet logs +dnl +divert(-1) +dnl +dnl Define some useful color variables +dnl +define(`black', `0') +define(`red', `1') +define(`green', `2') +define(`yellow', `3') +define(`blue', `4') +define(`magenta', `5') +define(`cyan', `6') +define(`white', `7') +dnl +dnl Mark macro arguments: regexp foreground-color [background-color] +dnl +define(`mark', ``mark "$1"'' `ifelse(`$#', `3', ``"\033[3$2;4$3m"'', ``"\033[3$2m"'')' `"\033[m"') +dnl +divert + +mark(`^[A-Z][a-z]{2} .[0-9] [0-9:]{8}(-[0-9]{6})?', yellow) + +mark(`ERROR', red) +mark(`WARNING', yellow) +mark(`INFO', green) +mark(`DEBUG', cyan) diff --git a/contrib/conf/editors/eclipse/gnunet_codingstyle.xml b/contrib/conf/editors/eclipse/gnunet_codingstyle.xml new file mode 100644 index 000000000..a58c2ed0c --- /dev/null +++ b/contrib/conf/editors/eclipse/gnunet_codingstyle.xml @@ -0,0 +1,291 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/contrib/conf/gnunet/no_autostart_above_core.conf b/contrib/conf/gnunet/no_autostart_above_core.conf new file mode 100644 index 000000000..7bcf6c8ae --- /dev/null +++ b/contrib/conf/gnunet/no_autostart_above_core.conf @@ -0,0 +1,90 @@ +# Configuration to disable autostarting of +# all services above the 'core' level. +# (including resolver) + +[dns] +AUTOSTART = NO + +[dht] +AUTOSTART = NO + +[nse] +AUTOSTART = NO + +[cadet] +AUTOSTART = NO + +[datastore] +AUTOSTART = NO + +[fs] +AUTOSTART = NO + +[dv] +AUTOSTART = NO + +[vpn] +AUTOSTART = NO + +[consensus] +AUTOSTART = NO + +[resolver] +AUTOSTART = NO + +[namestore] +AUTOSTART = NO + +[namecache] +AUTOSTART = NO + +[identity] +AUTOSTART = NO + +[revocation] +AUTOSTART = NO + +[conversation] +AUTOSTART = NO + +[peerstore] +AUTOSTART = NO + +[psycstore] +AUTOSTART = NO + +[gns] +AUTOSTART = NO + +[regex] +AUTOSTART = NO + +[set] +AUTOSTART = NO + +[scalarproduct-bob] +AUTOSTART = NO + +[scalarproduct-alice] +AUTOSTART = NO + +[social] +AUTOSTART = NO + +[psyc] +AUTOSTART = NO + +[rps] +AUTOSTART = NO + +[multicast] +AUTOSTART = NO + +[sensordashboard] +AUTOSTART = NO + +[sensor] +AUTOSTART = NO + +[zonemaster-monitor] +AUTOSTART = NO diff --git a/contrib/conf/gnunet/no_forcestart.conf b/contrib/conf/gnunet/no_forcestart.conf new file mode 100644 index 000000000..a332d6da7 --- /dev/null +++ b/contrib/conf/gnunet/no_forcestart.conf @@ -0,0 +1,41 @@ +# Configuration file that can be included to prevent ANY of the usual +# FORCESTART = YES to be set. Also disables NSE POW calculation. +# +# This configuration is included from various configuration test files. +# Whenever a new service is added that has FORCESTART = YES for +# production should be disabled for (most) test suites, the option should +# be added here instead of all over the place ;-). + +[core] +FORCESTART = NO + +[fs] +FORCESTART = NO + +[dht] +FORCESTART = NO + +[cadet] +FORCESTART = NO + +[nse] +FORCESTART = NO +WORKBITS = 0 + +[revocation] +FORCESTART = NO + +[topology] +FORCESTART = NO + +[hostlist] +FORCESTART = NO + +[gns] +FORCESTART = NO + +[zonemaster] +FORCESTART = NO + +[zonemaster-monitor] +FORCESTART = NO diff --git a/contrib/conf/nss/nssswitch.conf b/contrib/conf/nss/nssswitch.conf new file mode 100644 index 000000000..89af6471e --- /dev/null +++ b/contrib/conf/nss/nssswitch.conf @@ -0,0 +1,25 @@ +# /etc/nsswitch.conf +# Modified to support GNUnet's GNS (.gnu, .zkey etc) +# Compare with your distributions' "nsswitch.conf" file. + +passwd: compat +shadow: compat +group: compat + +# passwd: db files nis +# shadow: db files nis +# group: db files nis + +hosts: files gns [NOTFOUND=return] dns +networks: files dns + +services: db files +protocols: db files +rpc: db files +ethers: db files +netmasks: files +netgroup: files +bootparams: files + +automount: files +aliases: files \ No newline at end of file diff --git a/contrib/conf/wireshark/wireshark.lua b/contrib/conf/wireshark/wireshark.lua new file mode 100644 index 000000000..ac77029f6 --- /dev/null +++ b/contrib/conf/wireshark/wireshark.lua @@ -0,0 +1,150 @@ +-- declare our protocol +gwlan_proto = Proto("gnunet","Gnunet Layer") +-- create a function to dissect it +local f = gwlan_proto.fields + +f.len = ProtoField.uint16 ("gnunet.len", "Gnunet Message Len") +f.type = ProtoField.uint16 ("gnunet.type", "Gnunet Message Type") +-- rhs_proto.fields.sequence = ProtoField.uint16("rhs.sequence","Sequence number") +f_proto = DissectorTable.new("gnunet.proto", "Gnunet Protocoll", FT_UINT16, BASE_DEC) +--gwlan_proto.fields = {f_len, f_type} + +function gwlan_proto.dissector(buffer,pinfo,tree) + pinfo.cols.protocol = "Gnunet Packet" + gnunet_packet_disector(buffer,pinfo,tree) +end + +function gwlan_proto.init() +end + +function gnunet_packet_disector(buffer,pinfo,tree) + if (buffer:len() > 4) then + local len = buffer(0,2):uint() + local type = buffer(2,2):uint() + if (len <= buffer:len()) then + local dissect = f_proto:get_dissector(type) + if dissect ~= nil then + dissect:call(buffer(0, len):tvb(), pinfo, tree) + else + local subtree = tree:add(fragmentack, buffer(),"Gnunet Packet Type: " .. buffer(2,2):uint() .. "(" .. buffer:len() .. ")") + gnunet_message_header(buffer, pinfo, subtree) + end + end + --if (len < buffer:len()) then + -- gwlan_proto.dissector(buffer(len, buffer:len() - len):tvb(), pinfo, tree) + --end + else + if (buffer:len() == 4) then + local subtree = tree:add(fragmentack, buffer(),"Gnunet Packet (" .. buffer:len() .. ")") + gnunet_message_header(buffer, pinfo, subtree) + end + end +end + +function gnunet_message_header(buffer, pinfo, tree) + if (buffer:len() >= 4) then + local len = buffer(0,2) + local type = buffer(2,2) + tree:add(buffer(0,2), "Message Len: " .. buffer(0,2):uint()) + tree:add(buffer(2,2), "Message Type: " .. buffer(2,2):uint()) + end +end + +-- load the udp.port table +llc_table = DissectorTable.get("llc.dsap") +-- register our protocol to handle llc.dsap 0x1e +llc_table:add(31,gwlan_proto) + +fragmentack = Proto("gnunet.fragmentack","Gnunet Fragment Ack") + +function fragmentack.dissector(buffer,pinfo,tree) + pinfo.cols.protocol = "Gnunet Fragment Ack" + local subtree = tree:add(fragmentack, buffer(),"Gnunet Data ack (" .. buffer:len() .. ")") + gnunet_message_header(buffer, pinfo, subtree) + if buffer:len() >= 16 then + subtree:add(buffer(4,4),"Fragment Id: " .. buffer(4,4):uint()) + subtree:add(buffer(8,8),"Bits: " .. buffer(8,8)) + end +end + +fragment = Proto("gnunet.fragment","Gnunet Fragment") + +function fragment.dissector(buffer,pinfo,tree) + pinfo.cols.protocol = "Gnunet Fragment" + local subtree = tree:add(fragment, buffer(),"Gnunet Fragment (" .. buffer:len() .. ")") + gnunet_message_header(buffer, pinfo, subtree) + if buffer:len() >= 13 then + subtree:add(buffer(4,4),"Fragment Id: " .. buffer(4,4):uint()) + subtree:add(buffer(8,2),"Total Size: " .. buffer(8,2):uint()) + subtree:add(buffer(10,2),"Offset: " .. buffer(10,2):uint()) + if buffer(10,2):uint() == 0 then + if (buffer(8,2):uint() <= buffer:len() - 12) then + gnunet_packet_disector(buffer(12):tvb(),pinfo,tree) + end + else + subtree:add(buffer(12), "Data: " .. buffer(12)) + end + end +end + +hello = Proto("gnunet.hello","Gnunet Hello Message") + +function hello.dissector(buffer,pinfo,tree) + pinfo.cols.protocol = "Gnunet Hello Message" + local subtree = tree:add(hello, buffer(),"Gnunet Hello Message (" .. buffer:len() .. ")") + gnunet_message_header(buffer, pinfo, subtree) + if buffer:len() > (264 + 8) then + subtree:add(buffer(4,4),"Reserved: " .. buffer(4,4):uint()) + RsaPublicKeyBinaryEncoded(buffer(8 , 264):tvb(),pinfo, subtree) + else + subtree:add(buffer(4), "SIZE WRONG (< 272)") + end +end + +wlan = Proto("gnunet.wlan","Gnunet WLAN Message") + +function wlan.dissector(buffer,pinfo,tree) + pinfo.cols.protocol = "Gnunet WLAN Message" + local subtree = tree:add(wlan, buffer(),"Gnunet WLAN Message (" .. buffer:len() .. ")") + gnunet_message_header(buffer, pinfo, subtree) + if buffer:len() > (4 + 4 + 2*64) then + subtree:add(buffer(4,4),"CRC: " .. buffer(4,4):uint()) + local peer = GNUNET_PeerIdentity(buffer(8,64), pinfo, subtree) + peer:append_text(" Traget") + peer = GNUNET_PeerIdentity(buffer(8 + 64,64), pinfo, subtree) + peer:append_text(" Source") + else + subtree:add(buffer(8), "SIZE WRONG (< 4 + 4 + 2*64)") + end + if (buffer:len() - (4 + 4 + 2*64) > 0) then + gnunet_packet_disector(buffer(4 + 4 + 2*64):tvb(),pinfo,tree) + end +end + +function RsaPublicKeyBinaryEncoded(buffer,pinfo,tree) + local subtree = tree:add(gwlan_proto,buffer(),"Gnunet RsaPublicKeyBinaryEncoded(" .. buffer:len() .. ")") + subtree:add(buffer(0,2),"Len: " .. buffer(0,2):uint()) + subtree:add(buffer(2,2),"Sizen: " .. buffer(2,2):uint()) + subtree:add(buffer(4,258),"Pub Key: " .. buffer(4,258)) + subtree:add(buffer(262,2),"Padding: " .. buffer(262,2):uint()) +end + +function GNUNET_PeerIdentity(buffer,pinfo,tree) + local subtree = tree:add(gwlan_proto,buffer(),"Gnunet PeerIdentity(" .. buffer:len() .. ")") + subtree:add(buffer(0),"hashPubKey: " .. buffer(0)) + return subtree +end + +transport_session_keepalive = Proto("gnunet.transport_session_keepalive","Gnunet transport session keepalive") + +function transport_session_keepalive.dissector(buffer,pinfo,tree) + pinfo.cols.protocol = "Gnunet transport session keepalive" + local subtree = tree:add(transport_session_keepalive, buffer(),"Gnunet transport session keepalive (" .. buffer:len() .. ")") + gnunet_message_header(buffer, pinfo, subtree) +end + +f_proto:add(43,wlan) +f_proto:add(39,transport_session_keepalive) +f_proto:add(19,fragmentack) +f_proto:add(18,fragment) +f_proto:add(16,hello) -- cgit v1.2.3