yumapro  20.10-12
YumaPro SDK
ycontrol_io.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2008 - 2012, Andy Bierman, All Rights Reserved.
3  * Copyright (c) 2012 - 2021, 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_ycontrol_io
13 #define _H_ycontrol_io
14 
15 /* FILE: ycontrol_io.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 
34 date init comment
35 ----------------------------------------------------------------------
36 05-apr-14 abb Begun
37 */
38 
39 #include <time.h>
40 #include <sys/time.h>
41 
42 #ifndef _H_status_enum
43 #include "status_enum.h"
44 #endif
45 
46 #ifdef __cplusplus
47 extern "C" {
48 #endif
49 
50 /********************************************************************
51 * *
52 * C O N S T A N T S *
53 * *
54 *********************************************************************/
55 
56 
57 /********************************************************************
58 * *
59 * T Y P E S *
60 * *
61 *********************************************************************/
62 
63 
64 /********************************************************************
65 * *
66 * F U N C T I O N S *
67 * *
68 *********************************************************************/
69 
70 
90 extern void
91  ycontrol_io_init (ycontrol_profile_t *profile);
92 
93 
100 extern status_t
101  ycontrol_io_check (ycontrol_profile_t *profile);
102 
103 
104 
113 extern boolean
114  ycontrol_io_write_sessions (ycontrol_profile_t *profile);
115 
116 
123 extern void
124  ycontrol_io_activate_session (ycontrol_profile_t *profile,
125  int fd);
126 
127 
134 extern void
135  ycontrol_io_deactivate_session (ycontrol_profile_t *profile,
136  int fd);
137 
138 
142 #ifdef __cplusplus
143 } /* end extern 'C' */
144 #endif
145 
146 #endif /* _H_ycontrol_io */
ses.h
NETCONF Session Common definitions module.
ses_msg_send_buffs
status_t ses_msg_send_buffs(ses_cb_t *scb, boolean *anyout)
Send multiple buffers to the session client socket Tries to send one packet at maximum MTU.
Definition: ses_msg.c:569
ycontrol_io_activate_session
void ycontrol_io_activate_session(ycontrol_profile_t *profile, int fd)
Tell the IO manager to stop listening on the specified socket.
Definition: ycontrol_io.c:328
log_error
void log_error(const char *fstr,...) __attribute__((format(printf
Generate a new LOG_DEBUG_ERROR log entry.
xml_util.h
XML Utilities.
status_enum.h
global error status code enumerations
log_debug3
void void void void void void void void void void void log_debug3(const char *fstr,...) __attribute__((format(printf
Generate a new LOG_DEBUG_DEBUG3 log entry.
ycontrol_ses_free_session
void ycontrol_ses_free_session(ycontrol_profile_t *profile, ses_id_t sid)
Free a real session control block.
Definition: ycontrol_ses.c:287
SES_CONN_CLOSED
#define SES_CONN_CLOSED(S)
check if the connection is closed
Definition: ses.h:141
ycontrol_io_init
void ycontrol_io_init(ycontrol_profile_t *profile)
Setup ycontrol session handler.
Definition: ycontrol_io.c:153
ycontrol_io_check
status_t ycontrol_io_check(ycontrol_profile_t *profile)
IO server loop for the ycontrol manager.
Definition: ycontrol_io.c:172
ncxconst.h
Contains NCX constants.
ses_msg.h
NETCONF Session Message Common definitions module.
subsys_util.h
Thin client IO handler for YumaPro server (utility functions)
log_info
void void void void void log_info(const char *fstr,...) __attribute__((format(printf
Generate a new LOG_DEBUG_INFO log entry.
NO_ERR
@ NO_ERR
000
Definition: status_enum.h:188
ERR_NCX_SESSION_CLOSED
@ ERR_NCX_SESSION_CLOSED
1010
Definition: status_enum.h:499
ERR_NCX_OPERATION_FAILED
@ ERR_NCX_OPERATION_FAILED
274
Definition: status_enum.h:315
get_error_string
const char * get_error_string(status_t res)
Get the error message for a specific internal error.
Definition: status.c:239
log_debug
void void void void void void void log_debug(const char *fstr,...) __attribute__((format(printf
Generate a new LOG_DEBUG_DEBUG log entry.
LOGINFO
#define LOGINFO
Check if at least log-level=info.
Definition: log.h:279
ycontrol_io_deactivate_session
void ycontrol_io_deactivate_session(ycontrol_profile_t *profile, int fd)
Tell the IO manager to stop listening on the specified socket.
Definition: ycontrol_io.c:345
subsystem.h
Thin client IO handler for YumaPro server.
ycontrol_ses.h
YControl session handler.
LOGDEBUG
#define LOGDEBUG
Check if at least log-level=debug.
Definition: log.h:287
dlq_empty
#define dlq_empty(listP)
check if queue list is empty
Definition: dlq.h:367
ycontrol_io_write_sessions
boolean ycontrol_io_write_sessions(ycontrol_profile_t *profile)
Go through any sessions ready to write and send the buffers ready to send.
Definition: ycontrol_io.c:278
ycontrol.h
YumaPro Subsystem Control Protocol.
SES_MY_SID
#define SES_MY_SID(S)
get session-id
Definition: ses.h:105
SES_MY_FD
#define SES_MY_FD(S)
get file descriptor
Definition: ses.h:108
ycontrol_io.h
YControl protocol Input Output Handler.
ycontrol_ses_process_first_ready
boolean ycontrol_ses_process_first_ready(ycontrol_profile_t *profile)
Check the readyQ and process the first message, if any.
Definition: ycontrol_ses.c:320
ses_msg_make_outready_ycontrol
void ses_msg_make_outready_ycontrol(ses_cb_t *scb)
Put the session on the outreadyQ if it is not already there.
Definition: ses_msg.c:882
ycontrol_shutdown_requested
boolean ycontrol_shutdown_requested(void)
Check if a control message handler shutdown is in progress.
Definition: ycontrol.c:933
ses_accept_input
status_t ses_accept_input(ses_cb_t *scb)
The IO input handler for the ncxserver loop.
Definition: ses.c:3215
ycontrol_setup_reconnect
void ycontrol_setup_reconnect(void)
Setup the YControl profile to reconnect after the retry interval with the incoming message from the s...
Definition: ycontrol.c:1383
ycontrol_service_stop
void ycontrol_service_stop(void)
Stop the registered services.
Definition: ycontrol.c:1052
LOGDEBUG3
#define LOGDEBUG3
Check if at least log-level=debug3.
Definition: log.h:297
ycontrol_ses_get_first_outready
ses_cb_t * ycontrol_ses_get_first_outready(ycontrol_profile_t *profile)
Get the first ses_msg outreadyQ entry.
Definition: ycontrol_ses.c:436