arp.h
来自「该程序类似于tcpdump软件」· C头文件 代码 · 共 50 行
H
50 行
/****************************************************************************
** File: arp.h
**
** Author: Mike Borella
**
** Comments: Generic ARP structure - an attempt at OS independence
**
** $Log: arp.h,v $
** Revision 1.2 1998/06/12 20:52:53 mborella
** Added log tag
**
*****************************************************************************/
/*
* ARP protocol opcodes.
*/
#define ARPOP_REQUEST 1 /* ARP request */
#define ARPOP_REPLY 2 /* ARP reply */
#define ARPOP_RREQUEST 3 /* RARP request */
#define ARPOP_RREPLY 4 /* RARP reply */
/*
* ARP header
*/
typedef struct _ARPHdr
{
unsigned short ar_hrd; /* format of hardware address */
unsigned short ar_pro; /* format of protocol address */
unsigned char ar_hln; /* length of hardware address */
unsigned char ar_pln; /* length of protocol address */
unsigned short ar_op; /* ARP opcode (command) */
} ARPHdr;
/*
* Ethernet ARP format
*/
typedef struct _EtherARP
{
ARPHdr ea_hdr; /* fixed-size header */
unsigned char arp_sha[6]; /* sender hardware address */
unsigned char arp_spa[4]; /* sender protocol address */
unsigned char arp_tha[6]; /* target hardware address */
unsigned char arp_tpa[4]; /* target protocol address */
} EtherARP;
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?