os_ken.lib.packet.ethernet.
ethernet
(dst='ff:ff:ff:ff:ff:ff', src='00:00:00:00:00:00', ethertype=2048)¶Ethernet header encoder/decoder class.
An instance has the following attributes at least. MAC addresses are represented as a string like '08:60:6e:7f:74:e7'. __init__ takes the corresponding args in this order.
Attribute | Description | Example |
---|---|---|
dst | destination address | 'ff:ff:ff:ff:ff:ff' |
src | source address | '08:60:6e:7f:74:e7' |
ethertype | ether type | 0x0800 |
get_packet_type
(type_)¶Override method for the ethernet IEEE802.3 Length/Type field (self.ethertype).
If the value of Length/Type field is less than or equal to 1500 decimal(05DC hexadecimal), it means Length interpretation and be passed to the LLC sublayer.
Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.