pspsdk-1.0+beta2
pspnet_adhocmatching.h
Go to the documentation of this file.
1 /*
2  * PSP Software Development Kit - http://www.pspdev.org
3  * -----------------------------------------------------------------------
4  * Licensed under the BSD license, see LICENSE in PSPSDK root for details.
5  *
6  * pspnet_adhocmatching.h - PSP Adhoc matching networking libraries.
7  *
8  * Copyright (c) 2006 James F.
9  * Copyright (c) 2008 InsertWittyName <tias_dp@hotmail.com>
10  *
11  * Based on the adhoc code in SMS Plus
12  *
13  * $Id: pspnet_adhocmatching.h 2433 2008-10-15 10:00:27Z iwn $
14  */
15 #ifndef __PSPNETMATCHING_ADHOC_H__
16 #define __PSPNETMATCHING_ADHOC_H__
17 
18 #ifdef __cplusplus
19 extern "C" {
20 #endif
21 
26 {
53 };
54 
59 {
66 };
67 
72 {
74  unsigned char mac[6];
75  char unknown[2];
76 };
77 
82 {
84  int size;
86  int maxsize;
88  int freesize;
89 };
90 
98 int sceNetAdhocMatchingInit(int memsize);
99 
105 int sceNetAdhocMatchingTerm(void);
106 
108 typedef void (*pspAdhocMatchingCallback)(int matchingid, int event, unsigned char *mac, int optlen, void *optdata);
109 
125 int sceNetAdhocMatchingCreate(int mode, int maxpeers, unsigned short port, int bufsize, unsigned int hellodelay, unsigned int pingdelay, int initcount, unsigned int msgdelay, pspAdhocMatchingCallback callback);
126 
134 int sceNetAdhocMatchingDelete(int matchingid);
135 
149 int sceNetAdhocMatchingStart(int matchingid, int evthpri, int evthstack, int inthpri, int inthstack, int optlen, void *optdata);
150 
158 int sceNetAdhocMatchingStop(int matchingid);
159 
170 int sceNetAdhocMatchingSelectTarget(int matchingid, unsigned char *mac, int optlen, void *optdata);
171 
180 int sceNetAdhocMatchingCancelTarget(int matchingid, unsigned char *mac);
181 
192 int sceNetAdhocMatchingCancelTargetWithOpt(int matchingid, unsigned char *mac, int optlen, void *optdata);
193 
204 int sceNetAdhocMatchingSendData(int matchingid, unsigned char *mac, int datalen, void *data);
205 
214 int sceNetAdhocMatchingAbortSendData(int matchingid, unsigned char *mac);
215 
225 int sceNetAdhocMatchingSetHelloOpt(int matchingid, int optlen, void *optdata);
226 
236 int sceNetAdhocMatchingGetHelloOpt(int matchingid, int *optlen, void *optdata);
237 
247 int sceNetAdhocMatchingGetMembers(int matchingid, int *length, void *buf);
248 
255 
264 
265 #ifdef __cplusplus
266 }
267 #endif
268 
269 #endif