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: udp/udp.cpp
- Revision:
- 52:fbc5a46b5e16
- Parent:
- 44:83ce5ace337b
- Child:
- 57:e0fb648acf48
diff -r 007bd938f2c3 -r fbc5a46b5e16 udp/udp.cpp --- a/udp/udp.cpp Fri Nov 03 18:14:06 2017 +0000 +++ b/udp/udp.cpp Wed Nov 08 20:46:36 2017 +0000 @@ -13,7 +13,7 @@ #include "ns.h" #include "io.h" -#define UNKNOWN true +bool UdpTrace = true; #define HEADER_SIZE 8 __packed struct header @@ -49,8 +49,9 @@ case 1900: //SSDP Simple Service Discovery Protocol (uPnP) case 3074: //Xbox live case 3076: //Call of Duty - Xbox + case 5050: //Don't know but have been sent by Kate and my android phones. case 5224: //Don't know but a burst was broadcast by Kate's phone containing '_logitech-reverse-bonjour._tcp.local.5446 192.168.1.36 string' - case 9956: //Alljoyn part af Allseen IoT services + case 9956: //Alljoyn part of Allseen IoT services case 9997: //VLC case 9998: //VLC case 9999: //VLC @@ -59,7 +60,11 @@ //Report anything else default: - if (UNKNOWN) LogTimeF("UDP unknown port %d\r\n", dstPort); + if (UdpTrace) + { + LogTimeF("UDP unknown port %d\r\n", dstPort); + traceback(); //This will already include the UDP header + } return DO_NOTHING; } }