Hi Tatinana

To collect the information from each incoming packet, you need to work on
the recv() function, where these packets are being received.

First in the recv() function, you will declare the receiving packet's header
like this:
    struct hdr_cmn *ch = HDR_CMN(p);
    struct hdr_ip *ih = HDR_IP(p);
    struct hdr_aodv_msp *msp = HDR_AODV_MSP(p); //This is the customized
header which you can change as per your requirement.

Then can you makes changes in Common Header, IP Header, or your customized
Header. As i did

        ih->saddr() = ih->daddr();
        msp->msp_src = ih->daddr();
        ih->daddr() = msp_neighbour_node;
        msp->msp_dst = msp_neighbour_node;


Regards

-- 
Mubashir Husain Rehmani

Mobile : 00 33 (0)6 32 00 89 35

Reply via email to