- 论坛徽章:
- 0
|
typedef struct ethdr \r\n{ \r\nunsigned char eh_dst[6]; \r\nunsigned char eh_src[6]; \r\nunsigned short eh_type; \r\n}ETHDR,*PETHDR; \r\n\r\ntypedef struct arphdr \r\n{ \r\nunsigned short arp_hdr; \r\nunsigned short arp_pro; \r\nunsigned char arp_hln; \r\nunsigned char arp_pln; \r\nunsigned short arp_opt; \r\nunsigned char arp_sha[6]; \r\nunsigned long arp_spa; \r\nunsigned char arp_tha[6]; \r\nunsigned long arp_tpa; \r\n}ARPHDR,*PARPHDR; \r\n\r\n有点 不明白, 就是 数据在 以太网 中传输时,是依靠 头部的eh_dst[6]吗? \r\narp_sha[6] 和 arp_tha[6] 都是用来更新 ARP 高速缓存的吗? \r\n\r\n\r\n如果以太网首部的eh_dst[6]写错了,数据包就发不到,是这样的吗? \r\n谢谢 高手指点指点啊 |
|