Public Types |
Public Member Functions |
Public Attributes |
Protected Attributes |
List of all members
mDNS::Message Class Reference
Encapsulates a message packet for flexible introspection. More...
#include <Message.h>
Inheritance diagram for mDNS::Message:
Collaboration diagram for mDNS::Message:
Public Types | |
| enum | Type { Type::query, Type::reply } |
Public Member Functions | |
| Message (IpAddress remoteIp, uint16_t remotePort, void *data, uint16_t size) | |
| Message (const Message &other) | |
| bool | parse () |
| Parse message data. More... | |
| IpAddress | getRemoteIp () const |
| Address of sender from UDP packet. More... | |
| uint16_t | getRemotePort () const |
| UDP port in message. More... | |
| bool | isReply () const |
| Check that message contains answers, not queries. More... | |
| Type | getType () const |
| bool | isTruncated () const |
| If set, indicates record is split across multiple packets. More... | |
| uint8_t | getResponseCode () const |
| Non-zero indicates error. More... | |
| uint8_t * | getData () const |
| uint16_t | getSize () const |
| Answer * | operator[] (ResourceType type) |
| void | allocate (uint16_t recordSize) |
| uint8_t * | resolvePointer (uint16_t pointer) const |
Public Attributes | |
| Question::OwnedList | questions |
| Answer::OwnedList | answers |
Protected Attributes | |
| IpAddress | remoteIp |
| uint16_t | remotePort |
| uint8_t * | data |
| uint16_t | size |
Detailed Description
Encapsulates a message packet for flexible introspection.
Member Enumeration Documentation
◆ Type
|
strong |
Constructor & Destructor Documentation
◆ Message() [1/2]
|
inline |
◆ Message() [2/2]
|
inline |
Member Function Documentation
◆ allocate()
|
inline |
◆ getData()
|
inline |
◆ getRemoteIp()
|
inline |
Address of sender from UDP packet.
◆ getRemotePort()
|
inline |
UDP port in message.
◆ getResponseCode()
|
inline |
Non-zero indicates error.
◆ getSize()
|
inline |
◆ getType()
|
inline |
◆ isReply()
|
inline |
Check that message contains answers, not queries.
◆ isTruncated()
|
inline |
If set, indicates record is split across multiple packets.
◆ operator[]()
| Answer* mDNS::Message::operator[] | ( | ResourceType | type | ) |
◆ parse()
| bool mDNS::Message::parse | ( | ) |
Parse message data.
- Return values
-
bool true if message parsed successfully, false indicates a problem
Does basic validation and builds a list of answers.
◆ resolvePointer()
Member Data Documentation
◆ answers
| Answer::OwnedList mDNS::Message::answers |
◆ data
|
protected |
◆ questions
| Question::OwnedList mDNS::Message::questions |
◆ remoteIp
|
protected |
◆ remotePort
|
protected |
◆ size
|
protected |
The documentation for this class was generated from the following file:
1.8.17