diff options
Diffstat (limited to 'src/include')
-rw-r--r-- | src/include/dgram.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/include/dgram.h b/src/include/dgram.h index 93b20e3..e67eee6 100644 --- a/src/include/dgram.h +++ b/src/include/dgram.h @@ -32,6 +32,9 @@ #include <stdint.h> #include "if_ether.h" +#include "link.h" + +typedef int16_t tx_len_t; /* * Represents an ONET datagram @@ -84,4 +87,16 @@ struct onet_dgram { */ int dgram_load(uint16_t length, uint8_t port, struct onet_dgram *res); +/* + * Send a datagram through ONET + * + * @link: The ONET link to send data over + * @buf: The buffer containing data to send + * @len: Length of buffer to send + * + * Returns the number of bytes transmitted on success, otherwise + * a less than zero value on failure. + */ +tx_len_t dgram_send(struct onet_link *link, void *buf, uint16_t len); + #endif /* DGRAM_H */ |