Constructor and Description |
---|
Ethernet.Builder()
Create a new builder using the defaults:
|
Ethernet.Builder(Ethernet eth)
Copy constructor builder initialized from the passed in protocol.
|
Modifier and Type | Method and Description |
---|---|
Ethernet |
build()
Creates a new protocol instance from this builder.
|
Ethernet.Builder |
control(Ethernet.Control control)
Sets the 802.3 control type.
|
Ethernet.Builder |
dsap(Ethernet.Dsap dsap)
Sets the destination service access point.
|
Ethernet.Builder |
dstAddr(MacAddress dstAddr)
Sets the destination address.
|
Ethernet.Builder |
snapId(Ethernet.SnapId snapId)
Sets the SNAP ID.
|
Ethernet.Builder |
srcAddr(MacAddress srcAddr)
Sets the source address.
|
Ethernet.Builder |
ssap(Ethernet.Ssap ssap)
Sets the source service access point.
|
Ethernet.Builder |
type(EthernetType type)
Sets the ethernet type.
|
Ethernet.Builder |
vlanDei(boolean vlanDei)
Sets the VLAN Drop Eligibility Indicator flag.
|
Ethernet.Builder |
vlanId(int vlanId)
Sets the VLAN ID.
|
Ethernet.Builder |
vlanPriority(Ethernet.VlanPriority vlanPriority)
Sets the VLAN priority.
|
public Ethernet.Builder()
type = IPv4 (NONE indicates 802.3 Snap) vlanId = 0 (0 < indicates 802.1Q VLAN ID) vlanPriority = PRIORITY_1 dsap = NO_DSAP ssap = NO_SSAP control = NO_CONTROL snapId = NO_SNAP_ID
public Ethernet.Builder(Ethernet eth)
eth
- builder is initialed from this protocol's datapublic Ethernet build()
public Ethernet.Builder dstAddr(MacAddress dstAddr)
dstAddr
- destination addresspublic Ethernet.Builder srcAddr(MacAddress srcAddr)
srcAddr
- source addresspublic Ethernet.Builder type(EthernetType type)
Ethernet.NONE
indicates
an 802.3 encoding.type
- ethernet typepublic Ethernet.Builder vlanId(int vlanId)
vlanId
- VLAN IDpublic Ethernet.Builder vlanDei(boolean vlanDei)
vlanDei
- VLAN DEI flag valuepublic Ethernet.Builder vlanPriority(Ethernet.VlanPriority vlanPriority)
vlanPriority
- VLAN prioritypublic Ethernet.Builder dsap(Ethernet.Dsap dsap)
dsap
- destination service access point.public Ethernet.Builder ssap(Ethernet.Ssap ssap)
ssap
- source service access point.public Ethernet.Builder control(Ethernet.Control control)
control
- 802.3 control typepublic Ethernet.Builder snapId(Ethernet.SnapId snapId)
snapId
- SNAP IDCopyright © 2015. All Rights Reserved.