Lines Matching defs:gpos

108 	dns_rdata_gpos_t *gpos = source;
112 REQUIRE(gpos->common.rdtype == type);
113 REQUIRE(gpos->common.rdclass == rdclass);
118 RETERR(uint8_tobuffer(gpos->long_len, target));
119 RETERR(mem_tobuffer(target, gpos->longitude, gpos->long_len));
120 RETERR(uint8_tobuffer(gpos->lat_len, target));
121 RETERR(mem_tobuffer(target, gpos->latitude, gpos->lat_len));
122 RETERR(uint8_tobuffer(gpos->alt_len, target));
123 return (mem_tobuffer(target, gpos->altitude, gpos->alt_len));
128 dns_rdata_gpos_t *gpos = target;
135 gpos->common.rdclass = rdata->rdclass;
136 gpos->common.rdtype = rdata->type;
137 ISC_LINK_INIT(&gpos->common, link);
140 gpos->long_len = uint8_fromregion(&region);
142 gpos->longitude = mem_maybedup(mctx, region.base, gpos->long_len);
143 if (gpos->longitude == NULL)
145 isc_region_consume(&region, gpos->long_len);
147 gpos->lat_len = uint8_fromregion(&region);
149 gpos->latitude = mem_maybedup(mctx, region.base, gpos->lat_len);
150 if (gpos->latitude == NULL)
152 isc_region_consume(&region, gpos->lat_len);
154 gpos->alt_len = uint8_fromregion(&region);
156 if (gpos->lat_len > 0) {
157 gpos->altitude =
158 mem_maybedup(mctx, region.base, gpos->alt_len);
159 if (gpos->altitude == NULL)
162 gpos->altitude = NULL;
164 gpos->mctx = mctx;
168 if (mctx != NULL && gpos->longitude != NULL)
169 isc_mem_free(mctx, gpos->longitude);
172 if (mctx != NULL && gpos->latitude != NULL)
173 isc_mem_free(mctx, gpos->latitude);
179 dns_rdata_gpos_t *gpos = source;
182 REQUIRE(gpos->common.rdtype == dns_rdatatype_gpos);
184 if (gpos->mctx == NULL)
187 if (gpos->longitude != NULL)
188 isc_mem_free(gpos->mctx, gpos->longitude);
189 if (gpos->latitude != NULL)
190 isc_mem_free(gpos->mctx, gpos->latitude);
191 if (gpos->altitude != NULL)
192 isc_mem_free(gpos->mctx, gpos->altitude);
193 gpos->mctx = NULL;