diff options
author | 2023-08-29 11:10:33 +0800 | |
---|---|---|
committer | 2023-08-28 20:10:33 -0700 | |
commit | c53372c9f34fe9cbcc2fd8593ce5bbfaefb3f9db (patch) | |
tree | e94b42b9583971f0c51b911f88652a16add6d594 /src/bun.js/bindings/BunObject.cpp | |
parent | d1c2d6b25ceaeb58513d8687ba7945447adb6618 (diff) | |
download | bun-c53372c9f34fe9cbcc2fd8593ce5bbfaefb3f9db.tar.gz bun-c53372c9f34fe9cbcc2fd8593ce5bbfaefb3f9db.tar.zst bun-c53372c9f34fe9cbcc2fd8593ce5bbfaefb3f9db.zip |
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 <jarred@jarredsumner.com>
Diffstat (limited to 'src/bun.js/bindings/BunObject.cpp')
-rw-r--r-- | src/bun.js/bindings/BunObject.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
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; } |