The codebase for Snort is fantastic. At a glance it's exactly as I'd want it to be.