summaryrefslogtreecommitdiff
path: root/net/udp.h
diff options
context:
space:
mode:
Diffstat (limited to 'net/udp.h')
-rw-r--r--net/udp.h11
1 files changed, 11 insertions, 0 deletions
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 <stdint.h>
+
+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);