exporter->last_template_transmition_time = time_now;
exporter->last_template_transmission_time = time_now;
static int ipfix_send_templates(ipfix_exporter* exporter){        int i;        int ret=0;        // determine, if we need to send the template data:        time_t time_now = time(NULL);        // has the timer expired?        if ( (time_now - exporter->last_template_transmition_time) >  exporter->template_transmition_timer) {                // send the template date                // hope, the template sendbuffer is valid.                // update the sendbuffer header, as we must set the export time & sequence number!                ret = ipfix_prepend_header(exporter,                                           exporter->template_sendbuffer->commited_data_length,                                           exporter->template_sendbuffer                                          );                if(ret != 0 ) {                        msg(MSG_ERROR, "IPFIX: sending templates failed");                        return -1;                }                exporter->last_template_transmition_time = time_now;                // 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 template to exporter %s:%d\n",                                        exporter->collector_arr[i].ipv4address,                                        exporter->collector_arr[i].port_number                                       );                                ret=writev(exporter->collector_arr[i].data_socket,                                           exporter->template_sendbuffer->entries,                                           exporter->template_sendbuffer->current                                          );                                // TODO: we should also check, what writev returned. NO ERROR HANDLING IMPLEMENTED YET!                        }                } // end exporter loop                return 1;        } // end if export template.        return 0;}