Go to the documentation of this file.
18 #ifndef __LIB_LIBNET_IPV4_H
19 #define __LIB_LIBNET_IPV4_H
191 const Size addressSize,
193 const Size payloadSize);
virtual FileSystem::Result process(const NetworkQueue::Packet *pkt, const Size offset)
Process incoming network packet.
Network protocol abstraction class.
struct IPV4::PseudoHeader PseudoHeader
Pseudo Header.
Network Device abstract class.
static const u16 checksum(const void *buffer, const Size length)
Calculate IP checksum.
User Datagram Protocol (UDP)
struct IPV4::Header Header
IP network packet header.
::UDP * m_udp
UDP instance.
#define PACKED
Ensures strict minimum memory requirements.
Address m_address
Current IP address.
unsigned short u16
Unsigned 16-bit number.
static const Address toAddress(const char *address)
Convert string to IPV4 address.
unsigned int u32
Unsigned 32-bit number.
unsigned int Size
Any sane size indicator cannot go negative.
virtual FileSystem::Result setAddress(const Address *address)
Set current IP address.
void setARP(::ARP *arp)
Set ARP instance.
Internet Protocol Version 4.
virtual FileSystem::Result initialize()
Perform initialization.
static const String toString(const Address address)
Convert address to string.
virtual ~IPV4()
Destructor.
void setUDP(::UDP *udp)
Set UDP instance.
void setICMP(::ICMP *icmp)
Set ICMP instance.
Protocol getProtocolByIdentifier(const NetworkProtocol::Identifier id) const
Convert protocol identifier.
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.
u16 m_id
Packet ID for IPV4.
Result
Result code for filesystem Actions.
unsigned char u8
Unsigned 8-bit number.
virtual FileSystem::Result getAddress(Address *address)
Get current IP address.
::ARP * m_arp
ARP instance.
::ICMP * m_icmp
ICMP instance.
Represents a network packet.
Address Resolution Protocol.
Identifier
List of known network protocol identifiers.
Internet Control Message Protocol (ICMP)