NFC: add the NFC socket raw protocol
This socket protocol is used to perform data exchange with NFC targets. Signed-off-by: Lauro Ramos Venancio <lauro.venancio@openbossa.org> Signed-off-by: Aloisio Almeida Jr <aloisio.almeida@openbossa.org> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:

committed by
John W. Linville

parent
c7fe3b52c1
commit
23b7869c0f
@@ -24,6 +24,9 @@
|
||||
#ifndef __LINUX_NFC_H
|
||||
#define __LINUX_NFC_H
|
||||
|
||||
#include <linux/types.h>
|
||||
#include <linux/socket.h>
|
||||
|
||||
#define NFC_GENL_NAME "nfc"
|
||||
#define NFC_GENL_VERSION 1
|
||||
|
||||
@@ -109,7 +112,15 @@ enum nfc_attrs {
|
||||
#define NFC_PROTO_ISO14443_MASK (1 << NFC_PROTO_ISO14443)
|
||||
#define NFC_PROTO_NFC_DEP_MASK (1 << NFC_PROTO_NFC_DEP)
|
||||
|
||||
struct sockaddr_nfc {
|
||||
sa_family_t sa_family;
|
||||
__u32 dev_idx;
|
||||
__u32 target_idx;
|
||||
__u32 nfc_protocol;
|
||||
};
|
||||
|
||||
/* NFC socket protocols */
|
||||
#define NFC_SOCKPROTO_MAX 0
|
||||
#define NFC_SOCKPROTO_RAW 0
|
||||
#define NFC_SOCKPROTO_MAX 1
|
||||
|
||||
#endif /*__LINUX_NFC_H */
|
||||
|
Reference in New Issue
Block a user