Sponsored Content
Top Forums Shell Programming and Scripting getting mac from ip (or the contrary) Post 302296505 by chebarbudo on Wednesday 11th of March 2009 08:15:51 AM
Old 03-11-2009
getting mac from ip (or the contrary)

Hi there,
I need to find a way to check that a remote machine got the correct ip address. I have a dhcp server and need to run some commands after machine M acquired address A.
There are lots of reasons why machine M could have another address:
1) DHCP not reloaded
2) Machine M offline or powered off
3) Machine M has not renewed its ip address

Is there a way to do one of the following?
Code:
if [$(getmacfromip $ip) == $mac]; then ...
if [$(getipfrommac $mac) == $ip]; then ...

Can you help me lead me in the right direction?
Thanks in advance
Santiago
 

We Also Found This Discussion For You

1. OS X (Apple)

Let's get a .mac top level domain! As in www.xyz.mac

ICANN, the Internet Corporation for Assigned Names and Numbers, is inviting proposals for new sponsored top level domains. This may be wishful thinking, but isn't that a chance to push for a .mac top level domain (TLD)? I for one would VASTLY like the idea of having a domain of something.mac --... (0 Replies)
Discussion started by: ropers
0 Replies
bt-device(1)							    bluez-tools 						      bt-device(1)

NAME
bt-device - a bluetooth device manager SYNOPSIS
bt-device [OPTION...] Help Options: -h, --help Application Options: -a, --adapter=<name|mac> -l, --list -c, --connect=<mac> -d, --disconnect=<name|mac> -r, --remove=<name|mac> -i, --info=<name|mac> -s, --services <name|mac> [<pattern>] --set <name|mac> <property> <value> -v, --verbose DESCRIPTION
This utility is used to manage Bluetooth devices. You can list added devices, connect to a new device, disconnect device, remove added device, show info about device, discover remote device services or change device properties. OPTIONS
-h, --help Show help -a, --adapter <name|mac> Specify adapter to use by his Name or MAC address (if this option does not defined - default adapter used) -l, --list List added devices -c, --connect <mac> Connect to the remote device by his MAC, retrieve all SDP records and then initiate the pairing -d, --disconnect <name|mac> Disconnects a specific remote device by terminating the low-level ACL connection. -r, --remove Remove device (and also the pairing information) -i, --info Show information about device (returns all properties) -s, --services <name|mac> [<pattern>] Starts the service discovery to retrieve remote service records, the `pattern` parameter can be used to specify specific UUIDs --set <property> <value> Change device properties (see DEVICE PROPERTIES section for list of available properties) -v, --verbose Verbosely display remote service records (affect to service discovery mode) DEVICE PROPERTIES
string Address [ro] The Bluetooth device address (MAC) of the remote device. string Name [ro] The Bluetooth remote device name. string Icon [ro] Proposed icon name according to the freedesktop.org icon naming specification. uint32 Class [ro] The Bluetooth class of device of the remote device. list UUIDs [ro] List of 128-bit UUIDs that represents the available remote services. boolean Paired [ro] Indicates if the remote device is paired. boolean Connected [ro] Indicates if the remote device is currently connected. boolean Trusted [rw] Indicates if the remote is seen as trusted. boolean Blocked [rw] If set to true any incoming connections from the device will be immediately rejected. string Alias [rw] The name alias for the remote device. The alias can be used to have a different friendly name for the remote device. In case no alias is set, it will return the remote device name. Setting an empty string as alias will convert it back to the remote device name. boolean LegacyPairing [ro] Set to true if the device only supports the pre-2.1 pairing mechanism. AUTHOR
Alexander Orlenko <zxteam@gmail.com>. SEE ALSO
bt-adapter(1) bt-agent(1) bt-audio(1) bt-input(1) bt-monitor(1) bt-network(1) bt-serial(1) 2010-11-22 bt-device(1)
All times are GMT -4. The time now is 03:05 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy