Lines Matching full:host

3 # This file provides valuable host and IP manipulation procedures such as get_host_name_ip, etc.
8 proc get_host_name_ip {host {quiet 1}} {
10 # Get the host name, short host name and the IP address and return them as a list.
15 # lassign [get_host_name_ip $host] host_name short_host_name ip_address
18 # host The host name or IP address to be obtained.
22 lassign [cmd_fnc "host $host" "${quiet}" "" "${print_output}"] rc out_buf
26 # Host is host name.
31 # Host is IP address.
34 set ip_address ${host}
38 # Create the short name from the host name.
46 proc get_host_domain {host username password {quiet 1}} {
48 # Return the domain name of the host.
54 # host The host name or IP address of the system
57 # username The host username.
58 # password The host password.
64 "sshpass -p $password ssh -o StrictHostKeyChecking=no -k $username@$host\
71 proc get_host_name_servers {host username password {quiet 1}} {
79 # host The host name or IP address of the system
82 # username The host username.
83 # password The host password.
89 $username@$host\
97 proc get_host_mac_address {host username password {interface {}} {quiet 1}} {
99 # Return the mac address of the host given a specific interface.
107 # host The host name or IP address of the system
110 # username The host username.
111 # password The host password.
118 set_var_default interface [get_host_default_interface $host $username\
121 $username@$host 'cat /sys/class/net/$interface/address'" \
128 proc get_host_gateway {host username password {quiet 1}} {
130 # Return the gateway of the host.
136 # host The host name or IP address of the system
139 # username The host username.
140 # password The host password.
146 $username@$host ip route | grep -i '^default' | awk '{print \$3}'" \
153 proc get_host_default_interface {host username password {quiet 1} } {
155 # Return the default interface of the host interface.
161 # host The host name or IP address of the system
164 # username The host username.
165 # password The host password.
171 $username@$host ip route | grep -i '^default' | awk '{print \$5}'" \
178 proc get_host_netmask {host username password {interface {}} {quiet 1}} {
180 # Return the subnet mask for the host.
186 # host The host name or IP address of the system
189 # username The host username.
190 # password The host password.
198 "sshpass -p $password ssh -o StrictHostKeyChecking=no -k $username@$host"
199 set_var_default interface [get_host_default_interface $host $username\