资源简介
提供Linux系统下DHCP源码下载
dhcp-3.1.1.tar.gz
代码片段和文件信息
/* clparse.c
Parser for dhclient config and lease files... */
/*
* Copyright (c) 2004-2009 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‘‘.
*/
#ifndef lint
static char copyright[] =
“$Id: clparse.cv 1.67.76.5 2009/09/01 20:32:27 dhankins Exp $ Copyright (c) 2004-2009 Internet Systems Consortium. All rights reserved.\n“;
#endif /* not lint */
#include “dhcpd.h“
static TIME parsed_time;
struct client_config top_level_config;
u_int32_t default_requested_options [] = {
DHO_SUBNET_MASK
DHO_BROADCAST_ADDRESS
DHO_TIME_OFFSET
DHO_ROUTERS
DHO_DOMAIN_NAME
DHO_DOMAIN_NAME_SERVERS
DHO_HOST_NAME
0
};
/* 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 client_state *state;
struct interface_info *ip;
isc_result_t status;
/* Set up the initial dhcp option universe. */
initialize_common_option_spaces ();
/* Initialize the top level client configuration. */
memset (&top_level_config 0 sizeof top_level_config);
/* Set some defaults... */
top_level_config.timeout = 60;
top_level_config.select_interval = 0;
top_level_config.reboot_timeout = 10;
top_level_config.retry_interval = 300;
top_level_config.backoff_cutoff = 15;
top_level_config.initial_interval = 3;
top_level_config.bootp_policy = P_ACCEPT;
top_level_config.script_name = path_dhclient_script;
top_level_config.requested_options = default_requested_options;
top_level_config.omapi_port = -1;
top_level_config.do_forward_update = 1;
group_allocate (&top_level_config.on_receipt MDL);
if (!top_level_config.on_receipt)
lo
- 上一篇:软件测试实验报告测试用例,代码,截图
- 下一篇:Linux RS485 通信代码
相关资源
- 我的世界源码(易语言版)
- labview编程软件滤波器以及编写程序设
- 我的界面(visual foxpro)源码
- 易语言:一键cf基址源码
- The Secret Path 3D 3D魔方迷宫[源码][scra
- scratch垃圾分类源码(最终版本).sb
- uboot到linux logo显示不间断 补丁
- 安卓QQ6.71协议源码易语言,qq协议源码
- 编译原理实验工具及参考源码(lex&
- E盾偷后台工具源码
- UNIX/LINUX编程实践教程的源码
- 十以内加减法练习 powerbuilder源码
- Linux任务管理器
- linux应用层的华容道游戏源代码
- 农场开发项目
- OCR源码
- PLC上位机编程软件
- 用foobar2000听google音乐[更新一下]
- 学生信息管理系统源码
- 用VC 编写的仿QQ聊天室程序源代码
- 毕业论文之温度传感器DS18B20(源码
- 可自定义导航网站源码
- 栅栏填充算法源码(VC)
- msp430F149操作红外接收模块源码
- [免费]图像识别c 源码
- 周易排盘源码
- RSA算法源码
- ubuntu9.10 可加载内核模块和字符设备驱
- 一个人脸识别程序源码
- 编译原理课程设计:词法语法编译器
评论
共有 条评论