Lines Matching refs:msg
68 dumpmessage(dns_message_t *msg) {
75 output = isc_mem_get(msg->mctx, len);
80 result = dns_message_totext(msg, &dns_master_style_debug,
83 isc_mem_put(msg->mctx, output, len);
99 isc_mem_put(msg->mctx, output, len);
156 add_rdata_to_list(dns_message_t *msg, dns_name_t *name, dns_rdata_t *rdata,
167 RETERR(dns_message_gettemprdata(msg, &newrdata));
170 RETERR(isc_buffer_allocate(msg->mctx, &tmprdatabuf, r.length));
174 dns_message_takebuffer(msg, &tmprdatabuf);
176 RETERR(dns_message_gettempname(msg, &newname));
178 RETERR(dns_name_dup(name, msg->mctx, newname));
180 RETERR(dns_message_gettemprdatalist(msg, &newlist));
186 RETERR(dns_message_gettemprdataset(msg, &newset));
202 dns_message_puttemprdata(msg, &newrdata);
205 dns_message_puttempname(msg, &newname);
208 dns_message_puttemprdataset(msg, &newset);
211 dns_message_puttemprdatalist(msg, &newlist);
216 free_namelist(dns_message_t *msg, dns_namelist_t *namelist) {
226 dns_message_puttemprdataset(msg, &set);
228 dns_message_puttempname(msg, &name);
292 process_dhtkey(dns_message_t *msg, dns_name_t *signer, dns_name_t *name,
333 for (result = dns_message_firstname(msg, DNS_SECTION_ADDITIONAL);
335 result = dns_message_nextname(msg, DNS_SECTION_ADDITIONAL)) {
337 dns_message_currentname(msg, DNS_SECTION_ADDITIONAL, &keyname);
350 msg->mctx, &pubkey);
382 RETERR(add_rdata_to_list(msg, keyname, &keyrdata, ttl, namelist));
396 RETERR(add_rdata_to_list(msg, &ourname, &ourkeyrdata, 0, namelist));
399 RETERR(isc_buffer_allocate(msg->mctx, &shared, sharedsize));
447 free_namelist(msg, namelist);
643 dns_tkey_processquery(dns_message_t *msg, dns_tkeyctx_t *tctx,
657 REQUIRE(msg != NULL);
666 result = dns_message_firstname(msg, DNS_SECTION_QUESTION);
671 dns_message_currentname(msg, DNS_SECTION_QUESTION, &qname);
678 result = dns_message_findname(msg, DNS_SECTION_ADDITIONAL, qname,
686 if (dns_message_findname(msg, DNS_SECTION_ANSWER, qname,
716 result = dns_message_signer(msg, &tsigner);
733 tkeyout.mctx = msg->mctx;
824 RETERR(process_dhtkey(msg, signer, keyname, &tkeyin,
865 RETERR(add_rdata_to_list(msg, keyname, &rdata, 0, &namelist));
867 RETERR(dns_message_reply(msg, ISC_TRUE));
873 dns_message_addname(msg, name, DNS_SECTION_ANSWER);
883 free_namelist(msg, &namelist);
888 buildquery(dns_message_t *msg, dns_name_t *name,
899 REQUIRE(msg != NULL);
903 RETERR(dns_message_gettempname(msg, &qname));
904 RETERR(dns_message_gettempname(msg, &aname));
906 RETERR(dns_message_gettemprdataset(msg, &question));
911 RETERR(isc_buffer_allocate(msg->mctx, &dynbuf, len));
912 RETERR(isc_buffer_allocate(msg->mctx, &anamebuf, name->length));
913 RETERR(isc_buffer_allocate(msg->mctx, &qnamebuf, name->length));
914 RETERR(dns_message_gettemprdata(msg, &rdata));
918 dns_message_takebuffer(msg, &dynbuf);
920 RETERR(dns_message_gettemprdatalist(msg, &tkeylist));
925 RETERR(dns_message_gettemprdataset(msg, &tkeyset));
937 dns_message_addname(msg, qname, DNS_SECTION_QUESTION);
938 dns_message_takebuffer(msg, &qnamebuf);
945 dns_message_addname(msg, aname, DNS_SECTION_ANSWER);
947 dns_message_addname(msg, aname, DNS_SECTION_ADDITIONAL);
948 dns_message_takebuffer(msg, &anamebuf);
954 dns_message_puttempname(msg, &qname);
956 dns_message_puttempname(msg, &aname);
959 dns_message_puttemprdataset(msg, &question);
971 dns_tkey_builddhquery(dns_message_t *msg, dst_key_t *key, dns_name_t *name,
984 REQUIRE(msg != NULL);
994 tkey.mctx = msg->mctx;
1013 RETERR(buildquery(msg, name, &tkey, ISC_FALSE));
1015 RETERR(dns_message_gettemprdata(msg, &rdata));
1016 RETERR(isc_buffer_allocate(msg->mctx, &dynbuf, 1024));
1021 dns_message_takebuffer(msg, &dynbuf);
1027 RETERR(add_rdata_to_list(msg, &keyname, rdata, 0, &namelist));
1032 dns_message_addname(msg, name, DNS_SECTION_ADDITIONAL);
1046 dns_tkey_buildgssquery(dns_message_t *msg, dns_name_t *name, dns_name_t *gname,
1059 REQUIRE(msg != NULL);
1092 return (buildquery(msg, name, &tkey, win2k));
1096 dns_tkey_builddeletequery(dns_message_t *msg, dns_tsigkey_t *key) {
1099 REQUIRE(msg != NULL);
1105 tkey.mctx = msg->mctx;
1114 return (buildquery(msg, &key->name, &tkey, ISC_FALSE));
1118 find_tkey(dns_message_t *msg, dns_name_t **name, dns_rdata_t *rdata,
1124 result = dns_message_firstname(msg, section);
1127 dns_message_currentname(msg, section, name);
1138 result = dns_message_nextname(msg, section);