The AAP client class prints some log messages, but we do not want them
to be printed by default if we turn on INFO logging. This uses
`logger.debug` instead.
Signed-off-by: Felix Walter <felix.walter@d3tn.com>
This allows us to support IPv6 properly. A slight re-structuring was
necessary as we have to attempt multiple connections with different
sockets one after another. Thus, the socket instance is created in
connect() instead of __init__ and we use abc.ABC to prevent
instantiating the AAPClient without overriding the connect() method.
Signed-off-by: Felix Walter <felix.walter@d3tn.com>
ud3tn is available under multiple licenses and we want to reflect this in
our source code. But which license information should appear first and how
can we manage this efficiently in the future? The Linux Kernel uses SPDX
expressions instead of boilerplate sections. This seems to be a great
approach, so we do the same here.
Signed-off-by: Georg Alexander Murzik <georg.murzik@d3tn.com>
-> https://datatracker.ietf.org/doc/html/draft-ietf-dtn-bpbis-31#section-4.2.5
The previous validation methods were not sufficient to check validity of
dtn as well as ipn EIDs. This adds further functions to easily detect
the EID scheme and validate dtn plus ipn EIDs. Tests for the most common
cases where validity checks should be successful and where they might
fail are added as well.
Due to this change the default EID of uD3TN gets a slash appended, as
dtn EIDs always have to contain the name delimiter '/'.
Signed-off-by: Felix Walter <felix.walter@d3tn.com>
Previously uD3TN implicitly assumed string EID in many places such as
the agent manager. This adds proper handling for ipn-scheme EIDs,
using numerical service numbers as agent IDs in case uD3TN is started
with an ipn-scheme EID. If the ipn scheme is used, uD3TN always has to
be configured with the service number 0. The config and management agent
IDs can be configured in config.h and are 9000 and 9001, respectively,
to keep the lower range of service numbers free. It is intentional that
agents can register with a service number of zero - uD3TN does not
provide specific functionality under this service number.
Signed-off-by: Felix Walter <felix.walter@d3tn.com>
This commit fixes typos and indentation issues and simplifies parts
of the bundle7.py, aap_message.py and aap_receive.py files.
Signed-off-by: Tobias Nöthlich <tobias.noethlich@d3tn.com>
This commit remedies code smells introduced to pyd3tn and the python
tools while implementing the BIBE CLA.
Signed-off-by: Tobias Nöthlich <tobias.noethlich@d3tn.com>
This commit modifies aap_send.py, aap_receive.py and aap_client.py to
allow for sending SENDBIBE messages using the Python uD3TN utils.
The clear distinction between regular SENDBUNDLE messages and SENDBIBE
messages allows for a rework of the crude check of the message type
performed in aap_receive.py, which is also implemented by this commit.
Signed-off-by: Tobias Nöthlich <tobias.noethlich@d3tn.com>
To facilitate testing of AAP BIBE reception in uD3TN, this commit adds
the functionality for sending SENDBIBE messages using aap_client.py.
Signed-off-by: Tobias Nöthlich <tobias.noethlich@d3tn.com>
By changing the default UNIX socket path to PWD in !11, the default
parameters for the AAP tools are adapted accordingly.
Closes: #51
Signed-off-by: Maximilian Nitsch <maximilian.nitsch@d3tn.com>
All additional spaces for aligning assignments to equals signs are
removed because they are not PEP8 compliant.
Signed-off-by: Maximilian Nitsch <maximilian.nitsch@d3tn.com>
To distribute the pyD3TN DTN protocol implementations as well as the
uD3TN python utilities on PyPi, the Python code is organized in separate
directories and the PyPi packaging guideline is applied. The
restructuring also requires an adjustment of the imports in the scripts
in tools/ and test/.
Signed-off-by: Maximilian Nitsch <maximilian.nitsch@d3tn.com>