split the protocol decoding code out of sockets.c to own file in net/