Protocol layer organization

Signed-off-by: leo-ma <begeekmyfriend@gmail.com>