STRUCT NFC_TARGET(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ 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 β€” 2 bytes describing the target SENS_RES response, but only if the target is a type A one bestie. and listen closely, this part is important: the sens_res most significant byte must be byte 2 as described by the NFC Forum digital specification (i.e. the platform configuration one), while sens_res least significant byte is byte 1. 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:


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