diff --git a/source/os_defs.h b/source/os_defs.h index 48a4c8f..7226a4c 100644 --- a/source/os_defs.h +++ b/source/os_defs.h @@ -18,6 +18,13 @@ typedef struct _OsSpecifics unsigned int addr_KernSyscallTbl5; } OsSpecifics; +typedef struct _s_mem_area +{ + unsigned int address; + unsigned int size; + struct _s_mem_area* next; +} s_mem_area; + #ifdef __cplusplus } #endif diff --git a/source/socket_functions.c b/source/socket_functions.c index 9fecf84..d346108 100644 --- a/source/socket_functions.c +++ b/source/socket_functions.c @@ -32,6 +32,7 @@ EXPORT_DECL(s32, socket_lib_init, void); EXPORT_DECL(s32, socket_lib_finish, void); EXPORT_DECL(s32, socket, s32 domain, s32 type, s32 protocol); EXPORT_DECL(s32, socketclose, s32 s); +EXPORT_DECL(s32, shutdown, s32 s, s32 how); EXPORT_DECL(s32, connect, s32 s, void *addr, s32 addrlen); EXPORT_DECL(s32, bind, s32 s,struct sockaddr *name,s32 namelen); EXPORT_DECL(s32, listen, s32 s,u32 backlog); @@ -75,6 +76,7 @@ void InitSocketFunctionPointers(void){ OS_FIND_EXPORT(nsysnet_handle, socketlasterr); OS_FIND_EXPORT(nsysnet_handle, socket); OS_FIND_EXPORT(nsysnet_handle, socketclose); + OS_FIND_EXPORT(nsysnet_handle, shutdown); OS_FIND_EXPORT(nsysnet_handle, connect); OS_FIND_EXPORT(nsysnet_handle, bind); OS_FIND_EXPORT(nsysnet_handle, listen); diff --git a/source/socket_functions.h b/source/socket_functions.h index f67c41c..f9b877d 100644 --- a/source/socket_functions.h +++ b/source/socket_functions.h @@ -39,6 +39,10 @@ extern u32 hostIpAddress; #define AF_INET 2 +#define SHUT_RD 0 +#define SHUT_WR 1 +#define SHUT_RDWR 2 + #define SOCK_STREAM 1 #define SOCK_DGRAM 2 @@ -87,6 +91,7 @@ extern s32 (*socket_lib_init)(void); extern s32 (*socket_lib_finish)(void); extern s32 (*socket)(s32 domain, s32 type, s32 protocol); extern s32 (*socketclose)(s32 s); +extern s32 (*shutdown)(s32 s, s32 how); extern s32 (*connect)(s32 s, void *addr, s32 addrlen); extern s32 (*bind)(s32 s,struct sockaddr *name,s32 namelen); extern s32 (*listen)(s32 s,u32 backlog);