KDECore
#include <sys/types.h>#include <sys/socket.h>#include <sys/un.h>#include <netinet/in.h>#include <stdlib.h>#include <stdio.h>#include <errno.h>#include <unistd.h>#include <arpa/inet.h>#include <QtCore/QBool>#include <kdebug.h>#include <netdb.h>#include <config.h>#include <config-network.h>#include "klocale.h"#include "netsupp.h"Go to the source code of this file.
Namespaces | |
| namespace | KDE |
Macros | |
| #define | in6_addr kde_in6_addr |
| #define | KRF_afinet6 0 |
| #define | KRF_CAN_RESOLVE_IPV4 0x200 /* if present, the resolver can resolve to IPv4 */ |
| #define | KRF_CAN_RESOLVE_IPV6 0x400 /* if present, the resolver can resolve to IPv6 */ |
| #define | KRF_CAN_RESOLVE_UNIX 0x100 /* if present, the resolver can resolve Unix sockets */ |
| #define | KRF_getaddrinfo KRF_USING_OWN_GETADDRINFO |
| #define | KRF_inet_ntop KRF_USING_OWN_INET_NTOP |
| #define | KRF_inet_pton KRF_USING_OWN_INET_PTON |
| #define | KRF_KNOWS_AF_INET6 0x01 /* if present, the code knows about AF_INET6 */ |
| #define | KRF_resolver KRF_CAN_RESOLVE_UNIX | KRF_CAN_RESOLVE_IPV4 |
| #define | KRF_USING_OWN_GETADDRINFO 0x02 /* if present, we are using our own getaddrinfo */ |
| #define | KRF_USING_OWN_INET_NTOP 0x04 /* if present, we are using our own inet_ntop */ |
| #define | KRF_USING_OWN_INET_PTON 0x08 /* if present, we are using our own inet_pton */ |
| #define | NEED_IN6_TESTS |
| #define | offsetof(TYPE, MEMBER) |
| #define | sockaddr_in6 kde_sockaddr_in6 |
Functions | |
| static void | add_dwords (char *buf, quint16 *dw, int count) |
| static void | dofreeaddrinfo (struct addrinfo *ai) |
| static void | findport (unsigned short port, char *serv, size_t servlen, int flags) |
| void | freeaddrinfo (struct addrinfo *p) |
| char * | gai_strerror (int errorcode) |
| int | getaddrinfo (const char *name, const char *serv, const struct addrinfo *hint, struct addrinfo **result) |
| int | getnameinfo (const struct sockaddr *sa, kde_socklen_t salen, char *host, size_t hostlen, char *serv, size_t servlen, int flags) |
| static int | inet_lookup (const char *name, int portnum, int protonum, struct addrinfo *p, const struct addrinfo *hint, struct addrinfo **result) |
| const char * | inet_ntop (int af, const void *cp, char *buf, size_t len) |
| int | inet_pton (int af, const char *cp, void *buf) |
| void | kde_freeaddrinfo (struct kde_addrinfo *ai) |
| int | kde_getaddrinfo (const char *name, const char *service, const struct addrinfo *hint, struct kde_addrinfo **result) |
| static int | make_inet (const char *name, int portnum, int protonum, struct addrinfo *p, const struct addrinfo *hint, struct addrinfo **result) |
| static struct addrinfo * | make_unix (const char *name, const char *serv) |
Variables | |
| const int | KDE::resolverFlags = KRF_getaddrinfo | KRF_resolver | KRF_afinet6 | KRF_inet_ntop | KRF_inet_pton |
Macro Definition Documentation
◆ in6_addr
| #define in6_addr kde_in6_addr |
Definition at line 63 of file netsupp.cpp.
◆ KRF_afinet6
| #define KRF_afinet6 0 |
Definition at line 1243 of file netsupp.cpp.
◆ KRF_CAN_RESOLVE_IPV4
| #define KRF_CAN_RESOLVE_IPV4 0x200 /* if present, the resolver can resolve to IPv4 */ |
Definition at line 81 of file netsupp.cpp.
◆ KRF_CAN_RESOLVE_IPV6
| #define KRF_CAN_RESOLVE_IPV6 0x400 /* if present, the resolver can resolve to IPv6 */ |
Definition at line 82 of file netsupp.cpp.
◆ KRF_CAN_RESOLVE_UNIX
| #define KRF_CAN_RESOLVE_UNIX 0x100 /* if present, the resolver can resolve Unix sockets */ |
Definition at line 80 of file netsupp.cpp.
◆ KRF_getaddrinfo
| #define KRF_getaddrinfo KRF_USING_OWN_GETADDRINFO |
Definition at line 368 of file netsupp.cpp.
◆ KRF_inet_ntop
| #define KRF_inet_ntop KRF_USING_OWN_INET_NTOP |
Definition at line 1030 of file netsupp.cpp.
◆ KRF_inet_pton
| #define KRF_inet_pton KRF_USING_OWN_INET_PTON |
Definition at line 1141 of file netsupp.cpp.
◆ KRF_KNOWS_AF_INET6
| #define KRF_KNOWS_AF_INET6 0x01 /* if present, the code knows about AF_INET6 */ |
Definition at line 76 of file netsupp.cpp.
◆ KRF_resolver
| #define KRF_resolver KRF_CAN_RESOLVE_UNIX | KRF_CAN_RESOLVE_IPV4 |
Definition at line 369 of file netsupp.cpp.
◆ KRF_USING_OWN_GETADDRINFO
| #define KRF_USING_OWN_GETADDRINFO 0x02 /* if present, we are using our own getaddrinfo */ |
Definition at line 77 of file netsupp.cpp.
◆ KRF_USING_OWN_INET_NTOP
| #define KRF_USING_OWN_INET_NTOP 0x04 /* if present, we are using our own inet_ntop */ |
Definition at line 78 of file netsupp.cpp.
◆ KRF_USING_OWN_INET_PTON
| #define KRF_USING_OWN_INET_PTON 0x08 /* if present, we are using our own inet_pton */ |
Definition at line 79 of file netsupp.cpp.
◆ NEED_IN6_TESTS
| #define NEED_IN6_TESTS |
Definition at line 45 of file netsupp.cpp.
◆ offsetof
| #define offsetof | ( | TYPE, | |
| MEMBER ) |
Definition at line 69 of file netsupp.cpp.
◆ sockaddr_in6
| #define sockaddr_in6 kde_sockaddr_in6 |
Definition at line 62 of file netsupp.cpp.
Function Documentation
◆ add_dwords()
|
static |
Definition at line 1032 of file netsupp.cpp.
◆ dofreeaddrinfo()
|
static |
Definition at line 85 of file netsupp.cpp.
◆ findport()
|
static |
Definition at line 925 of file netsupp.cpp.
◆ freeaddrinfo()
| void freeaddrinfo | ( | struct addrinfo * | p | ) |
Definition at line 884 of file netsupp.cpp.
◆ gai_strerror()
| char * gai_strerror | ( | int | errorcode | ) |
Definition at line 890 of file netsupp.cpp.
◆ getaddrinfo()
| int getaddrinfo | ( | const char * | name, |
| const char * | serv, | ||
| const struct addrinfo * | hint, | ||
| struct addrinfo ** | result ) |
Definition at line 784 of file netsupp.cpp.
◆ getnameinfo()
| int getnameinfo | ( | const struct sockaddr * | sa, |
| kde_socklen_t | salen, | ||
| char * | host, | ||
| size_t | hostlen, | ||
| char * | serv, | ||
| size_t | servlen, | ||
| int | flags ) |
Definition at line 944 of file netsupp.cpp.
◆ inet_lookup()
|
static |
TODO Try and use gethostbyname2_r before gethostbyname2 and gethostbyname.
Definition at line 379 of file netsupp.cpp.
◆ inet_ntop()
| const char * inet_ntop | ( | int | af, |
| const void * | cp, | ||
| char * | buf, | ||
| size_t | len ) |
Definition at line 1040 of file netsupp.cpp.
◆ inet_pton()
| int inet_pton | ( | int | af, |
| const char * | cp, | ||
| void * | buf ) |
Definition at line 1142 of file netsupp.cpp.
◆ kde_freeaddrinfo()
| void kde_freeaddrinfo | ( | struct kde_addrinfo * | ai | ) |
Definition at line 101 of file netsupp.cpp.
◆ kde_getaddrinfo()
| int kde_getaddrinfo | ( | const char * | name, |
| const char * | service, | ||
| const struct addrinfo * | hint, | ||
| struct kde_addrinfo ** | result ) |
Definition at line 230 of file netsupp.cpp.
◆ make_inet()
|
static |
Definition at line 556 of file netsupp.cpp.
◆ make_unix()
|
static |
Definition at line 130 of file netsupp.cpp.
Documentation copyright © 1996-2026 The KDE developers.
Generated on by doxygen 1.15.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.