Nios® V/II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® V/II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++

Latest version of DHCP-ISC

Altera_Forum
Honored Contributor II
1,629 Views

I have been using the DHCPD from dhcp-isc for a couple of years now (Version 2 Patchlevel 5, from 'uClinux-dist-20071107.tar.bz2') on a NIOS system. After increasing the network traffic, I discovered a small memory leak with this version. I have pulled down the latest uClinux distribution, but the newer dhcp-isc (Version 4.0.0, from 'nios2-linux-20090730.tar') will not compile. 

 

Has anybody had success building the latest dhcp-isc for NIOS? Are there extra configuration steps required that were not needed for Version 2? 

 

I have included the error messages below. Any help is greatly appreciated. 

 

 

 

 

nios2-linux-uclibc-gcc -DHAVE_CONFIG_H -I. -I../includes -I../../common -I../../includes -I../.. -I.. -DLOCALSTATEDIR='"/var/lib"' -Dlinux -D__linux__ -Dunix -D__uClinux__ -DEMBED -I/home/smcfadden/nios-test/nios2-linux/uClinux-dist -I/home/smcfadden/nios-test/nios2-linux/uClinux-dist/linux-2.6.x/include -I/home/smcfadden/nios-test/nios2-linux/uClinux-dist/staging/usr/include -D__adjtimex=adjtimex -Dlinux -D__linux__ -Dunix -D__uClinux__ -DEMBED -I/home/smcfadden/nios-test/nios2-linux/uClinux-dist -I/home/smcfadden/nios-test/nios2-linux/uClinux-dist/linux-2.6.x/include -I/home/smcfadden/nios-test/nios2-linux/uClinux-dist/staging/usr/include -D__adjtimex=adjtimex -O2 -g -fno-builtin -c ../../common/discover.c 

../../common/discover.c:734:21: ifaddrs.h: No such file or directory 

../../common/discover.c: In function `next_iface': 

../../common/discover.c:780: error: dereferencing pointer to incomplete type 

../../common/discover.c:782: error: dereferencing pointer to incomplete type 

../../common/discover.c:786: error: dereferencing pointer to incomplete type 

../../common/discover.c:787: error: dereferencing pointer to incomplete type 

../../common/discover.c:788: error: dereferencing pointer to incomplete type 

../../common/discover.c:789: error: dereferencing pointer to incomplete type 

../../common/discover.c:790: error: dereferencing pointer to incomplete type 

make[6]: *** [discover.o] Error 1
0 Kudos
8 Replies
Altera_Forum
Honored Contributor II
613 Views

Based on the deafening response (and my earlier google searches), I'm forced to conclude there aren't many (if any) people using the ISC version of DHCP with NIOS. 

 

For those NIOS users who are running DHCPD, what are you using? (I've tried busybox, but it's very slow)
0 Kudos
Altera_Forum
Honored Contributor II
613 Views

I don't see why the busybox dhcp client daemon should be especially slow. With NoMMU it uses a lot memory as neither dynamic linking nor execute in place is supported. With MMU this should be mended. 

 

-Michael
0 Kudos
Altera_Forum
Honored Contributor II
613 Views

Thanks for the response, Michael. 

 

I found busybox about an order of magnitude slower than dhcp-isc. Detecting an array of 100 clients took nearly five minutes with busybox (almost 3 seconds each), while the ISC DHCPD needed only 30 seconds. Is this the expected performance of busybox? 

 

I realize I am using an old version (1.5.1), but it seems like wishful thinking to hope the latest build is 10x faster. (I haven't tested this yet: the latest version won't work with my old distribution, and I don't want to tackle a full dist upgrade unless it's unavoidable -- too many custom drivers and not enough time).  

 

I'm using NoMMU, but I'm not concerned with memory usage -- I have plenty to work with.
0 Kudos
Altera_Forum
Honored Contributor II
613 Views

I think there is some confusion here -- smcfadden, you are talking about the DHCP *server*?

0 Kudos
Altera_Forum
Honored Contributor II
613 Views

That's correct. I'm referring to the DHCP server daemon (DHCPD) -- not the client daemon (DHCPCD). I missed that when I read Michael's post -- sorry for the confusion.

0 Kudos
Altera_Forum
Honored Contributor II
613 Views

 

--- Quote Start ---  

Detecting an array of 100 clients took nearly five minutes with busybox (almost 3 seconds each), while the ISC DHCPD needed only 30 seconds. Is this the expec 

--- Quote End ---  

Are you using the busybox DHCP server ? I was talking about the DHCP client as I have not tested the dhcp sever and so I can't decently comment on same. But my suspicion is that the dhcp server is started by inetd on any DHCP request,; and loading and starting a busybox tool is slow (due to no XIP and no shared library) as the complete huge "busybox" executable needs to be copied into RAM, which takes some time.  

 

-Michael
0 Kudos
Altera_Forum
Honored Contributor II
613 Views

Thanks for the feedback. I was hoping there would be a simple plug-in replacement of dhcpd available, but that doesn't appear to be the case. Fortunately, using a dhcp server was more a convenience than a necessity. Switching to fixed IP addresses should work for my application (with a little extra monitoring).

0 Kudos
Altera_Forum
Honored Contributor II
613 Views

On the long run everybody will switch to the MMU based NIOS. Here the limitations should go away. Having the busybox in a RAM based file system and using XIP should allow perfectly fast loading and starting.  

 

-Michael
0 Kudos
Reply