Small patch for pspnet_adhoc.h

Discuss the development of new homebrew software, tools and libraries.

Moderators: cheriff, TyRaNiD

Post Reply
Insert_witty_name
Posts: 376
Joined: Wed May 10, 2006 11:31 pm

Small patch for pspnet_adhoc.h

Post by Insert_witty_name »

Just noticed a few incorrect data-types in the prototypes.

I'll try and work out some of the unknown arguments if I get the time.

Code: Select all

--- pspnet_adhoc.h	2007-04-08 22:35:30.500000000 +0100
+++ pspnet_adhoc2.h	2007-06-06 16:27:17.781250000 +0100
@@ -42,7 +42,7 @@
  *
  * @return The ID of the PDP object &#40;< 0 on error&#41;
  */
-int sceNetAdhocPdpCreate&#40;char *mac, int port, unsigned int unk2, int unk3&#41;;
+int sceNetAdhocPdpCreate&#40;unsigned char *mac, unsigned short port, unsigned int unk2, int unk3&#41;;
 
 /**
  * Delete a PDP object.
@@ -67,7 +67,7 @@
  *
  * @return Bytes sent, < 0 on error
  */
-int sceNetAdhocPdpSend&#40;int id, char *destMacAddr, int16 port, void *data, unsigned int len, int unk6, int unk7&#41;;
+int sceNetAdhocPdpSend&#40;int id, unsigned char *destMacAddr, unsigned short port, void *data, unsigned int len, int unk6, int unk7&#41;;
 
 /**
  * Receive a PDP packet
@@ -82,7 +82,7 @@
  *
  * @return Number of bytes received, < 0 on error.
  */
-int sceNetAdhocPdpRecv&#40;int id, char *srcMacAddr, int *port, void *data, void *dataLength, int unk6, int unk7&#41;;
+int sceNetAdhocPdpRecv&#40;int id, unsigned char *srcMacAddr, unsigned short *port, void *data, void *dataLength, int unk6, int unk7&#41;;
 
 /**
  * PDP status structure
@@ -94,9 +94,9 @@
 	/** pdp ID */
 	int pdpId;
 	/** MAC address */
-	char mac&#91;6&#93;;
+	unsigned char mac&#91;6&#93;;
 	/** Port */
-	int16 port;
+	unsigned short port;
 	/** Bytes received */
 	unsigned int rcvdData;
 &#125; pdpStatStruct;
@@ -109,8 +109,7 @@
  *
  * @return 0 on success, < 0 on error
  */
-int sceNetAdhocGetPdpStat&#40;int *size,  	
-				  pdpStatStruct *stat&#41;;
+int sceNetAdhocGetPdpStat&#40;int *size, pdpStatStruct *stat&#41;;
 
 #ifdef __cplusplus
 &#125;
ooPo
Site Admin
Posts: 2023
Joined: Sat Jan 17, 2004 9:56 am
Location: Canada
Contact:

Post by ooPo »

This has been added to the repository.
Post Reply