pike.git
/
lib
/
modules
/
Protocols.pmod
/
DNS.pmod
version
»
Context lines:
10
20
40
80
file
none
3
pike.git/lib/modules/Protocols.pmod/DNS.pmod:483:
//! @member int "order" //! @member int "preference" //! @member string "flags" //! @member string "service" //! @member string "regexp" //! @member string "replacement" //! @endmapping //! @value T_TXT //! @mapping //! @member string "txt"
+
//! Note: For historical reasons, when receiving decoded
+
//! DNS entries from a client, this will be the first string
+
//! in the TXT record only.
+
//! @member string "txta"
+
//! When receiving decoded DNS data from a client, txta is
+
//! the array of all strings in the record. When sending
+
//! multiple strings in a TXT record in a server, please
+
//! supply an array as "txt" containing the strings, txta
+
//! will be ignored.
//! @endmapping //! @value T_SPF //! @mapping //! @member string "spf" //! @endmapping //! @endint //! @endarray array decode_entries(string s,int num, array(int) next) { array(string) ret=({});
pike.git/lib/modules/Protocols.pmod/DNS.pmod:586:
break; case T_NAPTR: m->order = decode_short (s, next); m->preference = decode_short (s, next); m->flags = decode_string (s, next); m->service = decode_string (s, next); m->regexp = decode_string (s, next); m->replacement = decode_domain (s, next); break; case T_TXT:
-
m->
txt
= decode_string(s, next);
+
{
+
int tlen;
+
+
m->
txta
=
({ });
+
while (tlen < m->len) {
+
m->txta += ({
decode_string(s, next)
})
;
+
tlen += sizeof(m->txta[-1]) + 1;
+
}
+
m->txt = m->txta[0];
+
}
break; case T_SPF: m->spf = decode_string(s, next); break; } next[0]=tmp+m->len; ret+=({m}); } return ret;