Kunihiro Ishiguro

Store remote 4 octet AS path value.

Change-Id: Ifccc777c48392effb0ab86298115c9abb4fe5e48
......@@ -335,6 +335,7 @@ final class BgpOpen {
}
long as4Number = message.readUnsignedInt();
// TODO: Implement support for 4-octet AS Numbers
bgpSession.setRemoteAs4Octet(as4Number);
log.debug("BGP RX OPEN Capability: AS4 Number = {}",
as4Number);
break;
......
......@@ -59,6 +59,7 @@ public class BgpSession extends SimpleChannelHandler {
private Ip4Address remoteIp4Address; // Peer IPv4 address
private int remoteBgpVersion; // 1 octet
private long remoteAs; // 2 octets
private long remoteAs4Octet; // 4 octets
private long remoteHoldtime; // 2 octets
private Ip4Address remoteBgpId; // 4 octets -> IPv4 address
private boolean remoteIpv4Unicast; // Peer IPv4/UNICAST AFI/SAFI
......@@ -191,6 +192,15 @@ public class BgpSession extends SimpleChannelHandler {
}
/**
* Sets the BGP session remote 4 octet AS number.
*
* @param remoteAs4Octet the BGP session remote 4 octet AS number to set
*/
void setRemoteAs4Octet(long remoteAs4Octet) {
this.remoteAs4Octet = remoteAs4Octet;
}
/**
* Gets the BGP session remote Holdtime.
*
* @return the BGP session remote Holdtime
......