yumapro  20.10-12
YumaPro SDK
agt_ncchd.h
Go to the documentation of this file.
1 /*****************************************************************************
2 Copyright (c) 2014-2016, Juniper Networks, Inc.
3 All rights reserved.
4 
5 Redistribution and use in source and binary forms, with or without
6 modification, are permitted provided that the following conditions
7 are met:
8 
9 1. Redistributions of source code must retain the above copyright
10  notice, this list of conditions and the following disclaimer.
11 
12 2. Redistributions in binary form must reproduce the above copyright
13  notice, this list of conditions and the following disclaimer in the
14  documentation and/or other materials provided with the distribution.
15 
16 3. Neither the name of the copyright holder nor the names of its
17  contributors may be used to endorse or promote products derived
18  from this software without specific prior written permission.
19 
20 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21 "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
23 FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
24 COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
25 INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
26 BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
27 LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
28 CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29 LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
30 ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
31 POSSIBILITY OF SUCH DAMAGE.
32  *****************************************************************************/
33 
34 /*
35  * Copyright (c) 2017 - 2021, YumaWorks, Inc., All Rights Reserved.
36  *
37  * Unless required by applicable law or agreed to in writing,
38  * software distributed under the License is distributed on an
39  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
40  * KIND, either express or implied. See the License for the
41  * specific language governing permissions and limitations
42  * under the License.
43  */
44 #ifdef WITH_CALLHOME
45 #ifndef _H_agt_ncchd
46 #define _H_agt_ncchd
47 
48 /* FILE: agt_ncchd
49 *********************************************************************
50 * *
51 * P U R P O S E *
52 * *
53 *********************************************************************/
54 
62 /*********************************************************************
63 * *
64 * C H A N G E H I S T O R Y *
65 * *
66 *********************************************************************
67 
68 date init comment
69 ----------------------------------------------------------------------
70 27-jan-17 abb Begun;
71 */
72 
73 #ifndef _H_status_enum
74 #include "status_enum.h"
75 #endif
76 
77 #ifndef _H_agt_callhome
78 #include "agt_callhome.h"
79 #endif
80 
81 #ifdef __cplusplus
82 extern "C" {
83 #endif
84 
85 /********************************************************************
86 * *
87 * C O N S T A N T S *
88 * *
89 *********************************************************************/
90 
91 /********************************************************************
92 * *
93 * T Y P E S *
94 * *
95 *********************************************************************/
96 
97 /********************************************************************
98 * *
99 * F U N C T I O N S *
100 * *
101 *********************************************************************/
102 
103 /* group defined in agt_callhome.h */
104 
121 extern status_t
122  agt_ncchd_connect (agt_callhome_cb_t *cb);
123 
124 
128 #ifdef __cplusplus
129 } /* end extern 'C' */
130 #endif
131 
132 #endif /* _H_agt_ncchd */
133 
134 #endif // WITH_CALLHOME
agt_util.h
Utility Functions for NCX Server method routines.
agt_ncchd.h
IETF CallHome reverse connection support. Adaptation of Juniper netconf-call-home server-device code.
log_error
void log_error(const char *fstr,...) __attribute__((format(printf
Generate a new LOG_DEBUG_ERROR log entry.
val.h
Value Node Basic Support.
agt_ncchd_connect
status_t agt_ncchd_connect(agt_callhome_cb_t *cb)
Start the SSHd server for a Call Home connection.
Definition: agt_ncchd.c:227
status_enum.h
global error status code enumerations
ncxmod_get_yumadir
const xmlChar * ncxmod_get_yumadir(void)
Get the yuma directory being used.
Definition: ncxmod.c:6418
ncxmod.h
NCX Module Load Manager.
NO_ERR
@ NO_ERR
000
Definition: status_enum.h:188
ERR_NCX_OPERATION_FAILED
@ ERR_NCX_OPERATION_FAILED
274
Definition: status_enum.h:315
LOGDEBUG2
#define LOGDEBUG2
Check if at least log-level=debug2.
Definition: log.h:292
val_util.h
Value Node Utilities.
NCX_PATHSEP_CH
#define NCX_PATHSEP_CH
filespec identifier field separator token
Definition: ncxconst.h:404
ERR_INTERNAL_MEM
@ ERR_INTERNAL_MEM
003
Definition: status_enum.h:193
agt.h
Multi-Protocol Network Management Server.
LOGDEBUG4
#define LOGDEBUG4
Check if at least log-level=debug4.
Definition: log.h:302
log.h
NCX System Logging Manager.
ERR_BUFF_OVFL
@ ERR_BUFF_OVFL
106
Definition: status_enum.h:218
xml_strcpy
uint32 xml_strcpy(xmlChar *copyTo, const xmlChar *copyFrom)
String copy for xmlChar.
Definition: xml_util.c:1486
AGT_CH_PROTO_NETCONF_SSH
@ AGT_CH_PROTO_NETCONF_SSH
netconf-over-ssh callhome
Definition: agt.h:694
ncx.h
YANG module utility functions.
agt_connect_client
int agt_connect_client(const xmlChar *hostname, uint16_t port)
Start a TCP connection to a client.
Definition: agt_util.c:6312
ERR_FIL_OPEN
@ ERR_FIL_OPEN
system errors start at 100
Definition: status_enum.h:212
status.h
Global error messages for status code enumerations.
dlq.h
dlq provides general double-linked list and queue support:
agt_callhome.h
IETF CallHome reverse connection support.
LOGDEBUG3
#define LOGDEBUG3
Check if at least log-level=debug3.
Definition: log.h:297