[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Help writing transport

From: Schanzenbach, Martin
Subject: Re: Help writing transport
Date: Fri, 28 Feb 2020 21:52:33 +0100


Maybe we can guide you through this here a bit. As I said in the chat you have 
two options:

I. Write a legacy Transport plugin
II. Write a communicator for the rewrite (then you can probably not use it in 
the near future for your node until we are done with the rewrite)

For I. the steps would be:

1. Use src/transport/plugin_transport_unix.c as a template
The Unix plugin uses Unix Domain Sockets as the name suggests.
Copy the file and name it "plugin_transport_hamradio.c" or something like that.

2. Rename the plugin functions.
Look at libgnunet_plugin_transport_* functions. Rename them to match the chosen 
plugin name (see 1.)

3. Add your plugin to src/transport/
You may copy&paste an existing plugin and rename accordingly. Maybe link 
against your other code (?).

4. Start with libgnunet_plugin_transport_*_init (1722ff) and implement hamradio 
Here you can see how an "api" object is created and transport plugin functions 
are assigned to it.
You need to implement those functions for your "hamradio" transport as they are 
tailored to UDS.
See include/gnunet_transport_plugin.h for some documentation on the functions a 
plugin must implement.

5. When finished (I expect 4 to take a while)
Configure your config to use the hamradio plugin:

$ gnunet-config -s transport -o PLUGINS -V "tcp hamradio"
and restart gnunet. The transport service will try to find the plugin.

Note that I don't know if UDS is a suitable template here. _Maybe_ 
plugin_transport_wlan.c is better suited.


> On 28. Feb 2020, at 20:38, danielp3344--- via Mailinglist for GNUnet 
> developers <address@hidden> wrote:
> Hi all,
> I'm trying to get GNUnet to work over ham radio. I wrote all my radio related 
> code separately for now, all GNUnet needs to do is write any data it wants 
> transmitted into a fifo, and read back any data that comes through. All the 
> error correction, validation etc is done by the radio code, all GNUnet will 
> see is the valid packets that are received. However the docs are not 
> incredibly helpful and after reading some of the existing files in 
> src/transport/ I'm still not really sure where to start. Any help would be 
> appreciated.
> Thanks,
> -Dan

reply via email to

[Prev in Thread] Current Thread [Next in Thread]