public class IPv4AddressTlv extends java.lang.Object implements BgpValueType
| Constructor and Description |
|---|
IPv4AddressTlv(org.onlab.packet.Ip4Address address,
short type)
Constructor to initialize parameters.
|
| Modifier and Type | Method and Description |
|---|---|
org.onlab.packet.Ip4Address |
address()
Returns Ipv4 address of interface/neighbor.
|
int |
compareTo(java.lang.Object o)
Compares two objects.
|
boolean |
equals(java.lang.Object obj) |
short |
getType()
Returns the Type of BGP Message.
|
int |
hashCode() |
static IPv4AddressTlv |
of(org.onlab.packet.Ip4Address address,
short type)
Returns object of this class with specified values.
|
static IPv4AddressTlv |
read(org.jboss.netty.buffer.ChannelBuffer cb,
short type)
Reads the channel buffer and returns object of IPv4AddressTlv.
|
java.lang.String |
toString() |
int |
write(org.jboss.netty.buffer.ChannelBuffer cb)
Writes the byte Stream of BGP Message to channel buffer.
|
public IPv4AddressTlv(org.onlab.packet.Ip4Address address,
short type)
address - Ipv4 address of interface/neighbortype - address typepublic org.onlab.packet.Ip4Address address()
public short getType()
BgpValueTypegetType in interface BgpValueTypepublic int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic int write(org.jboss.netty.buffer.ChannelBuffer cb)
BgpValueTypewrite in interface BgpValueTypecb - channel bufferpublic static IPv4AddressTlv read(org.jboss.netty.buffer.ChannelBuffer cb, short type) throws BgpParseException
cb - channelBuffertype - address typeBgpParseException - while parsing IPv4AddressTlvpublic static IPv4AddressTlv of(org.onlab.packet.Ip4Address address, short type)
address - Ipv4 interface/neighbor Addresstype - says Ipv4 address of interface/neighbor tlv typepublic int compareTo(java.lang.Object o)
BgpValueTypecompareTo in interface BgpValueTypeo - objectpublic java.lang.String toString()
toString in class java.lang.Object