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 (std::uint8_t suboption, const std::vector< std::uint8_t > &data)
 Parse a DHCP suboption's payload into a DCPDHCPBlock.
 

Public Attributes

std::uint8_t suboption = 0
 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 387 of file dcp.h.

Member Function Documentation

◆ Parse()

DCPDHCPBlock profinet::dcp::DCPDHCPBlock::Parse ( std::uint8_t  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 440 of file dcp.cpp.

References clientId, profinet::dcp::DCP_OPTION_DHCP, profinet::dcp::DCP_SUBOPTION_DHCP_CLIENT_ID, profinet::dcp::DCP_SUBOPTION_DHCP_FQDN, profinet::dcp::DCP_SUBOPTION_DHCP_HOSTNAME, profinet::dcp::DCP_SUBOPTION_DHCP_UUID, profinet::dcp::DCP_SUBOPTION_DHCP_VENDOR_SPEC, profinet::DecodeBytes(), fqdn, profinet::Hex2(), hostname, rawData, suboption, suboptionName, profinet::ToHex(), uuid, profinet::uuidLenght, and vendorSpecific.

+ Here is the call 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 402 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 408 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 399 of file dcp.h.

Referenced by Parse().

◆ rawData

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

Raw, undecoded block payload.

Definition at line 396 of file dcp.h.

Referenced by Parse().

◆ suboption

std::uint8_t profinet::dcp::DCPDHCPBlock::suboption = 0

DHCP suboption code.

Definition at line 390 of file dcp.h.

Referenced by Parse().

◆ suboptionName

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

Human-readable name of the suboption.

Definition at line 393 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 411 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 405 of file dcp.h.

Referenced by Parse().


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