Differences for page outifnameCurrent version compared with version Wed Nov 24 05:05:44 GMT 2004...
{outifname `target`}
- Return the name of the outgoing interface to reach `target`.
+ Returns the name of the outgoing interface to reach `target`.
- The interface returned will match at least one of the interfaces returned with [hping iflist].
- This command is an extension of [hping outifa], which returns the interface address instead of the interface name.
+ NOTE: This command requires [hpingstdlib.htcl].
- ===Example===
- hping3> hping outifa www.google.com
- 192.168.1.6
- hping3> hping iflist
- {lo 16436 {127.0.0.1} {LOOPBACK}} {eth0 1500 {192.168.1.6} {}}
+ The interface returned will match at least one of the interfaces returned with [hping iflist].
- As you can see 192.168.1.6 is the eth0 unique address -- note that
- the host is configured with a 192.168.1.1 as default gateway.
+ ===Example===
+ hping3> source hpingstdlib.htcl
+ hping3> outifname www.google.com
+ eth0
+
+ As you can see, the interface eth0 is the interface that accessed the target, www.google.com.
- To write a [Tcl] procedure that returns the name of the interface
- with a given address is trivial, such a procedure is included
- in the hping standard library (hpingstdlib.htcl).+
+ See also, [hping outifa]. The following is the old page content
|