Dumb NTP Server for TiVo 2.5.1 Warren Toomey, wkt@tuhs.org June 2002 This short C program runs on the TiVo, and replies to ntpdate requests from the TiVo itself. The effect is to leave the system time unaltered, but this tickles whatever it is in the TiVo that stops the clock from being warped. In the original tarball you will find the source code and a TiVo binary called dumbntpd. To run the binary, copy it over to the TiVo and just do: bash-2.02# ifconfig lo up bash-2.02# ./dumbntpd This will make the loopback interface active and start the dumbntpd daemon. You can then `set' the TiVo clock using the command: bash-2.02# ntpdate -u -b -p 1 127.0.0.1 To make this run at boot time, copy dumbntpd to /sbin, and add these lines to the end of your /etc/rc.d/rc.sysconfig: # Start dumb NTP daemon up ifconfig lo up /sbin/dumbntpd For those people running dbload25, you will probably want to alter this to look like: [ previous lines omitted ] dbload $db $file if { [llength $id] > 0 } { dumpobj /Server/$id } set cmdStr [CmdStr cms#auto] # update the time to prevent "clock is warped" messages from # stopping the index of the new guide data $cmdStr setCmd "/bin/ntpdate -u -b -p 1 127.0.0.1" $cmdStr process foo # Tell MyWorld that there is new program data. event send $TmkEvent::EVT_DATA_CHANGED $TmkDataChanged::PROGRAM_GUIDE 0 All of the code & definitions in the ntp*.h files comes from the NTP version 4 reference implementation by David L. Mills (mills@udel.edu) and others. The UDP socket code in dumbntpd.c comes from the 4.4 BSD Programmer's Supplementary Documents.