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: ip.cpp
- Revision:
- 33:714a0345e59b
- Parent:
- 14:e75a59c1123d
- Child:
- 47:73af5c0b0dc2
--- a/ip.cpp Thu Aug 17 14:21:02 2017 +0000 +++ b/ip.cpp Wed Aug 23 18:02:42 2017 +0000 @@ -5,11 +5,12 @@ { switch (protocol) { - case ICMP: strncpy (text, "ICMP", size); break; - case IGMP: strncpy (text, "IGMP", size); break; - case ICMP6: strncpy (text, "ICMP6", size); break; - case TCP: strncpy (text, "TCP" , size); break; - case UDP: strncpy (text, "UDP" , size); break; + case ICMP: strncpy(text, "ICMP" , size); break; + case IGMP: strncpy(text, "IGMP" , size); break; + case ICMP6: strncpy(text, "ICMP6" , size); break; + case TCP: strncpy(text, "TCP" , size); break; + case UDP: strncpy(text, "UDP" , size); break; + case IP6IN4: strncpy(text, "IP6IN4", size); break; default: snprintf(text, size, "%d", protocol); break; } }