Class: Nl::Linux::RtNeigh

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

Overview

IP neighbour management over rtnetlink.

Defined Under Namespace

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

Constant Summary collapse

NAME =
"rt-neigh"
PROTONUM =
0

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

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

Overloads:

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

    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_neigh.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:



1650
1651
1652
1653
# File 'nl-linux/generated/nl/linux/rt_neigh.rb', line 1650

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

#do_delneigh(**args) ⇒ void

This method returns an undefined value.

Remove an existing neighbour entry

Parameters:

  • args (Hash)

Options Hash (**args):

  • ndm_family (Integer)
  • ndm_ifindex (Integer)
  • ndm_state (Integer)
  • ndm_flags (Integer)
  • ndm_type (Integer)
  • dst (String)
  • ifindex (Integer)

See Also:



1467
1468
1469
# File 'nl-linux/generated/nl/linux/rt_neigh.rb', line 1467

def do_delneigh(**args)
  exchange_message(:"do", Messages::DoDelneighRequest, nil, args)
end

#do_getneigh(**args) ⇒ Messages::DoGetneighReply

Get or dump neighbour entries

Parameters:

  • args (Hash)

Options Hash (**args):

  • ndm_family (Integer)
  • ndm_ifindex (Integer)
  • ndm_state (Integer)
  • ndm_flags (Integer)
  • ndm_type (Integer)
  • dst (String)

Returns:

See Also:



1481
1482
1483
# File 'nl-linux/generated/nl/linux/rt_neigh.rb', line 1481

def do_getneigh(**args)
  exchange_message(:"do", Messages::DoGetneighRequest, Messages::DoGetneighReply, args)
end

#do_newneigh(**args) ⇒ void

This method returns an undefined value.

Add new neighbour entry

Parameters:

  • args (Hash)

Options Hash (**args):

  • ndm_family (Integer)
  • ndm_ifindex (Integer)
  • ndm_state (Integer)
  • ndm_flags (Integer)
  • ndm_type (Integer)
  • dst (String)
  • lladdr (String)
  • probes (Integer)
  • vlan (Integer)
  • port (Integer)
  • vni (Integer)
  • ifindex (Integer)
  • master (Integer)
  • protocol (Integer)
  • nh_id (Integer)
  • fdb_ext_attrs (String)
  • flags_ext (Integer) —

    Known flags are defined in Nl::Linux::RtNeigh::Flags::NtfExtFlags.

See Also:



1452
1453
1454
# File 'nl-linux/generated/nl/linux/rt_neigh.rb', line 1452

def do_newneigh(**args)
  exchange_message(:"do", Messages::DoNewneighRequest, nil, args)
end

#do_setneightbl(**args) ⇒ void

This method returns an undefined value.

Set neighbour tables

Parameters:

  • args (Hash)

Options Hash (**args):

  • family (Integer)
  • name (String)
  • thresh1 (Integer)
  • thresh2 (Integer)
  • thresh3 (Integer)
  • parms (AttributeSets::NdtpaAttrs, Hash<Symbol, Object>)
  • gc_interval (Integer)

See Also:



1544
1545
1546
# File 'nl-linux/generated/nl/linux/rt_neigh.rb', line 1544

def do_setneightbl(**args)
  exchange_message(:"do", Messages::DoSetneightblRequest, nil, args)
end

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

Get or dump neighbour entries

Overloads:

  • #dump_getneigh(**args) ⇒ Array<Messages::DumpGetneighReply>

    Returns an array when no block is given.

    Parameters:

    • args (Hash)

    Options Hash (**args):

    • ndm_family (Integer)
    • ndm_ifindex (Integer)
    • ndm_state (Integer)
    • ndm_flags (Integer)
    • ndm_type (Integer)
    • ifindex (Integer)
    • master (Integer)

    Returns:

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

    This method returns an undefined value.

    Yields each reply when a block is given.

    Parameters:

    • args (Hash)

    Options Hash (**args):

    • ndm_family (Integer)
    • ndm_ifindex (Integer)
    • ndm_state (Integer)
    • ndm_flags (Integer)
    • ndm_type (Integer)
    • ifindex (Integer)
    • master (Integer)

    Yield Parameters:

See Also:



1511
1512
1513
# File 'nl-linux/generated/nl/linux/rt_neigh.rb', line 1511

def dump_getneigh(**args, &block)
  exchange_message(:"dump", Messages::DumpGetneighRequest, Messages::DumpGetneighReply, args, &block)
end

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

Get or dump neighbour tables

Overloads:

  • #dump_getneightbl(**args) ⇒ Array<Messages::DumpGetneightblReply>

    Returns an array when no block is given.

    Parameters:

    • args (Hash)

    Options Hash (**args):

    • family (Integer)

    Returns:

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

    This method returns an undefined value.

    Yields each reply when a block is given.

    Parameters:

    • args (Hash)

    Options Hash (**args):

    • family (Integer)

    Yield Parameters:

See Also:



1529
1530
1531
# File 'nl-linux/generated/nl/linux/rt_neigh.rb', line 1529

def dump_getneightbl(**args, &block)
  exchange_message(:"dump", Messages::DumpGetneightblRequest, Messages::DumpGetneightblReply, args, &block)
end

#subscribe(*groups) ⇒ self

Parameters:

  • groups (Array<:rtnlgrp_neigh>)

Returns:

  • (self)


1657
1658
1659
1660
# File 'nl-linux/generated/nl/linux/rt_neigh.rb', line 1657

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

#unsubscribe(*groups) ⇒ self

Parameters:

  • groups (Array<:rtnlgrp_neigh>)

Returns:

  • (self)


1661
# File 'nl-linux/generated/nl/linux/rt_neigh.rb', line 1661

def unsubscribe(*groups) = super