-
I've come to a little more deciding on this.. If it can be done (I havnt looked in a C++ book yet..) then it could be something like this:
class resolv
{
string dns1;
string dns2;
string dns3;
string searchdomain;
public:
resolv()
{
this = NULL;
};
resolv(string _dns1, string _dns2...
2002-05-08 09:18:54 UTC in Network Profiler
-
You could add the dns1,2,3 and domain as a resolv class to the netconf.. Then if it turns out to be NULL you wouldn't have to write anything to /etc/resolv.conf,
Since I can't come up with exactly what it woudl be with classes, I will give a small example with structures.
struct resolv {
string dns1;
string dns2;
string dns3;
string searchdomain;
}...
2002-05-08 08:48:04 UTC in Network Profiler
-
The include thing is just because it gives linking errors durig compilation. I give an example. in dynamicconf.h:
#include <netconf.h>
in dynamicconf.cpp:
#include "dynamicconf.h"
Now during compilation the dynamicconf.cpp will hold what ever is in the dynamicconf.h aswell, thus when hitting the #include<> it will claim that it can't find the file mentioned there...
2002-05-04 10:28:50 UTC in Network Profiler
-
Sure, if the number of functions stays the same, since there isn't much revealing in what classes and function calls needed in the selections It might just be a basic menu thing..
Hmm.. I was wondering if it would be wise to make the menu as a class it self.. Simply have the main() with something like:
vector <menu> menu_item(selection1, selection2, ... );
menu_item.init();
And from...
2002-05-04 02:21:25 UTC in Network Profiler
-
Well at first glance I would say it was french, but its been 10 years since I last spoken any french, so thats a bit rusty..
The fact that he starts with 'Salu', points towards french, altho the use of 'un' points towards spanish. Now I havnt spoken that in 6 years so thats a bit rusty aswell.. But from the the ovewhelming usage of french endings I would say its french.
And from what I...
2002-05-03 15:35:05 UTC in Network Profiler
-
I was thinking (as a second stage) once this is working. To make the menu part using ncurses, instead of having to clear and re-draw the screen all the time. (and what about a non-blocking readin of the choice)
Also the comparison last with: if(toupper(ch) == 'Q') why use a function call (which is rather expensive), when we can use 6 CPU instructions and one jump, to make: if(ch == 'q' || ch...
2002-05-02 13:21:19 UTC in Network Profiler
-
I can understand your concern towards using C++ in something ment to be a bootscript, but the C++ part isn't in use during boot. That will be a shell script like any other boot script, the C++ is just the programming language, in which the configuration program for this Network profile selecting tool will be created.
Even I would have second thoughts about making this as a C++ project, but...
2002-05-02 13:11:26 UTC in Network Profiler
-
Check out these sites:
http://www.freshmeat.com
http://www.fokus.gmd.de/linux/
they are full with linux stuff..
2000-07-03 01:26:42 UTC in #LinuxRedHat Channel on Dalnet
-
i like it.. the seal is so innocent...
2000-07-01 13:01:10 UTC in #LinuxRedHat Channel on Dalnet