Difference between revisions of "$bindip"
From Scriptwiki
(Page created.) |
|||
Line 1: | Line 1: | ||
− | + | Returns the list of active network adapters and associated bound IP address. | |
+ | $bindip(N|ipaddress) | ||
+ | Properties: name, ip, loopback | ||
+ | |||
+ | If ''N'' is 0 the amount of adapters will be returned. | ||
+ | If the ''name'' or ''ip'' property is used then the name or ip for that requested adapter will be returned. | ||
+ | If ''loopback'' property is issued then [[$true]]/[[$false]] is returned if the adapter is a loop-back adapter or not. | ||
+ | |||
+ | == Examples == | ||
+ | |||
+ | $bindip(0) | ||
+ | ;If you only have one adapter on your machine the above would likely return 2. | ||
+ | ;One for your network adapter and the second generally would be a loop-back device. | ||
+ | |||
+ | $bindip(2).name | ||
+ | ;Returned could be something similar, MS TCP Loopback interface | ||
+ | |||
+ | $bindip(2).ip | ||
+ | ;The IP associated with the loop-back adapter is usually going to be a localhost IP, as such something like 127.0.0.1 would be returned. | ||
+ | |||
+ | $bindip(1).loopback | ||
+ | ;$false is returned if the 2nd adapter is not a loop-back device. | ||
+ | |||
+ | $bindip(2).loopback | ||
+ | ;$true is returned if the 2nd adapter is a loop-back device. | ||
+ | |||
+ | == See Also == | ||
+ | * [[bindip]] Allows you to change the bind settings in the Ports dialog. | ||
+ | |||
+ | [[Category:Commands]] |
Revision as of 00:11, 22 February 2011
Returns the list of active network adapters and associated bound IP address.
$bindip(N|ipaddress) Properties: name, ip, loopback
If N is 0 the amount of adapters will be returned. If the name or ip property is used then the name or ip for that requested adapter will be returned. If loopback property is issued then $true/$false is returned if the adapter is a loop-back adapter or not.
Examples
$bindip(0) ;If you only have one adapter on your machine the above would likely return 2. ;One for your network adapter and the second generally would be a loop-back device.
$bindip(2).name ;Returned could be something similar, MS TCP Loopback interface
$bindip(2).ip ;The IP associated with the loop-back adapter is usually going to be a localhost IP, as such something like 127.0.0.1 would be returned.
$bindip(1).loopback ;$false is returned if the 2nd adapter is not a loop-back device.
$bindip(2).loopback ;$true is returned if the 2nd adapter is a loop-back device.
See Also
- bindip Allows you to change the bind settings in the Ports dialog.