A port of CMU dhcpd to Digital Unix
I was interested in the Carnegie Mellon University version of dhcpd, a dhcpd
server that handled bootp over dhcp (eg static dhcp address assignment) that
we needed for Win95 clients in a nice fashion, allowing everything to be put
into our familiar bootptabs. Unfortunately, the CMU people didn't port it
to Digital Unix, but fortunately the port was not too bad. So presenting
the following to offer to any other DU people interested in CMU dhcpd.
NOTE: No guarantees or warrantees of any sort are provided
for any of this. It seems to have worked for me, so I'm sharing it. At the
time this is being written, the patches, etc described are not officially
supported by CMU dhcpd development team and may very well break things. Use
at your own risk.
- CMU dhcp-3.3.7 distribution
download) with addition of Princeton patches 1-6
- AlphaStation 500 running Digital Unix 4.0b
- Used gcc 2.8.1, although DEC cc also seemed to work. Lots
of warnings either way.
A patch file is available reflecting the changes
This page best viewed with
- Both dhcp.c and main.c refer to a struct rtentry defined in net/route.h
but which seems to correspond to the old (4.3 compatability mode) structure
ortentry. Change rtentry in dchp.c and main.c to RTENTRY, add entry to
defs.h setting RTENTRY to rtentry unless _USE_OLD_RTENTRY_ set in which case
goes to ortentry. Also set _USE_OLD_RTENTRY in defs.h if alpha
- defs.h defines int32 as long. Alpha's long is 8 bytes under DEC cc and
gcc. main.c seems to insist (with assert) that there is no padding in bootp
structure, and of course count is wrong with an 64bit int32. Not sure why it
cares about padding, but figure safest to make int32 really 32bits (eg set to
- Problem with netinet/ip.h include file; if __STDC__ set to 1 when it reads
this file (as is the case with gcc by default) if skips over definition of
members ip_hl and ip_v (defining ip_vhl instead) for struct ip. ping.c wants
wants the 2 bitfields ip_hl, ip_v. Similar behaviour if _KERNEL or _NO_BITFIELDS defined. Modify ping.c to use ip_vhl in place of ip_hl if _USE_IP_VHL
defined, and set defs.h to define _USE_IP_VHL if __alpha and one of above set.
- Modify makefile to remove -I/usr/include line; make it an optional
SYS_INCLUDES variable. Problem is, /usr/include is DEC cc include files, not
gcc include files; and gcc knows where to find it's includes unless we set
this to system include directories. Also put in optional BIN_DIR for binaries
to get installed.
- There's a dummy syslog.h with the distribution, but defs.h doesn't
actually bother to load it in if we don't have syslog.h. Now it does.