Link to home
Start Free TrialLog in
Avatar of Anu_Suthakaran
Anu_Suthakaran

asked on

Reading the packet information through libipq



  Hi !

I was running the sample code given in the manpage of libipq
Except for the inclusion os stdlib.h for exit() and the removal of formal parameters from main i have made no modifications..............the program worked well............

   But then when i wanted it to print the hardware address,
             printf("%s", m->hw_addr) ; it prints a nothing.........

 similarly with other packet information members of the structure :
ipq_packet_msg-t  i.e.,
 printf("%l", m->timestamp_sec);

except :
     m->packet_id and m->data_len was being printed with some values.............

i believe it is because the kernel had entered these information on its own...the rest of the members have to have values from the packet itself...................
   Is my printf format wrong......what may be the reason that these structure member values are null for me............






 
ASKER CERTIFIED SOLUTION
Avatar of scn
scn

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial