Verified networking using dependent types