When working with networking, it is always best to abstract the details, meaning that you should create some internal structure with your enums and stuff, then write conversion routines to pack it...