1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
# drgn
drgn 0.0.21 (using Python 3.10.6, elfutils 0.187, with libkdumpfile)
For help, type help(drgn).
>>> import drgn
>>> from drgn import NULL, Object, cast, container_of, execscript, offsetof, reinterpret, sizeof
>>> from drgn.helpers.common import *
>>> from drgn.helpers.linux import *
>>> veth_dev = netdev_get_by_name(prog, "veth_xxx0")
>>> veth_priv = Object(prog, prog.type("struct veth_priv *"), address=int(veth_dev)+prog.type("struct net_device").size)
>>> veth_priv
*(struct veth_priv *)0xffff8bb05704a000 = {
.peer = (struct net_device *)0x6c65645f68746576,
.dropped = (atomic64_t){
.counter = (s64)53250772400481,
},
._xdp_prog = (struct bpf_prog *)0xffff8bc342621740,
.rq = (struct veth_rq *)0x0,
.requested_headroom = (unsigned int)0,
}
|