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