Difference between revisions of "$bindip"
From Scriptwiki
(Page created.) |
m (No need for separate examples.) |
||
Line 12: | Line 12: | ||
;If you only have one adapter on your machine the above would likely return 2. | ;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. | ;One for your network adapter and the second generally would be a loop-back device. | ||
− | + | ||
$bindip(2).name | $bindip(2).name | ||
;Returned could be something similar, MS TCP Loopback interface | ;Returned could be something similar, MS TCP Loopback interface | ||
− | + | ||
$bindip(2).ip | $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. | ;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 | $bindip(1).loopback | ||
;$false is returned if the 2nd adapter is not a loop-back device. | ;$false is returned if the 2nd adapter is not a loop-back device. | ||
− | + | ||
$bindip(2).loopback | $bindip(2).loopback | ||
;$true is returned if the 2nd adapter is a loop-back device. | ;$true is returned if the 2nd adapter is a loop-back device. |
Latest revision as of 00:24, 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.