18#ifndef __LIB_LIBNET_UDP_H
19#define __LIB_LIBNET_UDP_H
SystemDescriptorHeader header
Efficient key -> value lookups.
Abstract Input/Output buffer.
Index is a N-sized array of pointers to items of type T.
Network Device abstract class.
Network protocol abstraction class.
User Datagram Protocol (UDP).
User Datagram Protocol (UDP) socket.
User Datagram Protocol (UDP)
FileSystem::Result sendPacket(const NetworkClient::SocketInfo *src, const NetworkClient::SocketInfo *dest, IOBuffer &buffer, const Size size, const Size offset)
Send packet.
UDPFactory * m_factory
Factory for creating new UDP sockets.
UDPSocket * createSocket(String &path, const ProcessID pid)
Creates an UDP socket.
static const ulong calculateSum(const u16 *ptr, const Size bytes)
Calculate sum of artibrary data.
void unregisterSockets(const ProcessID pid)
Remove sockets for a process.
FileSystem::Result bind(UDPSocket *sock, const u16 port)
Bind to UDP port.
virtual FileSystem::Result initialize()
Perform initialization.
Index< UDPSocket, MaxUdpSockets > m_sockets
Contains all UDP sockets.
struct UDP::Header Header
Packet header format.
virtual ~UDP()
Destructor.
static const Size MaxUdpSockets
HashTable< u16, UDPSocket * > m_ports
Maps UDP ports to UDP sockets.
virtual FileSystem::Result process(const NetworkQueue::Packet *pkt, const Size offset)
Process incoming network packet.
u32 ProcessID
Process Identification Number.
unsigned long ulong
Unsigned long number.
unsigned short u16
Unsigned 16-bit number.
unsigned int Size
Any sane size indicator cannot go negative.
Result
Result code for filesystem Actions.
Represents a network packet.