1 #ifndef _PXE_NETWORK_H 2 #define _PXE_NETWORK_H 3 /* 4 * Copyright 2006, Marcus Overhagen <marcus@overhagen.de. All rights reserved. 5 * Copyright 2005, Ingo Weinhold <bonefish@cs.tu-berlin.de>. 6 * Distributed under the terms of the MIT License. 7 */ 8 9 #include <OS.h> 10 #include <boot/net/Ethernet.h> 11 #include <boot/net/NetStack.h> 12 13 struct PXE_STRUCT; 14 15 class UNDI : public EthernetInterface 16 { 17 public: 18 UNDI(); 19 virtual ~UNDI(); 20 21 status_t Init(); 22 23 ip_addr_t ServerIPAddress() const; 24 virtual mac_addr_t MACAddress() const; 25 26 virtual void * AllocateSendReceiveBuffer(size_t size); 27 virtual void FreeSendReceiveBuffer(void *buffer); 28 29 virtual ssize_t Send(const void *buffer, size_t size); 30 virtual ssize_t Receive(void *buffer, size_t size); 31 32 private: 33 mac_addr_t fMACAddress; 34 bool fRxFinished; 35 PXE_STRUCT * fPxeData; 36 }; 37 38 #endif 39