vitasdk
Documentation of the vitasdk
netctl.h
Go to the documentation of this file.
1
7#ifndef _PSP2_NET_NETCTL_H_
8#define _PSP2_NET_NETCTL_H_
9
10#include <vitasdk/build_utils.h>
11#include <psp2/net/net.h>
12
13#ifdef __cplusplus
14extern "C" {
15#endif
16
17/* defines */
18
19#define SCE_NETCTL_INFO_CONFIG_NAME_LEN_MAX 64
20#define SCE_NETCTL_INFO_SSID_LEN_MAX 32
21
46
53
54/* callback */
55
56typedef void *(*SceNetCtlCallback)(
57 int event_type,
58 void *arg);
59
60/* struct/union */
61
62typedef union SceNetCtlInfo {
64 unsigned int device;
66 unsigned int mtu;
67 unsigned int link;
70 unsigned int wifi_security;
71 unsigned int rssi_dbm;
72 unsigned int rssi_percentage;
73 unsigned int channel;
74 unsigned int ip_config;
75 char dhcp_hostname[256];
76 char pppoe_auth_name[128];
77 char ip_address[16];
78 char netmask[16];
79 char default_route[16];
80 char primary_dns[16];
81 char secondary_dns[16];
82 unsigned int http_proxy_config;
84 unsigned int http_proxy_port;
87
88
96
102
103/* prototypes */
104
107
109
110int sceNetCtlInetGetResult(int eventType, int *errorCode);
111int sceNetCtlAdhocGetResult(int eventType, int *errorCode);
112
114int sceNetCtlInetGetState(int *state);
116
119
124int sceNetCtlAdhocGetPeerList(unsigned int *buflen, void *buf);
126
127#ifdef __cplusplus
128}
129#endif
130
131#endif /* _PSP2_NET_NETCTL_H_ */
132
#define VITASDK_BUILD_ASSERT_EQ(__size__, __name__)
Definition build_utils.h:13
int sceNetCtlAdhocGetResult(int eventType, int *errorCode)
int sceNetCtlAdhocUnregisterCallback(int cid)
int sceNetCtlInetUnregisterCallback(int cid)
unsigned int mtu
Definition netctl.h:66
char ssid[SCE_NETCTL_INFO_SSID_LEN_MAX+1]
Definition netctl.h:69
int sceNetCtlAdhocGetPeerList(unsigned int *buflen, void *buf)
unsigned int wifi_security
Definition netctl.h:70
int sceNetCtlAdhocGetState(int *state)
int sceNetCtlInetGetInfo(int code, SceNetCtlInfo *info)
int sceNetCtlInit()
int sceNetCtlAdhocGetInAddr(SceNetInAddr *inaddr)
int stun_status
Definition netctl.h:91
int sceNetCtlAdhocDisconnect()
int sceNetCtlCheckCallback()
char primary_dns[16]
Definition netctl.h:80
SceNetInAddr mapped_addr
Definition netctl.h:93
char default_route[16]
Definition netctl.h:79
unsigned int size
Definition netctl.h:90
char dhcp_hostname[256]
Definition netctl.h:75
unsigned int ip_config
Definition netctl.h:74
unsigned int http_proxy_config
Definition netctl.h:82
int nat_type
Definition netctl.h:92
SceNetCtlState
Definition netctl.h:47
#define SCE_NETCTL_INFO_SSID_LEN_MAX
Definition netctl.h:20
SceNetCtlInfoType
Definition netctl.h:22
unsigned int channel
Definition netctl.h:73
int sceNetCtlInetGetState(int *state)
#define SCE_NETCTL_INFO_CONFIG_NAME_LEN_MAX
Definition netctl.h:19
void sceNetCtlTerm()
char ip_address[16]
Definition netctl.h:77
SceNetEtherAddr ether_addr
Definition netctl.h:65
int sceNetCtlAdhocRegisterCallback(SceNetCtlCallback func, void *arg, int *cid)
char pppoe_auth_name[128]
Definition netctl.h:76
unsigned int rssi_percentage
Definition netctl.h:72
int sceNetCtlInetRegisterCallback(SceNetCtlCallback func, void *arg, int *cid)
SceNetEtherAddr bssid
Definition netctl.h:68
int sceNetCtlGetNatInfo(SceNetCtlNatInfo *natinfo)
unsigned int http_proxy_port
Definition netctl.h:84
char secondary_dns[16]
Definition netctl.h:81
unsigned int device
Definition netctl.h:64
char http_proxy_server[256]
Definition netctl.h:83
void *(* SceNetCtlCallback)(int event_type, void *arg)
Definition netctl.h:56
struct SceNetCtlAdhocPeerInfo * next
Definition netctl.h:98
int sceNetCtlInetGetResult(int eventType, int *errorCode)
char netmask[16]
Definition netctl.h:78
char cnf_name[SCE_NETCTL_INFO_CONFIG_NAME_LEN_MAX+1]
Definition netctl.h:63
unsigned int link
Definition netctl.h:67
SceNetInAddr inet_addr
Definition netctl.h:99
unsigned int rssi_dbm
Definition netctl.h:71
@ SCE_NETCTL_STATE_FINALIZING
Definition netctl.h:50
@ SCE_NETCTL_STATE_CONNECTED
Definition netctl.h:51
@ SCE_NETCTL_STATE_CONNECTING
Definition netctl.h:49
@ SCE_NETCTL_STATE_DISCONNECTED
Definition netctl.h:48
@ SCE_NETCTL_INFO_GET_HTTP_PROXY_CONFIG
Definition netctl.h:42
@ SCE_NETCTL_INFO_GET_CNF_NAME
Definition netctl.h:23
@ SCE_NETCTL_INFO_GET_RSSI_DBM
Definition netctl.h:31
@ SCE_NETCTL_INFO_GET_DHCP_HOSTNAME
Definition netctl.h:35
@ SCE_NETCTL_INFO_GET_WIFI_SECURITY
Definition netctl.h:30
@ SCE_NETCTL_INFO_GET_SECONDARY_DNS
Definition netctl.h:41
@ SCE_NETCTL_INFO_GET_SSID
Definition netctl.h:29
@ SCE_NETCTL_INFO_GET_ETHER_ADDR
Definition netctl.h:25
@ SCE_NETCTL_INFO_GET_MTU
Definition netctl.h:26
@ SCE_NETCTL_INFO_GET_PRIMARY_DNS
Definition netctl.h:40
@ SCE_NETCTL_INFO_GET_HTTP_PROXY_SERVER
Definition netctl.h:43
@ SCE_NETCTL_INFO_GET_RSSI_PERCENTAGE
Definition netctl.h:32
@ SCE_NETCTL_INFO_GET_LINK
Definition netctl.h:27
@ SCE_NETCTL_INFO_GET_CHANNEL
Definition netctl.h:33
@ SCE_NETCTL_INFO_GET_NETMASK
Definition netctl.h:38
@ SCE_NETCTL_INFO_GET_HTTP_PROXY_PORT
Definition netctl.h:44
@ SCE_NETCTL_INFO_GET_IP_ADDRESS
Definition netctl.h:37
@ SCE_NETCTL_INFO_GET_DEFAULT_ROUTE
Definition netctl.h:39
@ SCE_NETCTL_INFO_GET_IP_CONFIG
Definition netctl.h:34
@ SCE_NETCTL_INFO_GET_DEVICE
Definition netctl.h:24
@ SCE_NETCTL_INFO_GET_PPPOE_AUTH_NAME
Definition netctl.h:36
@ SCE_NETCTL_INFO_GET_BSSID
Definition netctl.h:28
Definition netctl.h:97
Definition netctl.h:89
Definition netctl.h:62
Definition net.h:435
Definition net.h:414