资源简介
在使用DHCP动态获取地址上网的环境中如何防止DOS服务攻击,DHCP snooping对DHCP 整个过程进行监控,防止恶意获取地址。
代码片段和文件信息
/************************************************************************/
/* */
/* Copyright 1998 - 2001 Baud Data Communication Ltd. */
/* ALL RIGHTS RESERVED */
/* */
/* Permission is hereby granted to licensees of Baud Data */
/* Communication Ltd. products to use or abstract this computer */
/* program for the sole purpose of implementing a product based */
/* on Baud Data Communication Ltd. products. No other rights to */
/* reproduce use or disseminate this computer program whether */
/* in part or in whole are granted. */
/* */
/* Baud Data Communication Ltd. makes no representation or warranties */
/* with respect to the performance of this computer program and */
/* specifically disclaims any responsibility for any damages */
/* special or consequential connected with the use of this program. */
/* */
/*----------------------------------------------------------------------*/
/* */
/* MODULE NAME:DHCPN/DHCP */
/* FILE NAME: dhcpr_binding.c */
/* AUTHOR: Li yonghui */
/* DATE: 2007/03/21 */
/* PURPOSE: DHCP Snooping Function */
/* PURPOSE: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx */
/* PURPOSE: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx */
/* */
/************************************************************************/
#include
#include
#ifdef INCLUDE_DHCPSNOOPING
#include
#include
#include
#include
struct dhcp_snooping_binding *dhcpr_find_binding(struct dhcpr_haddr *haddr struct in_addr addr)
{
struct dhcp_snooping_binding *binding;
binding = (struct dhcp_snooping_binding *)dhcpr_hash_lookup( dh_snooping_gl_var.dhcp_binding_tab
haddr->haddr haddr->hlen);
if(binding && binding->c_addr.s_addr != addr.s_addr)
{
if (dhcpr_debug_flags & DHCP_DEBUG_BINDING)
{
if(binding->c_addr.s_addr)
dhcpr_debug(“This mac addr binding %s“ inet_ntoa(binding->c_addr));
else
dhcpr_debug(“This mac addr bidnging invalid addr : 0.0.0.0“);
}
return NULL;
}
return binding;
}
struct dhcp_snooping_binding * dhcpr_add_binding(struct dhcpr_haddr *s_haddr
VLAN_ID vlanid DEVICE_ID diID)
{
struct dhcp_snooping_binding *binding *temp;
char buf[MAX_NAME_LEN] = {0};
char *ifname = buf;
binding = (struct dhcp_snooping_binding *)dhcpr_hash_lookup(dh_snooping_gl_var.dhcp_binding_tab
s_haddr->haddr s_haddr->hlen);
if(binding)
{
if (dhcpr_debug_flags & DHCP_DEBUG_BINDING)
{
interface_omnivorous_callback_getname(binding->diID &ifname);
dhcpr_debug(“This mac addr has a binding
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 21012 2007-12-27 15:40 libdhcpr\depend.PPC603gnu
文件 10188 2007-03-26 10:00 libdhcpr\depend.PPC860gnu
文件 19603 2008-01-09 18:45 libdhcpr\dhcpr\dhcpr_cmd.h
文件 8698 2008-02-21 15:54 libdhcpr\dhcpr\dhcpr_common.h
文件 2645 2007-08-02 16:29 libdhcpr\dhcpr\dhcpr_defs.h
文件 2370 2008-01-09 19:44 libdhcpr\dhcpr\dhcpr_hash.h
文件 2489 2007-05-30 17:24 libdhcpr\dhcpr\dhcpr_option82.h
目录 0 2009-08-05 09:40 libdhcpr\dhcpr
文件 57856 2007-07-27 11:06 libdhcpr\dhcpr-version.doc
文件 12212 2008-02-21 15:53 libdhcpr\dhcpr_binding.c
文件 114456 2007-12-30 14:53 libdhcpr\dhcpr_binding.o
文件 32330 2008-01-09 20:12 libdhcpr\dhcpr_cmd.c
文件 143340 2007-12-30 16:19 libdhcpr\dhcpr_cmd.o
文件 22104 2007-12-25 16:54 libdhcpr\dhcpr_common.c
文件 119272 2007-12-30 14:50 libdhcpr\dhcpr_common.o
文件 4196 2008-03-06 15:15 libdhcpr\dhcpr_hash.c
文件 114456 2007-12-30 14:53 libdhcpr\dhcpr_hash.o
文件 22105 2008-02-21 10:31 libdhcpr\dhcpr_main.c
文件 161008 2007-12-30 14:50 libdhcpr\dhcpr_main.o
文件 10719 2007-08-31 15:31 libdhcpr\dhcpr_option82.c
文件 162104 2007-08-31 15:46 libdhcpr\dhcpr_option82.o
文件 11236 2007-08-29 11:36 libdhcpr\dhcpr_vrf.c
文件 196032 2007-08-29 11:43 libdhcpr\dhcpr_vrf.o
文件 1011890 2007-12-30 16:19 libdhcpr\libdhcpr.a
文件 178 2007-08-29 11:42 libdhcpr\libdhcpr.opt
文件 216 2005-09-12 16:15 libdhcpr\makefile
文件 501 2000-07-20 17:12 libdhcpr\makefile.psos
文件 484 2007-06-01 09:20 libdhcpr\makefile.vxworks
文件 500 2007-06-01 09:20 libdhcpr\makefile.vxworks2
文件 1976 2007-06-01 09:19 libdhcpr\rules.mk
............此处省略4个文件信息
- 上一篇:UG二次开发创建曲面
- 下一篇:基于VHDL电子时钟
相关资源
- 利用Packet Tracer验证WWW、FTP、DNS、DHC
- linux下dhcp安装包
- linux系统DHCP软件包
- linux中各种服务器搭建
- Linux-webmin-DHCP教程
- DHCP服务软件
- DHCP服务器检测软件
- DNS FTP WEB WINS DHCP服务器的配置与管理
- 简易DHCP工具
- windows DHCP服务安装包
- DHCP+PXE+NFS+Kickstart全自动系统安装
- 最小的DHCP服务器软件dhcpsrv1.7.rar
- Linux系统下dhcp源码
- haneWIN DHCP Server V3.13汉化注册版2014.4更
- STM32F1_W5500.zip
- 3.Cisco小实验 VLAN、VTP、DHCP、OSPF、NA
- DHCP源代码-4.2.8
- 由浅入深玩转华为WLAN----4 DHCP Option
- H3C WA2620-AGN典型配置
- tftpd32_v4.5.2绿色版
- udhcp_0.9.8cvs20050303.orig.tar.gz
- Centos 7.4 DHCP 双机热备
- stm32W5500官方移植好的,只需改里面的
- PACKET TRACER v7.1 三层交换机DHCP配置
- DHCP服务器的安装实验报告.doc
评论
共有 条评论