diff --git a/.gitmodules b/.gitmodules index 374ff93..e69de29 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +0,0 @@ -[submodule "native-dns-packet"] - path = native-dns-packet - url = git@github.com:tjfontaine/native-dns-packet.git diff --git a/native-dns-packet b/native-dns-packet deleted file mode 160000 index 296bfe5..0000000 --- a/native-dns-packet +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 296bfe5337b57e93a605838a4da48924e8d46e4b diff --git a/test/fixtures/8.8.8.8.in-addr.arpa.ptr.bin b/test/fixtures/8.8.8.8.in-addr.arpa.ptr.bin new file mode 100644 index 0000000..af108f2 Binary files /dev/null and b/test/fixtures/8.8.8.8.in-addr.arpa.ptr.bin differ diff --git a/test/fixtures/8.8.8.8.in-addr.arpa.ptr.js b/test/fixtures/8.8.8.8.in-addr.arpa.ptr.js new file mode 100644 index 0000000..e0eb675 --- /dev/null +++ b/test/fixtures/8.8.8.8.in-addr.arpa.ptr.js @@ -0,0 +1,23 @@ +{ header: + { id: 39980, + qr: 1, + opcode: 0, + aa: 0, + tc: 0, + rd: 1, + ra: 1, + res1: 0, + res2: 0, + res3: 0, + rcode: 0 }, + question: [ { name: '8.8.8.8.IN-ADDR.ARPA', type: 12, class: 1 } ], + answer: + [ { name: '8.8.8.8.IN-ADDR.ARPA', + type: 12, + class: 1, + ttl: 21598, + data: 'google-public-dns-a.google.com' } ], + authority: [], + additional: [], + edns_options: [], + payload: undefined } diff --git a/test/fixtures/_443._tcp.fedoraproject.org.bin b/test/fixtures/_443._tcp.fedoraproject.org.bin new file mode 100644 index 0000000..feb7d14 Binary files /dev/null and b/test/fixtures/_443._tcp.fedoraproject.org.bin differ diff --git a/test/fixtures/_443._tcp.fedoraproject.org.js b/test/fixtures/_443._tcp.fedoraproject.org.js new file mode 100644 index 0000000..0090e26 --- /dev/null +++ b/test/fixtures/_443._tcp.fedoraproject.org.js @@ -0,0 +1,28 @@ +{ header: + { id: 62108, + qr: 1, + opcode: 0, + aa: 0, + tc: 0, + rd: 1, + ra: 1, + res1: 0, + res2: 1, + res3: 0, + rcode: 0 }, + question: [ { name: '_443._tcp.fedoraproject.org', type: 52, class: 1 } ], + answer: + [ { name: '_443._tcp.fedoraproject.org', + type: 52, + class: 1, + ttl: 268, + usage: 0, + selector: 0, + matchingtype: 1, + buff: new Buffer([0xd4, 0xc4, 0xc9, 0x98, 0x19, 0xf3, 0xa5, 0xf2, 0xc6, 0x26, 0x1c, 0x94, 0x44, 0xc6, 0x2a, 0x8b, 0x26, 0x3b, 0x39, 0xbc, 0x6a, 0xcc, 0xe3, 0x5c, 0xdc, 0xab, 0xe2, 0x72, 0xd5, 0x03, 0x7f, 0xb2]) } ], + authority: [], + additional: [], + edns_options: [], + payload: 4096, + edns_version: 0, + do: 0} diff --git a/test/fixtures/_xmpp-server._tcp.gmail.com.srv.bin b/test/fixtures/_xmpp-server._tcp.gmail.com.srv.bin new file mode 100644 index 0000000..f206e3d Binary files /dev/null and b/test/fixtures/_xmpp-server._tcp.gmail.com.srv.bin differ diff --git a/test/fixtures/_xmpp-server._tcp.gmail.com.srv.js b/test/fixtures/_xmpp-server._tcp.gmail.com.srv.js new file mode 100644 index 0000000..d815fd8 --- /dev/null +++ b/test/fixtures/_xmpp-server._tcp.gmail.com.srv.js @@ -0,0 +1,58 @@ +{ header: + { id: 42682, + qr: 1, + opcode: 0, + aa: 0, + tc: 0, + rd: 1, + ra: 1, + res1: 0, + res2: 0, + res3: 0, + rcode: 0 }, + question: [ { name: '_xmpp-server._tcp.gmail.com', type: 33, class: 1 } ], + answer: + [ { name: '_xmpp-server._tcp.gmail.com', + type: 33, + class: 1, + ttl: 900, + priority: 5, + weight: 0, + port: 5269, + target: 'xmpp-server.l.google.com' }, + { name: '_xmpp-server._tcp.gmail.com', + type: 33, + class: 1, + ttl: 900, + priority: 20, + weight: 0, + port: 5269, + target: 'alt3.xmpp-server.l.google.com' }, + { name: '_xmpp-server._tcp.gmail.com', + type: 33, + class: 1, + ttl: 900, + priority: 20, + weight: 0, + port: 5269, + target: 'alt4.xmpp-server.l.google.com' }, + { name: '_xmpp-server._tcp.gmail.com', + type: 33, + class: 1, + ttl: 900, + priority: 20, + weight: 0, + port: 5269, + target: 'alt2.xmpp-server.l.google.com' }, + { name: '_xmpp-server._tcp.gmail.com', + type: 33, + class: 1, + ttl: 900, + priority: 20, + weight: 0, + port: 5269, + target: 'alt1.xmpp-server.l.google.com' } ], + authority: [], + additional: [], + edns_options: [], + payload: undefined } diff --git a/test/fixtures/aol.com.txt.bin b/test/fixtures/aol.com.txt.bin new file mode 100644 index 0000000..8919e30 Binary files /dev/null and b/test/fixtures/aol.com.txt.bin differ diff --git a/test/fixtures/aol.com.txt.js b/test/fixtures/aol.com.txt.js new file mode 100644 index 0000000..0b80775 --- /dev/null +++ b/test/fixtures/aol.com.txt.js @@ -0,0 +1,28 @@ +{ header: + { id: 9551, + qr: 1, + opcode: 0, + aa: 0, + tc: 0, + rd: 1, + ra: 1, + res1: 0, + res2: 0, + res3: 0, + rcode: 0 }, + question: [ { name: 'aol.com', type: 16, class: 1 } ], + answer: + [ { name: 'aol.com', + type: 16, + class: 1, + ttl: 1926, + data: ['spf2.0/pra ptr:mx.aol.com ?all'] }, + { name: 'aol.com', + type: 16, + class: 1, + ttl: 1926, + data: ['v=spf1 ptr:mx.aol.com ?all'] } ], + authority: [], + additional: [], + edns_options: [], + payload: undefined } diff --git a/test/fixtures/b.8.4.0.6.9.e.f.f.f.1.9.c.3.0.f.0.0.0.0.0.0.0.0.3.0.c.3.0.0.6.2.ip6.arpa.ptr.bin b/test/fixtures/b.8.4.0.6.9.e.f.f.f.1.9.c.3.0.f.0.0.0.0.0.0.0.0.3.0.c.3.0.0.6.2.ip6.arpa.ptr.bin new file mode 100644 index 0000000..47a5fe1 Binary files /dev/null and b/test/fixtures/b.8.4.0.6.9.e.f.f.f.1.9.c.3.0.f.0.0.0.0.0.0.0.0.3.0.c.3.0.0.6.2.ip6.arpa.ptr.bin differ diff --git a/test/fixtures/b.8.4.0.6.9.e.f.f.f.1.9.c.3.0.f.0.0.0.0.0.0.0.0.3.0.c.3.0.0.6.2.ip6.arpa.ptr.js b/test/fixtures/b.8.4.0.6.9.e.f.f.f.1.9.c.3.0.f.0.0.0.0.0.0.0.0.3.0.c.3.0.0.6.2.ip6.arpa.ptr.js new file mode 100644 index 0000000..8316512 --- /dev/null +++ b/test/fixtures/b.8.4.0.6.9.e.f.f.f.1.9.c.3.0.f.0.0.0.0.0.0.0.0.3.0.c.3.0.0.6.2.ip6.arpa.ptr.js @@ -0,0 +1,26 @@ +{ header: + { id: 37466, + qr: 1, + opcode: 0, + aa: 0, + tc: 0, + rd: 1, + ra: 1, + res1: 0, + res2: 0, + res3: 0, + rcode: 0 }, + question: + [ { name: 'b.8.4.0.6.9.e.f.f.f.1.9.c.3.0.f.0.0.0.0.0.0.0.0.3.0.c.3.0.0.6.2.IP6.ARPA', + type: 12, + class: 1 } ], + answer: + [ { name: 'b.8.4.0.6.9.e.f.f.f.1.9.c.3.0.f.0.0.0.0.0.0.0.0.3.0.c.3.0.0.6.2.IP6.ARPA', + type: 12, + class: 1, + ttl: 21598, + data: 'alittletothewright.com' } ], + authority: [], + additional: [], + edns_options: [], + payload: undefined } diff --git a/test/fixtures/irc6.geo.oftc.net.aaaa.bin b/test/fixtures/irc6.geo.oftc.net.aaaa.bin new file mode 100644 index 0000000..277f85f Binary files /dev/null and b/test/fixtures/irc6.geo.oftc.net.aaaa.bin differ diff --git a/test/fixtures/irc6.geo.oftc.net.aaaa.js b/test/fixtures/irc6.geo.oftc.net.aaaa.js new file mode 100644 index 0000000..1d3eb3f --- /dev/null +++ b/test/fixtures/irc6.geo.oftc.net.aaaa.js @@ -0,0 +1,33 @@ +{ header: + { id: 11697, + qr: 1, + opcode: 0, + aa: 0, + tc: 0, + rd: 1, + ra: 1, + res1: 0, + res2: 0, + res3: 0, + rcode: 0 }, + question: [ { name: 'irc6.geo.oftc.net', type: 28, class: 1 } ], + answer: + [ { name: 'irc6.geo.oftc.net', + type: 28, + class: 1, + ttl: 59, + address: '2607:f8f0:610:4000:211:11ff:fe1c:7bec' }, + { name: 'irc6.geo.oftc.net', + type: 28, + class: 1, + ttl: 59, + address: '2a01:238:42d7:aa00:6667:6697:9999:42' }, + { name: 'irc6.geo.oftc.net', + type: 28, + class: 1, + ttl: 59, + address: '2001:41b8:202:deb:4200:ff:fe00:6667' } ], + authority: [], + additional: [], + edns_options: [], + payload: undefined } diff --git a/test/fixtures/linode.com.ns.bin b/test/fixtures/linode.com.ns.bin new file mode 100644 index 0000000..1a0db20 Binary files /dev/null and b/test/fixtures/linode.com.ns.bin differ diff --git a/test/fixtures/linode.com.ns.js b/test/fixtures/linode.com.ns.js new file mode 100644 index 0000000..a1a6e79 --- /dev/null +++ b/test/fixtures/linode.com.ns.js @@ -0,0 +1,43 @@ +{ header: + { id: 8381, + qr: 1, + opcode: 0, + aa: 0, + tc: 0, + rd: 1, + ra: 1, + res1: 0, + res2: 0, + res3: 0, + rcode: 0 }, + question: [ { name: 'linode.com', type: 2, class: 1 } ], + answer: + [ { name: 'linode.com', + type: 2, + class: 1, + ttl: 14769, + data: 'ns4.linode.com' }, + { name: 'linode.com', + type: 2, + class: 1, + ttl: 14769, + data: 'ns2.linode.com' }, + { name: 'linode.com', + type: 2, + class: 1, + ttl: 14769, + data: 'ns1.linode.com' }, + { name: 'linode.com', + type: 2, + class: 1, + ttl: 14769, + data: 'ns5.linode.com' }, + { name: 'linode.com', + type: 2, + class: 1, + ttl: 14769, + data: 'ns3.linode.com' } ], + authority: [], + additional: [], + edns_options: [], + payload: undefined } diff --git a/test/fixtures/microsoft.com.mx.bin b/test/fixtures/microsoft.com.mx.bin new file mode 100644 index 0000000..e5bba9d Binary files /dev/null and b/test/fixtures/microsoft.com.mx.bin differ diff --git a/test/fixtures/microsoft.com.mx.js b/test/fixtures/microsoft.com.mx.js new file mode 100644 index 0000000..b547249 --- /dev/null +++ b/test/fixtures/microsoft.com.mx.js @@ -0,0 +1,25 @@ +{ header: + { id: 46385, + qr: 1, + opcode: 0, + aa: 0, + tc: 0, + rd: 1, + ra: 1, + res1: 0, + res2: 0, + res3: 0, + rcode: 0 }, + question: [ { name: 'microsoft.com', type: 15, class: 1 } ], + answer: + [ { name: 'microsoft.com', + type: 15, + class: 1, + ttl: 197, + priority: 10, + exchange: 'microsoft-com.mail.protection.outlook.com' } ], + authority: [], + additional: [], + edns_options: [], + payload: undefined, +} diff --git a/test/fixtures/www.google.com.a.bin b/test/fixtures/www.google.com.a.bin new file mode 100644 index 0000000..623798c Binary files /dev/null and b/test/fixtures/www.google.com.a.bin differ diff --git a/test/fixtures/www.google.com.a.js b/test/fixtures/www.google.com.a.js new file mode 100644 index 0000000..9ccf46c --- /dev/null +++ b/test/fixtures/www.google.com.a.js @@ -0,0 +1,44 @@ +{ header: + { id: 49060, + qr: 1, + opcode: 0, + aa: 0, + tc: 0, + rd: 1, + ra: 1, + res1: 0, + res2: 0, + res3: 0, + rcode: 0 }, + question: [ { name: 'www.google.com', type: 1, class: 1 } ], + answer: + [ { name: 'www.google.com', + type: 1, + class: 1, + ttl: 29, + address: '74.125.239.112' }, + { name: 'www.google.com', + type: 1, + class: 1, + ttl: 29, + address: '74.125.239.116' }, + { name: 'www.google.com', + type: 1, + class: 1, + ttl: 29, + address: '74.125.239.113' }, + { name: 'www.google.com', + type: 1, + class: 1, + ttl: 29, + address: '74.125.239.115' }, + { name: 'www.google.com', + type: 1, + class: 1, + ttl: 29, + address: '74.125.239.114' } ], + authority: [], + additional: [], + edns_options: [], + payload: undefined, +} diff --git a/test/fixtures/www.linode.com.a.bin b/test/fixtures/www.linode.com.a.bin new file mode 100644 index 0000000..ba94308 Binary files /dev/null and b/test/fixtures/www.linode.com.a.bin differ diff --git a/test/fixtures/www.linode.com.a.js b/test/fixtures/www.linode.com.a.js new file mode 100644 index 0000000..7b6014c --- /dev/null +++ b/test/fixtures/www.linode.com.a.js @@ -0,0 +1,33 @@ +{ header: + { id: 46894, + qr: 1, + opcode: 0, + aa: 0, + tc: 0, + rd: 1, + ra: 1, + res1: 0, + res2: 0, + res3: 0, + rcode: 0 }, + question: [ { name: 'www.linode.com', type: 1, class: 1 } ], + answer: + [ { name: 'www.linode.com', + type: 1, + class: 1, + ttl: 291, + address: '72.14.191.202' }, + { name: 'www.linode.com', + type: 1, + class: 1, + ttl: 291, + address: '69.164.200.202' }, + { name: 'www.linode.com', + type: 1, + class: 1, + ttl: 291, + address: '72.14.180.202' } ], + authority: [], + additional: [], + edns_options: [], + payload: undefined } diff --git a/test/fixtures/www.nodejs.org.cname.bin b/test/fixtures/www.nodejs.org.cname.bin new file mode 100644 index 0000000..f21b3ca Binary files /dev/null and b/test/fixtures/www.nodejs.org.cname.bin differ diff --git a/test/fixtures/www.nodejs.org.cname.js b/test/fixtures/www.nodejs.org.cname.js new file mode 100644 index 0000000..07cd9c4 --- /dev/null +++ b/test/fixtures/www.nodejs.org.cname.js @@ -0,0 +1,23 @@ +{ header: + { id: 32764, + qr: 1, + opcode: 0, + aa: 0, + tc: 0, + rd: 1, + ra: 1, + res1: 0, + res2: 0, + res3: 0, + rcode: 0 }, + question: [ { name: 'www.nodejs.org', type: 5, class: 1 } ], + answer: + [ { name: 'www.nodejs.org', + type: 5, + class: 1, + ttl: 3600, + data: 'nodejs.org' } ], + authority: [], + additional: [], + edns_options: [], + payload: undefined } diff --git a/test/fixtures/www.yahoo.com.a.bin b/test/fixtures/www.yahoo.com.a.bin new file mode 100644 index 0000000..e5d4da3 Binary files /dev/null and b/test/fixtures/www.yahoo.com.a.bin differ diff --git a/test/fixtures/www.yahoo.com.a.js b/test/fixtures/www.yahoo.com.a.js new file mode 100644 index 0000000..5a89d68 --- /dev/null +++ b/test/fixtures/www.yahoo.com.a.js @@ -0,0 +1,44 @@ +{ header: + { id: 23208, + qr: 1, + opcode: 0, + aa: 0, + tc: 0, + rd: 1, + ra: 1, + res1: 0, + res2: 0, + res3: 0, + rcode: 0 }, + question: [ { name: 'www.yahoo.com', type: 1, class: 1 } ], + answer: + [ { name: 'www.yahoo.com', + type: 5, + class: 1, + ttl: 284, + data: 'fd-fp3.wg1.b.yahoo.com' }, + { name: 'fd-fp3.wg1.b.yahoo.com', + type: 5, + class: 1, + ttl: 285, + data: 'ds-fp3.wg1.b.yahoo.com' }, + { name: 'ds-fp3.wg1.b.yahoo.com', + type: 5, + class: 1, + ttl: 45, + data: 'ds-any-fp3-lfb.wa1.b.yahoo.com' }, + { name: 'ds-any-fp3-lfb.wa1.b.yahoo.com', + type: 5, + class: 1, + ttl: 285, + data: 'ds-any-fp3-real.wa1.b.yahoo.com' }, + { name: 'ds-any-fp3-real.wa1.b.yahoo.com', + type: 1, + class: 1, + ttl: 45, + address: '206.190.36.45' } ], + authority: [], + additional: [], + edns_options: [], + payload: undefined, +} diff --git a/tests/.gitkeep b/tests/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/tests/fixtures b/tests/fixtures deleted file mode 120000 index 14bb724..0000000 --- a/tests/fixtures +++ /dev/null @@ -1 +0,0 @@ -../native-dns-packet/test/fixtures/ \ No newline at end of file