From ae33cc6557790a502a01b380b0926944ca2f3cfa Mon Sep 17 00:00:00 2001 From: Miguel Date: Wed, 26 Sep 2018 10:22:37 +0200 Subject: ntp and udp --- net/udp.h | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 net/udp.h (limited to 'net/udp.h') diff --git a/net/udp.h b/net/udp.h new file mode 100644 index 0000000..2c30804 --- /dev/null +++ b/net/udp.h @@ -0,0 +1,11 @@ +#include "netdev.h" +#include + +struct udp_v4{ + uint16_t src_port; + uint16_t dst_port; + uint16_t len; + uint16_t csum; +} __attribute__((packed)); + +uint32_t udp_generic(struct netdev *dev, uint32_t ip, uint16_t src, uint16_t dst, uint8_t* pos,uint8_t *end); -- cgit v1.2.3