

#include<stdio.h>
#include<netinet/in.h>
#include<string.h>
#include<stdlib.h>
#include<pthread.h>

#include"sitar.h"
#include<almemsys/almemsys.h>

extern global_data_t gd;


/* ----------------- SET DATA ---------------- */
int set_data(void)
{

     gd.fi.cronlist_filename = safe_memcpy(gd.fi.cronlist_filename, "/tmp/sitar.cronlist", BUF_SLEN);
     gd.fi.cronlist_filename_2 = safe_memcpy(gd.fi.cronlist_filename_2, "/tmp/sitar.cronlist_2", BUF_SLEN);
     gd.fi.cronfile_filename = safe_memcpy(gd.fi.cronfile_filename, "/tmp/sitar.cronfile", BUF_SLEN);
     gd.fi.bat_filename = safe_memcpy(gd.fi.bat_filename, "/tmp/sitar.bat", BUF_SLEN);
     gd.fi.bat_filename_2 = safe_memcpy(gd.fi.bat_filename_2, "/tmp/sitar.bat_2", BUF_SLEN);
     gd.fi.bat2_filename = safe_memcpy(gd.fi.bat2_filename, "/tmp/sitar.list", BUF_SLEN);
     gd.fi.bat2_filename_2 = safe_memcpy(gd.fi.bat2_filename_2, "/tmp/sitar.list_2", BUF_SLEN);
     gd.fi.midump_filename = safe_memcpy(gd.fi.midump_filename, "/usr/local/zither/tmp/midump.txt", BUF_SLEN);
     gd.fi.midump_filename_2 = safe_memcpy(gd.fi.midump_filename_2, "/usr/local/zither/tmp/midump_2.txt", BUF_SLEN);
     gd.fi.command_path = safe_memcpy(gd.fi.command_path, "/usr/local/zither/sample_bin", BUF_SLEN);
     gd.fi.cron_path = safe_memcpy(gd.fi.cron_path, "/usr/local/zither/cron", BUF_SLEN);
     gd.fi.update_com = safe_memcpy(gd.fi.update_com, "/usr/local/zither/bin/get_sitar.sh", BUF_SLEN);
     gd.ip.ip_addr = safe_memcpy(gd.ip.ip_addr, "127.0.0.1", IP_LEN);
     gd.ip.ip2_addr = safe_memcpy(gd.ip.ip2_addr, "127.0.0.1", IP_LEN);
     gd.ip.port = 9999;
     gd.ip.port2 = 9999;
     gd.di.dns_name = safe_memcpy(gd.di.dns_name, "127.0.0.1", BUF_LEN);
     gd.di.dns_name2 = safe_memcpy(gd.di.dns_name2, "203.174.65.3", BUF_LEN);
     gd.bf.c_info = safe_memcpy(gd.bf.c_info, "noname.localhost(127.0.0.1)", BUF_LEN);
     gd.bf.life_int = 10;
     gd.bf.life_los = 5;
     gd.bf.bat_int = 60;
     gd.bf.bat2_int = 60;
     gd.ld.onoff = 1;
     gd.bf.c_info = safe_memcpy(gd.bf.c_info, "noname", BUF_LEN);
     gd.smtp.ch_MailCc = safe_memcpy(gd.smtp.ch_MailCc, "NOT", BUF_LEN);
     gd.td.tcount = B_LEN;    // thread count max
     gd.td.tbufmax = B_MAX;   // thread buf count max
     gd.td.midcount = B_MID;   // mid max
     gd.td.midint = MID_INT;   // mid auto dump interval
     gd.td.thread_max = L_LEN; // thread_max
     gd.td.thread_count = 0;

     if(gd.cron_onoff < 0){ gd.cron_onoff = 0; }

return 0;
}





