I am going to write a very simple program on protocolling in C.
So, in a frame, it should contains a header, packets and a trailer.
In header I planned to put only the sequence of a file, a sequence
of packets of that file and lastly, the length of that packet.
I was wondering how should I represent the header?
Should I represent it with an integer (int) or character (char) or
hexadecimal or something else (any suggestion)?
Lets say there are 3 files all together which have been splitted into a lot of packets.
I was planning to represent the first sequence of a file with
a letter 'a' because character took only 1 bytes and letter 'a'
again to represent the first sequence of packets of that file.
Thus, to represent the second order of packets of that file it
should be a letter 'b'. If I choose alphabet from 'a' to 'z', wouldn't
it be limited to 26 packets only? If I choose 2 letters to represent
the sequence of packets, I have 676 combination and this will consume 2 bytes (any suggestion to lower down the size or maybe use other thing to represent header)?