Tree @HEAD (Download .tar.gz)
- builder-support
- debian
- ext
- html
- m4
- src_js
- aclocal.m4
- ascii.hh
- base64.hh
- bpf-filter.cc
- bpf-filter.ebpf.src
- bpf-filter.hh
- bpf-filter.main.ebpf
- bpf-filter.qname.ebpf
- cachecleaner.hh
- capabilities.cc
- capabilities.hh
- cdb.cc
- cdb.hh
- circular_buffer.hh
- compile
- config.guess
- config.h.in
- config.sub
- configure
- configure.ac
- connection-management.hh
- COPYING
- credentials.cc
- credentials.hh
- delaypipe.cc
- delaypipe.hh
- depcomp
- devpollmplexer.cc
- dns.cc
- dns.hh
- dnscrypt.cc
- dnscrypt.hh
- dnsdist-backend.cc
- dnsdist-cache.cc
- dnsdist-cache.hh
- dnsdist-carbon.cc
- dnsdist-console.cc
- dnsdist-console.hh
- dnsdist-dnscrypt.cc
- dnsdist-dynblocks.cc
- dnsdist-dynblocks.hh
- dnsdist-dynbpf.cc
- dnsdist-dynbpf.hh
- dnsdist-ecs.cc
- dnsdist-ecs.hh
- dnsdist-healthchecks.cc
- dnsdist-healthchecks.hh
- dnsdist-idstate.cc
- dnsdist-idstate.hh
- dnsdist-kvs.cc
- dnsdist-kvs.hh
- dnsdist-lbpolicies.cc
- dnsdist-lbpolicies.hh
- dnsdist-lua-actions.cc
- dnsdist-lua-bindings-dnscrypt.cc
- dnsdist-lua-bindings-dnsquestion.cc
- dnsdist-lua-bindings-kvs.cc
- dnsdist-lua-bindings-packetcache.cc
- dnsdist-lua-bindings-protobuf.cc
- dnsdist-lua-bindings.cc
- dnsdist-lua-ffi-interface.h
- dnsdist-lua-ffi-interface.inc
- dnsdist-lua-ffi.cc
- dnsdist-lua-ffi.hh
- dnsdist-lua-inspection-ffi.cc
- dnsdist-lua-inspection-ffi.hh
- dnsdist-lua-inspection.cc
- dnsdist-lua-rules.cc
- dnsdist-lua-vars.cc
- dnsdist-lua-web.cc
- dnsdist-lua.cc
- dnsdist-lua.hh
- DNSDIST-MIB.txt
- dnsdist-nghttp2.cc
- dnsdist-nghttp2.hh
- dnsdist-prometheus.hh
- dnsdist-protobuf.cc
- dnsdist-protobuf.hh
- dnsdist-protocols.cc
- dnsdist-protocols.hh
- dnsdist-proxy-protocol.cc
- dnsdist-proxy-protocol.hh
- dnsdist-rings.cc
- dnsdist-rings.hh
- dnsdist-rules.cc
- dnsdist-rules.hh
- dnsdist-secpoll.cc
- dnsdist-secpoll.hh
- dnsdist-session-cache.cc
- dnsdist-session-cache.hh
- dnsdist-snmp.cc
- dnsdist-snmp.hh
- dnsdist-svc.cc
- dnsdist-svc.hh
- dnsdist-systemd.cc
- dnsdist-systemd.hh
- dnsdist-tcp-downstream.cc
- dnsdist-tcp-downstream.hh
- dnsdist-tcp-upstream.hh
- dnsdist-tcp.cc
- dnsdist-tcp.hh
- dnsdist-web.cc
- dnsdist-web.hh
- dnsdist-xpf.cc
- dnsdist-xpf.hh
- dnsdist.1
- dnsdist.cc
- dnsdist.hh
- dnsdist.service.in
- dnsdistconf.lua
- dnslabeltext.cc
- dnslabeltext.rl
- dnsmessage.proto
- dnsname.cc
- dnsname.hh
- dnsparser.cc
- dnsparser.hh
- dnstap.cc
- dnstap.hh
- dnstap.proto
- dnswriter.cc
- dnswriter.hh
- doh.cc
- doh.hh
- dolog.hh
- ednscookies.cc
- ednscookies.hh
- ednsoptions.cc
- ednsoptions.hh
- ednssubnet.cc
- ednssubnet.hh
- epollmplexer.cc
- fstrm_logger.cc
- fstrm_logger.hh
- gettime.cc
- gettime.hh
- htmlfiles.h
- incfiles
- install-sh
- ipcipher.cc
- ipcipher.hh
- iputils.cc
- iputils.hh
- kqueuemplexer.cc
- libssl.cc
- libssl.hh
- lock.hh
- ltmain.sh
- lua_hpp.mk
- Makefile.am
- Makefile.in
- misc.cc
- misc.hh
- missing
- mplexer.hh
- namespaces.hh
- noinitvector.hh
- packetcache.hh
- pdnsexception.hh
- pollmplexer.cc
- portsmplexer.cc
- protozero.cc
- protozero.hh
- proxy-protocol.cc
- proxy-protocol.hh
- qtype.cc
- qtype.hh
- README
- README.md
- remote_logger.cc
- remote_logger.hh
- sholder.hh
- snmp-agent.cc
- snmp-agent.hh
- sodcrypto.cc
- sodcrypto.hh
- sstuff.hh
- stat_t.hh
- statnode.cc
- statnode.hh
- svc-records.cc
- svc-records.hh
- tcpiohandler-mplexer.hh
- tcpiohandler.cc
- tcpiohandler.hh
- test-base64_cc.cc
- test-connectionmanagement_hh.cc
- test-credentials_cc.cc
- test-delaypipe_hh.cc
- test-dnscrypt_cc.cc
- test-dnsdist-connections-cache.cc
- test-dnsdist_cc.cc
- test-dnsdistdynblocks_hh.cc
- test-dnsdistkvs_cc.cc
- test-dnsdistlbpolicies_cc.cc
- test-dnsdistnghttp2_cc.cc
- test-dnsdistpacketcache_cc.cc
- test-dnsdistrings_cc.cc
- test-dnsdistrules_cc.cc
- test-dnsdistsvc_cc.cc
- test-dnsdisttcp_cc.cc
- test-dnsparser_cc.cc
- test-driver
- test-iputils_hh.cc
- test-luawrapper.cc
- test-mplexer.cc
- test-proxy_protocol_cc.cc
- testrunner.cc
- threadname.cc
- threadname.hh
- uuid-utils.cc
- uuid-utils.hh
- xpf.cc
- xpf.hh
dnsdist-lua-inspection-ffi.cc @HEAD — raw · history · blame
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 | /* * This file is part of PowerDNS or dnsdist. * Copyright -- PowerDNS.COM B.V. and its contributors * * This program is free software; you can redistribute it and/or modify * it under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation. * * In addition, for the avoidance of any doubt, permission is granted to * link this program with OpenSSL and to (re)distribute the binaries * produced as the result of such linking. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #include "dnsdist.hh" #include "dnsdist-dynblocks.hh" uint64_t dnsdist_ffi_stat_node_get_queries_count(const dnsdist_ffi_stat_node_t* node) { return node->self.queries; } uint64_t dnsdist_ffi_stat_node_get_noerrors_count(const dnsdist_ffi_stat_node_t* node) { return node->self.noerrors; } uint64_t dnsdist_ffi_stat_node_get_nxdomains_count(const dnsdist_ffi_stat_node_t* node) { return node->self.nxdomains; } uint64_t dnsdist_ffi_stat_node_get_servfails_count(const dnsdist_ffi_stat_node_t* node) { return node->self.servfails; } uint64_t dnsdist_ffi_stat_node_get_drops_count(const dnsdist_ffi_stat_node_t* node) { return node->self.drops; } uint64_t dnsdist_ffi_stat_node_get_bytes(const dnsdist_ffi_stat_node_t* node) { return node->self.bytes; } unsigned int dnsdist_ffi_stat_node_get_labels_count(const dnsdist_ffi_stat_node_t* node) { return node->node.labelsCount; } void dnsdist_ffi_stat_node_get_full_name_raw(const dnsdist_ffi_stat_node_t* node, const char** name, size_t* nameSize) { const auto& storage = node->node.fullname; *name = storage.c_str(); *nameSize = storage.size(); } unsigned int dnsdist_ffi_stat_node_get_children_count(const dnsdist_ffi_stat_node_t* node) { return node->node.children.size(); } uint64_t dnsdist_ffi_stat_node_get_children_queries_count(const dnsdist_ffi_stat_node_t* node) { return node->children.queries; } uint64_t dnsdist_ffi_stat_node_get_children_noerrors_count(const dnsdist_ffi_stat_node_t* node) { return node->children.noerrors; } uint64_t dnsdist_ffi_stat_node_get_children_nxdomains_count(const dnsdist_ffi_stat_node_t* node) { return node->children.nxdomains; } uint64_t dnsdist_ffi_stat_node_get_children_servfails_count(const dnsdist_ffi_stat_node_t* node) { return node->children.servfails; } uint64_t dnsdist_ffi_stat_node_get_children_drops_count(const dnsdist_ffi_stat_node_t* node) { return node->children.drops; } uint64_t dnsdist_ffi_stat_node_get_children_bytes_count(const dnsdist_ffi_stat_node_t* node) { return node->children.bytes; } void dnsdist_ffi_state_node_set_reason(dnsdist_ffi_stat_node_t* node, const char* reason, size_t reasonSize) { node->reason = std::string(reason, reasonSize); } |