修改ip地址的问题?(200分)

  • 主题发起人 主题发起人 lijuan
  • 开始时间 开始时间
L

lijuan

Unregistered / Unconfirmed
GUEST, unregistred user!
windows在修改完ip地址后会向外发送一个arp包,告诉别人我的地址变了,同时也确定一下,
目前的地址是否与别人的冲突,我想知道的是这个arp数据包的结构是啥样的,用delphi如何
捕获这个数据包?谢谢
 
关注,帮你UP
 
Packet format:
--------------

To communicate mappings from <protocol, address> pairs to 48.bit
Ethernet addresses, a packet format that embodies the Address
Resolution protocol is needed. The format of the packet follows.

Ethernet transmission layer (not necessarily accessible to
the user):
48.bit: Ethernet address of destination
48.bit: Ethernet address of sender
16.bit: Protocol type = ether_type$ADDRESS_RESOLUTION
Ethernet packet data:
16.bit: (ar$hrd) Hardware address space (e.g., Ethernet,
Packet Radio Net.)
16.bit: (ar$pro) Protocol address space. For Ethernet
hardware, this is from the set of type
fields ether_typ$<protocol>.
8.bit: (ar$hln) byte length of each hardware address
8.bit: (ar$pln) byte length of each protocol address
16.bit: (ar$op) opcode (ares_op$REQUEST | ares_op$REPLY)
nbytes: (ar$sha) Hardware address of sender of this
packet, n from the ar$hln field.
mbytes: (ar$spa) Protocol address of sender of this
packet, m from the ar$pln field.
nbytes: (ar$tha) Hardware address of target of this
packet (if known).
mbytes: (ar$tpa) Protocol address of target.

ARP分组直接封装在链路帧(而非IP包)中,有某些Sniffer可以截获,但用Delphi做比较困难。
 
后退
顶部