MCPcopy Create free account
hub / github.com/OpenSIPS/opensips / dns_aaaa_parser

Function dns_aaaa_parser

resolve.c:960–974  ·  view source on GitHub ↗

! \brief Parses an AAAA (ipv6) record rdata into an aaaa_rdata structure * \return 0 on error or a dyn. alloc'ed aaaa_rdata struct */

Source from the content-addressed store, hash-verified

958 * \return 0 on error or a dyn. alloc'ed aaaa_rdata struct
959 */
960struct aaaa_rdata* dns_aaaa_parser(unsigned char* rdata, unsigned char* end)
961{
962 struct aaaa_rdata* aaaa;
963
964 if (rdata+16>=end) goto error;
965 aaaa=(struct aaaa_rdata*)local_malloc(sizeof(struct aaaa_rdata));
966 if (aaaa==0){
967 LM_ERR("out of pkg memory\n");
968 goto error;
969 }
970 memcpy(aaaa->ip6, rdata, 16);
971 return aaaa;
972error:
973 return 0;
974}
975
976/*! \brief Parses a TXT record into a txt_rdata structure
977 * \note RFC1035:

Callers 1

get_recordFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected