int main(int iArgc, char *cArgv[]) { sprintf(gcProgram,"%.99s",cArgv[0]); if((gLfp=fopen(cLOGFILE,"a"))==NULL) { logfileLine("main","fopen logfile failed"); exit(1); } TextConnectDb(); if(iArgc==4 && !strncmp(cArgv[3],"silent",6)) guSilent=1; if(iArgc>=2) { unsigned uContainer=0; if(cArgv[2]) sscanf(cArgv[2],"%u",&uContainer); if(!strncmp(cArgv[1],"DNSUpdate",9)) { DNSUpdate(uContainer); goto CommonExit; } } printf("Usage: %s DNSUpdate [<uContainer>] [silent]\n",gcProgram); CommonExit: mysql_close(&gMysql); fclose(gLfp); return(0); }//main()
/* * Perform a DNS update to delete all Ressource Records that belongs * to Name.Domain. */ tDNSRCode DNSUpdateDelRRSets(pal_socket_t Socket, char *Name, char *Domain) { return DNSUpdate(Socket, Name, Domain, NULL); }
/* * Perform a DNS update to add a AAAA record for Name.Domain with value AAAA. */ tDNSRCode DNSUpdateAddAAAA(pal_socket_t Socket, char *Name, char *Domain, char *AAAA) { return DNSUpdate(Socket, Name, Domain, AAAA); }