forums.ps2dev.org Forum Index forums.ps2dev.org
Homebrew PS2, PSP & PS3 Development Discussions
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Small patch for pspnet_adhoc.h

 
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development
View previous topic :: View next topic  
Author Message
Insert_witty_name



Joined: 10 May 2006
Posts: 376

PostPosted: Thu Jun 07, 2007 1:35 am    Post subject: Small patch for pspnet_adhoc.h Reply with quote

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:
--- 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 (< 0 on error)
  */
-int sceNetAdhocPdpCreate(char *mac, int port, unsigned int unk2, int unk3);
+int sceNetAdhocPdpCreate(unsigned char *mac, unsigned short port, unsigned int unk2, int unk3);
 
 /**
  * Delete a PDP object.
@@ -67,7 +67,7 @@
  *
  * @return Bytes sent, < 0 on error
  */
-int sceNetAdhocPdpSend(int id, char *destMacAddr, int16 port, void *data, unsigned int len, int unk6, int unk7);
+int sceNetAdhocPdpSend(int id, unsigned char *destMacAddr, unsigned short port, void *data, unsigned int len, int unk6, int unk7);
 
 /**
  * Receive a PDP packet
@@ -82,7 +82,7 @@
  *
  * @return Number of bytes received, < 0 on error.
  */
-int sceNetAdhocPdpRecv(int id, char *srcMacAddr, int *port, void *data, void *dataLength, int unk6, int unk7);
+int sceNetAdhocPdpRecv(int id, unsigned char *srcMacAddr, unsigned short *port, void *data, void *dataLength, int unk6, int unk7);
 
 /**
  * PDP status structure
@@ -94,9 +94,9 @@
    /** pdp ID */
    int pdpId;
    /** MAC address */
-   char mac[6];
+   unsigned char mac[6];
    /** Port */
-   int16 port;
+   unsigned short port;
    /** Bytes received */
    unsigned int rcvdData;
 } pdpStatStruct;
@@ -109,8 +109,7 @@
  *
  * @return 0 on success, < 0 on error
  */
-int sceNetAdhocGetPdpStat(int *size,     
-              pdpStatStruct *stat);
+int sceNetAdhocGetPdpStat(int *size, pdpStatStruct *stat);
 
 #ifdef __cplusplus
 }
Back to top
View user's profile Send private message
ooPo
Site Admin


Joined: 17 Jan 2004
Posts: 2032
Location: Canada

PostPosted: Thu Jun 07, 2007 2:27 pm    Post subject: Reply with quote

This has been added to the repository.
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development All times are GMT + 10 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group