blob: 4fdafa0357f57e9b66759b30b4a69b4e0c1a0d47 [file] [log] [blame]
senthil172a12c2021-10-05 09:59:32 +05301/*
2 * Copyright 2021-present Open Networking Foundation
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.snmp;
18
19import com.btisystems.pronx.ems.core.snmp.ISnmpConfiguration;
20import org.onlab.packet.IpAddress;
21import org.snmp4j.security.SecurityLevel;
22import org.snmp4j.smi.OID;
23import org.snmp4j.util.PDUFactory;
24
25import java.io.Serializable;
26
27/**
28 * Abstraction of SNMPv3 configuration.
29 */
30public interface Snmpv3Configuration extends Serializable, ISnmpConfiguration {
31
32 /**
33 * Returns the ip address.
34 *
35 * @return ip address
36 */
37 IpAddress getAddress();
38
39 /**
40 * Returns the snmpv3 security name of the device.
41 * the SNMPv3 username.
42 *
43 * @return security name
44 */
45 String getSecurityName();
46
47 /**
48 * Returns the snmpv3 security level of the device.
49 * the security level is noAuthNoPriv or authNoPriv or authPriv
50 *
51 * @return security level
52 */
53 SecurityLevel getSecurityLevel();
54
55 /**
56 * Returns the snmpv3 authentication protocol of the device.
57 * the authentication method (either MD5 or SHA)
58 *
59 * @return authentication protocol
60 */
61 OID getAuthenticationProtocol();
62
63 /**
64 * Returns the snmpv3 authentication password of the device.
65 * the authentication password must be at least eight characters long
66 *
67 * @return authentication password
68 */
69 String getAuthenticationPassword();
70
71 /**
72 * Returns the snmpv3 privacy protocol of the device.
73 * the privacy method (either AES or DES)
74 *
75 * @return privacy protocol
76 */
77 OID getPrivacyProtocol();
78
79 /**
80 * Returns the snmpv3 privacy password of the device.
81 * the privacy password must be at least eight characters long
82 *
83 * @return privacy password
84 */
85 String getPrivacyPassword();
86
87 /**
88 * Returns the snmpv3 authoritative engine id of the device.
89 *
90 * @return authoritative engine id
91 */
92 byte[] getAuthoritativeEngineId();
93
94 /**
95 * Returns the snmpv3 context name of the device.
96 * An SNMP context name or "context" in short,
97 * is a collection of management information accessible by an SNMP entity.
98 * An item of management information may exist in more than one context.
99 * An SNMP entity potentially has access to many contexts. In other words,
100 * if a management information has been defined under certain context by an SNMPv3 entity,
101 * then any management application can access that information by giving that context name.
102 * The "context name" is an octet string, which has at least one management information
103 *
104 * @return snmpv3 context name
105 */
106 String getContextName();
107
108 /**
109 * Create snmp session PDU factory.
110 *
111 * @return session PDU factory
112 */
113 PDUFactory createPduFactory();
114
115 /**
116 * Remove Snmp user security model when close connection to device.
117 */
118 void removeUsm();
119
120}