KDECore
netsupp.cpp File Reference
#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 <qglobal.h>#include <netdb.h>#include "config.h"#include "kdebug.h"#include "klocale.h"#include "netsupp.h"#include <kdemacros.h>

Go to the source code of this file.
Namespaces | |
| namespace | KDE |
Defines | |
| #define | in6_addr kde_in6_addr |
| #define | KRF_afinet6 0 |
| #define | KRF_CAN_RESOLVE_IPV4 0x200 |
| #define | KRF_CAN_RESOLVE_IPV6 0x400 |
| #define | KRF_CAN_RESOLVE_UNIX 0x100 |
| #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 |
| #define | KRF_resolver KRF_CAN_RESOLVE_UNIX | KRF_CAN_RESOLVE_IPV4 |
| #define | KRF_USING_OWN_GETADDRINFO 0x02 |
| #define | KRF_USING_OWN_INET_NTOP 0x04 |
| #define | KRF_USING_OWN_INET_PTON 0x08 |
| #define | NEED_IN6_TESTS |
| #define | offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER) |
| #define | sockaddr_in6 kde_sockaddr_in6 |
Functions | |
| static void | add_dwords (char *buf, Q_UINT16 *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, ksocklen_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_EXPORT | KDE::resolverFlags = KRF_getaddrinfo | KRF_resolver | KRF_afinet6 | KRF_inet_ntop | KRF_inet_pton |
Define Documentation
| #define in6_addr kde_in6_addr |
Definition at line 63 of file netsupp.cpp.
| #define KRF_afinet6 0 |
Definition at line 1230 of file netsupp.cpp.
| #define KRF_CAN_RESOLVE_IPV4 0x200 |
Definition at line 81 of file netsupp.cpp.
| #define KRF_CAN_RESOLVE_IPV6 0x400 |
Definition at line 82 of file netsupp.cpp.
| #define KRF_CAN_RESOLVE_UNIX 0x100 |
Definition at line 80 of file netsupp.cpp.
| #define KRF_getaddrinfo KRF_USING_OWN_GETADDRINFO |
Definition at line 368 of file netsupp.cpp.
| #define KRF_inet_ntop KRF_USING_OWN_INET_NTOP |
Definition at line 1017 of file netsupp.cpp.
| #define KRF_inet_pton KRF_USING_OWN_INET_PTON |
Definition at line 1128 of file netsupp.cpp.
| #define KRF_KNOWS_AF_INET6 0x01 |
Definition at line 76 of file netsupp.cpp.
| #define KRF_resolver KRF_CAN_RESOLVE_UNIX | KRF_CAN_RESOLVE_IPV4 |
Definition at line 369 of file netsupp.cpp.
| #define KRF_USING_OWN_GETADDRINFO 0x02 |
Definition at line 77 of file netsupp.cpp.
| #define KRF_USING_OWN_INET_NTOP 0x04 |
Definition at line 78 of file netsupp.cpp.
| #define KRF_USING_OWN_INET_PTON 0x08 |
Definition at line 79 of file netsupp.cpp.
| #define NEED_IN6_TESTS |
Definition at line 43 of file netsupp.cpp.
| #define offsetof | ( | TYPE, | |||
| MEMBER | ) | ((size_t) &((TYPE *)0)->MEMBER) |
Definition at line 69 of file netsupp.cpp.
| #define sockaddr_in6 kde_sockaddr_in6 |
Definition at line 62 of file netsupp.cpp.
Function Documentation
| static void add_dwords | ( | char * | buf, | |
| Q_UINT16 * | dw, | |||
| int | count | |||
| ) | [static] |
Definition at line 1019 of file netsupp.cpp.
| static void dofreeaddrinfo | ( | struct addrinfo * | ai | ) | [static] |
Definition at line 85 of file netsupp.cpp.
| static void findport | ( | unsigned short | port, | |
| char * | serv, | |||
| size_t | servlen, | |||
| int | flags | |||
| ) | [static] |
Definition at line 912 of file netsupp.cpp.
| void freeaddrinfo | ( | struct addrinfo * | ai | ) |
| char* gai_strerror | ( | int | errorcode | ) |
| int getnameinfo | ( | const struct sockaddr * | sa, | |
| ksocklen_t | salen, | |||
| char * | host, | |||
| size_t | hostlen, | |||
| char * | serv, | |||
| size_t | servlen, | |||
| int | flags | |||
| ) |
Definition at line 931 of file netsupp.cpp.
| static int inet_lookup | ( | const char * | name, | |
| int | portnum, | |||
| int | protonum, | |||
| struct addrinfo * | p, | |||
| const struct addrinfo * | hint, | |||
| struct addrinfo ** | result | |||
| ) | [static] |
TODO Try and use gethostbyname2_r before gethostbyname2 and gethostbyname.
Definition at line 379 of file netsupp.cpp.
| 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 | ) |
Definition at line 101 of file netsupp.cpp.
| 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.
| static int make_inet | ( | const char * | name, | |
| int | portnum, | |||
| int | protonum, | |||
| struct addrinfo * | p, | |||
| const struct addrinfo * | hint, | |||
| struct addrinfo ** | result | |||
| ) | [static] |
Definition at line 555 of file netsupp.cpp.
| static struct addrinfo* make_unix | ( | const char * | name, | |
| const char * | serv | |||
| ) | [static, read] |
Definition at line 130 of file netsupp.cpp.
KDE 3.5 API Reference