SatCat5
satcat5::ip::Addr Struct Reference

Detailed Description

IPv4 address is a 32-bit unsigned integer.

For additional connection metadata,

See also
ip::Address.

Definition at line 15 of file ip_core.h.

#include <ip_core.h>

Inheritance diagram for satcat5::ip::Addr:
[legend]

Public Member Functions

constexpr Addr ()
 Constructor for the null address (0.0.0.0).
 
constexpr Addr (u32 ip)
 Constructor for a single 32-bit integer.
 
constexpr Addr (u16 msb, u16 lsb)
 Constructor for two 16-bit integers.
 
constexpr Addr (u8 a, u8 b, u8 c, u8 d)
 Constructor in human-readable form (a.b.c.d)
 
 Addr (const Addr &t)=default
 
Addroperator= (const Addr &t)=default
 
void log_to (satcat5::log::LogBuffer &wr) const
 Format this IP address in standard form, e.g., "192.168.1.2".
 
bool is_broadcast () const
 Limited broadcast (255.255.255.255)
 
bool is_multicast () const
 IP multicast (224.*.*.*)
 
bool is_reserved () const
 Reserved blocks (0.*.*.* or 127.*.*.*)
 
bool is_unicast () const
 Any normal single-destination address.
 
bool is_valid () const
 Any nonzero address.
 
constexpr bool operator== (const satcat5::ip::Addr &other) const
 Commonly used operators.
 
constexpr bool operator!= (const satcat5::ip::Addr &other) const
 Commonly used operators.
 
void write_to (satcat5::io::Writeable *wr) const
 Commonly used operators.
 
bool read_from (satcat5::io::Readable *rd)
 Commonly used operators.
 
constexpr satcat5::ip::Addr operator+ (unsigned offset) const
 Commonly used operators.
 

Public Attributes

u32 value
 Raw access to the underlying representation.
 

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