Skip to content

Commit 4980778

Browse files
moving lwipTypes udp_struct into udp file
1 parent 4a1e9d4 commit 4980778

File tree

2 files changed

+10
-26
lines changed

2 files changed

+10
-26
lines changed

libraries/lwIpWrapper/src/lwipTypes.h

Lines changed: 0 additions & 24 deletions
This file was deleted.

libraries/lwIpWrapper/src/lwipUDP.h

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,19 @@
55
#include <functional>
66

77
#include "CNetIf.h"
8-
#include "lwipMem.h"
9-
#include "lwipTypes.h"
108

119
#define UDP_TX_PACKET_MAX_SIZE 24
1210

11+
/* UDP structure */
12+
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+
1321
class lwipUDP : public UDP {
1422
private:
1523
uint16_t _port; // local port to listen on

0 commit comments

Comments
 (0)