blob: f6538a6ac9e2b1ab14b4d08e0c6358df99cca417 [file] [log] [blame]
Jian Li10a09062016-07-26 23:58:50 +09001/*
2 * Copyright 2016-present 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 */
16package org.onosproject.lisp.msg.protocols;
17
18import org.onosproject.lisp.msg.types.LispAfiAddress;
19
20/**
21 * LISP EID record section which is part of LISP map request message.
22 */
23public class LispEidRecord {
24
25 private final byte maskLength;
26 private final LispAfiAddress prefix;
27
28 /**
29 * Initializes LispEidRecord with mask length and EID prefix.
30 *
31 * @param maskLength mask length
32 * @param prefix EID prefix
33 */
34 public LispEidRecord(byte maskLength, LispAfiAddress prefix) {
35 this.maskLength = maskLength;
36 this.prefix = prefix;
37 }
38
39 /**
40 * Obtains mask length of the EID Record.
41 *
42 * @return mask length of the EID Record
43 */
44 public byte getMaskLength() {
45 return maskLength;
46 }
47
48 /**
49 * Obtains EID prefix.
50 *
51 * @return EID prefix
52 */
53 public LispAfiAddress getPrefix() {
54 return prefix;
55 }
56}