how to identify the router

the coordinator must read the message received and translated to an interface, indicating the name of the router next to the original message … we know that the router will add a header containing its own information thanks to the encapsulation of frames but the question is this, the Zigbee protocol allows the router to identify through this header or should I added something to the message level to differentiate it?

That is dependent on if you want to use API mode or Transparent mode at your coordinator or what ever node you are outputting the data from.

If you want transparent mode, then you need to add some sort of identifier or poll the data from some address that you choose or create to know who it comes from.

If you use API mode, then the radio will output a known documented Hex frame telling you the type of packet, size, who it came from (64 bit MAC address) and the data.