Protobuf Logging Reference

newRemoteLogger(address[, timeout=2[, maxQueuedEntries=100[, reconnectWaitTime=1]]])

Create a Remote Logger object, to use with RemoteLogAction() and RemoteLogResponseAction().

Parameters:
  • address (string) – An IP:PORT combination where the logger is listening
  • timeout (int) – TCP connect timeout in seconds
  • maxQueuedEntries (int) – Queue this many messages before dropping new ones (e.g. when the remote listener closes the connection)
  • reconnectWaitTime (int) – Time in seconds between reconnection attempts
class DNSDistProtoBufMessage

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

: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.
:setBytes(bytes)

Set the size of the query

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

Set the EDNS Subnet to netmask.

Parameters:netmask (string) – The netmask to set to.
: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.
: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
: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.
:setRequestor(address)

Set the requestor’s address.

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

Set the requestor’s address from a string.

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

Set the responder’s address.

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

Set the responder’s address.

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

Set the response code of the query.

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

New in version 1.2.0.

Add a tag to the list of tags.

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

New in version 1.2.0.

Add a list of tags.

Parameters:tags (table) – A list of tags as strings
: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.
:toDebugString() → string

Return an string containing the content of the message