better way to define reverse file into struct.

dim some struct in file. such as “tagname,taglength,tagtype,optioal|requred”
then load it dynamic.
and then pack some value to the struct,send to server. or from server,unpack the value to struct define in file.

Infact it’s a description protocol to comunication with server and clients.

is there a simple way to do this? any ideas?