I am considering a multihop sensor network scenario with AODV routing protocol and X-MAC protocol. I want to read the message type field of RREQ message from MAC layer. Would anyone please suggest me the code for that?
Thank you.
Link layer protocols (like X-MAC) should NOT depend on any protocol that is above them. Just like an ethernet device driver should not contain any code dealing with TCP window size. You should consider to have a software architecture which reflects how services are working in real life.