static Size copy(void *dest, const void *src, Size count)
Copy memory from one place to another.
static void * set(void *dest, int ch, unsigned count)
Fill memory with a constant byte.
virtual FileSystem::Result process(const NetworkQueue::Packet *pkt)
Process incoming network packet.
ICMP::Header m_reply
Reply.
u32 ProcessID
Process Identification Number.
virtual FileSystem::Result write(IOBuffer &buffer, Size &size, const Size offset)
Send ICMP request.
FileSystem::Result sendPacket(const IPV4::Address ip, const Header *header, const void *payload, const Size payloadSize)
Send packet.
void setReply(const ICMP::Header *reply)
Set ICMP reply.
const IPV4::Address getAddress() const
Get associated IP host.
#define DEBUG(msg)
Output a debug message to standard output.
SystemDescriptorHeader header
NetworkClient::SocketInfo m_info
Socket connection.
Abstract Input/Output buffer.
unsigned int u32
Unsigned 32-bit number.
unsigned int Size
Any sane size indicator cannot go negative.
virtual ~ICMPSocket()
Destructor.
virtual FileSystem::Result read(IOBuffer &buffer, Size &size, const Size offset)
Read ICMP response.
Network socket represents a single logical connection on a protocol.
Result
Result code for filesystem Actions.
FileSystem::Result read(void *buffer, const Size size, const Size offset=ZERO)
Read bytes from the I/O buffer.
FileSystem::Result write(const void *buffer, const Size size, const Size offset=ZERO)
Write bytes to the I/O buffer.
ICMPSocket(const u32 inode, ICMP *icmp, const ProcessID pid)
Constructor.
Represents a network packet.
ICMP * m_icmp
ICMP protocol instance.
Internet Control Message Protocol (ICMP)