Constructor and Description |
---|
Ip.Builder()
Create a new builder using the defaults:
|
Ip.Builder(Ip ip)
Copy constructor builder initialized from the passed in protocol.
|
Modifier and Type | Method and Description |
---|---|
Ip |
build()
Creates a new protocol instance from this builder.
|
Ip.Builder |
doNotFrag(boolean doNotFrag)
Sets the flag to not fragment this packet.
|
Ip.Builder |
dstAddr(IpAddress dstAddr)
Sets the destination address.
|
Ip.Builder |
fragOffset(int fragOffset)
Sets the fragment offset.
|
Ip.Builder |
ident(int ident)
Sets the identifier value assigned by the sender.
|
Ip.Builder |
moreFragToCome(boolean moreFragToCome)
Sets the flag to indicate that more fragments are coming.
|
Ip.Builder |
options(byte[] options)
Sets the options bytes.
|
Ip.Builder |
srcAddr(IpAddress srcAddr)
Sets the source address.
|
Ip.Builder |
tosDsfc(IpTosDsfc tosDsfc)
Sets the TOS Differentiated Services Field Codepoints (DSFC) type.
|
Ip.Builder |
tosEcn(IpTosEcn tosEcn)
Sets the TOS Explicit Congestion Notification (ECN) type.
|
Ip.Builder |
ttl(int ttl)
Sets the time to live seconds.
|
Ip.Builder |
type(IpType type)
Sets the protocol type.
|
public Ip.Builder()
tosDsfc = CS0 tosEcn = NOT_ECT ident = 0 doNotFrag = false moreFragToCome = false fragOffset = 0 ttl = 0 type = null options = EMPTY_BYTES
public Ip.Builder(Ip ip)
ip
- builder is initialed from this protocol's datapublic Ip build()
public Ip.Builder ident(int ident)
ident
- identifier valuepublic Ip.Builder tosDsfc(IpTosDsfc tosDsfc)
tosDsfc
- TOS DSFC typepublic Ip.Builder tosEcn(IpTosEcn tosEcn)
tosEcn
- TOS ECN typepublic Ip.Builder fragOffset(int fragOffset)
fragOffset
- fragment offsetpublic Ip.Builder doNotFrag(boolean doNotFrag)
doNotFrag
- do not fragmentpublic Ip.Builder moreFragToCome(boolean moreFragToCome)
moreFragToCome
- if true, more fragments are comingpublic Ip.Builder ttl(int ttl)
ttl
- time to live secondspublic Ip.Builder type(IpType type)
type
- protocol typepublic Ip.Builder srcAddr(IpAddress srcAddr)
srcAddr
- source addresspublic Ip.Builder dstAddr(IpAddress dstAddr)
dstAddr
- destination addresspublic Ip.Builder options(byte[] options)
options
- encoded option bytesCopyright © 2015. All Rights Reserved.