diff options
author | Mikael Magnusson <mikma@users.sourceforge.net> | 2022-01-30 14:49:42 +0100 |
---|---|---|
committer | Mikael Magnusson <mikma@users.sourceforge.net> | 2023-11-13 00:17:57 +0100 |
commit | d4eb9c36754afcfbfbf758afd80816ee71a57362 (patch) | |
tree | 5b5a0b658035bc9cef2f8058616f4f351370364f /src/main/java/com/lumaserv/bgp/protocol/attribute/MPUnreachableNLRIAttribute.java | |
parent | 45143e7d7ad17e149d4df8f5502a15c3222691e4 (diff) |
WIP multiprotocol capability and IPv6
Diffstat (limited to 'src/main/java/com/lumaserv/bgp/protocol/attribute/MPUnreachableNLRIAttribute.java')
-rw-r--r-- | src/main/java/com/lumaserv/bgp/protocol/attribute/MPUnreachableNLRIAttribute.java | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/src/main/java/com/lumaserv/bgp/protocol/attribute/MPUnreachableNLRIAttribute.java b/src/main/java/com/lumaserv/bgp/protocol/attribute/MPUnreachableNLRIAttribute.java new file mode 100644 index 0000000..43dc8d5 --- /dev/null +++ b/src/main/java/com/lumaserv/bgp/protocol/attribute/MPUnreachableNLRIAttribute.java @@ -0,0 +1,36 @@ +package com.lumaserv.bgp.protocol.attribute; + +import lombok.Getter; +import lombok.Setter; + +import com.lumaserv.bgp.protocol.AFI; +import com.lumaserv.bgp.protocol.SAFI; + +import java.nio.ByteBuffer; + +@Getter +@Setter +public class MPUnreachableNLRIAttribute implements PathAttribute { + + AFI afi; + SAFI safi; + int nlriLen; + + public MPUnreachableNLRIAttribute(byte typeCode, byte[] data) { + afi = AFI.fromInteger((data[0] << 8) | data[1]); + safi = SAFI.fromInteger(data[2]); + nlriLen = data.length - 3; + } + + public byte getTypeCode() { + return 15; + } + + public void build(ByteBuffer b) { + // FIXME + } + + public String toString() { + return "AFI:" + afi + " SAFI:" + safi + " NLRIs:" + nlriLen; + } +} |