A stack which works with or without an Mbed os library. Provides IPv4 or IPv6 with a full 1500 byte buffer.

Dependents:   oldheating gps motorhome heating

Revision:
15:6ca6778168b1
Parent:
14:e75a59c1123d
Child:
22:914b970356f0
--- a/net.h	Fri May 05 17:44:16 2017 +0000
+++ b/net.h	Tue May 09 15:39:03 2017 +0000
@@ -1,3 +1,5 @@
+#pragma once
+#include "mbed.h"
 
 extern  int16_t NetToHost16(int16_t n);
 extern  int32_t NetToHost32(int32_t n);
@@ -10,6 +12,29 @@
 
 extern char* NetName;
 
+struct NetAction
+{
+    char dst; //none, reply, specified, dns, dhcp, all nodes, all routers, mdns, llmnr,
+    char cst; //none, unicast, multicast, broadcast, solicited
+    char pro; //none, IPv4 or IPv6
+    char dbg; //false or true
+};
+
+#define NET_DO_NOTHING  0
+#define NET_REPLY       1
+#define NET_SPECIFIED   2
+#define NET_ALL_NODES   3
+#define NET_ALL_ROUTERS 4
+#define NET_DNS         5
+#define NET_MDNS        6
+#define NET_LLMNR       7
+#define NET_DHCP        8
+
+#define NET_UNICAST     1
+#define NET_MULTICAST   2
+#define NET_SOLICITED   3
+#define NET_BROADCAST   4
+
 
 #define DO_NOTHING       0
 #define   UNICAST        1