blob: 4e8af92e2770d7c5d81f81d49e34ab3b711bd964 [file] [log] [blame]
Jian Li27759352016-10-04 20:14:42 +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.LispNatLcafAddress;
19
20/**
21 * LISP info reply message interface.
22 * <p>
Jian Li6ef1b3f2016-11-12 18:16:06 +090023 * LISP info reply message format is defined in draft-ermagan-lisp-nat-traversal-11.
24 * https://tools.ietf.org/html/draft-ermagan-lisp-nat-traversal-11#page-9
Jian Li27759352016-10-04 20:14:42 +090025 *
26 * <pre>
27 * {@literal
28 * 0 1 2 3
29 * 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
30 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
31 * |Type=7 |R| Reserved |
32 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
33 * | Nonce . . . |
34 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
35 * | . . . Nonce |
36 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
37 * | Key ID | Authentication Data Length |
38 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
39 * ~ Authentication Data ~
40 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
41 * | TTL |
42 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
43 * | Reserved | EID mask-len | EID-prefix-AFI |
44 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
45 * | EID-prefix |
46 * +->+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
47 * | | AFI = 16387 | Rsvd1 | Flags |
48 * | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
49 * | | Type = 7 | Rsvd2 | 4 + n |
50 * | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
51 * N | MS UDP Port Number | ETR UDP Port Number |
52 * A +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
53 * T | AFI = x | Global ETR RLOC Address ... |
54 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
55 * L | AFI = x | MS RLOC Address ... |
56 * C +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
57 * A | AFI = x | Private ETR RLOC Address ... |
58 * F +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
59 * | | AFI = x | RTR RLOC Address 1 ... |
60 * | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
61 * | | AFI = x | RTR RLOC Address n ... |
62 * +->+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
63 * }</pre>
64 */
65public interface LispInfoReply extends LispInfo {
66
67 /**
68 * Obtains NAT LCAF address.
69 *
70 * @return NAT LCAF address
71 */
72 LispNatLcafAddress getNatLcafAddress();
73
74 interface InfoReplyBuilder extends InfoBuilder<InfoReplyBuilder> {
75
76 /**
77 * Sets NAT LCAF address.
78 *
79 * @param natLcafAddress NAT LCAF address
80 * @return InfoReplyBuilder object
81 */
82 InfoReplyBuilder withNatLcafAddress(LispNatLcafAddress natLcafAddress);
83
84 /**
85 * Builds LISP info reply message.
86 *
87 * @return LISP info reply message
88 */
89 LispInfoReply build();
90 }
91}