58 void Display(
const char *pfx=
"=====> ");
103 {
if (ifT >=
ifAny) ifT =
static_cast<ifType>(ifAvail);
104 name = ifName[ifT]->iVal;
105 return ifName[ifT]->iLen;
121 {
if (ifT >=
ifAny) ifT =
static_cast<ifType>(ifAvail);
122 strcpy(nbuff, ifName[ifT]->iVal); nport = ifPort;
123 return ifName[ifT]->iLen;
177static int GetIF(
char *buff,
int blen,
const char **eText=0,
bool show=
false);
192static int GetIF(
char *&ifline,
const char **eText=0,
bool show=
false);
222 {
return ifT >=
ifAny || ifDest[ifT]->iLen != 0;}
253 {
if (ifT >=
ifAny)
return 0x0f;
254 return ifMaskVec[ifT];
276inline int Port() {
return ifPort;}
401bool GenAddrs(ifAddrs &ifTab,
const char *hName,
bool wantV6);
406bool IsOkName(
const char *ifn,
short &ifIdx);
408bool SetIF64(
bool retVal);
410bool V4LinkLocal(
struct sockaddr *saP);
417 ifData() : iLen(0) {*iVal = 0;}
421ifData *ifName[
ifMax];
422ifData *ifDest[
ifMax];
426struct pInfo {
char len;
428 pInfo() : len(0) {*val = 0;}
440static char *ifCfg[2];
442const char *ifTName[
ifMax];
444const char *ifMaskVec;
static const int haveNoGI
ifList == 0 && getifaddrs() is not supported
bool SetIF(XrdNetAddrInfo *src, const char *ifList, int port=0, netType nettype=netDefault, const char *xName=0)
static const int haveIPv4
ifList == 0 && non-local ipv4 i/f found (or'd)
static void SetRPIPA(bool rval)
int GetName(char *nbuff, int &nport, ifType ifT=PublicV6)
static bool InDomain(XrdNetAddrInfo *epaddr)
XrdNetIF()
Constructor and Destructor.
static int GetIF(XrdOucTList **ifList, const char **eText=0)
static void Routing(netType nettype)
static char Mask(ifType ifT)
static const char * Name(ifType ifT)
static void SetMsgs(XrdSysError *erp)
bool HasDest(ifType ifT=PublicV6)
static void PortDefault(int pnum=1094)
static const int havePub6
ifList == 0 && public ipv6 i/f found (or'd)
static ifType GetIFType(bool conIPv4, bool hasIP64, bool pvtIP)
static bool SetIFNames(char *ifnames)
int GetName(const char *&name, ifType ifT=PublicV6)
static const int havePub4
ifList == 0 && public ipv4 i/f found (or'd)
int GetDest(char *dest, int dlen, ifType ifT=PublicV6, bool prefn=false)
static const int haveIPv6
ifList == 0 && non-local ipv6 i/f found (or'd)
ifType
The enum that is used to index into ifData to get appropriate interface.
static const int havePrv6
ifList == 0 && private ipv6 i/f found (or'd)
static void Privatize(ifType &x)
static const int havePrv4
ifList == 0 && private ipv4 i/f found (or'd)