struct arp {
short ar_hwtype; /* hardware type */
short ar_prtype; /* protocol type */
char ar_hwlen; /* hardware address length */
char ar_prlen; /* protocol address length */
short ar_op; /* ARP operation (see list above) */
char ar_addrs[1];/* sender and target hw & proto addrs */
/* char ar_sha[???]; /* sender's physical hardware address */
/* char ar_spa[???]; /* sender's protocol address (IP addr.) */
/* char ar_tha[???]; /* target's physical hardware address */
/* char ar_tpa[???]; /* target's protocol address (IP) */
};
struct ip {
char ip_verlen; /* IP version & header length (in longs)*/
char ip_tos; /* type of service */
short ip_len; /* total packet length (in octets) */
short ip_id; /* datagram id */
short ip_fragoff; /* fragment offset (in 8-octet's) */
char ip_ttl; /* time to live, in gateway hops */
char ip_proto; /* IP protocol (see IPT_* above) */
short ip_cksum; /* header checksum */
IPaddr ip_src; /* IP address of source */
IPaddr ip_dst; /* IP address of destination */
char ip_data[1]; /* variable length data */
};
struct icmp { /* ICMP packet */
char ic_type; /* type of message (ICT_* above)*/
char ic_code; /* code (ICC_* above) */
short ic_cksum; /* checksum of ICMP header+data */
union {
struct {
short ic1_id; /* for echo type, a message id */
short ic1_seq;/* for echo type, a seq. number */
} ic1;
IPaddr ic2_gw; /* for redirect, gateway */
struct {
char ic3_ptr;/* pointer, for ICT_PARAMP */
char ic3_pad[IC_PADLEN];
} ic3;
int ic4_mbz; /* must be zero */
} icu;
char ic_data[1]; /* data area of ICMP message */
};