mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 01:55:19 +00:00
[TCPIP] Rearrange LwIP glue code.
Reduce unnecessary stuff in LwIP itself.
This commit is contained in:
parent
1734f29721
commit
a0a19c60d0
13 changed files with 35 additions and 59 deletions
|
@ -33,11 +33,9 @@ add_library(tcpip MODULE
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/tcpip.def)
|
${CMAKE_CURRENT_BINARY_DIR}/tcpip.def)
|
||||||
|
|
||||||
target_include_directories(tcpip BEFORE
|
target_include_directories(tcpip BEFORE
|
||||||
PRIVATE include
|
PRIVATE include)
|
||||||
PRIVATE lwip/src/include
|
|
||||||
PRIVATE lwip/src/include/ipv4)
|
|
||||||
|
|
||||||
target_link_libraries(tcpip ip lwip ${PSEH_LIB})
|
target_link_libraries(tcpip ip ${PSEH_LIB})
|
||||||
set_module_type(tcpip kernelmodedriver)
|
set_module_type(tcpip kernelmodedriver)
|
||||||
add_importlibs(tcpip ndis ntoskrnl hal)
|
add_importlibs(tcpip ndis ntoskrnl hal)
|
||||||
add_pch(tcpip include/precomp.h SOURCE)
|
add_pch(tcpip include/precomp.h SOURCE)
|
||||||
|
|
|
@ -1,14 +1,13 @@
|
||||||
|
|
||||||
include_directories(
|
|
||||||
BEFORE ${REACTOS_SOURCE_DIR}/drivers/network/tcpip/include
|
|
||||||
${REACTOS_SOURCE_DIR}/sdk/lib/drivers/lwip/src/include
|
|
||||||
${REACTOS_SOURCE_DIR}/sdk/lib/drivers/lwip/src/include/ipv4)
|
|
||||||
|
|
||||||
if(ARCH STREQUAL "i386")
|
if(ARCH STREQUAL "i386")
|
||||||
add_asm_files(ip_asm network/i386/checksum.S)
|
add_asm_files(ip_asm network/i386/checksum.S)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
list(APPEND SOURCE
|
list(APPEND SOURCE
|
||||||
|
lwip_glue/ip.c
|
||||||
|
lwip_glue/memory.c
|
||||||
|
lwip_glue/sys_arch.c
|
||||||
|
lwip_glue/tcp.c
|
||||||
network/address.c
|
network/address.c
|
||||||
network/arp.c
|
network/arp.c
|
||||||
network/checksum.c
|
network/checksum.c
|
||||||
|
@ -30,11 +29,11 @@ list(APPEND SOURCE
|
||||||
transport/tcp/tcp.c
|
transport/tcp/tcp.c
|
||||||
transport/udp/udp.c)
|
transport/udp/udp.c)
|
||||||
|
|
||||||
add_library(ip ${SOURCE} ${ip_asm})
|
add_library(ip OBJECT ${SOURCE} ${ip_asm})
|
||||||
|
|
||||||
|
target_link_libraries(ip lwip)
|
||||||
|
|
||||||
target_include_directories(ip BEFORE
|
target_include_directories(ip BEFORE
|
||||||
PRIVATE ${REACTOS_SOURCE_DIR}/drivers/network/tcpip/include
|
PRIVATE ${REACTOS_SOURCE_DIR}/drivers/network/tcpip/include)
|
||||||
PRIVATE ${REACTOS_SOURCE_DIR}/drivers/network/tcpip/lwip/src/include
|
|
||||||
PRIVATE ${REACTOS_SOURCE_DIR}/drivers/network/tcpip/lwip/src/include/ipv4)
|
|
||||||
|
|
||||||
add_pch(ip precomp.h SOURCE)
|
add_pch(ip precomp.h SOURCE)
|
||||||
|
|
|
@ -1,13 +1,11 @@
|
||||||
#include "lwip/sys.h"
|
#include <lwip/netif.h>
|
||||||
#include "lwip/netif.h"
|
#include <lwip/tcpip.h>
|
||||||
#include "lwip/tcpip.h"
|
|
||||||
|
|
||||||
#include "rosip.h"
|
|
||||||
|
|
||||||
#include <debug.h>
|
|
||||||
|
|
||||||
typedef struct netif* PNETIF;
|
typedef struct netif* PNETIF;
|
||||||
|
|
||||||
|
void
|
||||||
|
sys_shutdown(void);
|
||||||
|
|
||||||
void
|
void
|
||||||
LibIPInsertPacket(void *ifarg,
|
LibIPInsertPacket(void *ifarg,
|
||||||
const void *const data,
|
const void *const data,
|
|
@ -1,10 +1,10 @@
|
||||||
#ifndef _ROS_IP_H_
|
#ifndef _LWIP_GLUE_H_
|
||||||
#define _ROS_IP_H_
|
#define _LWIP_GLUE_H_
|
||||||
|
|
||||||
#include "lwip/tcp.h"
|
#include <lwip/tcp.h>
|
||||||
#include "lwip/pbuf.h"
|
#include <lwip/pbuf.h>
|
||||||
#include "lwip/ip_addr.h"
|
#include <lwip/ip_addr.h>
|
||||||
#include "tcpip.h"
|
#include <tcpip.h>
|
||||||
|
|
||||||
#ifndef LWIP_TAG
|
#ifndef LWIP_TAG
|
||||||
#define LWIP_TAG 'PIwl'
|
#define LWIP_TAG 'PIwl'
|
|
@ -1,7 +1,4 @@
|
||||||
#include "lwip/opt.h"
|
#include <lwip/mem.h>
|
||||||
|
|
||||||
#include "lwip/def.h"
|
|
||||||
#include "lwip/mem.h"
|
|
||||||
|
|
||||||
#ifndef LWIP_TAG
|
#ifndef LWIP_TAG
|
||||||
#define LWIP_TAG 'PIwl'
|
#define LWIP_TAG 'PIwl'
|
|
@ -1,12 +1,7 @@
|
||||||
#include "lwip/sys.h"
|
|
||||||
|
|
||||||
#include "lwip/tcp.h"
|
|
||||||
#include "lwip/pbuf.h"
|
|
||||||
#include "lwip/err.h"
|
|
||||||
|
|
||||||
#include "rosip.h"
|
|
||||||
|
|
||||||
#include <debug.h>
|
#include <debug.h>
|
||||||
|
#include <lwip/sys.h>
|
||||||
|
|
||||||
|
#include "lwip_glue.h"
|
||||||
|
|
||||||
static LIST_ENTRY ThreadListHead;
|
static LIST_ENTRY ThreadListHead;
|
||||||
static KSPIN_LOCK ThreadListLock;
|
static KSPIN_LOCK ThreadListLock;
|
|
@ -1,10 +1,7 @@
|
||||||
#include "lwip/sys.h"
|
|
||||||
#include "lwip/netif.h"
|
|
||||||
#include "lwip/tcpip.h"
|
|
||||||
|
|
||||||
#include "rosip.h"
|
|
||||||
|
|
||||||
#include <debug.h>
|
#include <debug.h>
|
||||||
|
#include <lwip/tcpip.h>
|
||||||
|
|
||||||
|
#include "lwip_glue.h"
|
||||||
|
|
||||||
static const char * const tcp_state_str[] = {
|
static const char * const tcp_state_str[] = {
|
||||||
"CLOSED",
|
"CLOSED",
|
|
@ -20,5 +20,6 @@
|
||||||
#include <interface.h>
|
#include <interface.h>
|
||||||
#include <ports.h>
|
#include <ports.h>
|
||||||
#include <chew.h>
|
#include <chew.h>
|
||||||
|
#include "lwip_glue/lwip_glue.h"
|
||||||
|
|
||||||
#endif /* _IP_PCH_ */
|
#endif /* _IP_PCH_ */
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
|
|
||||||
#include "precomp.h"
|
#include "precomp.h"
|
||||||
|
|
||||||
#include "rosip.h"
|
#include <lwip_glue/lwip_glue.h>
|
||||||
|
|
||||||
extern NPAGED_LOOKASIDE_LIST TdiBucketLookasideList;
|
extern NPAGED_LOOKASIDE_LIST TdiBucketLookasideList;
|
||||||
|
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
#include "lwip/tcp.h"
|
#include "lwip/tcp.h"
|
||||||
#include "lwip/api.h"
|
#include "lwip/api.h"
|
||||||
|
|
||||||
#include "rosip.h"
|
#include <lwip_glue/lwip_glue.h>
|
||||||
|
|
||||||
extern NPAGED_LOOKASIDE_LIST TdiBucketLookasideList;
|
extern NPAGED_LOOKASIDE_LIST TdiBucketLookasideList;
|
||||||
|
|
||||||
|
|
|
@ -21,7 +21,7 @@ PORT_SET TCPPorts;
|
||||||
#include "lwip/init.h"
|
#include "lwip/init.h"
|
||||||
#include "lwip/arch.h"
|
#include "lwip/arch.h"
|
||||||
|
|
||||||
#include "rosip.h"
|
#include <lwip_glue/lwip_glue.h>
|
||||||
|
|
||||||
NPAGED_LOOKASIDE_LIST TdiBucketLookasideList;
|
NPAGED_LOOKASIDE_LIST TdiBucketLookasideList;
|
||||||
|
|
||||||
|
|
|
@ -1,9 +1,5 @@
|
||||||
|
|
||||||
list(APPEND SOURCE
|
list(APPEND SOURCE
|
||||||
src/rosip.c
|
|
||||||
src/rostcp.c
|
|
||||||
src/rosmem.c
|
|
||||||
src/sys_arch.c
|
|
||||||
src/api/api_lib.c
|
src/api/api_lib.c
|
||||||
src/api/api_msg.c
|
src/api/api_msg.c
|
||||||
src/api/err.c
|
src/api/err.c
|
||||||
|
@ -49,10 +45,9 @@ list(APPEND SOURCE
|
||||||
|
|
||||||
add_library(lwip ${SOURCE})
|
add_library(lwip ${SOURCE})
|
||||||
|
|
||||||
target_include_directories(lwip BEFORE
|
target_include_directories(lwip
|
||||||
PRIVATE ${REACTOS_SOURCE_DIR}/drivers/network/tcpip/include
|
PUBLIC src/include
|
||||||
PRIVATE ${REACTOS_SOURCE_DIR}/drivers/network/tcpip/lwip/src/include
|
PUBLIC src/include/ipv4)
|
||||||
PRIVATE ${REACTOS_SOURCE_DIR}/drivers/network/tcpip/lwip/src/include/ipv4)
|
|
||||||
|
|
||||||
add_dependencies(lwip bugcodes xdk)
|
add_dependencies(lwip bugcodes xdk)
|
||||||
add_pch(lwip precomp.h SOURCE)
|
add_pch(lwip precomp.h SOURCE)
|
||||||
|
|
|
@ -37,7 +37,3 @@ sys_arch_protect(sys_prot_t *lev);
|
||||||
|
|
||||||
void
|
void
|
||||||
sys_arch_unprotect(sys_prot_t lev);
|
sys_arch_unprotect(sys_prot_t lev);
|
||||||
|
|
||||||
void
|
|
||||||
sys_shutdown(void);
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue