Class: Nl::Linux::Psp::AsyncOperations

Inherits:
Object
  • Object
show all
Defined in:
nl-linux/generated/nl/linux/psp.rb

Instance Method Summary collapse

Instance Method Details

#do_dev_assoc(**args) ⇒ Nl::Async::Future<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:



1508
1509
1510
# File 'nl-linux/generated/nl/linux/psp.rb', line 1508

def do_dev_assoc(**args)
  @exchange.call(:"do", Messages::DoDevAssocRequest, Messages::DoDevAssocReply, args)
end

#do_dev_disassoc(**args) ⇒ Nl::Async::Future<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:



1524
1525
1526
# File 'nl-linux/generated/nl/linux/psp.rb', line 1524

def do_dev_disassoc(**args)
  @exchange.call(:"do", Messages::DoDevDisassocRequest, Messages::DoDevDisassocReply, args)
end

#do_dev_get(**args) ⇒ Nl::Async::Future<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:



1411
1412
1413
# File 'nl-linux/generated/nl/linux/psp.rb', line 1411

def do_dev_get(**args)
  @exchange.call(:"do", Messages::DoDevGetRequest, Messages::DoDevGetReply, args)
end

#do_dev_set(**args) ⇒ Nl::Async::Future<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 Flags::Version.

Returns:

See Also:



1433
1434
1435
# File 'nl-linux/generated/nl/linux/psp.rb', line 1433

def do_dev_set(**args)
  @exchange.call(:"do", Messages::DoDevSetRequest, Messages::DoDevSetReply, args)
end

#do_get_stats(**args) ⇒ Nl::Async::Future<Messages::DoGetStatsReply>

Get device statistics.

Parameters:

  • args (Hash)

Options Hash (**args):

  • dev_id (Integer) —

    PSP device ID.

Returns:

See Also:



1484
1485
1486
# File 'nl-linux/generated/nl/linux/psp.rb', line 1484

def do_get_stats(**args)
  @exchange.call(:"do", Messages::DoGetStatsRequest, Messages::DoGetStatsReply, args)
end

#do_key_rotate(**args) ⇒ Nl::Async::Future<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:



1444
1445
1446
# File 'nl-linux/generated/nl/linux/psp.rb', line 1444

def do_key_rotate(**args)
  @exchange.call(:"do", Messages::DoKeyRotateRequest, Messages::DoKeyRotateReply, args)
end

#do_rx_assoc(**args) ⇒ Nl::Async::Future<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 Enums::Version.

  • sock_fd (Integer) —

    Sockets which should be bound to the association immediately.

Returns:

See Also:



1459
1460
1461
# File 'nl-linux/generated/nl/linux/psp.rb', line 1459

def do_rx_assoc(**args)
  @exchange.call(:"do", Messages::DoRxAssocRequest, Messages::DoRxAssocReply, args)
end

#do_tx_assoc(**args) ⇒ Nl::Async::Future<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 Enums::Version.

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

    Sockets which should be bound to the association immediately.

Returns:

See Also:



1475
1476
1477
# File 'nl-linux/generated/nl/linux/psp.rb', line 1475

def do_tx_assoc(**args)
  @exchange.call(:"do", Messages::DoTxAssocRequest, Messages::DoTxAssocReply, args)
end

#dump_dev_get(**args) ⇒ Nl::Async::Stream<Messages::DumpDevGetReply>

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

Parameters:

  • args (Hash)

Returns:

See Also:



1419
1420
1421
# File 'nl-linux/generated/nl/linux/psp.rb', line 1419

def dump_dev_get(**args)
  @exchange.call(:"dump", Messages::DumpDevGetRequest, Messages::DumpDevGetReply, args)
end

#dump_get_stats(**args) ⇒ Nl::Async::Stream<Messages::DumpGetStatsReply>

Get device statistics.

Parameters:

  • args (Hash)

Returns:

See Also:



1492
1493
1494
# File 'nl-linux/generated/nl/linux/psp.rb', line 1492

def dump_get_stats(**args)
  @exchange.call(:"dump", Messages::DumpGetStatsRequest, Messages::DumpGetStatsReply, args)
end