Python Raw Socket to Ethernet Interface (Windows)

后端 未结 5 695
滥情空心
滥情空心 2021-01-15 06:14

I\'m trying to create a DHCP Server and the first step is for me to send packets through my ethernet port. I\'m trying to send packets to my Ethernet interface and having an

5条回答
  •  被撕碎了的回忆
    2021-01-15 06:43

    DHCP is a UDP protocol. You shouldn't need a raw socket to implement a DHCP server.

    Use an AF_INET/SOCK_DGRAM socket, and bind to address 255.255.255.255 in order to implement your server.

提交回复
热议问题