We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4a1e9d4 commit 4980778Copy full SHA for 4980778
libraries/lwIpWrapper/src/lwipTypes.h
libraries/lwIpWrapper/src/lwipUDP.h
@@ -5,11 +5,19 @@
5
#include <functional>
6
7
#include "CNetIf.h"
8
-#include "lwipMem.h"
9
-#include "lwipTypes.h"
10
11
#define UDP_TX_PACKET_MAX_SIZE 24
12
+/* UDP structure */
+struct udp_struct {
13
+ struct udp_pcb* pcb; /* pointer on the current udp_pcb */
14
+ struct pbuf* p;
15
+ uint16_t pbuf_offset;
16
+ ip_addr_t ip; // the remote IP address from which the packet was received
17
+ u16_t port; // the remote port from which the packet was received
18
+ std::function<void()> onDataArrival;
19
+};
20
+
21
class lwipUDP : public UDP {
22
private:
23
uint16_t _port; // local port to listen on
0 commit comments