1 #include "AROSTCPPrefs.h"
5 extern "C" int WriteTCPPrefs(char* DestDir
)
7 return prefs
.writePrefs(DestDir
);
10 extern "C" void ReadTCPPrefs()
15 extern "C" char * GetIP()
20 extern "C" char * GetMask()
25 extern "C" char * GetGate()
30 extern "C" char * GetDNS(int m
)
35 extern "C" int GetDHCP()
37 return int(prefs
.DHCP
);
40 extern "C" char* GetInterf()
45 extern "C" char* GetHost()
50 extern "C" char* GetDomain()
55 extern "C" void SetIP(char * w
)
57 //if (prefs.IP) delete prefs.IP;
58 //prefs.IP=new char[strlen(w)];
59 strlcpy(prefs
.IP
, w
,999);
62 extern "C" void SetMask(char * w
)
64 //if (prefs.mask) delete prefs.mask;
65 //prefs.mask=new char[strlen(w)];
66 strlcpy(prefs
.mask
, w
,999);
69 extern "C" void SetGate(char * w
)
71 //if (prefs.gate) delete prefs.gate;
72 //prefs.gate=new char[strlen(w)];
73 strlcpy(prefs
.gate
, w
,999);
76 extern "C" void SetDNS(int m
, char * w
)
78 //if (prefs.DNS[m]) delete prefs.DNS[m];
79 //prefs.DNS[m]=new char[strlen(w)];
80 strlcpy(prefs
.DNS
[m
], w
,999);
83 extern "C" void SetDHCP(int w
)
88 extern "C" void SetInterf(char* w
)
90 strlcpy(prefs
.interf
, w
,4095);
93 extern "C" void SetHost(char* w
)
95 strlcpy(prefs
.host
, w
,999);
98 extern "C" void SetDomain(char* w
)
100 strlcpy(prefs
.domain
, w
,999);