#ifndef __SCENETADHOC_H__
#define __SCENETADHOC_H__

typedef void (* pspAdhocMatchingCallback)(int matchingid, int event, unsigned char *mac, int optlen, void *optdata);

typedef struct pdpStatStruct
{
	struct pdpStatStruct * next;
	int pdpIp;
	unsigned char mac [6];
	unsigned short port;
	unsigned int rcvdData;
} pdpStatStruct;

typedef struct ptpStatStruct
{
	struct ptpStatStruct *next;
	int ptpId;
	unsigned char mac[6];
	unsigned char peermac[6];
	unsigned short port;
	unsigned short peerport;
	unsigned int sentData;
	unsigned int rcvdData;
	int unk1;
} ptpStatStruct;

// (* sceNetAdhoc_67346A2A) (__) = (void *) 0x09ed0ca4;
// (* sceNetAdhoc_lib_2CA12790) (__) = (void *) 0x09ed0cac;
// (* sceNetAdhoc_lib_62B875A8) (__) = (void *) 0x09ed0ca8;
// (* sceNetAdhocAuth_lib_1F9A90B8) (__) = (void *) 0x09ed71b0;
// (* sceNetAdhocAuth_lib_2E6AA271) (__) = (void *) 0x09ed7198;
// (* sceNetAdhocAuth_lib_6CE209A3) (__) = (void *) 0x09ed71a0;
// (* sceNetAdhocAuth_lib_76F26AB0) (__) = (void *) 0x09ed71b8;
// (* sceNetAdhocAuth_lib_89F2A732) (__) = (void *) 0x09ed7190;
// (* sceNetAdhocAuth_lib_BD144DA6) (__) = (void *) 0x09ed71a8;
// (* sceNetAdhocAuthInit) (__) = (void *) 0x09ed7180;
// (* sceNetAdhocAuthTerm) (__) = (void *) 0x09ed7188;
int (* sceNetAdhocGameModeCreateMaster) (void *data, int size) = (void *) 0x09ed0c6c;
int (* sceNetAdhocGameModeCreateReplica) (unsigned char *mac, void *data, int size) = (void *) 0x09ed0c70;
int (* sceNetAdhocGameModeDeleteMaster) (void) = (void *) 0x09ed0c7c;
int (* sceNetAdhocGameModeDeleteReplica) (int id) = (void *) 0x09ed0c80;
int (* sceNetAdhocGameModeUpdateMaster) (void) = (void *) 0x09ed0c74;
int (* sceNetAdhocGameModeUpdateReplica) (int id, int unk1) = (void *) 0x09ed0c78;
// (* sceNetAdhocGameModeUpdateReplicaInternal) (__) = (void *) 0x09ed0cb0;
int (* sceNetAdhocGetPdpStat) (int * size, pdpStatStruct * stat) = (void *) (BASE_OFFSET + 0xe6e88);
int (* sceNetAdhocGetPtpStat) (int *size, ptpStatStruct *stat) = (void *) 0x09ed0c68;
// (* sceNetAdhocGetSocketAlert) (__) = (void *) 0x09ed0c30;
int (* sceNetAdhocInit) (void) = (void *) (BASE_OFFSET + 0xe6e58);
int (* sceNetAdhocMatchingCancelTarget) (int matchingid, unsigned char *mac) = (void *) (BASE_OFFSET + 0xe6e08);
int (* sceNetAdhocMatchingCreate) (int mode, int maxpeers, unsigned short port, int bufsize, unsigned int hellodelay, unsigned int pingdelay, int initcount, unsigned int msgdelay, pspAdhocMatchingCallback callback) = (void *) (BASE_OFFSET + 0xe6de0);
int (* sceNetAdhocMatchingDelete) (int matchingid) = (void *) (BASE_OFFSET + 0xe6df8);
// (* sceNetAdhocMatchingGetHelloOpt) (__) = (void *) 0x09edc13c;
// (* sceNetAdhocMatchingGetMembers) (__) = (void *) 0x09edc140;
// (* sceNetAdhocMatchingGetPoolMaxAlloc) (__) = (void *) 0x09edc144;
int (* sceNetAdhocMatchingInit) (int memsize) = (void *) (BASE_OFFSET + 0xe6dd0);
int (* sceNetAdhocMatchingSelectTarget) (int matchingid, unsigned char *mac, int optlen, void *optdata) = (void *) (BASE_OFFSET + 0xe6e00);
// (* sceNetAdhocMatchingSetHelloOpt) (__) = (void *) 0x09edc138;
int (* sceNetAdhocMatchingStart) (int matchingid, int evthpri, int evthstack, int inthpri, int inthstack, int optlen, void *optdata) = (void *) (BASE_OFFSET + 0xe6de8);
int (* sceNetAdhocMatchingStop) (int matchingid) = (void *) (BASE_OFFSET + 0xe6df0);
int (* sceNetAdhocMatchingTerm) (void) = (void *) (BASE_OFFSET + 0xe6dd8);
int (* sceNetAdhocPdpCreate) (unsigned char *mac, unsigned short port, unsigned int bufsize, int unk1) = (void *) (BASE_OFFSET + 0xe6e68);
int (* sceNetAdhocPdpDelete) (int id, int unk1) = (void *) (BASE_OFFSET + 0xe6e80);
int (* sceNetAdhocPdpRecv) (int id, unsigned char *srcMacAddr, unsigned short *port, void *data, void *dataLength, unsigned int timeout, int nonblock) = (void *) (BASE_OFFSET + 0xe6e78);
int (* sceNetAdhocPdpSend) (int id, unsigned char *destMacAddr, unsigned short port, void *data, unsigned int len, unsigned int timeout, int nonblock) = (void *) (BASE_OFFSET + 0xe6e70);
// (* sceNetAdhocPollSocket) (__) = (void *) 0x09ed0c28;
int (* sceNetAdhocPtpAccept) (int id, unsigned char *mac, unsigned short *port, unsigned int timeout, int nonblock) = (void *) 0x09ed0c54;
int (* sceNetAdhocPtpClose) (int id, int unk1) = (void *) 0x09ed0c64;
int (* sceNetAdhocPtpConnect) (int id, unsigned int timeout, int nonblock) = (void *) 0x09ed0c4c;
int (* sceNetAdhocPtpFlush) (int id, unsigned int timeout, int nonblock) = (void *) 0x09ed0c60;
int (* sceNetAdhocPtpListen) (unsigned char *srcmac, unsigned short srcport, unsigned int bufsize, unsigned int delay, int count, int queue, int unk1) = (void *) 0x09ed0c50;
int (* sceNetAdhocPtpOpen) (unsigned char *srcmac, unsigned short srcport, unsigned char *destmac, unsigned short destport, unsigned int bufsize, unsigned int delay, int count, int unk1) = (void *) 0x09ed0c48;
int (* sceNetAdhocPtpRecv) (int id, void *data, int *datasize, unsigned int timeout, int nonblock) = (void *) 0x09ed0c5c;
int (* sceNetAdhocPtpSend) (int id, void *data, int *datasize, unsigned int timeout, int nonblock) = (void *) 0x09ed0c58;
// (* sceNetAdhocSetSocketAlert) (__) = (void *) 0x09ed0c2c;
int (* sceNetAdhocTerm) (void) = (void *) (BASE_OFFSET + 0xe6e60);

#endif
