def get_dhcp_mt(self, buff):
"""Pick out DHCP Message Type from buffer.
"""
ether_packet = scapy.Ether(buff)
dhcp_packet = ether_packet[scapy.DHCP]
# ('message-type', 1)
message = dhcp_packet.options[0]
return constants.DHCP_MESSATE_TYPE[message[1]]
评论列表
文章目录