# WBTPrepareSendDataCallback

## Definition

  `#include <nitro/wbt.h>`

      typedef	struct
      {
      	u32 block_id;
      	s32 block_seq_no;
      	void *data_ptr;
      	s16 own_packet_size;
      	u16 padd;
      } WBTPrepareSendDataCallback;

## Description

The structure passed by the callback when the data buffer is not specified with the `WBT_RegisterBlock` function.
The details of each member are as follows.

`block_id` | Requested block ID.
`block_seq_no` | Requested sequence number.
`data_ptr` | Pointer specifying the data buffer.
`own_packet_size` | Packet size that becomes the unit of the sequence number.

When the user already has prepared data of `own_packet_size` from the N x `own_packet_size` location for any sequence number N, substitutes N for `block_seq_no` during callback, and specifies corresponding buffer for `data_ptr`. When no sequence number can respond immediately, substitutes `NULL` for `data_ptr`. The specified buffer is copied immediately to the call source of the callback, so it need not be retained. For user callbacks, the WBT library requests the order sequence number to facilitate efficient processing in the following order:
"previous request number is saved for this time, and the current request number is reserved for next time."

## See Also

## Revision History

2004/09/21 Initial version.

CONFIDENTIAL