pspsdk-1.0+beta2
|
Go to the source code of this file.
Data Structures | |
struct | pdpStatStruct |
PDP status structure. More... | |
struct | ptpStatStruct |
PTP status structure. More... |
Typedefs | |
typedef struct pdpStatStruct | pdpStatStruct |
PDP status structure. | |
typedef struct ptpStatStruct | ptpStatStruct |
PTP status structure. |
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 bufsize, int unk1) |
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, unsigned int timeout, int nonblock) |
Set a PDP packet to a destination. | |
int | sceNetAdhocPdpRecv (int id, unsigned char *srcMacAddr, unsigned short *port, void *data, void *dataLength, unsigned int timeout, int nonblock) |
Receive a PDP packet. | |
int | sceNetAdhocGetPdpStat (int *size, pdpStatStruct *stat) |
Get the status of all PDP objects. | |
int | sceNetAdhocGameModeCreateMaster (void *data, int size) |
Create own game object type data. | |
int | sceNetAdhocGameModeCreateReplica (unsigned char *mac, void *data, int size) |
Create peer game object type data. | |
int | sceNetAdhocGameModeUpdateMaster (void) |
Update own game object type data. | |
int | sceNetAdhocGameModeUpdateReplica (int id, int unk1) |
Update peer game object type data. | |
int | sceNetAdhocGameModeDeleteMaster (void) |
Delete own game object type data. | |
int | sceNetAdhocGameModeDeleteReplica (int id) |
Delete peer game object type data. | |
int | sceNetAdhocPtpOpen (unsigned char *srcmac, unsigned short srcport, unsigned char *destmac, unsigned short destport, unsigned int bufsize, unsigned int delay, int count, int unk1) |
Open a PTP connection. | |
int | sceNetAdhocPtpConnect (int id, unsigned int timeout, int nonblock) |
Wait for connection created by sceNetAdhocPtpOpen() | |
int | sceNetAdhocPtpListen (unsigned char *srcmac, unsigned short srcport, unsigned int bufsize, unsigned int delay, int count, int queue, int unk1) |
Wait for an incoming PTP connection. | |
int | sceNetAdhocPtpAccept (int id, unsigned char *mac, unsigned short *port, unsigned int timeout, int nonblock) |
Accept an incoming PTP connection. | |
int | sceNetAdhocPtpSend (int id, void *data, int *datasize, unsigned int timeout, int nonblock) |
Send data. | |
int | sceNetAdhocPtpRecv (int id, void *data, int *datasize, unsigned int timeout, int nonblock) |
Receive data. | |
int | sceNetAdhocPtpFlush (int id, unsigned int timeout, int nonblock) |
Wait for data in the buffer to be sent. | |
int | sceNetAdhocPtpClose (int id, int unk1) |
Close a socket. | |
int | sceNetAdhocGetPtpStat (int *size, ptpStatStruct *stat) |
Get the status of all PTP objects. |
typedef struct pdpStatStruct pdpStatStruct |
PDP status structure.
typedef struct ptpStatStruct ptpStatStruct |
PTP status structure.
int sceNetAdhocGameModeCreateMaster | ( | void * | data, |
int | size | ||
) |
Create own game object type data.
data | - A pointer to the game object data. |
size | - Size of the game data. |
int sceNetAdhocGameModeCreateReplica | ( | unsigned char * | mac, |
void * | data, | ||
int | size | ||
) |
Create peer game object type data.
mac | - The mac address of the peer. |
data | - A pointer to the game object data. |
size | - Size of the game data. |
int sceNetAdhocGameModeDeleteMaster | ( | void | ) |
Delete own game object type data.
int sceNetAdhocGameModeDeleteReplica | ( | int | id | ) |
Delete peer game object type data.
id | - The id of the replica. |
int sceNetAdhocGameModeUpdateMaster | ( | void | ) |
Update own game object type data.
int sceNetAdhocGameModeUpdateReplica | ( | int | id, |
int | unk1 | ||
) |
Update peer game object type data.
id | - The id of the replica returned by sceNetAdhocGameModeCreateReplica. |
unk1 | - Pass 0. |
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 sceNetAdhocGetPtpStat | ( | int * | size, |
ptpStatStruct * | stat | ||
) |
Get the status of all PTP objects.
size | - Pointer to the size of the stat array (e.g 20 for one structure) |
stat | - Pointer to a list of ptpStatStruct structures. |
int sceNetAdhocInit | ( | void | ) |
Initialise the adhoc library.
int sceNetAdhocPdpCreate | ( | unsigned char * | mac, |
unsigned short | port, | ||
unsigned int | bufsize, | ||
int | unk1 | ||
) |
Create a PDP object.
mac | - Your MAC address (from sceWlanGetEtherAddr) |
port | - Port to use, lumines uses 0x309 |
bufsize | - Socket buffer size, lumines sets to 0x400 |
unk1 | - 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, | ||
unsigned int | timeout, | ||
int | nonblock | ||
) |
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 |
timeout | - Timeout in microseconds. |
nonblock | - Set to 0 to block, 1 for non-blocking. |
int sceNetAdhocPdpSend | ( | int | id, |
unsigned char * | destMacAddr, | ||
unsigned short | port, | ||
void * | data, | ||
unsigned int | len, | ||
unsigned int | timeout, | ||
int | nonblock | ||
) |
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. |
timeout | - Timeout in microseconds. |
nonblock | - Set to 0 to block, 1 for non-blocking. |
int sceNetAdhocPtpAccept | ( | int | id, |
unsigned char * | mac, | ||
unsigned short * | port, | ||
unsigned int | timeout, | ||
int | nonblock | ||
) |
Accept an incoming PTP connection.
id | - A socket ID. |
mac | - Connecting peers mac. |
port | - Connecting peers port. |
timeout | - Timeout in microseconds. |
nonblock | - Set to 0 to block, 1 for non-blocking. |
int sceNetAdhocPtpClose | ( | int | id, |
int | unk1 | ||
) |
Close a socket.
id | - A socket ID. |
unk1 | - Pass 0. |
int sceNetAdhocPtpConnect | ( | int | id, |
unsigned int | timeout, | ||
int | nonblock | ||
) |
Wait for connection created by sceNetAdhocPtpOpen()
id | - A socket ID. |
timeout | - Timeout in microseconds. |
nonblock | - Set to 0 to block, 1 for non-blocking. |
int sceNetAdhocPtpFlush | ( | int | id, |
unsigned int | timeout, | ||
int | nonblock | ||
) |
Wait for data in the buffer to be sent.
id | - A socket ID. |
timeout | - Timeout in microseconds. |
nonblock | - Set to 0 to block, 1 for non-blocking. |
int sceNetAdhocPtpListen | ( | unsigned char * | srcmac, |
unsigned short | srcport, | ||
unsigned int | bufsize, | ||
unsigned int | delay, | ||
int | count, | ||
int | queue, | ||
int | unk1 | ||
) |
Wait for an incoming PTP connection.
srcmac | - Local mac address. |
srcport | - Local port. |
bufsize | - Socket buffer size |
delay | - Interval between retrying (microseconds). |
count | - Number of retries. |
queue | - Connection queue length. |
unk1 | - Pass 0. |
int sceNetAdhocPtpOpen | ( | unsigned char * | srcmac, |
unsigned short | srcport, | ||
unsigned char * | destmac, | ||
unsigned short | destport, | ||
unsigned int | bufsize, | ||
unsigned int | delay, | ||
int | count, | ||
int | unk1 | ||
) |
Open a PTP connection.
srcmac | - Local mac address. |
srcport | - Local port. |
destmac | - Destination mac. |
destport | - Destination port |
bufsize | - Socket buffer size |
delay | - Interval between retrying (microseconds). |
count | - Number of retries. |
unk1 | - Pass 0. |
int sceNetAdhocPtpRecv | ( | int | id, |
void * | data, | ||
int * | datasize, | ||
unsigned int | timeout, | ||
int | nonblock | ||
) |
Receive data.
id | - A socket ID. |
data | - Buffer for the received data. |
datasize | - Size of the data received. |
timeout | - Timeout in microseconds. |
nonblock | - Set to 0 to block, 1 for non-blocking. |
int sceNetAdhocPtpSend | ( | int | id, |
void * | data, | ||
int * | datasize, | ||
unsigned int | timeout, | ||
int | nonblock | ||
) |
Send data.
id | - A socket ID. |
data | - Data to send. |
datasize | - Size of the data. |
timeout | - Timeout in microseconds. |
nonblock | - Set to 0 to block, 1 for non-blocking. |
int sceNetAdhocTerm | ( | void | ) |
Terminate the adhoc library.