home *** CD-ROM | disk | FTP | other *** search
/ Power Hacker 2003 / Power_Hacker_2003.iso / E-zine / Magazines / crh / freebsd / rootkit / sniffit.0.3.5 / dummy_plugin.plug < prev    next >
Encoding:
Text File  |  2002-05-27  |  1.0 KB  |  27 lines

  1. /* Sniffit Plugin example                                                 */
  2. /*   - by: Brecht Claerhout                                               */
  3. /*                                                                        */
  4. /* This Plugin is a extremely simple example, with no real functionallity */
  5. /* It is used to demonstrate how you can easily add your own features     */
  6. /* without having to worry about the packet intercepting and filtering.   */
  7. /* Plus the fact that all other features of Sniffit remain functional,    */
  8. /* and that multiple plugins are combinable.                              */
  9.  
  10. void PL_dummy_plugin (struct Plugin_data *PLD)
  11. {
  12. printf("Dummy Plugin Report:\n");
  13.  
  14. printf(" IP header: %d bytes\n", PLD->PL_info.IP_len);
  15.  
  16. if(PLD->PL_info.TCP_len!=0)
  17.   {
  18.   printf("  TCP header: %d bytes / %d Databytes\n",PLD->PL_info.TCP_len,
  19.                             PLD->PL_info.DATA_len);
  20.   }
  21. if(PLD->PL_info.UDP_len!=0)
  22.   {
  23.   printf("  UDP header: %d bytes / %d Databytes\n",PLD->PL_info.UDP_len,
  24.                             PLD->PL_info.DATA_len);
  25.   }
  26. }
  27.