Module net

Source

Modules§

packet 🔒

Structs§

DNSAnswer
DNS answer body
DNSRecord
DNS request body
ICMPPacket
An ICMP4Packet (ping packet) https://en.wikipedia.org/wiki/Internet_Control_Message_Protocol#header_rest
IPv4Packet
A struct detailing an IPv4Packet https://en.wikipedia.org/wiki/Internet_Protocol_version_4
IPv6Packet
A struct detailing an IPv6Packet https://en.wikipedia.org/wiki/IPv6
PseudoHeaderV4
Struct defining the IPv4 pseudo-header for checksum calculation.
PseudoHeaderV6
Struct defining the IPv6 pseudo-header for checksum calculation.
TCPPacket
A TCPPacket https://en.wikipedia.org/wiki/Transmission_Control_Protocol
TXTRecord
DNS TXT data record
UDPPacket
An UDPPacket (UDP packet) https://en.wikipedia.org/wiki/User_Datagram_Protocol

Enums§

PacketPayload
Definition of the IPV4Packet payload (either ICMPv4, UDP, TCP, or unimplemented)
PseudoHeader
Struct defining a pseudo header that is used by both TCP and UDP to calculate their checksum

Functions§

calculate_checksum
Calculate the checksum for a UDP/TCP packet.
get_domain_bytes_length
Get the length of a given domain in bytes TODO test this function
read_dns_name 🔒
Read a DNS name that is contained in a DNS response. Returns the domain name string of the A record reply.