Lines Matching refs:htons
120 hp->id = htons(arc4random_uniform(65536)); in res_nmkquery()
141 *reinterpret_cast<uint16_t*>(cp) = htons(type); in res_nmkquery()
143 *reinterpret_cast<uint16_t*>(cp) = htons(cl); in res_nmkquery()
145 hp->qdcount = htons(1); in res_nmkquery()
154 *reinterpret_cast<uint16_t*>(cp) = htons(ns_t_null); in res_nmkquery()
156 *reinterpret_cast<uint16_t*>(cp) = htons(cl); in res_nmkquery()
160 *reinterpret_cast<uint16_t*>(cp) = htons(0); in res_nmkquery()
162 hp->arcount = htons(1); in res_nmkquery()
171 *reinterpret_cast<uint16_t*>(cp) = htons(type); in res_nmkquery()
173 *reinterpret_cast<uint16_t*>(cp) = htons(cl); in res_nmkquery()
177 *reinterpret_cast<uint16_t*>(cp) = htons(data.size()); in res_nmkquery()
183 hp->ancount = htons(1); in res_nmkquery()
210 *reinterpret_cast<uint16_t*>(cp) = htons(ns_t_opt); /* TYPE */ in res_nopt()
213 *reinterpret_cast<uint16_t*>(cp) = htons(anslen); /* CLASS = UDP payload size */ in res_nopt()
221 *reinterpret_cast<uint16_t*>(cp) = htons(flags); in res_nopt()
232 *reinterpret_cast<uint16_t*>(cp) = htons(padlen + 2 * INT16SZ); /* RDLEN */ in res_nopt()
234 *reinterpret_cast<uint16_t*>(cp) = htons(NS_OPT_PADDING); /* OPTION-CODE */ in res_nopt()
236 *reinterpret_cast<uint16_t*>(cp) = htons(padlen); /* OPTION-LENGTH */ in res_nopt()
241 hp->arcount = htons(ntohs(hp->arcount) + 1); in res_nopt()