yumapro  20.10-12
YumaPro SDK
agt_util.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_agt_util
13 #define _H_agt_util
14 
15 /* FILE: agt_util.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 24-may-06 abb Begun
37 
38 */
39 
40 #ifndef _H_agt
41 #include "agt.h"
42 #endif
43 
44 #ifndef _H_agt_cfg
45 #include "agt_cfg.h"
46 #endif
47 
48 #ifndef _H_cfg
49 #include "cfg.h"
50 #endif
51 
52 #ifndef _H_dlq
53 #include "dlq.h"
54 #endif
55 
56 #ifndef _H_getcb
57 #include "getcb.h"
58 #endif
59 
60 #ifndef _H_ncxconst
61 #include "ncxconst.h"
62 #endif
63 
64 #ifndef _H_ncxtypes
65 #include "ncxtypes.h"
66 #endif
67 
68 #ifndef _H_obj
69 #include "obj.h"
70 #endif
71 
72 #ifndef _H_rpc
73 #include "rpc.h"
74 #endif
75 
76 #ifndef _H_ses
77 #include "ses.h"
78 #endif
79 
80 #ifndef _H_status
81 #include "status.h"
82 #endif
83 
84 #ifndef _H_val
85 #include "val.h"
86 #endif
87 
88 #ifndef _H_xml_msg
89 #include "xml_msg.h"
90 #endif
91 
92 #ifndef _H_xml_util
93 #include "xml_util.h"
94 #endif
95 
96 #ifndef _H_xpath
97 #include "xpath.h"
98 #endif
99 
100 #ifndef _H_yang_patch
101 #include "yang_patch.h"
102 #endif
103 
104 #ifdef __cplusplus
105 extern "C" {
106 #endif
107 
108 /********************************************************************
109 * *
110 * F U N C T I O N S *
111 * *
112 *********************************************************************/
113 
138 extern status_t
139  agt_get_cfg_from_parm (const xmlChar *parmname,
140  rpc_msg_t *msg,
141  xml_node_t *methnode,
142  cfg_template_t **retcfg);
143 
144 
155 extern status_t
156  agt_get_inline_cfg_from_parm (const xmlChar *parmname,
157  rpc_msg_t *msg,
158  xml_node_t *methnode,
159  val_value_t **retval);
160 
161 
183 extern status_t
184  agt_get_url_from_parm (const xmlChar *parmname,
185  rpc_msg_t *msg,
186  xml_node_t *methnode,
187  const xmlChar **returl,
188  val_value_t **retval);
189 
190 
200 extern xmlChar *
201  agt_get_filespec_from_url (const xmlChar *urlstr,
202  status_t *res);
203 
204 
214 extern const val_value_t *
215  agt_get_parmval (const xmlChar *parmname,
216  rpc_msg_t *msg);
217 
218 
248 extern void
249  agt_record_error (ses_cb_t *scb,
250  xml_msg_hdr_t *msghdr,
251  ncx_layer_t layer,
252  status_t res,
253  const xml_node_t *xmlnode,
254  ncx_node_t parmtyp,
255  const void *error_info,
256  ncx_node_t nodetyp,
257  void *error_path);
258 
259 
271 extern void
272  agt_record_error_obj (ses_cb_t *scb,
273  xml_msg_hdr_t *msghdr,
274  status_t res,
275  obj_template_t *errobj,
276  const xmlChar *badval);
277 
278 
310 extern void
311  agt_record_error_errinfo (ses_cb_t *scb,
312  xml_msg_hdr_t *msghdr,
313  ncx_layer_t layer,
314  status_t res,
315  const xml_node_t *xmlnode,
316  ncx_node_t parmtyp,
317  const void *error_info,
318  ncx_node_t nodetyp,
319  void *error_path,
320  const ncx_errinfo_t *errinfo);
321 
322 
357 extern void
358  agt_record_warning (ses_cb_t *scb,
359  xml_msg_hdr_t *msghdr,
360  ncx_layer_t layer,
361  status_t res,
362  const xml_node_t *xmlnode,
363  ncx_node_t parmtyp,
364  const void *error_parm,
365  ncx_node_t nodetyp,
366  void *error_path,
367  const ncx_errinfo_t *errinfo);
368 
369 
390 extern void
391  agt_record_attr_error (ses_cb_t *scb,
392  xml_msg_hdr_t *msghdr,
393  ncx_layer_t layer,
394  status_t res,
395  const xml_attr_t *xmlattr,
396  const xml_node_t *xmlnode,
397  const xmlChar *badns,
398  ncx_node_t nodetyp,
399  void *errnode);
400 
401 
419 extern void
420  agt_record_insert_error (ses_cb_t *scb,
421  xml_msg_hdr_t *msghdr,
422  status_t res,
423  val_value_t *errval);
424 
425 
443 extern void
444  agt_record_unique_error (ses_cb_t *scb,
445  xml_msg_hdr_t *msghdr,
446  val_value_t *errval,
447  dlq_hdr_t *valuniqueQ);
448 
449 
460 extern status_t
461  agt_validate_filter (ses_cb_t *scb,
462  rpc_msg_t *msg);
463 
464 
476 extern status_t
477  agt_validate_filter_ex (ses_cb_t *scb,
478  rpc_msg_t *msg,
479  val_value_t *filter);
480 
481 
492 extern status_t
493  agt_validate_filter_nmda (rpc_msg_t *msg,
494  val_value_t *filter,
495  boolean is_subtree);
496 
497 
511 extern boolean
512  agt_check_config (xml_msg_hdr_t *mhdr,
513  ncx_withdefaults_t withdef,
514  boolean realtest,
515  val_value_t *node);
516 
517 
533 extern boolean
534  agt_check_default (xml_msg_hdr_t *mhdr,
535  ncx_withdefaults_t withdef,
536  boolean realtest,
537  val_value_t *node);
538 
539 
555 extern boolean
556  agt_check_config_false (xml_msg_hdr_t *mhdr,
557  ncx_withdefaults_t withdef,
558  boolean realtest,
559  val_value_t *node);
560 
561 
579 extern boolean
580  agt_check_config_false_default (xml_msg_hdr_t *mhdr,
581  ncx_withdefaults_t withdef,
582  boolean realtest,
583  val_value_t *node);
584 
585 
601 extern boolean
602  agt_check_save (xml_msg_hdr_t *mhdr,
603  ncx_withdefaults_t withdef,
604  boolean realtest,
605  val_value_t *node);
606 
607 
623 extern boolean
624  agt_check_modtags (xml_msg_hdr_t *mhdr,
625  ncx_withdefaults_t withdef,
626  boolean realtest,
627  val_value_t *node);
628 
629 
645 extern boolean agt_check_basic (xml_msg_hdr_t *mhdr,
646  ncx_withdefaults_t withdef,
647  boolean realtest,
648  val_value_t *node);
649 
650 
661 extern status_t
662  agt_output_filter (ses_cb_t *scb,
663  rpc_msg_t *msg,
664  int32 indent);
665 
666 
676 extern status_t
677  agt_output_schema (ses_cb_t *scb,
678  rpc_msg_t *msg,
679  int32 indent);
680 
681 
692 extern status_t
693  agt_output_empty (ses_cb_t *scb,
694  rpc_msg_t *msg,
695  int32 indent);
696 
697 
705 extern status_t
706  agt_check_max_access (val_value_t *newval,
707  boolean cur_exists);
708 
709 
747 extern status_t
748  agt_check_editop (op_editop_t pop,
749  op_editop_t *cop,
750  val_value_t *newnode,
751  val_value_t *curnode,
752  ncx_iqual_t iqual,
753  ncx_protocol_t proto,
754  boolean is_commit,
755  boolean *delete_default);
756 
757 
769 extern status_t
770  agt_enable_feature (const xmlChar *modname,
771  const xmlChar *featurename);
772 
773 
785 extern status_t
786  agt_disable_feature (const xmlChar *modname,
787  const xmlChar *featurename);
788 
789 
804 extern val_value_t *
805  agt_make_leaf (obj_template_t *parentobj,
806  const xmlChar *leafname,
807  const xmlChar *leafstrval,
808  status_t *res);
809 
810 
825 extern val_value_t *
826  agt_make_uint_leaf (obj_template_t *parentobj,
827  const xmlChar *leafname,
828  uint32 leafval,
829  status_t *res);
830 
845 extern val_value_t *
846  agt_make_int_leaf (obj_template_t *parentobj,
847  const xmlChar *leafname,
848  int32 leafval,
849  status_t *res);
850 
851 
866 extern val_value_t *
867  agt_make_uint64_leaf (obj_template_t *parentobj,
868  const xmlChar *leafname,
869  uint64 leafval,
870  status_t *res);
871 
872 
887 extern val_value_t *
888  agt_make_int64_leaf (obj_template_t *parentobj,
889  const xmlChar *leafname,
890  int64 leafval,
891  status_t *res);
892 
893 
909 extern val_value_t *
910  agt_make_idref_leaf (obj_template_t *parentobj,
911  const xmlChar *leafname,
912  const val_idref_t *leafval,
913  status_t *res);
914 
915 
929 extern val_value_t *
930  agt_make_list (obj_template_t *parentobj,
931  const xmlChar *listname,
932  status_t *res);
933 
934 
944 extern val_value_t *
945  agt_make_object (obj_template_t *parentobj,
946  const xmlChar *objname,
947  status_t *res);
948 
949 
950 #define agt_make_virtual_node agt_make_virtual_leaf
951 
952 
971 extern val_value_t *
972  agt_make_virtual_leaf (obj_template_t *parentobj,
973  const xmlChar *leafname,
974  getcb_fn_t callbackfn,
975  status_t *res);
976 
977 
990 extern status_t
991  agt_add_top_virtual (obj_template_t *obj,
992  getcb_fn_t callbackfn);
993 
994 
1015 extern status_t
1016  agt_add_top_container (obj_template_t *obj,
1017  val_value_t **val);
1018 
1019 
1042 extern status_t
1043  agt_add_container (const xmlChar *modname,
1044  const xmlChar *objname,
1045  val_value_t *parentval,
1046  val_value_t **val);
1047 
1048 
1049 
1064 extern val_value_t *
1065  agt_init_cache (const xmlChar *modname,
1066  const xmlChar *objname,
1067  status_t *res);
1068 
1069 
1084 extern status_t
1085  agt_check_cache (val_value_t **cacheptr,
1086  val_value_t *newval,
1087  val_value_t *curval,
1088  op_editop_t editop);
1089 
1090 
1102 extern xpath_pcb_t *
1103  agt_new_xpath_pcb (ses_cb_t *scb,
1104  const xmlChar *expr,
1105  status_t *res);
1106 
1107 
1116 extern xmlChar *
1117  agt_get_startup_filespec (status_t *res);
1118 
1119 
1132 extern xmlChar *
1133  agt_get_target_filespec (const xmlChar *target_url,
1134  status_t *res);
1135 
1136 
1157 extern status_t
1158  agt_set_mod_defaults (ncx_module_t *mod,
1159  val_value_t *valroot,
1160  boolean set_candidate,
1161  boolean set_augment,
1162  boolean force);
1163 
1164 
1172 extern status_t
1173  agt_set_val_defaults (val_value_t *val);
1174 
1175 
1196 extern status_t
1197  agt_set_with_defaults (rpc_msg_t *msg,
1198  const xmlChar *modname,
1199  val_value_t **errval);
1200 
1201 
1212 extern void
1213  agt_set_with_owners (rpc_msg_t *msg);
1214 
1215 
1224 extern void
1225  agt_set_depth (rpc_msg_t *msg);
1226 
1227 
1236 extern void
1237  agt_set_depth_nmda (rpc_msg_t *msg);
1238 
1239 
1254 extern val_value_t *
1255  agt_get_key_value (val_value_t *startval,
1256  val_value_t **lastkey);
1257 
1258 
1278 extern val_value_t *
1279  agt_add_top_node_if_missing (ncx_module_t *mod,
1280  const xmlChar *objname,
1281  boolean *added,
1282  status_t *res);
1283 
1292 extern boolean
1293  agt_any_operations_set (val_value_t *val);
1294 
1295 
1306 extern boolean
1307  agt_apply_this_node (op_editop_t editop,
1308  const val_value_t *newnode,
1309  const val_value_t *curnode);
1310 
1311 
1331 extern boolean
1332  agt_apply_this_node_ex (op_editop_t editop,
1333  const val_value_t *newnode,
1334  const val_value_t *curnode,
1335  boolean ignore_defaults,
1336  boolean childonly,
1337  boolean top_replace);
1338 
1339 
1345 extern boolean
1346  agt_backups_enabled (void);
1347 
1348 
1358 extern xpath_result_t *
1359  agt_get_result_from_xpath (xpath_pcb_t *pcb,
1360  val_value_t *rootval,
1361  status_t *retres);
1362 
1363 
1371 extern val_value_t *
1372  agt_get_first_result_val (xpath_result_t *result);
1373 
1374 
1388 extern void
1389  agt_output_start_container (ses_cb_t *scb,
1390  xml_msg_hdr_t *mhdr,
1391  xmlns_id_t parent_nsid,
1392  xmlns_id_t node_nsid,
1393  const xmlChar *node_name,
1394  int32 indent);
1395 
1396 
1411 extern void
1412  agt_output_start_node (ses_cb_t *scb,
1413  xml_msg_hdr_t *mhdr,
1414  xmlns_id_t parent_nsid,
1415  xmlns_id_t node_nsid,
1416  const xmlChar *node_name,
1417  int32 indent,
1418  boolean try_modname);
1419 
1420 
1441 extern void
1442  agt_output_start_errors_container (ses_cb_t *scb,
1443  xml_msg_hdr_t *mhdr,
1444  xmlns_id_t parent_nsid,
1445  xmlns_id_t nsid,
1446  const xmlChar *elname,
1447  const dlq_hdr_t *attrQ,
1448  boolean isattrq,
1449  int32 indent,
1450  boolean empty);
1451 
1452 
1464 extern void
1465  agt_output_end_container (ses_cb_t *scb,
1466  xml_msg_hdr_t *mhdr,
1467  xmlns_id_t node_nsid,
1468  const xmlChar *node_name,
1469  int32 indent);
1470 
1471 
1479 extern boolean
1480  agt_match_etag (val_value_t *val,
1481  const xmlChar *etag);
1482 
1483 
1493 extern boolean
1494  agt_match_etag_binary (val_value_t *val,
1495  ncx_etag_t etag);
1496 
1497 
1506 extern boolean
1507  agt_modified_since (val_value_t *val,
1508  time_t *timerec);
1509 
1510 
1517 extern boolean
1519 
1520 
1536 extern val_value_t *
1537  agt_make_leaf2 (obj_template_t *parentobj,
1538  const xmlChar *modname,
1539  const xmlChar *leafname,
1540  const xmlChar *leafstrval,
1541  status_t *res);
1542 
1543 
1556 extern val_value_t *
1557  agt_make_union_leaf (obj_template_t *parentobj,
1558  const xmlChar *modname,
1559  const xmlChar *leafname,
1560  const val_value_t *leafval,
1561  status_t *res);
1562 
1563 
1579 extern val_value_t *
1580  agt_make_uint_leaf2 (obj_template_t *parentobj,
1581  const xmlChar *modname,
1582  const xmlChar *leafname,
1583  uint32 leafval,
1584  status_t *res);
1585 
1586 
1602 extern val_value_t *
1603  agt_make_int_leaf2 (obj_template_t *parentobj,
1604  const xmlChar *modname,
1605  const xmlChar *leafname,
1606  int32 leafval,
1607  status_t *res);
1608 
1609 
1625 extern val_value_t *
1626  agt_make_uint64_leaf2 (obj_template_t *parentobj,
1627  const xmlChar *modname,
1628  const xmlChar *leafname,
1629  uint64 leafval,
1630  status_t *res);
1631 
1632 
1648 extern val_value_t *
1649  agt_make_int64_leaf2 (obj_template_t *parentobj,
1650  const xmlChar *modname,
1651  const xmlChar *leafname,
1652  int64 leafval,
1653  status_t *res);
1654 
1655 
1675 extern val_value_t *
1676  agt_make_idref_leaf2 (obj_template_t *parentobj,
1677  const xmlChar *modname,
1678  const xmlChar *leafname,
1679  const val_idref_t *leafval,
1680  status_t *res);
1681 
1682 
1695 extern val_value_t *
1696  agt_make_bits_leaf (obj_template_t *parentobj,
1697  const xmlChar *modname,
1698  const xmlChar *leafname,
1699  const ncx_list_t *listval,
1700  status_t *res);
1701 
1702 
1715 extern val_value_t *
1716  agt_make_boolean_leaf (obj_template_t *parentobj,
1717  const xmlChar *modname,
1718  const xmlChar *leafname,
1719  boolean boolval,
1720  status_t *res);
1721 
1722 
1735 extern val_value_t *
1736  agt_make_empty_leaf (obj_template_t *parentobj,
1737  const xmlChar *modname,
1738  const xmlChar *leafname,
1739  boolean boolval,
1740  status_t *res);
1741 
1742 
1757 extern val_value_t *
1758  agt_make_object2 (obj_template_t *parentobj,
1759  const xmlChar *modname,
1760  const xmlChar *objname,
1761  status_t *res);
1762 
1763 
1785 extern val_value_t *
1786  agt_make_virtual_leaf2 (obj_template_t *parentobj,
1787  const xmlChar *modname,
1788  const xmlChar *leafname,
1789  getcb_fn_t callbackfn,
1790  status_t *res);
1791 
1792 
1804 extern ncx_cfg_t
1805  agt_get_edit_config_id (rpc_msg_t *rpcmsg);
1806 
1807 
1815 extern boolean
1816  agt_module_in_cli_valset (const xmlChar *modname);
1817 
1818 
1825 extern void
1827 
1828 
1829 
1837 extern boolean
1838  agt_check_delete_all_allowed (obj_template_t *testobj);
1839 
1840 
1849 extern op_editop_t
1850  agt_cvt_editop (op_editop_t editop,
1851  const val_value_t *newval,
1852  const val_value_t *curval);
1853 
1854 
1864 extern op_editop_t
1865  agt_cvt_editop_ex (op_editop_t editop,
1866  const val_value_t *newval,
1867  const val_value_t *curval);
1868 
1869 
1879 extern int
1880  agt_connect_client (const xmlChar *hostname,
1881  uint16_t port);
1882 
1883 
1898 extern status_t
1899  agt_find_in_datastore (ncx_cfg_t cfg_id,
1900  val_value_t *err_value,
1901  val_value_t **retval);
1902 
1903 
1910 extern uint32
1911  agt_get_error_count (rpc_msg_t *msg);
1912 
1913 
1922 extern val_value_t *
1923  agt_get_rpc_input (rpc_msg_t *msg);
1924 
1925 
1932 extern const xmlChar*
1933  agt_getTermReasonStr ( ses_term_reason_t termreason);
1934 
1935 
1936 #ifdef PTHREADS
1937 
1945 extern boolean
1946  agt_get_ok_for_nolock (rpc_msg_t *msg);
1947 
1948 
1957 extern boolean
1958  agt_getbulk_ok_for_nolock (const xmlChar *pathstr);
1959 
1960 #endif // PTHREADS
1961 
1962 
1971 extern boolean
1972  agt_op_ok_for_maintenance_mode (const obj_template_t *rpcobj);
1973 
1974 
1981 extern const xmlChar *
1982  agt_crl_mode_str (agt_crl_mode_t crl_mode);
1983 
1984 
1991 extern agt_crl_mode_t
1992  agt_crl_mode_enum (const xmlChar *crl_mode);
1993 
1994 
2005 extern val_nodetest_fn_t
2006  agt_util_get_testfn (xml_msg_hdr_t *msg,
2007  boolean getop);
2008 
2009 
2010 
2026 extern status_t
2027  agt_fill_dummy_method (const xmlChar *modname,
2028  const xmlChar *rpcname,
2029  xml_node_t *node,
2030  obj_template_t **rpcobj);
2031 
2032 
2047 extern yang_patch_cb_t *
2048  agt_make_yang_patch_cb (const xmlChar *patch_id,
2049  const xmlChar *the_comment,
2050  const xmlChar *patch_root,
2051  agt_cfg_transaction_t *txcb,
2052  uint32 included_changes);
2053 
2054 
2070 extern yang_patch_cb_t *
2071  agt_make_yang_patch_cb_targobj (const xmlChar *patch_id,
2072  const xmlChar *the_comment,
2073  const xmlChar *patch_root,
2074  agt_cfg_transaction_t *txcb,
2075  uint32 included_changes,
2076  obj_template_t *targobj);
2077 
2078 
2091 extern yang_patch_cb_t *
2092  agt_make_yang_patch_cb_file (const xmlChar *patch_id,
2093  const xmlChar *the_comment,
2094  const xmlChar *patch_root,
2095  const xmlChar *filespec);
2096 
2097 
2112 extern boolean
2113  agt_check_included_changes (agt_cfg_transaction_t *txcb,
2114  uint32 included_changes,
2115  obj_template_t *targobj);
2116 
2117 
2118 
2119 
2120 
2134 extern status_t
2135  agt_add_leafy (val_value_t *parentval,
2136  const xmlChar *modname,
2137  const xmlChar *leafname,
2138  const xmlChar *leafstrval);
2139 
2140 
2154 extern status_t
2155  agt_add_uint_leafy (val_value_t *parentval,
2156  const xmlChar *modname,
2157  const xmlChar *leafname,
2158  uint32 leafval);
2159 
2160 
2161 
2175 extern status_t
2176  agt_add_int_leafy (val_value_t *parentval,
2177  const xmlChar *modname,
2178  const xmlChar *leafname,
2179  int32 leafval);
2180 
2181 
2195 extern status_t
2196  agt_add_uint64_leafy (val_value_t *parentval,
2197  const xmlChar *modname,
2198  const xmlChar *leafname,
2199  uint64 leafval);
2200 
2201 
2215 extern status_t
2216  agt_add_int64_leafy (val_value_t *parentval,
2217  const xmlChar *modname,
2218  const xmlChar *leafname,
2219  int64 leafval);
2220 
2221 
2222 
2236 extern status_t
2237  agt_add_boolean_leafy (val_value_t *parentval,
2238  const xmlChar *modname,
2239  const xmlChar *leafname,
2240  boolean boolval);
2241 
2242 
2259 extern status_t
2260  agt_add_idref_leafy (val_value_t *parentval,
2261  const xmlChar *modname,
2262  const xmlChar *leafname,
2263  const val_idref_t *leafval);
2264 
2265 
2282 extern status_t
2283  agt_add_bits_leafy (val_value_t *parentval,
2284  const xmlChar *modname,
2285  const xmlChar *leafname,
2286  const ncx_list_t *leafval);
2287 
2288 
2292 #ifdef __cplusplus
2293 } /* end extern 'C' */
2294 #endif
2295 
2296 #endif /* _H_agt_util */
agt_make_idref_leaf
val_value_t * agt_make_idref_leaf(obj_template_t *parentobj, const xmlChar *leafname, const val_idref_t *leafval, status_t *res)
make an identityref val_value_t struct for a specified leaf or leaf-list
Definition: agt_util.c:3788
obj_first_child
obj_template_t * obj_first_child(obj_template_t *obj)
Get the first child object if the specified object has any children.
Definition: obj.c:6687
agt_add_idref_leafy
status_t agt_add_idref_leafy(val_value_t *parentval, const xmlChar *modname, const xmlChar *leafname, const val_idref_t *leafval)
make a child node from a val_idref_t struct and add to parent.
Definition: agt_util.c:7647
obj_gen_object_id
status_t obj_gen_object_id(const obj_template_t *obj, xmlChar **buff)
Malloc and Generate the object ID for an object node.
Definition: obj.c:9987
ses.h
NETCONF Session Common definitions module.
ERR_NCX_SKIPPED
@ ERR_NCX_SKIPPED
2001
Definition: status_enum.h:551
agt_make_int64_leaf
val_value_t * agt_make_int64_leaf(obj_template_t *parentobj, const xmlChar *leafname, int64 leafval, status_t *res)
make an int64 val_value_t struct for a specified leaf or leaf-list
Definition: agt_util.c:3759
xml_strlen
uint32 xml_strlen(const xmlChar *str)
Get the String len for xmlChar.
Definition: xml_util.c:1406
SES_TR_OTHER
@ SES_TR_OTHER
other
Definition: ses.h:393
NCX_NT_STRING
@ NCX_NT_STRING
xmlChar *, error only
Definition: ncxtypes.h:279
agt_add_container
status_t agt_add_container(const xmlChar *modname, const xmlChar *objname, val_value_t *parentval, val_value_t **val)
make a val_value_t struct for a specified nested container data node.
Definition: agt_util.c:4007
ncx_free_filptr
void ncx_free_filptr(ncx_filptr_t *filptr)
Free a new ncx_filptr_t struct or add to the cache if room.
Definition: ncx.c:6271
agt_cap.h
NETCONF Server capabilities handler.
agt_modtags.h
YumaPro Module tags handler.
val_compare_for_topreplace_simple
int32 val_compare_for_topreplace_simple(const val_value_t *val1, const val_value_t *val2)
Compare 2 val_value_t struct value contents.
Definition: val.c:14977
cfg.h
ncx_feature.h
NCX Module Library YANG Feature Utility Functions.
agt_disable_feature
status_t agt_disable_feature(const xmlChar *modname, const xmlChar *featurename)
Disable a YANG feature in the server.
Definition: agt_util.c:3646
agt_set_val_defaults
status_t agt_set_val_defaults(val_value_t *val)
Check for any node-level config leafs that have a default value, and add them to the running configur...
Definition: agt_util.c:4498
NCX_IFMT_XPATH1
@ NCX_IFMT_XPATH1
single-quote Xpath for filter
Definition: ncxtypes.h:399
xpath_free_pcb
void xpath_free_pcb(xpath_pcb_t *pcb)
Free a malloced XPath parser control block.
Definition: xpath.c:2963
ERR_NCX_WRONG_NODETYP
@ ERR_NCX_WRONG_NODETYP
282
Definition: status_enum.h:325
xml_strncpy
uint32 xml_strncpy(xmlChar *copyTo, const xmlChar *copyFrom, uint32 maxlen)
String copy for xmlChar – checks for buffer overflow.
Definition: xml_util.c:1518
agt_make_int_leaf
val_value_t * agt_make_int_leaf(obj_template_t *parentobj, const xmlChar *leafname, int32 leafval, status_t *res)
make an int32 val_value_t struct for a specified leaf or leaf-list
Definition: agt_util.c:3721
val_compare_max
int32 val_compare_max(const val_value_t *val1, const val_value_t *val2, boolean configonly, boolean childonly, boolean editing)
Compare 2 val_value_t struct value contents.
Definition: val.c:9108
val_traverse_keys
void val_traverse_keys(val_value_t *val, void *cookie1, void *cookie2, val_walker_fn_t walkerfn)
Check ancestor-or-self nodes until root reached.
Definition: val_util.c:6277
OP_EDITOP_CREATE
@ OP_EDITOP_CREATE
edit op is create
Definition: op.h:126
agt_xpath_output_cvt_filter
status_t agt_xpath_output_cvt_filter(ses_cb_t *scb, rpc_msg_t *msg, const cfg_template_t *cfg, xpath_pcb_t *pcb, boolean getop, int32 indent)
Output an XPath filter converted from Subtree.
Definition: agt_xpath.c:2304
agt_util.h
Utility Functions for NCX Server method routines.
agt_make_bits_leaf
val_value_t * agt_make_bits_leaf(obj_template_t *parentobj, const xmlChar *modname, const xmlChar *leafname, const ncx_list_t *listval, status_t *res)
make a val_value_t struct for a specified leaf or leaf-list (NCX_BT_BITS or NCX_BT_SLIST)
Definition: agt_util.c:5860
xpath_first_resnode_valptr
val_value_t * xpath_first_resnode_valptr(xpath_resnode_t *resnode)
Get the first result in the renodeQ from a result struct.
Definition: xpath.c:3982
OP_EDITOP_REPLACE
@ OP_EDITOP_REPLACE
edit op is replace
Definition: op.h:125
YANG_PATCH_OP_CREATE
@ YANG_PATCH_OP_CREATE
create
Definition: yang_patch.h:89
OP_EDITOP_NONE
@ OP_EDITOP_NONE
not set
Definition: op.h:123
xml_strdup
xmlChar * xml_strdup(const xmlChar *copyFrom)
String duplicate for xmlChar.
Definition: xml_util.c:1553
val_set_name
void val_set_name(val_value_t *val, const xmlChar *name, uint32 namelen)
Set (or reset) the name of a value struct.
Definition: val.c:2875
obj_has_ro_descendants
boolean obj_has_ro_descendants(obj_template_t *obj)
Check if there are any accessible read-only descendant nodes within the object.
Definition: obj.c:14876
val_find_meta
val_value_t * val_find_meta(val_value_t *val, xmlns_id_t nsid, const xmlChar *name)
Get the corresponding meta data node.
Definition: val.c:5532
xpath_next_resnode_valptr
val_value_t * xpath_next_resnode_valptr(xpath_resnode_t *resnode, val_value_t *valptr)
Get the next node val pointer from a result node struct.
Definition: xpath.c:4017
ncx_get_mod_prefix
const xmlChar * ncx_get_mod_prefix(const ncx_module_t *mod)
Get the module prefix for the specified module.
Definition: ncx.c:8908
NCX_IQUAL_ONE
@ NCX_IQUAL_ONE
no iqual == 1
Definition: ncxtypes.h:297
val_get_xpathpcb
xpath_pcb_t * val_get_xpathpcb(val_value_t *val)
Get the XPath parser control block in the specified value struct.
Definition: val_util.c:4264
agt_output_end_container
void agt_output_end_container(ses_cb_t *scb, xml_msg_hdr_t *mhdr, xmlns_id_t node_nsid, const xmlChar *node_name, int32 indent)
Output an end container node.
Definition: agt_util.c:5408
val_find_child
val_value_t * val_find_child(const val_value_t *parent, const xmlChar *modname, const xmlChar *childname)
Find the first instance of the specified child node.
Definition: val.c:8560
agt_get_url_from_parm
status_t agt_get_url_from_parm(const xmlChar *parmname, rpc_msg_t *msg, xml_node_t *methnode, const xmlChar **returl, val_value_t **retval)
Get the URL string for the config in the target param.
Definition: agt_util.c:1703
VAL_STRING
#define VAL_STRING(V)
Access the value as a string ONLY if typ_is_string(typdef) is true.
Definition: val.h:414
ncx_list_to_string
xmlChar * ncx_list_to_string(const ncx_list_t *list)
Convert a list into a string with spaces between the entries.
Definition: ncx_list.c:1372
OP_INSOP_AFTER
@ OP_INSOP_AFTER
insert after foo
Definition: op.h:142
obj_is_terminal
boolean obj_is_terminal(const obj_template_t *obj)
Check if object is a proper leaf or leaflist or anyxml.
Definition: obj.c:13493
yang_patch_add_edit
void yang_patch_add_edit(yang_patch_cb_t *pcb, yang_patch_edit_t *edit)
Malloc and add new YANG Patch edit control block.
Definition: yang_patch.c:393
YANG_PATCH_WHERE_AFTER
@ YANG_PATCH_WHERE_AFTER
insert after foo
Definition: yang_patch.h:111
agt_add_top_node_if_missing
val_value_t * agt_add_top_node_if_missing(ncx_module_t *mod, const xmlChar *objname, boolean *added, status_t *res)
Add a top config node if it is missing.
Definition: agt_util.c:4821
val_change_nsid
void val_change_nsid(val_value_t *val, xmlns_id_t nsid)
Change the namespace ID for a value node and all its descendants.
Definition: val.c:12303
ERR_NCX_DEF_NOT_FOUND
@ ERR_NCX_DEF_NOT_FOUND
250
Definition: status_enum.h:289
agt_output_schema
status_t agt_output_schema(ses_cb_t *scb, rpc_msg_t *msg, int32 indent)
generate the YANG file contents for the get-schema operation
Definition: agt_util.c:3001
yang_patch_free_cb
void yang_patch_free_cb(yang_patch_cb_t *pcb)
Free a YANG Patch control block.
Definition: yang_patch.c:214
OP_INSOP_BEFORE
@ OP_INSOP_BEFORE
insert before foo
Definition: op.h:141
log_error
void log_error(const char *fstr,...) __attribute__((format(printf
Generate a new LOG_DEBUG_ERROR log entry.
agt_record_unique_error
void agt_record_unique_error(ses_cb_t *scb, xml_msg_hdr_t *msghdr, val_value_t *errval, dlq_hdr_t *valuniqueQ)
Generate an rpc_err_rec_t and save it in the msg.
Definition: agt_util.c:2332
agt_cfg_first_active_undo
agt_cfg_undo_rec_t * agt_cfg_first_active_undo(agt_cfg_transaction_t *txcb)
Get the first active undo record.
Definition: agt_cfg.c:3578
obj_is_leaf_list
boolean obj_is_leaf_list(const obj_template_t *obj)
Check if object is a proper leaf-list.
Definition: obj.c:13336
NCX_WITHDEF_TRIM
@ NCX_WITHDEF_TRIM
trim
Definition: ncxtypes.h:1014
ncx_get_modname
const xmlChar * ncx_get_modname(const ncx_module_t *mod)
Get the main module name.
Definition: ncx.c:4834
agt_add_top_virtual
status_t agt_add_top_virtual(obj_template_t *obj, getcb_fn_t callbackfn)
make a val_value_t struct for a specified virtual top-level data node
Definition: agt_util.c:3897
agt_make_int_leaf2
val_value_t * agt_make_int_leaf2(obj_template_t *parentobj, const xmlChar *modname, const xmlChar *leafname, int32 leafval, status_t *res)
make a val_value_t struct for a specified leaf or leaf-list
Definition: agt_util.c:5683
val.h
Value Node Basic Support.
NCX_WITHDEF_NONE
@ NCX_WITHDEF_NONE
not set
Definition: ncxtypes.h:1011
AGT_CRL_MODE_NONE
@ AGT_CRL_MODE_NONE
not set
Definition: agt.h:702
NCX_IFMT_RESTCONF
@ NCX_IFMT_RESTCONF
RESTCONF URI with list1=key1,key2.
Definition: ncxtypes.h:404
val_is_default
boolean val_is_default(val_value_t *val)
Check if the specified value is set to the YANG default value.
Definition: val.c:11347
xml_util.h
XML Utilities.
agt_tree.h
Server subtree filter processing for <filter> element in <get> and <get-config> operations.
val_make_simval_obj
val_value_t * val_make_simval_obj(obj_template_t *obj, const xmlChar *valstr, status_t *res)
Create and set a val_value_t as a simple type from an object template instead of individual fields Ca...
Definition: val_util.c:4389
VAL_UINT32
#define VAL_UINT32(V)
Access the value as an uint32 ONLY if NCX_BT_UINT32.
Definition: val.h:497
NCX_BT_IDREF
@ NCX_BT_IDREF
identityref
Definition: ncxtypes.h:222
getcb.h
GET1 and GET2 Callback Support.
agt_check_basic
boolean agt_check_basic(xml_msg_hdr_t *mhdr, ncx_withdefaults_t withdef, boolean realtest, val_value_t *node)
Used by the <get-data> operation to return basic filtering NMDA, module-tags, tstamps filtered data.
Definition: agt_util.c:2860
xpath_new_pcb
xpath_pcb_t * xpath_new_pcb(const xmlChar *xpathstr, xpath_getvar_fn_t getvar_fn)
malloc a new XPath parser control block
Definition: xpath.c:2739
ERR_NCX_DATA_EXISTS
@ ERR_NCX_DATA_EXISTS
271
Definition: status_enum.h:312
agt_rpc.h
NETCONF protocol remote procedure call server-side definitions.
YANG_PATCH_OP_MERGE
@ YANG_PATCH_OP_MERGE
merge
Definition: yang_patch.h:92
YANG_PATCH_WHERE_NONE
@ YANG_PATCH_WHERE_NONE
not set
Definition: yang_patch.h:109
agt_tree_filter_ok_for_nolock
boolean agt_tree_filter_ok_for_nolock(val_value_t *filterval)
Check a filter to see if it selects only top-level config=false.
Definition: agt_tree.c:3872
val_force_default
void val_force_default(val_value_t *val)
Set a node created by the server as a default node.
Definition: val.c:13521
NCX_LAYER_OPERATION
@ NCX_LAYER_OPERATION
protocol operation layer
Definition: ncxtypes.h:346
obj_in_edit2_mode
boolean obj_in_edit2_mode(obj_template_t *obj)
Check if the object is an edit2 container or list or terminal node child in an edit2 container or lis...
Definition: obj.c:17260
obj_get_mod
ncx_module_t * obj_get_mod(obj_template_t *obj)
Get the module pointer for this object.
Definition: obj.c:12218
VAL_LAST_MODIFIED
#define VAL_LAST_MODIFIED(V)
Access the last-modified field.
Definition: val.h:542
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.
agt_validate_filter_nmda
status_t agt_validate_filter_nmda(rpc_msg_t *msg, val_value_t *filter, boolean is_subtree)
Validate the <filter> parameter; FOR NMDA ONLY.
Definition: agt_util.c:2511
xml_wr.h
XML Write functions.
agt_nmda_test_filters
boolean agt_nmda_test_filters(xml_msg_hdr_t *mhdr, val_value_t *node)
NMDA check pre-condition filters.
Definition: agt_nmda.c:189
ERR_NCX_NO_ACCESS_MAX
@ ERR_NCX_NO_ACCESS_MAX
303
Definition: status_enum.h:346
val_get_mod_name
const xmlChar * val_get_mod_name(const val_value_t *val)
Get the module name associated with this value node.
Definition: val.c:12223
OP_INSOP_FIRST
@ OP_INSOP_FIRST
insert first
Definition: op.h:139
agt_rpcerr_gen_unique_error
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, val_value_t *errval)
Generate an internal <rpc-error> record for an element for a unique-stmt failed error (data-not-uniqu...
Definition: agt_rpcerr.c:1981
agt_rpcerr_gen_insert_error
rpc_err_rec_t * agt_rpcerr_gen_insert_error(ncx_layer_t layer, status_t interr, val_value_t *errval, xmlChar *error_path)
Generate an internal <rpc-error> record for an element for an insert operation failed error.
Definition: agt_rpcerr.c:1896
agt_make_virtual_leaf
val_value_t * agt_make_virtual_leaf(obj_template_t *parentobj, const xmlChar *leafname, getcb_fn_t callbackfn, status_t *res)
make a val_value_t struct for a specified virtual leaf or leaf-list
Definition: agt_util.c:3872
ERR_NCX_ACCESS_READ_ONLY
@ ERR_NCX_ACCESS_READ_ONLY
375
Definition: status_enum.h:418
XML_MSG_SET_WITH_OWNERS
#define XML_MSG_SET_WITH_OWNERS(M)
Set flag that NDMA owner attributes requested.
Definition: xml_msg.h:219
agt_ncx_cc_active
boolean agt_ncx_cc_active(void)
Check if a confirmed-commit is active, and the timeout may need to be processed.
Definition: agt_ncx.c:5623
val_compare
int32 val_compare(const val_value_t *val1, const val_value_t *val2)
Compare 2 val_value_t struct value contents.
Definition: val.c:9456
AGT_CFG_EDIT_ACTION_MOVE
@ AGT_CFG_EDIT_ACTION_MOVE
move edit action
Definition: agt_cfg.h:179
XML_MSG_GET_ERROR_DATAQ
#define XML_MSG_GET_ERROR_DATAQ(M)
Get USER ERROR DATA Q.
Definition: xml_msg.h:261
obj_is_key
boolean obj_is_key(const obj_template_t *obj)
Check if object is being used as a key leaf within a list.
Definition: obj.c:14278
agt_maintenance_mode_operation_ok
boolean agt_maintenance_mode_operation_ok(void)
Return true if in maintenance mode operations OK;.
Definition: agt.c:5214
agt_match_etag_binary
boolean agt_match_etag_binary(val_value_t *val, ncx_etag_t etag)
Check if the etag matches the specified value string.
Definition: agt_util.c:5478
agt_module_in_cli_valset
boolean agt_module_in_cli_valset(const xmlChar *modname)
Check if there is a module=foo parameter in the CLI parameter set.
Definition: agt_util.c:6107
op.h
NETCONF protocol operations.
OP_FILTER_SUBTREE
@ OP_FILTER_SUBTREE
subtree filter
Definition: op.h:116
VAL_NAME
#define VAL_NAME(V)
Access the value name.
Definition: val.h:399
ncxconst.h
Contains NCX constants.
ncxmod.h
NCX Module Load Manager.
xml_msg_get_withdef
ncx_withdefaults_t xml_msg_get_withdef(xml_msg_hdr_t *msg)
Get the message withdef enum.
Definition: xml_msg.c:1309
agt_backups_enabled
boolean agt_backups_enabled(void)
Check if the backup commands are enabled.
Definition: agt_util.c:5144
agt_make_union_leaf
val_value_t * agt_make_union_leaf(obj_template_t *parentobj, const xmlChar *modname, const xmlChar *leafname, const val_value_t *leafval, status_t *res)
make a val_value_t struct for a specified leaf or leaf-list use a val_value_t for a union
Definition: agt_util.c:5593
xml_isspace
boolean xml_isspace(uint32 ch)
Check if an xmlChar is a space char.
Definition: xml_util.c:1901
agt_get_edit_config_id
ncx_cfg_t agt_get_edit_config_id(rpc_msg_t *rpcmsg)
Get the enum ID of the configuration that is being edited.
Definition: agt_util.c:6082
VAL_IS_EDIT2_MERGE
#define VAL_IS_EDIT2_MERGE(V)
check if the value is an EDIT2 merge in progress
Definition: val.h:592
NCX_DC_CONFIG
@ NCX_DC_CONFIG
persistent config
Definition: ncxtypes.h:192
agt_cfg_next_child_undo
agt_cfg_undo_rec_t * agt_cfg_next_child_undo(agt_cfg_undo_rec_t *cur_undo)
Get the next child undo record.
Definition: agt_cfg.c:2944
obj_is_obsolete
boolean obj_is_obsolete(const obj_template_t *obj)
Check if the object has obsolete status.
Definition: obj.c:17094
xml_wr_begin_elem
void xml_wr_begin_elem(ses_cb_t *scb, xml_msg_hdr_t *msg, xmlns_id_t parent_nsid, xmlns_id_t nsid, const xmlChar *elname, int32 indent)
Write a start XML tag to the specified session without attributes.
Definition: xml_wr.c:3040
YANG_PATCH_OP_DELETE
@ YANG_PATCH_OP_DELETE
delete
Definition: yang_patch.h:90
cfg_get_root
val_value_t * cfg_get_root(ncx_cfg_t cfgid)
Get the config root for the specified config.
Definition: cfg.c:3240
OBJ_TYP_CONTAINER
@ OBJ_TYP_CONTAINER
container
Definition: obj.h:614
agt_enable_feature
status_t agt_enable_feature(const xmlChar *modname, const xmlChar *featurename)
Enable a YANG feature in the server.
Definition: agt_util.c:3605
YANG_PATCH_WHERE_LAST
@ YANG_PATCH_WHERE_LAST
insert lsat (default)
Definition: yang_patch.h:113
VAL_ETAG
#define VAL_ETAG(V)
Access the ETag field.
Definition: val.h:545
getcb_fn_t
status_t(* getcb_fn_t)(ses_cb_t *scb, getcb_mode_t cbmode, const val_value_t *virval, val_value_t *dstval)
GET1 Callback function for agent node get handler.
Definition: getcb.h:580
agt_apply_this_node_ex
boolean agt_apply_this_node_ex(op_editop_t editop, const val_value_t *newnode, const val_value_t *curnode, boolean ignore_defaults, boolean childonly, boolean top_replace)
Check if the write operation applies to the current node.
Definition: agt_util.c:4991
val_get_last_modified
time_t * val_get_last_modified(val_value_t *val)
Get the last_modified field.
Definition: val.c:13505
obj_is_list
boolean obj_is_list(const obj_template_t *obj)
Check if object is a YANG list.
Definition: obj.c:13349
agt_add_int64_leafy
status_t agt_add_int64_leafy(val_value_t *parentval, const xmlChar *modname, const xmlChar *leafname, int64 leafval)
make a child node from a int64 and add to parent.
Definition: agt_util.c:7535
agt_output_start_errors_container
void agt_output_start_errors_container(ses_cb_t *scb, xml_msg_hdr_t *mhdr, xmlns_id_t parent_nsid, xmlns_id_t nsid, const xmlChar *elname, const dlq_hdr_t *attrQ, boolean isattrq, int32 indent, boolean empty)
Output a start <errors> element on the specified session for RESTCONF error handling.
Definition: agt_util.c:5356
OP_EDITOP_MERGE
@ OP_EDITOP_MERGE
edit op is merge
Definition: op.h:124
val_find_next_child
val_value_t * val_find_next_child(const val_value_t *parent, const xmlChar *modname, const xmlChar *childname, const val_value_t *curchild)
Find the next instance of the specified child node.
Definition: val.c:8748
NCX_WITHDEF_REPORT_ALL
@ NCX_WITHDEF_REPORT_ALL
report-all
Definition: ncxtypes.h:1012
VAL_ENUM_NAME
#define VAL_ENUM_NAME(V)
Access the enum name in the value ONLY if BCX_NT_ENUM This is the macro used to check values in SIL c...
Definition: val.h:434
agt_output_filter
status_t agt_output_filter(ses_cb_t *scb, rpc_msg_t *msg, int32 indent)
output the proper data for the get or get-config operation generate the data that matched the subtree...
Definition: agt_util.c:2890
xmlns_get_module
const xmlChar * xmlns_get_module(xmlns_id_t nsid)
get the module name of the namespace ID
Definition: xmlns.c:1126
agt_record_insert_error
void agt_record_insert_error(ses_cb_t *scb, xml_msg_hdr_t *msghdr, status_t res, val_value_t *errval)
Generate an rpc_err_rec_t and save it in the msg Called from the YANG edit validation code when an in...
Definition: agt_util.c:2255
log_info
void void void void void log_info(const char *fstr,...) __attribute__((format(printf
Generate a new LOG_DEBUG_INFO log entry.
xmlns_id_t
uint16 xmlns_id_t
integer handle for registered namespaces
Definition: xmlns.h:89
agt_maintenance_mode_read_ok
boolean agt_maintenance_mode_read_ok(void)
Return true if in maintenance mode reads OK;.
Definition: agt.c:5199
OP_FILTER_XPATH
@ OP_FILTER_XPATH
XPath filter.
Definition: op.h:117
agt_record_error
void agt_record_error(ses_cb_t *scb, xml_msg_hdr_t *msghdr, ncx_layer_t layer, status_t res, const xml_node_t *xmlnode, ncx_node_t parmtyp, const void *error_info, ncx_node_t nodetyp, void *error_path)
Generate an rpc_err_rec_t and save it in the msg.
Definition: agt_util.c:1942
NCX_ACCESS_RC
@ NCX_ACCESS_RC
read-create (all access)
Definition: ncxtypes.h:178
NCX_LAYER_RPC
@ NCX_LAYER_RPC
RPC operation layer.
Definition: ncxtypes.h:345
ERR_NCX_MISSING_PARM
@ ERR_NCX_MISSING_PARM
233
Definition: status_enum.h:272
agt_crl_mode_str
const xmlChar * agt_crl_mode_str(agt_crl_mode_t crl_mode)
Get the string for the CRL mode enum.
Definition: agt_util.c:6844
log_debug2
void void void void void void void void void log_debug2(const char *fstr,...) __attribute__((format(printf
Generate a new LOG_DEBUG_DEBUG2 log entry.
agt_val.h
NETCONF Server database callback handler.
ncx_check_any_object_nolock_get
boolean ncx_check_any_object_nolock_get(const xmlChar *objname)
Check if the object name will match any config=true nodes.
Definition: ncx.c:14573
xpath1.h
XPath 1.0 expression support.
obj_is_leafy
boolean obj_is_leafy(const obj_template_t *obj)
Check if object is a proper leaf or leaflist.
Definition: obj.c:13478
agt_validate_filter
status_t agt_validate_filter(ses_cb_t *scb, rpc_msg_t *msg)
Validate the <filter> parameter if present.
Definition: agt_util.c:2406
agt_rpcerr_gen_error_ex
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, void *error_path_raw, boolean is_error)
Generate an internal <rpc-error> record for an element (or non-attribute) related error for any layer...
Definition: agt_rpcerr.c:1501
val_add_defaults_ex
status_t val_add_defaults_ex(val_value_t *val, boolean scriptmode, runstack_context_t *rcxt, time_t last_modified, ncx_etag_t etag)
add defaults to an initialized complex value (extended)
Definition: val_util.c:2738
errno_to_status
status_t errno_to_status(void)
Get the errno variable and convert it to a status_t.
Definition: status.c:968
val_gen_instance_id
status_t val_gen_instance_id(xml_msg_hdr_t *mhdr, const val_value_t *val, ncx_instfmt_t format, xmlChar **buff)
Malloc and Generate the instance ID string for this value node,.
Definition: val_util.c:3424
val_nodetest_fn_t
boolean(* val_nodetest_fn_t)(xml_msg_hdr_t *mhdr, ncx_withdefaults_t withdef, boolean realtest, val_value_t *node)
user function callback template to test output of a specified node.
Definition: val_util.h:132
NO_ERR
@ NO_ERR
000
Definition: status_enum.h:188
xpath.h
Schema and data model Xpath search support.
agt_fill_dummy_method
status_t agt_fill_dummy_method(const xmlChar *modname, const xmlChar *rpcname, xml_node_t *node, obj_template_t **rpcobj)
Fill the xml_node with the proper data to fake an XML node for the start of the rpc-method element.
Definition: agt_util.c:6976
NCX_BT_LIST
@ NCX_BT_LIST
internal, YANG list
Definition: ncxtypes.h:228
agt_cvt_editop
op_editop_t agt_cvt_editop(op_editop_t editop, const val_value_t *newval, const val_value_t *curval)
Determine the effective edit (if OP_EDITOP_COMMIT)
Definition: agt_util.c:6205
agt_init_cache
val_value_t * agt_init_cache(const xmlChar *modname, const xmlChar *objname, status_t *res)
init a cache pointer during the init2 callback
Definition: agt_util.c:4060
NCX_PROTO_RESTCONF
@ NCX_PROTO_RESTCONF
IETF RESTCONF.
Definition: ncxtypes.h:788
NC_MODULE
#define NC_MODULE
Internal NETCONF YANG module.
Definition: ncxconst.h:71
ncx_get_first_object_ex
obj_template_t * ncx_get_first_object_ex(ncx_module_t *mod, boolean augment_ok)
Get the first object in the datadefQs for the specified module.
Definition: ncx.c:4975
XML_MSG_DELTA
#define XML_MSG_DELTA(M)
Get delta: Not currently used - enables sub-tree time-filtering.
Definition: xml_msg.h:201
ERR_NCX_MOD_NOT_FOUND
@ ERR_NCX_MOD_NOT_FOUND
236
Definition: status_enum.h:275
val_gen_instance_id_ex
status_t val_gen_instance_id_ex(xml_msg_hdr_t *mhdr, const val_value_t *val, ncx_instfmt_t format, boolean stop_at_root, xmlChar **buff)
Malloc and Generate the instance ID string for this value node,.
Definition: val_util.c:3462
agt_tree_cvt_subtree_xpath
status_t agt_tree_cvt_subtree_xpath(ses_cb_t *scb, rpc_msg_t *msg, const cfg_template_t *cfg, boolean getop, val_value_t *filter, boolean *skiptop, xmlChar **xpathstr)
Convert a subtree filter to an XPath filter.
Definition: agt_tree.c:3954
agt_util_get_testfn
val_nodetest_fn_t agt_util_get_testfn(xml_msg_hdr_t *msg, boolean getop)
Get the test function that should be used for a specific get operation based on with-default paramete...
Definition: agt_util.c:6910
agt_make_yang_patch_cb
yang_patch_cb_t * agt_make_yang_patch_cb(const xmlChar *patch_id, const xmlChar *the_comment, const xmlChar *patch_root, agt_cfg_transaction_t *txcb, uint32 included_changes)
Make a yang_patch_cb for a YANG Patch conventional datastore on-change update.
Definition: agt_util.c:7046
xml_strndup
xmlChar * xml_strndup(const xmlChar *copyFrom, uint32 maxlen)
String duplicate for max N xmlChars.
Definition: xml_util.c:1663
val_dump_value
void val_dump_value(val_value_t *val, int32 startindent, log_debug_t lvl)
Printf the specified val_value_t struct to the logfile, or stdout if none set Uses conf file format (...
Definition: val.c:5688
agt_xpath.h
Server XPath filter processing for select attribute in <filter> element in <get> and <get-config> ope...
agt_get_key_value
val_value_t * agt_get_key_value(val_value_t *startval, val_value_t **lastkey)
Get the next expected key value in the ancestor chain.
Definition: agt_util.c:4762
agt_check_editop
status_t agt_check_editop(op_editop_t pop, op_editop_t *cop, val_value_t *newnode, val_value_t *curnode, ncx_iqual_t iqual, ncx_protocol_t proto, boolean is_commit, boolean *delete_default)
Check if the edit operation is okay.
Definition: agt_util.c:3232
agt_check_delete_all_allowed
boolean agt_check_delete_all_allowed(obj_template_t *testobj)
Check if the delete-all or remove-all operation is enabled for for specified object.
Definition: agt_util.c:6178
log_debug4
void void void void void void void void void void void void void log_debug4(const char *fstr,...) __attribute__((format(printf
Generate a new LOG_DEBUG_DEBUG4 log entry.
obj_get_name
const xmlChar * obj_get_name(const obj_template_t *obj)
Get the name field for this obj.
Definition: obj.c:10511
agt_ncx.h
NETCONF Server standard method routines.
ERR_NCX_OPERATION_FAILED
@ ERR_NCX_OPERATION_FAILED
274
Definition: status_enum.h:315
agt_apply_this_node
boolean agt_apply_this_node(op_editop_t editop, const val_value_t *newnode, const val_value_t *curnode)
Check if the write operation applies to the current node.
Definition: agt_util.c:4954
NCX_WITHDEF_REPORT_ALL_TAGGED
@ NCX_WITHDEF_REPORT_ALL_TAGGED
report-all-tagged
Definition: ncxtypes.h:1013
ncx_find_object
obj_template_t * ncx_find_object(ncx_module_t *mod, const xmlChar *objname)
Find a top level module object.
Definition: ncx.c:4345
LOGDEBUG2
#define LOGDEBUG2
Check if at least log-level=debug2.
Definition: log.h:292
cfg_get_config
cfg_template_t * cfg_get_config(const xmlChar *cfgname)
Get the config struct from its name.
Definition: cfg.c:1468
xpath_free_result
void xpath_free_result(xpath_result_t *result)
Free a malloced XPath result struct.
Definition: xpath.c:3107
OP_EDITOP_DELETE
@ OP_EDITOP_DELETE
edit op is delete
Definition: op.h:127
agt_make_empty_leaf
val_value_t * agt_make_empty_leaf(obj_template_t *parentobj, const xmlChar *modname, const xmlChar *leafname, boolean boolval, status_t *res)
make a val_value_t struct for a specified leaf or leaf-list (NCX_BT_EMPTY)
Definition: agt_util.c:5932
val_is_config_data
boolean val_is_config_data(const val_value_t *val)
Check if the specified value is a config DB object instance.
Definition: val.c:11157
ERR_INTERNAL_VAL
@ ERR_INTERNAL_VAL
004
Definition: status_enum.h:194
agt_cfg_use_child_undo
boolean agt_cfg_use_child_undo(agt_cfg_undo_rec_t *undo, agt_cfg_undo_rec_t *child_undo)
Check if the child edit node should be invoked.
Definition: agt_cfg.c:2811
NCX_ACCESS_NONE
@ NCX_ACCESS_NONE
enum not explicitly set
Definition: ncxtypes.h:175
val_child_next
val_value_t * val_child_next(const val_value_t *curchild)
Get the next child present for the current node Parent must be set.
Definition: val_child.c:2326
ncxmod_get_yuma_home
const xmlChar * ncxmod_get_yuma_home(void)
Get the YUMAPRO_HOME or –yuma-home parameter value, whichever is in effect, if any.
Definition: ncxmod.c:6240
agt_record_attr_error
void agt_record_attr_error(ses_cb_t *scb, xml_msg_hdr_t *msghdr, ncx_layer_t layer, status_t res, const xml_attr_t *xmlattr, const xml_node_t *xmlnode, const xmlChar *badns, ncx_node_t nodetyp, void *errnode)
Generate an rpc_err_rec_t and save it in the msg.
Definition: agt_util.c:2162
val_child_add
status_t val_child_add(val_value_t *child, val_value_t *parent)
Add a child value node to a parent value node.
Definition: val_child.c:1542
agt_output_start_node
void agt_output_start_node(ses_cb_t *scb, xml_msg_hdr_t *mhdr, xmlns_id_t parent_nsid, xmlns_id_t node_nsid, const xmlChar *node_name, int32 indent, boolean try_modname)
Output a start node and try to use modname infront if needed.
Definition: agt_util.c:5297
val_util.h
Value Node Utilities.
ERR_NCX_WRONG_TYPE
@ ERR_NCX_WRONG_TYPE
231
Definition: status_enum.h:270
agt_get_target_filespec
xmlChar * agt_get_target_filespec(const xmlChar *target_url, status_t *res)
Figure out where to store the URL target file.
Definition: agt_util.c:4266
json_wr.h
JSON Write functions.
xpath1_eval_expr
xpath_result_t * xpath1_eval_expr(xpath_pcb_t *pcb, val_value_t *val, val_value_t *docroot, boolean logerrors, boolean configonly, status_t *res)
Evaluate an XPath expression use if the prefixes are YANG: must/when.
Definition: xpath1.c:5293
ses_indent_count
int32 ses_indent_count(const ses_cb_t *scb)
Get the logging indent count for this session.
Definition: ses.c:2801
agt_set_with_defaults
status_t agt_set_with_defaults(rpc_msg_t *msg, const xmlChar *modname, val_value_t **errval)
Check if the <with-defaults> parameter is set in the request message, and if so, it is one of the ser...
Definition: agt_util.c:4540
YANG_PATCH_OP_REMOVE
@ YANG_PATCH_OP_REMOVE
remove
Definition: yang_patch.h:95
yang_patch_new_edit2
yang_patch_edit_t * yang_patch_new_edit2(const xmlChar *edit_id, yang_patch_op_t operation, const xmlChar *target, const xmlChar *point, yang_patch_where_t insert_where, val_value_t *value, boolean plain_clone)
Malloc a new YANG Patch edit control block Any of the fields can be NULL to add later or not use.
Definition: yang_patch.c:293
ses_putcstr
void ses_putcstr(ses_cb_t *scb, const xmlChar *str, int32 indent)
write XML element safe content string Write a zero-terminated element content string to the session
Definition: ses.c:2522
obj_is_rpcio
boolean obj_is_rpcio(const obj_template_t *obj)
Check if the object is an RPC IO node.
Definition: obj.c:13996
obj_gen_object_id_error
status_t obj_gen_object_id_error(const obj_template_t *obj, xmlChar **buff)
Malloc and Generate the object ID for an object node for errors.
Definition: obj.c:10191
ERR_NCX_INVALID_VALUE
@ ERR_NCX_INVALID_VALUE
258
Definition: status_enum.h:299
agt_make_leaf2
val_value_t * agt_make_leaf2(obj_template_t *parentobj, const xmlChar *modname, const xmlChar *leafname, const xmlChar *leafstrval, status_t *res)
make a val_value_t struct for a specified leaf or leaf-list
Definition: agt_util.c:5545
NCX_CFGID_CANDIDATE
@ NCX_CFGID_CANDIDATE
candidate datastore
Definition: ncxtypes.h:385
SES_TR_BAD_HELLO
@ SES_TR_BAD_HELLO
bad <hello> received
Definition: ses.h:395
NCX_CFGID_STARTUP
@ NCX_CFGID_STARTUP
startup datastore
Definition: ncxtypes.h:386
obj_next_child
obj_template_t * obj_next_child(obj_template_t *obj)
Get the next child object if the specified object has any children.
Definition: obj.c:6860
agt_add_uint_leafy
status_t agt_add_uint_leafy(val_value_t *parentval, const xmlChar *modname, const xmlChar *leafname, uint32 leafval)
make a child node from a uint32 and add to parent.
Definition: agt_util.c:7373
NCX_BT_EMPTY
@ NCX_BT_EMPTY
empty
Definition: ncxtypes.h:205
agt_get_ok_for_nolock
boolean agt_get_ok_for_nolock(rpc_msg_t *msg)
Check if the get has filters and if they are OK for a <get> without waiting for a pthreads filter.
Definition: agt_util.c:6568
agt_set_mod_defaults
status_t agt_set_mod_defaults(ncx_module_t *mod, val_value_t *valroot, boolean set_candidate, boolean set_augment, boolean force)
Check for any top-level config leafs that have a default value, and add them to the running configura...
Definition: agt_util.c:4375
agt_check_included_changes
boolean agt_check_included_changes(agt_cfg_transaction_t *txcb, uint32 included_changes, obj_template_t *targobj)
Check an edit transaction to see if it has any edits that match the included_changes bitmask paramete...
Definition: agt_util.c:7256
rpc.h
NETCONF protocol remote procedure call common definitions.
AGT_PUSH_GET_DELETE_FLAG
#define AGT_PUSH_GET_DELETE_FLAG(F)
Get the PUSH Delete flag.
Definition: agt_push.h:129
ERR_INTERNAL_MEM
@ ERR_INTERNAL_MEM
003
Definition: status_enum.h:193
xml_strncmp
int xml_strncmp(const xmlChar *s1, const xmlChar *s2, uint32 maxlen)
String compare for xmlChar for at most 'maxlen' xmlChars.
Definition: xml_util.c:1824
NCX_DISPLAY_MODE_XML_NONS
@ NCX_DISPLAY_MODE_XML_NONS
XML display mode without any prefixes (not compliant XML!)
Definition: ncxtypes.h:463
SES_TR_DROPPED
@ SES_TR_DROPPED
dropped by remote peer
Definition: ses.h:391
XML_MSG_SET_WITH_GET2
#define XML_MSG_SET_WITH_GET2(M)
Set flag that GET2 mode requested.
Definition: xml_msg.h:231
AGT_FILE_SCHEME
#define AGT_FILE_SCHEME
hard-wired start of file schem URL
Definition: agt.h:403
val_child.h
Value Node Child Access Support.
xml_wr_end_elem
void xml_wr_end_elem(ses_cb_t *scb, xml_msg_hdr_t *msg, xmlns_id_t nsid, const xmlChar *elname, int32 indent)
Write an end tag to the specified session.
Definition: xml_wr.c:3114
obj_gen_object_id_xpath
status_t obj_gen_object_id_xpath(const obj_template_t *obj, xmlChar **buff)
Malloc and Generate the object ID for an object node.
Definition: obj.c:10143
agt_check_config
boolean agt_check_config(xml_msg_hdr_t *mhdr, ncx_withdefaults_t withdef, boolean realtest, val_value_t *node)
Used by the <get-config> operation to return any type of configuration data.
Definition: agt_util.c:2542
obj_get_max_access
ncx_access_t obj_get_max_access(const obj_template_t *obj)
Get the NCX max-access enum for an obj_template_t Return the explicit value or the inherited value.
Definition: obj.c:11240
OP_INSOP_NONE
@ OP_INSOP_NONE
not set
Definition: op.h:138
get_error_string
const char * get_error_string(status_t res)
Get the error message for a specific internal error.
Definition: status.c:239
agt_notifications_enabled
boolean agt_notifications_enabled(void)
Check if notifications are enabled.
Definition: agt_util.c:5523
YANG_PATCH_OP_INSERT
@ YANG_PATCH_OP_INSERT
insert
Definition: yang_patch.h:91
agt_modified_since
boolean agt_modified_since(val_value_t *val, time_t *timerec)
Check if the timestamp for the object is later then the specified timestamp.
Definition: agt_util.c:5501
ERR_INTERNAL_PTR
@ ERR_INTERNAL_PTR
002
Definition: status_enum.h:192
ncx_obj_is_generic
boolean ncx_obj_is_generic(const obj_template_t *obj)
Check if the object is 1 of the gen_foo object templates.
Definition: ncx.c:13013
ERR_NCX_MISSING_ATTRIBUTE
@ ERR_NCX_MISSING_ATTRIBUTE
260
Definition: status_enum.h:301
agt_get_error_count
uint32 agt_get_error_count(rpc_msg_t *msg)
Get the current number of errors in the rpc msg Q.
Definition: agt_util.c:6460
agt_rpcerr_gen_attr_error
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, val_value_t *errnodeval, const xmlChar *badns, xmlChar *error_path)
Generate an internal <rpc-error> record for an attribute.
Definition: agt_rpcerr.c:2084
AGT_PUSH_GET_REPLACE_FLAG
#define AGT_PUSH_GET_REPLACE_FLAG(F)
Get the PUSH Replace flag.
Definition: agt_push.h:147
NCX_BT_CONTAINER
@ NCX_BT_CONTAINER
internal container
Definition: ncxtypes.h:225
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.
AGT_PUSH_GET_MOVE_FLAG
#define AGT_PUSH_GET_MOVE_FLAG(F)
Get the PUSH Move flag.
Definition: agt_push.h:141
rpc_err_free_record
void rpc_err_free_record(rpc_err_rec_t *err)
Clean and free an rpc_err_rec_t struct.
Definition: rpc_err.c:346
xmlns_get_ns_prefix
const xmlChar * xmlns_get_ns_prefix(xmlns_id_t ns_id)
Get the prefix for the specified namespace.
Definition: xmlns.c:669
dlq_count
unsigned int dlq_count(const dlq_hdrT *listP)
get the number of queue entries in the listP queue list
Definition: dlq.c:994
NCX_CFGID_RUNNING
@ NCX_CFGID_RUNNING
running datastore (no value for not set!)
Definition: ncxtypes.h:384
ncx_find_feature
ncx_feature_t * ncx_find_feature(ncx_module_t *mod, const xmlChar *name)
Find a ncx_feature_t struct in the module and perhaps any of its submodules.
Definition: ncx_feature.c:855
OP_EDITOP_COMMIT
@ OP_EDITOP_COMMIT
commit, internal enum
Definition: op.h:129
obj_get_config_flag
boolean obj_get_config_flag(const obj_template_t *obj)
Get the config flag for an obj_template_t Return the explicit value or the inherited value Also retur...
Definition: obj.c:11174
AGT_CRL_MODE_OFF
@ AGT_CRL_MODE_OFF
CRL check off.
Definition: agt.h:703
obj_is_case
boolean obj_is_case(const obj_template_t *obj)
Check if object is a YANG case.
Definition: obj.c:13445
val_create_allowed
boolean val_create_allowed(const val_value_t *val)
Check if the specified value is allowed to have a create edit-config operation attribute.
Definition: val.c:11100
agt_validate_filter_ex
status_t agt_validate_filter_ex(ses_cb_t *scb, rpc_msg_t *msg, val_value_t *filter)
Validate the <filter> parameter if present (extended)
Definition: agt_util.c:2450
yang_patch.h
YANG Patch Media Type.
obj_find_template_top
obj_template_t * obj_find_template_top(ncx_module_t *mod, const xmlChar *modname, const xmlChar *objname)
Check if an obj_template_t in the mod->datadefQ or any of the include files visible to this module.
Definition: obj.c:5826
dlq_nextEntry
#define dlq_nextEntry(nodeP)
get the next queue entry after the current entry
Definition: dlq.h:265
SES_IN_ENCODING
#define SES_IN_ENCODING(S)
get the inbound message encoding
Definition: ses.h:129
ncx_get_gen_root
obj_template_t * ncx_get_gen_root(void)
Get the object template for the NCX generic root container.
Definition: ncx.c:6720
agt.h
Multi-Protocol Network Management Server.
agt_make_leaf
val_value_t * agt_make_leaf(obj_template_t *parentobj, const xmlChar *leafname, const xmlChar *leafstrval, status_t *res)
make a string val_value_t struct for a specified leaf or leaf-list
Definition: agt_util.c:3683
xml_wr_check_val
void xml_wr_check_val(ses_cb_t *scb, xml_msg_hdr_t *msg, val_value_t *val, int32 indent, val_nodetest_fn_t testfn)
Write an NCX value in XML encoding while checking nodes for suppression of output with the supplied t...
Definition: xml_wr.c:3357
agt_op_ok_for_maintenance_mode
boolean agt_op_ok_for_maintenance_mode(const obj_template_t *rpcobj)
Check if the operation is OK for maintenance mode.
Definition: agt_util.c:6753
agt_make_idref_leaf2
val_value_t * agt_make_idref_leaf2(obj_template_t *parentobj, const xmlChar *modname, const xmlChar *leafname, const val_idref_t *leafval, status_t *res)
make a val_value_t struct for a specified leaf or leaf-list
Definition: agt_util.c:5785
OP_EDITOP_DELETE_ALL
@ OP_EDITOP_DELETE_ALL
delete-all, yumapro only
Definition: op.h:131
agt_new_xpath_pcb
xpath_pcb_t * agt_new_xpath_pcb(ses_cb_t *scb, const xmlChar *expr, status_t *res)
Get a new XPath parser control block and set up the server variable bindings.
Definition: agt_util.c:4172
AGT_CRL_MODE_CLIENT
@ AGT_CRL_MODE_CLIENT
CRL check client cert.
Definition: agt.h:704
agt_add_bits_leafy
status_t agt_add_bits_leafy(val_value_t *parentval, const xmlChar *modname, const xmlChar *leafname, const ncx_list_t *leafval)
make a child node from a ncx_list_t struct (bits) and add to parent.
Definition: agt_util.c:7707
YANG_PATCH_OP_MOVE
@ YANG_PATCH_OP_MOVE
move
Definition: yang_patch.h:93
agt_add_leafy
status_t agt_add_leafy(val_value_t *parentval, const xmlChar *modname, const xmlChar *leafname, const xmlChar *leafstrval)
make a child node from a string and add to parent.
Definition: agt_util.c:7319
AGT_CRL_MODE_CA
@ AGT_CRL_MODE_CA
CRL check client and CA certs.
Definition: agt.h:705
OBJ_TYP_LEAF_LIST
@ OBJ_TYP_LEAF_LIST
leaf-list
Definition: obj.h:616
SES_TR_KILLED
@ SES_TR_KILLED
kill-session
Definition: ses.h:390
NCX_MAX_LINELEN
#define NCX_MAX_LINELEN
Internal buffer max line length.
Definition: ncxconst.h:310
OP_INSOP_LAST
@ OP_INSOP_LAST
insert last (default)
Definition: op.h:140
val_make_sprintf_string
xmlChar * val_make_sprintf_string(const val_value_t *val)
Malloc a buffer and then sprintf the xmlChar string NETCONF representation of a simple value.
Definition: val.c:10323
val_add_node_defaults
status_t val_add_node_defaults(obj_template_t *chobj, val_value_t *val, boolean scriptmode, time_t last_modified, ncx_etag_t etag)
Check/Add defaults for the specified node and descendant nodes.
Definition: val_util.c:2770
XML_MSG_WITH_MODTAGS
#define XML_MSG_WITH_MODTAGS(M)
Check if module-tags filtering requested.
Definition: xml_msg.h:278
obj_is_np_container
boolean obj_is_np_container(const obj_template_t *obj)
Check if the object is an Non-Presence-container.
Definition: obj.c:14487
ERR_NCX_NOT_FOUND
@ ERR_NCX_NOT_FOUND
225
Definition: status_enum.h:264
agt_add_boolean_leafy
status_t agt_add_boolean_leafy(val_value_t *parentval, const xmlChar *modname, const xmlChar *leafname, boolean boolval)
make a child node from a boolean and add to parent.
Definition: agt_util.c:7590
xml_msg_get_max_depth
uint32 xml_msg_get_max_depth(xml_msg_hdr_t *msg)
Get the message max_depth value.
Definition: xml_msg.c:1343
agt_nmda.h
Server NMDA support.
agt_tree_output_filter
void agt_tree_output_filter(ses_cb_t *scb, rpc_msg_t *msg, ncx_filptr_t *top, int32 indent, boolean getop)
get and get-config step 2.
Definition: agt_tree.c:3139
xml_wr_begin_elem_ex
void xml_wr_begin_elem_ex(ses_cb_t *scb, xml_msg_hdr_t *msg, xmlns_id_t parent_nsid, xmlns_id_t nsid, const xmlChar *elname, const dlq_hdr_t *attrQ, boolean isattrq, int32 indent, boolean empty)
Write a start or empty XML tag to the specified session.
Definition: xml_wr.c:3001
ERR_NCX_BAD_ATTRIBUTE
@ ERR_NCX_BAD_ATTRIBUTE
261
Definition: status_enum.h:302
agt_make_yang_patch_cb_targobj
yang_patch_cb_t * agt_make_yang_patch_cb_targobj(const xmlChar *patch_id, const xmlChar *the_comment, const xmlChar *patch_root, agt_cfg_transaction_t *txcb, uint32 included_changes, obj_template_t *targobj)
Make a yang_patch_cb for a YANG Patch conventional datastore on-change update for a target object.
Definition: agt_util.c:7078
agt_check_default
boolean agt_check_default(xml_msg_hdr_t *mhdr, ncx_withdefaults_t withdef, boolean realtest, val_value_t *node)
Used by the <get*> operation to return only values not set to the default.
Definition: agt_util.c:2601
ncx_get_withdefaults_enum
ncx_withdefaults_t ncx_get_withdefaults_enum(const xmlChar *withdefstr)
Get the enum for the specified string value.
Definition: ncx.c:8844
yang_patch_editop_to_op
yang_patch_op_t yang_patch_editop_to_op(op_editop_t edit_op)
Convert an edit operation enum to a YANG Patch operation enum.
Definition: yang_patch.c:1195
yang_patch_new_cb
yang_patch_cb_t * yang_patch_new_cb(const xmlChar *patch_id, const xmlChar *the_comment, const xmlChar *target)
Malloc a new YANG Patch control block.
Definition: yang_patch.c:162
agt_set_depth_nmda
void agt_set_depth_nmda(rpc_msg_t *msg)
Check if the <depth> parameter is set NMDA max-depth parameter in the request message If so,...
Definition: agt_util.c:4711
ERR_NCX_OPERATION_NOT_SUPPORTED
@ ERR_NCX_OPERATION_NOT_SUPPORTED
273
Definition: status_enum.h:314
NCX_MAX_NUMLEN
#define NCX_MAX_NUMLEN
max number len to use for static buffer allocation only
Definition: ncxconst.h:136
xml_msg.h
XML and JSON Message send and receive support.
agt_xpath_output_filter
status_t agt_xpath_output_filter(ses_cb_t *scb, rpc_msg_t *msg, const cfg_template_t *cfg, boolean getop, int32 indent)
Output an XPath filter.
Definition: agt_xpath.c:2227
obj_is_container
boolean obj_is_container(const obj_template_t *obj)
Check if object is a YANG container.
Definition: obj.c:13405
xpath_get_next_resnode
xpath_resnode_t * xpath_get_next_resnode(xpath_resnode_t *resnode)
Get the next result in the renodeQ from a result struct.
Definition: xpath.c:3959
agt_make_uint_leaf
val_value_t * agt_make_uint_leaf(obj_template_t *parentobj, const xmlChar *leafname, uint32 leafval, status_t *res)
make a uint32 val_value_t struct for a specified leaf or leaf-list
Definition: agt_util.c:3702
agt_set_basic_withdef_enabled
void agt_set_basic_withdef_enabled(void)
Force the basic mode to be enabled in the agt_withdef_enabled bitmask.
Definition: agt_util.c:6133
NCX_ACCESS_RO
@ NCX_ACCESS_RO
read-only
Definition: ncxtypes.h:176
ncx_find_rpc
obj_template_t * ncx_find_rpc(const ncx_module_t *mod, const xmlChar *rpcname)
Check if a rpc_template_t in the mod->rpcQ.
Definition: ncx.c:3775
log_debug4_append
void void void void void void void void void void void void void void log_debug4_append(const char *fstr,...) __attribute__((format(printf
Append to a LOG_DEBUG_DEBUG4 log entry.
YANG_PATCH_OP_REPLACE
@ YANG_PATCH_OP_REPLACE
replace
Definition: yang_patch.h:94
agt_get_cfg_from_parm
status_t agt_get_cfg_from_parm(const xmlChar *parmname, rpc_msg_t *msg, xml_node_t *methnode, cfg_template_t **retcfg)
FUNCTION agt_get_cfg_from_parm.
Definition: agt_util.c:1464
agt_getbulk_ok_for_nolock
boolean agt_getbulk_ok_for_nolock(const xmlChar *pathstr)
Check if the get-bulk target is OK for a nolock get without waiting for a pthreads filter.
Definition: agt_util.c:6646
ERR_NCX_FOUND_URL
@ ERR_NCX_FOUND_URL
2005
Definition: status_enum.h:555
YANG_PATCH_WHERE_BEFORE
@ YANG_PATCH_WHERE_BEFORE
insert before foo
Definition: yang_patch.h:110
ncx_set_add_toplevel_default_mode
void ncx_set_add_toplevel_default_mode(boolean val)
Set the add_toplevel_default_mode value.
Definition: ncx.c:13942
XML_MSG_NMDA_PARAMS
#define XML_MSG_NMDA_PARAMS(M)
NMDA params.
Definition: xml_msg.h:316
obj_get_mod_name
const xmlChar * obj_get_mod_name(const obj_template_t *obj)
Get the module name for this object.
Definition: obj.c:12176
typ_is_simple
boolean typ_is_simple(ncx_btype_t btyp)
Check if this is a simple data type.
Definition: typ.c:3107
YANG_PATCH_WHERE_FIRST
@ YANG_PATCH_WHERE_FIRST
insert first
Definition: yang_patch.h:112
agt_make_virtual_leaf2
val_value_t * agt_make_virtual_leaf2(obj_template_t *parentobj, const xmlChar *modname, const xmlChar *leafname, getcb_fn_t callbackfn, status_t *res)
make a val_value_t struct for a specified virtual leaf or leaf-list
Definition: agt_util.c:6028
agt_make_object
val_value_t * agt_make_object(obj_template_t *parentobj, const xmlChar *objname, status_t *res)
make a val_value_t struct for a specified node
Definition: agt_util.c:3841
obj_find_child
obj_template_t * obj_find_child(obj_template_t *obj, const xmlChar *modname, const xmlChar *objname)
Find a child object with the specified Qname.
Definition: obj.c:6116
NCX_NT_OBJ
@ NCX_NT_OBJ
obj_template_t
Definition: ncxtypes.h:277
agt_make_uint_leaf2
val_value_t * agt_make_uint_leaf2(obj_template_t *parentobj, const xmlChar *modname, const xmlChar *leafname, uint32 leafval, status_t *res)
make a val_value_t struct for a specified leaf or leaf-list
Definition: agt_util.c:5651
agt_tree_prune_filter
ncx_filptr_t * agt_tree_prune_filter(ses_cb_t *scb, rpc_msg_t *msg, const cfg_template_t *cfg, boolean getop, boolean *do_all)
get and get-config step 1.
Definition: agt_tree.c:2951
agt_add_uint64_leafy
status_t agt_add_uint64_leafy(val_value_t *parentval, const xmlChar *modname, const xmlChar *leafname, uint64 leafval)
make a child node from a uint64 and add to parent.
Definition: agt_util.c:7481
xpath_get_first_resnode
xpath_resnode_t * xpath_get_first_resnode(xpath_result_t *result)
Get the first result in the renodeQ from a result struct.
Definition: xpath.c:3931
agt_rpcerr_add_user_data
status_t agt_rpcerr_add_user_data(rpc_err_rec_t *err, dlq_hdr_t *dataQ)
Add data nodes to return in the <error-info> section of an error record.
Definition: agt_rpcerr.c:2431
NCX_ACCESS_RW
@ NCX_ACCESS_RW
read-write (create/delete not allowed)
Definition: ncxtypes.h:177
ncx_get_next_object_ex
obj_template_t * ncx_get_next_object_ex(ncx_module_t *mod, obj_template_t *curobj, boolean augment_ok)
Get the next object in the specified module.
Definition: ncx.c:5066
tstamp_difftime
int32 tstamp_difftime(time_t *time1, time_t *time2)
Compare 2 time_t structs.
Definition: tstamp.c:561
xml_strcmp
int xml_strcmp(const xmlChar *s1, const xmlChar *s2)
String compare for xmlChar.
Definition: xml_util.c:1746
agt_check_modtags
boolean agt_check_modtags(xml_msg_hdr_t *mhdr, ncx_withdefaults_t withdef, boolean realtest, val_value_t *node)
Used by the <get> and <get-config> operation to return report-all module-tags filtered data.
Definition: agt_util.c:2831
val_get_next_child
val_value_t * val_get_next_child(const val_value_t *curchild)
Get the next child node.
Definition: val.c:8496
val_make_external_value
val_value_t * val_make_external_value(obj_template_t *obj, xmlChar *fname)
Make an external value node.
Definition: val_util.c:7313
OP_EDITOP_LOAD
@ OP_EDITOP_LOAD
load, internal enum
Definition: op.h:128
val_set_by_default
boolean val_set_by_default(const val_value_t *val)
Check if the value was set by val_add_defaults.
Definition: val.c:12571
obj_ok_for_nolock
boolean obj_ok_for_nolock(const obj_template_t *obj)
check an object OK for nolock
Definition: obj.c:18194
obj_is_choice
boolean obj_is_choice(const obj_template_t *obj)
Check if object is a YANG choice.
Definition: obj.c:13425
LOGDEBUG4
#define LOGDEBUG4
Check if at least log-level=debug4.
Definition: log.h:302
log.h
NCX System Logging Manager.
SES_TR_NONE
@ SES_TR_NONE
not set
Definition: ses.h:388
NCX_NMDA_DS_OPERATIONAL
@ NCX_NMDA_DS_OPERATIONAL
operational datastore
Definition: ncxtypes.h:1343
agt_add_top_container
status_t agt_add_top_container(obj_template_t *obj, val_value_t **val)
make a val_value_t struct for a specified top-level container data node.
Definition: agt_util.c:3951
ncxtypes.h
YANG module data structures Many internal representations of YANG module constructs.
val_child_first
val_value_t * val_child_first(const val_value_t *parent)
Get the first child present for this parent.
Definition: val_child.c:2294
agt_push.h
Server PUSH support.
xmlns_nc_id
xmlns_id_t xmlns_nc_id(void)
Get the ID for the NETCONF namespace or 0 if it doesn't exist.
Definition: xmlns.c:880
agt_cli.h
NETCONF Server Command Line Interface handler.
YANG_PATCH_OP_NONE
@ YANG_PATCH_OP_NONE
not set
Definition: yang_patch.h:88
LOGDEBUG
#define LOGDEBUG
Check if at least log-level=debug.
Definition: log.h:287
agt_add_int_leafy
status_t agt_add_int_leafy(val_value_t *parentval, const xmlChar *modname, const xmlChar *leafname, int32 leafval)
make a child node from a int32 and add to parent.
Definition: agt_util.c:7427
obj_is_augment
boolean obj_is_augment(const obj_template_t *obj)
Check if the obj is an augment statement.
Definition: obj.c:13703
agt_set_depth
void agt_set_depth(rpc_msg_t *msg)
Check if the <depth> parameter is set in the request message.
Definition: agt_util.c:4659
XML_NT_START
@ XML_NT_START
start-tag of an element
Definition: xml_util.h:192
agt_find_in_datastore
status_t agt_find_in_datastore(ncx_cfg_t cfg_id, val_value_t *err_value, val_value_t **retval)
Find the node (should be from an <edit-config> content node) in the specified datastore.
Definition: agt_util.c:6387
agt_modtags_check_filter
boolean agt_modtags_check_filter(xml_msg_hdr_t *msg, val_value_t *val)
Check a modtag filter in the specified msg applies to the value.
Definition: agt_modtags.c:947
agt_get_startup_filespec
xmlChar * agt_get_startup_filespec(status_t *res)
Figure out where to store the startup file.
Definition: agt_util.c:4197
rpc_err.h
NETCONF protocol standard error definitions.
agt_getTermReasonStr
const xmlChar * agt_getTermReasonStr(ses_term_reason_t termreason)
Convert the termination reason enum to a string.
Definition: agt_util.c:6516
OP_FILTER_NONE
@ OP_FILTER_NONE
not set
Definition: op.h:115
xpath_expr_ok_for_nolock_get
boolean xpath_expr_ok_for_nolock_get(xpath_pcb_t *pcb)
Check an XPath expression to see if it contains any top-level config=true data nodes or not.
Definition: xpath.c:4997
OP_EDITOP_REMOVE
@ OP_EDITOP_REMOVE
remove, base:1.1 only
Definition: op.h:130
ERR_NCX_CFG_NOT_FOUND
@ ERR_NCX_CFG_NOT_FOUND
307
Definition: status_enum.h:350
AGT_PUSH_GET_INSERT_FLAG
#define AGT_PUSH_GET_INSERT_FLAG(F)
Get the PUSH Insert flag.
Definition: agt_push.h:135
NCX_NT_VAL
@ NCX_NT_VAL
val_value_t
Definition: ncxtypes.h:276
agt_cfg.h
Manage Server configuration edit transactions.
ncx_list.h
NCX Module Library List Utility Functions.
agt_make_uint64_leaf2
val_value_t * agt_make_uint64_leaf2(obj_template_t *parentobj, const xmlChar *modname, const xmlChar *leafname, uint64 leafval, status_t *res)
make a val_value_t struct for a specified leaf or leaf-list
Definition: agt_util.c:5715
agt_crl_mode_enum
agt_crl_mode_t agt_crl_mode_enum(const xmlChar *crl_mode)
Get the enum for the CRL mode string.
Definition: agt_util.c:6875
NCX_BT_UINT32
@ NCX_BT_UINT32
uint32
Definition: ncxtypes.h:213
agt_make_boolean_leaf
val_value_t * agt_make_boolean_leaf(obj_template_t *parentobj, const xmlChar *modname, const xmlChar *leafname, boolean boolval, status_t *res)
make a val_value_t struct for a specified leaf or leaf-list (NCX_BT_BOOL)
Definition: agt_util.c:5900
val_get_first_child
val_value_t * val_get_first_child(const val_value_t *parent)
Get the first child node.
Definition: val.c:8477
NCX_NT_NONE
@ NCX_NT_NONE
not set
Definition: ncxtypes.h:273
agt_record_error_obj
void agt_record_error_obj(ses_cb_t *scb, xml_msg_hdr_t *msghdr, status_t res, obj_template_t *errobj, const xmlChar *badval)
Generate an rpc_err_rec_t and save it in the msg Use the provided object for <rpc-error> fields.
Definition: agt_util.c:1981
agt_make_yang_patch_cb_file
yang_patch_cb_t * agt_make_yang_patch_cb_file(const xmlChar *patch_id, const xmlChar *the_comment, const xmlChar *patch_root, const xmlChar *filespec)
Make a yang_patch_cb for a Simulated Operational On-Change subscription update from a data file.
Definition: agt_util.c:7163
dlq_empty
#define dlq_empty(listP)
check if queue list is empty
Definition: dlq.h:367
agt_get_inline_cfg_from_parm
status_t agt_get_inline_cfg_from_parm(const xmlChar *parmname, rpc_msg_t *msg, xml_node_t *methnode, val_value_t **retval)
Get the val_value_t node for the inline config element.
Definition: agt_util.c:1601
agt_cfg_next_active_undo
agt_cfg_undo_rec_t * agt_cfg_next_active_undo(agt_cfg_transaction_t *txcb, agt_cfg_undo_rec_t *cur_undo)
Get the next active undo record.
Definition: agt_cfg.c:3616
agt_make_list
val_value_t * agt_make_list(obj_template_t *parentobj, const xmlChar *listname, status_t *res)
make a val_value_t struct for a specified list
Definition: agt_util.c:3815
xml_strcpy
uint32 xml_strcpy(xmlChar *copyTo, const xmlChar *copyFrom)
String copy for xmlChar.
Definition: xml_util.c:1486
json_wr_start_object
void json_wr_start_object(ses_cb_t *scb, xml_msg_hdr_t *msg, const xmlChar *modname, const xmlChar *name, int32 startindent)
generate start of a JSON object
Definition: json_wr.c:1427
agt_is_sil_sa
boolean agt_is_sil_sa(void)
Check if server running in SIL-SA mode.
Definition: agt.c:4733
agt_any_operations_set
boolean agt_any_operations_set(val_value_t *val)
Check the new node and all descendants for any operation attibutes prsent.
Definition: agt_util.c:4906
VAL_TYPE
#define VAL_TYPE(V)
Access the base type : same as VAL_BTYPE.
Definition: val.h:387
agt_check_max_access
status_t agt_check_max_access(val_value_t *newval, boolean cur_exists)
Check if the max-access for a parameter is exceeded.
Definition: agt_util.c:3079
obj_get_basetype
ncx_btype_t obj_get_basetype(const obj_template_t *obj)
Get the NCX base type enum for the object type.
Definition: obj.c:12077
agt_get_profile
agt_profile_t * agt_get_profile(void)
Get the server profile struct.
Definition: agt.c:4118
obj_is_enabled
boolean obj_is_enabled(obj_template_t *obj)
Check any if-feature statement that may cause the specified object to be invisible.
Definition: obj.c:14527
XML_MSG_WITH_MODTAGS_EMPTY
#define XML_MSG_WITH_MODTAGS_EMPTY(M)
Check if empty module-tags set.
Definition: xml_msg.h:284
NCX_IQUAL_OPT
@ NCX_IQUAL_OPT
'?' == 0 or 1
Definition: ncxtypes.h:298
ses_get_out_encoding
ncx_display_mode_t ses_get_out_encoding(ses_cb_t *scb)
Get the output encoding.
Definition: ses.c:4126
agt_cvt_editop_ex
op_editop_t agt_cvt_editop_ex(op_editop_t editop, const val_value_t *newval, const val_value_t *curval)
Determine the effective edit (if OP_EDITOP_COMMIT) Do not convert COMMIT to REPLACE same as cvt_edito...
Definition: agt_util.c:6275
ERR_NCX_PROTO11_NOT_ENABLED
@ ERR_NCX_PROTO11_NOT_ENABLED
379
Definition: status_enum.h:422
NCX_LAYER_CONTENT
@ NCX_LAYER_CONTENT
application layer
Definition: ncxtypes.h:347
ncxmod_get_pathlen_from_filespec
uint32 ncxmod_get_pathlen_from_filespec(const xmlChar *filespec)
Get the length of th path part of the filespec string.
Definition: ncxmod.c:8306
SES_TR_CLOSED
@ SES_TR_CLOSED
close-session
Definition: ses.h:389
val_init_virtual
void val_init_virtual(val_value_t *val, void *cbfn, struct obj_template_t_ *obj)
Special function to initialize a virtual value node.
dlq_firstEntry
#define dlq_firstEntry(listP)
get the first entry in the queue list
Definition: dlq.h:337
agt_check_config_false
boolean agt_check_config_false(xml_msg_hdr_t *mhdr, ncx_withdefaults_t withdef, boolean realtest, val_value_t *node)
Used by the <get*> operation to return only config=false nodes and the ID ancestor nodes.
Definition: agt_util.c:2663
val_new_value
val_value_t * val_new_value(void)
Malloc and initialize the fields in a val_value_t.
Definition: val.c:2697
ncx_get_source
xmlChar * ncx_get_source(const xmlChar *fspec, status_t *res)
Expand a filespec into an absolute path.
Definition: ncx.c:8362
VAL_OBJ
#define VAL_OBJ(V)
Access the object template.
Definition: val.h:381
obj_get_augment_target
const xmlChar * obj_get_augment_target(obj_template_t *obj)
Get the target path string for an augments object.
Definition: obj.c:15924
ncx.h
YANG module utility functions.
agt_rpcerr.h
NETCONF protocol <rpc-error> server-side handler.
OP_EDITOP_REMOVE_ALL
@ OP_EDITOP_REMOVE_ALL
remove-all, yumapro only
Definition: op.h:132
obj.h
Data Object Support.
cfg_get_config_id
cfg_template_t * cfg_get_config_id(ncx_cfg_t cfgid)
Get the config struct from its ID.
Definition: cfg.c:1530
SES_TR_TIMEOUT
@ SES_TR_TIMEOUT
inactivity timeout
Definition: ses.h:392
SES_MY_SID
#define SES_MY_SID(S)
get session-id
Definition: ses.h:105
agt_set_with_owners
void agt_set_with_owners(rpc_msg_t *msg)
Check if the <with-owners> parameter is set in the request message.
Definition: agt_util.c:4605
json_wr_end_object
void json_wr_end_object(ses_cb_t *scb, xml_msg_hdr_t *msg, int32 startindent)
generate end of a JSON object
Definition: json_wr.c:1642
val_init_from_template
void val_init_from_template(val_value_t *val, struct obj_template_t_ *obj)
Initialize a value node from its object template.
SES_TR_BAD_START
@ SES_TR_BAD_START
bad session start
Definition: ses.h:394
xml_msg_set_withdef
void xml_msg_set_withdef(xml_msg_hdr_t *msg, ncx_withdefaults_t withdef)
Set the message withdef enum.
Definition: xml_msg.c:1325
agt_connect_client
int agt_connect_client(const xmlChar *hostname, uint16_t port)
Start a TCP connection to a client.
Definition: agt_util.c:6312
agt_match_etag
boolean agt_match_etag(val_value_t *val, const xmlChar *etag)
Check if the etag matches the specified value string.
Definition: agt_util.c:5444
ncx_file_close
void ncx_file_close(FILE *fp)
Close a file; check result.
Definition: ncx.c:13235
XML_MSG_WITH_TSTAMPS
#define XML_MSG_WITH_TSTAMPS(M)
Check if timestamps should be returned.
Definition: xml_msg.h:180
dlq_enque
void dlq_enque(REG void *newP, REG dlq_hdrT *listP)
add a queue node to the end of a queue list Add newP to listP
Definition: dlq.c:246
agt_output_empty
status_t agt_output_empty(ses_cb_t *scb, rpc_msg_t *msg, int32 indent)
output no data for the get or get-config operation because the if-modified-since fileter did not pass
Definition: agt_util.c:3055
val_sprintf_etag
status_t val_sprintf_etag(val_value_t *val, xmlChar *buff, int32 buffsize)
Write the Entity Tag for the value to the specified buffer.
Definition: val.c:13472
agt_output_start_container
void agt_output_start_container(ses_cb_t *scb, xml_msg_hdr_t *mhdr, xmlns_id_t parent_nsid, xmlns_id_t node_nsid, const xmlChar *node_name, int32 indent)
Output a start container node.
Definition: agt_util.c:5243
agt_get_rpc_input
val_value_t * agt_get_rpc_input(rpc_msg_t *msg)
Get the rpc input value node.
Definition: agt_util.c:6487
xpath_new_session_pcb
xpath_pcb_t * xpath_new_session_pcb(ses_cb_t *scb, const xmlChar *expr, status_t *res)
Get a new XPath parser control block for a session.
Definition: xpath.c:4669
VAL_OBJTYPE
#define VAL_OBJTYPE(V)
Access the object type.
Definition: val.h:384
agt_check_config_false_default
boolean agt_check_config_false_default(xml_msg_hdr_t *mhdr, ncx_withdefaults_t withdef, boolean realtest, val_value_t *node)
Used by the <get> operation to return only content=nonconfig nodes and the ID ancestor node and only ...
Definition: agt_util.c:2722
obj_is_data_db
boolean obj_is_data_db(const obj_template_t *obj)
Check if the object is some sort of data Constrained to only check the config DB objects,...
Definition: obj.c:13788
yang_patch_new_edit
yang_patch_edit_t * yang_patch_new_edit(const xmlChar *edit_id, yang_patch_op_t operation, const xmlChar *target, const xmlChar *point, yang_patch_where_t insert_where, val_value_t *value)
Malloc a new YANG Patch edit control block Any of the fields can be NULL to add later or not use.
Definition: yang_patch.c:255
agt_get_first_result_val
val_value_t * agt_get_first_result_val(xpath_result_t *result)
Get the first XPath result node or NULL if not node-set or empty node-set or not value node.
Definition: agt_util.c:5207
agt_get_parmval
const val_value_t * agt_get_parmval(const xmlChar *parmname, rpc_msg_t *msg)
Get the identified val_value_t for a given parameter.
Definition: agt_util.c:1897
VAL_STR
#define VAL_STR(V)
Access the value as a string ONLY if typ_is_string() is true.
Definition: val.h:464
ncx_find_module
ncx_module_t * ncx_find_module(const xmlChar *modname, const xmlChar *revision)
Find a ncx_module_t in the ncx_sesmodQ.
Definition: ncx.c:3227
NCX_IFMT_XPATH2
@ NCX_IFMT_XPATH2
double-quote Xpath for error-path
Definition: ncxtypes.h:400
SET_ERROR
#define SET_ERROR(E)
macro SET_ERROR
Definition: status_enum.h:103
ERR_NCX_DATA_MISSING
@ ERR_NCX_DATA_MISSING
272
Definition: status_enum.h:313
obj_has_name
boolean obj_has_name(const obj_template_t *obj)
Check if the specified object type has a name.
Definition: obj.c:10667
ses_putstr
void ses_putstr(ses_cb_t *scb, const xmlChar *str)
Write a zero-terminated string to the session.
Definition: ses.c:2460
VAL_IS_INDEX
#define VAL_IS_INDEX(V)
Check if the value is a key leaf.
Definition: val.h:666
OBJ_TYP_LEAF
@ OBJ_TYP_LEAF
leaf
Definition: obj.h:615
val_delete_allowed
boolean val_delete_allowed(const val_value_t *val)
Check if the specified value is allowed to have a delete edit-config operation attribute.
Definition: val.c:11129
ERR_FIL_OPEN
@ ERR_FIL_OPEN
system errors start at 100
Definition: status_enum.h:212
NCX_BT_STRING
@ NCX_BT_STRING
string
Definition: ncxtypes.h:217
agt_record_warning
void agt_record_warning(ses_cb_t *scb, xml_msg_hdr_t *msghdr, ncx_layer_t layer, status_t res, const xml_node_t *xmlnode, ncx_node_t parmtyp, const void *error_parm, ncx_node_t nodetyp, void *error_path, const ncx_errinfo_t *errinfo)
Generate an rpc_err_rec_t and save it in the msg.
Definition: agt_util.c:2110
xml_msg_get_etag
ncx_etag_t xml_msg_get_etag(xml_msg_hdr_t *msg, boolean *test)
Get the message etag match value and test sense.
Definition: xml_msg.c:1507
agt_record_error_errinfo
void agt_record_error_errinfo(ses_cb_t *scb, xml_msg_hdr_t *msghdr, ncx_layer_t layer, status_t res, const xml_node_t *xmlnode, ncx_node_t parmtyp, const void *error_info, ncx_node_t nodetyp, void *error_path, const ncx_errinfo_t *errinfo)
Generate an rpc_err_rec_t and save it in the msg Use provided error fields.
Definition: agt_util.c:2051
agt_check_cache
status_t agt_check_cache(val_value_t **cacheptr, val_value_t *newval, val_value_t *curval, op_editop_t editop)
check if a cache pointer needs to be changed or NULLed out
Definition: agt_util.c:4108
ERR_NCX_FOUND_INLINE
@ ERR_NCX_FOUND_INLINE
2004
Definition: status_enum.h:554
XP_RT_NODESET
@ XP_RT_NODESET
node-set result
Definition: xpath.h:347
NCX_DISPLAY_MODE_JSON
@ NCX_DISPLAY_MODE_JSON
JSON (RFC 7951 format)
Definition: ncxtypes.h:466
xmlns.h
XML namespace support.
agt_make_uint64_leaf
val_value_t * agt_make_uint64_leaf(obj_template_t *parentobj, const xmlChar *leafname, uint64 leafval, status_t *res)
make a uint64 val_value_t struct for a specified leaf or leaf-list
Definition: agt_util.c:3740
ERR_NCX_UNIQUE_TEST_FAILED
@ ERR_NCX_UNIQUE_TEST_FAILED
336 - 13.1
Definition: status_enum.h:379
obj_get_typestr
const xmlChar * obj_get_typestr(const obj_template_t *obj)
Get the name of the object type.
Definition: obj.c:11392
val_free_value
void val_free_value(val_value_t *val)
Scrub the memory in a val_value_t by freeing all the sub-fields and then freeing the entire struct it...
Definition: val.c:2842
ncx_socket_close
void ncx_socket_close(int fd)
Close a socket; check result.
Definition: ncx.c:13214
NCX_PROTO_NETCONF10
@ NCX_PROTO_NETCONF10
RFC 4741 base:1.0
Definition: ncxtypes.h:783
XML_MSG_WITH_ETAGS
#define XML_MSG_WITH_ETAGS(M)
Check if ETags should be returned.
Definition: xml_msg.h:162
obj_is_root
boolean obj_is_root(const obj_template_t *obj)
Check if object is marked as a root object.
Definition: obj.c:14152
ncx_txid2etag
ncx_etag_t ncx_txid2etag(ncx_transaction_id_t txid)
Cast ncx_txid_t to ncx_etag_t.
Definition: ncx.c:15358
agt_cli_get_valset
val_value_t * agt_cli_get_valset(void)
Retrieve the command line parameter set from boot time.
Definition: agt_cli.c:3427
status.h
Global error messages for status code enumerations.
NCX_WITHDEF_EXPLICIT
@ NCX_WITHDEF_EXPLICIT
explicit
Definition: ncxtypes.h:1015
agt_get_result_from_xpath
xpath_result_t * agt_get_result_from_xpath(xpath_pcb_t *pcb, val_value_t *rootval, status_t *retres)
Get the result from evaluating an XPath expression.
Definition: agt_util.c:5163
agt_make_int64_leaf2
val_value_t * agt_make_int64_leaf2(obj_template_t *parentobj, const xmlChar *modname, const xmlChar *leafname, int64 leafval, status_t *res)
make a val_value_t struct for a specified leaf or leaf-list
Definition: agt_util.c:5748
NCX_DISPLAY_MODE_XML
@ NCX_DISPLAY_MODE_XML
XML display mode.
Definition: ncxtypes.h:460
xml_msg_get_tstamp
time_t xml_msg_get_tstamp(xml_msg_hdr_t *msg, boolean *test)
Get the message timestamp match value and test sense.
Definition: xml_msg.c:1559
val_compare_max_def
int32 val_compare_max_def(const val_value_t *val1, const val_value_t *val2, boolean configonly, boolean childonly, boolean editing, boolean ignore_defaults)
Compare 2 val_value_t struct value contents.
Definition: val.c:9156
log_debug3_append
void void void void void void void void void void void void log_debug3_append(const char *fstr,...) __attribute__((format(printf
Append to a LOG_DEBUG_DEBUG3 log entry.
obj_get_nsid
xmlns_id_t obj_get_nsid(const obj_template_t *obj)
Get the namespace ID for this object.
Definition: obj.c:12395
op_filtertyp_id
op_filtertyp_t op_filtertyp_id(const xmlChar *filstr)
Get the ID for the filter type from its keyword.
Definition: op.c:271
YANG_PATCH_EDIT_TYPE_USER
@ YANG_PATCH_EDIT_TYPE_USER
edit by user
Definition: yang_patch.h:102
dlq.h
dlq provides general double-linked list and queue support:
agt_get_filespec_from_url
xmlChar * agt_get_filespec_from_url(const xmlChar *urlstr, status_t *res)
Check the URL and get the filespec part out of it.
Definition: agt_util.c:1839
obj_get_augment_targobj
obj_template_t * obj_get_augment_targobj(obj_template_t *obj)
Get the target object for an augments object.
Definition: obj.c:15905
AGT_PUSH_GET_CREATE_FLAG
#define AGT_PUSH_GET_CREATE_FLAG(F)
Get the PUSH Create flag.
Definition: agt_push.h:123
LOGDEBUG3
#define LOGDEBUG3
Check if at least log-level=debug3.
Definition: log.h:297
agt_check_save
boolean agt_check_save(xml_msg_hdr_t *mhdr, ncx_withdefaults_t withdef, boolean realtest, val_value_t *node)
Used by agt_ncx_cfg_save function to filter just what is supposed to be saved in the <startup> config...
Definition: agt_util.c:2788
xml_msg_set_max_depth
void xml_msg_set_max_depth(xml_msg_hdr_t *msg, uint32 max_depth)
Set the message max_depth value.
Definition: xml_msg.c:1359
agt_make_object2
val_value_t * agt_make_object2(obj_template_t *parentobj, const xmlChar *modname, const xmlChar *objname, status_t *res)
make a val_value_t struct for a specified node
Definition: agt_util.c:5968
NCX_DEF_INDENT
#define NCX_DEF_INDENT
default indent amount for nesting XML or other structured output
Definition: ncxconst.h:441