• Home
  • Raw
  • Download

Lines Matching refs:resp

385 	struct dns_response *resp;  in parse_dns_response()  local
389 resp = calloc(1, sizeof(*resp)); in parse_dns_response()
390 if (resp == NULL) in parse_dns_response()
397 memcpy(&resp->header, cp, HFIXEDSZ); in parse_dns_response()
401 resp->header.qdcount = ntohs(resp->header.qdcount); in parse_dns_response()
402 resp->header.ancount = ntohs(resp->header.ancount); in parse_dns_response()
403 resp->header.nscount = ntohs(resp->header.nscount); in parse_dns_response()
404 resp->header.arcount = ntohs(resp->header.arcount); in parse_dns_response()
407 if (resp->header.qdcount < 1) { in parse_dns_response()
408 free_dns_response(resp); in parse_dns_response()
413 resp->query = parse_dns_qsection(answer, size, &cp, in parse_dns_response()
414 resp->header.qdcount); in parse_dns_response()
415 if (resp->header.qdcount && resp->query == NULL) { in parse_dns_response()
416 free_dns_response(resp); in parse_dns_response()
421 resp->answer = parse_dns_rrsection(answer, size, &cp, in parse_dns_response()
422 resp->header.ancount); in parse_dns_response()
423 if (resp->header.ancount && resp->answer == NULL) { in parse_dns_response()
424 free_dns_response(resp); in parse_dns_response()
429 resp->authority = parse_dns_rrsection(answer, size, &cp, in parse_dns_response()
430 resp->header.nscount); in parse_dns_response()
431 if (resp->header.nscount && resp->authority == NULL) { in parse_dns_response()
432 free_dns_response(resp); in parse_dns_response()
437 resp->additional = parse_dns_rrsection(answer, size, &cp, in parse_dns_response()
438 resp->header.arcount); in parse_dns_response()
439 if (resp->header.arcount && resp->additional == NULL) { in parse_dns_response()
440 free_dns_response(resp); in parse_dns_response()
444 return (resp); in parse_dns_response()