You can start by reading the official RFC 0854 , hope that helps somewhat.