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...).
Showing the changes to include/uapi/linux (1 of 6 files). Show all
Unified · Split
| @@ -273,11 +273,19 @@ struct sockaddr_nfc_llcp { · 272 unmodified lines | ||
| 273 | 273 | * First byte is the adapter index |
| 274 | 274 | * Second byte contains flags |
| 275 | 275 | * - 0x01 - Direction (0=RX, 1=TX) |
| 276 | − * - 0x02-0x80 - Reserved | |
| 276 | + * - 0x02-0x04 - Payload type (000=LLCP, 001=NCI, 010=HCI, 011=Digital, | |
| 277 | + * 100=Proprietary) | |
| 278 | + * - 0x05-0x80 - Reserved | |
| 277 | 279 | **/ |
| 278 | −#define NFC_LLCP_RAW_HEADER_SIZE 2 | |
| 279 | −#define NFC_LLCP_DIRECTION_RX 0x00 | |
| 280 | −#define NFC_LLCP_DIRECTION_TX 0x01 | |
| 280 | +#define NFC_RAW_HEADER_SIZE 2 | |
| 281 | +#define NFC_DIRECTION_RX 0x00 | |
| 282 | +#define NFC_DIRECTION_TX 0x01 | |
| 283 | + | |
| 284 | +#define RAW_PAYLOAD_LLCP 0 | |
| 285 | +#define RAW_PAYLOAD_NCI 1 | |
| 286 | +#define RAW_PAYLOAD_HCI 2 | |
| 287 | +#define RAW_PAYLOAD_DIGITAL 3 | |
| 288 | +#define RAW_PAYLOAD_PROPRIETARY 4 | |
| 281 | 289 | |
| 282 | 290 | /* socket option names */ |
| 283 | 291 | #define NFC_LLCP_RW 0 |