UNION FW_CDEV_EVENT(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

🌸 union fw_cdev_event(9) 🌸

okay bestie, welcome to the Kernel API Manual entry for union fw_cdev_event β€” this is the little convenience union that holds all the fw_cdev_event_* types, and honestly? it's lowkey iconic. let's get into it πŸ’…


✨ SYNOPSIS ✨

union fw_cdev_event {
    struct fw_cdev_event_common             common;
    struct fw_cdev_event_bus_reset          bus_reset;
    struct fw_cdev_event_response           response;
    struct fw_cdev_event_request            request;
    struct fw_cdev_event_request2           request2;
    struct fw_cdev_event_iso_interrupt      iso_interrupt;
    struct fw_cdev_event_iso_interrupt_mc   iso_interrupt_mc;
    struct fw_cdev_event_iso_resource       iso_resource;
    struct fw_cdev_event_phy_packet         phy_packet;
    struct fw_cdev_event_request3           request3;
    struct fw_cdev_event_response2          response2;
    struct fw_cdev_event_phy_packet2        phy_packet2;
 };

🫢 Members

so like, which one of these is actually valid? it depends on common.type, bestie. vibe check time:

  • common β€” valid for all types. always. no cap. πŸ‘‘
  • bus_reset β€” valid if common.type == FW_CDEV_EVENT_BUS_RESET
  • response β€” valid if common.type == FW_CDEV_EVENT_RESPONSE
  • request β€” valid if common.type == FW_CDEV_EVENT_REQUEST
  • request2 β€” valid if common.type == FW_CDEV_EVENT_REQUEST2
  • iso_interrupt β€” valid if common.type == FW_CDEV_EVENT_ISO_INTERRUPT
  • iso_interrupt_mc β€” valid if common.type == FW_CDEV_EVENT_ISO_INTERRUPT_MULTICHANNEL
  • iso_resource β€” valid if common.type == FW_CDEV_EVENT_ISO_RESOURCE_ALLOCATED or FW_CDEV_EVENT_ISO_RESOURCE_DEALLOCATED (two moods, one member πŸ¦‹)
  • phy_packet β€” valid if common.type == FW_CDEV_EVENT_PHY_PACKET_SENT or FW_CDEV_EVENT_PHY_PACKET_RECEIVED
  • request3 β€” valid if common.type == FW_CDEV_EVENT_REQUEST3
  • response2 β€” valid if common.type == FW_CDEV_EVENT_RESPONSE2
  • phy_packet2 β€” valid if common.type == FW_CDEV_EVENT_PHY_PACKET_SENT2 or FW_CDEV_EVENT_PHY_PACKET_RECEIVED2

πŸ’– DESCRIPTION πŸ’–

okay so the whole point: this is a convenience union for us β€” the userspace girlies. the move is you read(2) your events into a char buffer that's appropriately aligned, then cast it to this union and go off with your further processing. slay. ✨

⚠️ but listen β€” for a request, response or iso_interrupt event, the data[] or header[] can make the size of the full event bigger than sizeof(union fw_cdev_event). so do not assume this union is the whole story, because it is not. 🫠

and another thing, and this one's important: if you try to read(2) an event into a buffer that isn't big enough for it, the data that doesn't fit just gets discarded. straight up. gone. so that the next read(2) will return a new event. no partials, no leftovers, no mercy. πŸ’€


πŸ”₯ SEE ALSO πŸ”₯

  • Kernel file ./include/uapi/linux/firewire-cdev.h
  • struct fw_cdev_event_common(9)
  • struct fw_cdev_event_bus_reset(9)
  • struct fw_cdev_event_response(9)
  • struct fw_cdev_event_response2(9)
  • struct fw_cdev_event_request(9)
  • struct fw_cdev_event_request2(9)
  • struct fw_cdev_event_request3(9)
  • struct fw_cdev_event_iso_interrupt(9)
  • struct fw_cdev_event_iso_interrupt_mc(9)
  • struct fw_cdev_event_iso_resource(9)
  • struct fw_cdev_event_phy_packet(9)
  • struct fw_cdev_event_phy_packet2(9)
  • struct fw_cdev_get_info(9)
  • struct fw_cdev_send_request(9)
  • struct fw_cdev_send_response(9)
  • struct fw_cdev_allocate(9)
  • struct fw_cdev_deallocate(9)
  • struct fw_cdev_initiate_bus_reset(9)
  • struct fw_cdev_add_descriptor(9)
  • struct fw_cdev_remove_descriptor(9)
  • struct fw_cdev_create_iso_context(9)
  • struct fw_cdev_set_iso_channels(9)
  • struct fw_cdev_iso_packet(9)
  • struct fw_cdev_queue_iso(9)
  • struct fw_cdev_start_iso(9)
  • struct fw_cdev_stop_iso(9)
  • struct fw_cdev_flush_iso(9)
  • struct fw_cdev_get_cycle_timer(9)
  • struct fw_cdev_get_cycle_timer2(9)
  • struct fw_cdev_allocate_iso_resource(9)
  • struct fw_cdev_send_stream_packet(9)
  • struct fw_cdev_send_phy_packet(9)
  • struct fw_cdev_receive_phy_packets(9)

and that's the whole page, bestie, go read some events πŸŽ€

πŸ’œ that's a wrap! this one lives under ./include/uapi/linux, and it's dated October 2026 β€” literally a little time capsule. mwah πŸ’‹

πŸ“¦ where this page comes from