MAC vendor lookup: Difference between revisions
→{{header|Racket}}
m (→=={{header|Racket}}==: stub added) |
|||
Line 170:
=={{header|Racket}}==
<lang racket>#lang racket
(require net/url)
(define (lookup-MAC-address addr)
(port->string
(get-pure-port
(url "http" #f "api.macvendors.com" #f #t (list (path/param addr null)) null #f))))
(module+ test
(for ((i (in-list '("88:53:2E:67:07:BE"
"FC:FB:FB:01:FA:21"
"D4:F4:6F:C9:EF:8D"))))
(printf "~a\t~a~%" i (lookup-MAC-address i))))</lang>
{{out}}
<pre>88:53:2E:67:07:BE Intel Corporate
FC:FB:FB:01:FA:21 Cisco Systems, Inc
D4:F4:6F:C9:EF:8D Apple, Inc.</pre>
=={{header|zkl}}==
|