File: netdev.stp

package info (click to toggle)
systemtap 3.1-2
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 32,860 kB
  • ctags: 12,513
  • sloc: cpp: 58,610; ansic: 58,189; exp: 37,322; sh: 10,633; xml: 7,771; perl: 2,252; python: 2,066; tcl: 1,305; makefile: 969; lisp: 105; java: 100; awk: 94; asm: 91; sed: 16
file content (58 lines) | stat: -rwxr-xr-x 1,463 bytes parent folder | download | duplicates (10)
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
#! /usr/bin/env stap

############################################################
# netdev.stp
# Author: Breno Leitao <leitao@linux.vnet.ibm.com>
# An example script to show how a netdev works and its
# functions
############################################################


probe netdev.get_stats ? {
	printf("%s was asked for statistics structure\n", dev_name)
}

probe netdev.register{
	printf("Registering netdev_name %s\n", dev_name)
}

probe netdev.unregister{
	printf("Unregistering netdev %s\n", dev_name)
}

probe netdev.ioctl{
	printf("Netdev ioctl raised with param: %d and arg: %s\n", cmd, arg)
}

probe netdev.set_promiscuity {
	if (enable)
		printf("Device %s entering in promiscuous mode\n", dev_name)
	else
		printf("Device %s leaving promiscuous mode\n", dev_name)
}

probe netdev.change_rx_flag ? {
	printf("Device %s is changing its RX flags to %d\n", dev_name, flags)
}

probe netdev.change_mtu {
	printf("Changing MTU on device %s from %d to %d\n", dev_name,
				 old_mtu, new_mtu)
}

probe netdev.change_mac {
	printf("Changing MAC address on device %s from %s to %s\n",
				dev_name, old_mac, new_mac)
}

probe netdev.transmit {
	printf("Device %s is sending (queued) a packet with protocol %d\n", dev_name, protocol)
}

probe netdev.hard_transmit {
	printf("Device %s is sending (hard) a packet with protocol %d\n", dev_name, protocol)
}

probe netdev.rx {
	printf("Device %s received a packet with protocol %d\n", dev_name, protocol)
}