As my idea,the difficulty is to specify some variables and numeric type for the file header,e.g. magic cookie.
And then,you should organize other useful things
and collect information into header information file.
You are free to name them,at the same time,I believe some other professinals will help you.