#ifndef __SCENETADHOCCTL_H__
#define __SCENETADHOCCTL_H__

typedef void (*sceNetAdhocctlHandler)(int flag, int error, void *unknown);

typedef struct productStruct
{
	int unknown;
	char product [9];
} productStruct;

typedef struct SceNetAdhocctlParams
{
	int channel;
	char name [8];
	unsigned char bssid [6];
	char nickname [128];
} SceNetAdhocctlParams;

typedef struct SceKernelEventFlagInfo
{
	SceSize size;
	char name [32];
	SceUInt attr;
	SceUInt initPattern;
	SceUInt currentPattern;
	int numWaitThreads;
} SceKernelEventFlagInfo;

// (* sceNetAdhocctl_lib_EFA6AEAF) (__) = (void *) 0x09ed7500;
// (* sceNetAdhocctl_lib_F8BABD85) (__) = (void *) 0x09ed7508;
int (* sceNetAdhocctlAddHandler) (sceNetAdhocctlHandler handler, void *unknown) = (void *) (BASE_OFFSET + 0xe6e30);
int (* sceNetAdhocctlConnect) (int *unk1) = (void *) (BASE_OFFSET + 0xe6e20);
int (* sceNetAdhocctlCreate) (const char *name) = (void *) 0x09ed7498;
int (* sceNetAdhocctlCreateEnterGameMode) (const char *name, int unknown, int num, unsigned char *macs, unsigned int timeout, int unknown2) = (void *) 0x09ed74cc;
int (* sceNetAdhocctlDelHandler) (int id) = (void *) (BASE_OFFSET + 0xe6e38);
int (* sceNetAdhocctlDisconnect) (void) = (void *) (BASE_OFFSET + 0xe6e28);
int (* sceNetAdhocctlExitGameMode) (void) = (void *) 0x09ed74d4;
int (* sceNetAdhocctlGetAddrByName) (char *nickname, int *length, void *buf) = (void *) 0x09ed74bc;
int (* sceNetAdhocctlGetAdhocId) (struct productStruct *product) = (void *) 0x09ed74b4;
int (* sceNetAdhocctlGetGameModeInfo) (struct SceNetAdhocctlGameModeInfo *gamemodeinfo) = (void *) 0x09ed74d8;
int (* sceNetAdhocctlGetNameByAddr) (unsigned char *mac, char *nickname) = (void *) (BASE_OFFSET + 0xe6e48); // WTF is this function?
int (* sceNetAdhocctlGetParameter) (struct SceNetAdhocctlParams * params) = (void *) (BASE_OFFSET + 0xe6e50);
int (* sceNetAdhocctlGetPeerList) (int *length, void *buf) = (void *) 0x09ed74b8;
int (* sceNetAdhocctlGetScanInfo) (int *length, void *buf) = (void *) 0x09ed74c8;
int (* sceNetAdhocctlGetState) (int * event) = (void *) (BASE_OFFSET + 0xe6e40);
int (* sceNetAdhocctlInit) (int unk1, int unk2, struct productStruct *product) = (void *) (BASE_OFFSET + 0xe6e10);
int (* sceNetAdhocctlJoin) (struct SceNetAdhocctlScanInfo *scaninfo) = (void *) 0x09ed749c;
int (* sceNetAdhocctlJoinEnterGameMode) (const char *name, unsigned char *hostmac, unsigned int timeout, int unknown) = (void *) 0x09ed74d0;
int (* sceNetAdhocctlScan) (void) = (void *) 0x09ed74a0;
int (* sceNetAdhocctlTerm) (void) = (void *) (BASE_OFFSET + 0xe6e18);

#endif
