vitasdk
Documentation of the vitasdk
netps.h
Go to the documentation of this file.
1
7#ifndef _PSP2KERN_NET_NET_H_
8#define _PSP2KERN_NET_NET_H_
9
10#include <vitasdk/build_utils.h>
11#include <psp2common/net.h>
12
13#ifdef __cplusplus
14extern "C" {
15#endif
16
17/* prototypes */
18
19int ksceNetSocket(const char *name, int domain, int type, int protocol);
20int ksceNetAccept(int s, SceNetSockaddr *addr, unsigned int *addrlen);
21int ksceNetBind(int s, const SceNetSockaddr *addr, unsigned int addrlen);
22int ksceNetConnect(int s, const SceNetSockaddr *name, unsigned int namelen);
23int ksceNetListen(int s, int backlog);
24int ksceNetRecvfrom(int s, void *buf, unsigned int len, int flags, SceNetSockaddr *from, unsigned int *fromlen);
25int ksceNetSendto(int s, const void *msg, unsigned int len, int flags, const SceNetSockaddr *to, unsigned int tolen);
26int ksceNetSetsockopt(int s, int level, int optname, const void *optval, unsigned int optlen);
27int ksceNetClose(int s);
28
29#define ksceNetRecv(s, buf, len, flags) ksceNetRecvfrom(s, buf, len, flags, NULL, 0)
30#define ksceNetSend(s, msg, len, flags) ksceNetSendto(s, msg, len, flags, NULL, 0)
31#define ksceNetSocketClose ksceNetClose
32
33/* fixme ? */
34#define ksceNetHtons __builtin_bswap16
35#define ksceNetHtonl __builtin_bswap32
36
37#ifdef __cplusplus
38}
39#endif
40
41#endif /* _PSP2KERN_NET_NET_H_ */
uint8_t type
0 = read?, 1 = write?, 2 = feature?, 3 = ?
Definition bt.h:2
int flags
Event flags.
Definition debug.h:3
int ksceNetListen(int s, int backlog)
int ksceNetConnect(int s, const SceNetSockaddr *name, unsigned int namelen)
int ksceNetSendto(int s, const void *msg, unsigned int len, int flags, const SceNetSockaddr *to, unsigned int tolen)
int ksceNetSetsockopt(int s, int level, int optname, const void *optval, unsigned int optlen)
int ksceNetRecvfrom(int s, void *buf, unsigned int len, int flags, SceNetSockaddr *from, unsigned int *fromlen)
int ksceNetSocket(const char *name, int domain, int type, int protocol)
int ksceNetClose(int s)
int ksceNetBind(int s, const SceNetSockaddr *addr, unsigned int addrlen)
int ksceNetAccept(int s, SceNetSockaddr *addr, unsigned int *addrlen)
Definition net.h:451