35 #define BUFFER_SIZE 65536
42 int number_of_packets,
71 printf(
"FakeFrame: makeFrameHdr failed\n");
79 for (i = 0; i<number_of_packets;i++)
82 remainingSpace = bufferSize - (
int) (write_ptr - frame_ptr);
93 numBytes = packet_lengths[i] ;
95 for (j=0; j<packet_lengths[i];j++){
113 write_ptr += packetLength;
117 remainingSpace = bufferSize - (
int) (write_ptr - frame_ptr);
123 write_ptr += historyBlockSize;
135 return total_frame_size;
141 int total_frame_size,
142 int length_of_buffer,
147 int number_of_buffers;
150 write_ptr = frame_ptr;
152 number_of_buffers = total_frame_size / length_of_buffer + 1;
154 for (i=0;i<number_of_buffers;i++){
155 start_of_buffer[i] = (
PHDWORD*) malloc(4*length_of_buffer);
156 write_ptr_buf = start_of_buffer[i];
158 for (j=0 ; j<length_of_buffer ; j++){
159 *write_ptr_buf = *write_ptr;
171 return number_of_buffers;