ip.c

来自「dsp 的内核编程在此呢」· C语言 代码 · 共 23 行

C
23
字号
#include "Ethernet.h"
#include "ARP.h"
#include "IP.h"
#include "TCP.h"


int ip_check_packet(EthernetPkt *pEthernet)
{

 if(pEthernet.EthernerPkt.ProtocalType==0x0800)
 {
    return 1;
 }
 else 
    return 0;
}


int ip_process(EthernetPkt *pEthernet)
{
/*---------- ip_process:接收IP数据报后-------------*/

/*---judge the protocal, ifthe protocal is 协议如果为17即是UDP协议则调用函数udp_process,   处理UDP数据爆  否则丢弃该数据报

⌨️ 快捷键说明

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