#include "ares_setup.h"
#include <assert.h>
#include <limits.h>
#include "ares.h"
#include "ares_private.h"
Go to the source code of this file.
Classes | |
struct | addrinfo_sort_elem |
Macros | |
#define | ARES_IN6_IS_ADDR_6BONE(a) (((a)->s6_addr[0] == 0x3f) && ((a)->s6_addr[1] == 0xfe)) |
#define | ARES_IN6_IS_ADDR_6TO4(a) (((a)->s6_addr[0] == 0x20) && ((a)->s6_addr[1] == 0x02)) |
#define | ARES_IN6_IS_ADDR_TEREDO(a) ((*(const unsigned int *)(const void *)(&(a)->s6_addr[0]) == ntohl(0x20010000))) |
#define | ARES_IN6_IS_ADDR_ULA(a) (((a)->s6_addr[0] & 0xfe) == 0xfc) |
#define | ARES_IN_LOOPBACK(a) ((((long int)(a)) & 0xff000000) == 0x7f000000) |
#define | ARES_IPV6_ADDR_MC_SCOPE(a) ((a)->s6_addr[1] & 0x0f) |
#define | ARES_IPV6_ADDR_SCOPE_GLOBAL 0x0e |
#define | ARES_IPV6_ADDR_SCOPE_INTFACELOCAL 0x01 |
#define | ARES_IPV6_ADDR_SCOPE_LINKLOCAL 0x02 |
#define | ARES_IPV6_ADDR_SCOPE_NODELOCAL 0x01 |
#define | ARES_IPV6_ADDR_SCOPE_ORGLOCAL 0x08 |
#define | ARES_IPV6_ADDR_SCOPE_SITELOCAL 0x05 |
Functions | |
int | ares__sortaddrinfo (ares_channel channel, struct ares_addrinfo_node *list_sentinel) |
static int | common_prefix_len (const struct in6_addr *a1, const struct in6_addr *a2) |
static int | find_src_addr (ares_channel channel, const struct sockaddr *addr, struct sockaddr *src_addr) |
static int | get_label (const struct sockaddr *addr) |
static int | get_precedence (const struct sockaddr *addr) |
static int | get_scope (const struct sockaddr *addr) |
static int | rfc6724_compare (const void *ptr1, const void *ptr2) |
Definition at line 85 of file ares__sortaddrinfo.c.
Definition at line 82 of file ares__sortaddrinfo.c.
#define ARES_IN6_IS_ADDR_TEREDO | ( | a | ) | ((*(const unsigned int *)(const void *)(&(a)->s6_addr[0]) == ntohl(0x20010000))) |
Definition at line 79 of file ares__sortaddrinfo.c.
Definition at line 75 of file ares__sortaddrinfo.c.
Definition at line 72 of file ares__sortaddrinfo.c.
Definition at line 63 of file ares__sortaddrinfo.c.
#define ARES_IPV6_ADDR_SCOPE_GLOBAL 0x0e |
Definition at line 70 of file ares__sortaddrinfo.c.
#define ARES_IPV6_ADDR_SCOPE_INTFACELOCAL 0x01 |
Definition at line 66 of file ares__sortaddrinfo.c.
#define ARES_IPV6_ADDR_SCOPE_LINKLOCAL 0x02 |
Definition at line 67 of file ares__sortaddrinfo.c.
#define ARES_IPV6_ADDR_SCOPE_NODELOCAL 0x01 |
Definition at line 65 of file ares__sortaddrinfo.c.
#define ARES_IPV6_ADDR_SCOPE_ORGLOCAL 0x08 |
Definition at line 69 of file ares__sortaddrinfo.c.
#define ARES_IPV6_ADDR_SCOPE_SITELOCAL 0x05 |
Definition at line 68 of file ares__sortaddrinfo.c.
int ares__sortaddrinfo | ( | ares_channel | channel, |
struct ares_addrinfo_node * | list_sentinel | ||
) |
Definition at line 443 of file ares__sortaddrinfo.c.
Definition at line 256 of file ares__sortaddrinfo.c.
|
static |
Definition at line 384 of file ares__sortaddrinfo.c.
Definition at line 145 of file ares__sortaddrinfo.c.
Definition at line 206 of file ares__sortaddrinfo.c.
Definition at line 89 of file ares__sortaddrinfo.c.
Definition at line 286 of file ares__sortaddrinfo.c.