You can obtain a pointer to the current contextnode through the function
currentchunk():
currentnode = CurrentChunk (iff);
The contextnode tells you the type, id, and size of the currently active
chunk. If there is no currently active context, NULL is returned.