blob: 535ba71da0d69e79f8cd9891700e47706f536656 [file] [log] [blame]
Priyanka B0bee1f82015-10-13 15:39:49 +05301/*
2 * Copyright 2015 Open Networking Laboratory
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17package org.onosproject.bgpio.protocol;
18
19/**
20 * Enum to Provide the Different BGP-LS NLRI types.
21 */
22public enum NlriType {
23
24 NODE(1), LINK(2), PREFIX_IPV4(3), PREFIX_IPV6(4);
25
26 int value;
27
28 /**
29 * Assign value with the value as the LINK-STATE NLRI type.
30 *
31 * @param value LINK-STATE NLRI type
32 */
33 NlriType(int value) {
34 this.value = value;
35 }
36
37 /**
38 * Returns value as LINK-STATE NLRI type.
39 *
40 * @return value LINK-STATE NLRI type
41 */
42 public byte getType() {
43 return (byte) value;
44 }
45}