From afcdcf6ae6d95eb828733994c7de30f8ab095dcc Mon Sep 17 00:00:00 2001 From: Ian Moffett Date: Thu, 25 Sep 2025 14:23:36 -0400 Subject: dgram: Add support for data reception Signed-off-by: Ian Moffett --- src/include/dgram.h | 9 +++++++++ src/include/if_ether.h | 4 ++-- 2 files changed, 11 insertions(+), 2 deletions(-) (limited to 'src/include') diff --git a/src/include/dgram.h b/src/include/dgram.h index 9c87b81..0f798ee 100644 --- a/src/include/dgram.h +++ b/src/include/dgram.h @@ -35,6 +35,7 @@ #include "link.h" typedef int16_t tx_len_t; +typedef tx_len_t rx_len_t; /* * Represents an ONET datagram @@ -103,5 +104,13 @@ tx_len_t dgram_send( void *buf, uint16_t len ); +/* + * Get data from an ONET link + * + * @link: The ONET link to recv data from + * @buf: The buffer to recv data into + * @len: The length of expected data + */ +rx_len_t dgram_recv(struct onet_link *link, void *buf, uint16_t len); #endif /* DGRAM_H */ diff --git a/src/include/if_ether.h b/src/include/if_ether.h index 0cdf2fa..4da9b7a 100644 --- a/src/include/if_ether.h +++ b/src/include/if_ether.h @@ -33,8 +33,8 @@ #include #define HW_ADDR_LEN 6 -#define PROTO_IPV4 0x0800 -#define PROTO_ARP 0x0806 +#define PROTO_ID 0x88B5 +#define MAC_BROADCAST 0xFFFFFFFFFFFF typedef uint64_t mac_addr_t; -- cgit v1.2.3