mirror of
https://github.com/reactos/reactos.git
synced 2024-10-31 03:48:17 +00:00
a0a19c60d0
Reduce unnecessary stuff in LwIP itself.
44 lines
724 B
C
44 lines
724 B
C
#include <lwip/netif.h>
|
|
#include <lwip/tcpip.h>
|
|
|
|
typedef struct netif* PNETIF;
|
|
|
|
void
|
|
sys_shutdown(void);
|
|
|
|
void
|
|
LibIPInsertPacket(void *ifarg,
|
|
const void *const data,
|
|
const u32_t size)
|
|
{
|
|
struct pbuf *p;
|
|
|
|
ASSERT(ifarg);
|
|
ASSERT(data);
|
|
ASSERT(size > 0);
|
|
|
|
p = pbuf_alloc(PBUF_RAW, size, PBUF_RAM);
|
|
if (p)
|
|
{
|
|
ASSERT(p->tot_len == p->len);
|
|
ASSERT(p->len == size);
|
|
|
|
RtlCopyMemory(p->payload, data, p->len);
|
|
|
|
((PNETIF)ifarg)->input(p, (PNETIF)ifarg);
|
|
}
|
|
}
|
|
|
|
void
|
|
LibIPInitialize(void)
|
|
{
|
|
/* This completes asynchronously */
|
|
tcpip_init(NULL, NULL);
|
|
}
|
|
|
|
void
|
|
LibIPShutdown(void)
|
|
{
|
|
/* This is synchronous */
|
|
sys_shutdown();
|
|
} |