Anoncoin  0.9.4
P2P Digital Currency
Classes | Typedefs | Enumerations | Functions | Variables
netbase.h File Reference
#include "compat.h"
#include "serialize.h"
#include <stdint.h>
#include <string>
#include <vector>
Include dependency graph for netbase.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  CNetAddr
 IP address (IPv6, or IPv4 using mapped IPv6 range (::FFFF:0:0/96)) More...
 
class  CService
 A combination of a network address (CNetAddr) and a (TCP) port. More...
 

Typedefs

typedef CService proxyType
 

Enumerations

enum  Network {
  NET_UNROUTABLE = 0, NET_IPV4, NET_IPV6, NET_TOR,
  NET_MAX
}
 

Functions

enum Network ParseNetwork (std::string net)
 
std::string GetNetworkName (enum Network net)
 
void SplitHostPort (std::string in, int &portOut, std::string &hostOut)
 
bool SetProxy (enum Network net, CService addrProxy)
 
bool GetProxy (enum Network net, proxyType &proxyInfoOut)
 
bool IsProxy (const CNetAddr &addr)
 
bool SetNameProxy (CService addrProxy)
 
bool HaveNameProxy ()
 
bool LookupHost (const char *pszName, std::vector< CNetAddr > &vIP, unsigned int nMaxSolutions=0, bool fAllowLookup=true)
 
bool LookupHostNumeric (const char *pszName, std::vector< CNetAddr > &vIP, unsigned int nMaxSolutions=0)
 
bool Lookup (const char *pszName, CService &addr, int portDefault=0, bool fAllowLookup=true)
 
bool Lookup (const char *pszName, std::vector< CService > &vAddr, int portDefault=0, bool fAllowLookup=true, unsigned int nMaxSolutions=0)
 
bool LookupNumeric (const char *pszName, CService &addr, int portDefault=0)
 
bool ConnectSocket (const CService &addr, SOCKET &hSocketRet, int nTimeout=nConnectTimeout)
 
bool ConnectSocketByName (CService &addr, SOCKET &hSocketRet, const char *pszDest, int portDefault=0, int nTimeout=nConnectTimeout)
 
std::string NetworkErrorString (int err)
 Return readable error string for a network error code. More...
 

Variables

int nConnectTimeout
 
bool fNameLookup
 

Typedef Documentation

Definition at line 159 of file netbase.h.

Enumeration Type Documentation

enum Network
Enumerator
NET_UNROUTABLE 
NET_IPV4 
NET_IPV6 
NET_TOR 
NET_MAX 

Definition at line 29 of file netbase.h.

Function Documentation

bool ConnectSocket ( const CService addr,
SOCKET hSocketRet,
int  nTimeout = nConnectTimeout 
)

Definition at line 541 of file netbase.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

bool ConnectSocketByName ( CService addr,
SOCKET hSocketRet,
const char *  pszDest,
int  portDefault = 0,
int  nTimeout = nConnectTimeout 
)

Definition at line 573 of file netbase.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

std::string GetNetworkName ( enum Network  net)

Definition at line 63 of file netbase.cpp.

bool GetProxy ( enum Network  net,
proxyType proxyInfoOut 
)

Definition at line 476 of file netbase.cpp.

Here is the caller graph for this function:

bool HaveNameProxy ( )

Definition at line 501 of file netbase.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

bool IsProxy ( const CNetAddr addr)

Definition at line 506 of file netbase.cpp.

Here is the caller graph for this function:

bool Lookup ( const char *  pszName,
CService addr,
int  portDefault = 0,
bool  fAllowLookup = true 
)

Definition at line 243 of file netbase.cpp.

Here is the call graph for this function:

bool Lookup ( const char *  pszName,
std::vector< CService > &  vAddr,
int  portDefault = 0,
bool  fAllowLookup = true,
unsigned int  nMaxSolutions = 0 
)

Definition at line 225 of file netbase.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

bool LookupHost ( const char *  pszName,
std::vector< CNetAddr > &  vIP,
unsigned int  nMaxSolutions = 0,
bool  fAllowLookup = true 
)

Definition at line 207 of file netbase.cpp.

Here is the caller graph for this function:

bool LookupHostNumeric ( const char *  pszName,
std::vector< CNetAddr > &  vIP,
unsigned int  nMaxSolutions = 0 
)

Definition at line 220 of file netbase.cpp.

Here is the call graph for this function:

bool LookupNumeric ( const char *  pszName,
CService addr,
int  portDefault = 0 
)

Definition at line 253 of file netbase.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

std::string NetworkErrorString ( int  err)

Return readable error string for a network error code.

Definition at line 1357 of file netbase.cpp.

Here is the caller graph for this function:

enum Network ParseNetwork ( std::string  net)

Definition at line 52 of file netbase.cpp.

Here is the caller graph for this function:

bool SetNameProxy ( CService  addrProxy)

Definition at line 485 of file netbase.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

bool SetProxy ( enum Network  net,
CService  addrProxy 
)

Definition at line 467 of file netbase.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void SplitHostPort ( std::string  in,
int &  portOut,
std::string &  hostOut 
)

Definition at line 77 of file netbase.cpp.

Here is the caller graph for this function:

Variable Documentation

bool fNameLookup

Definition at line 48 of file netbase.cpp.

int nConnectTimeout

Definition at line 47 of file netbase.cpp.