wavelength 1.0.0
Loading...
Searching...
No Matches
eznetctl.h
Go to the documentation of this file.
1#pragma once
2
3#include <inetctl.h>
4#include <sifrpc.h>
5
8
16class EzNetCtl {
17public:
19 static constexpr unsigned int kRpcServerId = 0x75488909;
20
22 enum Function {
32#ifdef VIDEO_STANDARD_PAL
33 kFunctionSetNetChecked = 9,
34#endif
35 };
36
44 static int ModuleStart();
45
55 static int ModuleStop(int argc, char **argv);
56
58 static int sEthernetId;
59
61 static int sPppId;
62
63#ifdef VIDEO_STANDARD_PAL
65 static int sNetChecked;
66#endif
67
68private:
70 static constexpr unsigned int kInterfaceStartedBit = 0x0001;
71
73 static constexpr int kInterfaceIdShift = 16;
74
81 static void RpcServerThread();
82
89 static void RemoveRpcServer();
90
98 static int Initialize();
99
107 static int Finalize();
108
117 static unsigned int AlarmHandler(void *common);
118
127 static void EventHandler(int interfaceId, int event);
128
137 static int Connect(NetcnfifEnv *env);
138
148 static char *LookUpName(char *name, int size);
149
161 static void *RpcHandler(unsigned int function, void *buffer, int size);
162
164 static constexpr int kRpcBufferSize = 0x140;
165
167 static int sThread;
168
170 static int sEventFlag;
171
173 static sceInetCtlEventHandler sEventHandler;
174
176 static sceSifQueueData sQueue;
177
179 static sceSifServeData sServer;
180
182 alignas(16) static unsigned char sBuffer[kRpcBufferSize];
183
185 static NetcnfifEnv sEnv;
186
188 alignas(16) static NetcnfifData sData;
189};
190
200extern "C" int start(int argc, char **argv);
The eznetctl module connects the network for the EE through a SIF RPC server.
Definition eznetctl.h:16
static int sEthernetId
Interface identifier of the started Ethernet interface, or zero.
Definition eznetctl.h:58
static constexpr unsigned int kRpcServerId
SIF RPC server identifier of the module.
Definition eznetctl.h:19
static int ModuleStart()
Start the module.
static int sPppId
Interface identifier of the started PPP interface, or zero.
Definition eznetctl.h:61
Function
RPC function numbers.
Definition eznetctl.h:22
@ kFunctionGetDataAddress
Definition eznetctl.h:23
@ kFunctionLookUpName
Definition eznetctl.h:30
@ kFunctionApplyData
Definition eznetctl.h:24
@ kFunctionGetStatus
Definition eznetctl.h:26
@ kFunctionNetCheck
Definition eznetctl.h:31
@ kFunctionInetCtl5
Definition eznetctl.h:28
@ kFunctionInetCtl6
Definition eznetctl.h:29
@ kFunctionInetCtl7
Definition eznetctl.h:27
@ kFunctionLoadEntry
Definition eznetctl.h:25
static int ModuleStop(int argc, char **argv)
Unload the module.
A combination in the flat form the EE reads, with every setting as text or a number.
Definition netcnfifdata.h:11
A netcnf environment that loads into memory of the module.
Definition netcnfifenv.h:10
int start(int argc, char **argv)
Module entry.