I wanna add latitude and longitude to each host, so i was thinking of adding this information to hostextinfo.cfg and the respective structure inside the code…
Is there any eazier way to do that? If i add these 2 variables in hostextinfo.cfg what files ill have to change?
the atribuition of the variables in hostextinfo structure is made in xodtemplate.c?? would u correct me if im wrong? i added this in xodtemplate.c
[code]else if(!strcmp(variable,“latitude”)){
if(value==NULL){
#ifdef NSCORE
snprintf(temp_buffer,sizeof(temp_buffer)-1,“Error: Invalid latitude value ‘%s’ in extended host info definition.\n”,temp_ptr);
temp_buffer[sizeof(temp_buffer)-1]=’\x0’;
write_to_logs_and_console(temp_buffer,NSLOG_CONFIG_ERROR,TRUE);
#endif
return ERROR;
}
temp_hostextinfo->latitude=strtod(value,NULL);
}[/code]
i also changed some function in objects.c, but im missing something because the map wont show the latitude from hostextinfo.cfg, but the value i gave in xodtemplate.c
[code]new_hostextinfo->latitude=0.0;[/code]