Go to the source code of this file.
Data Structures | |
struct | pdpStatStruct |
PDP status structure. More... | |
Functions | |
int | sceNetAdhocInit (void) |
Initialise the adhoc library. | |
int | sceNetAdhocTerm (void) |
Terminate the adhoc library. | |
int | sceNetAdhocPdpCreate (unsigned char *mac, unsigned short port, unsigned int unk2, int unk3) |
Create a PDP object. | |
int | sceNetAdhocPdpDelete (int id, int unk1) |
Delete a PDP object. | |
int | sceNetAdhocPdpSend (int id, unsigned char *destMacAddr, unsigned short port, void *data, unsigned int len, int unk6, int unk7) |
Set a PDP packet to a destination. | |
int | sceNetAdhocPdpRecv (int id, unsigned char *srcMacAddr, unsigned short *port, void *data, void *dataLength, int unk6, int unk7) |
Receive a PDP packet. | |
int | sceNetAdhocGetPdpStat (int *size, pdpStatStruct *stat) |
Get the status of all PDP objects. |
int sceNetAdhocGetPdpStat | ( | int * | size, | |
pdpStatStruct * | stat | |||
) |
Get the status of all PDP objects.
size | - Pointer to the size of the stat array (e.g 20 for one structure) | |
stat | - Pointer to a list of pspStatStruct structures. |
int sceNetAdhocInit | ( | void | ) |
Initialise the adhoc library.
int sceNetAdhocPdpCreate | ( | unsigned char * | mac, | |
unsigned short | port, | |||
unsigned int | unk2, | |||
int | unk3 | |||
) |
Create a PDP object.
mac | - Your MAC address (from sceWlanGetEtherAddr) | |
port | - Port to use, lumines uses 0x309 | |
unk2 | - Unknown, lumines sets to 0x400 | |
unk3 | - Unknown, lumines sets to 0 |
int sceNetAdhocPdpDelete | ( | int | id, | |
int | unk1 | |||
) |
Delete a PDP object.
id | - The ID returned from sceNetAdhocPdpCreate | |
unk1 | - Unknown, set to 0 |
int sceNetAdhocPdpRecv | ( | int | id, | |
unsigned char * | srcMacAddr, | |||
unsigned short * | port, | |||
void * | data, | |||
void * | dataLength, | |||
int | unk6, | |||
int | unk7 | |||
) |
Receive a PDP packet.
id | - The ID of the PDP object, as returned by sceNetAdhocPdpCreate | |
srcMacAddr | - Buffer to hold the source mac address of the sender | |
port | - Buffer to hold the port number of he received data | |
data | - Data buffer | |
dataLength | - The length of the data buffer | |
unk6 | - Set to 0 | |
unk7 | - Set to 0 |
int sceNetAdhocPdpSend | ( | int | id, | |
unsigned char * | destMacAddr, | |||
unsigned short | port, | |||
void * | data, | |||
unsigned int | len, | |||
int | unk6, | |||
int | unk7 | |||
) |
Set a PDP packet to a destination.
id | - The ID as returned by sceNetAdhocPdpCreate | |
destMacAddr | - The destination MAC address, can be set to all 0xFF for broadcast | |
port | - The port to send to | |
data | - The data to send | |
len | - The length of the data. | |
unk6 | - Unknown, set to 0 | |
unk7 | - Unknown, set to 0 |
int sceNetAdhocTerm | ( | void | ) |
Terminate the adhoc library.