|
XenevaOS
|
#include <stdlib.h>#include <sys/netdb.h>#include <sys/socket.h>#include <string.h>#include <arpa/inet.h>#include <sys/iocodes.h>#include <stdio.h>#include <sys/_keproc.h>#include <sys/_kefile.h>#include <sys/_ketime.h>#include <stdint.h>
Classes | |
| struct | XeDnsAddr |
| struct | XeDnsResult |
| struct | XeDnsCacheEntry |
Macros | |
| #define | DNS_QTYPE_A 1 |
| #define | DNS_QTYPE_AAAA 28 |
| #define | DNS_QCLASS_IN 1 |
| #define | DNS_TIMEOUT_MS 3000 |
| #define | DNS_POLL_MS 100 |
| #define | DNS_ROUTE_WAIT_MS 10000 /* wait for DHCP default route */ |
| #define | DNS_ROUTE_RETRY_MS 500 |
| #define | DNS_MAX_ADDRS 8 |
| #define | DNS_CACHE_SLOTS 32 |
| #define | DNS_NAME_MAX 256 |
| #define | DNS_TTL_CAP_S 60 |
| #define | DNS_NEG_TTL_S 5 |
Functions | |
| int | xe_hosts_lookup (const char *name, int *out_n, int *out_families, uint8_t out_addrs[][16], int maxn) |
| ssize_t | recv (int sockfd, void *buf, size_t len, int flags) |
| ssize_t | recvfrom (int sockfd, void *buf, size_t len, int flags, struct sockaddr *src_addr, socklen_t *addrlen) |
| ssize_t | sendto (int sockfd, const void *buf, size_t len, int flags, const struct sockaddr *dest_addr, socklen_t addrlen) |
| uint32_t | xe_dns_last_server (void) |
| struct hostent * | gethostbyname (const char *name) |
| void | freeaddrinfo (addrinfo *res) |
| const char * | gai_strerror (int errcode) |
| int | getaddrinfo (const char *node, const char *service, const addrinfo *hints, addrinfo **res) |
| #define DNS_CACHE_SLOTS 32 |
| #define DNS_MAX_ADDRS 8 |
| #define DNS_NAME_MAX 256 |
| #define DNS_NEG_TTL_S 5 |
| #define DNS_POLL_MS 100 |
| #define DNS_QCLASS_IN 1 |
| #define DNS_QTYPE_A 1 |
| #define DNS_QTYPE_AAAA 28 |
| #define DNS_ROUTE_RETRY_MS 500 |
| #define DNS_ROUTE_WAIT_MS 10000 /* wait for DHCP default route */ |
| #define DNS_TIMEOUT_MS 3000 |
| #define DNS_TTL_CAP_S 60 |
| void freeaddrinfo | ( | addrinfo * | res | ) |
| const char * gai_strerror | ( | int | errcode | ) |
| int getaddrinfo | ( | const char * | node, |
| const char * | service, | ||
| const addrinfo * | hints, | ||
| addrinfo ** | res | ||
| ) |
| struct hostent * gethostbyname | ( | const char * | name | ) |
| ssize_t recvfrom | ( | int | sockfd, |
| void * | buf, | ||
| size_t | len, | ||
| int | flags, | ||
| struct sockaddr * | src_addr, | ||
| socklen_t * | addrlen | ||
| ) |
| ssize_t sendto | ( | int | sockfd, |
| const void * | buf, | ||
| size_t | len, | ||
| int | flags, | ||
| const struct sockaddr * | dest_addr, | ||
| socklen_t | addrlen | ||
| ) |
| uint32_t xe_dns_last_server | ( | void | ) |
|
extern |
BSD 2-Clause License
Copyright (c) 2022-2024, Manas Kamal Choudhury All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
xe_hosts_lookup – resolve from the static XR/localhost table.