---
title: llarp::NetworkConfig

---

# llarp::NetworkConfig





## Public Functions

|                | Name           |
| -------------- | -------------- |
| void | **[defineConfigOptions](Classes/structllarp_1_1NetworkConfig.md#function-defineconfigoptions)**([ConfigDefinition](Classes/structllarp_1_1ConfigDefinition.md) & conf, const [ConfigGenParameters](Classes/structllarp_1_1ConfigGenParameters.md) & params) |
| std::string | **[ifname](Classes/structllarp_1_1NetworkConfig.md#function-ifname)**(const [net::Platform](Classes/classllarp_1_1net_1_1Platform.md) & net_plat) const<br>obtain interface name.  |
| [IPRange](Classes/structllarp_1_1IPRange.md) | **[ifaddr](Classes/structllarp_1_1NetworkConfig.md#function-ifaddr)**(const [net::Platform](Classes/classllarp_1_1net_1_1Platform.md) & net_plat) const<br>obtain ip range for network interface.  |

## Public Attributes

|                | Name           |
| -------------- | -------------- |
| std::optional< bool > | **[m_enableProfiling](Classes/structllarp_1_1NetworkConfig.md#variable-m-enableprofiling)**  |
| bool | **[m_saveProfiles](Classes/structllarp_1_1NetworkConfig.md#variable-m-saveprofiles)**  |
| std::set< [RouterID](Classes/structllarp_1_1RouterID.md) > | **[m_strictConnect](Classes/structllarp_1_1NetworkConfig.md#variable-m-strictconnect)**  |
| std::optional< std::string > | **[_ifname](Classes/structllarp_1_1NetworkConfig.md#variable--ifname)**  |
| std::optional< [IPRange](Classes/structllarp_1_1IPRange.md) > | **[_ifaddr](Classes/structllarp_1_1NetworkConfig.md#variable--ifaddr)**  |
| std::optional< fs::path > | **[m_keyfile](Classes/structllarp_1_1NetworkConfig.md#variable-m-keyfile)**  |
| std::string | **[m_endpointType](Classes/structllarp_1_1NetworkConfig.md#variable-m-endpointtype)**  |
| bool | **[m_reachable](Classes/structllarp_1_1NetworkConfig.md#variable-m-reachable)**  |
| std::optional< int > | **[m_Hops](Classes/structllarp_1_1NetworkConfig.md#variable-m-hops)**  |
| std::optional< int > | **[m_Paths](Classes/structllarp_1_1NetworkConfig.md#variable-m-paths)**  |
| bool | **[m_AllowExit](Classes/structllarp_1_1NetworkConfig.md#variable-m-allowexit)**  |
| std::set< [RouterID](Classes/structllarp_1_1RouterID.md) > | **[m_snodeBlacklist](Classes/structllarp_1_1NetworkConfig.md#variable-m-snodeblacklist)**  |
| [AddressMapConfig](Classes/structllarp_1_1AddressMapConfig.md) | **[addr_map](Classes/structllarp_1_1NetworkConfig.md#variable-addr-map)**  |
| service::AuthType | **[m_AuthType](Classes/structllarp_1_1NetworkConfig.md#variable-m-authtype)**  |
| service::AuthFileType | **[m_AuthFileType](Classes/structllarp_1_1NetworkConfig.md#variable-m-authfiletype)**  |
| std::optional< std::string > | **[m_AuthUrl](Classes/structllarp_1_1NetworkConfig.md#variable-m-authurl)**  |
| std::optional< std::string > | **[m_AuthMethod](Classes/structllarp_1_1NetworkConfig.md#variable-m-authmethod)**  |
| std::unordered_set< [service::Address](Classes/structllarp_1_1service_1_1Address.md) > | **[m_AuthWhitelist](Classes/structllarp_1_1NetworkConfig.md#variable-m-authwhitelist)**  |
| std::unordered_set< std::string > | **[m_AuthStaticTokens](Classes/structllarp_1_1NetworkConfig.md#variable-m-authstatictokens)**  |
| std::set< fs::path > | **[m_AuthFiles](Classes/structllarp_1_1NetworkConfig.md#variable-m-authfiles)**  |
| std::vector< [llarp::dns::SRVData](Classes/classllarp_1_1dns_1_1SRVData.md) > | **[m_SRVRecords](Classes/structllarp_1_1NetworkConfig.md#variable-m-srvrecords)**  |
| std::optional< [huint128_t](Classes/structllarp_1_1huint__t.md) > | **[m_baseV6Address](Classes/structllarp_1_1NetworkConfig.md#variable-m-basev6address)**  |
| std::set< [IPRange](Classes/structllarp_1_1IPRange.md) > | **[m_OwnedRanges](Classes/structllarp_1_1NetworkConfig.md#variable-m-ownedranges)**  |
| std::optional< [net::TrafficPolicy](Classes/structllarp_1_1net_1_1TrafficPolicy.md) > | **[m_TrafficPolicy](Classes/structllarp_1_1NetworkConfig.md#variable-m-trafficpolicy)**  |
| std::optional< llarp_time_t > | **[m_PathAlignmentTimeout](Classes/structllarp_1_1NetworkConfig.md#variable-m-pathalignmenttimeout)**  |
| std::optional< fs::path > | **[m_AddrMapPersistFile](Classes/structllarp_1_1NetworkConfig.md#variable-m-addrmappersistfile)**  |
| bool | **[m_EnableRoutePoker](Classes/structllarp_1_1NetworkConfig.md#variable-m-enableroutepoker)**  |
| bool | **[m_BlackholeRoutes](Classes/structllarp_1_1NetworkConfig.md#variable-m-blackholeroutes)**  |

## Public Functions Documentation

### function defineConfigOptions

```cpp
void defineConfigOptions(
    ConfigDefinition & conf,
    const ConfigGenParameters & params
)
```


### function ifname

```cpp
std::string ifname(
    const net::Platform & net_plat
) const
```

obtain interface name. 

uses configured value or runtime inferred sensible default if one is not provided by config. default is inferred with net_plat. 


### function ifaddr

```cpp
IPRange ifaddr(
    const net::Platform & net_plat
) const
```

obtain ip range for network interface. 

uses configured value or runtime inferred sensible default if one is one not provided by config. default is inferred with net_plat. 


## Public Attributes Documentation

### variable m_enableProfiling

```cpp
std::optional< bool > m_enableProfiling;
```


### variable m_saveProfiles

```cpp
bool m_saveProfiles;
```


### variable m_strictConnect

```cpp
std::set< RouterID > m_strictConnect;
```


### variable _ifname

```cpp
std::optional< std::string > _ifname;
```


### variable _ifaddr

```cpp
std::optional< IPRange > _ifaddr;
```


### variable m_keyfile

```cpp
std::optional< fs::path > m_keyfile;
```


### variable m_endpointType

```cpp
std::string m_endpointType;
```


### variable m_reachable

```cpp
bool m_reachable = false;
```


### variable m_Hops

```cpp
std::optional< int > m_Hops;
```


### variable m_Paths

```cpp
std::optional< int > m_Paths;
```


### variable m_AllowExit

```cpp
bool m_AllowExit = false;
```


### variable m_snodeBlacklist

```cpp
std::set< RouterID > m_snodeBlacklist;
```


### variable addr_map

```cpp
AddressMapConfig addr_map;
```


### variable m_AuthType

```cpp
service::AuthType m_AuthType = service::AuthType::eAuthTypeNone;
```


### variable m_AuthFileType

```cpp
service::AuthFileType m_AuthFileType = service::AuthFileType::eAuthFileHashes;
```


### variable m_AuthUrl

```cpp
std::optional< std::string > m_AuthUrl;
```


### variable m_AuthMethod

```cpp
std::optional< std::string > m_AuthMethod;
```


### variable m_AuthWhitelist

```cpp
std::unordered_set< service::Address > m_AuthWhitelist;
```


### variable m_AuthStaticTokens

```cpp
std::unordered_set< std::string > m_AuthStaticTokens;
```


### variable m_AuthFiles

```cpp
std::set< fs::path > m_AuthFiles;
```


### variable m_SRVRecords

```cpp
std::vector< llarp::dns::SRVData > m_SRVRecords;
```


### variable m_baseV6Address

```cpp
std::optional< huint128_t > m_baseV6Address;
```


### variable m_OwnedRanges

```cpp
std::set< IPRange > m_OwnedRanges;
```


### variable m_TrafficPolicy

```cpp
std::optional< net::TrafficPolicy > m_TrafficPolicy;
```


### variable m_PathAlignmentTimeout

```cpp
std::optional< llarp_time_t > m_PathAlignmentTimeout;
```


### variable m_AddrMapPersistFile

```cpp
std::optional< fs::path > m_AddrMapPersistFile;
```


### variable m_EnableRoutePoker

```cpp
bool m_EnableRoutePoker;
```


### variable m_BlackholeRoutes

```cpp
bool m_BlackholeRoutes;
```


-------------------------------

Updated on 2023-04-27 at 04:17:16 +0000