Back to index

lightning-sunbird  0.9+nobinonly
Classes | Defines | Typedefs | Enumerations | Functions | Variables
prnetdb.h File Reference
#include "prtypes.h"
#include "prio.h"

Go to the source code of this file.

Classes

struct  PRHostEnt
struct  PRProtoEnt

Defines

#define PR_NETDB_BUF_SIZE   1024
#define PR_AI_ALL   0x08
#define PR_AI_V4MAPPED   0x10
#define PR_AI_ADDRCONFIG   0x20
#define PR_AI_NOCANONNAME   0x8000
#define PR_AI_DEFAULT   (PR_AI_V4MAPPED | PR_AI_ADDRCONFIG)
#define PR_NetAddrFamily(addr)   ((addr)->raw.family)
#define PR_NetAddrInetPort(addr)   ((addr)->raw.family == PR_AF_INET6 ? (addr)->ipv6.port : (addr)->inet.port)

Typedefs

typedef struct PRHostEnt PRHostEnt
typedef enum PRNetAddrValue PRNetAddrValue
typedef struct PRProtoEnt PRProtoEnt
typedef struct PRAddrInfo

Enumerations

enum  PRNetAddrValue { PR_IpAddrNull, PR_IpAddrAny, PR_IpAddrLoopback, PR_IpAddrV4Mapped }

Functions

PR_BEGIN_EXTERN_C NSPR_API (PRStatus) PR_StringToNetAddr(const char *string
 NSPR_API (PRIntn) PR_EnumerateHostEnt(PRIntn enumIndex
 NSPR_API (PRBool) PR_IsNetAddrType(const PRNetAddr *addr
 NSPR_API (void) PR_ConvertIPv4AddrToIPv6(PRUint32 v4addr
 Prototypes for machine dependent function implementations.
 NSPR_API (PRAddrInfo *) PR_GetAddrInfoByName(const char *hostname
 NSPR_API (void *) PR_EnumerateAddrInfo(void *enumPtr
 NSPR_API (const char *) PR_GetCanonNameFromAddrInfo(const PRAddrInfo *addrInfo)
 NSPR_API (PRUint16) PR_ntohs(PRUint16)
 NSPR_API (PRUint32) PR_ntohl(PRUint32)
 NSPR_API (PRUint64) PR_ntohll(PRUint64)

Variables

PR_BEGIN_EXTERN_C PRNetAddraddr
char * string
char PRUint32 size
char * buf
char PRIntn bufsize
char PRIntn PRHostEnthostentry
PRUint16 af
PRUint16 PRIntn flags
const PRHostEnthostEnt
const PRHostEnt PRUint16 port
const PRHostEnt PRUint16
PRNetAddr
address
PRNetAddrValue val
PRIPv6Addrv6addr
char * buffer
char PRInt32 PRProtoEntresult
const PRAddrInfoaddrInfo

Class Documentation

struct PRHostEnt

Definition at line 68 of file prnetdb.h.

Class Members
char ** h_addr_list
PRInt32 h_addrtype
char ** h_aliases
PRInt32 h_length
char * h_name
struct PRProtoEnt

Definition at line 354 of file prnetdb.h.

Class Members
char ** p_aliases
char * p_name
PRInt32 p_num

Define Documentation

Definition at line 142 of file prnetdb.h.

#define PR_AI_ALL   0x08

Definition at line 140 of file prnetdb.h.

Definition at line 144 of file prnetdb.h.

#define PR_AI_NOCANONNAME   0x8000

Definition at line 143 of file prnetdb.h.

#define PR_AI_V4MAPPED   0x10

Definition at line 141 of file prnetdb.h.

#define PR_NetAddrFamily (   addr)    ((addr)->raw.family)

Definition at line 316 of file prnetdb.h.

#define PR_NetAddrInetPort (   addr)    ((addr)->raw.family == PR_AF_INET6 ? (addr)->ipv6.port : (addr)->inet.port)

Definition at line 329 of file prnetdb.h.

Definition at line 85 of file prnetdb.h.


Typedef Documentation

typedef struct PRAddrInfo

Definition at line 413 of file prnetdb.h.

typedef struct PRHostEnt PRHostEnt
typedef struct PRProtoEnt PRProtoEnt

Enumeration Type Documentation

Enumerator:
PR_IpAddrNull 
PR_IpAddrAny 
PR_IpAddrLoopback 
PR_IpAddrV4Mapped 

Definition at line 234 of file prnetdb.h.

{
    PR_IpAddrNull,      /* do NOT overwrite the IP address */
    PR_IpAddrAny,       /* assign logical INADDR_ANY to IP address */
    PR_IpAddrLoopback,  /* assign logical INADDR_LOOPBACK  */
    PR_IpAddrV4Mapped   /* IPv4 mapped address */
} PRNetAddrValue;

Function Documentation

NSPR_API ( PRIntn  )
NSPR_API ( PRBool  ) const
NSPR_API ( void  )

Prototypes for machine dependent function implementations.

(Too bad NSPR's MD system blows so much that we have to reiterate every stinking thing we implement here in our MD header file.)

NSPR_API ( PRAddrInfo ) const
NSPR_API ( void )
NSPR_API ( const char *  ) const

Variable Documentation

Definition at line 53 of file prnetdb.h.

Definition at line 210 of file prnetdb.h.

Definition at line 456 of file prnetdb.h.

Definition at line 148 of file prnetdb.h.

char* buf

Definition at line 110 of file prnetdb.h.

char* buffer

Definition at line 365 of file prnetdb.h.

Definition at line 110 of file prnetdb.h.

PRUint16 PRIntn flags

Definition at line 148 of file prnetdb.h.

Definition at line 210 of file prnetdb.h.

char PRIntn PRHostEnt * hostentry

Definition at line 110 of file prnetdb.h.

Definition at line 210 of file prnetdb.h.

Definition at line 365 of file prnetdb.h.

char PRUint32 size

Definition at line 56 of file prnetdb.h.

char* string

Definition at line 56 of file prnetdb.h.

Definition at line 303 of file prnetdb.h.

Definition at line 286 of file prnetdb.h.