yumapro  20.10-12
YumaPro SDK
agt_ypsnmp_not.h
Go to the documentation of this file.
1 /*****************************************************************************
2 Various copyrights apply to this package, listed in various separate
3 parts below. Please make sure that you read all the parts.
4 
5 ---- Part 1: Sparta, Inc (BSD) -----
6 
7 Copyright (c) 2003-2010, Sparta, Inc
8 All rights reserved.
9 
10 Redistribution and use in source and binary forms, with or without
11 modification, are permitted provided that the following conditions are met:
12 
13 * Redistributions of source code must retain the above copyright notice,
14  this list of conditions and the following disclaimer.
15 
16 * Redistributions in binary form must reproduce the above copyright
17  notice, this list of conditions and the following disclaimer in the
18  documentation and/or other materials provided with the distribution.
19 
20 * Neither the name of Sparta, Inc nor the names of its contributors may
21  be used to endorse or promote products derived from this software
22  without specific prior written permission.
23 
24 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS
25 IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
26 THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
27 PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR
28 CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
29 EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
30 PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
31 OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
32 WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
33 OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
34 ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
35 
36 ---- Part 2: ScienceLogic, LLC (BSD) ----
37 
38 Copyright (c) 2006, ScienceLogic, LLC
39 All rights reserved.
40 
41 Redistribution and use in source and binary forms, with or without
42 modification, are permitted provided that the following conditions are
43 met:
44 
45 * Redistributions of source code must retain the above copyright notice,
46  this list of conditions and the following disclaimer.
47 
48 * Redistributions in binary form must reproduce the above copyright
49  notice, this list of conditions and the following disclaimer in the
50  documentation and/or other materials provided with the distribution.
51 
52 * Neither the name of ScienceLogic, LLC nor the names of its
53  contributors may be used to endorse or promote products derived
54  from this software without specific prior written permission.
55 
56 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
57 ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
58 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
59 A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
60 HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
61 INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
62 BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
63 OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
64 ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
65 TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
66 USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
67 DAMAGE.
68 *************************************************************************/
69 
70 
71 /*************************************************************************
72  OVERVIEW
73 
74  This module implements an snmp abstraction layer that acts as a
75  an intermediate between the yang data store and the snmp library.
76  This module makes use of restconf apis to interface with the data
77  store(s) and provides sort of a gateway functionality by converting
78  requests and responses between snmp and restconf interface.
79 
80  This module has been adapted from the snmp v3 usm and vacm mib
81  modules in the net-snmp agent code.
82 *************************************************************************/
83 
84 
85 /*
86  * Copyright (c) 2017, YumaWorks. Inc., All Rights Reserved.
87  *
88  * Unless required by applicable law or agreed to in writing,
89  * software distributed under the License is distributed on an
90  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
91  * KIND, either express or implied. See the License for the
92  * specific language governing permissions and limitations
93  * under the License.
94  */
95 
96 #if defined(WITH_SNMP) && defined(WITH_RESTCONF)
97 #ifndef _H_agt_ypsnmp_not
98 #define _H_agt_ypsnmp_not
99 
100 /* FILE: agt_ypsnmp_not.h
101 *********************************************************************
102 * *
103 * P U R P O S E *
104 * *
105 *********************************************************************/
106 
114 /*********************************************************************
115 * *
116 * C H A N G E H I S T O R Y *
117 * *
118 *********************************************************************
119 
120 date init comment
121 ----------------------------------------------------------------------
122 28-feb-17 rmb Begun.
123 */
124 
125 #ifndef _H_status_enum
126 #include "status_enum.h"
127 #endif
128 
129 #ifdef __cplusplus
130 extern "C" {
131 #endif
132 
133 /********************************************************************
134 * *
135 * C O N S T A N T S *
136 * *
137 *********************************************************************/
138 
139 
140 /********************************************************************
141 * *
142 * T Y P E S *
143 * *
144 *********************************************************************/
145 
146 
147 /********************************************************************
148 * *
149 * F U N C T I O N S *
150 * *
151 *********************************************************************/
152 
153 
173 extern void
174  agt_ypsnmp_not_init (void);
175 
176 
182 extern void
184 
185 
195 extern status_t
196  agt_ypsnmp_not_send(netsnmp_pdu *pdu);
197 
198 
203 #ifdef __cplusplus
204 } /* end extern 'C' */
205 #endif
206 
207 #endif // _H_agt_ypsnmp_not
208 #endif // defined(WITH_SNMP) && defined(WITH_RESTCONF)
log_error
void log_error(const char *fstr,...) __attribute__((format(printf
Generate a new LOG_DEBUG_ERROR log entry.
status_enum.h
global error status code enumerations
agt_ypsnmp_not_send
status_t agt_ypsnmp_not_send(netsnmp_pdu *pdu)
Send a notification.
Definition: agt_ypsnmp_not.c:935
NO_ERR
@ NO_ERR
000
Definition: status_enum.h:188
log_debug4
void void void void void void void void void void void void void log_debug4(const char *fstr,...) __attribute__((format(printf
Generate a new LOG_DEBUG_DEBUG4 log entry.
agt.h
Multi-Protocol Network Management Server.
agt_ypsnmp_not_cleanup
void agt_ypsnmp_not_cleanup(void)
cleanup the agt_ypsnmp_not module
Definition: agt_ypsnmp_not.c:919
LOGDEBUG4
#define LOGDEBUG4
Check if at least log-level=debug4.
Definition: log.h:302
ncx.h
YANG module utility functions.
agt_ypsnmp_not.h
Defines and implements SNMP notification and trap handling.
agt_ypsnmp_not_init
void agt_ypsnmp_not_init(void)
Initialize the agt_ypsnmp_not module.
Definition: agt_ypsnmp_not.c:901