Protobuf Logging Reference¶
-
newRemoteLogger
(address[, timeout=2[, maxQueuedEntries=100[, reconnectWaitTime=1]]])¶ Create a Remote Logger object, to use with
RemoteLogAction()
andRemoteLogResponseAction()
.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)¶ 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)¶ 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[, port])¶ Changed in version 1.5.0:
port
optional parameter added.Set the requestor’s address.
Parameters: - address (ComboAddress) – The address to set to
- port (int) – The requestor source port
-
:
setRequestorFromString
(address[, port])¶ Changed in version 1.5.0:
port
optional parameter added.Set the requestor’s address from a string.
Parameters: - address (string) – The address to set to
- port (int) – The requestor source port
-
:
setResponder
(address[, port])¶ Changed in version 1.5.0:
port
optional parameter added.Set the responder’s address.
Parameters: - address (ComboAddress) – The address to set to
- port (int) – The responder port
-
:
setResponderFromString
(address[, port])¶ Changed in version 1.5.0:
port
optional parameter added.Set the responder’s address.
Parameters: - address (string) – The address to set to
- port (int) – The responder port
-
:
setResponseCode
(rcode)¶ Set the response code of the query.
Parameters: rcode (int) – The response code of the answer
-
:
setServerIdentity
(id)¶ Set the server identify field.
Parameters: id (string) – The server ID
-
:
setTag
(value)¶ Add a tag to the list of tags.
Parameters: value (string) – The tag value
-
:
setTagArray
(valueList)¶ 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
-