Alien-cares

 view release on metacpan or  search on metacpan

libcares/README.md  view on Meta::CPAN

c-ares
======

[![Build Status](https://travis-ci.org/c-ares/c-ares.svg?branch=master)](https://travis-ci.org/c-ares/c-ares)
[![Windows Build Status](https://ci.appveyor.com/api/projects/status/03i7151772eq3wn3/branch/master?svg=true)](https://ci.appveyor.com/project/c-ares/c-ares)
[![Coverage Status](https://coveralls.io/repos/c-ares/c-ares/badge.svg?branch=master&service=github)](https://coveralls.io/github/c-ares/c-ares?branch=master)
[![CII Best Practices](https://bestpractices.coreinfrastructure.org/projects/291/badge)](https://bestpractices.coreinfrastructure.org/projects/291)
[![Releases](https://coderelease.io/badge/c-ares/c-ares)](https://coderelease.io/github/repository/c-ares/c-ares)

This is c-ares, an asynchronous resolver library.  It is intended for
applications which need to perform DNS queries without blocking, or need to
perform multiple DNS queries in parallel.  The primary examples of such
applications are servers which communicate with multiple clients and programs
with graphical user interfaces.

The full source code is available in the ['c-ares' release archives](https://c-ares.haxx.se/download/),
and in a git repository: http://github.com/c-ares/c-ares.  See the
[INSTALL.md](INSTALL.md) file for build information.

If you find bugs, correct flaws, have questions or have comments in general in

libcares/acountry.1  view on Meta::CPAN

.SH SYNOPSIS
.B acountry
[\fIOPTION\fR]... \fIHOST\fR...
.SH DESCRIPTION
.PP
.\" Add any additional description here
.PP
Print the country where HOST (an IPv4 address or hostname) is located,
using the countries.nerd.dk DNS domain to identify the country.
.PP
This utility comes with the \fBc\-ares\fR asynchronous resolver library.
.SH OPTIONS
.TP
\fB\-d\fR
Print some extra debugging output.
.TP
\fB\-h\fR, \fB\-\-help\fR
Display this help and exit.
.TP
\fB\-v\fR
Be more verbose. Print extra information.

libcares/adig.1  view on Meta::CPAN

.B adig
[\fIOPTION\fR]... \fINAME\fR...
.SH DESCRIPTION
.PP
.\" Add any additional description here
.PP
Send queries to DNS servers about \fINAME\fR and print received
information, where \fINAME\fR is a valid DNS name (e.g. www.example.com,
1.2.3.10.in-addr.arpa).
.PP
This utility comes with the \fBc\-ares\fR asynchronous resolver library.
.SH OPTIONS
.TP
\fB\-c\fR class
Set the query class.
Possible values for class are
NY, CHAOS, HS, IN (default).
.TP
\fB\-d\fR
Print some extra debugging output.
.TP

libcares/ahost.1  view on Meta::CPAN

.SH SYNOPSIS
.B ahost
[\fIOPTION\fR]... \fIHOST\fR...
.SH DESCRIPTION
.PP
.\" Add any additional description here
.PP
Look up the DNS A or AAAA record associated with HOST (a hostname or an
IP address).
.PP
This utility comes with the \fBc\-ares\fR asynchronous resolver library.
.SH OPTIONS
.TP
\fB\-d\fR
Print some extra debugging output.
.TP
\fB\-h\fR, \fB\-\-help\fR
Display this help and exit.
.TP
\fB\-t\fR type
If type is "a", print the A record (default).

libcares/ares__timeval.c  view on Meta::CPAN

#endif
  return now;
}

#elif defined(HAVE_GETTIMEOFDAY)

struct timeval ares__tvnow(void)
{
  /*
  ** gettimeofday() is not granted to be increased monotonically, due to
  ** clock drifting and external source time synchronization it can jump
  ** forward or backward in time.
  */
  struct timeval now;
  (void)gettimeofday(&now, NULL);
  return now;
}

#else

struct timeval ares__tvnow(void)

libcares/ares_gethostbyname_file.3  view on Meta::CPAN

.PP
.B int ares_gethostbyname_file(ares_channel \fIchannel\fP, const char *\fIname\fP,
.B 	int \fIfamily\fP, struct hostent **host)
.fi
.SH DESCRIPTION
The
.B ares_gethostbyname_file
function performs a host lookup by name against the system's hosts file (or equivalent local hostname database).  
The
.IR channel
parameter is required, but no asynchronous queries are performed.  Instead, the
lookup is done via the same mechanism used to perform 'f' lookups
(see the
.I lookups
options field in \fIares_init_options(3)\fP).
The parameter
.I name
gives the hostname as a NUL-terminated C string, and
.I family
gives the desired type of address for the resulting host entry.  
.PP

libcares/ares_platform.c  view on Meta::CPAN

{"brlp-0",             {NULL}, 4101, "tcp"},
{"brlp-0",             {NULL}, 4101, "udp"},
{"brlp-1",             {NULL}, 4102, "tcp"},
{"brlp-1",             {NULL}, 4102, "udp"},
{"brlp-2",             {NULL}, 4103, "tcp"},
{"brlp-2",             {NULL}, 4103, "udp"},
{"brlp-3",             {NULL}, 4104, "tcp"},
{"brlp-3",             {NULL}, 4104, "udp"},
{"shofarplayer",       {NULL}, 4105, "tcp"},
{"shofarplayer",       {NULL}, 4105, "udp"},
{"synchronite",        {NULL}, 4106, "tcp"},
{"synchronite",        {NULL}, 4106, "udp"},
{"j-ac",               {NULL}, 4107, "tcp"},
{"j-ac",               {NULL}, 4107, "udp"},
{"accel",              {NULL}, 4108, "tcp"},
{"accel",              {NULL}, 4108, "udp"},
{"izm",                {NULL}, 4109, "tcp"},
{"izm",                {NULL}, 4109, "udp"},
{"g2tag",              {NULL}, 4110, "tcp"},
{"g2tag",              {NULL}, 4110, "udp"},
{"xgrid",              {NULL}, 4111, "tcp"},
{"xgrid",              {NULL}, 4111, "udp"},

libcares/ares_platform.c  view on Meta::CPAN

{"wssauthsvc",         {NULL}, 4537, "tcp"},
{"wssauthsvc",         {NULL}, 4537, "udp"},
{"swx-gate",           {NULL}, 4538, "tcp"},
{"swx-gate",           {NULL}, 4538, "udp"},
{"worldscores",        {NULL}, 4545, "tcp"},
{"worldscores",        {NULL}, 4545, "udp"},
{"sf-lm",              {NULL}, 4546, "tcp"},
{"sf-lm",              {NULL}, 4546, "udp"},
{"lanner-lm",          {NULL}, 4547, "tcp"},
{"lanner-lm",          {NULL}, 4547, "udp"},
{"synchromesh",        {NULL}, 4548, "tcp"},
{"synchromesh",        {NULL}, 4548, "udp"},
{"aegate",             {NULL}, 4549, "tcp"},
{"aegate",             {NULL}, 4549, "udp"},
{"gds-adppiw-db",      {NULL}, 4550, "tcp"},
{"gds-adppiw-db",      {NULL}, 4550, "udp"},
{"ieee-mih",           {NULL}, 4551, "tcp"},
{"ieee-mih",           {NULL}, 4551, "udp"},
{"menandmice-mon",     {NULL}, 4552, "tcp"},
{"menandmice-mon",     {NULL}, 4552, "udp"},
{"icshostsvc",         {NULL}, 4553, "tcp"},
{"msfrs",              {NULL}, 4554, "tcp"},

libcares/ares_platform.c  view on Meta::CPAN

{"dpm-acm",            {NULL}, 6075, "tcp"},
{"miami-bcast",        {NULL}, 6083, "udp"},
{"p2p-sip",            {NULL}, 6084, "tcp"},
{"konspire2b",         {NULL}, 6085, "tcp"},
{"konspire2b",         {NULL}, 6085, "udp"},
{"pdtp",               {NULL}, 6086, "tcp"},
{"pdtp",               {NULL}, 6086, "udp"},
{"ldss",               {NULL}, 6087, "tcp"},
{"ldss",               {NULL}, 6087, "udp"},
{"raxa-mgmt",          {NULL}, 6099, "tcp"},
{"synchronet-db",      {NULL}, 6100, "tcp"},
{"synchronet-db",      {NULL}, 6100, "udp"},
{"synchronet-rtc",     {NULL}, 6101, "tcp"},
{"synchronet-rtc",     {NULL}, 6101, "udp"},
{"synchronet-upd",     {NULL}, 6102, "tcp"},
{"synchronet-upd",     {NULL}, 6102, "udp"},
{"rets",               {NULL}, 6103, "tcp"},
{"rets",               {NULL}, 6103, "udp"},
{"dbdb",               {NULL}, 6104, "tcp"},
{"dbdb",               {NULL}, 6104, "udp"},
{"primaserver",        {NULL}, 6105, "tcp"},
{"primaserver",        {NULL}, 6105, "udp"},
{"mpsserver",          {NULL}, 6106, "tcp"},
{"mpsserver",          {NULL}, 6106, "udp"},
{"etc-control",        {NULL}, 6107, "tcp"},
{"etc-control",        {NULL}, 6107, "udp"},

libcares/ares_set_socket_functions.3  view on Meta::CPAN

.PP
This function sets a set of callback \fIfunctions\fP in the given ares channel handle.
These callback functions will be invoked to create/destroy socket objects and perform
io, instead of the normal system calls. A client application can override normal network
operation fully through this functionality, and provide its own transport layer.
.PP
All callback functions are expected to operate like their system equivalents, and to
set
.BR errno(3)
to an appropriate error code on failure. C-ares also expects all io functions to behave
asynchronously, i.e. as if the socket object has been set to non-blocking mode. Thus
read/write calls (for TCP connections) are expected to often generate
.BR EAGAIN
or
.BR EWOULDBLOCK.

.PP
The \fIuser_data\fP value is provided to each callback function invocation to serve as
context.
.PP
The

libcares/libcares.pc.cmake  view on Meta::CPAN

#              | (_|_____| (_| | | |  __/\__ \
#               \___|     \__,_|_|  \___||___/
#
prefix=@CMAKE_INSTALL_PREFIX@
exec_prefix=${prefix}/@CMAKE_INSTALL_BINDIR@
libdir=${prefix}/@CMAKE_INSTALL_LIBDIR@
includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@

Name: c-ares
URL: https://c-ares.haxx.se/
Description: asynchronous DNS lookup library
Version: @CARES_VERSION@
Requires: 
Requires.private: 
Cflags: -I${includedir} @CPPFLAG_CARES_STATICLIB@
Libs: -L${libdir} -lcares
Libs.private: @CARES_PRIVATE_LIBS@

libcares/libcares.pc.in  view on Meta::CPAN

#              | (_|_____| (_| | | |  __/\__ \
#               \___|     \__,_|_|  \___||___/
#
prefix=@prefix@
exec_prefix=@exec_prefix@
libdir=@libdir@
includedir=@includedir@

Name: c-ares
URL: http://daniel.haxx.se/projects/c-ares/
Description: asynchronous DNS lookup library
Version: @VERSION@
Requires: 
Requires.private: 
Cflags: -I${includedir} @CPPFLAG_CARES_STATICLIB@
Libs: -L${libdir} -lcares
Libs.private: @CARES_PRIVATE_LIBS@

libcares/m4/ax_check_user_namespace.m4  view on Meta::CPAN

#define _GNU_SOURCE
#include <fcntl.h>
#include <sched.h>
#include <signal.h>
#include <stdio.h>
#include <string.h>
#include <sys/types.h>
#include <sys/wait.h>

int userfn(void *d) {
  usleep(100000);  /* synchronize by sleep */
  return (getuid() != 0);
}
char userst[1024*1024];
int main() {
  char buffer[1024];
  int rc, status, fd;
  pid_t child = clone(userfn, userst + 1024*1024, CLONE_NEWUSER|SIGCHLD, 0);
  if (child < 0) return 1;

  sprintf(buffer, "/proc/%d/uid_map", child);

libcares/m4/ax_check_uts_namespace.m4  view on Meta::CPAN

  int rc = sethostname(name, strlen(name));
  if (rc != 0) return 1;
  gethostname(buffer, 1024);
  return (strcmp(buffer, name) != 0);
}

char st2[1024*1024];
int fn(void *d) {
  pid_t child;
  int rc, status;
  usleep(100000);  /* synchronize by sleep */
  if (getuid() != 0) return 1;
  child = clone(utsfn, st2 + 1024*1024, CLONE_NEWUTS|SIGCHLD, 0);
  if (child < 0) return 1;
  rc = waitpid(child, &status, 0);
  if (rc <= 0) return 1;
  if (!WIFEXITED(status)) return 1;
  return WEXITSTATUS(status);
}
char st[1024*1024];
int main() {

libcares/test/configure  view on Meta::CPAN

#define _GNU_SOURCE
#include <fcntl.h>
#include <sched.h>
#include <signal.h>
#include <stdio.h>
#include <string.h>
#include <sys/types.h>
#include <sys/wait.h>

int userfn(void *d) {
  usleep(100000);  /* synchronize by sleep */
  return (getuid() != 0);
}
char userst[1024*1024];
int main() {
  char buffer[1024];
  int rc, status, fd;
  pid_t child = clone(userfn, userst + 1024*1024, CLONE_NEWUSER|SIGCHLD, 0);
  if (child < 0) return 1;

  sprintf(buffer, "/proc/%d/uid_map", child);

libcares/test/configure  view on Meta::CPAN

  int rc = sethostname(name, strlen(name));
  if (rc != 0) return 1;
  gethostname(buffer, 1024);
  return (strcmp(buffer, name) != 0);
}

char st2[1024*1024];
int fn(void *d) {
  pid_t child;
  int rc, status;
  usleep(100000);  /* synchronize by sleep */
  if (getuid() != 0) return 1;
  child = clone(utsfn, st2 + 1024*1024, CLONE_NEWUTS|SIGCHLD, 0);
  if (child < 0) return 1;
  rc = waitpid(child, &status, 0);
  if (rc <= 0) return 1;
  if (!WIFEXITED(status)) return 1;
  return WEXITSTATUS(status);
}
char st[1024*1024];
int main() {

libcares/test/gmock-1.8.0/gmock-gtest-all.cc  view on Meta::CPAN


  // The child has acquired the write end of the pipe or exited.
  // We release the handle on our side and continue.
  write_handle_.Reset();
  event_handle_.Reset();

  ReadAndInterpretStatusByte();

  // Waits for the child process to exit if it haven't already. This
  // returns immediately if the child has already exited, regardless of
  // whether previous calls to WaitForMultipleObjects synchronized on this
  // handle or not.
  GTEST_DEATH_TEST_CHECK_(
      WAIT_OBJECT_0 == ::WaitForSingleObject(child_handle_.Get(),
                                             INFINITE));
  DWORD status_code;
  GTEST_DEATH_TEST_CHECK_(
      ::GetExitCodeProcess(child_handle_.Get(), &status_code) != FALSE);
  child_handle_.Reset();
  set_status(static_cast<int>(status_code));
  return status();

libcares/test/gmock-1.8.0/gmock-gtest-all.cc  view on Meta::CPAN

  }

  int pipe_fd[2];
  GTEST_DEATH_TEST_CHECK_(pipe(pipe_fd) != -1);

  DeathTest::set_last_death_test_message("");
  CaptureStderr();
  // When we fork the process below, the log file buffers are copied, but the
  // file descriptors are shared.  We flush all log files here so that closing
  // the file descriptors in the child process doesn't throw off the
  // synchronization between descriptors and buffers in the parent process.
  // This is as close to the fork as possible to avoid a race condition in case
  // there are multiple threads running before the death test, and another
  // thread writes to the log file.
  FlushInfoLog();

  const pid_t child_pid = fork();
  GTEST_DEATH_TEST_CHECK_(child_pid != -1);
  set_child_pid(child_pid);
  if (child_pid == 0) {
    GTEST_DEATH_TEST_CHECK_SYSCALL_(close(pipe_fd[0]));

libcares/test/gmock-1.8.0/gmock-gtest-all.cc  view on Meta::CPAN

      posix::Abort();
    }
  }
};

// Returns the global failure reporter.  Will create a
// GoogleTestFailureReporter and return it the first time called.
GTEST_API_ FailureReporterInterface* GetFailureReporter() {
  // Points to the global failure reporter used by Google Mock.  gcc
  // guarantees that the following use of failure_reporter is
  // thread-safe.  We may need to add additional synchronization to
  // protect failure_reporter if we port Google Mock to other
  // compilers.
  static FailureReporterInterface* const failure_reporter =
      new GoogleTestFailureReporter();
  return failure_reporter;
}

// Protects global resources (stdout in particular) used by Log().
static GTEST_DEFINE_STATIC_MUTEX_(g_log_mutex);

libcares/test/gmock-1.8.0/gtest/gtest.h  view on Meta::CPAN

//                                        suppressed (constant conditional).
//   GTEST_INTENTIONAL_CONST_COND_POP_  - finish code section where MSVC C4127
//                                        is suppressed.
//
// C++11 feature wrappers:
//
//   testing::internal::move  - portability wrapper for std::move.
//
// Synchronization:
//   Mutex, MutexLock, ThreadLocal, GetThreadCount()
//                            - synchronization primitives.
//
// Template meta programming:
//   is_pointer     - as in TR1; needed on Symbian and IBM XL C/C++ only.
//   IteratorTraits - partial implementation of std::iterator_traits, which
//                    is not available in libCstd when compiled with Sun C++.
//
// Smart pointers:
//   scoped_ptr     - as in TR2.
//
// Regular expressions:

libcares/test/gmock-1.8.0/gtest/gtest.h  view on Meta::CPAN


#if GTEST_HAS_DEATH_TEST

const ::std::vector<testing::internal::string>& GetInjectableArgvs();
void SetInjectableArgvs(const ::std::vector<testing::internal::string>*
                             new_argvs);


#endif  // GTEST_HAS_DEATH_TEST

// Defines synchronization primitives.
#if GTEST_IS_THREADSAFE
# if GTEST_HAS_PTHREAD
// Sleeps for (roughly) n milliseconds.  This function is only for testing
// Google Test's own constructs.  Don't use it in user tests, either
// directly or indirectly.
inline void SleepMilliseconds(int n) {
  const timespec time = {
    0,                  // 0 seconds.
    n * 1000L * 1000L,  // And n ms.
  };

libcares/test/gmock-1.8.0/gtest/gtest.h  view on Meta::CPAN

  const pthread_key_t key_;
  scoped_ptr<ValueHolderFactory> default_factory_;

  GTEST_DISALLOW_COPY_AND_ASSIGN_(ThreadLocal);
};

# endif  // GTEST_HAS_MUTEX_AND_THREAD_LOCAL_

#else  // GTEST_IS_THREADSAFE

// A dummy implementation of synchronization primitives (mutex, lock,
// and thread-local variable).  Necessary for compiling Google Test where
// mutex is not supported - using Google Test in multiple threads is not
// supported on such platforms.

class Mutex {
 public:
  Mutex() {}
  void Lock() {}
  void Unlock() {}
  void AssertHeld() const {}



( run in 0.344 second using v1.01-cache-2.11-cpan-0d8aa00de5b )