summaryrefslogtreecommitdiff
path: root/src/main/java/com/lumaserv/bgp/protocol/attribute/NextHopAttribute.java
blob: f60d236d5f6e37360c1dc219b9ae6f166890f1b2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
package com.lumaserv.bgp.protocol.attribute;

public class NextHopAttribute implements PathAttribute {

    byte[] address;

    public NextHopAttribute(byte typeCode, byte[] data) {
        this.address = new byte[data.length];
        System.arraycopy(data, 0, address, 0, address.length);
    }

    public byte getTypeCode() {
        return 3;
    }

    public byte[] build() {
        return address;
    }

}