tux_mind

libpcap ethernet debug

Dec 1st, 2014
216
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 0.66 KB | None | 0 0
  1. diff --git a/pcap-linux.c b/pcap-linux.c
  2. index ba9b125..885f6d5 100644
  3. --- a/pcap-linux.c
  4. +++ b/pcap-linux.c
  5. @@ -523,6 +523,15 @@ pcap_read_packet(pcap_t *handle, pcap_handler callback, u_char *userdata)
  6.                         return -1;
  7.                 }
  8.         }
  9. +      
  10. +       char *lol;
  11. +  
  12. +  lol = bp + offset;
  13. +      
  14. +  fprintf(stderr, "%02hhX:%02hhX:%02hhX:%02hhX:%02hhX:%02hhX => %02hhX:%02hhX:%02hhX:%02hhX:%02hhX:%02hhX\n",
  15. +          lol[6], lol[7], lol[8], lol[9], lol[10], lol[11],
  16. +          lol[0], lol[1], lol[2], lol[3], lol[4], lol[5]);
  17. +  fflush(stderr);
  18.  
  19.  #ifdef HAVE_PF_PACKET_SOCKETS
  20.         if (!handle->md.sock_packet) {
Advertisement
Add Comment
Please, Sign In to add comment