In assemble_offer in dhcp.py, I use offer_pkt = packet.Packet() to generate a packet, then use add_protocol to add info for each layer. Finally return offer_pkt as argument for _send_packet
When it goes to _send_packet , such error occurs:
'list' object has no attribute 'serialize'
Then I print parameter pkt in _send_packet it just like:
In
assemble_offer
indhcp.py
, I useoffer_pkt = packet.Packet()
to generate a packet, then useadd_protocol
to add info for each layer. Finally returnoffer_pkt
as argument for_send_packet
When it goes to
_send_packet
, such error occurs:Then I print parameter
pkt
in_send_packet
it just like:It seems the info in pkt is right, but how can I use serialize for
offer_pkt
? Or I need do something for it before serialize?