wavelength 1.0.0
Loading...
Searching...
No Matches
netcnfifenv.h
Go to the documentation of this file.
1#pragma once
2
3#include <netcnf.h>
4
6
13class NetcnfifEnv : public sceNetCnfEnv {
14public:
21 void Init();
22
32 int LoadEntry(const char *fileName, const char *userName);
33
43 int WriteEnv(NetcnfifData *data, int kind);
44
53
65 static int SelectByDevice(const char *fileName, int memoryCard, int hardDisk, int other);
66
67private:
69 static constexpr int kErrorNoSettings = -100;
70
79 int WritePairs(NetcnfifData *data);
80
92 int WriteInterface(NetcnfifData *data, int kind);
93
102 int WriteAddresses(NetcnfifData *data);
103
112 int AddRoute(const char *gateway);
113
123 int AddNameServer(const char *address, int index);
124
134 int Attach(int kind);
135
137 inline void AlignMemory();
138
144 inline void AppendCommand(sceNetCnfCommand *command);
145
151 inline void AppendPair(sceNetCnfPair *pair);
152
156 inline void ResetRoot();
157
165 static void ResetInterface(sceNetCnfInterface *interface);
166
175 static bool IsNonzeroAddress(const char *text);
176
178 static constexpr int kMemorySize = 0x800;
179
181 static constexpr int kNameServerCount = 2;
182
184 alignas(16) static unsigned char sMemory[kMemorySize];
185
187 static char sChatScript[NetcnfifData::kTextSize];
188
190 static char sPairName[NetcnfifData::kTextSize];
191
193 static sceNetCnfRouteCommand sRoute;
194
196 static sceNetCnfNameServerCommand sNameServers[kNameServerCount];
197};
A combination in the flat form the EE reads, with every setting as text or a number.
Definition netcnfifdata.h:11
static constexpr int kTextSize
Size of each text setting.
Definition netcnfifdata.h:14
A netcnf environment that loads into memory of the module.
Definition netcnfifenv.h:10
static int SelectByDevice(const char *fileName, int memoryCard, int hardDisk, int other)
Choose a value by the device of a file.
void Init()
Clear the environment and give it the module's memory.
int WriteEnv(NetcnfifData *data, int kind)
Build the records of a NetcnfifData in the environment.
int LoadEntry(const char *fileName, const char *userName)
Load a combination into the environment.
void MergeDialNumbers()
Prefix each dial number of a dialled PPP interface with the dial prefix of its device,...