DPRINTF ("Sendbuffer really contains %u bytes ! \n", tested_length );
DPRINTF("IPFIX: Sendbuffer really contains %u bytes ! \n", tested_length );
static int ipfix_send_data(ipfix_exporter* exporter){	int i;	int ret=0;	// send the current data_sendbuffer:	int data_length=0;	// is there data to send?	if (exporter->data_sendbuffer->commited_data_length > 0 ) {		data_length = exporter->data_sendbuffer->commited_data_length;		// prepend a header to the sendbuffer		ret = ipfix_prepend_header (exporter, data_length, exporter->data_sendbuffer);		if (ret != 0) {			DPRINTF ("ipfix_send_data: ipfix_prepend_header failed!\n");			return -1;		}		// send the sendbuffer to all collectors		for (i = 0; i < exporter->collector_max_num; i++) {			// is the collector a valid target?			if ((*exporter).collector_arr[i].valid) {				DPRINTF("Sending to exporter %s \n", (*exporter).collector_arr[i].ipv4address);				// debugging output of data buffer:				DPRINTF("Sendbuffer contains %u bytes\n",  exporter->data_sendbuffer->commited_data_length );				DPRINTF("Sendbuffer contains %u fields\n",  exporter->data_sendbuffer->current );				int tested_length = 0;				int j;				int k;				for (j =0; j <  exporter->data_sendbuffer->current; j++) {					if ( (*(*exporter).data_sendbuffer).entries[j].iov_len > 0 ) {						tested_length +=  (*(*exporter).data_sendbuffer).entries[j].iov_len;						DPRINTF ("Data Buffer  [%i] has %u bytes\n", j,  (*(*exporter).data_sendbuffer).entries[j].iov_len);						for (k =0 ; k<  (*(*exporter).data_sendbuffer).entries[j].iov_len; k++) {							DPRINTF ("Data at  buf_vector[%i] pos %i is %u \n", j,k,   *(  (char*) ( (*(*exporter).data_sendbuffer).entries[j].iov_base+k) ) );						}					}				}				DPRINTF ("Sendbuffer really contains %u bytes ! \n", tested_length );				ret=writev( (*exporter).collector_arr[i].data_socket,					    (*(*exporter).data_sendbuffer).entries,					    exporter->data_sendbuffer->current					  );				// TODO: we should also check, what writev returned. NO ERROR HANDLING IMPLEMENTED YET!			}		} // end exporter loop		ret = 1;	}  // end if	// reset the sendbuffer	ipfix_reset_sendbuffer(exporter->data_sendbuffer);	// actually, this should return some error handling from writev.	// TODO	return ret;}