Class: Nl::Linux::RtAddr

Inherits:
Raw::Family show all
Defined in:
nl-linux/generated/nl/linux/rt_addr.rb

Overview

Address configuration over rtnetlink.

Defined Under Namespace

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

Constant Summary collapse

NAME =
"rt-addr"
PROTONUM =
0

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.open(executor: nil, notification_capacity: DEFAULT_NOTIFICATION_CAPACITY) ⇒ RtAddr .open(executor: nil, notification_capacity: DEFAULT_NOTIFICATION_CAPACITY) {|family| ... } ⇒ Object

Overloads:

  • .open(executor: nil, notification_capacity: DEFAULT_NOTIFICATION_CAPACITY) ⇒ RtAddr

    Parameters:

    • executor (Symbol, nil) (defaults to: nil)
    • notification_capacity (Integer, nil) (defaults to: DEFAULT_NOTIFICATION_CAPACITY)

    Returns:

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

    Returns the result of the block.

    Parameters:

    • executor (Symbol, nil) (defaults to: nil)
    • notification_capacity (Integer, nil) (defaults to: DEFAULT_NOTIFICATION_CAPACITY)

    Yield Parameters:

    Returns:

    • (Object) —

      the result of the block



24
25
26
# File 'nl-linux/generated/nl/linux/rt_addr.rb', line 24

def self.open(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:



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

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

#do_deladdr(**args) ⇒ void

This method returns an undefined value.

Remove address

Parameters:

  • args (Hash)

Options Hash (**args):

  • ifa_family (Integer)
  • ifa_prefixlen (Integer)
  • ifa_flags (Integer)
  • ifa_scope (Integer)
  • ifa_index (Integer)
  • address (String)
  • local (String)

See Also:



544
545
546
# File 'nl-linux/generated/nl/linux/rt_addr.rb', line 544

def do_deladdr(**args)
  exchange_message(:"do", Messages::DoDeladdrRequest, nil, args)
end

#do_getmulticast(**args) ⇒ Messages::DoGetmulticastReply

Get / dump IPv4/IPv6 multicast addresses.

Parameters:

  • args (Hash)

Options Hash (**args):

  • ifa_family (Integer)
  • ifa_prefixlen (Integer)
  • ifa_flags (Integer)
  • ifa_scope (Integer)
  • ifa_index (Integer)

Returns:

See Also:



583
584
585
# File 'nl-linux/generated/nl/linux/rt_addr.rb', line 583

def do_getmulticast(**args)
  exchange_message(:"do", Messages::DoGetmulticastRequest, Messages::DoGetmulticastReply, args)
end

#do_newaddr(**args) ⇒ void

This method returns an undefined value.

Add new address

Parameters:

  • args (Hash)

Options Hash (**args):

  • ifa_family (Integer)
  • ifa_prefixlen (Integer)
  • ifa_flags (Integer)
  • ifa_scope (Integer)
  • ifa_index (Integer)
  • address (String)
  • local (String)
  • label (String)
  • cacheinfo (Structs::IfaCacheinfo, Hash<Symbol, Object>)

See Also:



529
530
531
# File 'nl-linux/generated/nl/linux/rt_addr.rb', line 529

def do_newaddr(**args)
  exchange_message(:"do", Messages::DoNewaddrRequest, nil, args)
end

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

Dump address information.

Overloads:

  • #dump_getaddr(**args) ⇒ Array<Messages::DumpGetaddrReply>

    Returns an array when no block is given.

    Parameters:

    • args (Hash)

    Options Hash (**args):

    • ifa_family (Integer)
    • ifa_prefixlen (Integer)
    • ifa_flags (Integer)
    • ifa_scope (Integer)
    • ifa_index (Integer)

    Returns:

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

    This method returns an undefined value.

    Yields each reply when a block is given.

    Parameters:

    • args (Hash)

    Options Hash (**args):

    • ifa_family (Integer)
    • ifa_prefixlen (Integer)
    • ifa_flags (Integer)
    • ifa_scope (Integer)
    • ifa_index (Integer)

    Yield Parameters:

See Also:



570
571
572
# File 'nl-linux/generated/nl/linux/rt_addr.rb', line 570

def dump_getaddr(**args, &block)
  exchange_message(:"dump", Messages::DumpGetaddrRequest, Messages::DumpGetaddrReply, args, &block)
end

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

Get / dump IPv4/IPv6 multicast addresses.

Overloads:

  • #dump_getmulticast(**args) ⇒ Array<Messages::DumpGetmulticastReply>

    Returns an array when no block is given.

    Parameters:

    • args (Hash)

    Options Hash (**args):

    • ifa_family (Integer)
    • ifa_prefixlen (Integer)
    • ifa_flags (Integer)
    • ifa_scope (Integer)
    • ifa_index (Integer)

    Returns:

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

    This method returns an undefined value.

    Yields each reply when a block is given.

    Parameters:

    • args (Hash)

    Options Hash (**args):

    • ifa_family (Integer)
    • ifa_prefixlen (Integer)
    • ifa_flags (Integer)
    • ifa_scope (Integer)
    • ifa_index (Integer)

    Yield Parameters:

See Also:



609
610
611
# File 'nl-linux/generated/nl/linux/rt_addr.rb', line 609

def dump_getmulticast(**args, &block)
  exchange_message(:"dump", Messages::DumpGetmulticastRequest, Messages::DumpGetmulticastReply, args, &block)
end

#subscribe(*groups) ⇒ self

Parameters:

  • groups (Array<:rtnlgrp_ipv4_ifaddr, :rtnlgrp_ipv6_ifaddr>)

Returns:

  • (self)


700
701
702
703
# File 'nl-linux/generated/nl/linux/rt_addr.rb', line 700

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

#unsubscribe(*groups) ⇒ self

Parameters:

  • groups (Array<:rtnlgrp_ipv4_ifaddr, :rtnlgrp_ipv6_ifaddr>)

Returns:

  • (self)


704
# File 'nl-linux/generated/nl/linux/rt_addr.rb', line 704

def unsubscribe(*groups) = super