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