blob: 810b700614bdf69e6656ca2a2fe1de4a6b426a73 [file] [log] [blame]
Chidambar babu86b3b1a2016-02-16 17:39:52 +05301/*
Brian O'Connora09fe5b2017-08-03 21:12:30 -07002 * Copyright 2016-present Open Networking Foundation
Chidambar babu86b3b1a2016-02-16 17:39:52 +05303 *
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 */
sunishvkf7c56552016-07-18 16:02:39 +053016package org.onosproject.ospf.controller;
Chidambar babu86b3b1a2016-02-16 17:39:52 +053017
18/**
19 * Representation of different OSPF packet types.
20 */
21public enum OspfPacketType {
22
sunishvkf7c56552016-07-18 16:02:39 +053023 /**
24 * OSPF hello packet.
25 */
Chidambar babu86b3b1a2016-02-16 17:39:52 +053026 HELLO(1),
sunishvkf7c56552016-07-18 16:02:39 +053027 /**
28 * OSPF device description packet.
29 */
Chidambar babu86b3b1a2016-02-16 17:39:52 +053030 DD(2),
sunishvkf7c56552016-07-18 16:02:39 +053031 /**
32 * OSPF link state request packet.
33 */
Chidambar babu86b3b1a2016-02-16 17:39:52 +053034 LSREQUEST(3),
sunishvkf7c56552016-07-18 16:02:39 +053035 /**
36 * OSPF link state update packet.
37 */
Chidambar babu86b3b1a2016-02-16 17:39:52 +053038 LSUPDATE(4),
sunishvkf7c56552016-07-18 16:02:39 +053039 /**
40 * OSPF link state acknowledge packet.
41 */
Chidambar babu86b3b1a2016-02-16 17:39:52 +053042 LSAACK(5);
43
44 private int value;
45
46 /**
47 * Creates instance of OSPF packet types.
48 *
sunishvkf7c56552016-07-18 16:02:39 +053049 * @param value OSPF packet types
Chidambar babu86b3b1a2016-02-16 17:39:52 +053050 */
51 OspfPacketType(int value) {
52 this.value = value;
53 }
54
55 /**
56 * Gets the value.
57 *
58 * @return value
59 */
60 public int value() {
61 return value;
62 }
63}