Class: Nl::Linux::Nlctrl

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

Overview

genetlink meta-family that exposes information about all genetlink families registered in the kernel (including itself).

Defined Under Namespace

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

Constant Summary collapse

NAME =
"nlctrl"
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) ⇒ Nlctrl .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) ⇒ Nlctrl

    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



27
28
29
# File 'nl-linux/generated/nl/linux/nlctrl.rb', line 27

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:



735
736
737
738
# File 'nl-linux/generated/nl/linux/nlctrl.rb', line 735

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

#do_getfamily(**args) ⇒ Messages::DoGetfamilyReply

Get / dump genetlink families

Parameters:

  • args (Hash)

Options Hash (**args):

  • family_name (String)

Returns:

See Also:



656
657
658
# File 'nl-linux/generated/nl/linux/nlctrl.rb', line 656

def do_getfamily(**args)
  exchange_message(:"do", Messages::DoGetfamilyRequest, Messages::DoGetfamilyReply, args)
end

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

Get / dump genetlink families

Overloads:

See Also:



672
673
674
# File 'nl-linux/generated/nl/linux/nlctrl.rb', line 672

def dump_getfamily(**args, &block)
  exchange_message(:"dump", Messages::DumpGetfamilyRequest, Messages::DumpGetfamilyReply, args, &block)
end

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

Get / dump genetlink policies

Overloads:

  • #dump_getpolicy(**args) ⇒ Array<Messages::DumpGetpolicyReply>

    Returns an array when no block is given.

    Parameters:

    • args (Hash)

    Options Hash (**args):

    • family_id (Integer)
    • family_name (String)
    • op (Integer)

    Returns:

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

    This method returns an undefined value.

    Yields each reply when a block is given.

    Parameters:

    • args (Hash)

    Options Hash (**args):

    • family_id (Integer)
    • family_name (String)
    • op (Integer)

    Yield Parameters:

See Also:



694
695
696
# File 'nl-linux/generated/nl/linux/nlctrl.rb', line 694

def dump_getpolicy(**args, &block)
  exchange_message(:"dump", Messages::DumpGetpolicyRequest, Messages::DumpGetpolicyReply, args, &block)
end