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.c
- Revision:
- 196:0876a7609a60
- Parent:
- 195:bd5b123143ca
- Child:
- 197:465f5f2154b7
diff -r bd5b123143ca -r 0876a7609a60 udp/udp.c --- a/udp/udp.c Sun Apr 18 19:04:48 2021 +0000 +++ b/udp/udp.c Fri Apr 23 10:33:21 2021 +0000 @@ -190,13 +190,16 @@ dstPort = TFTP_SERVER_PORT; } } - if (!action) + if (UserPollForUdpPacketToSend) { - action = UserPollForUdpPacketToSend(type, pDataLength, pData); - if (action) + if (!action) { - srcPort = UserUdpDstPort; - dstPort = UserUdpSrcPort; + action = UserPollForUdpPacketToSend(type, pDataLength, pData); + if (action) + { + srcPort = UserUdpDstPort; + dstPort = UserUdpSrcPort; + } } }