sudo apt install libzmq3-dev libsqlite3-dev git automake pkg-config libssl-dev libjq-dev libonig-dev libtool cmake
cargo build
generate default config:
request config -d | tee requestd.yml
modify the generated config as you like. Then simply run requestd
requestd
You can configure different endpoints which distribute the respondd responses via different protocols. Currently there are 3 implemented protocols:
- http
- mqtt
- zmq pub/sub
To enable the http endpoint add the following to your requestd.yml
:
web:
listen: "[::]:21001"
All node responses will be available at http://localhost:21001/responses
To enable the mqtt endpoint add the following to your requestd.yml
:
mqtt:
broker: localhost:1883
topic: ffhl
Mqtt authentication in currently not supported.
To enable the zmq endpoint add the following to your requestd.yml
:
zmq:
bind_to: "tcp://*:21002"
You can now SUB
scribe to this endpoint with another application. Remember that zmq pub/sub also uses topics. The topic used by requestd is requestd
. For each message you need to call zmq_recv()
twice. The first call will receive the topic, the second will receive the actual message.
Sometimes it is necessary to explicitely set a route for the multicast address. There a two ways to set up a route:
- get the source ip address for the interface you want to use (
ip a
) - add a route for the multicast address:
sudo ip route add ff05::2:1001/128 dev <interface> src <source address> table local
If your Host use systemd-network for the network configuration you can simply
add this to the .network
file for the interface connected to the freifunk network:
[Match]
# use your iface name here
Name=ffhl
[Network]
# some network config here
# https://www.freedesktop.org/software/systemd/man/systemd.network.html#%5BNetwork%5D%20Section%20Options
# finally an explicit route entry:
[Route]
Destination=ff05::2:1001/128
Type=multicast
Table=local
https://wiki.luebeck.freifunk.net/docs/infrastruktur/gallifrey-gluon01/
ssh root@node.ffhl
echo "rule 'MULTICAST_OUT -p IPv6 --ip6-protocol udp --ip6-destination-port 1001 --ip6-dst ff02::2:1001 -j RETURN'" > /lib/gluon/ebtables/110-mcast-allow-respondd
echo "rule 'MULTICAST_OUT -p IPv6 --ip6-protocol udp --ip6-destination-port 1001 --ip6-dst ff05::2:1001 -j RETURN'" > /lib/gluon/ebtables/110-mcast-allow-respondd
/etc/init.d/gluon-ebtables restart