yumapro  24.10-3
YumaPro SDK
Loading...
Searching...
No Matches
agt_ncxserver.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2008 - 2012, Andy Bierman, All Rights Reserved.
3 * Copyright (c) 2012 - 2024, YumaWorks, Inc., All Rights Reserved.
4 *
5 * Unless required by applicable law or agreed to in writing,
6 * software distributed under the License is distributed on an
7 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
8 * KIND, either express or implied. See the License for the
9 * specific language governing permissions and limitations
10 * under the License.
11 */
12#ifndef _H_agt_ncxserver
13#define _H_agt_ncxserver
14
15/* FILE: agt_ncxserver.h
16*********************************************************************
17* *
18* P U R P O S E *
19* *
20*********************************************************************/
21
28/*********************************************************************
29* *
30* C H A N G E H I S T O R Y *
31* *
32*********************************************************************
33
34date init comment
35----------------------------------------------------------------------
3611-jan-07 abb Begun
37
38*/
39
40#ifndef _H_agt
41#include "agt.h"
42#endif
43
44#ifndef _H_ncxtypes
45#include "ncxtypes.h"
46#endif
47
48#ifndef _H_ses
49#include "ses.h"
50#endif
51
52#ifndef _H_status_enum
53#include "status_enum.h"
54#endif
55
56#ifndef _H_pthread
57#include "pthread.h"
58#endif
59
60#ifdef __cplusplus
61extern "C" {
62#endif
63
64/********************************************************************
65* *
66* C O N S T A N T S *
67* *
68*********************************************************************/
69
70
71/********************************************************************
72* *
73* T Y P E S *
74* *
75*********************************************************************/
76
77
78/********************************************************************
79* *
80* V A R I A B L E S *
81* *
82*********************************************************************/
83
84/********************************************************************
85* *
86* F U N C T I O N S *
87* *
88*********************************************************************/
89
90
91
109extern status_t
110 agt_ncxserver_run (void);
111
112
124extern status_t
125 agt_ncxserver_run_ycontrol (boolean ycontrol,
126 const xmlChar *txid_str);
127
128
144extern status_t
145 agt_ncxserver_run_extloop (boolean ycontrol,
146 const xmlChar *txid_str,
147 boolean extloop_mode);
148
149
155extern void
156 agt_ncxserver_clear_fd (int fd);
157
158
165extern void
166 agt_ncxserver_exit_ycontrol_mode (const xmlChar *txid_str,
167 agt_exit_mode_t exitmode);
168
169
170
178extern void
179 agt_ncxserver_exit_ycontrol_mode_edit (const xmlChar *txid_str,
180 agt_exit_mode_t exitmode,
181 boolean need_reverse_edit);
182
183
193extern agt_exit_mode_t
194 agt_ncxserver_get_exit_mode (const xmlChar *txid_str);
195
196
197#ifdef PTHREADS
198
204extern thd_tcb_t *
206
207
208#ifndef TEST_PTHREADS
217extern boolean
219 ses_id_t killedby,
220 ses_term_reason_t termreason);
221
222
232extern void
234
235
245extern boolean
247
248
249#else // TEST_PTHREADS
250/* Stub definitions for integ-test image build */
251
252extern bool agt_ncxserver_thread_clear_session (int sid,
253 int killedby,
254 int termreason);
255
256extern bool agt_ncxserver_thread_cancel_cc (int sid, int event);
257
258/* Stub definitions for integ-test image build */
259#endif // TEST_PTHREADS
260
261#endif // PTHREADS
262
263
271extern status_t
273 int newfd);
274
275
281extern void
283
284
288#ifdef __cplusplus
289} /* end extern 'C' */
290#endif
291
292#endif /* _H_agt_ncxserver */
Multi-Protocol Network Management Server.
agt_exit_mode_t
exit reasons for YControl IO loop
Definition: agt.h:760
void agt_ncxserver_cleanup_extloop(void)
Cleanup sockets for extloop mode.
Definition: agt_ncxserver.c:4217
void agt_ncxserver_clear_fd(int fd)
Clear a dead session from the select loop.
Definition: agt_ncxserver.c:4156
boolean agt_ncxserver_thread_clear_session(ses_id_t sid, ses_id_t killedby, ses_term_reason_t termreason)
Signal session clear to the appropriate RX thread for session.
Definition: agt_ncxserver.c:3132
void agt_ncxserver_thd_ses_cleanup(thd_type_t thd_type)
Clean sessions in fixed (safe) order to make sure that all active sessions will be closed in a partic...
Definition: agt_ncxserver.c:1332
status_t agt_ncxserver_inject_session(ses_cb_t *scb, int newfd)
Add a callhome session into the ncxserver IO processing.
Definition: agt_ncxserver.c:4178
void agt_ncxserver_exit_ycontrol_mode(const xmlChar *txid_str, agt_exit_mode_t exitmode)
Cause the ycontrol mode to terminate.
Definition: agt_ncxserver.c:3450
void agt_ncxserver_exit_ycontrol_mode_edit(const xmlChar *txid_str, agt_exit_mode_t exitmode, boolean need_reverse_edit)
Cause the ycontrol mode to terminate, EDIT mode.
Definition: agt_ncxserver.c:3499
status_t agt_ncxserver_run_extloop(boolean ycontrol, const xmlChar *txid_str, boolean extloop_mode)
IO server loop for the ncxserver socket (FULL MODE)
Definition: agt_ncxserver.c:3594
agt_exit_mode_t agt_ncxserver_get_exit_mode(const xmlChar *txid_str)
Get the reason code for exiting YControl IO mode.
Definition: agt_ncxserver.c:3539
thd_tcb_t * agt_ncxserver_get_timer_tcb(void)
Get the timer TCB to hijack for the YP-HA standby SCB.
Definition: agt_ncxserver.c:3390
status_t agt_ncxserver_run(void)
IO server loop for the ncxserver socket.
Definition: agt_ncxserver.c:3292
boolean agt_ncxserver_thread_cancel_cc(ses_id_t sid, ncx_confirm_event_t event)
Signal confirmed commit cancel to either the thread representing session or, if terminated,...
Definition: agt_ncxserver.c:3231
status_t agt_ncxserver_run_ycontrol(boolean ycontrol, const xmlChar *txid_str)
IO server loop for the ncxserver socket.
Definition: agt_ncxserver.c:3567
status_t
global error return code
Definition: status_enum.h:210
ses_term_reason_t
Session Termination reason.
Definition: ses.h:417
uint32 ses_id_t
Session ID.
Definition: ses.h:335
thd_type_t
Thread types.
Definition: thd.h:161
ncx_confirm_event_t
type of confirmEvent in the sysConfirmedCommit notification Used in confirmed-commit standard as well
Definition: ncxtypes.h:1515
YANG module data structures Many internal representations of YANG module constructs.
NETCONF Session Common definitions module.
global error status code enumerations
Session Control Block.
Definition: ses.h:573
Thread control block (TCB)
Definition: thd.h:175