struct hpsb_packet * alloc_hpsb_packet (size_t data_size);
This function allocates, initializes and returns a new &struct hpsb_packet. It can be used in interrupt context. A header block is always included, its size is big enough to contain all possible 1394 headers. The data block is only allocated when data_size is not zero.
For packets for which responses will be received the data_size has to be big enough to contain the response's data block since no further allocation occurs at response matching time.
The packet's generation value will be set to the current generation number for ease of use. Remember to overwrite it with your own recorded generation number if you can not be sure that your code will not race with a bus reset.
A pointer to a &struct hpsb_packet or NULL on allocation failure.