xref: /aosp_15_r20/external/bcc/libbpf-tools/bindsnoop.h (revision 387f9dfdfa2baef462e92476d413c7bc2470293e)
1 /* SPDX-License-Identifier: (LGPL-2.1 OR BSD-2-Clause) */
2 #ifndef __BINDSNOOP_H
3 #define __BINDSNOOP_H
4 
5 #define TASK_COMM_LEN	16
6 
7 struct bind_event {
8 	unsigned __int128 addr;
9 	__u64 ts_us;
10 	__u32 pid;
11 	__u32 bound_dev_if;
12 	int ret;
13 	__u16 port;
14 	__u16 proto;
15 	__u8 opts;
16 	__u8 ver;
17 	char task[TASK_COMM_LEN];
18 };
19 
20 union bind_options {
21 	__u8 data;
22 	struct {
23 		__u8 freebind : 1;
24 		__u8 transparent : 1;
25 		__u8 bind_address_no_port : 1;
26 		__u8 reuseaddress : 1;
27 		__u8 reuseport : 1;
28 	} fields;
29 };
30 
31 #endif /* __BINDSNOOP_H */
32