Updated PCI IDs to latest snapshot.
[tangerine.git] / workbench / prefs / TCPPrefs / interface.cpp
blob2a13e97d6ca2d0f924f7af9aae2d83eab883d094
1 #include "AROSTCPPrefs.h"
3 static TCPPrefs prefs;
5 extern "C" int WriteTCPPrefs(char* DestDir)
7 return prefs.writePrefs(DestDir);
10 extern "C" void ReadTCPPrefs()
12 prefs.readPrefs();
15 extern "C" char * GetIP()
17 return prefs.IP;
20 extern "C" char * GetMask()
22 return prefs.mask;
25 extern "C" char * GetGate()
27 return prefs.gate;
30 extern "C" char * GetDNS(int m)
32 return prefs.DNS[m];
35 extern "C" int GetDHCP()
37 return int(prefs.DHCP);
40 extern "C" char* GetInterf()
42 return prefs.interf;
45 extern "C" char* GetHost()
47 return prefs.host;
50 extern "C" char* GetDomain()
52 return prefs.domain;
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)
85 prefs.DHCP = bool(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);