libnetconf  0.10.0-146_trunk
NETCONF Library
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
callhome.h
Go to the documentation of this file.
1 
40 #ifndef CALLHOME_H_
41 #define CALLHOME_H_
42 
43 #include <stdint.h>
44 
45 #include "netconf.h"
46 
47 #ifdef __cplusplus
48 extern "C" {
49 #endif
50 
58 struct nc_mngmt_server;
59 
78 struct nc_mngmt_server* nc_callhome_mngmt_server_add(struct nc_mngmt_server* list, const char* host, const char* port);
79 
93 int nc_callhome_mngmt_server_rm(struct nc_mngmt_server* list, struct nc_mngmt_server* remove);
94 
107 int nc_callhome_mngmt_server_free(struct nc_mngmt_server* list);
108 
118 struct nc_mngmt_server* nc_callhome_mngmt_server_getactive(struct nc_mngmt_server* list);
119 
120 #ifndef DISABLE_LIBSSH
121 
132 int nc_callhome_listen(unsigned int port);
133 
143 int nc_callhome_listen_stop(void);
144 
171 struct nc_session* nc_callhome_accept(const char *username, const struct nc_cpblts* cpblts, int *timeout);
172 
173 #endif /* not DISABLE_LIBSSH */
174 
216 int nc_callhome_connect(struct nc_mngmt_server *host_list, uint8_t reconnect_secs, uint8_t reconnect_count, const char* server_path, char *const argv[], int *com_socket);
217 
218 #ifdef __cplusplus
219 }
220 #endif
221 
222 #endif /* CALLHOME_H_ */
int nc_callhome_listen_stop(void)
Stop listening on client side for incoming Call Home connection.
int nc_callhome_listen(unsigned int port)
Start listening on client side for incoming Call Home connection.
int nc_callhome_mngmt_server_rm(struct nc_mngmt_server *list, struct nc_mngmt_server *remove)
Remove the specified management server description from the list.
struct nc_mngmt_server * nc_callhome_mngmt_server_getactive(struct nc_mngmt_server *list)
Searches for the item from the list, which was marked and used by the last call to nc_callhome_connec...
struct nc_mngmt_server * nc_callhome_mngmt_server_add(struct nc_mngmt_server *list, const char *host, const char *port)
Add a new management server specification to the end of a list.
struct nc_session * nc_callhome_accept(const char *username, const struct nc_cpblts *cpblts, int *timeout)
Accept incoming Call Home connection and create NETCONF session on it.
libnetconf's general public functions and structures definitions.
int nc_callhome_mngmt_server_free(struct nc_mngmt_server *list)
Free a management server description structure(s). The function doesn't free only the item refered by...
int nc_callhome_connect(struct nc_mngmt_server *host_list, uint8_t reconnect_secs, uint8_t reconnect_count, const char *server_path, char *const argv[], int *com_socket)
Connect NETCONF server to a management center (NETCONF client) using Call Home mechanism.