ip-utilties 3.8.1 → 3.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/ip.mjs +10 -16
- package/types/ip.d.mts +0 -12
package/package.json
CHANGED
package/src/ip.mjs
CHANGED
|
@@ -70,10 +70,18 @@ const ipv6 = {
|
|
|
70
70
|
base: 16,
|
|
71
71
|
localHost: new Uint16Array([0, 0, 0, 0, 0, 0, 0, 1]),
|
|
72
72
|
wellKnownAddresses: [
|
|
73
|
-
[new Uint16Array([0xfe80, 0, 0, 0, 0, 0, 0, 0]), /**/
|
|
73
|
+
[new Uint16Array([0xfe80, 0, 0, 0, 0, 0, 0, 0]), /**/ 16, 64, 1],
|
|
74
74
|
[new Uint16Array([0xfd00, 0, 0, 0, 0, 0, 0, 0]), /* */ 8, 64, 3],
|
|
75
75
|
[new Uint16Array([0xfc00, 0, 0, 0, 0, 0, 0, 0]), /* */ 7, 64, 3],
|
|
76
|
-
[new Uint16Array([0, 0, 0, 0, 0, 0, 0, 1]),
|
|
76
|
+
[new Uint16Array([0, 0, 0, 0, 0, 0, 0, 1]), /* */ 128, 128, 2],
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* https://www.iana.org/assignments/ipv6-multicast-addresses/ipv6-multicast-addresses.xhtml
|
|
80
|
+
*/
|
|
81
|
+
[new Uint16Array([0xff00, 0, 0, 0, 0, 0, 0, 1]), 12, 128, "nodes"],
|
|
82
|
+
[new Uint16Array([0xff00, 0, 0, 0, 0, 0, 0, 2]), 12, 128, "routers"],
|
|
83
|
+
[new Uint16Array([0xff00, 0, 0, 0, 0, 0, 0, 0xfb]), 12, 128, "mDNSv6"],
|
|
84
|
+
[new Uint16Array([0xff00, 0, 0, 0, 0, 0, 1, 3]), 12, 128, "dhcp"]
|
|
77
85
|
]
|
|
78
86
|
};
|
|
79
87
|
|
|
@@ -393,7 +401,6 @@ export function _isLinkLocal(family, address) {
|
|
|
393
401
|
return _wellKnownSubnet(family, address)?.[3] === 1;
|
|
394
402
|
}
|
|
395
403
|
|
|
396
|
-
|
|
397
404
|
export function isLoopback(address) {
|
|
398
405
|
const family = _family(address);
|
|
399
406
|
if (family) {
|
|
@@ -435,18 +442,5 @@ export function _wellKnownSubnet(family, encoded) {
|
|
|
435
442
|
}
|
|
436
443
|
}
|
|
437
444
|
|
|
438
|
-
/**
|
|
439
|
-
prefix global subnet interface
|
|
440
|
-
ff01:: ff02:: 1
|
|
441
|
-
ff05:: 2 3
|
|
442
|
-
* https://www.iana.org/assignments/ipv6-multicast-addresses/ipv6-multicast-addresses.xhtml
|
|
443
|
-
*/
|
|
444
|
-
export const IPV6_NODE_LOCAL_ALL_NODES = _encode(ipv6, "ff01::1");
|
|
445
|
-
export const IPV6_NODE_LOCAL_ALL_ROUTERS = _encode(ipv6, "ff01::2");
|
|
446
|
-
export const IPV6_LINK_LOCAL_ALL_NODES = _encode(ipv6, "ff02::1");
|
|
447
|
-
export const IPV6_LINK_LOCAL_ALL_ROUTERS = _encode(ipv6, "ff02::2");
|
|
448
|
-
export const IPV6_SITE_LOCAL_ALL_ROUTERS = _encode(ipv6, "ff05::2");
|
|
449
|
-
export const IPV6_SITE_LOCAL_ALL_DHCP_SERVERS = _encode(ipv6, "ff05::1:3");
|
|
450
|
-
|
|
451
445
|
export const IPV4_LOCALHOST = ipv4.localHost;
|
|
452
446
|
export const IPV6_LOCALHOST = ipv6.localHost;
|
package/types/ip.d.mts
CHANGED
|
@@ -61,17 +61,5 @@ export declare function _isUniqueLocal(eaddr: any): boolean;
|
|
|
61
61
|
export declare function hasWellKnownSubnet(address: any): boolean;
|
|
62
62
|
export declare function wellKnownSubnet(address: any): any;
|
|
63
63
|
export declare function _wellKnownSubnet(family: any, encoded: any): any;
|
|
64
|
-
/**
|
|
65
|
-
prefix global subnet interface
|
|
66
|
-
ff01:: ff02:: 1
|
|
67
|
-
ff05:: 2 3
|
|
68
|
-
* https://www.iana.org/assignments/ipv6-multicast-addresses/ipv6-multicast-addresses.xhtml
|
|
69
|
-
*/
|
|
70
|
-
export declare const IPV6_NODE_LOCAL_ALL_NODES: any;
|
|
71
|
-
export declare const IPV6_NODE_LOCAL_ALL_ROUTERS: any;
|
|
72
|
-
export declare const IPV6_LINK_LOCAL_ALL_NODES: any;
|
|
73
|
-
export declare const IPV6_LINK_LOCAL_ALL_ROUTERS: any;
|
|
74
|
-
export declare const IPV6_SITE_LOCAL_ALL_ROUTERS: any;
|
|
75
|
-
export declare const IPV6_SITE_LOCAL_ALL_DHCP_SERVERS: any;
|
|
76
64
|
export declare const IPV4_LOCALHOST: Uint8Array<ArrayBuffer>;
|
|
77
65
|
export declare const IPV6_LOCALHOST: Uint16Array<ArrayBuffer>;
|