Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No running on windows #6

Open
fighne opened this issue Oct 26, 2017 · 1 comment
Open

No running on windows #6

fighne opened this issue Oct 26, 2017 · 1 comment

Comments

@fighne
Copy link

fighne commented Oct 26, 2017

error message from running client example
Traceback (most recent call last):
File "./dhcp_listen.py", line 21, in
from pydhcplib.dhcp_network import *
File "C:\Python27\lib\site-packages\pydhcplib\dhcp_network.py", line 22, in
import IN
ImportError: No module named IN

@dgvncsz0f
Copy link
Owner

sorry about taking this long to reply. I somehow missed this message.

This is not going to work to windows without some work. In order to fully implement DHCP this library use a bit of C code to use raw socket.

When you are negotiating the IP address with the DHCP server you need to talk to a machine that has no IP yet. After you receive a message asking for an IP [which usually comes from a broadcasted message] you need to reply to the peer which at this point has no IP yet. When you reply the message to the peer you can (1) use broadcast [if I recall correctly the protocl allows this] or (2) more commonly use unicast. Replying to a machine that has no known IP address using unicast requires you to manipulate the IP headers directly, thus the use of C code to deal with raw sockets. This code is linux specific.

Okay, now the error you are getting is not related to this particular issue but you would bump on it eventually.

I have no experience working with windows API but I'm willing to help if you still need this.

Again sorry taking this long to reply.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants