summaryrefslogtreecommitdiff
path: root/contrib/python
diff options
context:
space:
mode:
authorDag-Erling Smørgrav <des@FreeBSD.org>2017-02-03 13:01:00 +0000
committerDag-Erling Smørgrav <des@FreeBSD.org>2017-02-03 13:01:00 +0000
commitc6342fe2e90510d8d2296423f2ca92818a7b3d18 (patch)
tree0cc9064980c804a7bf5cc6d96c9249950c7e56a9 /contrib/python
parent65be028f32ed37dce84f6328d4a7172132c8c224 (diff)
Notes
Diffstat (limited to 'contrib/python')
-rw-r--r--contrib/python/Makefile2
-rw-r--r--contrib/python/ldns.i6
-rw-r--r--contrib/python/ldns_key.i2
-rw-r--r--contrib/python/ldns_rdf.i5
-rw-r--r--contrib/python/ldns_resolver.i12
5 files changed, 18 insertions, 9 deletions
diff --git a/contrib/python/Makefile b/contrib/python/Makefile
index debc7d0486d2..172ab20c1a4e 100644
--- a/contrib/python/Makefile
+++ b/contrib/python/Makefile
@@ -34,7 +34,7 @@
help:
@echo "Please use \`make <target>' where <target> is one of"
@echo " testenv to make test environment and run bash "
- @echo " usefull in case you don't want to install ldns but want to test examples"
+ @echo " useful in case you don't want to install ldns but want to test examples"
@echo " doc to make documentation"
@echo " clean clean all"
diff --git a/contrib/python/ldns.i b/contrib/python/ldns.i
index 35e076f8b7cc..0635c0bac83b 100644
--- a/contrib/python/ldns.i
+++ b/contrib/python/ldns.i
@@ -126,6 +126,9 @@ uint32_t ldns_read_timeval_usec(struct timeval* t) {
%immutable ldns_struct_rr_descriptor::_name;
%immutable ldns_error_str;
%immutable ldns_signing_algorithms;
+%immutable ldns_tsig_credentials_struct::algorithm;
+%immutable ldns_tsig_credentials_struct::keyname;
+%immutable ldns_tsig_credentials_struct::keydata;
//*_new_frm_fp_l
%apply int *OUTPUT { (int *line_nr) };
@@ -139,6 +142,8 @@ uint32_t ldns_read_timeval_usec(struct timeval* t) {
%include "ldns_resolver.i"
%include "ldns_rr.i"
+%include <ldns/rr.h>
+
%inline %{
int Python_str_Check(PyObject *o) {
#if PY_VERSION_HEX>=0x03000000
@@ -168,7 +173,6 @@ int Python_str_Check(PyObject *o) {
%include <ldns/packet.h>
%include <ldns/rdata.h>
%include <ldns/resolver.h>
- %include <ldns/rr.h>
%include <ldns/str2host.h>
%include <ldns/tsig.h>
%include <ldns/update.h>
diff --git a/contrib/python/ldns_key.i b/contrib/python/ldns_key.i
index 26a9b0f57fa4..93f09c65f64f 100644
--- a/contrib/python/ldns_key.i
+++ b/contrib/python/ldns_key.i
@@ -116,7 +116,7 @@ This class can contains all types of keys that are used in DNSSEC. Mostly used t
#retvals: ldns_rr *
def print_to_file(self, file):
- """print a private key to the file ouput
+ """print a private key to the file output
:param file: output file pointer
"""
diff --git a/contrib/python/ldns_rdf.i b/contrib/python/ldns_rdf.i
index 7b69d8b21768..22e1c36697ce 100644
--- a/contrib/python/ldns_rdf.i
+++ b/contrib/python/ldns_rdf.i
@@ -221,6 +221,11 @@
case LDNS_RDF_TYPE_EUI64: return "EUI64";
case LDNS_RDF_TYPE_TAG: return "TAG";
case LDNS_RDF_TYPE_LONG_STR: return "LONG_STR";
+ case LDNS_RDF_TYPE_CERTIFICATE_USAGE:
+ return "CERTIFICATE_USAGE";
+ case LDNS_RDF_TYPE_SELECTOR: return "SELECTOR";
+ case LDNS_RDF_TYPE_MATCHING_TYPE:
+ return "MATCHING_TYPE";
}
}
return 0;
diff --git a/contrib/python/ldns_resolver.i b/contrib/python/ldns_resolver.i
index b926e65a81e7..7081ec36ace0 100644
--- a/contrib/python/ldns_resolver.i
+++ b/contrib/python/ldns_resolver.i
@@ -113,9 +113,9 @@
%rename(__ldns_resolver_tsig_algorithm) ldns_resolver_tsig_algorithm;
%inline
%{
- char * _ldns_resolver_tsig_algorithm(const ldns_resolver *res)
+ const char * _ldns_resolver_tsig_algorithm(const ldns_resolver *res)
{
- char *str;
+ const char *str;
str = ldns_resolver_tsig_algorithm(res);
if (str != NULL) {
str = strdup(str);
@@ -128,9 +128,9 @@
%rename(__ldns_resolver_tsig_keydata) ldns_resolver_tsig_keydata;
%inline
%{
- char * _ldns_resolver_tsig_keydata(const ldns_resolver *res)
+ const char * _ldns_resolver_tsig_keydata(const ldns_resolver *res)
{
- char *str;
+ const char *str;
str = ldns_resolver_tsig_keydata(res);
if (str != NULL) {
str = strdup(str);
@@ -143,9 +143,9 @@
%rename(__ldns_resolver_tsig_keyname) ldns_resolver_tsig_keyname;
%inline
%{
- char * _ldns_resolver_tsig_keyname(const ldns_resolver *res)
+ const char * _ldns_resolver_tsig_keyname(const ldns_resolver *res)
{
- char *str;
+ const char *str;
str = ldns_resolver_tsig_keyname(res);
if (str != NULL) {
str = strdup(str);