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
Diff: net.h
- Revision:
- 14:e75a59c1123d
- Parent:
- 13:9cd54f7db57a
- Child:
- 15:6ca6778168b1
diff -r 9cd54f7db57a -r e75a59c1123d net.h --- a/net.h Mon May 01 18:20:55 2017 +0000 +++ b/net.h Fri May 05 17:44:16 2017 +0000 @@ -1,7 +1,3 @@ -extern int NetIp4AddressToString(uint32_t ip, int size, char* text); -extern int NetIp6AddressToString(char* ip, int size, char* text); -extern int NetMacToString(char* mac, int size, char* text); -extern void NetProtocolToString(uint8_t protocol, int size, char* text); extern int16_t NetToHost16(int16_t n); extern int32_t NetToHost32(int32_t n); @@ -15,20 +11,6 @@ extern char* NetName; -#define ETHERNET 1 - -#define IPV4 0x0800 -#define ARP 0x0806 -#define IPV6 0x86DD - -#define HOPOPT 0 -#define ICMP 1 -#define IGMP 2 -#define TCP 6 -#define UDP 17 -#define ICMP6 58 - - #define DO_NOTHING 0 #define UNICAST 1 #define UNICAST_DNS 2 @@ -37,4 +19,5 @@ #define MULTICAST_ROUTER 5 #define MULTICAST_MDNS 6 #define MULTICAST_LLMNR 7 -#define BROADCAST 8 +#define SOLICITED_NODE 8 +#define BROADCAST 9