ReactOS 0.4.15-dev-8096-ga0eec98
lwip_glue.h
Go to the documentation of this file.
1#ifndef _LWIP_GLUE_H_
2#define _LWIP_GLUE_H_
3
4#include <lwip/tcp.h>
5#include <lwip/pbuf.h>
6#include <lwip/ip_addr.h>
7#include <tcpip.h>
8
9#ifndef LWIP_TAG
10 #define LWIP_TAG 'PIwl'
11 #define LWIP_MESSAGE_TAG 'sMwl'
12 #define LWIP_QUEUE_TAG 'uQwl'
13#endif
14
15typedef struct tcp_pcb* PTCP_PCB;
16
17typedef struct _QUEUE_ENTRY
18{
19 struct pbuf *p;
23
25{
26 /* Synchronization */
28
29 /* Input */
30 union {
31 struct {
34 struct {
35 struct tcp_pcb* pcb;
37 struct {
42 struct {
43 PCONNECTION_ENDPOINT Connection;
46 struct {
48 void *Data;
51 struct {
53 struct ip_addr *IpAddress;
54 u16_t Port;
56 struct {
57 PCONNECTION_ENDPOINT Connection;
61 struct {
66
67 /* Output */
68 union {
69 struct {
70 struct tcp_pcb *NewPcb;
72 struct {
75 struct {
76 struct tcp_pcb *NewPcb;
78 struct {
82 struct {
85 struct {
88 struct {
92};
93
95
96/* External TCP event handlers */
97extern void TCPConnectEventHandler(void *arg, const err_t err);
98extern void TCPAcceptEventHandler(void *arg, PTCP_PCB newpcb);
99extern void TCPSendEventHandler(void *arg, const u16_t space);
100extern void TCPFinEventHandler(void *arg, const err_t err);
101extern void TCPRecvEventHandler(void *arg);
102
103/* TCP functions */
106err_t LibTCPBind(PCONNECTION_ENDPOINT Connection, struct ip_addr *const ipaddr, const u16_t port);
107PTCP_PCB LibTCPListen(PCONNECTION_ENDPOINT Connection, const u8_t backlog);
108err_t LibTCPSend(PCONNECTION_ENDPOINT Connection, void *const dataptr, const u16_t len, u32_t *sent, const int safe);
109err_t LibTCPConnect(PCONNECTION_ENDPOINT Connection, struct ip_addr *const ipaddr, const u16_t port);
110err_t LibTCPShutdown(PCONNECTION_ENDPOINT Connection, const int shut_rx, const int shut_tx);
111err_t LibTCPClose(PCONNECTION_ENDPOINT Connection, const int safe, const int callback);
112
113err_t LibTCPGetPeerName(PTCP_PCB pcb, struct ip_addr *const ipaddr, u16_t *const port);
114err_t LibTCPGetHostName(PTCP_PCB pcb, struct ip_addr *const ipaddr, u16_t *const port);
115void LibTCPAccept(PTCP_PCB pcb, struct tcp_pcb *listen_pcb, void *arg);
118
119/* IP functions */
120void LibIPInsertPacket(void *ifarg, const void *const data, const u32_t size);
121void LibIPInitialize(void);
122void LibIPShutdown(void);
123
124#endif
unsigned char BOOLEAN
@ sent
Definition: SystemMenu.c:27
UINT Received
Definition: arping.c:40
LONG NTSTATUS
Definition: precomp.h:26
BOOL Error
Definition: chkdsk.c:66
USHORT port
Definition: uri.c:228
unsigned long u32_t
Definition: cc.h:25
unsigned char u8_t
Definition: cc.h:23
unsigned short u16_t
Definition: cc.h:24
s8_t err_t
Definition: err.h:47
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
GLsizeiptr size
Definition: glext.h:5919
GLenum GLsizei len
Definition: glext.h:6722
int const JOCTET * dataptr
Definition: jpeglib.h:1031
void LibTCPGetSocketStatus(PTCP_PCB pcb, PULONG State)
Definition: tcp.c:879
void LibTCPSetNoDelay(PTCP_PCB pcb, BOOLEAN Set)
Definition: tcp.c:868
void LibIPInsertPacket(void *ifarg, const void *const data, const u32_t size)
Definition: ip.c:10
void TCPRecvEventHandler(void *arg)
Definition: event.c:380
PTCP_PCB LibTCPListen(PCONNECTION_ENDPOINT Connection, const u8_t backlog)
Definition: tcp.c:469
void TCPConnectEventHandler(void *arg, const err_t err)
Definition: event.c:420
PTCP_PCB LibTCPSocket(void *arg)
Definition: tcp.c:336
void TCPSendEventHandler(void *arg, const u16_t space)
Definition: event.c:294
err_t LibTCPShutdown(PCONNECTION_ENDPOINT Connection, const int shut_rx, const int shut_tx)
Definition: tcp.c:717
void TCPFinEventHandler(void *arg, const err_t err)
Definition: event.c:182
void TCPAcceptEventHandler(void *arg, PTCP_PCB newpcb)
Definition: event.c:231
struct _QUEUE_ENTRY * PQUEUE_ENTRY
void LibIPShutdown(void)
Definition: ip.c:40
VOID LibTCPFreeSocket(PTCP_PCB pcb)
Definition: tcp.c:375
struct tcp_pcb * PTCP_PCB
Definition: lwip_glue.h:15
err_t LibTCPConnect(PCONNECTION_ENDPOINT Connection, struct ip_addr *const ipaddr, const u16_t port)
Definition: tcp.c:622
NTSTATUS LibTCPGetDataFromConnectionQueue(PCONNECTION_ENDPOINT Connection, PUCHAR RecvBuffer, UINT RecvLen, UINT *Received)
Definition: tcp.c:100
err_t LibTCPGetPeerName(PTCP_PCB pcb, struct ip_addr *const ipaddr, u16_t *const port)
Definition: tcp.c:856
err_t LibTCPClose(PCONNECTION_ENDPOINT Connection, const int safe, const int callback)
Definition: tcp.c:798
void LibTCPAccept(PTCP_PCB pcb, struct tcp_pcb *listen_pcb, void *arg)
Definition: tcp.c:830
struct _QUEUE_ENTRY QUEUE_ENTRY
err_t LibTCPSend(PCONNECTION_ENDPOINT Connection, void *const dataptr, const u16_t len, u32_t *sent, const int safe)
Definition: tcp.c:557
err_t LibTCPGetHostName(PTCP_PCB pcb, struct ip_addr *const ipaddr, u16_t *const port)
Definition: tcp.c:844
void LibIPInitialize(void)
Definition: ip.c:33
err_t LibTCPBind(PCONNECTION_ENDPOINT Connection, struct ip_addr *const ipaddr, const u16_t port)
Definition: tcp.c:415
static IPrintDialogCallback callback
Definition: printdlg.c:326
unsigned int UINT
Definition: ndis.h:50
static BOOL Set
Definition: pageheap.c:10
#define err(...)
Definition: typedefs.h:120
Definition: lwip_glue.h:18
struct pbuf * p
Definition: lwip_glue.h:19
LIST_ENTRY ListEntry
Definition: lwip_glue.h:21
ULONG Offset
Definition: lwip_glue.h:20
union lwip_callback_msg::@1028 Output
struct tcp_pcb * pcb
Definition: lwip_glue.h:35
struct lwip_callback_msg::@1027::@1029 Socket
struct lwip_callback_msg::@1027::@1034 Connect
struct lwip_callback_msg::@1027::@1035 Shutdown
struct lwip_callback_msg::@1027::@1033 Send
struct tcp_pcb * NewPcb
Definition: lwip_glue.h:70
struct lwip_callback_msg::@1027::@1032 Listen
struct lwip_callback_msg::@1027::@1030 FreeSocket
PCONNECTION_ENDPOINT Connection
Definition: lwip_glue.h:38
struct lwip_callback_msg::@1027::@1036 Close
struct lwip_callback_msg::@1027::@1031 Bind
struct ip_addr * IpAddress
Definition: lwip_glue.h:39
union lwip_callback_msg::@1027 Input
Definition: pbuf.h:79
uint32_t * PULONG
Definition: typedefs.h:59
unsigned char * PUCHAR
Definition: typedefs.h:53
uint32_t ULONG
Definition: typedefs.h:59