dhcp-4.2.1.tar.gz
DHCP-4.2.1.tar.gz Linux 文件
代码片段和文件信息
/* clparse.c
Parser for dhclient config and lease files... */
/*
* Copyright (c) 2004-2010 by Internet Systems Consortium Inc. (“ISC“)
* Copyright (c) 1996-2003 by Internet Software Consortium
*
* Permission to use copy modify and distribute this software for any
* purpose with or without fee is hereby granted provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED “AS IS“ AND ISC DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
* ANY SPECIAL DIRECT INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE DATA OR PROFITS WHETHER IN AN
* ACTION OF CONTRACT NEGLIGENCE OR OTHER TORTIOUS ACTION ARISING OUT
* OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
* Internet Systems Consortium Inc.
* 950 Charter Street
* Redwood City CA 94063
*
* https://www.isc.org/
*
* This software has been written for Internet Systems Consortium
* by Ted Lemon in cooperation with Vixie Enterprises and Nominum Inc.
* To learn more about Internet Systems Consortium see
* ‘‘https://www.isc.org/‘‘. To learn more about Vixie Enterprises
* see ‘‘http://www.vix.com‘‘. To learn more about Nominum Inc. see
* ‘‘http://www.nominum.com‘‘.
*/
#include “dhcpd.h“
#include
struct client_config top_level_config;
#define NUM_DEFAULT_REQUESTED_OPTS 9
struct option *default_requested_options[NUM_DEFAULT_REQUESTED_OPTS + 1];
static void parse_client_default_duid(struct parse *cfile);
static void parse_client6_lease_statement(struct parse *cfile);
#ifdef DHCPv6
static struct dhc6_ia *parse_client6_ia_na_statement(struct parse *cfile);
static struct dhc6_ia *parse_client6_ia_ta_statement(struct parse *cfile);
static struct dhc6_ia *parse_client6_ia_pd_statement(struct parse *cfile);
static struct dhc6_addr *parse_client6_iaaddr_statement(struct parse *cfile);
static struct dhc6_addr *parse_client6_iaprefix_statement(struct parse *cfile);
#endif /* DHCPv6 */
/* client-conf-file :== client-declarations END_OF_FILE
client-declarations :==
| client-declaration
| client-declarations client-declaration */
isc_result_t read_client_conf ()
{
struct client_config *config;
struct interface_info *ip;
struct parse *parse;
isc_result_t status;
unsigned code;
/* Initialize the default request list. */
memset(default_requested_options 0 sizeof(default_requested_options));
/* 1 */
code = DHO_SUBNET_MASK;
option_code_hash_lookup(&default_requested_options[0]
dhcp_universe.code_hash &code 0 MDL);
/* 2 */
code = DHO_BROADCAST_ADDRESS;
option_code_hash_lookup(&default_requested_options[1]
dhcp_universe.code_hash &code 0 MDL);
/* 3 */
code = DHO_TIME_OFFSET;
option_code_hash_lookup(&default_requested_options[2]
dhcp_universe.code_hash &c
版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容, 请发送邮件举报,一经查实,本站将立刻删除。
评论列表(条)