lwip-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lwip-users] dhcp server


From: Louis Wells
Subject: [lwip-users] dhcp server
Date: Thu, 6 Dec 2012 10:51:39 -0800

Hello, 

I need to get a very simple dhcp server working on my board. All it is going to be used for is the ability to set up a connection if I need to directly plug a laptop into the board outside of a network. It will start up running dhcp client, and if it does not receive a response after sending 2 discover's it will switch to server mode. I just need to be able to reply to discover messages and send an offer and an ack after receiving a request.

I previously had everything running on uip, and am in the process of transitioning to lwip. I already have a dhcpd module that should be able to handle this, I just need to switch out the uip calls to lwip calls and get it to use the netif and the udp pcb in order to send packets and so on. 

Also for reference, I am using the raw api, and the tcpip thread.

It looks like I am going to have to modify udp_input to look for a packet that originated at DHCP_CLIENT_PORT and is addressed to DHCP_SERVER_PORT to pass the messages into my dhcpd module.

If i make these changes am I doing anything that will mess up lwip? Does it sound like what I am trying to do is the right idea ?

Also if anyone has experience getting this to work, any advice or recommendations would be appreciated !

Thanks

Louis



reply via email to

[Prev in Thread] Current Thread [Next in Thread]