Commit graph

10 commits

Author SHA1 Message Date
Maximilian Nitsch
d58528bc66 Fix: return type 2024-04-18 14:48:25 +02:00
Maximilian Nitsch
63705f16be fix: close sqlite_bundle_blob on reset_parsers 2024-04-16 13:51:28 +02:00
Maximilian Nitsch
35369c18ce fix: CLA_SQLITE_AGENT_QUEUE_LENGTH 2024-04-16 13:13:08 +02:00
Maximilian Nitsch
8e2e12bdce fix: sqlite_bundle_blob_close reset bundle_blob in any case 2024-04-16 13:03:59 +02:00
Maximilian Nitsch
9548936fab fix: Remove sqlite_parser 2024-04-16 11:56:22 +02:00
Maximilian Nitsch
3e60a2e158 Fix: Add read_ + send_ bundle_blob variables to sqlite_link 2024-04-16 11:31:56 +02:00
Maximilian Nitsch
50fcf70a75 cla/cla_contact_rx_task: Exclude SQLiteCLA from EID spoofing detection
If bundles that were created by the μD3TN instance itself are stored in
the database via the SQLiteCLA and are received again at a later point
in time, μD3TN recognizes that the source node ID matches its own and
EID spoofing is detected.

This commit adds an exception to perform EID spoofing detection only for
packets that were not received by the SQLiteCLA.

Signed-off-by: Maximilian Nitsch <maximilian.nitsch@d3tn.com>
2024-04-15 11:05:21 +02:00
Maximilian Nitsch
bc54b1323c sqlite_agent: Add an agent to interact with the SQLiteCLA
The SQLiteAgent enables SQLiteCLA to read packages from the database and
return them to μD3TN. For this purpose, the SQLiteAgent writes commands
to the queue that SQLiteCLA is waiting for.

The SQLiteAgent itself can be controlled by protobuf messages that
describe which action is to be applied to which set of bundles.

Currently the operations "Push" and "Delete" are implemented and a
filter based on a destination EID pattern.

Signed-off-by: Maximilian Nitsch <maximilian.nitsch@d3tn.com>
2024-04-15 11:05:20 +02:00
Maximilian Nitsch
649c38fc67 cla_sqlite: Implementation of the SQLite-based storage back-end
The SQLiteCLA makes it possible to write bundles, that are to be sent
via this CLA, to an SQLite database in order to persist them over a
longer period of time and also a restart of μD3TN.

The bundles are saved together with selected metadata (source EID,
destination EID, creation timestamp) in the "bundles" table. A
combination of source EID and creation timestamp is used as the primary
key.

To return bundles to μD3TN, they are read from the database and injected
via the cla_read() function, just like other CLAs that receive bundles.
To trigger this, commands are read from a queue that specify which
bundles are to be read from the database.

Signed-off-by: Maximilian Nitsch <maximilian.nitsch@d3tn.com>
2024-04-15 10:37:45 +02:00
Maximilian Nitsch
81354633bf cla_sqlite: Add SQLite-based storage CLA skeleton
In order to prepare the implementation of a SQLite-based storage CLA, a
basic structure of this CLA with empty functions is created and
adjustments are made to the configuration/initialization functions and
the build system.

Signed-off-by: Maximilian Nitsch <maximilian.nitsch@d3tn.com>
2024-02-26 10:31:40 +01:00