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

Windows Internet Name Service (WINS) server configuration. More...

#include <capture.hpp>

Public Member Functions

std::string to_string () const
 Converts the WINS server to a string representation.
 
void validate (const std::string &title) const
 Validates the WINS server address.
 
Json::Value to_json () const
 Serializes the WINS server to a JSON object.
 
void from_json (const Json::Value &root, const std::string &title)
 Deserializes a WINS server from a JSON object.
 

Public Attributes

std::string address
 

Detailed Description

Windows Internet Name Service (WINS) server configuration.

Represents a WINS server with its IPv4 address. WINS provides name resolution services in Microsoft Windows networks, allowing NetBIOS names to be mapped to IP addresses.

Definition at line 564 of file capture.hpp.

Member Function Documentation

◆ from_json()

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

Deserializes a WINS server from a JSON object.

Extracts the "address" field from the JSON object and assigns it to the server address.

Parameters
rootThe JSON object to deserialize from.
titleThe context name used in error messages.

Definition at line 611 of file capture.hpp.

◆ to_json()

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

Serializes the WINS server to a JSON object.

Creates a JSON object with the "address" field containing the server's IP address.

Returns
A JSON object representing the WINS server.

Definition at line 597 of file capture.hpp.

◆ to_string()

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

Converts the WINS server to a string representation.

Returns
The WINS server's IP address as a string.

Definition at line 573 of file capture.hpp.

Here is the caller graph for this function:

◆ validate()

void openvpn::TunBuilderCapture::WINSServer::validate ( const std::string &  title) const
inline

Validates the WINS server address.

Checks if the address is a valid IPv4 address. Throws an exception if the address is invalid.

Parameters
titleThe context name used in error messages.

Definition at line 585 of file capture.hpp.

Member Data Documentation

◆ address

std::string openvpn::TunBuilderCapture::WINSServer::address

Definition at line 567 of file capture.hpp.


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