Programming a new protocol advice

I am currently working on a project that requires me to create a program to interface with another system via ethernet. The system uses a message based, TLV (tag, length, value) structure for communicating. There are a predefined set of requests and responses, each with its own parameters and values. My part of the program simply analyzes the requests and responds to the host with the appropriate response.

I am looking for advice, tips/tricks, examples of ways to do this efficiently. Right now it is mostly hard coded, with a ton of case statements determining the flow of the program. My main question would be, is there an efficient way of storing the message structures, and potential values externally, i.e. a text file, rather than coding them directly into the program?
Topic archived. No new replies allowed.