----- Receiving the following content ----- From: Muhamad Ikhwan Ismail Receiver: lwip-users Time: 2007-11-09, 17:14:43 Subject: [lwip-users] DHCP with lwIP
> >Hi .. >First thing first, thanks for reading this and helping out. >I am a student given the task of porting the lwip 1.2.0 >to the 32bit Freescale MPC852T running on a commercial RTOS and im about to >write the >source code for the ethernet interface setup when I started to give >a thought about DHCP for my device to obtain an IP Address and gateway. >Following is my question : > >1. Following is my program flow for the ethernet setup : >Bring HW up (not netif, just hardware setup) --> create netif and initialize >it with HW address info >-->call DHCP (dhcp_start();)-->make netif default and add it into the list. >Is the flow for a threaded environment ok ? Did I forget anything....e,g e >the socket API (another requirement) > This is how I setup an ethernet interface with 1.1.1 struct netif ether_if; (1) netif_add(ðer_if, NULL, NULL, NULL, NULL, ethernetif_init, tcpip_input); (2) start dhcp_coarse_tmr(use OS function) (3) start dhcp_fine_tmr(use OS function) (4) setup HW (5) dhcp_start(ðer_if) I think it's fine for 1.2.0. BTW, I think 1.3.0 will be released soon, so suggest you use the latest CVS version. It's thread safe. >2. How am I suppose to figure out the memory allignment? I set MEM_ALIGNMENT_SIZE to 4, on my LPC2210 (also a 32-bit processor), suggest you to do so It's a big issue should to be emphasized in the document I think. For I ever trapped for two days for I ignore this when I first came to lwip > >Also any link which could help me porting lwip would be welcome... >Thanks a lot in advance.... > >Ikhwan _______________________________________________ lwip-users mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/lwip-users
