Commit graph

11 commits

Author SHA1 Message Date
Thomas Kolb 04399c0022 Fix byte order in TUN packet header
All checks were successful
/ build-hamnet70 (push) Successful in 39s
/ build-doc (push) Successful in 31s
/ deploy-doc (push) Has been skipped
2024-12-18 21:01:14 +01:00
Thomas Kolb d77f4d4498 Multiple fixes in packet handling
All checks were successful
/ build-hamnet70 (push) Successful in 33s
/ build-doc (push) Successful in 19s
/ deploy-doc (push) Has been skipped
- add and handle layer 2 packet type correctly in data packets
- don't produce garbage packets if a packet could not be decoded or was not a
  data packet
- handle beacon/connection request/connection parameters handshake
- digipeater cycle timeout does not reset beacon timer anymore. This prevented
  any beacon transmission.
- Reset the connection timeout when empty packets are received
2024-12-15 22:29:47 +01:00
Thomas Kolb 559283d87f connection: process beacons and send connection requests
Some checks failed
/ build-hamnet70 (push) Failing after 17s
/ build-doc (push) Successful in 17s
/ deploy-doc (push) Has been skipped
2024-12-12 19:44:07 +01:00
Thomas Kolb fefacc69c3 Fixed all warnings 2024-12-12 19:44:07 +01:00
Thomas Kolb a0ccf9699a layer2: Remove event callbacks
Instead, connection and digipeater now update a event code passed by reference
to the maintain() function. This was the only place where the callback was
called before.

Minor side effect: maintain must be called multiple times if multiple events
trigger at the same time.
2024-12-12 19:44:07 +01:00
Thomas Kolb f376bd7db3 Remove data callbacks in connection and digipeater modules 2024-12-12 19:44:07 +01:00
Thomas Kolb e4961bf519 WIP: handle packets from the TUN device in digipeater
This is only a backup commit.
2024-12-12 19:44:07 +01:00
Thomas Kolb 774f5c0420 l2udptest_client: fix compilation 2024-12-12 19:44:07 +01:00
Thomas Kolb 01edbb1db1 WIP: managing multiple connections
Working towards handling multiple connections. A lot is still missing.
2024-12-12 19:44:07 +01:00
Thomas Kolb a0623668a7 Do all time calculations in uint64_t
This prevents loss of precision that occurs with double-precision floats if
timestamps become very large. Timestamps are already large if they contain a
UNIX time value (requires 60 bits; double has 53 bit resolution).
2024-12-12 19:44:07 +01:00
Thomas Kolb ec9e893c73 l2udptest: replace by two programs: client and digipeater
Both are identical so far, this is just an infrastructure commit.
2024-12-12 19:44:07 +01:00
Renamed from impl/test/layer2_over_udp/l2udptest.c (Browse further)