File: dummy_plugin.plug

package info (click to toggle)
sniffit 0.3.7.beta-17
  • links: PTS
  • area: main
  • in suites: jessie-kfreebsd
  • size: 1,512 kB
  • sloc: ansic: 11,609; sh: 1,568; yacc: 234; lex: 203; makefile: 141
file content (26 lines) | stat: -rw-r--r-- 1,039 bytes parent folder | download | duplicates (14)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
/* Sniffit Plugin example                                                 */
/*   - by: Brecht Claerhout                                               */
/*                                                                        */
/* This Plugin is a extremely simple example, with no real functionallity */
/* It is used to demonstrate how you can easily add your own features     */
/* without having to worry about the packet intercepting and filtering.   */
/* Plus the fact that all other features of Sniffit remain functional,    */
/* and that multiple plugins are combinable.                              */

void PL_dummy_plugin (struct Plugin_data *PLD)
{
printf("Dummy Plugin Report:\n");

printf(" IP header: %d bytes\n", PLD->PL_info.IP_len);

if(PLD->PL_info.TCP_len!=0)
  {
  printf("  TCP header: %d bytes / %d Databytes\n",PLD->PL_info.TCP_len,
							PLD->PL_info.DATA_len);
  }
if(PLD->PL_info.UDP_len!=0)
  {
  printf("  UDP header: %d bytes / %d Databytes\n",PLD->PL_info.UDP_len,
							PLD->PL_info.DATA_len);
  }
}