资源简介
dhcpd为应用层协议,不在linux内核中,由linux的发行版本发布,资源是linux下dhcp客户端的源代码实现
代码片段和文件信息
/* clparse.c
Parser for dhclient config and lease files... */
/*
* Copyright (c) 2004-2012 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;
isc_result_t status;
unsigned code;
/*
* TODO: LATER constant is very undescriptive. We should review it and
* change it to something more descriptive or even better remove it
* completely as it is currently not used.
*/
#ifdef LATER
struct parse *parse = NULL;
#endif
/* 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);
相关资源
- bp神经网络源代码,可直接运行
- 仿知乎界面小程序源代码
- 贪吃蛇源代码.fla
- uboot到linux logo显示不间断 补丁
- UNIX/LINUX编程实践教程的源码
- dotnet 写字板 实验 源代码 不好请要不
- 图像二维小波变换的实现源代码
- 八三编码器设计 VHDL代码 简单,包附
- Linux任务管理器
- linux应用层的华容道游戏源代码
- 网上拍卖系统完整源代码
- CSMA/CD等动画演示加源代码
- silicon lab公司的收音IC SI47XX全套开发工
- 合同管理系统的源代码(附数据库)
- 用VC 编写的仿QQ聊天室程序源代码
- STM32F103 串口程序(完整版)
- VPC3_DPV1源代码,Profibus
- PB做的托盘程序(最小化后在左下角显
- ubuntu9.10 可加载内核模块和字符设备驱
- 透明加密源码及说明
- 排队机叫号 源代码
- 五子棋C 源代码
- CAD LISP24个源代码
- 二叉树基本操作源代码
- MP3文件ID3v2ID3v2APEv2标签读取
- 推箱子及人工智能寻路C 源代码
- opengl轮廓字体源代码
- 冈萨雷斯 数字图像处理 源代码(m文
- 直流伺服电机电路原理图(内附单片
- 哈哈冒险岛登入器源代码
评论
共有 条评论