* Copyright 2005, Ingo Weinhold <bonefish@cs.tu-berlin.de>.
* All rights reserved. Distributed under the terms of the MIT License.
*/
#include <boot/net/NetDefs.h>
#include <stdio.h>
const mac_addr_t kBroadcastMACAddress(
(uint8[6]){0xff, 0xff, 0xff, 0xff, 0xff, 0xff});
const mac_addr_t kNoMACAddress((uint8[6]){0, 0, 0, 0, 0, 0});
const char *const kEthernetServiceName = "ethernet";
const char *const kARPServiceName = "arp";
const char *const kIPServiceName = "ip";
const char *const kUDPServiceName = "udp";
const char *const kTCPServiceName = "tcp";
NetService::NetService(const char *name)
: fName(name)
{
}
NetService::~NetService()
{
}
const char *
NetService::NetServiceName()
{
return fName;
}
int
NetService::CountSubNetServices() const
{
return 0;
}
NetService *
NetService::SubNetServiceAt(int index) const
{
return NULL;
}
NetService *
NetService::FindSubNetService(const char *name) const
{
int count = CountSubNetServices();
for (int i = 0; i < count; i++) {
NetService *service = SubNetServiceAt(i);
if (strcmp(service->NetServiceName(), name) == 0)
return service;
}
return NULL;
}