networking - Unused field value in transmission protocol -
I am writing technical documents for small protocols internally used on a GSM network. This protocol uses [id1] + [byte [] data 1], [id2] + [byte [] data 2] etc. in the continuous stream of byte.
The issue is that some fields (future expansion eligibility and backward compatibility) are not used for various reasons. The value of this field is that the option to apply the protocol (and now comes the language / framework used to implement default protocol, ie byte array default values) for the elements.
Question now. What are some useful ways to put a default value for unused fields?
In general, I say "yes" default and fill Having the value allows you to make changes to your protocol in the future, which is based on existing fill values. If you can not rely on wire on the bytes now, there is no good way to apply the structure to those bytes in the future. Not to mention this, it is generally a bad idea to allow a "implementation dependent price" leak in a binary specification. In this way I ended up with 8-byte padding and Intel-ordered IP address in the "wire" structures.
Comments
Post a Comment