node-red-contrib-arp
Version:
This node provides the content of the ARP table
50 lines (45 loc) • 1.78 kB
HTML
<script type="text/x-red" data-template-name="arp">
<div class="form-row">
<label for="node-input-name"><i class="icon-tag"></i>Name</label>
<input type="text" id="node-input-name" placeholder="Name">
</div>
<div class="form-row">
<label for="node-input-macs"><i class="icon-tag"></i>MAC address</label>
<input type="text" id="node-input-macs" placeholder="00:00:00:00:00:00">
</div>
</script>
<script type="text/x-red" data-help-name="arp">
<p>This node provides the content of the ARP table.</p>
<p>It returns the mapping of the network address (IP address) to a physical address (MAC address) of the devices which are connected to the same LAN.</p>
<p>The output <b>msg.payload</b> is an array of objects containing : </p>
<ul>
<li>ip : the IP address of the device.</li>
<li>mac : the MAC address of the device.</li>
<li>iface : the network interface of the device.</li>
</ul>
<p>It is possible to filter the results by MAC address :</p>
<ul>
<li>in the node configuration, by providing MAC address (separated by commas if multiple).</li>
<li>in the input <b>msg.payload.macs</b> message string, by providing MAC address (separated by commas if multiple).</li>
</ul>
</script>
<script type="text/javascript">
RED.nodes.registerType('arp',{
category: 'network',
color:"#3fadb5",
defaults: {
name: {value:"ARP"},
macs: {value:""}
},
inputs:1,
outputs:1,
icon: "bridge.png",
align: "right",
label: function() {
return this.name;
},
labelStyle: function() {
return (this.name)?"node_label_italic":"";
}
});
</script>