用TIdUDPServer取得DHCP客户端PC的MAC地址(100分)

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

litian

Unregistered / Unconfirmed
GUEST, unregistred user!
1.考虑到xp的防火墙初步想法,用TIdUDPServer监听67端口,接收DHCP DHCPDISCOVER的广播信息
但如何用TIdUDPServer接收广播的信息呢?
2.procedure TForm1.UDP1UDPRead(Sender: TObject;
AData: TStream;
ABinding: TIdSocketHandle);
VAR
Get:string;
begin
AData.Seek(0,0) ;
SetLength(Get ,AData.Size);
AData.Read(Get[1],AData.Size);
end;
//此过程读取到的信息如下:
#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0'c係c5'#1#1't'#1#1'='#7#1#0#$16'v??'#4'ooo'#$B#$C#$C'KELASSHITPC10<'#8'MSFT 5.07'#$B#1#$F#3#6',./'#$1F'!?'#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0
怎么才能得到dhcp客户端的MAC地址呢???Get应该定义为什么类型??
 
为什么没有人告诉俺
 
有没有人曾告诉你
 
问题已经解决了,就是监听UDP 67端口就可以了
 
后退
顶部