public class EndPointsIPv4 extends EndPoints
Represents a PCEP END-POINTS object IPv4 Type, as defined in RFC 5440
From RFC 5440 Section 7.6. END-POINTS Object
The END-POINTS object is used in a PCReq message to specify the source IP address and the destination IP address of the path for which a path computation is requested. The P flag of the END-POINTS object MUST be set. If the END-POINTS object is received with the P flag cleared, the receiving peer MUST send a PCErr message with Error-Type=10 and Error-value=1. The corresponding path computation request MUST be cancelled by the PCE without further notification. Note that the source and destination addresses specified in the END- POINTS object may correspond to the source and destination IP address of the TE LSP or to those of a path segment. Two END-POINTS objects (for IPv4 and IPv6) are defined. END-POINTS Object-Class is 4. END-POINTS Object-Type is 1 for IPv4 and 2 for IPv6. The format of the END-POINTS object body for IPv4 (Object-Type=1) is as follows: 0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Source IPv4 address | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Destination IPv4 address | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Ibit, log, object_bytes, ObjectClass, ObjectLength, OT, Pbit, Res
Constructor and Description |
---|
EndPointsIPv4()
Constructs a new PCEP END-POINTS object IPv4 Type from scratch.
|
EndPointsIPv4(byte[] bytes,
int offset)
Constructs a new PCEP END-POINTS object IPv4 Type from a sequence of bytes
|
Modifier and Type | Method and Description |
---|---|
void |
decode()
Decode the IPv4 address
|
void |
encode()
Encode the IPv4 address
|
boolean |
equals(Object obj) |
Inet4Address |
getDestIP() |
Inet4Address |
getSourceIP() |
int |
hashCode() |
void |
setDestIP(Inet4Address destIP) |
void |
setSourceIP(Inet4Address sourceIP) |
String |
toString() |
decode, decodeHeader, encode_header, getBytes, getLength, getObject_bytes, getObjectClass, getObjectClass, getObjectLength, getObjectType, getOT, getRes, isIbit, isPbit, setIbit, setObject_bytes, setObjectClass, setObjectLength, setOT, setPbit, setRes, supportedObject
public EndPointsIPv4()
public EndPointsIPv4(byte[] bytes, int offset) throws MalformedPCEPObjectException
bytes
- Sequence of bytes where the object is presentoffset
- Position at which the object startsMalformedPCEPObjectException
- Thrown if the decoded object is not well formedpublic void encode()
encode
in interface PCEPElement
encode
in class PCEPObject
public void decode() throws MalformedPCEPObjectException
decode
in class PCEPObject
MalformedPCEPObjectException
public Inet4Address getSourceIP()
public void setSourceIP(Inet4Address sourceIP)
public Inet4Address getDestIP()
public void setDestIP(Inet4Address destIP)
public int hashCode()
hashCode
in class PCEPObject
public boolean equals(Object obj)
equals
in class PCEPObject
Copyright © 2016. All rights reserved.