Class: Nl::Linux::Psp

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

Overview

PSP Security Protocol Generic Netlink family.

Defined Under Namespace

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

Constant Summary collapse

NAME =
"psp"
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) ⇒ Psp .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) ⇒ Psp

    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



26
27
28
# File 'nl-linux/generated/nl/linux/psp.rb', line 26

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:



1532
1533
1534
1535
# File 'nl-linux/generated/nl/linux/psp.rb', line 1532

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

#do_dev_assoc(**args) ⇒ Messages::DoDevAssocReply

Associate a network device with a PSP device.

Requires CAP_NET_ADMIN in the initial user namespace.

Parameters:

  • args (Hash)

Options Hash (**args):

  • id (Integer) —

    PSP device ID.

  • ifindex (Integer) —

    ifindex of the main netdevice linked to the PSP device, or the ifindex to associate with the PSP device.

  • nsid (Integer) —

    Network namespace ID for the device to associate/disassociate. Optional for dev-assoc and dev-disassoc; if not present, the device is looked up in the caller's network namespace.

Returns:

See Also:



1381
1382
1383
# File 'nl-linux/generated/nl/linux/psp.rb', line 1381

def do_dev_assoc(**args)
  exchange_message(:"do", Messages::DoDevAssocRequest, Messages::DoDevAssocReply, args)
end

#do_dev_disassoc(**args) ⇒ Messages::DoDevDisassocReply

Disassociate a network device from a PSP device.

Requires CAP_NET_ADMIN in the initial user namespace.

Parameters:

  • args (Hash)

Options Hash (**args):

  • id (Integer) —

    PSP device ID.

  • ifindex (Integer) —

    ifindex of the main netdevice linked to the PSP device, or the ifindex to associate with the PSP device.

  • nsid (Integer) —

    Network namespace ID for the device to associate/disassociate. Optional for dev-assoc and dev-disassoc; if not present, the device is looked up in the caller's network namespace.

Returns:

See Also:



1397
1398
1399
# File 'nl-linux/generated/nl/linux/psp.rb', line 1397

def do_dev_disassoc(**args)
  exchange_message(:"do", Messages::DoDevDisassocRequest, Messages::DoDevDisassocReply, args)
end

#do_dev_get(**args) ⇒ Messages::DoDevGetReply

Get / dump information about PSP capable devices on the system.

Parameters:

  • args (Hash)

Options Hash (**args):

  • id (Integer) —

    PSP device ID.

Returns:

See Also:



1268
1269
1270
# File 'nl-linux/generated/nl/linux/psp.rb', line 1268

def do_dev_get(**args)
  exchange_message(:"do", Messages::DoDevGetRequest, Messages::DoDevGetReply, args)
end

#do_dev_set(**args) ⇒ Messages::DoDevSetReply

Set the configuration of a PSP device.

Requires CAP_NET_ADMIN in the initial user namespace.

Parameters:

  • args (Hash)

Options Hash (**args):

  • id (Integer) —

    PSP device ID.

  • psp_versions_ena (Integer) —

    Bitmask of currently enabled (accepted on Rx) PSP versions.

    Known flags are defined in Nl::Linux::Psp::Flags::Version.

Returns:

See Also:



1298
1299
1300
# File 'nl-linux/generated/nl/linux/psp.rb', line 1298

def do_dev_set(**args)
  exchange_message(:"do", Messages::DoDevSetRequest, Messages::DoDevSetReply, args)
end

#do_get_stats(**args) ⇒ Messages::DoGetStatsReply

Get device statistics.

Parameters:

  • args (Hash)

Options Hash (**args):

  • dev_id (Integer) —

    PSP device ID.

Returns:

See Also:



1349
1350
1351
# File 'nl-linux/generated/nl/linux/psp.rb', line 1349

def do_get_stats(**args)
  exchange_message(:"do", Messages::DoGetStatsRequest, Messages::DoGetStatsReply, args)
end

#do_key_rotate(**args) ⇒ Messages::DoKeyRotateReply

Rotate the device key.

Requires CAP_NET_ADMIN in the initial user namespace.

Parameters:

  • args (Hash)

Options Hash (**args):

  • id (Integer) —

    PSP device ID.

Returns:

See Also:



1309
1310
1311
# File 'nl-linux/generated/nl/linux/psp.rb', line 1309

def do_key_rotate(**args)
  exchange_message(:"do", Messages::DoKeyRotateRequest, Messages::DoKeyRotateReply, args)
end

#do_rx_assoc(**args) ⇒ Messages::DoRxAssocReply

Allocate a new Rx key + SPI pair, associate it with a socket.

Parameters:

  • args (Hash)

Options Hash (**args):

  • dev_id (Integer) —

    PSP device ID.

  • version (Integer) —

    PSP versions (AEAD and protocol version) used by this association, dictates the size of the key.

    Known enum values are defined in Nl::Linux::Psp::Enums::Version.

  • sock_fd (Integer) —

    Sockets which should be bound to the association immediately.

Returns:

See Also:



1324
1325
1326
# File 'nl-linux/generated/nl/linux/psp.rb', line 1324

def do_rx_assoc(**args)
  exchange_message(:"do", Messages::DoRxAssocRequest, Messages::DoRxAssocReply, args)
end

#do_tx_assoc(**args) ⇒ Messages::DoTxAssocReply

Add a PSP Tx association.

Parameters:

  • args (Hash)

Options Hash (**args):

  • dev_id (Integer) —

    PSP device ID.

  • version (Integer) —

    PSP versions (AEAD and protocol version) used by this association, dictates the size of the key.

    Known enum values are defined in Nl::Linux::Psp::Enums::Version.

  • tx_key (AttributeSets::Keys, Hash<Symbol, Object>)
  • sock_fd (Integer) —

    Sockets which should be bound to the association immediately.

Returns:

See Also:



1340
1341
1342
# File 'nl-linux/generated/nl/linux/psp.rb', line 1340

def do_tx_assoc(**args)
  exchange_message(:"do", Messages::DoTxAssocRequest, Messages::DoTxAssocReply, args)
end

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

Get / dump information about PSP capable devices on the system.

Overloads:

See Also:



1284
1285
1286
# File 'nl-linux/generated/nl/linux/psp.rb', line 1284

def dump_dev_get(**args, &block)
  exchange_message(:"dump", Messages::DumpDevGetRequest, Messages::DumpDevGetReply, args, &block)
end

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

Get device statistics.

Overloads:

See Also:



1365
1366
1367
# File 'nl-linux/generated/nl/linux/psp.rb', line 1365

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

#subscribe(*groups) ⇒ self

Parameters:

  • groups (Array<:mgmt, :use>)

Returns:

  • (self)


1539
1540
1541
1542
# File 'nl-linux/generated/nl/linux/psp.rb', line 1539

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

#unsubscribe(*groups) ⇒ self

Parameters:

  • groups (Array<:mgmt, :use>)

Returns:

  • (self)


1543
# File 'nl-linux/generated/nl/linux/psp.rb', line 1543

def unsubscribe(*groups) = super