/usr/include/yuma/agt/agt_rpcerr.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 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 | /*
* 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_agt_rpcerr
#define _H_agt_rpcerr
/* FILE: agt_rpcerr.h
*********************************************************************
* *
* P U R P O S E *
* *
*********************************************************************
NETCONF protocol <rpc-error> server-side handler
*********************************************************************
* *
* C H A N G E H I S T O R Y *
* *
*********************************************************************
date init comment
----------------------------------------------------------------------
07-mar-06 abb Begun.
13-jan-07 abb moved from rpc dir to agt; rename rpc_agterr
to agt_rpcerr
*/
#include <xmlstring.h>
#ifndef _H_ncxtypes
#include "ncxtypes.h"
#endif
#ifndef _H_rpc_err
#include "rpc_err.h"
#endif
#ifndef _H_status
#include "status.h"
#endif
#ifndef _H_val
#include "val.h"
#endif
#ifndef _H_xml_msg
#include "xml_msg.h"
#endif
#ifndef _H_xml_util
#include "xml_util.h"
#endif
#ifdef __cplusplus
extern "C" {
#endif
/********************************************************************
* *
* F U N C T I O N S *
* *
*********************************************************************/
/********************************************************************
* FUNCTION agt_rpc_gen_error
*
* Generate an internal <rpc-error> record for an element
* (or non-attribute) related error for any layer.
*
* INPUTS:
* layer == protocol layer where the error occurred
* interr == internal error code
* if NO_ERR than use the rpcerr only
* errnode == XML node where error occurred
* == NULL then there is no valid XML node (maybe the error!)
* parmtyp == type of node contained in error_parm
* error_parm == pointer to the extra parameter expected for
* this type of error.
*
* == (void *)pointer to session_id for lock-denied errors
* == (void *) pointer to the bad-value string to use
* for some other errors
*
* error_path == malloced string of the value (or type, etc.) instance
* ID string in NCX_IFMT_XPATH format; this will be added
* to the rpc_err_rec_t and freed later
* == NULL if not available
*
* RETURNS:
* pointer to allocated and filled in rpc_err_rec_t struct
* ready to add to the msg->rpc_errQ
* NULL if a record could not be allocated or not enough
* val;id info in the parameters
*********************************************************************/
extern rpc_err_rec_t *
agt_rpcerr_gen_error (ncx_layer_t layer,
status_t interr,
const xml_node_t *errnode,
ncx_node_t parmtyp,
const void *error_parm,
xmlChar *error_path);
/********************************************************************
* FUNCTION agt_rpc_gen_error_errinfo
*
* Generate an internal <rpc-error> record for an element
*
* INPUTS:
* layer == protocol layer where the error occurred
* interr == internal error code
* if NO_ERR than use the rpcerr only
* errnode == XML node where error occurred
* == NULL then there is no valid XML node (maybe the error!)
* parmtyp == type of node contained in error_parm
* error_parm == pointer to the extra parameter expected for
* this type of error.
*
* == (void *)pointer to session_id for lock-denied errors
* == (void *) pointer to the bad-value string to use
* for some other errors
*
* error_path == malloced string of the value (or type, etc.) instance
* ID string in NCX_IFMT_XPATH format; this will be added
* to the rpc_err_rec_t and freed later
* == NULL if not available
* errinfo == error info struct to use for whatever fields are set
*
* RETURNS:
* pointer to allocated and filled in rpc_err_rec_t struct
* ready to add to the msg->rpc_errQ
* NULL if a record could not be allocated or not enough
* val;id info in the parameters
*********************************************************************/
extern rpc_err_rec_t *
agt_rpcerr_gen_error_errinfo (ncx_layer_t layer,
status_t interr,
const xml_node_t *errnode,
ncx_node_t parmtyp,
const void *error_parm,
xmlChar *error_path,
const ncx_errinfo_t *errinfo);
/********************************************************************
* FUNCTION agt_rpc_gen_error_ex
*
* Generate an internal <rpc-error> record for an element
*
* INPUTS:
* layer == protocol layer where the error occurred
* interr == internal error code
* if NO_ERR than use the rpcerr only
* errnode == XML node where error occurred
* == NULL then there is no valid XML node (maybe the error!)
* parmtyp == type of node contained in error_parm
* error_parm == pointer to the extra parameter expected for
* this type of error.
*
* == (void *)pointer to session_id for lock-denied errors
* == (void *) pointer to the bad-value string to use
* for some other errors
*
* error_path == malloced string of the value (or type, etc.) instance
* ID string in NCX_IFMT_XPATH format; this will be added
* to the rpc_err_rec_t and freed later
* == NULL if not available
* errinfo == error info struct to use for whatever fields are set
* nodetyp == type of node contained in error_path_raw
* error_path_raw == pointer to the extra parameter expected for
* this type of error.
*
* RETURNS:
* pointer to allocated and filled in rpc_err_rec_t struct
* ready to add to the msg->rpc_errQ
* NULL if a record could not be allocated or not enough
* val;id info in the parameters
*********************************************************************/
extern rpc_err_rec_t *
agt_rpcerr_gen_error_ex (ncx_layer_t layer,
status_t interr,
const xml_node_t *errnode,
ncx_node_t parmtyp,
const void *error_parm,
xmlChar *error_path,
const ncx_errinfo_t *errinfo,
ncx_node_t nodetyp,
const void *error_path_raw);
/********************************************************************
* FUNCTION agt_rpc_gen_insert_error
*
* Generate an internal <rpc-error> record for an element
* for an insert operation failed error
*
* INPUTS:
* layer == protocol layer where the error occurred
* interr == internal error code
* if NO_ERR than use the rpcerr only
* errval == pointer to the node with the insert error
* error_path == malloced string of the value (or type, etc.) instance
* ID string in NCX_IFMT_XPATH format; this will be added
* to the rpc_err_rec_t and freed later
* == NULL if not available
*
* RETURNS:
* pointer to allocated and filled in rpc_err_rec_t struct
* ready to add to the msg->rpc_errQ
* NULL if a record could not be allocated or not enough
* val;id info in the parameters
*********************************************************************/
extern rpc_err_rec_t *
agt_rpcerr_gen_insert_error (ncx_layer_t layer,
status_t interr,
const val_value_t *errval,
xmlChar *error_path);
/********************************************************************
* FUNCTION agt_rpc_gen_unique_error
*
* Generate an internal <rpc-error> record for an element
* for a unique-stmt failed error (data-not-unique)
*
* INPUTS:
* msghdr == message header to use for prefix storage
* layer == protocol layer where the error occurred
* interr == internal error code
* if NO_ERR than use the rpcerr only
* errval == pointer to the node with the insert error
* valuniqueQ == Q of val_unique_t structs to
* use for <non-unique> elements
* error_path == malloced string of the value (or type, etc.) instance
* ID string in NCX_IFMT_XPATH format; this will be added
* to the rpc_err_rec_t and freed later
* == NULL if not available
*
* RETURNS:
* pointer to allocated and filled in rpc_err_rec_t struct
* ready to add to the msg->rpc_errQ
* NULL if a record could not be allocated or not enough
* val;id info in the parameters
*********************************************************************/
extern rpc_err_rec_t *
agt_rpcerr_gen_unique_error (xml_msg_hdr_t *msghdr,
ncx_layer_t layer,
status_t interr,
const dlq_hdr_t *valuniqueQ,
xmlChar *error_path);
/********************************************************************
* FUNCTION agt_rpc_gen_attr_error
*
* Generate an internal <rpc-error> record for an attribute
*
* INPUTS:
* layer == protocol layer where the error occurred
* interr == internal error code
* if NO_ERR than use the rpcerr only
* attr == attribute that had the error
* errnode == XML node where error occurred
* == NULL then there is no valid XML node (maybe the error!)
* errnodeval == valuse struct for the error node id errnode NULL
* == NULL if not used
* badns == URI string of the namespace that is bad (or NULL)
*
* RETURNS:
* pointer to allocated and filled in rpc_err_rec_t struct
* ready to add to the msg->rpc_errQ (or add more error-info)
* NULL if a record could not be allocated or not enough
* valid info in the parameters to generate an error report
*********************************************************************/
extern rpc_err_rec_t *
agt_rpcerr_gen_attr_error (ncx_layer_t layer,
status_t interr,
const xml_attr_t *attr,
const xml_node_t *errnode,
const val_value_t *errnodeval,
const xmlChar *badns,
xmlChar *error_path);
#ifdef __cplusplus
} /* end extern 'C' */
#endif
#endif /* _H_agt_rpcerr */
|