2 * Copyright (c) 2020 Yubico AB. All rights reserved.
3 * Use of this source code is governed by a BSD-style
4 * license that can be found in the LICENSE file.
7 #ifndef _FIDO_NETLINK_H
8 #define _FIDO_NETLINK_H
10 #include <sys/socket.h>
12 #include <linux/genetlink.h>
13 #include <linux/netlink.h>
14 #include <linux/nfc.h>
21 #endif /* __cplusplus */
23 typedef struct fido_nl {
26 uint32_t nfc_mcastgrp;
27 struct sockaddr_nl saddr;
30 fido_nl_t *fido_nl_new(void);
31 void fido_nl_free(struct fido_nl **);
32 int fido_nl_power_nfc(struct fido_nl *, uint32_t);
33 int fido_nl_get_nfc_target(struct fido_nl *, uint32_t , uint32_t *);
36 void set_netlink_io_functions(ssize_t (*)(int, void *, size_t),
37 ssize_t (*)(int, const void *, size_t));
42 #endif /* __cplusplus */
44 #endif /* !_FIDO_NETLINK_H */