OpenVPN 3 Core Library
Loading...
Searching...
No Matches
openvpn::TunBuilderCapture::RerouteGW Class Reference

Class for handling gateway rerouting configuration. More...

#include <capture.hpp>

Public Member Functions

std::string to_string () const
 Converts the object to a human-readable string representation.
 
Json::Value to_json () const
 Serializes the object to a JSON value.
 
void from_json (const Json::Value &root, const std::string &title)
 Deserializes the object from a JSON value.
 

Public Attributes

bool ipv4 = false
 
bool ipv6 = false
 
unsigned int flags = 0
 

Detailed Description

Class for handling gateway rerouting configuration.

This class encapsulates settings for redirecting gateway traffic in an OpenVPN connection, supporting both IPv4 and IPv6 protocols with configurable flags. It provides string representation and JSON serialization/deserialization capabilities (when JSON support is enabled).

Definition at line 132 of file capture.hpp.

Member Function Documentation

◆ from_json()

void openvpn::TunBuilderCapture::RerouteGW::from_json ( const Json::Value &  root,
const std::string &  title 
)
inline

Deserializes the object from a JSON value.

Populates the object's fields from a JSON object. Only available when JSON support is enabled (HAVE_JSON defined).

Parameters
rootThe JSON object to extract values from.
titleA title/context string used for error reporting.

Definition at line 177 of file capture.hpp.

◆ to_json()

Json::Value openvpn::TunBuilderCapture::RerouteGW::to_json ( ) const
inline

Serializes the object to a JSON value.

Creates a JSON object containing the current IPv4, IPv6, and flags values. Only available when JSON support is enabled (HAVE_JSON defined).

Returns
A JSON representation of the reroute gateway configuration.

Definition at line 161 of file capture.hpp.

Here is the caller graph for this function:

◆ to_string()

std::string openvpn::TunBuilderCapture::RerouteGW::to_string ( ) const
inline

Converts the object to a human-readable string representation.

Creates a string describing the current state of the object, including IPv4/IPv6 status and flags using the RedirectGatewayFlags helper class.

Returns
A string representation of the reroute gateway configuration.

Definition at line 145 of file capture.hpp.

Here is the caller graph for this function:

Member Data Documentation

◆ flags

unsigned int openvpn::TunBuilderCapture::RerouteGW::flags = 0

Definition at line 137 of file capture.hpp.

◆ ipv4

bool openvpn::TunBuilderCapture::RerouteGW::ipv4 = false

Definition at line 135 of file capture.hpp.

◆ ipv6

bool openvpn::TunBuilderCapture::RerouteGW::ipv6 = false

Definition at line 136 of file capture.hpp.


The documentation for this class was generated from the following file: