⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 iprcve.c

📁 嵌入式RMON,RMON为Remote monitor的缩写,基于SNMP为网络提供主动监控及错误告警,智能交换路由必备协议
💻 C
字号:
/* Beholder RMON ethernet network monitor,Copyright (C) 1993 DNPAP group *//* See file COPYING 'GNU General Public Licence' for copyright details   */#include <stdio.h>#include "ip.h"#include "iphdr.h"#include "ipprot.h"#include "iproute.h"#include "ipiface.h"#include "ipreas.h"BOOLEAN IpRcve(MAC_IFACE *iface, CHAIN *chain, MAC_HDR *macHdr){    IP_HDR  ipHdr;    CHAIN   *new, *reas;    IP_PROT *prot;    BOOLEAN success = FALSE;    new = IpHdrDecode(chain, &ipHdr);    if (new != 0)    {        if (IpIfaceIsForMe(ipHdr.dst))        {            if (ipHdr.offset == 0 &&                (ipHdr.flags & IP_FLAG_MORE_FRAGMENTS) != IP_FLAG_MORE_FRAGMENTS)            {                prot = IpProtFind(ipHdr.prot);                if (prot != 0)                    success = prot->Rcve(new, &ipHdr);            }            else            {                if (IpReas(new, &reas, &ipHdr))                {                    prot = IpProtFind(ipHdr.prot);                    if (prot != 0)                        success = prot->Rcve(reas, &ipHdr);                    ChainFree(reas);                }                else                {                    success = TRUE;                }            }        }            if (new != chain)            ChainFree(new);    }      return success;}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -