Protobuf Logging Reference

class DNSDistProtoBufMessage

This object represents a single protobuf message as emitted by dnsdist.

classmethod DNSDistProtoBufMessage:addResponseRR(name, type, class, ttl, blob)

New in version 1.2.0.

Add a response RR to the protobuf message.

Parameters:
  • name (string) – The RR name.
  • type (int) – The RR type.
  • class (int) – The RR class.
  • ttl (int) – The RR TTL.
  • blob (string) – The RR binary content.
classmethod DNSDistProtoBufMessage:setBytes(bytes)

Set the size of the query

Parameters:bytes (int) – Number of bytes in the query.
classmethod DNSDistProtoBufMessage:setEDNSSubnet(netmask)

Set the EDNS Subnet to netmask.

Parameters:netmask (string) – The netmask to set to.
classmethod DNSDistProtoBufMessage:setQueryTime(sec, usec)

In a response message, set the time at which the query has been received.

Parameters:
  • sec (int) – Unix timestamp when the query was received.
  • usec (int) – The microsecond the query was received.
classmethod DNSDistProtoBufMessage:setQuestion(name, qtype, qclass)

Set the question in the protobuf message.

Parameters:
  • name (DNSName) – The qname of the question
  • qtype (int) – The qtype of the question
  • qclass (int) – The qclass of the question
classmethod DNSDistProtoBufMessage:setProtobufResponseType(sec, usec)

New in version 1.2.0.

Change the protobuf response type from a query to a response, and optionally set the query time.

Parameters:
  • sec (int) – Optional query time in seconds.
  • usec (int) – Optional query time in additional micro-seconds.
classmethod DNSDistProtoBufMessage:setRequestor(address)

Set the requestor’s address.

Parameters:address (ComboAddress) – The address to set to
classmethod DNSDistProtoBufMessage:setRequestorFromString(address)

Set the requestor’s address from a string.

Parameters:address (string) – The address to set to
classmethod DNSDistProtoBufMessage:setResponder(address)

Set the responder’s address.

Parameters:address (ComboAddress) – The address to set to
classmethod DNSDistProtoBufMessage:setResponderFromString(string)

Set the responder’s address.

Parameters:address (string) – The address to set to
classmethod DNSDistProtoBufMessage:setResponseCode(rcode)

Set the response code of the query.

Parameters:rcode (int) – The response code of the answer
classmethod DNSDistProtoBufMessage:setTag(value)

New in version 1.2.0.

Add a tag to the list of tags.

Parameters:value (string) – The tag value
classmethod DNSDistProtoBufMessage:setTagArray(valueList)

New in version 1.2.0.

Add a list of tags.

Parameters:tags (table) – A list of tags as strings
classmethod DNSDistProtoBufMessage:setTime(sec, usec)

Set the time at which the query or response has been received.

Parameters:
  • sec (int) – Unix timestamp when the query was received.
  • usec (int) – The microsecond the query was received.
classmethod DNSDistProtoBufMessage:toDebugString() → string

Return an string containing the content of the message