mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-08-13 17:38:59 +00:00
FS-3110 --comment-only phase 1 to replace udns with ldns in mod_enum may need to rerun bootstrap
This commit is contained in:
17
libs/ldns/contrib/python/examples/ldns-newpkt.py
Executable file
17
libs/ldns/contrib/python/examples/ldns-newpkt.py
Executable file
@@ -0,0 +1,17 @@
|
||||
#!/usr/bin/python
|
||||
|
||||
import ldns
|
||||
|
||||
pkt = ldns.ldns_pkt.new_query_frm_str("www.google.com",ldns.LDNS_RR_TYPE_ANY, ldns.LDNS_RR_CLASS_IN, ldns.LDNS_QR | ldns.LDNS_AA)
|
||||
|
||||
rra = ldns.ldns_rr.new_frm_str("www.google.com. IN A 192.168.1.1",300)
|
||||
rrb = ldns.ldns_rr.new_frm_str("www.google.com. IN TXT Some\ Description",300)
|
||||
|
||||
list = ldns.ldns_rr_list()
|
||||
if (rra): list.push_rr(rra)
|
||||
if (rrb): list.push_rr(rrb)
|
||||
|
||||
pkt.push_rr_list(ldns.LDNS_SECTION_ANSWER, list)
|
||||
|
||||
print "Packet:"
|
||||
print pkt
|
Reference in New Issue
Block a user