use diagnostics; use strict; # This is dumb, but glibc doesn't like to do hostname lookups w/o libc.so #TODO TODO sub doQuery { # my ($query, $queryType, $domainName, $ipNum) = @_; # # _res.retry = 2; # # len = res_search(query, C_IN, queryType, (void *) &response, # sizeof(response)); # if (len <= 0) return -1; # # if (ntohs(response.hdr.rcode) != NOERROR) return -1; # ancount = ntohs(response.hdr.ancount); # if (ancount < 1) return -1; # # data = response.buf + sizeof(HEADER); # end = response.buf + len; # # # skip the question # data += dn_skipname(data, end) + QFIXEDSZ; # # # parse the answer(s) # while (--ancount >= 0 && data < end) { # # # skip the domain name portion of the RR record # data += dn_skipname(data, end); # # # get RR information # GETSHORT(type, data); # data += INT16SZ; # skipp class # data += INT32SZ; # skipp TTL # GETSHORT(len, data); # # if (type == T_PTR) { # # we got a pointer # len = dn_expand(response.buf, end, data, name, sizeof(name)); # if (len <= 0) return -1; # if (queryType == T_PTR && domainName) { # # we wanted a pointer # *domainName = malloc(strlen(name) + 1); # strcpy(*domainName, name); # return 0; # } # } else if (type == T_A) { # # we got an address # if (queryType == T_A && ipNum) { # # we wanted an address # memcpy(ipNum, data, sizeof(*ipNum)); # return 0; # } # } # # # move ahead to next RR # data += len; # } # # return -1; } cf626f21e12722dfda4b9d321a56ad7'>treecommitdiffstats
path: root/phpBB/phpbb/db/ssh:/git@git.mageia.org/software/drakx-net
diff options
context:
space:
mode:
authorJakub Senko <jakubsenko@gmail.com>2016-11-21 16:45:56 +0100
committerJakub Senko <jakubsenko@gmail.com>2016-11-21 16:45:56 +0100
commit255368843cf626f21e12722dfda4b9d321a56ad7 (patch)
tree79ea244f2b8c2bf11f4de7aa4e5440bdb01f1c8f /phpBB/phpbb/db/ssh:/git@git.mageia.org/software/drakx-net
parentdbd9c1f242ae7c7660feddf2677d41aa82bd21b4 (diff)
downloadforums-255368843cf626f21e12722dfda4b9d321a56ad7.tar
forums-255368843cf626f21e12722dfda4b9d321a56ad7.tar.gz
forums-255368843cf626f21e12722dfda4b9d321a56ad7.tar.bz2
forums-255368843cf626f21e12722dfda4b9d321a56ad7.tar.xz
forums-255368843cf626f21e12722dfda4b9d321a56ad7.zip
[ticket/14522] Add ucp_register_buttons_before
PHPBB3-14522
Diffstat (limited to 'phpBB/phpbb/db/ssh:/git@git.mageia.org/software/drakx-net')
0 files changed, 0 insertions, 0 deletions