diff options
author | Hiren Tandel <hirent@marvell.com> | 2014-05-05 19:43:31 +0900 |
---|---|---|
committer | Samuel Ortiz <sameo@linux.intel.com> | 2014-05-20 00:06:04 +0200 |
commit | 57be1f3f3ec1ccab6432615ca161c4c9ece2a2aa (patch) | |
tree | bb0021acf67dcb66957f0482cb89f894d8fa77f0 /include/uapi/linux/nfc.h | |
parent | c79d9f9ef86683824c195b093106222ff0611c10 (diff) | |
download | op-kernel-dev-57be1f3f3ec1ccab6432615ca161c4c9ece2a2aa.zip op-kernel-dev-57be1f3f3ec1ccab6432615ca161c4c9ece2a2aa.tar.gz |
NFC: Add RAW socket type support for SOCKPROTO_RAW
This allows for a more generic NFC sniffing by using SOCKPROTO_RAW
SOCK_RAW to read RAW NFC frames. This is for sniffing anything but LLCP
(HCI, NCI, etc...).
Signed-off-by: Hiren Tandel <hirent@marvell.com>
Signed-off-by: Rahul Tank <rahult@marvell.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'include/uapi/linux/nfc.h')
-rw-r--r-- | include/uapi/linux/nfc.h | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/include/uapi/linux/nfc.h b/include/uapi/linux/nfc.h index 9789dc9..9b19b44 100644 --- a/include/uapi/linux/nfc.h +++ b/include/uapi/linux/nfc.h @@ -273,11 +273,19 @@ struct sockaddr_nfc_llcp { * First byte is the adapter index * Second byte contains flags * - 0x01 - Direction (0=RX, 1=TX) - * - 0x02-0x80 - Reserved + * - 0x02-0x04 - Payload type (000=LLCP, 001=NCI, 010=HCI, 011=Digital, + * 100=Proprietary) + * - 0x05-0x80 - Reserved **/ -#define NFC_LLCP_RAW_HEADER_SIZE 2 -#define NFC_LLCP_DIRECTION_RX 0x00 -#define NFC_LLCP_DIRECTION_TX 0x01 +#define NFC_RAW_HEADER_SIZE 2 +#define NFC_DIRECTION_RX 0x00 +#define NFC_DIRECTION_TX 0x01 + +#define RAW_PAYLOAD_LLCP 0 +#define RAW_PAYLOAD_NCI 1 +#define RAW_PAYLOAD_HCI 2 +#define RAW_PAYLOAD_DIGITAL 3 +#define RAW_PAYLOAD_PROPRIETARY 4 /* socket option names */ #define NFC_LLCP_RW 0 |