public class RouterAdvertisement extends BasePacket
| Modifier and Type | Field and Description |
|---|---|
protected byte |
currentHopLimit |
static byte |
HEADER_LENGTH |
protected byte |
mFlag |
protected byte |
oFlag |
protected int |
reachableTime |
protected int |
retransmitTimer |
protected short |
routerLifetime |
parent, payload| Constructor and Description |
|---|
RouterAdvertisement() |
| Modifier and Type | Method and Description |
|---|---|
RouterAdvertisement |
addOption(byte type,
byte[] data)
Adds a Neighbor Discovery Protocol packet option.
|
static Deserializer<RouterAdvertisement> |
deserializer()
Deserializer function for router advertisement packets.
|
boolean |
equals(java.lang.Object obj) |
byte |
getCurrentHopLimit()
Gets current hop limit.
|
byte |
getMFlag()
Gets managed address configuration flag.
|
byte |
getOFlag()
Gets other configuration flag.
|
java.util.List<NeighborDiscoveryOptions.Option> |
getOptions()
Gets the Neighbor Discovery Protocol packet options.
|
int |
getReachableTime()
Gets reachable time.
|
int |
getRetransmitTimer()
Gets retransmission timer.
|
short |
getRouterLifetime()
Gets router lifetime.
|
int |
hashCode() |
byte[] |
serialize()
Sets all payloads parent packet if applicable, then serializes this
packet and all payloads.
|
RouterAdvertisement |
setCurrentHopLimit(byte currentHopLimit)
Sets current hop limit.
|
RouterAdvertisement |
setMFlag(byte mFlag)
Sets managed address configuration flag.
|
RouterAdvertisement |
setOFlag(byte oFlag)
Sets other configuration flag.
|
RouterAdvertisement |
setReachableTime(int reachableTime)
Sets reachable time.
|
RouterAdvertisement |
setRetransmitTimer(int retransmitTimer)
Sets retransmission timer.
|
RouterAdvertisement |
setRouterLifetime(short routerLifetime)
Sets router lifetime.
|
java.lang.String |
toString() |
clone, getParent, getPayload, resetChecksum, setParent, setPayloadpublic static final byte HEADER_LENGTH
protected byte currentHopLimit
protected byte mFlag
protected byte oFlag
protected short routerLifetime
protected int reachableTime
protected int retransmitTimer
public byte getCurrentHopLimit()
public RouterAdvertisement setCurrentHopLimit(byte currentHopLimit)
currentHopLimit - the current hop limit to setpublic byte getMFlag()
public RouterAdvertisement setMFlag(byte mFlag)
mFlag - the managed address configuration flag to setpublic byte getOFlag()
public RouterAdvertisement setOFlag(byte oFlag)
oFlag - the other configuration flag to setpublic short getRouterLifetime()
public RouterAdvertisement setRouterLifetime(short routerLifetime)
routerLifetime - the router lifetime to setpublic int getReachableTime()
public RouterAdvertisement setReachableTime(int reachableTime)
reachableTime - the reachable time to setpublic int getRetransmitTimer()
public RouterAdvertisement setRetransmitTimer(int retransmitTimer)
retransmitTimer - the retransmission timer to setpublic java.util.List<NeighborDiscoveryOptions.Option> getOptions()
public RouterAdvertisement addOption(byte type, byte[] data)
type - the option typedata - the option datapublic byte[] serialize()
IPacketpublic int hashCode()
hashCode in class BasePacketpublic boolean equals(java.lang.Object obj)
equals in class BasePacketpublic static Deserializer<RouterAdvertisement> deserializer()
public java.lang.String toString()
toString in class java.lang.Object