Go to the documentation of this file.
81 s << address.
addr[0] <<
":"
82 << address.
addr[1] <<
":"
83 << address.
addr[2] <<
":"
84 << address.
addr[3] <<
":"
85 << address.
addr[4] <<
":"
93 const Size addressSize,
95 const Size payloadSize)
118 ERROR(
"unsupported protocol: " << (
int) protocol);
132 DEBUG(
"packet: size = " << pkt->
size <<
" payload = " << *pkt);
147 DEBUG(
"dropped unknown ethernet type: " << (
int)
type);
161 str << addr.
addr[i] <<
":";
virtual FileSystem::Result process(const NetworkQueue::Packet *pkt, const Size offset)
Process incoming network packet.
Network protocol abstraction class.
static Size copy(void *dest, const void *src, Size count)
Copy memory from one place to another.
virtual FileSystem::Result process(const NetworkQueue::Packet *pkt, const Size offset)
Process incoming network packet.
virtual FileSystem::Result getAddress(Address *address)
Retrieve Ethernet address.
::ARP * m_arp
ARP protocol.
static void * set(void *dest, int ch, unsigned count)
Fill memory with a constant byte.
const u16 readBe16(const void *data)
Read 16-bit big endian integer.
Log & operator<<(Log &log, const Ethernet::Address &addr)
u32 getNextInode()
Get next unused inode.
void writeBe16(void *data, const u16 input)
Write 16-bit big endian integer.
virtual FileSystem::Result process(const NetworkQueue::Packet *pkt, const Size offset)
Process incoming network packet.
Network Device abstract class.
void setARP(::ARP *arp)
Set ARP instance.
virtual FileSystem::Result initialize()
Perform initialization.
@ ARP
Address resolution protocol.
virtual FileSystem::Result setAddress(const Address *address)
Set Ethernet address.
Packet * get()
Get unused packet.
Address m_address
Current ethernet address.
NetworkDevice & m_device
Network device instance.
void append(const char *str)
Append to buffered output.
#define DEBUG(msg)
Output a debug message to standard output.
::IPV4 * m_ipv4
IPV4 protocol.
Ethernet network address.
unsigned short u16
Unsigned 16-bit number.
NetworkQueue * getTransmitQueue()
Get transmit queue.
unsigned int Size
Any sane size indicator cannot go negative.
virtual FileSystem::Result getAddress(Ethernet::Address *address)=0
Read ethernet address.
Internet Protocol Version 4.
FileSystem::Result registerDirectory(Directory *dir, const char *path)
Register a new Directory.
static const String toString(const Address address)
Convert address to string.
NetworkServer & m_server
Network server instance.
#define ERROR(msg)
Output an error message.
Result
Result code for filesystem Actions.
virtual FileSystem::Result setAddress(const Ethernet::Address *address)=0
Set ethernet address.
struct Ethernet::Header Header
Ethernet network packet header.
virtual ~Ethernet()
Destructor.
void setIP(::IPV4 *ip)
Set IPV4 instance.
struct Ethernet::Address Address
Ethernet network address.
Represents a network packet.
Address Resolution Protocol.
@ IPV4
Internet protocol v4.
Identifier
List of known network protocol identifiers.
virtual FileSystem::Result getTransmitPacket(NetworkQueue::Packet **pkt, const void *address, const Size addressSize, const Identifier protocol, const Size payloadSize)
Get a new packet for transmission.
FileSystem::Result registerFile(File *file, const char *path)
Register a new File.