资源简介
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);
相关资源
- 基于gtk的mp3播放器
- UP-CUP6410-II实验指导书(LINUX)V2.0.pd
- linux的进程线程编程(高清书签版)
- 数据结构高一凡
- OpenGl三维建模源代码
- apache-tomcat-8.0.46.tar.gz
- 嵌入式Linux应用程序开发详解教程含源
- FeiQ发布版源代码修复版(QT5).zip
- 周金平plantsimulation 教程源代码
- linux升级openssh到7.8p版本包
- Linux Shell脚本攻略第3版pdf和源代码
- tomcat8linux
- 服装网上购物商城源代码
- scrt-7.1.3-378.rhel6-64.x86_64.rpm
- 网络入侵检测源代码
- 《x86汇编语言:从实模式到保护模式
- 泊松重建的工程源代码亲测可运行
- hi3798mv100-安卓-Linux双启动.zip
- Realtek-RTD2660HDVer8.0-2019源代码
- 王者荣耀源码.rar
- Linux系统编程 第二版
- 嵌入式Linux开发教程(下册)周立功
- 蓝牙协议及其源代码分析pdf 472页
- 胡广书现代信号处理PDF清晰版+源代码
- Linux-鸟哥私房菜教学ppt
-
Linux shell sc
ripting cookbook英文原版经 - Linux 下编译好的liblas库文件,包含了
- 实验四 源代码版本管理实验报告
- QT4 设置字体
- 基于web的会议管理系统源代码
评论
共有 条评论