Lines Matching defs:ptree
261 static void free_config_tree(config_tree *ptree);
400 config_tree *ptree
403 if (ptree->auth.keys) {
404 free(ptree->auth.keys);
405 ptree->auth.keys = NULL;
408 if (ptree->auth.keysdir) {
409 free(ptree->auth.keysdir);
410 ptree->auth.keysdir = NULL;
413 if (ptree->auth.ntp_signd_socket) {
414 free(ptree->auth.ntp_signd_socket);
415 ptree->auth.ntp_signd_socket = NULL;
423 config_tree *ptree
426 ZERO(*ptree);
427 ptree->mdnstries = 5;
435 config_tree *ptree;
438 ptree = cfg_tree_history;
440 while (ptree != NULL) {
441 pnext = ptree->link;
442 free_config_tree(ptree);
443 ptree = pnext;
450 config_tree *ptree
457 if (ptree->source.value.s != NULL)
458 free(ptree->source.value.s);
460 free_config_other_modes(ptree);
461 free_config_auth(ptree);
462 free_config_tos(ptree);
463 free_config_monitor(ptree);
464 free_config_access(ptree);
465 free_config_tinker(ptree);
466 free_config_rlimit(ptree);
467 free_config_system_opts(ptree);
468 free_config_logconfig(ptree);
469 free_config_phone(ptree);
470 free_config_setvar(ptree);
471 free_config_ttl(ptree);
472 free_config_trap(ptree);
473 free_config_fudge(ptree);
474 free_config_vars(ptree);
475 free_config_peers(ptree);
476 free_config_unpeers(ptree);
477 free_config_nic_rules(ptree);
478 free_config_reset_counters(ptree);
480 free_config_sim(ptree);
482 free_auth_node(ptree);
484 free(ptree);
517 config_tree *ptree,
544 DPRINTF(1, ("dump_config_tree(%p)\n", ptree));
549 localtime(&ptree->timestamp)))
554 (CONF_SOURCE_NTPQ == ptree->source.attr)
557 ptree->source.value.s);
564 atrv = HEAD_PFIFO(ptree->vars);
601 atrv = HEAD_PFIFO(ptree->logconfig);
609 if (ptree->stats_dir)
610 fprintf(df, "statsdir \"%s\"\n", ptree->stats_dir);
612 i_n = HEAD_PFIFO(ptree->stats_list);
620 fgen_node = HEAD_PFIFO(ptree->filegen_opts);
657 atrv = HEAD_PFIFO(ptree->auth.crypto_cmd_list);
667 if (ptree->auth.revoke != 0)
668 fprintf(df, "revoke %d\n", ptree->auth.revoke);
670 if (ptree->auth.keysdir != NULL)
671 fprintf(df, "keysdir \"%s\"\n", ptree->auth.keysdir);
673 if (ptree->auth.keys != NULL)
674 fprintf(df, "keys \"%s\"\n", ptree->auth.keys);
676 atrv = HEAD_PFIFO(ptree->auth.trusted_key_list);
696 if (ptree->auth.control_key)
697 fprintf(df, "controlkey %d\n", ptree->auth.control_key);
699 if (ptree->auth.request_key)
700 fprintf(df, "requestkey %d\n", ptree->auth.request_key);
705 ? HEAD_PFIFO(ptree->enable_opts)
706 : HEAD_PFIFO(ptree->disable_opts);
718 atrv = HEAD_PFIFO(ptree->orphan_cmds);
756 atrv = HEAD_PFIFO(ptree->rlimit);
767 atrv = HEAD_PFIFO(ptree->tinker);
778 if (ptree->broadcastclient)
781 peern = HEAD_PFIFO(ptree->peers);
839 addr_opts = HEAD_PFIFO(ptree->fudge);
888 addr = HEAD_PFIFO(ptree->manycastserver);
896 addr = HEAD_PFIFO(ptree->multicastclient);
905 for (unpeern = HEAD_PFIFO(ptree->unpeers);
910 atrv = HEAD_PFIFO(ptree->mru_opts);
919 atrv = HEAD_PFIFO(ptree->discard_opts);
928 for (rest_node = HEAD_PFIFO(ptree->restrict_opts);
977 rule_node = HEAD_PFIFO(ptree->nic_rules);
986 str_node = HEAD_PFIFO(ptree->phone);
994 setv_node = HEAD_PFIFO(ptree->setvar);
1006 i_n = HEAD_PFIFO(ptree->ttl);
1014 addr_opts = HEAD_PFIFO(ptree->trap);
1042 counter_set = HEAD_PFIFO(ptree->reset_counters);
1857 config_tree * ptree
1863 if (ptree->broadcastclient)
1864 proto_config(PROTO_BROADCLIENT, ptree->broadcastclient,
1867 addr_node = HEAD_PFIFO(ptree->manycastserver);
1881 addr_node = HEAD_PFIFO(ptree->multicastclient);
1921 config_tree *ptree
1924 FREE_ADDRESS_FIFO(ptree->manycastserver);
1925 FREE_ADDRESS_FIFO(ptree->multicastclient);
1933 config_tree *ptree
1947 my_val = HEAD_PFIFO(ptree->auth.crypto_cmd_list);
1979 if (ptree->auth.keysdir) {
1982 keysdir = estrdup(ptree->auth.keysdir);
1987 if (ptree->auth.ntp_signd_socket) {
1990 ntp_signd_socket = estrdup(ptree->auth.ntp_signd_socket);
1994 if (ptree->auth.cryptosw && !cryptosw) {
2005 my_val = HEAD_PFIFO(ptree->auth.trusted_key_list);
2024 if (ptree->auth.keys)
2025 getauthkeys(ptree->auth.keys);
2028 if (ptree->auth.control_key)
2029 ctl_auth_keyid = (keyid_t)ptree->auth.control_key;
2032 if (ptree->auth.request_key) {
2034 (u_long) ptree->auth.request_key));
2035 info_auth_keyid = (keyid_t)ptree->auth.request_key;
2039 my_val = HEAD_PFIFO(ptree->auth.trusted_key_list);
2068 if (ptree->auth.revoke)
2069 sys_revoke = 1UL << ptree->auth.revoke;
2078 config_tree *ptree
2081 destroy_attr_val_fifo(ptree->auth.crypto_cmd_list);
2082 ptree->auth.crypto_cmd_list = NULL;
2083 destroy_attr_val_fifo(ptree->auth.trusted_key_list);
2084 ptree->auth.trusted_key_list = NULL;
2095 config_tree *ptree
2102 tos = HEAD_PFIFO(ptree->orphan_cmds);
2120 config_tree *ptree
2141 tos = HEAD_PFIFO(ptree->orphan_cmds);
2212 tos = HEAD_PFIFO(ptree->orphan_cmds);
2278 config_tree *ptree
2281 FREE_ATTR_VAL_FIFO(ptree->orphan_cmds);
2288 config_tree *ptree
2301 if (ptree->stats_dir)
2302 stats_config(STATS_STATSDIR, ptree->stats_dir);
2318 pfilegen_token = HEAD_PFIFO(ptree->stats_list);
2338 my_node = HEAD_PFIFO(ptree->filegen_opts);
2444 config_tree *ptree
2447 if (ptree->stats_dir) {
2448 free(ptree->stats_dir);
2449 ptree->stats_dir = NULL;
2452 FREE_INT_FIFO(ptree->stats_list);
2453 FREE_FILEGEN_FIFO(ptree->filegen_opts);
2461 config_tree *ptree
2487 my_opt = HEAD_PFIFO(ptree->mru_opts);
2563 my_opt = HEAD_PFIFO(ptree->discard_opts);
2595 my_node = HEAD_PFIFO(ptree->restrict_opts);
2824 config_tree *ptree
2827 FREE_ATTR_VAL_FIFO(ptree->mru_opts);
2828 FREE_ATTR_VAL_FIFO(ptree->discard_opts);
2829 FREE_RESTRICT_FIFO(ptree->restrict_opts);
2836 config_tree *ptree
2841 rlimit_av = HEAD_PFIFO(ptree->rlimit);
2916 config_tree *ptree
2922 tinker = HEAD_PFIFO(ptree->tinker);
2977 config_tree *ptree
2980 FREE_ATTR_VAL_FIFO(ptree->rlimit);
2985 config_tree *ptree
2988 FREE_ATTR_VAL_FIFO(ptree->tinker);
2999 config_tree *ptree,
3012 curr_node = HEAD_PFIFO(ptree->nic_rules);
3113 config_tree *ptree
3118 if (ptree->nic_rules != NULL) {
3120 UNLINK_FIFO(curr_node, *ptree->nic_rules, link);
3126 free(ptree->nic_rules);
3127 ptree->nic_rules = NULL;
3230 config_tree *ptree
3233 apply_enable_disable(ptree->enable_opts, 1);
3234 apply_enable_disable(ptree->disable_opts, 0);
3241 config_tree *ptree
3244 FREE_ATTR_VAL_FIFO(ptree->enable_opts);
3245 FREE_ATTR_VAL_FIFO(ptree->disable_opts);
3252 config_tree *ptree
3257 my_lc = HEAD_PFIFO(ptree->logconfig);
3282 config_tree *ptree
3285 FREE_ATTR_VAL_FIFO(ptree->logconfig);
3293 config_tree *ptree
3300 sn = HEAD_PFIFO(ptree->phone);
3317 config_tree *ptree
3322 mdnstries = ptree->mdnstries;
3329 config_tree *ptree
3332 FREE_STRING_FIFO(ptree->phone);
3340 config_tree *ptree
3348 my_node = HEAD_PFIFO(ptree->setvar);
3369 config_tree *ptree
3372 FREE_SETVAR_FIFO(ptree->setvar);
3380 config_tree *ptree
3386 curr_ttl = HEAD_PFIFO(ptree->ttl);
3403 config_tree *ptree
3406 FREE_INT_FIFO(ptree->ttl);
3414 config_tree *ptree
3432 curr_trap = HEAD_PFIFO(ptree->trap);
3589 config_tree *ptree
3592 FREE_ADDR_OPTS_FIFO(ptree->trap);
3600 config_tree *ptree
3610 curr_fudge = HEAD_PFIFO(ptree->fudge);
3715 config_tree *ptree
3718 FREE_ADDR_OPTS_FIFO(ptree->fudge);
3725 config_tree *ptree
3731 curr_var = HEAD_PFIFO(ptree->vars);
3829 config_tree *ptree
3832 FREE_ATTR_VAL_FIFO(ptree->vars);
3965 config_tree *ptree
4036 curr_peer = HEAD_PFIFO(ptree->peers);
4194 config_tree *ptree
4199 if (ptree->peers != NULL) {
4201 UNLINK_FIFO(curr_peer, *ptree->peers, link);
4208 free(ptree->peers);
4209 ptree->peers = NULL;
4218 config_tree *ptree
4228 curr_unpeer = HEAD_PFIFO(ptree->unpeers);
4354 config_tree *ptree
4359 if (ptree->unpeers != NULL) {
4361 UNLINK_FIFO(curr_unpeer, *ptree->unpeers, link);
4367 free(ptree->unpeers);
4376 config_tree *ptree
4381 for (counter_set = HEAD_PFIFO(ptree->reset_counters);
4426 config_tree *ptree
4429 FREE_INT_FIFO(ptree->reset_counters);
4437 config_tree *ptree
4448 sim_n = HEAD_PFIFO(ptree->sim_details);
4510 config_tree *ptree
4517 if (NULL == ptree->sim_details)
4519 sim_n = HEAD_PFIFO(ptree->sim_details);
4520 free(ptree->sim_details);
4521 ptree->sim_details = NULL;
4556 config_tree *ptree,
4565 if (config_tos_clock(ptree))
4569 config_nic_rules(ptree, input_from_files);
4570 config_monitor(ptree);
4571 config_auth(ptree);
4572 config_tos(ptree);
4573 config_access(ptree);
4574 config_tinker(ptree);
4575 config_rlimit(ptree);
4576 config_system_opts(ptree);
4577 config_logconfig(ptree);
4578 config_phone(ptree);
4579 config_mdnstries(ptree);
4580 config_setvar(ptree);
4581 config_ttl(ptree);
4582 config_vars(ptree);
4586 config_trap(ptree); /* [bug 2923] dep. on io_open_sockets() */
4587 config_other_modes(ptree);
4588 config_peers(ptree);
4589 config_unpeers(ptree);
4590 config_fudge(ptree);
4591 config_reset_counters(ptree);
4622 config_tree *ptree
4628 config_tos(ptree);
4629 config_monitor(ptree);
4630 config_tinker(ptree);
4632 config_rlimit(ptree); /* not needed for the simulator */
4633 config_system_opts(ptree);
4634 config_logconfig(ptree);
4635 config_vars(ptree);
4636 config_sim(ptree);
4771 config_tree *ptree;
4781 ptree = emalloc(sizeof(*ptree));
4782 memcpy(ptree, &cfgt, sizeof(*ptree));
4785 LINK_TAIL_SLIST(cfg_tree_history, ptree, link, config_tree);
4823 config_ntpd(ptree, input_from_file);
4825 config_ntpdsim(ptree);
4833 UNLINK_SLIST(punlinked, cfg_tree_history, ptree, link,
4835 INSIST(punlinked == ptree);
4836 free_config_tree(ptree);