2 * Copyright 2005, Ingo Weinhold <bonefish@cs.tu-berlin.de>.
3 * All rights reserved. Distributed under the terms of the MIT License.
6 #include <boot/net/NetDefs.h>
10 const mac_addr_t
kBroadcastMACAddress(
11 (uint8
[6]){0xff, 0xff, 0xff, 0xff, 0xff, 0xff});
12 const mac_addr_t
kNoMACAddress((uint8
[6]){0, 0, 0, 0, 0, 0});
15 const char *const kEthernetServiceName
= "ethernet";
16 const char *const kARPServiceName
= "arp";
17 const char *const kIPServiceName
= "ip";
18 const char *const kUDPServiceName
= "udp";
19 const char *const kTCPServiceName
= "tcp";
23 NetService::NetService(const char *name
)
29 NetService::~NetService()
35 NetService::NetServiceName()
40 // CountSubNetServices
42 NetService::CountSubNetServices() const
49 NetService::SubNetServiceAt(int index
) const
56 NetService::FindSubNetService(const char *name
) const
58 int count
= CountSubNetServices();
59 for (int i
= 0; i
< count
; i
++) {
60 NetService
*service
= SubNetServiceAt(i
);
61 if (strcmp(service
->NetServiceName(), name
) == 0)