资源简介
提供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 通信代码
相关资源
- Linux RS485 通信代码
- 大学生就业信息网源码
- 后台检测关键字,触发执行操作源码
- 导出word文档源码和模板
- arm开发板上摄像头抓图源代码(v4l通
- 安卓开发备忘录源码
- Bluez5.50 arm交叉编译脚本亲测成功
- IIC Linux 应用层的两种操作方式
- 微信小程序云开发-增删改查实现源码
- nmon工具linux性能32位的
- 温度场云图
- 基于89C51单片机开发的数字音乐盒 源
- 51单片机课程设计万年历源码和报告
- linux网络设备驱动
- AVR单片机入门与速成攻略源码.rar
- 类似变速齿轮 游戏加速器 Delphi源码
- 汇编语言win32简单计算器源码
- 创自CRT_310读卡器测试Demo源码
- Linux Wi-Fi open source drivers-mac80211 ath9k
- Linux Device Driver 中文版第三版
- Delphi编写的简易计算器含源码
- 热血江湖易语言登录器源码
- 自己动手写编译器、链接器 (随书源
- MT4 Dll请求http源码
- w5500 TCP/IP协议栈 FPGA源码
- 理发师问题Linux,c
- C8051F410官方例程
- 小程序源码 豆瓣书城
- 文件系统源码--操作系统课程设计
- mpq解压工具易语言源码
评论
共有 条评论