Class: Nl::Genl::Family
- Inherits:
-
Family
- Object
- Family
- Nl::Genl::Family
- Defined in:
- nl/lib/nl/genl.rb
Overview
Base class for Generic Netlink families.
Direct Known Subclasses
Linux::Binder, Linux::DevEnergymodel, Linux::Devlink, Linux::Dpll, Linux::DrmRas, Linux::Ethtool, Linux::Fou, Linux::Handshake, Linux::Lockd, Linux::MptcpPm, Linux::NetShaper, Linux::Netdev, Linux::Nfsd, Linux::Nl80211, Linux::Nlctrl, Linux::Ovpn, Linux::OvsDatapath, Linux::OvsFlow, Linux::OvsPacket, Linux::OvsVport, Linux::Psp, Linux::Sunrpc, Linux::TcpMetrics, Linux::Team, Linux::Wireguard
Class Method Summary collapse
-
.open(resolver:, executor: nil, notification_capacity: DEFAULT_NOTIFICATION_CAPACITY) ⇒ Object
Opens a session for this Generic Netlink family.
-
.version ⇒ Integer
Returns the family-specific protocol version.
Class Method Details
.open(resolver:, executor: nil, notification_capacity: DEFAULT_NOTIFICATION_CAPACITY) ⇒ Family .open(resolver:, executor: nil, notification_capacity: DEFAULT_NOTIFICATION_CAPACITY) {|session| ... } ⇒ Object
Opens a session for this Generic Netlink family.
34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 |
# File 'nl/lib/nl/genl.rb', line 34 def self.open(resolver:, executor: nil, notification_capacity: DEFAULT_NOTIFICATION_CAPACITY) begin owner = Client.new(resolver:, executor:, notification_capacity:) session = owner.family(self).extend(Nl::Family::Session) rescue Exception owner&.close raise end return session unless block_given? begin yield session ensure session.close end end |
.version ⇒ Integer
Returns the family-specific protocol version.
15 |
# File 'nl/lib/nl/genl.rb', line 15 def self.version = self::VERSION |