Class: Libnet::VLAN
Overview
VLAN
Class to represent an IEEE 802.1q VLAN tagging header.
Example
v = Libnet::VLAN.new
v.dst = 'aa:bb:cc:dd:ee:ff'
v.src = '11:22:33:44:55:66'
v.tpi = 0xbeef
v.priority = 6
v.cfi = 0
v.id = 2730
v.type = 0x0800
v.payload = "this is the message"
Public Class Methods
decode(string) -> new VLAN object
Decode a packed vlan packet.
Public Instance Methods
dst, dst=, dst?
Get/set/query the destination MAC address.
src, src=, src?
Get/set/query the source MAC address.
tpi, tpi=, tpi?
Get/set/query the tag protocol identifier.
priority, priority=, priority?
Get/set/query the priority.
cfi, cfi=, cfi?
Get/set/query the canonical format indicator.
id, id=, id?
Get/set/query the vlan identifier.
len, len=, len? or type, type=, type?
Get/set/query the length/type.
payload, payload=, payload?
Get/set/query the payload.
ptag
Get the ptag value for this header object. Set by the Libnet builder method.
Constant Summary
Constants inherited from Header
Header::DEFAULT_OPTS, Header::HWADDR_RE, Header::IPADDR_RE, Header::UNIT_MULTIPLIERS
Instance Attribute Summary
Attributes inherited from Header
Method Summary
Methods inherited from Header
assignment_filter, decode, fields, inherited, #initialize, octets_field, unsigned_field
Methods included from Helpers
Constructor Details
This class inherits a constructor from Libnet::Header