• Skip to content
  • Skip to link menu
  • KDE API Reference
  • kdelibs-4.10.5 API Reference
  • KDE Home
  • Contact Us
 

KDECore

  • kdecore
  • network
Classes | Namespaces | Macros | Functions
netsupp.h File Reference
#include <kdecore_export.h>
#include <config.h>
#include <config-network.h>
#include <sys/socket.h>
#include <netdb.h>

Go to the source code of this file.

Classes

struct  addrinfo
struct  kde_addrinfo
struct  kde_in6_addr
struct  kde_sockaddr_in6

Namespaces

namespace  KDE

Macros

#define AF_LOCAL   AF_UNIX
#define AI_CANONNAME   2 /* Request for canonical name. */
#define AI_NUMERICHOST   4 /* Don't use name resolution. */
#define AI_PASSIVE   1 /* Socket address is intended for `bind'. */
#define EAI_ADDRFAMILY   1 /* Address family for NAME not supported. */
#define EAI_AGAIN   2 /* Temporary failure in name resolution. */
#define EAI_BADFLAGS   3 /* Invalid value for `ai_flags' field. */
#define EAI_FAIL   4 /* Non-recoverable failure in name res. */
#define EAI_FAMILY   5 /* `ai_family' not supported. */
#define EAI_MEMORY   6 /* Memory allocation failure. */
#define EAI_NODATA   7 /* No address associated with NAME. */
#define EAI_NONAME   8 /* NAME or SERVICE is unknown. */
#define EAI_SERVICE   9 /* SERVICE not supported for `ai_socktype'. */
#define EAI_SOCKTYPE   10 /* `ai_socktype' not supported. */
#define EAI_SYSTEM   11 /* System error returned in `errno'. */
#define freeaddrinfo   KDE::freeaddrinfo
#define getaddrinfo   KDE::getaddrinfo
#define getnameinfo   KDE::getnameinfo
#define inet_ntop   KDE::inet_ntop
#define inet_pton   KDE::inet_pton
#define KAI_LOCALUNIX   1 /* data contains a Unix addrinfo allocated by us */
#define KAI_QDNS   2 /* data contains data derived from QDns */
#define KAI_SYSTEM   0 /* data is all-system */
#define KDE_IN6_ARE_ADDR_EQUAL(a, b)
#define KDE_IN6_IS_ADDR_LINKLOCAL(a)   ((((quint32 *) (a))[0] & htonl (0xffc00000)) == htonl (0xfe800000))
#define KDE_IN6_IS_ADDR_LOOPBACK(a)
#define KDE_IN6_IS_ADDR_MC_GLOBAL(a)   (KDE_IN6_IS_ADDR_MULTICAST(a) && ((((quint8 *) (a))[1] & 0xf) == 0xe))
#define KDE_IN6_IS_ADDR_MC_LINKLOCAL(a)   (KDE_IN6_IS_ADDR_MULTICAST(a) && ((((quint8 *) (a))[1] & 0xf) == 0x2))
#define KDE_IN6_IS_ADDR_MC_NODELOCAL(a)   (KDE_IN6_IS_ADDR_MULTICAST(a) && ((((quint8 *) (a))[1] & 0xf) == 0x1))
#define KDE_IN6_IS_ADDR_MC_ORGLOCAL(a)   (KDE_IN6_IS_ADDR_MULTICAST(a) && ((((quint8 *) (a))[1] & 0xf) == 0x8))
#define KDE_IN6_IS_ADDR_MC_SITELOCAL(a)   (KDE_IN6_IS_ADDR_MULTICAST(a) && ((((quint8 *) (a))[1] & 0xf) == 0x5))
#define KDE_IN6_IS_ADDR_MULTICAST(a)   (((u_int8_t *) (a))[0] == 0xff)
#define KDE_IN6_IS_ADDR_SITELOCAL(a)   ((((quint32 *) (a))[0] & htonl (0xffc00000)) == htonl (0xfec00000))
#define KDE_IN6_IS_ADDR_UNSPECIFIED(a)
#define KDE_IN6_IS_ADDR_V4COMPAT(a)
#define KDE_IN6_IS_ADDR_V4MAPPED(a)
#define NI_DGRAM   16 /* Look up UDP service rather than TCP. */
#define NI_MAXHOST   1025
#define NI_MAXSERV   32
#define NI_NAMEREQD   8 /* Don't return numeric addresses. */
#define NI_NOFQDN   4 /* Only return nodename portion. */
#define NI_NUMERICHOST   1 /* Don't try to look up hostname. */
#define NI_NUMERICSERV   2 /* Don't convert port number to name. */
#define PF_LOCAL   PF_UNIX

Functions

void KDE::freeaddrinfo (struct addrinfo *ai)
char * gai_strerror (int errorcode)
int KDE::getaddrinfo (const char *name, const char *service, const struct addrinfo *hint, struct addrinfo **result)
int KDE::getnameinfo (const struct sockaddr *sa, kde_socklen_t salen, char *host, size_t hostlen, char *serv, size_t servlen, int flags)
const char * KDE::inet_ntop (int af, const void *cp, char *buf, size_t len)
int KDE::inet_pton (int af, const char *cp, void *buf)
void kde_freeaddrinfo (struct kde_addrinfo *p)
int kde_getaddrinfo (const char *name, const char *service, const struct addrinfo *hint, struct kde_addrinfo **result)

Macro Definition Documentation

#define AF_LOCAL   AF_UNIX

Definition at line 38 of file netsupp.h.

#define AI_CANONNAME   2 /* Request for canonical name. */

Definition at line 193 of file netsupp.h.

#define AI_NUMERICHOST   4 /* Don't use name resolution. */

Definition at line 194 of file netsupp.h.

#define AI_PASSIVE   1 /* Socket address is intended for `bind'. */

Definition at line 192 of file netsupp.h.

#define EAI_ADDRFAMILY   1 /* Address family for NAME not supported. */

Definition at line 212 of file netsupp.h.

#define EAI_AGAIN   2 /* Temporary failure in name resolution. */

Definition at line 215 of file netsupp.h.

#define EAI_BADFLAGS   3 /* Invalid value for `ai_flags' field. */

Definition at line 218 of file netsupp.h.

#define EAI_FAIL   4 /* Non-recoverable failure in name res. */

Definition at line 221 of file netsupp.h.

#define EAI_FAMILY   5 /* `ai_family' not supported. */

Definition at line 224 of file netsupp.h.

#define EAI_MEMORY   6 /* Memory allocation failure. */

Definition at line 227 of file netsupp.h.

#define EAI_NODATA   7 /* No address associated with NAME. */

Definition at line 230 of file netsupp.h.

#define EAI_NONAME   8 /* NAME or SERVICE is unknown. */

Definition at line 233 of file netsupp.h.

#define EAI_SERVICE   9 /* SERVICE not supported for `ai_socktype'. */

Definition at line 236 of file netsupp.h.

#define EAI_SOCKTYPE   10 /* `ai_socktype' not supported. */

Definition at line 239 of file netsupp.h.

#define EAI_SYSTEM   11 /* System error returned in `errno'. */

Definition at line 242 of file netsupp.h.

#define freeaddrinfo   KDE::freeaddrinfo

Definition at line 305 of file netsupp.h.

#define getaddrinfo   KDE::getaddrinfo

Definition at line 304 of file netsupp.h.

#define getnameinfo   KDE::getnameinfo

Definition at line 306 of file netsupp.h.

#define inet_ntop   KDE::inet_ntop

Definition at line 330 of file netsupp.h.

#define inet_pton   KDE::inet_pton

Definition at line 319 of file netsupp.h.

#define KAI_LOCALUNIX   1 /* data contains a Unix addrinfo allocated by us */

Definition at line 142 of file netsupp.h.

#define KAI_QDNS   2 /* data contains data derived from QDns */

Definition at line 143 of file netsupp.h.

#define KAI_SYSTEM   0 /* data is all-system */

Definition at line 141 of file netsupp.h.

#define KDE_IN6_ARE_ADDR_EQUAL (   a,
  b 
)
Value:
((((quint32 *) (a))[0] == ((quint32 *) (b))[0]) && \
(((quint32 *) (a))[1] == ((quint32 *) (b))[1]) && \
(((quint32 *) (a))[2] == ((quint32 *) (b))[2]) && \
(((quint32 *) (a))[3] == ((quint32 *) (b))[3]))

Definition at line 102 of file netsupp.h.

#define KDE_IN6_IS_ADDR_LINKLOCAL (   a)    ((((quint32 *) (a))[0] & htonl (0xffc00000)) == htonl (0xfe800000))

Definition at line 88 of file netsupp.h.

#define KDE_IN6_IS_ADDR_LOOPBACK (   a)
Value:
(((quint32 *) (a))[0] == 0 && ((quint32 *) (a))[1] == 0 && \
((quint32 *) (a))[2] == 0 && ((quint32 *) (a))[3] == htonl (1))

Definition at line 82 of file netsupp.h.

#define KDE_IN6_IS_ADDR_MC_GLOBAL (   a)    (KDE_IN6_IS_ADDR_MULTICAST(a) && ((((quint8 *) (a))[1] & 0xf) == 0xe))

Definition at line 120 of file netsupp.h.

#define KDE_IN6_IS_ADDR_MC_LINKLOCAL (   a)    (KDE_IN6_IS_ADDR_MULTICAST(a) && ((((quint8 *) (a))[1] & 0xf) == 0x2))

Definition at line 111 of file netsupp.h.

#define KDE_IN6_IS_ADDR_MC_NODELOCAL (   a)    (KDE_IN6_IS_ADDR_MULTICAST(a) && ((((quint8 *) (a))[1] & 0xf) == 0x1))

Definition at line 108 of file netsupp.h.

#define KDE_IN6_IS_ADDR_MC_ORGLOCAL (   a)    (KDE_IN6_IS_ADDR_MULTICAST(a) && ((((quint8 *) (a))[1] & 0xf) == 0x8))

Definition at line 117 of file netsupp.h.

#define KDE_IN6_IS_ADDR_MC_SITELOCAL (   a)    (KDE_IN6_IS_ADDR_MULTICAST(a) && ((((quint8 *) (a))[1] & 0xf) == 0x5))

Definition at line 114 of file netsupp.h.

#define KDE_IN6_IS_ADDR_MULTICAST (   a)    (((u_int8_t *) (a))[0] == 0xff)

Definition at line 86 of file netsupp.h.

#define KDE_IN6_IS_ADDR_SITELOCAL (   a)    ((((quint32 *) (a))[0] & htonl (0xffc00000)) == htonl (0xfec00000))

Definition at line 91 of file netsupp.h.

#define KDE_IN6_IS_ADDR_UNSPECIFIED (   a)
Value:
(((quint32 *) (a))[0] == 0 && ((quint32 *) (a))[1] == 0 && \
((quint32 *) (a))[2] == 0 && ((quint32 *) (a))[3] == 0)

Definition at line 78 of file netsupp.h.

#define KDE_IN6_IS_ADDR_V4COMPAT (   a)
Value:
((((quint32 *) (a))[0] == 0) && (((quint32 *) (a))[1] == 0) && \
(((quint32 *) (a))[2] == 0) && (ntohl (((quint32 *) (a))[3]) > 1))

Definition at line 98 of file netsupp.h.

#define KDE_IN6_IS_ADDR_V4MAPPED (   a)
Value:
((((quint32 *) (a))[0] == 0) && (((quint32 *) (a))[1] == 0) && \
(((quint32 *) (a))[2] == htonl (0xffff)))

Definition at line 94 of file netsupp.h.

#define NI_DGRAM   16 /* Look up UDP service rather than TCP. */

Definition at line 265 of file netsupp.h.

#define NI_MAXHOST   1025

Definition at line 250 of file netsupp.h.

#define NI_MAXSERV   32

Definition at line 251 of file netsupp.h.

#define NI_NAMEREQD   8 /* Don't return numeric addresses. */

Definition at line 264 of file netsupp.h.

#define NI_NOFQDN   4 /* Only return nodename portion. */

Definition at line 263 of file netsupp.h.

#define NI_NUMERICHOST   1 /* Don't try to look up hostname. */

Definition at line 261 of file netsupp.h.

#define NI_NUMERICSERV   2 /* Don't convert port number to name. */

Definition at line 262 of file netsupp.h.

#define PF_LOCAL   PF_UNIX

Definition at line 39 of file netsupp.h.


Function Documentation

char* gai_strerror ( int  errorcode)

Definition at line 890 of file netsupp.cpp.

void kde_freeaddrinfo ( struct kde_addrinfo *  p)

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.

This file is part of the KDE documentation.
Documentation copyright © 1996-2013 The KDE developers.
Generated on Tue Jul 16 2013 17:47:36 by doxygen 1.8.1.1 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KDECore

Skip menu "KDECore"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Modules
  • Related Pages

kdelibs-4.10.5 API Reference

Skip menu "kdelibs-4.10.5 API Reference"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal