diff options
Diffstat (limited to 'src/main/java/com/lumaserv/bgp/protocol/attribute/ASPathLimitAttribute.java')
-rw-r--r-- | src/main/java/com/lumaserv/bgp/protocol/attribute/ASPathLimitAttribute.java | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/src/main/java/com/lumaserv/bgp/protocol/attribute/ASPathLimitAttribute.java b/src/main/java/com/lumaserv/bgp/protocol/attribute/ASPathLimitAttribute.java new file mode 100644 index 0000000..732b018 --- /dev/null +++ b/src/main/java/com/lumaserv/bgp/protocol/attribute/ASPathLimitAttribute.java @@ -0,0 +1,29 @@ +package com.lumaserv.bgp.protocol.attribute; + +import lombok.Getter; +import lombok.Setter; + +@Setter +@Getter +public class ASPathLimitAttribute implements PathAttribute { + + byte upperBound; + int as; + + public ASPathLimitAttribute(byte typeCode, byte[] data) { + upperBound = data[0]; + as = ((data[1] & 0xFF) << 24) | + ((data[2] & 0xFF) << 16) | + ((data[3] & 0xFF) << 8) | + (data[4] & 0xFF); + } + + public byte getTypeCode() { + return 21; + } + + public byte[] build() { + return new byte[0]; + } + +} |