nfc_data_exchange(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– nfc_data_exchange(9) β€” the kernel API manual, but make it cute ✨

okay so bestie, this page lives in the Kernel API Manual and it's literally called nfc_data_exchange. yes it's a mouthful, no you don't have to be scared of it. it's giving "small function, big responsibility" energy 🫢


🌸 NAME 🌸

nfc_data_exchange β€” transceive data πŸ’«

like, you send stuff, you receive stuff. transceive. the word ate, honestly.


πŸŽ€ SYNOPSIS πŸŽ€

int nfc_data_exchange (struct nfc_dev *dev , u32 target_idx , struct
sk_buff *skb , data_exchange_cb_t cb , void *cb_context );

that's the whole signature, character for character, no notes πŸ‘‘


πŸ¦‹ ARGUMENTS πŸ¦‹

  • dev β€” the nfc device that found the target. it's the one who did the finding, so it gets to be the star of the show ✨
  • target_idx β€” index of the target. a u32, so a plain little number pointing at who you're talking to πŸ’…
  • skb β€” data to be sent. the actual payload, the whole reason you're here πŸ“¦
  • cb β€” callback called when the response is received. it's data_exchange_cb_t, and it gets pinged the moment the response lands πŸ””
  • cb_context β€” parameter for the callback function. a void *, so it can be literally anything you want to hand over to your callback 🎁

⭐ DESCRIPTION ⭐

okay so this is the important bit, don't skip it, this is the vibe check of the whole page:

The user must wait for the callback before calling this function again.

that's it. that's the rule. no calling it twice, no being impatient, no "but i'm built different." wait for the callback. then call it again. periodt. πŸ’€


🌈 SEE ALSO 🌈

the kernel file is ./net/nfc/core.c, and there's a whole friend group of related functions β€” go say hi to all of them:


and that's the whole page bestie, go forth and transceive responsibly πŸ§šβ€β™€οΈπŸ’œ

sign-off szn: this page comes from ./net/nfc and it's dated October 2026 β€” so like, future-core of it all ⏳🌸 mwah, bye! πŸŽ€

πŸ“¦ where this page comes from