MAC vendor lookup: Difference between revisions
Content added Content deleted
(Ada version) |
Thundergnat (talk | contribs) (Rename Perl 6 -> Raku, alphabetize, minor clean-up) |
||
Line 76: | Line 76: | ||
{{out}} |
{{out}} |
||
<pre>Hon Hai Precision Ind. Co.,Ltd.</pre> |
<pre>Hon Hai Precision Ind. Co.,Ltd.</pre> |
||
=={{header|C}}== |
=={{header|C}}== |
||
Line 209: | Line 208: | ||
(error "~%Not a MAC address: ~a" mac)))) |
(error "~%Not a MAC address: ~a" mac)))) |
||
</lang> |
</lang> |
||
=={{header|Free Pascal}}== |
=={{header|Free Pascal}}== |
||
Line 396: | Line 394: | ||
} |
} |
||
}</lang> |
}</lang> |
||
=={{header|Javascript}}== |
=={{header|Javascript}}== |
||
Line 409: | Line 406: | ||
{{out}} |
{{out}} |
||
<pre>Intel Corporate</pre> |
<pre>Intel Corporate</pre> |
||
=={{header|Julia}}== |
=={{header|Julia}}== |
||
Line 470: | Line 465: | ||
local macAddress = "FC-A1-3E-2A-1C-33" |
local macAddress = "FC-A1-3E-2A-1C-33" |
||
print(lookup(macAddress))</lang> |
print(lookup(macAddress))</lang> |
||
=={{header|M2000 Interpreter}}== |
=={{header|M2000 Interpreter}}== |
||
<lang M2000 Interpreter> |
<lang M2000 Interpreter> |
||
Line 497: | Line 493: | ||
Checkit |
Checkit |
||
</lang> |
</lang> |
||
=={{header|Mathematica}}== |
=={{header|Mathematica}}== |
||
<lang Mathematica>macLookup[mac_String] := Quiet[Check[Import["http://api.macvendors.com/" <> mac], "N/A"]]</lang> |
<lang Mathematica>macLookup[mac_String] := Quiet[Check[Import["http://api.macvendors.com/" <> mac], "N/A"]]</lang> |
||
Line 594: | Line 591: | ||
FC:FB:FB:01:FA:21 = Cisco Systems, Inc |
FC:FB:FB:01:FA:21 = Cisco Systems, Inc |
||
BC:5F:F4 = ASRock Incorporation</pre> |
BC:5F:F4 = ASRock Incorporation</pre> |
||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
=={{header|Phix}}== |
=={{header|Phix}}== |
||
Line 706: | Line 666: | ||
FC:FB:FB:01:FA:21 Cisco Systems, Inc |
FC:FB:FB:01:FA:21 Cisco Systems, Inc |
||
D4:F4:6F:C9:EF:8D Apple, Inc.</pre> |
D4:F4:6F:C9:EF:8D Apple, Inc.</pre> |
||
⚫ | |||
(formerly Perl 6) |
|||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
=={{header|Ring}}== |
=={{header|Ring}}== |
||
Line 744: | Line 742: | ||
23:45:67 Vendor not found |
23:45:67 Vendor not found |
||
</pre> |
</pre> |
||
=={{header|Rust}}== |
=={{header|Rust}}== |
||
Line 806: | Line 803: | ||
N/A |
N/A |
||
</pre> |
</pre> |
||
=={{header|Scala}}== |
=={{header|Scala}}== |
||
<lang scala>object LookUp extends App { |
<lang scala>object LookUp extends App { |
||
Line 815: | Line 813: | ||
macs.foreach(mac => println(lookupVendor(mac))) |
macs.foreach(mac => println(lookupVendor(mac))) |
||
}</lang> |
}</lang> |
||
=={{header|Tcl}}== |
=={{header|Tcl}}== |
||
<lang Tcl>package require http |
<lang Tcl>package require http |