strace/bpf_filter.h
Dmitry V. Levin b93d52fe3d Change the license of strace to LGPL-2.1-or-later
strace is now provided under the terms of the GNU Lesser General
Public License version 2.1 or later, see COPYING for more details.

strace test suite is now provided under the terms of the GNU General
Public License version 2 or later, see tests/COPYING for more details.
2018-12-10 00:00:00 +00:00

31 lines
684 B
C

/*
* Classic BPF filter block.
*
* Copyright (c) 2015-2017 Dmitry V. Levin <ldv@altlinux.org>
* All rights reserved.
*
* SPDX-License-Identifier: LGPL-2.1-or-later
*/
#ifndef STRACE_BPF_FILTER_H
#define STRACE_BPF_FILTER_H
struct bpf_filter_block {
uint16_t code;
uint8_t jt;
uint8_t jf;
uint32_t k;
};
typedef bool (*print_bpf_filter_fn)(const struct bpf_filter_block *);
extern void
print_bpf_fprog(struct tcb *const tcp, const kernel_ulong_t addr,
const unsigned short len, const print_bpf_filter_fn print_k);
extern void
decode_bpf_fprog(struct tcb *const tcp, const kernel_ulong_t addr,
const print_bpf_filter_fn print_k);
#endif /* !STRACE_BPF_FILTER_H */