Lines Matching defs:edns
808 calc_edns_field_size(struct edns_data* edns)
812 if(!edns || !edns->edns_present)
814 for(opt = edns->opt_list_inplace_cb_out; opt; opt = opt->next) {
817 for(opt = edns->opt_list_out; opt; opt = opt->next) {
825 calc_edns_option_size(struct edns_data* edns, uint16_t code)
829 if(!edns || !edns->edns_present)
831 for(opt = edns->opt_list_inplace_cb_out; opt; opt = opt->next) {
835 for(opt = edns->opt_list_out; opt; opt = opt->next) {
843 calc_ede_option_size(struct edns_data* edns, uint16_t* txt_size)
848 if(!edns || !edns->edns_present)
850 for(opt = edns->opt_list_inplace_cb_out; opt; opt = opt->next) {
860 for(opt = edns->opt_list_out; opt; opt = opt->next) {
917 attach_edns_record_max_msg_sz(sldns_buffer* pkt, struct edns_data* edns,
933 sldns_buffer_write_u16(pkt, edns->udp_size); /* class */
934 sldns_buffer_write_u8(pkt, edns->ext_rcode); /* ttl */
935 sldns_buffer_write_u8(pkt, edns->edns_version);
936 sldns_buffer_write_u16(pkt, edns->bits);
940 for(opt=edns->opt_list_inplace_cb_out; opt; opt=opt->next) {
950 for(opt=edns->opt_list_out; opt; opt=opt->next) {
960 if (padding_option && edns->padding_block_size ) {
962 size_t msg_sz = ((pad_pos + 3) / edns->padding_block_size + 1)
963 * edns->padding_block_size;
989 attach_edns_record(sldns_buffer* pkt, struct edns_data* edns)
991 if(!edns || !edns->edns_present)
993 attach_edns_record_max_msg_sz(pkt, edns, edns->udp_size);
1000 struct edns_data* edns, int dnssec, int secure)
1027 /* currently edns does not change during calculations;
1029 edns_field_size = calc_edns_field_size(edns);
1030 ede_size = calc_ede_option_size(edns, &ede_txt_size);
1033 if(!edns || !edns->edns_present) {
1037 /* packet too small to contain edns, omit it. */
1040 /* reserve space for edns record */
1051 attach_edns_record_max_msg_sz(pkt, edns, udpsize);
1053 ede_trim_text(&edns->opt_list_inplace_cb_out);
1054 ede_trim_text(&edns->opt_list_out);
1055 attach_edns_record_max_msg_sz(pkt, edns, udpsize);
1057 edns_opt_list_remove(&edns->opt_list_inplace_cb_out, LDNS_EDNS_EDE);
1058 edns_opt_list_remove(&edns->opt_list_out, LDNS_EDNS_EDE);
1059 attach_edns_record_max_msg_sz(pkt, edns, udpsize);
1088 uint16_t xflags, struct edns_data* edns)
1118 if(edns) {
1119 struct edns_data es = *edns;
1125 edns->udp_size) {
1129 edns->udp_size) {
1139 uint16_t qid, uint16_t qflags, struct edns_data* edns)
1142 (r & 0xFFF0), edns);