ethernet.h
来自「在Linux操作系统下实现的软件交换技术」· C头文件 代码 · 共 43 行
H
43 行
#include "pcap.h"/* This is a name for the 48 bit ethernet address available on many systems. */struct ethernet{ u_int8_t ether_des[6]; /* destination eth addr */ u_int8_t ether_src[6]; /* source ether addr */ u_int16_t ether_type; /* packet type ID field */} __attribute__ ((__packed__));struct forwarding_table{ int count_Mac; int eth[4]; u_int8_t Mac_Host[4][6];};struct packet{ const u_char *packet; struct pcap_pkthdr header;};struct buffer_queue{ struct packet pkt; struct buffer_queue *next;//Con tro tro den phan tu ke};struct queue{struct buffer_queue *head;//Con tro tro den dau hang doistruct buffer_queue *tail; //Con tro tro den phan tu cuoi};
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?