SatCat5
satcat5::udp::Header Struct Reference

Detailed Description

UDP header contents.

The UDP checksum field is never used.

Definition at line 48 of file udp_core.h.

#include <udp_core.h>

Collaboration diagram for satcat5::udp::Header:
[legend]

Public Member Functions

 Header (const Header &t)=default
 
Headeroperator= (const Header &t)=default
 
void write_to (satcat5::io::Writeable *wr) const
 Write UDP header to the designated stream. More...
 
bool read_from (satcat5::io::Readable *rd)
 Read UDP header from the designated stream. More...
 

Public Attributes

satcat5::udp::Port src
 Source port.
 
satcat5::udp::Port dst
 Destination port.
 
u16 length
 Length of contained data.
 

Member Function Documentation

◆ read_from()

bool satcat5::udp::Header::read_from ( satcat5::io::Readable rd)

Read UDP header from the designated stream.

Returns
True on success, false otherwise.

Definition at line 91 of file udp_core.cc.

◆ write_to()

void satcat5::udp::Header::write_to ( satcat5::io::Writeable wr) const

Write UDP header to the designated stream.

The checksum field will be written as zero (disabled).

Definition at line 83 of file udp_core.cc.


The documentation for this struct was generated from the following files: