Difference between revisions of "/dev/net/ifmgr/ncl"
(Added more function and structures) |
|||
Line 9: | Line 9: | ||
===0x11 - netconf_set_wifi_cfg()=== | ===0x11 - netconf_set_wifi_cfg()=== | ||
This function is used to set the configuration information of the active wifi profile. It takes a [[#Wifi Configuration|wifi configuration buffer]] as input, and produces no output. | This function is used to set the configuration information of the active wifi profile. It takes a [[#Wifi Configuration|wifi configuration buffer]] as input, and produces no output. | ||
+ | |||
+ | ===0x25 - netconf_set_proxy_cfg()=== | ||
+ | This function is used to set the configuration information for the proxy of the active wifi profile. It takes a [[#Proxy Configuration|proxy configuration buffer]] as input, and produces no output. | ||
+ | |||
+ | ===0x26 - netconf_get_proxy_cfg()=== | ||
+ | This function is used to get the configuration information for the proxy of the active wifi profile. It takes no input, and stores its output in a [[#Proxy Configuration|proxy configuration buffer]]. | ||
==Structures== | ==Structures== | ||
Line 14: | Line 20: | ||
<syntaxhighlight lang="C"> | <syntaxhighlight lang="C"> | ||
/* Wifi configuration */ | /* Wifi configuration */ | ||
− | typedef struct | + | typedef struct WifiConfig |
{ | { | ||
char unk0[0x4-0x0]; | char unk0[0x4-0x0]; | ||
Line 23: | Line 29: | ||
char key[0x40]; | char key[0x40]; | ||
char unk6e[0x70-0x6e]; | char unk6e[0x70-0x6e]; | ||
− | } | + | } WifiConfig; |
+ | |||
+ | #define WIFI_CFG_SIZE 0x70 | ||
+ | |||
+ | </syntaxhighlight> | ||
+ | |||
+ | ===Proxy Configuration=== | ||
+ | <syntaxhighlight lang="C"> | ||
+ | /* Proxy configuration */ | ||
+ | typedef struct ProxyConfig | ||
+ | { | ||
+ | uint16_t using_proxy; // 0x0000 or 0x0001 | ||
+ | uint16_t port; | ||
+ | int using_auth; // not sure about that | ||
+ | char ip[0x80]; | ||
+ | char username[0x80]; | ||
+ | char password[0x80]; | ||
+ | char unknown[0x40]; | ||
+ | } ProxyConfig; | ||
+ | |||
+ | #define PROXY_CFG_SIZE 0x1c8 | ||
+ | |||
+ | </syntaxhighlight> |
Revision as of 18:40, 11 November 2018
/dev/net/ifmgr/ncl is the IOSU device node that handles network configuration. Its functions are exposed to the Cafe OS userspace through nsysnet.rpl's netconf functions.
ioctl() interface
0x0C - netconf_get_wifi_cfg()
This function is used to get the configuration information of the active wifi profile. It takes no input, and stores its output in a wifi configuration buffer.
0x11 - netconf_set_wifi_cfg()
This function is used to set the configuration information of the active wifi profile. It takes a wifi configuration buffer as input, and produces no output.
0x25 - netconf_set_proxy_cfg()
This function is used to set the configuration information for the proxy of the active wifi profile. It takes a proxy configuration buffer as input, and produces no output.
0x26 - netconf_get_proxy_cfg()
This function is used to get the configuration information for the proxy of the active wifi profile. It takes no input, and stores its output in a proxy configuration buffer.
Structures
Wifi Configuration
/* Wifi configuration */
typedef struct WifiConfig
{
char unk0[0x4-0x0];
char ssid[0x20];
uint16_t ssid_len;
char unk26[0x2c-0x26];
uint16_t key_len;
char key[0x40];
char unk6e[0x70-0x6e];
} WifiConfig;
#define WIFI_CFG_SIZE 0x70
Proxy Configuration
/* Proxy configuration */
typedef struct ProxyConfig
{
uint16_t using_proxy; // 0x0000 or 0x0001
uint16_t port;
int using_auth; // not sure about that
char ip[0x80];
char username[0x80];
char password[0x80];
char unknown[0x40];
} ProxyConfig;
#define PROXY_CFG_SIZE 0x1c8