PSPSDK 2024-10-31
Loading...
Searching...
No Matches
pspnet_adhocctl.h
Go to the documentation of this file.
1/*
2 * PSP Software Development Kit - https://github.com/pspdev
3 * -----------------------------------------------------------------------
4 * Licensed under the BSD license, see LICENSE in PSPSDK root for details.
5 *
6 * pspnet_adhocctl.h - PSP Adhoc control 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 */
14#ifndef __PSPNETCTL_ADHOC_H__
15#define __PSPNETCTL_ADHOC_H__
16
17#ifdef __cplusplus
18extern "C" {
19#endif
20
23{
27 char product[9];
28 /* possibly padding */
29 char unk[3];
30};
31
34{
37 char nickname[128];
39 unsigned char mac[6];
41 unsigned char unknown[6];
43 unsigned long timestamp;
44};
45
48{
53 char name[8];
55 unsigned char bssid[6];
57 unsigned char unknown[2];
60};
61
63{
65 int count;
67 unsigned char macs[16][6];
68};
69
72{
76 char name[8];
78 char nickname[128];
80 unsigned char bssid[6];
81};
82
92int sceNetAdhocctlInit(int stacksize, int priority, struct productStruct *product);
93
100
109
116
125
133int sceNetAdhocctlCreate(const char *name);
134
143
152
165int sceNetAdhocctlCreateEnterGameMode(const char *name, int unknown, int num, unsigned char *macs, unsigned int timeout, int unknown2);
166
177int sceNetAdhocctlJoinEnterGameMode(const char *name, unsigned char *hostmac, unsigned int timeout, int unknown);
178
187
194
204
214int sceNetAdhocctlGetPeerInfo(unsigned char *mac, int size, struct SceNetAdhocctlPeerInfo *peerinfo);
215
222
232
233typedef void (*sceNetAdhocctlHandler)(int flag, int error, void *unknown);
234
244
253
262int sceNetAdhocctlGetNameByAddr(unsigned char *mac, char *nickname);
263
273int sceNetAdhocctlGetAddrByName(char *nickname, int *length, void *buf);
274
283
284#ifdef __cplusplus
285}
286#endif
287
288#endif
unsigned int unknown2
Definition psploadcore.h:6
int sceNetAdhocctlGetParameter(struct SceNetAdhocctlParams *params)
Get Adhocctl parameter.
int sceNetAdhocctlGetAdhocId(struct productStruct *product)
Get the adhoc ID.
int sceNetAdhocctlGetState(int *event)
Get the state of the Adhoc control.
int sceNetAdhocctlConnect(const char *name)
Connect to the Adhoc control.
int sceNetAdhocctlGetScanInfo(int *length, void *buf)
Get the results of a scan.
int sceNetAdhocctlGetAddrByName(char *nickname, int *length, void *buf)
Get mac address from nickname.
int sceNetAdhocctlAddHandler(sceNetAdhocctlHandler handler, void *unknown)
Register an adhoc event handler.
int sceNetAdhocctlCreate(const char *name)
Connect to the Adhoc control (as a host)
int sceNetAdhocctlTerm(void)
Terminate the Adhoc control library.
int sceNetAdhocctlExitGameMode(void)
Exit game mode.
int sceNetAdhocctlDisconnect(void)
Disconnect from the Adhoc control.
int sceNetAdhocctlJoinEnterGameMode(const char *name, unsigned char *hostmac, unsigned int timeout, int unknown)
Connect to the Adhoc control game mode (as a client)
int sceNetAdhocctlGetPeerList(int *length, void *buf)
Get a list of peers.
int sceNetAdhocctlCreateEnterGameMode(const char *name, int unknown, int num, unsigned char *macs, unsigned int timeout, int unknown2)
Connect to the Adhoc control game mode (as a host)
int sceNetAdhocctlJoin(struct SceNetAdhocctlScanInfo *scaninfo)
Connect to the Adhoc control (as a client)
int sceNetAdhocctlGetGameModeInfo(struct SceNetAdhocctlGameModeInfo *gamemodeinfo)
Get game mode information.
int sceNetAdhocctlGetNameByAddr(unsigned char *mac, char *nickname)
Get nickname from a mac address.
int sceNetAdhocctlGetPeerInfo(unsigned char *mac, int size, struct SceNetAdhocctlPeerInfo *peerinfo)
Get peer information.
int sceNetAdhocctlScan(void)
Scan the adhoc channels.
void(* sceNetAdhocctlHandler)(int flag, int error, void *unknown)
Definition pspnet_adhocctl.h:233
int sceNetAdhocctlDelHandler(int id)
Delete an adhoc event handler.
int sceNetAdhocctlInit(int stacksize, int priority, struct productStruct *product)
Initialise the Adhoc control library.
char * name
Definition pspsysmem_kernel.h:4
unsigned char size
Definition pspsysmem_kernel.h:6
float x
Definition psptypes.h:0
Definition pspnet_adhocctl.h:63
int count
Number of peers (including self)
Definition pspnet_adhocctl.h:65
unsigned char macs[16][6]
MAC addresses of peers (including self)
Definition pspnet_adhocctl.h:67
Params structure.
Definition pspnet_adhocctl.h:72
int channel
Channel number.
Definition pspnet_adhocctl.h:74
char name[8]
Name of the connection.
Definition pspnet_adhocctl.h:76
unsigned char bssid[6]
The BSSID.
Definition pspnet_adhocctl.h:80
char nickname[128]
Nickname.
Definition pspnet_adhocctl.h:78
Peer info structure.
Definition pspnet_adhocctl.h:34
unsigned char mac[6]
Mac address.
Definition pspnet_adhocctl.h:39
char nickname[128]
Nickname.
Definition pspnet_adhocctl.h:37
unsigned long timestamp
Time stamp.
Definition pspnet_adhocctl.h:43
unsigned char unknown[6]
Unknown.
Definition pspnet_adhocctl.h:41
struct SceNetAdhocctlPeerInfo * next
Definition pspnet_adhocctl.h:35
Scan info structure.
Definition pspnet_adhocctl.h:48
char name[8]
Name of the connection (alphanumeric characters only)
Definition pspnet_adhocctl.h:53
struct SceNetAdhocctlScanInfo * next
Definition pspnet_adhocctl.h:49
unsigned char bssid[6]
The BSSID.
Definition pspnet_adhocctl.h:55
int channel
Channel number.
Definition pspnet_adhocctl.h:51
int unknown2
Unknown.
Definition pspnet_adhocctl.h:59
unsigned char unknown[2]
Unknown.
Definition pspnet_adhocctl.h:57
Product structure.
Definition pspnet_adhocctl.h:23
char unk[3]
Definition pspnet_adhocctl.h:29
char product[9]
The product ID string.
Definition pspnet_adhocctl.h:27
int unknown
Unknown, set to 0, other values used are 1 and 2.
Definition pspnet_adhocctl.h:25