blob: 655eb4957c29b9359dc1df0aad81300b336e18db [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.protocols.LispMessage.Builder;
19import org.onosproject.lisp.msg.types.LispAfiAddress;
20
21/**
22 * LISP info message interface.
23 */
24public interface InfoBuilder<T> extends Builder {
25
26 /**
27 * Sets info reply flag value.
28 *
29 * @param infoReply info reply
30 * @return T object
31 */
32 T withInfoReply(boolean infoReply);
33
34 /**
35 * Sets nonce value.
36 *
37 * @param nonce nonce value
38 * @return T object
39 */
40 T withNonce(long nonce);
41
42 /**
43 * Sets authentication data length.
44 *
45 * @param authDataLength authentication data length
46 * @return T object
47 */
48 T withAuthDataLength(short authDataLength);
49
50 /**
51 * Sets key identifier.
52 *
53 * @param keyId key identifier
54 * @return T object
55 */
56 T withKeyId(short keyId);
57
58 /**
59 * Sets authentication data.
60 *
Jian Lid1a109e2016-11-12 09:00:42 +090061 * @param authData authentication data
Jian Li27759352016-10-04 20:14:42 +090062 * @return T object
63 */
Jian Lid1a109e2016-11-12 09:00:42 +090064 T withAuthData(byte[] authData);
65
66 /**
67 * Sets authentication key.
68 *
69 * @param key authentication key
70 * @return RegisterBuilder object
71 */
72 T withAuthKey(String key);
Jian Li27759352016-10-04 20:14:42 +090073
74 /**
75 * Sets Time-To-Live value.
76 *
77 * @param ttl Time-To-Live value
78 * @return T object
79 */
80 T withTtl(int ttl);
81
82 /**
83 * Sets EID prefix mask length.
84 *
85 * @param maskLength EID prefix mask length
86 * @return T object
87 */
88 T withMaskLength(byte maskLength);
89
90 /**
91 * Sets EID prefix.
92 *
93 * @param eidPrefix EID prefix
94 * @return T object
95 */
96 T withEidPrefix(LispAfiAddress eidPrefix);
97}