00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015 #ifndef __PSPNET_ADHOC_H__
00016 #define __PSPNET_ADHOC_H__
00017
00018 #ifdef __cplusplus
00019 extern "C" {
00020 #endif
00021
00027 int sceNetAdhocInit(void);
00028
00034 int sceNetAdhocTerm(void);
00035
00046 int sceNetAdhocPdpCreate(unsigned char *mac, unsigned short port, unsigned int bufsize, int unk1);
00047
00056 int sceNetAdhocPdpDelete(int id, int unk1);
00057
00071 int sceNetAdhocPdpSend(int id, unsigned char *destMacAddr, unsigned short port, void *data, unsigned int len, unsigned int timeout, int nonblock);
00072
00086 int sceNetAdhocPdpRecv(int id, unsigned char *srcMacAddr, unsigned short *port, void *data, void *dataLength, unsigned int timeout, int nonblock);
00087
00091 typedef struct pdpStatStruct
00092 {
00094 struct pdpStatStruct *next;
00096 int pdpId;
00098 unsigned char mac[6];
00100 unsigned short port;
00102 unsigned int rcvdData;
00103 } pdpStatStruct;
00104
00113 int sceNetAdhocGetPdpStat(int *size, pdpStatStruct *stat);
00114
00123 int sceNetAdhocGameModeCreateMaster(void *data, int size);
00124
00134 int sceNetAdhocGameModeCreateReplica(unsigned char *mac, void *data, int size);
00135
00141 int sceNetAdhocGameModeUpdateMaster(void);
00142
00151 int sceNetAdhocGameModeUpdateReplica(int id, int unk1);
00152
00158 int sceNetAdhocGameModeDeleteMaster(void);
00159
00167 int sceNetAdhocGameModeDeleteReplica(int id);
00168
00183 int sceNetAdhocPtpOpen(unsigned char *srcmac, unsigned short srcport, unsigned char *destmac, unsigned short destport, unsigned int bufsize, unsigned int delay, int count, int unk1);
00184
00194 int sceNetAdhocPtpConnect(int id, unsigned int timeout, int nonblock);
00195
00209 int sceNetAdhocPtpListen(unsigned char *srcmac, unsigned short srcport, unsigned int bufsize, unsigned int delay, int count, int queue, int unk1);
00210
00222 int sceNetAdhocPtpAccept(int id, unsigned char *mac, unsigned short *port, unsigned int timeout, int nonblock);
00223
00235 int sceNetAdhocPtpSend(int id, void *data, int *datasize, unsigned int timeout, int nonblock);
00236
00248 int sceNetAdhocPtpRecv(int id, void *data, int *datasize, unsigned int timeout, int nonblock);
00249
00259 int sceNetAdhocPtpFlush(int id, unsigned int timeout, int nonblock);
00260
00269 int sceNetAdhocPtpClose(int id, int unk1);
00270
00274 typedef struct ptpStatStruct
00275 {
00277 struct ptpStatStruct *next;
00279 int ptpId;
00281 unsigned char mac[6];
00283 unsigned char peermac[6];
00285 unsigned short port;
00287 unsigned short peerport;
00289 unsigned int sentData;
00291 unsigned int rcvdData;
00293 int unk1;
00294 } ptpStatStruct;
00295
00304 int sceNetAdhocGetPtpStat(int *size, ptpStatStruct *stat);
00305
00306 #ifdef __cplusplus
00307 }
00308 #endif
00309
00310 #endif