What is the best methodology for debugging my router?
Debugging the source code for logic errors, crashes and memory leaks should not be any different than any other program. The use of purify and gdb is encouraged In order to facilitate debugging of network traffic handled by your router, the sr stub code supports tcpdump compatible packet logging for all packets sent from and coming to the router. It is highly recommended that you get comfortable logging packets and viewing the logfiles in tcpdump as soon as possible. To log packets, use the -l command line option for sr to specify a log file. All packets will then be written to this log file.