摘要 为了在大型计算机实验室管理过程中快速获取远程计算机的MAC地址,基于对NetBIOS名字服务基本原理的研究,分析了相关的NODE STATUS REQUEST和NODE STATUS RESPONSE两个数据结构.在Windows环境下,使用套接字技术实现了快速获取远程主机MAC地址的服务程序.给出了NODE STATUS REQUEST和NODE STATUS RESPONSE两个数据包结构的C语言定义及获取MAC地址之程序的基本流程,并在Windows平台上用Visual C++2010实现了该获取信息的程序.结果表明:本获取MAC地址的方法简单快捷,可批量获取MAC地址,为位于局域网内计算机的自动化管理及基于MAC地址的应用等工作奠定基础.
Abstract:To rapidly obtain MAC address of remote host in the management of large computer lab, the two data structures of NODE STATUS REQUEST and NODE STATUS RESPONSE were analyzed based on the fundamental principle of NetBIOS name service. Under Windows condition, the computer service program was used to quickly achieve MAC address of remote host by socket technology. The definitions of C structures of NODE STATUS REQUEST and NODE STATUS RESPONSE were provided with the basic procedure of obtaining MAC address. The obtaining information program was implemented based on Visual C++2010 on Windows. The results show that the proposed method is simple to obtain MAC address in batch, and can provide a base of the computer automated management in LAN and the application based on MAC address.
陈争光, 冯惠妍, 王德福. 基于NetBIOS名字服务获取MAC地址的原理及实现[J]. 江苏大学学报(自然科学版), 2014, 35(3): 306-311.
Chen Zhengguang, Feng Huiyan, Wang Defu. Principle and implementation of obtaining MAC based on
NetBIOS name service[J]. Journal of Jiangsu University(Natural Science Eidtion)
, 2014, 35(3): 306-311.