From e92588d33b8025799a06dd248d512d774c99e887 Mon Sep 17 00:00:00 2001 From: Ian Moffett Date: Mon, 29 Sep 2025 01:17:06 -0400 Subject: dgram: link: Improve reception, add timeouts, ++ - Add timeouts - Clean up padding, add length define Signed-off-by: Ian Moffett --- src/include/dgram.h | 6 ++++++ src/include/link.h | 9 +++++++++ 2 files changed, 15 insertions(+) (limited to 'src/include') diff --git a/src/include/dgram.h b/src/include/dgram.h index 779c7ef..81fd1dd 100644 --- a/src/include/dgram.h +++ b/src/include/dgram.h @@ -34,6 +34,12 @@ #include "if_ether.h" #include "link.h" +/* Number of padding bytes in a squeak */ +#define SQUEAK_NPAD 8 + +/* How many ms we should poll on recv */ +#define RECV_POLL_MS 250 + typedef int16_t tx_len_t; typedef tx_len_t rx_len_t; diff --git a/src/include/link.h b/src/include/link.h index a791c2f..908c4a9 100644 --- a/src/include/link.h +++ b/src/include/link.h @@ -33,10 +33,19 @@ #include #include "if_ether.h" +/* + * Describes an ONET link + * + * @sockfd: Socket file descriptor + * @iface_idx: Interface index in use + * @hwaddr: Our hardware address + * @last_recv: Hardware address of last received node + */ struct onet_link { int sockfd; uint32_t iface_idx; mac_addr_t hwaddr; + mac_addr_t last_recv; }; /* -- cgit v1.2.3