Class: Nl::Linux::Conntrack

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

Overview

Netfilter connection tracking subsystem over nfnetlink

Defined Under Namespace

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

Constant Summary collapse

NAME =
"conntrack"
PROTONUM =
12

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

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

Overloads:

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

    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/conntrack.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:



2182
2183
2184
2185
# File 'nl-linux/generated/nl/linux/conntrack.rb', line 2182

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

#do_get(**args) ⇒ Messages::DoGetReply

get / dump entries

Parameters:

  • args (Hash)

Options Hash (**args):

  • nfgen_family (Integer)
  • version (Integer)
  • res_id (Integer)
  • tuple_orig (AttributeSets::TupleAttrs, Hash<Symbol, Object>) —

    conntrack l3+l4 protocol information, original direction

  • tuple_reply (AttributeSets::TupleAttrs, Hash<Symbol, Object>) —

    conntrack l3+l4 protocol information, reply direction

  • zone (Integer) —

    conntrack zone id

Returns:

See Also:



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

def do_get(**args)
  exchange_message(:"do", Messages::DoGetRequest, Messages::DoGetReply, args)
end

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

get / dump entries

Overloads:

See Also:



2105
2106
2107
# File 'nl-linux/generated/nl/linux/conntrack.rb', line 2105

def dump_get(**args, &block)
  exchange_message(:"dump", Messages::DumpGetRequest, Messages::DumpGetReply, args, &block)
end

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

dump pcpu conntrack stats

Overloads:

  • #dump_get_stats(**args) ⇒ Array<Messages::DumpGetStatsReply>

    Returns an array when no block is given.

    Parameters:

    • args (Hash)

    Options Hash (**args):

    • nfgen_family (Integer)
    • version (Integer)
    • res_id (Integer)

    Returns:

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

    This method returns an undefined value.

    Yields each reply when a block is given.

    Parameters:

    • args (Hash)

    Options Hash (**args):

    • nfgen_family (Integer)
    • version (Integer)
    • res_id (Integer)

    Yield Parameters:

See Also:



2127
2128
2129
# File 'nl-linux/generated/nl/linux/conntrack.rb', line 2127

def dump_get_stats(**args, &block)
  exchange_message(:"dump", Messages::DumpGetStatsRequest, Messages::DumpGetStatsReply, args, &block)
end