libDwm-0.9.45
DwmLocalInterfaces.hh File Reference

Dwm::LocalInterfaceAlias, Dwm::LocalInterface and Dwm::GetLocalInterfaces() definitions. More...

#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <set>
#include <string>
#include <map>
#include "DwmIpv4Address.hh"
Include dependency graph for DwmLocalInterfaces.hh:

Go to the source code of this file.

Classes

class  Dwm::LocalInterfaceAlias
 Holds an interface alias, which is just IP address and netmask. More...
 
class  Dwm::LocalInterface
 Simple class to hold the name and IPv4 address of a local interface. More...
 

Functions

bool Dwm::GetLocalInterfaces (std::map< std::string, LocalInterface > &interfaces)
 Fetches local interfaces with IP addresses into interfaces.
 

Detailed Description

Function Documentation

◆ GetLocalInterfaces()

bool Dwm::GetLocalInterfaces ( std::map< std::string, LocalInterface > & interfaces)

Fetches local interfaces with IP addresses into interfaces.

Returns true on success (1 or more interfaces found). This should work on OpenBSD, FreeBSD and Linux.

Here is the call graph for this function: