Class: Ifconf::EthernetLinkLayer
- Defined in:
- lib/ifconf/ethernet_link_layer.rb
Overview
Link layer for Ethernet interfaces, requiring a hardware (MAC) address.
Instance Attribute Summary
Attributes inherited from LinkLayer
#encapsulation, #hardware_addr, #tx_queue_len
Instance Method Summary collapse
-
#initialize(hardware_addr:, tx_queue_len:) ⇒ EthernetLinkLayer
constructor
A new instance of EthernetLinkLayer.
Methods inherited from LinkLayer
Constructor Details
#initialize(hardware_addr:, tx_queue_len:) ⇒ EthernetLinkLayer
Returns a new instance of EthernetLinkLayer.
4 5 6 7 8 |
# File 'lib/ifconf/ethernet_link_layer.rb', line 4 def initialize(hardware_addr:, tx_queue_len:) raise Ifconf::Error, "ethernet requires hardware address" unless hardware_addr super(encapsulation: :ethernet, hardware_addr: hardware_addr, tx_queue_len: tx_queue_len) end |