Admin IP Manager: List of IPs direct from device (JSON)

Version 1.62.0

Feature
Finished

The call to: CMD_IP_MANAGER?json=yes will now include an extra array holding all IPs listed in the device, totally independent of what DA configured. The device_ips will have a list of devices in the "devices" array. Each IP in that device will have: - a numbered netmask, eg: 255.255.255.0 - a CIDR format bitmask, eg: /24 - and the ifa_flags for this IP address. To know what the flags mean, do a bitwise & on them using the device_ips[ifa_flags] array in a loop. eg: if (69699 & 1) print "Interface is running." should you need to display this information. See below for the list of masks, but they'll be included in the json output. ==== EVOLUTION SKIN The feature will appear in: Admin Level » IP Manager » "Devices" tab. eg: /admin/ip-manager ==== JSON Sample output: "device_ips": { "devices": { "eth0": { "1.2.3.4": { "bitmask": "/24", "ifa_flags": "69699", "netmask": "255.255.255.0" }, "1.2.3.5": { "bitmask": "/24", "ifa_flags": "69699", "netmask": "255.255.255.0" }, "2001:56a:f6f9:f600:20d:29ff:fe1a:238a": { "bitmask": "/64", "ifa_flags": "69699", "netmask": "ffff:ffff:ffff:ffff:0:0:0:0" } }, "lo": { "0:0:0:0:0:0:0:1": { "bitmask": "/128", "ifa_flags": "65609", "netmask": "ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff" }, "127.0.0.1": { "bitmask": "/8", "ifa_flags": "65609", "netmask": "255.0.0.0" } } }, "ifa_flags": { "1": "Interface is running.", "2": "Valid broadcast address set.", "4": "Internal debugging flag.", "8": "Interface is a loopback interface.", "16": "Interface is a point-to-point link.", "32": "Avoid use of trailers.", "64": "Resources allocated.", "128": "No arp protocol, L2 destination address not set.", "256": "Interface is in promiscuous mode.", "512": "Receive all multicast packets.", "1024": "Master of a load balancing bundle.", "2048": "Slave of a load balancing bundle.", "4096": "Supports multicast", "8192": "Is able to select media type via ifmap.", "16384": "Auto media selection active.", "32768": "The addresses are lost when the interface goes down." } }, ==== T31486 EVO2048

Interested to try DirectAdmin? Get a 30-day Free Trial!