blob: c0932ebe4e70b59b5ebcd63765807b0d85e6c403 [file] [log] [blame]
Priyanka Bb2988fa2015-10-09 12:45:36 +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.types;
18
19/**
20 * BgpErrorType class defines all errorCodes and error Subcodes required for Notification message.
21 */
Shashikanth VH5dd8dbe2015-11-26 13:22:18 +053022public final class BgpErrorType {
23 private BgpErrorType() {
Priyanka Bb2988fa2015-10-09 12:45:36 +053024 }
25
26 //Error Codes
27 public static final byte MESSAGE_HEADER_ERROR = 1;
28 public static final byte OPEN_MESSAGE_ERROR = 2;
29 public static final byte UPDATE_MESSAGE_ERROR = 3;
30 public static final byte HOLD_TIMER_EXPIRED = 4;
Vidyashree Ramaee293252015-11-18 17:00:11 +053031 public static final byte FINITE_STATE_MACHINE_ERROR = 5;
32 public static final byte CEASE = 6;
Priyanka Bb2988fa2015-10-09 12:45:36 +053033
34 //Message Header Error subcodes
35 public static final byte CONNECTION_NOT_SYNCHRONIZED = 1;
36 public static final byte BAD_MESSAGE_LENGTH = 2;
37 public static final byte BAD_MESSAGE_TYPE = 3;
38
39 //OPEN Message Error subcodes
40 public static final byte UNSUPPORTED_VERSION_NUMBER = 1;
41 public static final byte BAD_PEER_AS = 2;
42 public static final byte BAD_BGP_IDENTIFIER = 3;
43 public static final byte UNSUPPORTED_OPTIONAL_PARAMETER = 4;
44 public static final byte UNACCEPTABLE_HOLD_TIME = 5;
Vidyashree Ramaee293252015-11-18 17:00:11 +053045 public static final byte UNSUPPORTED_CAPABILITY = 7;
Priyanka Bb2988fa2015-10-09 12:45:36 +053046
47 //UPDATE Message Error subcodes
48 public static final byte MALFORMED_ATTRIBUTE_LIST = 1;
49 public static final byte UNRECOGNIZED_WELLKNOWN_ATTRIBUTE = 2;
50 public static final byte MISSING_WELLKNOWN_ATTRIBUTE = 3;
51 public static final byte ATTRIBUTE_FLAGS_ERROR = 4;
52 public static final byte ATTRIBUTE_LENGTH_ERROR = 5;
53 public static final byte INVALID_ORIGIN_ATTRIBUTE = 6;
54 public static final byte INVALID_NEXTHOP_ATTRIBUTE = 8;
55 public static final byte OPTIONAL_ATTRIBUTE_ERROR = 9;
56 public static final byte INVALID_NETWORK_FIELD = 10;
57 public static final byte MALFORMED_ASPATH = 11;
Shashikanth VHdae80402015-11-20 14:20:33 +053058
59 //FSM Error subcodes
60 public static final byte UNSPECIFIED_ERROR = 0;
61 public static final byte RECEIVE_UNEXPECTED_MESSAGE_IN_OPENSENT_STATE = 1;
62 public static final byte RECEIVE_UNEXPECTED_MESSAGE_IN_OPENCONFIRM_STATE = 2;
63 public static final byte RECEIVE_UNEXPECTED_MESSAGE_IN_ESTABLISHED_STATE = 3;
64
65 //Cease Error subcodes
66 public static final byte MAXIMUM_NUMBER_OF_PREFIXES_REACHED = 1;
67 public static final byte ADMINISTRATIVE_SHUTDOWN = 2;
68 public static final byte PEER_DECONFIGURED = 3;
69 public static final byte ADMINISTRATIVE_RESET = 4;
70 public static final byte CONNECTION_REJECTED = 5;
71 public static final byte OTHER_CONFIGURATION_CHANGE = 6;
72 public static final byte CONNECTION_COLLISION_RESOLUTION = 7;
73 public static final byte OUT_OF_RESOURCES = 8;
Priyanka Bb2988fa2015-10-09 12:45:36 +053074}