[Toybox] [New Toy] : add udhcpd

Ashwini Sharma ak.ashwini at gmail.com
Tue Aug 13 01:58:55 PDT 2013


HI Rob,

Need to include headers, which are added in toynet.h at my end.
The files reuired are

#include <netinet/ip.h>
#include <netinet/udp.h>
#include <netpacket/packet.h>
regards,
Ashwini

On Tue, Aug 13, 2013 at 5:26 PM, Rob Landley <rob at landley.net> wrote:

>  On 08/12/2013 04:29:25 AM, Ashwini Sharma wrote:
>
>> Hi Rob,
>>
>>  In the continuation to DHCP client sent to you last week, attached here
>> with is the DHCP server implementation.
>>
>> Have a look at the same and let me know for any comments.
>>
>
> I'm trying to finish the cleanups for ifconfig and grep before tackling
> anything else. If anyone else wants to post cleanup patches in the
> meantime, I'm all for it.
>
> (Quick glance: 1500 lines and 1200 lines. Some sort of get_flag macros.
> Its own write_pid() instead of xpidfile()... There are todo items here.)
>
> I renamed udhcpc to dhcp and udhcpd to dhcpd, because the "u" versions
> were the "micro" prefix for the busybox implementations. (There's no
> standard name for this: the isc reference implementation is called
> dhclient, I've also used pump and dhcpcd. The objective here isn't to
> blindly copy busybox, and when I typed dhcp into ubuntu not only did it not
> have such a command but its auto-suggest didn't say there was one in any
> package in the repository...)
>
> Um, test compile:
>
> toys/pending/dhcp.c:167:16: error: field 'iph' has incomplete type
> toys/pending/dhcp.c:168:17: error: field 'udph' has incomplete type
> toys/pending/dhcp.c: In function 'mode_raw':
> toys/pending/dhcp.c:592:22: error: storage size of 'sock' isn't known
> toys/pending/dhcp.c:592:22: warning: unused variable 'sock'
> [-Wunused-variable]
> toys/pending/dhcp.c: In function 'read_raw':
> toys/pending/dhcp.c:683:67: error: 'IPVERSION' undeclared (first use in
> this function)
> toys/pending/dhcp.c:683:67: note: each undeclared identifier is reported
> only once for each function it appears in
> toys/pending/dhcp.c:697:56: error: dereferencing pointer to incomplete type
> toys/pending/dhcp.c: In function 'send_raw':
> toys/pending/dhcp.c:732:22: error: storage size of 'dest_sll' isn't known
> toys/pending/dhcp.c:762:21: error: invalid application of 'sizeof' to
> incomplete type 'struct iphdr'
>
> And so on for a while. Might try again in the morning.
>
> Rob
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.landley.net/pipermail/toybox-landley.net/attachments/20130813/69d81722/attachment-0001.htm>


More information about the Toybox mailing list