OrcaSlicer latest
OrcaSlicer
Loading...
Searching...
No Matches
Slic3r::DnsRR_SRV Struct Reference
Collaboration diagram for Slic3r::DnsRR_SRV:

Public Types

enum  { TAG = 0x21 , MIN_SIZE = 8 }

Static Public Member Functions

static optional< DnsRR_SRV > decode (const std::vector< char > &buffer, const DnsResource &rr, size_t dataoffset)

Public Attributes

uint16_t priority
uint16_t weight
uint16_t port
DnsName hostname

Detailed Description

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
TAG 
MIN_SIZE 
297 {
298 TAG = 0x21,
299 MIN_SIZE = 8,
300 };
@ TAG
Definition Bonjour.cpp:298
@ MIN_SIZE
Definition Bonjour.cpp:299

Member Function Documentation

◆ decode()

optional< DnsRR_SRV > Slic3r::DnsRR_SRV::decode ( const std::vector< char > & buffer,
const DnsResource & rr,
size_t dataoffset )
inlinestatic
308 {
309 if (rr.data.size() < MIN_SIZE) {
310 return boost::none;
311 }
312
313 DnsRR_SRV res;
314
315 const uint16_t *data_16 = reinterpret_cast<const uint16_t*>(rr.data.data());
316 res.priority = endian::big_to_native(data_16[0]);
317 res.weight = endian::big_to_native(data_16[1]);
318 res.port = endian::big_to_native(data_16[2]);
319
320 size_t offset = dataoffset + 6;
321 auto hostname = DnsName::decode(buffer, offset);
322
323 if (hostname) {
324 res.hostname = std::move(*hostname);
325 return std::move(res);
326 } else {
327 return boost::none;
328 }
329 }
Slic3r::Polygons offset(const Slic3r::Polygon &polygon, const float delta, JoinType joinType, double miterLimit)
Definition ClipperUtils.cpp:582
static optional< DnsName > decode(const std::vector< char > &buffer, size_t &offset, unsigned depth=0)
Definition Bonjour.cpp:70
DnsName hostname
Definition Bonjour.cpp:305

References Slic3r::DnsResource::data, Slic3r::DnsName::decode(), hostname, MIN_SIZE, Slic3r::offset(), port, priority, and weight.

Referenced by Slic3r::DnsMessage::parse_rr().

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

Member Data Documentation

◆ hostname

DnsName Slic3r::DnsRR_SRV::hostname

Referenced by decode().

◆ port

uint16_t Slic3r::DnsRR_SRV::port

Referenced by decode().

◆ priority

uint16_t Slic3r::DnsRR_SRV::priority

Referenced by decode().

◆ weight

uint16_t Slic3r::DnsRR_SRV::weight

Referenced by decode().


The documentation for this struct was generated from the following file:
  • /home/runner/work/OrcaSlicer/OrcaSlicer/src/slic3r/Utils/Bonjour.cpp