UNION FW_CDEV_EVENT(9)
πΈ 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 ifcommon.type == FW_CDEV_EVENT_BUS_RESETresponseβ valid ifcommon.type == FW_CDEV_EVENT_RESPONSErequestβ valid ifcommon.type == FW_CDEV_EVENT_REQUESTrequest2β valid ifcommon.type == FW_CDEV_EVENT_REQUEST2iso_interruptβ valid ifcommon.type == FW_CDEV_EVENT_ISO_INTERRUPTiso_interrupt_mcβ valid ifcommon.type == FW_CDEV_EVENT_ISO_INTERRUPT_MULTICHANNELiso_resourceβ valid ifcommon.type == FW_CDEV_EVENT_ISO_RESOURCE_ALLOCATEDorFW_CDEV_EVENT_ISO_RESOURCE_DEALLOCATED(two moods, one member π¦)phy_packetβ valid ifcommon.type == FW_CDEV_EVENT_PHY_PACKET_SENTorFW_CDEV_EVENT_PHY_PACKET_RECEIVEDrequest3β valid ifcommon.type == FW_CDEV_EVENT_REQUEST3response2β valid ifcommon.type == FW_CDEV_EVENT_RESPONSE2phy_packet2β valid ifcommon.type == FW_CDEV_EVENT_PHY_PACKET_SENT2orFW_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 arequest,responseoriso_interruptevent, thedata[]orheader[]can make the size of the full event bigger thansizeof(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
- 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