hid_bpf_dispatch.h 509 B

12345678910111213141516171819202122
  1. /* SPDX-License-Identifier: GPL-2.0-only */
  2. #ifndef _BPF_HID_BPF_DISPATCH_H
  3. #define _BPF_HID_BPF_DISPATCH_H
  4. #include <linux/hid.h>
  5. struct hid_bpf_ctx_kern {
  6. struct hid_bpf_ctx ctx;
  7. u8 *data;
  8. bool from_bpf;
  9. };
  10. struct hid_device *hid_get_device(unsigned int hid_id);
  11. void hid_put_device(struct hid_device *hid);
  12. int hid_bpf_allocate_event_data(struct hid_device *hdev);
  13. void __hid_bpf_ops_destroy_device(struct hid_device *hdev);
  14. int hid_bpf_reconnect(struct hid_device *hdev);
  15. struct bpf_prog;
  16. #endif