vitasdk
Documentation of the vitasdk
pspnet_adhoc.h
Go to the documentation of this file.
1
7#ifndef _PSP2_PSPNET_ADHOC_H_
8#define _PSP2_PSPNET_ADHOC_H_
9
10#include <vitasdk/build_utils.h>
11#include <psp2/types.h>
13#include <psp2/net/net.h>
14
15#ifdef __cplusplus
16extern "C" {
17#endif
18
50
56
68
76
84
96
106
107#define SCE_NET_ADHOC_F_ALERTALL \
108 (SCE_NET_ADHOC_F_ALERTSEND \
109 |SCE_NET_ADHOC_F_ALERTRECV \
110 |SCE_NET_ADHOC_F_ALERTPOLL \
111 |SCE_NET_ADHOC_F_ALERTCONNECT \
112 |SCE_NET_ADHOC_F_ALERTACCEPT \
113 |SCE_NET_ADHOC_F_ALERTFLUSH \
114 )
115
116#define SCE_NET_ADHOC_PDP_MFS 1444
117#define SCE_NET_ADHOC_PDP_MTU 65523
118#define SCE_NET_ADHOC_PTP_MSS 1444
119
122
123int sceNetAdhocPollSocket(struct SceNetAdhocPollSd *sds, int nsds, unsigned int timeout, int flag);
124int sceNetAdhocSetSocketAlert(int id, int flag);
125int sceNetAdhocGetSocketAlert(int id, int *flag);
126
127int sceNetAdhocPdpCreate(const struct SceNetEtherAddr *saddr, SceUShort16 sport, unsigned int bufsize, int flag);
128int sceNetAdhocPdpSend(int id, const struct SceNetEtherAddr *daddr, SceUShort16 dport, const void *data, int len, unsigned int timeout, int flag);
129int sceNetAdhocPdpRecv(int id, struct SceNetEtherAddr *saddr, SceUShort16 *sport, void *buf, int *len, unsigned int timeout, int flag);
130int sceNetAdhocPdpDelete(int id, int flag);
131int sceNetAdhocGetPdpStat(int *buflen, void *buf);
132
133int sceNetAdhocPtpOpen(const struct SceNetEtherAddr *saddr, SceUShort16 sport, const struct SceNetEtherAddr *daddr, SceUShort16 dport, unsigned int bufsize, unsigned int rexmt_int, int rexmt_cnt, int flag);
134int sceNetAdhocPtpConnect(int id, unsigned int timeout, int flag);
135int sceNetAdhocPtpListen(const struct SceNetEtherAddr *saddr, SceUShort16 sport, unsigned int bufsize, unsigned int rexmt_int, int rexmt_cnt, int backlog, int flag);
136int sceNetAdhocPtpAccept(int id, struct SceNetEtherAddr *addr, SceUShort16 *port, unsigned int timeout, int flag);
137int sceNetAdhocPtpSend(int id, const void *data, int *len, unsigned int timeout, int flag);
138int sceNetAdhocPtpRecv(int id, void *buf, int *len, unsigned int timeout, int flag);
139int sceNetAdhocPtpFlush(int id, unsigned int timeout, int flag);
140int sceNetAdhocPtpClose(int id, int flag) ;
141int sceNetAdhocGetPtpStat(int *buflen, void *buf);
142
143#ifdef __cplusplus
144}
145#endif
146
147#endif /* _PSP2_PSPNET_ADHOC_H_ */
148
#define VITASDK_BUILD_ASSERT_EX(__name__, __cond__)
Definition build_utils.h:12
unsigned char data[6]
Definition net.h:436
Definition net.h:435
int id
Definition pspnet_adhoc.h:87
int sceNetAdhocPtpOpen(const struct SceNetEtherAddr *saddr, SceUShort16 sport, const struct SceNetEtherAddr *daddr, SceUShort16 dport, unsigned int bufsize, unsigned int rexmt_int, int rexmt_cnt, int flag)
struct SceNetAdhocPdpStat * next
Definition pspnet_adhoc.h:70
int sceNetAdhocPtpAccept(int id, struct SceNetEtherAddr *addr, SceUShort16 *port, unsigned int timeout, int flag)
SceUShort16 pport
Definition pspnet_adhoc.h:91
int sceNetAdhocPtpClose(int id, int flag)
int sceNetAdhocTerm(void)
SceUShort16 lport
Definition pspnet_adhoc.h:90
ScePspnetAdhocEvent
Definition pspnet_adhoc.h:57
int sceNetAdhocPdpSend(int id, const struct SceNetEtherAddr *daddr, SceUShort16 dport, const void *data, int len, unsigned int timeout, int flag)
ScePspnetAdhocFlags
Definition pspnet_adhoc.h:97
int sceNetAdhocInit(void)
int sceNetAdhocPtpListen(const struct SceNetEtherAddr *saddr, SceUShort16 sport, unsigned int bufsize, unsigned int rexmt_int, int rexmt_cnt, int backlog, int flag)
int sceNetAdhocGetSocketAlert(int id, int *flag)
int revents
Definition pspnet_adhoc.h:54
int sceNetAdhocPollSocket(struct SceNetAdhocPollSd *sds, int nsds, unsigned int timeout, int flag)
unsigned int rcv_sb_cc
Definition pspnet_adhoc.h:93
int sceNetAdhocGetPdpStat(int *buflen, void *buf)
int sceNetAdhocPtpConnect(int id, unsigned int timeout, int flag)
int id
Definition pspnet_adhoc.h:71
int sceNetAdhocGetPtpStat(int *buflen, void *buf)
int sceNetAdhocPtpFlush(int id, unsigned int timeout, int flag)
struct SceNetEtherAddr laddr
Definition pspnet_adhoc.h:88
unsigned int snd_sb_cc
Definition pspnet_adhoc.h:92
ScePspnetAdhocErrorCode
Definition pspnet_adhoc.h:19
int sceNetAdhocPdpRecv(int id, struct SceNetEtherAddr *saddr, SceUShort16 *sport, void *buf, int *len, unsigned int timeout, int flag)
int sceNetAdhocPtpSend(int id, const void *data, int *len, unsigned int timeout, int flag)
struct SceNetEtherAddr laddr
Definition pspnet_adhoc.h:72
SceUShort16 lport
Definition pspnet_adhoc.h:73
int events
Definition pspnet_adhoc.h:53
struct SceNetAdhocPtpStat * next
Definition pspnet_adhoc.h:86
struct SceNetEtherAddr paddr
Definition pspnet_adhoc.h:89
int sceNetAdhocPdpDelete(int id, int flag)
int sceNetAdhocPdpCreate(const struct SceNetEtherAddr *saddr, SceUShort16 sport, unsigned int bufsize, int flag)
int id
Definition pspnet_adhoc.h:52
int sceNetAdhocSetSocketAlert(int id, int flag)
unsigned int rcv_sb_cc
Definition pspnet_adhoc.h:74
ScePspnetAdhocPtpState
Definition pspnet_adhoc.h:77
int sceNetAdhocPtpRecv(int id, void *buf, int *len, unsigned int timeout, int flag)
int state
Definition pspnet_adhoc.h:94
@ SCE_NET_ADHOC_EV_ACCEPT
Definition pspnet_adhoc.h:61
@ SCE_NET_ADHOC_EV_CONNECT
Definition pspnet_adhoc.h:60
@ SCE_NET_ADHOC_EV_FLUSH
Definition pspnet_adhoc.h:62
@ SCE_NET_ADHOC_EV_DISCONNECT
Definition pspnet_adhoc.h:66
@ SCE_NET_ADHOC_EV_DELETE
Definition pspnet_adhoc.h:64
@ SCE_NET_ADHOC_EV_SEND
Definition pspnet_adhoc.h:58
@ SCE_NET_ADHOC_EV_RECV
Definition pspnet_adhoc.h:59
@ SCE_NET_ADHOC_EV_INVALID
Definition pspnet_adhoc.h:63
@ SCE_NET_ADHOC_EV_ALERT
Definition pspnet_adhoc.h:65
@ SCE_NET_ADHOC_F_ALERTCONNECT
Definition pspnet_adhoc.h:102
@ SCE_NET_ADHOC_F_ALERTACCEPT
Definition pspnet_adhoc.h:103
@ SCE_NET_ADHOC_F_ALERTRECV
Definition pspnet_adhoc.h:100
@ SCE_NET_ADHOC_F_ALERTSEND
Definition pspnet_adhoc.h:99
@ SCE_NET_ADHOC_F_ALERTPOLL
Definition pspnet_adhoc.h:101
@ SCE_NET_ADHOC_F_NONBLOCK
Definition pspnet_adhoc.h:98
@ SCE_NET_ADHOC_F_ALERTFLUSH
Definition pspnet_adhoc.h:104
@ SCE_ERROR_NET_ADHOC_NOT_OPENED
Definition pspnet_adhoc.h:32
@ SCE_ERROR_NET_ADHOC_ALREADY_CREATED
Definition pspnet_adhoc.h:45
@ SCE_ERROR_NET_ADHOC_NOT_INITIALIZED
Definition pspnet_adhoc.h:37
@ SCE_ERROR_NET_ADHOC_EXCEPTION_EVENT
Definition pspnet_adhoc.h:42
@ SCE_ERROR_NET_ADHOC_NOT_CREATED
Definition pspnet_adhoc.h:47
@ SCE_ERROR_NET_ADHOC_PORT_NOT_AVAIL
Definition pspnet_adhoc.h:35
@ SCE_ERROR_NET_ADHOC_DISCONNECTED
Definition pspnet_adhoc.h:31
@ SCE_ERROR_NET_ADHOC_INVALID_ARG
Definition pspnet_adhoc.h:36
@ SCE_ERROR_NET_ADHOC_INVALID_ALIGNMENT
Definition pspnet_adhoc.h:48
@ SCE_ERROR_NET_ADHOC_INVALID_DATALEN
Definition pspnet_adhoc.h:24
@ SCE_ERROR_NET_ADHOC_SOCKET_ID_NOT_AVAIL
Definition pspnet_adhoc.h:34
@ SCE_ERROR_NET_ADHOC_INVALID_BUFLEN
Definition pspnet_adhoc.h:23
@ SCE_ERROR_NET_ADHOC_PORT_IN_USE
Definition pspnet_adhoc.h:29
@ SCE_ERROR_NET_ADHOC_NOT_IN_GAMEMODE
Definition pspnet_adhoc.h:46
@ SCE_ERROR_NET_ADHOC_NOT_ENOUGH_SPACE
Definition pspnet_adhoc.h:25
@ SCE_ERROR_NET_ADHOC_BUSY
Definition pspnet_adhoc.h:39
@ SCE_ERROR_NET_ADHOC_NOT_CONNECTED
Definition pspnet_adhoc.h:30
@ SCE_ERROR_NET_ADHOC_THREAD_ABORTED
Definition pspnet_adhoc.h:44
@ SCE_ERROR_NET_ADHOC_ALREADY_INITIALIZED
Definition pspnet_adhoc.h:38
@ SCE_ERROR_NET_ADHOC_SOCKET_ALERTED
Definition pspnet_adhoc.h:27
@ SCE_ERROR_NET_ADHOC_TIMEOUT
Definition pspnet_adhoc.h:40
@ SCE_ERROR_NET_ADHOC_INVALID_ADDR
Definition pspnet_adhoc.h:21
@ SCE_ERROR_NET_ADHOC_CONNECTION_REFUSED
Definition pspnet_adhoc.h:43
@ SCE_ERROR_NET_ADHOC_NOT_LISTENED
Definition pspnet_adhoc.h:33
@ SCE_ERROR_NET_ADHOC_SOCKET_DELETED
Definition pspnet_adhoc.h:26
@ SCE_ERROR_NET_ADHOC_INVALID_PORT
Definition pspnet_adhoc.h:22
@ SCE_ERROR_NET_ADHOC_NO_ENTRY
Definition pspnet_adhoc.h:41
@ SCE_ERROR_NET_ADHOC_WOULD_BLOCK
Definition pspnet_adhoc.h:28
@ SCE_ERROR_NET_ADHOC_INVALID_SOCKET_ID
Definition pspnet_adhoc.h:20
@ SCE_NET_ADHOC_PTP_STATE_ESTABLISHED
Definition pspnet_adhoc.h:82
@ SCE_NET_ADHOC_PTP_STATE_CLOSED
Definition pspnet_adhoc.h:78
@ SCE_NET_ADHOC_PTP_STATE_SYN_SENT
Definition pspnet_adhoc.h:80
@ SCE_NET_ADHOC_PTP_STATE_LISTEN
Definition pspnet_adhoc.h:79
@ SCE_NET_ADHOC_PTP_STATE_SYN_RCVD
Definition pspnet_adhoc.h:81
Definition pspnet_adhoc.h:69
Definition pspnet_adhoc.h:51
Definition pspnet_adhoc.h:85
uint16_t SceUShort16
Definition types.h:39