1d0d19ce297b4fb5cd7a61514a6de7bff4cc3b86
[lispflowmapping.git] / mappingservice / api / src / main / java / org / opendaylight / lispflowmapping / interfaces / lisp / IGeneralMapServer.java
1 /*
2  * Copyright (c) 2014 Contextream, Inc. and others.  All rights reserved.
3  *
4  * This program and the accompanying materials are made available under the
5  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6  * and is available at http://www.eclipse.org/legal/epl-v10.html
7  */
8 package org.opendaylight.lispflowmapping.interfaces.lisp;
9
10 import org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.lisp.proto.rev150820.lispaddress.LispAddressContainer;
11
12 /**
13  * The general methods of the map server
14  */
15 public interface IGeneralMapServer {
16
17     /**
18      * @return Should the map server use authentication.
19      */
20     boolean shouldAuthenticate();
21
22     /**
23      * @return Should the map server use masking.
24      */
25     boolean shouldIterateMask();
26
27     /**
28      * @return Should the map server use overwrite.
29      */
30     boolean shouldOverwrite();
31
32     /**
33      * This method returns the authentication key of the address.
34      *
35      * @param address EID to look up
36      * @param maskLen EID mask length
37      * @return The correct key.
38      */
39     String getAuthenticationKey(LispAddressContainer address, int maskLen);
40
41     void setShouldIterateMask(boolean shouldIterateMask);
42
43     void setShouldAuthenticate(boolean shouldAuthenticate);
44
45     void setOverwrite(boolean overwrite);
46
47     /**
48      * This method removes the given authentication key from the map server.
49      *
50      * @param address EID to remove
51      * @param maskLen EID mask length
52      */
53     void removeAuthenticationKey(LispAddressContainer address, int maskLen);
54
55     /**
56      * This method adds an authentication key to the address.
57      *
58      * @param address EID to add
59      * @param maskLen EID mask length
60      * @param key Value of the key for the EID
61      */
62     void addAuthenticationKey(LispAddressContainer address, int maskLen, String key);
63 }