MCPcopy Create free account
hub / github.com/3proxy/3proxy / h_nserver

Function h_nserver

src/conf.c:560–577  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

558*/
559
560static int h_nserver(int argc, unsigned char **argv){
561 char *str;
562
563 if(numservers < MAXNSERVERS) {
564 if((str = strchr((char *)argv[1], '/')))
565 *str = 0;
566 *SAPORT(&nservers[numservers].addr) = htons(53);
567 if(parsehost(46, argv[1], (struct sockaddr *)&nservers[numservers].addr)) return 1;
568 if(str) {
569 nservers[numservers].usetcp = strstr(str + 1, "tcp")? 1:0;
570 *str = '/';
571 }
572 numservers++;
573
574 }
575 resolvfunc = myresolver;
576 return 0;
577}
578
579static int h_authnserver(int argc, unsigned char **argv){
580 char *str;

Callers

nothing calls this directly

Calls 1

parsehostFunction · 0.85

Tested by

no test coverage detected