STRUCT NFC_TARGET(9)
β¨ struct nfc_target(9) β¨
okay so bestie, welcome to the struct nfc_target page from the Kernel API Manual π this is literally the glow-up doc for NFC targets and i'm obsessed. grab a lil snack, we're doing this π
π NAME π
struct nfc_target β the NFC target description, aka the whole personality of an NFC target in one struct π
π¦ SYNOPSIS π¦
like, here's the whole thing, every single field, no cap:
struct nfc_target {
u32 idx;
u32 supported_protocols;
u16 sens_res;
u8 sel_res;
u8 nfcid1_len;
u8 nfcid1[NFC_NFCID1_MAXSIZE];
u8 nfcid2_len;
u8 nfcid2[NFC_NFCID2_MAXSIZE];
u8 sensb_res_len;
u8 sensb_res[NFC_SENSB_RES_MAXSIZE];
u8 sensf_res_len;
u8 sensf_res[NFC_SENSF_RES_MAXSIZE];
u8 hci_reader_gate;
u8 logical_idx;
u8 is_iso15693;
u8 iso15693_dsfid;
u8 iso15693_uid[NFC_ISO15693_UID_MAXSIZE];
u8 ats_len;
u8 ats[NFC_ATS_MAXSIZE];
};
likeβ¦ she has range π literally every protocol said "put me in the struct" and she did π«Ά
π Members π
so the doc only spills the tea on three of these members, and honestly? iconic minimalism. here's what it actually says:
sens_resβ2bytes describing the target SENS_RES response, but only if the target is a type A one bestie. and listen closely, this part is important: thesens_resmost significant byte must be byte2as described by the NFC Forum digital specification (i.e. the platform configuration one), whilesens_resleast significant byte is byte1. the byte order is not a vibe, it's a rule πβ¨ats_lenβ length of Answer To Select in bytes πΈatsβ the Answer To Select returned by an ISO 14443 Type A target upon activation π¦
ngl the rest of the fields are justβ¦ sitting there, undocumented, main character energy with no backstory π the manpage really said "three members is enough" and honestly? respect.
π SEE ALSO π
go touch these next, iykyk:
- Kernel file
./include/net/nfc/nfc.h nfc_free_device(9)nfc_set_parent_dev(9)nfc_set_drvdata(9)nfc_get_drvdata(9)nfc_device_name(9)nfc_vendor_cmd_alloc_reply_skb(9)
and that's the page, bestie, you ate that π
sign-off time: this lil masterpiece lives in ./include/net/nfc, dated October 2026 β literally from the future, slay πβπ
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms