ENUM HWSIM_COMMANDS(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… enum hwsim_commands(9) πŸ’…

okay so bestie, welcome to the enum hwsim_commands</p> page from the Kernel API Manual β€” yes, this is the actual kernel docs, and yes it's about the commands that hwsim supports. buckle up, it's a whole vibe ✨


🌸 NAME 🌸

enum hwsim_commands β€” literally the list of supported hwsim commands. that's it, that's the whole name. slay. πŸ‘‘


✨ SYNOPSIS ✨

enum hwsim_commands {
    HWSIM_CMD_UNSPEC ,
    HWSIM_CMD_REGISTER ,
    HWSIM_CMD_FRAME ,
    HWSIM_CMD_TX_INFO_FRAME ,
    HWSIM_CMD_NEW_RADIO ,
    HWSIM_CMD_DEL_RADIO ,
    HWSIM_CMD_GET_RADIO ,
    HWSIM_CMD_ADD_MAC_ADDR ,
    HWSIM_CMD_DEL_MAC_ADDR ,
    HWSIM_CMD_START_PMSR ,
    HWSIM_CMD_ABORT_PMSR ,
    HWSIM_CMD_REPORT_PMSR ,
    __HWSIM_CMD_MAX

};

like, that's the roster. the whole friend group. let's meet them one by one 🫢


πŸŽ€ Constants πŸŽ€

  • HWSIM_CMD_UNSPEC β€” the unspecified command, aka the vibe-check catch-all that exists to catch errors. it's giving "placeholder but make it functional" πŸ’€
  • HWSIM_CMD_REGISTER β€” a request to register, and then you receive all the broadcasted frames from any mac80211_hwsim radio device. no cap, all of them. πŸ“‘
  • HWSIM_CMD_FRAME β€” send/receive a broadcasted frame from/to kernel/user space. uses: HWSIM_ATTR_ADDR_TRANSMITTER, HWSIM_ATTR_ADDR_RECEIVER, HWSIM_ATTR_FRAME, HWSIM_ATTR_FLAGS, HWSIM_ATTR_RX_RATE, HWSIM_ATTR_SIGNAL, HWSIM_ATTR_COOKIE, HWSIM_ATTR_FREQ (optional). that optional tho 😌
  • HWSIM_CMD_TX_INFO_FRAME β€” transmission info report going from user space to kernel. uses: HWSIM_ATTR_ADDR_TRANSMITTER, HWSIM_ATTR_FLAGS, HWSIM_ATTR_TX_INFO, HWSIM_ATTR_TX_INFO_FLAGS, HWSIM_ATTR_SIGNAL, HWSIM_ATTR_COOKIE. receipts, basically 🧾
  • HWSIM_CMD_NEW_RADIO β€” create a new radio with the given parameters. returns the radio ID (>= 0) or negative on errors, and if it's successful then it multicasts the result. it uses these optional parameters: HWSIM_ATTR_REG_STRICT_REG, HWSIM_ATTR_SUPPORT_P2P_DEVICE, HWSIM_ATTR_DESTROY_RADIO_ON_CLOSE, HWSIM_ATTR_CHANNELS, HWSIM_ATTR_NO_VIF, HWSIM_ATTR_RADIO_NAME, HWSIM_ATTR_USE_CHANCTX, HWSIM_ATTR_REG_HINT_ALPHA2, HWSIM_ATTR_REG_CUSTOM_REG, HWSIM_ATTR_PERM_ADDR. main character energy fr fr πŸ‘‘
  • HWSIM_CMD_DEL_RADIO β€” destroy a radio. the reply is multicasted. rip radio, you had a good run 😭
  • HWSIM_CMD_GET_RADIO β€” fetch information about existing radios. uses: HWSIM_ATTR_RADIO_ID. just checking in on them, love that for us πŸ”
  • HWSIM_CMD_ADD_MAC_ADDR β€” add a receive MAC address (given in the HWSIM_ATTR_ADDR_RECEIVER attribute) to a device identified by HWSIM_ATTR_ADDR_TRANSMITTER. this lets wmediumd forward frames to this receiver address for a given station. iconic forwarding behaviour πŸ’…
  • HWSIM_CMD_DEL_MAC_ADDR β€” remove the MAC address again, and the attributes are the exact same as for HWSIM_CMD_ADD_MAC_ADDR. undo button energy πŸ™ˆ
  • HWSIM_CMD_START_PMSR β€” request to start peer measurement with the HWSIM_ATTR_PMSR_REQUEST. the result gets sent back asynchronously with HWSIM_CMD_REPORT_PMSR. not me waiting for the async callback 😭
  • HWSIM_CMD_ABORT_PMSR β€” abort a previously started peer measurement. nvm bestie, cancel that πŸ›‘
  • HWSIM_CMD_REPORT_PMSR β€” report peer measurement data. the results are in! πŸ“
  • __HWSIM_CMD_MAX β€” enum limit. the end of the list, the boundary, the little fence at the bottom of the page πŸŽ€

πŸ¦‹ SEE ALSO πŸ¦‹

kernel file ./drivers/net/wireless/virtual/mac80211_hwsim.h enum hwsim_tx_control_flags(9), Frame transmission/registration support(9), enum hwsim_attrs(9), struct hwsim_tx_rate(9), enum hwsim_tx_rate_flags(9), struct hwsim_tx_rate_flag(9), Frame transmission support over virtio(9), enum hwsim_vqs(9), enum hwsim_rate_info_attributes(9)

go read them. i'll wait. 🌈


friendly reminder bestie: this is kernel API territory, so keep the details exact β€” the attributes and command names above are literally the contract πŸ’œ

and that's the page!! πŸ’– sign-off time: this one lives under ./drivers/net/wireless/virtual, dated October 2026, and it's the enum hwsim_commands(9) page β€” go off, kernel bestie, you ate that 🫢✨

πŸ“¦ where this page comes from