ReactOS 0.4.15-dev-8227-g32d615f
ip.c File Reference
#include <lwip/netif.h>
#include <lwip/tcpip.h>
Include dependency graph for ip.c:

Go to the source code of this file.

Typedefs

typedef struct netifPNETIF
 

Functions

void sys_shutdown (void)
 
void LibIPInsertPacket (void *ifarg, const void *const data, const u32_t size)
 
void LibIPInitialize (void)
 
void LibIPShutdown (void)
 

Typedef Documentation

◆ PNETIF

typedef struct netif* PNETIF

Definition at line 4 of file ip.c.

Function Documentation

◆ LibIPInitialize()

void LibIPInitialize ( void  )

Definition at line 33 of file ip.c.

34{
35 /* This completes asynchronously */
37}
#define NULL
Definition: types.h:112
void tcpip_init(tcpip_init_done_fn initfunc, void *arg)
Definition: tcpip.c:458

Referenced by TCPStartup().

◆ LibIPInsertPacket()

void LibIPInsertPacket ( void ifarg,
const void *const  data,
const u32_t  size 
)

Definition at line 10 of file ip.c.

13{
14 struct pbuf *p;
15
16 ASSERT(ifarg);
17 ASSERT(data);
18 ASSERT(size > 0);
19
21 if (p)
22 {
23 ASSERT(p->tot_len == p->len);
24 ASSERT(p->len == size);
25
26 RtlCopyMemory(p->payload, data, p->len);
27
28 ((PNETIF)ifarg)->input(p, (PNETIF)ifarg);
29 }
30}
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
GLsizeiptr size
Definition: glext.h:5919
GLfloat GLfloat p
Definition: glext.h:8902
struct netif * PNETIF
Definition: ip.c:4
#define ASSERT(a)
Definition: mode.c:44
struct pbuf * pbuf_alloc(pbuf_layer layer, u16_t length, pbuf_type type)
Definition: pbuf.c:207
@ PBUF_RAM
Definition: pbuf.h:58
@ PBUF_RAW
Definition: pbuf.h:54
Definition: netif.h:136
Definition: pbuf.h:79
#define RtlCopyMemory(Destination, Source, Length)
Definition: typedefs.h:263

Referenced by TCPReceive().

◆ LibIPShutdown()

void LibIPShutdown ( void  )

Definition at line 40 of file ip.c.

41{
42 /* This is synchronous */
44}
void sys_shutdown(void)
Definition: sys_arch.c:332

Referenced by TCPShutdown().

◆ sys_shutdown()

void sys_shutdown ( void  )

Definition at line 332 of file sys_arch.c.

333{
334 PLIST_ENTRY CurrentEntry;
335 thread_t Container;
336
337 /* Set the termination event */
339
340 /* Loop through the thread list and wait for each to die */
342 {
343 Container = CONTAINING_RECORD(CurrentEntry, struct _thread_t, ListEntry);
344
345 if (Container->ThreadFunction)
346 {
347 KeWaitForSingleObject(Container->Handle,
348 Executive,
350 FALSE,
351 NULL);
352
353 ZwClose(Container->Handle);
354 }
355 }
356
359}
#define FALSE
Definition: types.h:117
#define KeWaitForSingleObject(pEvt, foo, a, b, c)
Definition: env_spec_w32.h:478
#define KeSetEvent(pEvt, foo, foo2)
Definition: env_spec_w32.h:476
PLIST_ENTRY NTAPI ExInterlockedRemoveHeadList(IN OUT PLIST_ENTRY ListHead, IN OUT PKSPIN_LOCK Lock)
Definition: interlocked.c:166
VOID NTAPI ExDeleteNPagedLookasideList(IN PNPAGED_LOOKASIDE_LIST Lookaside)
Definition: lookas.c:170
#define KernelMode
Definition: asm.h:34
NTSYSAPI NTSTATUS NTAPI ZwClose(_In_ HANDLE Handle)
Definition: typedefs.h:120
void(* ThreadFunction)(void *arg)
Definition: sys_arch.c:18
HANDLE Handle
Definition: sys_arch.c:17
static LIST_ENTRY ThreadListHead
Definition: sys_arch.c:6
static KSPIN_LOCK ThreadListLock
Definition: sys_arch.c:7
KEVENT TerminationEvent
Definition: sys_arch.c:9
NPAGED_LOOKASIDE_LIST MessageLookasideList
Definition: sys_arch.c:10
NPAGED_LOOKASIDE_LIST QueueEntryLookasideList
Definition: sys_arch.c:11
#define CONTAINING_RECORD(address, type, field)
Definition: typedefs.h:260
#define IO_NO_INCREMENT
Definition: iotypes.h:598
@ Executive
Definition: ketypes.h:415

Referenced by LibIPShutdown().