From c53372c9f34fe9cbcc2fd8593ce5bbfaefb3f9db Mon Sep 17 00:00:00 2001 From: Ai Hoshino Date: Tue, 29 Aug 2023 11:10:33 +0800 Subject: feat(node:dns): implement `dns.reverse`. (#4332) * feat(node:dns): implement `dns.reverse`. Close: #4299 * fix dns reverse for ipv6 --------- Co-authored-by: Jarred Sumner --- src/bun.js/bindings/BunObject.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/bun.js/bindings/BunObject.cpp') diff --git a/src/bun.js/bindings/BunObject.cpp b/src/bun.js/bindings/BunObject.cpp index aaf16beb8..0b78d1367 100644 --- a/src/bun.js/bindings/BunObject.cpp +++ b/src/bun.js/bindings/BunObject.cpp @@ -214,6 +214,7 @@ extern "C" EncodedJSValue Bun__DNSResolver__resolveNs(JSGlobalObject*, JSC::Call extern "C" EncodedJSValue Bun__DNSResolver__resolvePtr(JSGlobalObject*, JSC::CallFrame*); extern "C" EncodedJSValue Bun__DNSResolver__resolveCname(JSGlobalObject*, JSC::CallFrame*); extern "C" EncodedJSValue Bun__DNSResolver__getServers(JSGlobalObject*, JSC::CallFrame*); +extern "C" EncodedJSValue Bun__DNSResolver__reverse(JSGlobalObject*, JSC::CallFrame*); static JSValue constructDNSObject(VM& vm, JSObject* bunObject) { @@ -243,6 +244,8 @@ static JSValue constructDNSObject(VM& vm, JSObject* bunObject) JSC::PropertyAttribute::Function | JSC::PropertyAttribute::DontDelete | 0); dnsObject->putDirectNativeFunction(vm, globalObject, JSC::Identifier::fromString(vm, "getServers"_s), 2, Bun__DNSResolver__getServers, ImplementationVisibility::Public, NoIntrinsic, JSC::PropertyAttribute::Function | JSC::PropertyAttribute::DontDelete | 0); + dnsObject->putDirectNativeFunction(vm, globalObject, JSC::Identifier::fromString(vm, "reverse"_s), 2, Bun__DNSResolver__reverse, ImplementationVisibility::Public, NoIntrinsic, + JSC::PropertyAttribute::Function | JSC::PropertyAttribute::DontDelete | 0); return dnsObject; } -- cgit v1.2.3