1e08ac58bSPaul TrainaToDo: -*- text -*- 2e08ac58bSPaul Traina 3e08ac58bSPaul Traina---------------------------------------------------------------------- 4e08ac58bSPaul TrainaMemory allocation locality: 5e08ac58bSPaul Traina 6e08ac58bSPaul TrainaCurrently mallocs memory in a very haphazard manner. As such, most of 7e08ac58bSPaul Trainathe program ends up core-resident all the time just to follow all the 8e08ac58bSPaul Trainastupid pointers around. . . . 9e08ac58bSPaul Traina 10e08ac58bSPaul Traina---------------------------------------------------------------------- 11e08ac58bSPaul TrainaInput parser: 12e08ac58bSPaul Traina 13e08ac58bSPaul TrainaThe reader implemented in readfile.c could use improvement. Some sort 14e08ac58bSPaul Trainaof "data-driven" parser should be used so the big switch statements 15e08ac58bSPaul Trainawould have only one case for each data type instead of one case for 16e08ac58bSPaul Trainaevery recognized option symbol. Then adding a new tag would involve 17e08ac58bSPaul Trainaonly adding a new element to the data table describing known symbols. 18e08ac58bSPaul TrainaHopefully, this would shrink the code a bit too. -gwr 19e08ac58bSPaul Traina 20e08ac58bSPaul Traina---------------------------------------------------------------------- 21e08ac58bSPaul TrainaSLIP Initialization via BOOTP: 22e08ac58bSPaul Traina 23e08ac58bSPaul TrainaIn the function handle_request(), both in bootpd and bootpgw, 24e08ac58bSPaul Trainawe might want to add code like the following just before testing 25e08ac58bSPaul Trainathe client IP address field for zero. (bp->bp_ciaddr == 0) 26e08ac58bSPaul Traina(David suggests we leave this out for now. -gwr) 27e08ac58bSPaul Traina 28e08ac58bSPaul Traina#if 1 /* XXX - Experimental */ 29e08ac58bSPaul Traina /* 30e08ac58bSPaul Traina * SLIP initialization support. 31e08ac58bSPaul Traina * 32e08ac58bSPaul Traina * If this packet came from a SLIP driver that does 33e08ac58bSPaul Traina * automatic IP address initialization, then the socket 34e08ac58bSPaul Traina * will have the IP address and the packet will 35e08ac58bSPaul Traina * have zeros for both the IP and HW addresses. 36e08ac58bSPaul Traina * 37e08ac58bSPaul Traina * Thanks to David P. Maynard <dpm@depend.com> 38e08ac58bSPaul Traina * for explaining how this works. -gwr 39e08ac58bSPaul Traina */ 40e08ac58bSPaul Traina if ((bp->bp_ciaddr.s_addr == 0) && 41e08ac58bSPaul Traina (bp->bp_htype == 0)) 42e08ac58bSPaul Traina { 43e08ac58bSPaul Traina /* Pretend the client knows its address. It will soon. */ 44e08ac58bSPaul Traina bp->bp_ciaddr = recv_addr.sin_addr; 45e08ac58bSPaul Traina if (debug) 46e08ac58bSPaul Traina report(LOG_INFO, "fixed blank request from IP addr %s", 47e08ac58bSPaul Traina inet_ntoa(recv_addr.sin_addr)); 48e08ac58bSPaul Traina } 49e08ac58bSPaul Traina#endif 50e08ac58bSPaul Traina 51e08ac58bSPaul Traina---------------------------------------------------------------------- 52e08ac58bSPaul TrainaDHCP Support: 53e08ac58bSPaul Traina 54e08ac58bSPaul TrainaThere is a set of patches from Jeanette Pauline Middelink 55e08ac58bSPaul Traina<middelin@calvin.polyware.iaf.nl> to add DHCP support. 56e08ac58bSPaul Traina 57e08ac58bSPaul TrainaThose patches will be integrated into the BOOTP release stream 58e08ac58bSPaul Trainavery soon, but if you can't wait, you can get them from: 59e08ac58bSPaul Trainanimbus.anu.edu.au:/pub/tridge/samba/contributed/DHCP.patch 60e08ac58bSPaul Traina 61e08ac58bSPaul Traina---------------------------------------------------------------------- 62