#include<stdio.h>
#define ICMPBUF ((uip_icmpip_hdr *)&uip_buf[14])
typedef unsigned char uint8;
typedef unsigned short uint16;
typedef struct
{
/* IP header. */
uint8 vhl,
tos,
len[2],
ipid[2],
ipoffset[2],
ttl,
proto;
uint16 ipchksum;
uint16 srcipaddr[2],
destipaddr[2];
/* ICMP (echo) header. */
uint8 type,
icode;
uint16 icmpchksum;
uint16 id,
seqno;
} uip_icmpip_hdr;
uint8 uip_buf[222];
void main(void)
{
ICMPBUF->vhl = 0x01;
printf("%d",&(ICMPBUF->vhl));
}
((uip_icmpip_hdr *)&uip_buf[14])这段代码是什么意思。 |