diff --git a/socket_functions.c b/socket_functions.c index e9dbb44..d1fe7bc 100644 --- a/socket_functions.c +++ b/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); @@ -76,6 +77,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/socket_functions.h b/socket_functions.h index 6cd8839..954732e 100644 --- a/socket_functions.h +++ b/socket_functions.h @@ -28,6 +28,8 @@ extern "C" { #endif +#include + extern u32 nsysnet_handle; #include @@ -39,6 +41,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 +93,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);