Lines Matching refs:uint16_t
90 constexpr uint16_t kEdns0Padding = 128;
143 *reinterpret_cast<uint16_t*>(cp) = htons(type); in res_nmkquery()
145 *reinterpret_cast<uint16_t*>(cp) = htons(cl); in res_nmkquery()
156 *reinterpret_cast<uint16_t*>(cp) = htons(ns_t_null); in res_nmkquery()
158 *reinterpret_cast<uint16_t*>(cp) = htons(cl); in res_nmkquery()
162 *reinterpret_cast<uint16_t*>(cp) = htons(0); in res_nmkquery()
173 *reinterpret_cast<uint16_t*>(cp) = htons(type); in res_nmkquery()
175 *reinterpret_cast<uint16_t*>(cp) = htons(cl); in res_nmkquery()
179 *reinterpret_cast<uint16_t*>(cp) = htons(datalen); in res_nmkquery()
201 uint16_t flags = 0; in res_nopt()
214 *reinterpret_cast<uint16_t*>(cp) = htons(ns_t_opt); /* TYPE */ in res_nopt()
217 *reinterpret_cast<uint16_t*>(cp) = htons(anslen); /* CLASS = UDP payload size */ in res_nopt()
225 *reinterpret_cast<uint16_t*>(cp) = htons(flags); in res_nopt()
229 const uint16_t minlen = static_cast<uint16_t>(cp - buf) + 3 * INT16SZ; in res_nopt()
230 const uint16_t extra = minlen % kEdns0Padding; in res_nopt()
231 uint16_t padlen = (kEdns0Padding - extra) % kEdns0Padding; in res_nopt()
235 padlen = std::min(padlen, static_cast<uint16_t>(buflen - minlen)); in res_nopt()
236 *reinterpret_cast<uint16_t*>(cp) = htons(padlen + 2 * INT16SZ); /* RDLEN */ in res_nopt()
238 *reinterpret_cast<uint16_t*>(cp) = htons(NS_OPT_PADDING); /* OPTION-CODE */ in res_nopt()
240 *reinterpret_cast<uint16_t*>(cp) = htons(padlen); /* OPTION-LENGTH */ in res_nopt()