net_server: initial replicant version.

* Still picture-less and thus ugly.
 * It provides updated information on what the net_server is doing in terms of interface configuration.
 * It is also able to show simplistic address information for configured interfaces.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20523 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Hugo Santos
2007-04-03 05:38:45 +00:00
parent ed07b9c7e3
commit 37c50abfaf
7 changed files with 479 additions and 13 deletions
+7 -3
View File
@@ -40,6 +40,11 @@ AutoconfigLooper::~AutoconfigLooper()
void
AutoconfigLooper::_ReadyToRun()
{
BMessage interface(kMsgConfigureInterface);
interface.AddString("device", fDevice.String());
interface.AddInt32("net:status", kStatusPreparing);
fTarget.SendMessage(&interface);
// start with DHCP
DHCPClient* client = new DHCPClient(fTarget, fDevice.String());
@@ -57,8 +62,7 @@ AutoconfigLooper::_ReadyToRun()
// TODO: have a look at zeroconf
// TODO: this could also be done add-on based
BMessage interface;
interface.AddString("device", fDevice.String());
interface.ReplaceInt32("net:status", kStatusLinkNoConfig);
uint8 mac[6];
uint8 last = 56;
@@ -80,7 +84,7 @@ AutoconfigLooper::_ReadyToRun()
address.AddString("gateway", "192.168.0.254");
interface.AddMessage("address", &address);
fTarget.SendMessage(kMsgConfigureInterface, &interface);
fTarget.SendMessage(&interface);
}