Lines Matching refs:cfile
64 FILE *cfile; in read_client_conf() local
106 if ((cfile = fopen(path_dhclient_conf, "r")) != NULL) { in read_client_conf()
108 token = peek_token(&val, cfile); in read_client_conf()
111 parse_client_statement(cfile, NULL, &top_level_config); in read_client_conf()
113 token = next_token(&val, cfile); /* Clear the peek buffer */ in read_client_conf()
114 fclose(cfile); in read_client_conf()
150 FILE *cfile; in read_client_leases() local
158 if ((cfile = fopen(path_dhclient_db, "r")) == NULL) in read_client_leases()
161 token = next_token(&val, cfile); in read_client_leases()
166 skip_to_semi(cfile); in read_client_leases()
169 parse_client_lease_statement(cfile, 0); in read_client_leases()
172 fclose(cfile); in read_client_leases()
195 parse_client_statement(FILE *cfile, struct interface_info *ip, in parse_client_statement() argument
202 switch (next_token(&val, cfile)) { in parse_client_statement()
204 parse_option_decl(cfile, &config->send_options[0]); in parse_client_statement()
207 option = parse_option_decl(cfile, &config->defaults[0]); in parse_client_statement()
212 option = parse_option_decl(cfile, &config->defaults[0]); in parse_client_statement()
218 option = parse_option_decl(cfile, &config->defaults[0]); in parse_client_statement()
223 option = parse_option_decl(cfile, &config->defaults[0]); in parse_client_statement()
228 parse_string_list(cfile, &config->media, 1); in parse_client_statement()
232 parse_hardware_param(cfile, &ip->hw_address); in parse_client_statement()
236 skip_to_semi(cfile); in parse_client_statement()
241 parse_option_list(cfile, config->requested_options); in parse_client_statement()
246 parse_option_list(cfile, config->required_options); in parse_client_statement()
249 parse_lease_time(cfile, &config->timeout); in parse_client_statement()
252 parse_lease_time(cfile, &config->retry_interval); in parse_client_statement()
255 parse_lease_time(cfile, &config->select_interval); in parse_client_statement()
258 parse_lease_time(cfile, &config->reboot_timeout); in parse_client_statement()
261 parse_lease_time(cfile, &config->backoff_cutoff); in parse_client_statement()
264 parse_lease_time(cfile, &config->initial_interval); in parse_client_statement()
267 config->script_name = parse_string(cfile); in parse_client_statement()
272 parse_interface_declaration(cfile, config); in parse_client_statement()
275 parse_client_lease_statement(cfile, 1); in parse_client_statement()
278 parse_client_lease_statement(cfile, 2); in parse_client_statement()
281 parse_reject_statement(cfile, config); in parse_client_statement()
285 skip_to_semi(cfile); in parse_client_statement()
288 token = next_token(&val, cfile); in parse_client_statement()
291 skip_to_semi(cfile); in parse_client_statement()
296 parse_X(FILE *cfile, u_int8_t *buf, int max) in parse_X() argument
302 token = peek_token(&val, cfile); in parse_X()
306 token = next_token(&val, cfile); in parse_X()
309 skip_to_semi(cfile); in parse_X()
315 skip_to_semi(cfile); in parse_X()
318 token = peek_token(&val, cfile); in parse_X()
320 token = next_token(&val, cfile); in parse_X()
324 token = next_token(&val, cfile); in parse_X()
328 skip_to_semi(cfile); in parse_X()
334 skip_to_semi(cfile); in parse_X()
345 parse_option_list(FILE *cfile, u_int8_t *list) in parse_option_list() argument
353 token = next_token(&val, cfile); in parse_option_list()
356 skip_to_semi(cfile); in parse_option_list()
365 skip_to_semi(cfile); in parse_option_list()
371 skip_to_semi(cfile); in parse_option_list()
374 token = next_token(&val, cfile); in parse_option_list()
378 skip_to_semi(cfile); in parse_option_list()
389 parse_interface_declaration(FILE *cfile, struct client_config *outer_config) in parse_interface_declaration() argument
395 token = next_token(&val, cfile); in parse_interface_declaration()
398 skip_to_semi(cfile); in parse_interface_declaration()
410 token = next_token(&val, cfile); in parse_interface_declaration()
413 skip_to_semi(cfile); in parse_interface_declaration()
418 token = peek_token(&val, cfile); in parse_interface_declaration()
425 parse_client_statement(cfile, ip, ip->client->config); in parse_interface_declaration()
427 token = next_token(&val, cfile); in parse_interface_declaration()
487 parse_client_lease_statement(FILE *cfile, int is_static) in parse_client_lease_statement() argument
494 token = next_token(&val, cfile); in parse_client_lease_statement()
497 skip_to_semi(cfile); in parse_client_lease_statement()
510 token = peek_token(&val, cfile); in parse_client_lease_statement()
517 parse_client_lease_declaration(cfile, lease, &ip); in parse_client_lease_statement()
519 token = next_token(&val, cfile); in parse_client_lease_statement()
614 parse_client_lease_declaration(FILE *cfile, struct client_lease *lease, in parse_client_lease_declaration() argument
621 switch (next_token(&val, cfile)) { in parse_client_lease_declaration()
626 token = next_token(&val, cfile); in parse_client_lease_declaration()
629 skip_to_semi(cfile); in parse_client_lease_declaration()
636 if (!parse_ip_addr(cfile, &lease->address)) in parse_client_lease_declaration()
640 parse_string_list(cfile, &lease->medium, 0); in parse_client_lease_declaration()
643 lease->filename = parse_string(cfile); in parse_client_lease_declaration()
646 if (!parse_ip_addr(cfile, &lease->nextserver)) in parse_client_lease_declaration()
650 lease->server_name = parse_string(cfile); in parse_client_lease_declaration()
653 lease->renewal = parse_date(cfile); in parse_client_lease_declaration()
656 lease->rebind = parse_date(cfile); in parse_client_lease_declaration()
659 lease->expiry = parse_date(cfile); in parse_client_lease_declaration()
662 parse_option_decl(cfile, lease->options); in parse_client_lease_declaration()
666 skip_to_semi(cfile); in parse_client_lease_declaration()
669 token = next_token(&val, cfile); in parse_client_lease_declaration()
672 skip_to_semi(cfile); in parse_client_lease_declaration()
677 parse_option_decl(FILE *cfile, struct option_data *options) in parse_option_decl() argument
693 token = next_token(&val, cfile); in parse_option_decl()
697 skip_to_semi(cfile); in parse_option_decl()
703 token = peek_token(&val, cfile); in parse_option_decl()
706 token = next_token(&val, cfile); in parse_option_decl()
709 token = next_token(&val, cfile); in parse_option_decl()
713 skip_to_semi(cfile); in parse_option_decl()
725 skip_to_semi(cfile); in parse_option_decl()
746 skip_to_semi(cfile); in parse_option_decl()
760 len = parse_X(cfile, &hunkbuf[hunkix], in parse_option_decl()
765 token = next_token(&val, cfile); in parse_option_decl()
768 skip_to_semi(cfile); in parse_option_decl()
775 skip_to_semi(cfile); in parse_option_decl()
783 if (!parse_ip_addr(cfile, &ip_addr)) in parse_option_decl()
791 skip_to_semi(cfile); in parse_option_decl()
799 token = next_token(&val, cfile); in parse_option_decl()
804 skip_to_semi(cfile); in parse_option_decl()
813 token = next_token(&val, cfile); in parse_option_decl()
822 token = next_token(&val, cfile); in parse_option_decl()
830 token = next_token(&val, cfile); in parse_option_decl()
835 skip_to_semi(cfile); in parse_option_decl()
854 skip_to_semi(cfile); in parse_option_decl()
858 token = next_token(&val, cfile); in parse_option_decl()
863 skip_to_semi(cfile); in parse_option_decl()
876 parse_string_list(FILE *cfile, struct string_list **lp, int multiple) in parse_string_list() argument
891 token = next_token(&val, cfile); in parse_string_list()
894 skip_to_semi(cfile); in parse_string_list()
912 token = next_token(&val, cfile); in parse_string_list()
917 skip_to_semi(cfile); in parse_string_list()
922 parse_reject_statement(FILE *cfile, struct client_config *config) in parse_reject_statement() argument
930 if (!parse_ip_addr(cfile, &addr)) { in parse_reject_statement()
932 skip_to_semi(cfile); in parse_reject_statement()
944 token = next_token(&val, cfile); in parse_reject_statement()
949 skip_to_semi(cfile); in parse_reject_statement()