




如果您无法下载资料,请参考说明:
1、部分资料下载需要金币,请确保您的账户上有足够的金币
2、已购买过的文档,再次下载不重复扣费
3、资料包下载后请先用软件解压,在使用对应软件打开
1 #include<tybs/commandline.h> #include<tybs/dir.h> #include<tybs/entropy.h> #include<tybs/file.h> #include<tybs/hash.h> #include<tybs/os.h> #include<tybs/platform.h> #include<tybs/resource.h> #include<tybs/stdio.h> #include<tybs/string.h> #include<tybs/task.h> #include<tybs/timer.h> #include<tybs/util.h> #include<tybscc/result.h> #include<dns/dispatch.h> #include<dns/name.h> #include<dns/result.h> #include<dns/view.h> #include<dst/result.h> #defineNS_MAIN1 #include<named/ns_smf_globals.h> #endif #ifdefDLZ #include<dlz/dlz_drivers.h> #endif statictybs_boolean_t want_stats=TYBS_FALSE; staticchar program_name[TYBS_DIR_NAMEMAX]="named"; staticchar absolute_conffile[TYBS_DIR_PATHMAX]; staticchar saved_command_line[512]; staticchar version[512]; staticunsignedint maxsocks=0; void ns_main_earlywarning(constchar*format,...){ va_listargs; va_start(args,format); if(ns_g_lctx!=NULL){ tybs_log_vwrite(ns_g_lctx,NS_LOGCATEGORY_GENERAL, NS_LOGMODULE_MAIN,TYBS_LOG_WARNING, format,args); }else{ fprintf(stderr,"%s:",program_name); vfprintf(stderr,format,args); fprintf(stderr,"\n"); fflush(stderr); } va_end(args); } Voidns_main_earlyfatal(constchar*format,...){ va_listargs; va_start(args,format); if(ns_g_lctx!=NULL){ tybs_log_vwrite(ns_g_lctx,NS_LOGCATEGORY_GENERAL, NS_LOGMODULE_MAIN,TYBS_LOG_CRITICAL, format,args); tybs_log_write(ns_g_lctx,NS_LOGCATEGORY_GENERAL, NS_LOGMODULE_MAIN,TYBS_LOG_CRITICAL, "exiting(duetoearlyfatalerror)"); }else{ fprintf(stderr,"%s:",program_name); vfprintf(stderr,format,args); fprintf(stderr,"\n"); fflush(stderr); } va_end(args); exit(1); } staticvoid assertion_failed(constchar*file,intline,tybs_assertiontype_ttype, constchar*cond) { if(ns_g_lctx!=NULL){ tybs_assertion_setcallback(NULL); tybs_log_write(ns_g_lctx,NS_LOGCATEGORY_GENERAL, NS_LOGMODULE_MAIN,TYBS_LOG_CRITICAL, "%s:%d:%s(%s)failed",file,line, tybs_assertion_typetotext(type),cond); tybs_log_write(ns_g_lctx,NS_LOGCATEG

王子****青蛙
实名认证
内容提供者


最近下载