6 int (*sceNetSocket
)(const char *, int, int, int);
7 int (*sceNetSocketClose
)(int);
8 int (*sceNetConnect
)(int, struct sockaddr
*, int);
9 int (*sceNetSend
)(int, const void *, size_t, int);
10 int (*sceNetBind
)(int, struct sockaddr
*, int);
11 int (*sceNetListen
)(int, int);
12 int (*sceNetAccept
)(int, struct sockaddr
*, unsigned int *);
13 int (*sceNetRecv
)(int, void *, size_t, int);
14 int (*sceNetSocketAbort
)(int , int );
16 int (*sceNetGetsockname
)(int, struct sockaddr
*, unsigned int *);
17 int (*sceNetGetsockopt
)(int s
, int level
, int optname
, void *restrict optval
, socklen_t
*restrict optlen
);
18 int (*sceNetSetsockopt
)(int s
, int level
, int optname
, const void *optval
, socklen_t optlen
);
20 const char (*sceNetInetNtop
)(int af
, const void *src
, char *dst
, int size
);
21 int (*sceNetInetPton
)(int af
, const char *src
, void *dst
);
23 uint64_t (*sceNetHtonll
)(uint64_t host64
);
24 uint32_t (*sceNetHtonl
)(uint32_t host32
);
25 uint16_t (*sceNetHtons
)(uint16_t host16
);
26 uint64_t (*sceNetNtohll
)(uint64_t net64
);
27 uint32_t (*sceNetNtohl
)(uint32_t net32
);
28 uint16_t (*sceNetNtohs
)(uint16_t net16
);
30 void initNetwork(void) {
31 int libNet
= sceKernelLoadStartModule("libSceNet.sprx", 0, NULL
, 0, 0, 0);
33 RESOLVE(libNet
, sceNetSocket
);
34 RESOLVE(libNet
, sceNetSocketClose
);
35 RESOLVE(libNet
, sceNetConnect
);
36 RESOLVE(libNet
, sceNetSend
);
37 RESOLVE(libNet
, sceNetBind
);
38 RESOLVE(libNet
, sceNetListen
);
39 RESOLVE(libNet
, sceNetAccept
);
40 RESOLVE(libNet
, sceNetRecv
);
41 RESOLVE(libNet
, sceNetSocketAbort
);
44 RESOLVE(libNet
, sceNetGetsockname
);
45 RESOLVE(libNet
, sceNetGetsockopt
);
46 RESOLVE(libNet
, sceNetSetsockopt
);
48 RESOLVE(libNet
, sceNetInetNtop
);
49 RESOLVE(libNet
, sceNetInetPton
);
51 RESOLVE(libNet
, sceNetHtonll
);
52 RESOLVE(libNet
, sceNetHtonl
);
53 RESOLVE(libNet
, sceNetHtons
);
54 RESOLVE(libNet
, sceNetNtohll
);
55 RESOLVE(libNet
, sceNetNtohl
);
56 RESOLVE(libNet
, sceNetNtohs
);