Home | Info | Community | Development | myReactOS | Contact Us
ReactOS Development > Doxygenrosip.c
Go to the documentation of this file.
00001 #include "lwip/sys.h" 00002 #include "lwip/tcpip.h" 00003 00004 #include "rosip.h" 00005 00006 #include <debug.h> 00007 00008 typedef struct netif* PNETIF; 00009 00010 void 00011 LibIPInsertPacket(void *ifarg, 00012 const void *const data, 00013 const u32_t size) 00014 { 00015 struct pbuf *p; 00016 00017 ASSERT(ifarg); 00018 ASSERT(data); 00019 ASSERT(size > 0); 00020 00021 p = pbuf_alloc(PBUF_RAW, size, PBUF_RAM); 00022 if (p) 00023 { 00024 ASSERT(p->tot_len == p->len); 00025 ASSERT(p->len == size); 00026 00027 RtlCopyMemory(p->payload, data, p->len); 00028 00029 ((PNETIF)ifarg)->input(p, (PNETIF)ifarg); 00030 } 00031 } 00032 00033 void 00034 LibIPInitialize(void) 00035 { 00036 /* This completes asynchronously */ 00037 tcpip_init(NULL, NULL); 00038 } 00039 00040 void 00041 LibIPShutdown(void) 00042 { 00043 /* This is synchronous */ 00044 sys_shutdown(); 00045 } Generated on Sat May 26 2012 04:35:02 for ReactOS by
1.7.6.1
|