From 9c9d011eed674ddd7e4a0a148691887afb9e75cd Mon Sep 17 00:00:00 2001 From: Dag-Erling Smørgrav Date: Wed, 6 Feb 2019 12:31:02 +0000 Subject: Vendor import of Unbound 1.9.0. --- pythonmod/doc/modules/functions.rst | 33 +++++++++++++++++++++++++++++---- pythonmod/doc/modules/struct.rst | 30 ++++++++++++++++++++++++++++++ 2 files changed, 59 insertions(+), 4 deletions(-) (limited to 'pythonmod/doc') diff --git a/pythonmod/doc/modules/functions.rst b/pythonmod/doc/modules/functions.rst index 49ea7bfa45f0..43c66eb380dd 100644 --- a/pythonmod/doc/modules/functions.rst +++ b/pythonmod/doc/modules/functions.rst @@ -103,42 +103,67 @@ Inplace callbacks :param opt_list_out: :class:`edns_option`. EDNS option list to append options to. :param region: :class:`regional` -.. function:: register_inplace_cb_reply(py_cb, env) +.. function:: inplace_cb_query(qinfo, flags, qstate, addr, zone, region) + + Function prototype for callback functions used in + `register_inplace_cb_query`_. + + :param qinfo: :class:`query_info` + :param flags: query flags (integer) + :param qstate: :class:`module_qstate` + :param addr: :class:`sockaddr_storage` + :param zone: zone name in wire format (bytes) + :param region: :class:`regional` + +.. function:: register_inplace_cb_reply(py_cb, env, id) Register py_cb as an inplace reply callback function. :param py_cb: Python function that follows `inplace_cb_reply`_'s prototype. **Must** be callable. :param env: :class:`module_env` + :param id: Module ID. :return: True on success, False otherwise :rtype: boolean -.. function:: register_inplace_cb_reply_cache(py_cb, env) +.. function:: register_inplace_cb_reply_cache(py_cb, env, id) Register py_cb as an inplace reply_cache callback function. :param py_cb: Python function that follows `inplace_cb_reply`_'s prototype. **Must** be callable. :param env: :class:`module_env` + :param id: Module ID. :return: True on success, False otherwise :rtype: boolean -.. function:: register_inplace_cb_reply_local(py_cb, env) +.. function:: register_inplace_cb_reply_local(py_cb, env, id) Register py_cb as an inplace reply_local callback function. :param py_cb: Python function that follows `inplace_cb_reply`_'s prototype. **Must** be callable. :param env: :class:`module_env` + :param id: Module ID. :return: True on success, False otherwise :rtype: boolean -.. function:: register_inplace_cb_reply_servfail(py_cb, env) +.. function:: register_inplace_cb_reply_servfail(py_cb, env, id) Register py_cb as an inplace reply_servfail callback function. :param py_cb: Python function that follows `inplace_cb_reply`_'s prototype. **Must** be callable. :param env: :class:`module_env` + :param id: Module ID. :return: True on success, False otherwise :rtype: boolean +.. function:: register_inplace_cb_query(py_cb, env, id) + + Register py_cb as an inplace query callback function. + + :param py_cb: Python function that follows `inplace_cb_query`_'s prototype. **Must** be callable. + :param env: :class:`module_env` + :param id: Module ID. + :return: True on success, False otherwise + :rtype: boolean Logging ------- diff --git a/pythonmod/doc/modules/struct.rst b/pythonmod/doc/modules/struct.rst index c74298b8b75d..de7c084e9008 100644 --- a/pythonmod/doc/modules/struct.rst +++ b/pythonmod/doc/modules/struct.rst @@ -514,3 +514,33 @@ pythonmod_qstate Here you can keep your own private data (each thread has own data object). +sockaddr_storage +------------------------- + +.. class:: sockaddr_storage + + The :class:`sockaddr_storage` provides these data attributes: + + .. attribute:: family + + Address family name as a string. Possible values are `ip4`, `ip6`, and `unix`. + + .. attribute:: addr + + Address in presentation format. + + .. attribute:: raw_addr + + Address in network wire format. + + .. attribute:: port + + Port number. Invalid for Unix address. + + .. attribute:: flowinfo + + Flow info value. Valid only for IPv6 address. + + .. attribute:: scope_id + + Scope ID value. Valid only for IPv6 address. -- cgit v1.3