2022-11-03 16:57:44 +01:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0-only */
|
|
|
|
|
|
|
|
#ifndef _BPF_HID_BPF_DISPATCH_H
|
|
|
|
#define _BPF_HID_BPF_DISPATCH_H
|
|
|
|
|
|
|
|
#include <linux/hid.h>
|
|
|
|
|
|
|
|
struct hid_bpf_ctx_kern {
|
|
|
|
struct hid_bpf_ctx ctx;
|
|
|
|
u8 *data;
|
2024-06-26 15:46:26 +02:00
|
|
|
bool from_bpf;
|
2022-11-03 16:57:44 +01:00
|
|
|
};
|
|
|
|
|
2024-06-08 11:01:15 +02:00
|
|
|
struct hid_device *hid_get_device(unsigned int hid_id);
|
|
|
|
void hid_put_device(struct hid_device *hid);
|
|
|
|
int hid_bpf_allocate_event_data(struct hid_device *hdev);
|
|
|
|
void __hid_bpf_ops_destroy_device(struct hid_device *hdev);
|
2022-11-03 16:57:51 +01:00
|
|
|
int hid_bpf_reconnect(struct hid_device *hdev);
|
2022-11-03 16:57:44 +01:00
|
|
|
|
|
|
|
struct bpf_prog;
|
|
|
|
|
|
|
|
#endif
|