Class: Nl::Linux::Ovpn

Inherits:
Genl::Family show all
Defined in:
nl-linux/generated/nl/linux/ovpn.rb

Overview

Netlink protocol to control OpenVPN network devices

Defined Under Namespace

Modules: AttributeSets, Constants, Enums, Messages, Notifications, Structs Classes: AsyncOperations

Constant Summary collapse

NAME =
"ovpn"
VERSION =
1

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Genl::Family

version

Class Method Details

.open(resolver: ::Nl::Linux::DEFAULT_RESOLVER, executor: nil, notification_capacity: DEFAULT_NOTIFICATION_CAPACITY) ⇒ Ovpn .open(resolver: ::Nl::Linux::DEFAULT_RESOLVER, executor: nil, notification_capacity: DEFAULT_NOTIFICATION_CAPACITY) {|family| ... } ⇒ Object

Overloads:

  • .open(resolver: ::Nl::Linux::DEFAULT_RESOLVER, executor: nil, notification_capacity: DEFAULT_NOTIFICATION_CAPACITY) ⇒ Ovpn

    Parameters:

    • resolver (#call) (defaults to: ::Nl::Linux::DEFAULT_RESOLVER)
    • executor (Symbol, nil) (defaults to: nil)
    • notification_capacity (Integer, nil) (defaults to: DEFAULT_NOTIFICATION_CAPACITY)

    Returns:

  • .open(resolver: ::Nl::Linux::DEFAULT_RESOLVER, executor: nil, notification_capacity: DEFAULT_NOTIFICATION_CAPACITY) {|family| ... } ⇒ Object

    Returns the result of the block.

    Parameters:

    • resolver (#call) (defaults to: ::Nl::Linux::DEFAULT_RESOLVER)
    • executor (Symbol, nil) (defaults to: nil)
    • notification_capacity (Integer, nil) (defaults to: DEFAULT_NOTIFICATION_CAPACITY)

    Yield Parameters:

    Returns:

    • (Object) —

      the result of the block



33
34
35
# File 'nl-linux/generated/nl/linux/ovpn.rb', line 33

def self.open(resolver: ::Nl::Linux::DEFAULT_RESOLVER, executor: nil, notification_capacity: DEFAULT_NOTIFICATION_CAPACITY)
  super
end

Instance Method Details

#async(stream_capacity: nil) ⇒ AsyncOperations

Returns the asynchronous operation facade for this family.

Parameters:

  • stream_capacity (::Integer, nil) (defaults to: nil)

Returns:



2064
2065
2066
2067
# File 'nl-linux/generated/nl/linux/ovpn.rb', line 2064

def async(stream_capacity: nil)
  return @async_operations ||= build_async_facade(AsyncOperations) if stream_capacity.nil?
  build_async_facade(AsyncOperations, stream_capacity:)
end

#do_key_del(**args) ⇒ void

This method returns an undefined value.

Delete cipher key for a specific peer

Requires CAP_NET_ADMIN in the initial user namespace.

Parameters:

  • args (Hash)

Options Hash (**args):

  • ifindex (Integer) —

    Index of the ovpn interface to operate on

  • keyconf (AttributeSets::KeyconfDelInput, Hash<Symbol, Object>) —

    Peer specific cipher configuration

See Also:



1944
1945
1946
# File 'nl-linux/generated/nl/linux/ovpn.rb', line 1944

def do_key_del(**args)
  exchange_message(:"do", Messages::DoKeyDelRequest, nil, args)
end

#do_key_get(**args) ⇒ Messages::DoKeyGetReply

Retrieve non-sensitive data about peer key and cipher

Requires CAP_NET_ADMIN in the initial user namespace.

Parameters:

  • args (Hash)

Options Hash (**args):

  • ifindex (Integer) —

    Index of the ovpn interface to operate on

  • keyconf (AttributeSets::KeyconfGet, Hash<Symbol, Object>) —

    Peer specific cipher configuration

Returns:

See Also:



1920
1921
1922
# File 'nl-linux/generated/nl/linux/ovpn.rb', line 1920

def do_key_get(**args)
  exchange_message(:"do", Messages::DoKeyGetRequest, Messages::DoKeyGetReply, args)
end

#do_key_new(**args) ⇒ void

This method returns an undefined value.

Add a cipher key for a specific peer

Requires CAP_NET_ADMIN in the initial user namespace.

Parameters:

  • args (Hash)

Options Hash (**args):

  • ifindex (Integer) —

    Index of the ovpn interface to operate on

  • keyconf (AttributeSets::Keyconf, Hash<Symbol, Object>) —

    Peer specific cipher configuration

See Also:



1908
1909
1910
# File 'nl-linux/generated/nl/linux/ovpn.rb', line 1908

def do_key_new(**args)
  exchange_message(:"do", Messages::DoKeyNewRequest, nil, args)
end

#do_key_swap(**args) ⇒ void

This method returns an undefined value.

Swap primary and secondary session keys for a specific peer

Requires CAP_NET_ADMIN in the initial user namespace.

Parameters:

  • args (Hash)

Options Hash (**args):

  • ifindex (Integer) —

    Index of the ovpn interface to operate on

  • keyconf (AttributeSets::KeyconfSwapInput, Hash<Symbol, Object>) —

    Peer specific cipher configuration

See Also:



1932
1933
1934
# File 'nl-linux/generated/nl/linux/ovpn.rb', line 1932

def do_key_swap(**args)
  exchange_message(:"do", Messages::DoKeySwapRequest, nil, args)
end

#do_peer_del(**args) ⇒ void

This method returns an undefined value.

Delete existing remote peer

Requires CAP_NET_ADMIN in the initial user namespace.

Parameters:

  • args (Hash)

Options Hash (**args):

  • ifindex (Integer) —

    Index of the ovpn interface to operate on

  • peer (AttributeSets::PeerDelInput, Hash<Symbol, Object>) —

    The peer object containing the attributed of interest for the specific operation

See Also:



1896
1897
1898
# File 'nl-linux/generated/nl/linux/ovpn.rb', line 1896

def do_peer_del(**args)
  exchange_message(:"do", Messages::DoPeerDelRequest, nil, args)
end

#do_peer_get(**args) ⇒ Messages::DoPeerGetReply

Retrieve data about existing remote peers (or a specific one)

Requires CAP_NET_ADMIN in the initial user namespace.

Parameters:

  • args (Hash)

Options Hash (**args):

  • ifindex (Integer) —

    Index of the ovpn interface to operate on

  • peer (AttributeSets::Peer, Hash<Symbol, Object>) —

    The peer object containing the attributed of interest for the specific operation

Returns:

See Also:



1864
1865
1866
# File 'nl-linux/generated/nl/linux/ovpn.rb', line 1864

def do_peer_get(**args)
  exchange_message(:"do", Messages::DoPeerGetRequest, Messages::DoPeerGetReply, args)
end

#do_peer_new(**args) ⇒ void

This method returns an undefined value.

Add a remote peer

Requires CAP_NET_ADMIN in the initial user namespace.

Parameters:

  • args (Hash)

Options Hash (**args):

  • ifindex (Integer) —

    Index of the ovpn interface to operate on

  • peer (AttributeSets::PeerNewInput, Hash<Symbol, Object>) —

    The peer object containing the attributed of interest for the specific operation

See Also:



1840
1841
1842
# File 'nl-linux/generated/nl/linux/ovpn.rb', line 1840

def do_peer_new(**args)
  exchange_message(:"do", Messages::DoPeerNewRequest, nil, args)
end

#do_peer_set(**args) ⇒ void

This method returns an undefined value.

modify a remote peer

Requires CAP_NET_ADMIN in the initial user namespace.

Parameters:

  • args (Hash)

Options Hash (**args):

  • ifindex (Integer) —

    Index of the ovpn interface to operate on

  • peer (AttributeSets::PeerSetInput, Hash<Symbol, Object>) —

    The peer object containing the attributed of interest for the specific operation

See Also:



1852
1853
1854
# File 'nl-linux/generated/nl/linux/ovpn.rb', line 1852

def do_peer_set(**args)
  exchange_message(:"do", Messages::DoPeerSetRequest, nil, args)
end

#dump_peer_get(**args) ⇒ Array<Messages::DumpPeerGetReply> #dump_peer_get(**args) {|reply| ... } ⇒ void

Retrieve data about existing remote peers (or a specific one)

Requires CAP_NET_ADMIN in the initial user namespace.

Overloads:

  • #dump_peer_get(**args) ⇒ Array<Messages::DumpPeerGetReply>

    Returns an array when no block is given.

    Parameters:

    • args (Hash)

    Options Hash (**args):

    • ifindex (Integer) —

      Index of the ovpn interface to operate on

    Returns:

  • #dump_peer_get(**args) {|reply| ... } ⇒ void

    This method returns an undefined value.

    Yields each reply when a block is given.

    Parameters:

    • args (Hash)

    Options Hash (**args):

    • ifindex (Integer) —

      Index of the ovpn interface to operate on

    Yield Parameters:

See Also:



1884
1885
1886
# File 'nl-linux/generated/nl/linux/ovpn.rb', line 1884

def dump_peer_get(**args, &block)
  exchange_message(:"dump", Messages::DumpPeerGetRequest, Messages::DumpPeerGetReply, args, &block)
end

#subscribe(*groups) ⇒ self

Parameters:

  • groups (Array<:peers>)

Returns:

  • (self)


2071
2072
2073
2074
# File 'nl-linux/generated/nl/linux/ovpn.rb', line 2071

def subscribe(*groups) = super
# @rbs (*(:peers) groups) -> self
# @param [Array<:peers>] groups
# @return [self]

#unsubscribe(*groups) ⇒ self

Parameters:

  • groups (Array<:peers>)

Returns:

  • (self)


2075
# File 'nl-linux/generated/nl/linux/ovpn.rb', line 2075

def unsubscribe(*groups) = super