1 Protobuf Logging Reference
2 ==========================
4 .. function:: newRemoteLogger(address [, timeout=2[, maxQueuedEntries=100[, reconnectWaitTime=1]]])
6 Create a Remote Logger object, to use with :func:`RemoteLogAction` and :func:`RemoteLogResponseAction`.
8 :param string address: An IP:PORT combination where the logger is listening
9 :param int timeout: TCP connect timeout in seconds
10 :param int maxQueuedEntries: Queue this many messages before dropping new ones (e.g. when the remote listener closes the connection)
11 :param int reconnectWaitTime: Time in seconds between reconnection attempts
13 .. class:: DNSDistProtoBufMessage
15 This object represents a single protobuf message as emitted by :program:`dnsdist`.
17 .. method:: DNSDistProtoBufMessage:addResponseRR(name, type, class, ttl, blob)
19 .. versionadded:: 1.2.0
21 Add a response RR to the protobuf message.
23 :param string name: The RR name.
24 :param int type: The RR type.
25 :param int class: The RR class.
26 :param int ttl: The RR TTL.
27 :param string blob: The RR binary content.
29 .. method:: DNSDistProtoBufMessage:setBytes(bytes)
31 Set the size of the query
33 :param int bytes: Number of bytes in the query.
35 .. method:: DNSDistProtoBufMessage:setEDNSSubnet(netmask)
37 Set the EDNS Subnet to ``netmask``.
39 :param string netmask: The netmask to set to.
41 .. method:: DNSDistProtoBufMessage:setQueryTime(sec, usec)
43 In a response message, set the time at which the query has been received.
45 :param int sec: Unix timestamp when the query was received.
46 :param int usec: The microsecond the query was received.
48 .. method:: DNSDistProtoBufMessage:setQuestion(name, qtype, qclass)
50 Set the question in the protobuf message.
52 :param DNSName name: The qname of the question
53 :param int qtype: The qtype of the question
54 :param int qclass: The qclass of the question
56 .. method:: DNSDistProtoBufMessage:setProtobufResponseType(sec, usec)
58 .. versionadded:: 1.2.0
60 Change the protobuf response type from a query to a response, and optionally set the query time.
62 :param int sec: Optional query time in seconds.
63 :param int usec: Optional query time in additional micro-seconds.
65 .. method:: DNSDistProtoBufMessage:setRequestor(address [, port])
67 .. versionchanged:: 1.5.0
68 ``port`` optional parameter added.
70 Set the requestor's address.
72 :param ComboAddress address: The address to set to
73 :param int port: The requestor source port
75 .. method:: DNSDistProtoBufMessage:setRequestorFromString(address [, port])
77 .. versionchanged:: 1.5.0
78 ``port`` optional parameter added.
80 Set the requestor's address from a string.
82 :param string address: The address to set to
83 :param int port: The requestor source port
85 .. method:: DNSDistProtoBufMessage:setResponder(address [, port])
87 .. versionchanged:: 1.5.0
88 ``port`` optional parameter added.
90 Set the responder's address.
92 :param ComboAddress address: The address to set to
93 :param int port: The responder port
95 .. method:: DNSDistProtoBufMessage:setResponderFromString(address [, port])
97 .. versionchanged:: 1.5.0
98 ``port`` optional parameter added.
100 Set the responder's address.
102 :param string address: The address to set to
103 :param int port: The responder port
105 .. method:: DNSDistProtoBufMessage:setResponseCode(rcode)
107 Set the response code of the query.
109 :param int rcode: The response code of the answer
111 .. method:: DNSDistProtoBufMessage:setServerIdentity(id)
113 .. versionadded:: 1.3.3
115 Set the server identify field.
117 :param string id: The server ID
119 .. method:: DNSDistProtoBufMessage:setTag(value)
121 .. versionadded:: 1.2.0
123 Add a tag to the list of tags.
125 :param string value: The tag value
127 .. method:: DNSDistProtoBufMessage:setTagArray(valueList)
129 .. versionadded:: 1.2.0
133 :param table tags: A list of tags as strings
135 .. method:: DNSDistProtoBufMessage:setTime(sec, usec)
137 Set the time at which the query or response has been received.
139 :param int sec: Unix timestamp when the query was received.
140 :param int usec: The microsecond the query was received.
142 .. method:: DNSDistProtoBufMessage:toDebugString() -> string
144 Return an string containing the content of the message