cfengine  3.15.4
About: CFEngine is a configuration management system for configuring and maintaining Unix-like computers (using an own high level policy language). Community version.
  Fossies Dox: cfengine-3.15.4.tar.gz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

addr_lib.h File Reference
#include <platform.h>
Include dependency graph for addr_lib.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.




bool IsLoopbackAddress (const char *address)
int FuzzySetMatch (const char *s1, const char *s2)
bool FuzzyHostParse (const char *arg2)
int FuzzyHostMatch (const char *arg0, const char *arg1, const char *basename)
bool FuzzyMatchParse (const char *item)
AddressType ParseHostPort (char *s, char **hostname, char **port)

Enumeration Type Documentation

◆ AddressType


Definition at line 36 of file addr_lib.h.

Function Documentation

◆ FuzzyHostMatch()

int FuzzyHostMatch ( const char *  arg0,
const char *  arg1,
const char *  basename 

Definition at line 327 of file addr_lib.c.

References CF_BUFSIZE, strlcpy(), and ToLowerStrInplace().

Referenced by FnCallHostRange().

◆ FuzzyHostParse()

bool FuzzyHostParse ( const char *  arg2)

Definition at line 310 of file addr_lib.c.

References Log(), and LOG_LEVEL_ERR.

Referenced by FnCallHostRange().

◆ FuzzyMatchParse()

bool FuzzyMatchParse ( const char *  item)

Definition at line 376 of file addr_lib.c.

References CF_ADDRSIZE, Log(), LOG_LEVEL_ERR, and strstr().

Referenced by FnCallIPRange(), and FnCallIsIpInSubnet().

◆ FuzzySetMatch()

int FuzzySetMatch ( const char *  s1,
const char *  s2 

◆ IsLoopbackAddress()

bool IsLoopbackAddress ( const char *  address)

Definition at line 548 of file addr_lib.c.

Referenced by ConfigureBootstrap().

◆ ParseHostPort()

AddressType ParseHostPort ( char *  s,
char **  hostname,
char **  port 

Parses "hostname:port" or "[hostname]:port", where hostname may also be IPv4 or IPv6 address string.

hostnamewill point to the hostname, or NULL if no or empty hostname
portwill point to the port, or NULL if no or empty port @WARNING modifies #s to '\0' terminate hostname if followed by port.

Definition at line 588 of file addr_lib.c.

References ADDRESS_TYPE_IPV4, ADDRESS_TYPE_IPV6, ADDRESS_TYPE_OTHER, AddressTypeCheckValidity(), NULL, NULL_OR_EMPTY, and TrimWhitespace().

Referenced by CFNetMulti(), CFNetOpenConnection(), ConfigureBootstrap(), HailServer(), PolicyServerParseFile(), and PolicyServerSet().