This file is indexed.

/usr/include/yuma/mgr/mgr_io.h is in libyuma-dev 2.10-1build1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
/*
 * Copyright (c) 2008 - 2012, Andy Bierman, All Rights Reserved.
 * 
 * Unless required by applicable law or agreed to in writing,
 * software distributed under the License is distributed on an
 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 * KIND, either express or implied.  See the License for the
 * specific language governing permissions and limitations
 * under the License.    
 */
#ifndef _H_mgr_io
#define _H_mgr_io

/*  FILE: mgr_io.h
*********************************************************************
*								    *
*			 P U R P O S E				    *
*								    *
*********************************************************************

    Manager IO Handler

*********************************************************************
*								    *
*		   C H A N G E	 H I S T O R Y			    *
*								    *
*********************************************************************

date	     init     comment
----------------------------------------------------------------------
18-feb-07    abb      Begun; start from agt_ncxserver.h

*/

#ifndef _H_ses
#include "ses.h"
#endif

#ifndef _H_status
#include "status.h"
#endif

#ifdef __cplusplus
extern "C" {
#endif

/********************************************************************
*								    *
*			 C O N S T A N T S			    *
*								    *
*********************************************************************/


/********************************************************************
*								    *
*			     T Y P E S				    *
*								    *
*********************************************************************/

/* SSH layer debugging return codes */
typedef enum mgr_io_returncode_t_ {
    MGR_IO_RC_NONE,
    MGR_IO_RC_IDLE,
    MGR_IO_RC_DROPPED,
    MGR_IO_RC_WANTDATA,
    MGR_IO_RC_PROCESSED,
    MGR_IO_RC_DROPPED_NOW
} mgr_io_returncode_t;


/* Manager application IO states */
typedef enum mgr_io_state_t_ {
    MGR_IO_ST_NONE,
    MGR_IO_ST_INIT,                         /* session starting up */
    MGR_IO_ST_IDLE,                      /* top-level wait for CLI */
    MGR_IO_ST_CONNECT,                 /* conn attempt in progress */
    MGR_IO_ST_CONN_START,           /* session waiting for <hello> */
    MGR_IO_ST_CONN_IDLE,   	     /* session ready for commands */
    MGR_IO_ST_CONN_RPYWAIT,            /* ses wait for <rpc-reply> */
    MGR_IO_ST_CONN_CANCELWAIT,  /* ses wait for cancel to complete */
    MGR_IO_ST_CONN_CLOSEWAIT,     /* wait for own session to close */
    MGR_IO_ST_CONN_SHUT,                  /* session shutting down */
    MGR_IO_ST_SHUT                    /* application shutting down */
} mgr_io_state_t;


/* Callback function for STDIN input 
 *
 * Handle any input from the user keyboard
 *
 * INPUTS:
 *    none
 * RETURNS:
 *    new manager IO state (upon exit from the function
 */
typedef mgr_io_state_t (*mgr_io_stdin_fn_t) (void);


/********************************************************************
*								    *
*			F U N C T I O N S			    *
*								    *
*********************************************************************/


/********************************************************************
 * FUNCTION mgr_io_init
 * 
 * Init the IO server loop vars for the ncx manager
 * Must call this function before any other function can
 * be used from this module
 *********************************************************************/
extern void
    mgr_io_init (void);


/********************************************************************
 * FUNCTION mgr_io_set_stdin_handler
 * 
 * Set the callback function for STDIN processing
 * 
 * INPUTS:
 *   handler == address of the STDIN handler function
 *********************************************************************/
extern void
    mgr_io_set_stdin_handler (mgr_io_stdin_fn_t handler);


/********************************************************************
 * FUNCTION mgr_io_activate_session
 * 
 * Tell the IO manager to start listening on the specified socket
 * 
 * INPUTS:
 *   fd == file descriptor number of the socket
 *********************************************************************/
extern void
    mgr_io_activate_session (int fd);


/********************************************************************
 * FUNCTION mgr_io_deactivate_session
 * 
 * Tell the IO manager to stop listening on the specified socket
 * 
 * INPUTS:
 *   fd == file descriptor number of the socket
 *********************************************************************/
extern void
    mgr_io_deactivate_session (int fd);


/********************************************************************
 * FUNCTION mgr_io_run
 * 
 * IO server loop for the ncx manager
 * 
 * RETURNS:
 *   status
 *********************************************************************/
extern status_t 
    mgr_io_run (void);


/********************************************************************
 * FUNCTION mgr_io_process_timeout
 * 
 * mini server loop while waiting for KBD input
 * 
 * INPUTS:
 *    cursid == current session ID to check
 *    wantdata == address of return wantdata flag
 *    anystdout == address of return anystdout flag
 *
 * OUTPUTS:
 *   *wantdata == TRUE if the agent has sent a keepalive
 *                and is expecting a request
 *             == FALSE if no keepalive received this time
 *  *anystdout  == TRUE if maybe STDOUT was written
 *                 FALSE if definately no STDOUT written
 *
 * RETURNS:
 *   TRUE if session alive or not confirmed
 *   FALSE if cursid confirmed dropped
 *********************************************************************/
extern boolean
    mgr_io_process_timeout (ses_id_t  cursid,
                            boolean *wantdata,
                            boolean *anystdout);

#ifdef __cplusplus
}  /* end extern 'C' */
#endif

#endif	    /* _H_mgr_io */