mirror of
https://github.com/Maschell/dynamic_libs.git
synced 2024-11-25 21:54:14 +01:00
Added missing socket functions
This commit is contained in:
parent
9bc4dfe2d1
commit
71a7483d20
@ -18,6 +18,13 @@ typedef struct _OsSpecifics
|
|||||||
unsigned int addr_KernSyscallTbl5;
|
unsigned int addr_KernSyscallTbl5;
|
||||||
} OsSpecifics;
|
} OsSpecifics;
|
||||||
|
|
||||||
|
typedef struct _s_mem_area
|
||||||
|
{
|
||||||
|
unsigned int address;
|
||||||
|
unsigned int size;
|
||||||
|
struct _s_mem_area* next;
|
||||||
|
} s_mem_area;
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -32,6 +32,7 @@ EXPORT_DECL(s32, socket_lib_init, void);
|
|||||||
EXPORT_DECL(s32, socket_lib_finish, void);
|
EXPORT_DECL(s32, socket_lib_finish, void);
|
||||||
EXPORT_DECL(s32, socket, s32 domain, s32 type, s32 protocol);
|
EXPORT_DECL(s32, socket, s32 domain, s32 type, s32 protocol);
|
||||||
EXPORT_DECL(s32, socketclose, s32 s);
|
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, connect, s32 s, void *addr, s32 addrlen);
|
||||||
EXPORT_DECL(s32, bind, s32 s,struct sockaddr *name,s32 namelen);
|
EXPORT_DECL(s32, bind, s32 s,struct sockaddr *name,s32 namelen);
|
||||||
EXPORT_DECL(s32, listen, s32 s,u32 backlog);
|
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, socketlasterr);
|
||||||
OS_FIND_EXPORT(nsysnet_handle, socket);
|
OS_FIND_EXPORT(nsysnet_handle, socket);
|
||||||
OS_FIND_EXPORT(nsysnet_handle, socketclose);
|
OS_FIND_EXPORT(nsysnet_handle, socketclose);
|
||||||
|
OS_FIND_EXPORT(nsysnet_handle, shutdown);
|
||||||
OS_FIND_EXPORT(nsysnet_handle, connect);
|
OS_FIND_EXPORT(nsysnet_handle, connect);
|
||||||
OS_FIND_EXPORT(nsysnet_handle, bind);
|
OS_FIND_EXPORT(nsysnet_handle, bind);
|
||||||
OS_FIND_EXPORT(nsysnet_handle, listen);
|
OS_FIND_EXPORT(nsysnet_handle, listen);
|
||||||
|
@ -39,6 +39,10 @@ extern u32 hostIpAddress;
|
|||||||
|
|
||||||
#define AF_INET 2
|
#define AF_INET 2
|
||||||
|
|
||||||
|
#define SHUT_RD 0
|
||||||
|
#define SHUT_WR 1
|
||||||
|
#define SHUT_RDWR 2
|
||||||
|
|
||||||
#define SOCK_STREAM 1
|
#define SOCK_STREAM 1
|
||||||
#define SOCK_DGRAM 2
|
#define SOCK_DGRAM 2
|
||||||
|
|
||||||
@ -87,6 +91,7 @@ extern s32 (*socket_lib_init)(void);
|
|||||||
extern s32 (*socket_lib_finish)(void);
|
extern s32 (*socket_lib_finish)(void);
|
||||||
extern s32 (*socket)(s32 domain, s32 type, s32 protocol);
|
extern s32 (*socket)(s32 domain, s32 type, s32 protocol);
|
||||||
extern s32 (*socketclose)(s32 s);
|
extern s32 (*socketclose)(s32 s);
|
||||||
|
extern s32 (*shutdown)(s32 s, s32 how);
|
||||||
extern s32 (*connect)(s32 s, void *addr, s32 addrlen);
|
extern s32 (*connect)(s32 s, void *addr, s32 addrlen);
|
||||||
extern s32 (*bind)(s32 s,struct sockaddr *name,s32 namelen);
|
extern s32 (*bind)(s32 s,struct sockaddr *name,s32 namelen);
|
||||||
extern s32 (*listen)(s32 s,u32 backlog);
|
extern s32 (*listen)(s32 s,u32 backlog);
|
||||||
|
Loading…
Reference in New Issue
Block a user