PROFINET IO Controller Stack 1.0.0
Modern C++ implementation of a PROFINET IO Controller stack
Loading...
Searching...
No Matches
profinet::dcp::DCPDHCPBlock Struct Reference

Parsed DHCP block from a DCP response. More...

#include <dcp.h>

+ Collaboration diagram for profinet::dcp::DCPDHCPBlock:

Static Public Member Functions

static DCPDHCPBlock Parse (DcpDhcpSuboption suboption, const std::vector< std::uint8_t > &data)
 Parse a DHCP suboption's payload into a DCPDHCPBlock.
 

Public Attributes

DcpDhcpSuboption suboption = DcpDhcpSuboption::Unknown
 DHCP suboption code.
 
std::string suboptionName
 Human-readable name of the suboption.
 
std::vector< std::uint8_t > rawData
 Raw, undecoded block payload.
 
std::optional< std::string > hostname
 Decoded hostname, if this is a Hostname suboption.
 
std::optional< std::vector< std::uint8_t > > clientId
 Decoded client ID, if this is a ClientID suboption.
 
std::optional< std::vector< std::uint8_t > > vendorSpecific
 Decoded vendor-specific data, if this is a VendorSpec suboption.
 
std::optional< std::string > fqdn
 Decoded fully qualified domain name, if this is an FQDN suboption.
 
std::optional< std::string > uuid
 Decoded UUID string, if this is a UUID suboption.
 

Detailed Description

Parsed DHCP block from a DCP response.

Definition at line 194 of file dcp.h.

Member Function Documentation

◆ Parse()

DCPDHCPBlock profinet::dcp::DCPDHCPBlock::Parse ( DcpDhcpSuboption  suboption,
const std::vector< std::uint8_t > &  data 
)
static

Parse a DHCP suboption's payload into a DCPDHCPBlock.

Parameters
suboptionDHCP suboption code.
dataRaw suboption payload.
Returns
The parsed block.

Definition at line 553 of file dcp.cpp.

References clientId, profinet::DecodeBytes(), fqdn, profinet::Hex2(), hostname, rawData, suboption, suboption, suboptionName, profinet::ToHex(), uuid, profinet::uuidLenght, and vendorSpecific.

Referenced by profinet::dcp::TEST(), profinet::dcp::TEST(), profinet::dcp::TEST(), profinet::dcp::TEST(), profinet::dcp::TEST(), profinet::dcp::TEST(), profinet::dcp::TEST(), profinet::dcp::TEST(), profinet::dcp::TEST(), profinet::dcp::TEST(), profinet::dcp::TEST(), profinet::dcp::TEST(), profinet::dcp::TEST(), profinet::dcp::TEST(), and profinet::dcp::TEST().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ clientId

std::optional<std::vector<std::uint8_t> > profinet::dcp::DCPDHCPBlock::clientId

Decoded client ID, if this is a ClientID suboption.

Definition at line 209 of file dcp.h.

Referenced by Parse().

◆ fqdn

std::optional<std::string> profinet::dcp::DCPDHCPBlock::fqdn

Decoded fully qualified domain name, if this is an FQDN suboption.

Definition at line 215 of file dcp.h.

Referenced by Parse().

◆ hostname

std::optional<std::string> profinet::dcp::DCPDHCPBlock::hostname

Decoded hostname, if this is a Hostname suboption.

Definition at line 206 of file dcp.h.

Referenced by Parse().

◆ rawData

std::vector<std::uint8_t> profinet::dcp::DCPDHCPBlock::rawData

Raw, undecoded block payload.

Definition at line 203 of file dcp.h.

Referenced by Parse().

◆ suboption

DcpDhcpSuboption profinet::dcp::DCPDHCPBlock::suboption = DcpDhcpSuboption::Unknown

DHCP suboption code.

Definition at line 197 of file dcp.h.

Referenced by Parse().

◆ suboptionName

std::string profinet::dcp::DCPDHCPBlock::suboptionName

Human-readable name of the suboption.

Definition at line 200 of file dcp.h.

Referenced by Parse().

◆ uuid

std::optional<std::string> profinet::dcp::DCPDHCPBlock::uuid

Decoded UUID string, if this is a UUID suboption.

Definition at line 218 of file dcp.h.

Referenced by Parse().

◆ vendorSpecific

std::optional<std::vector<std::uint8_t> > profinet::dcp::DCPDHCPBlock::vendorSpecific

Decoded vendor-specific data, if this is a VendorSpec suboption.

Definition at line 212 of file dcp.h.

Referenced by Parse().


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