1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-28 23:42:10 +03:00

Create and manage information on MAC address OUIs

(Organizationally Unique Identifiers).
 This is the manufacturer's code in the MAC address.
This commit is contained in:
Thomas G. Lockhart
2000-08-23 06:02:23 +00:00
parent 2b6a35f7cd
commit aa2a3bfd48
4 changed files with 164 additions and 0 deletions

34
contrib/mac/updateoui Executable file
View File

@ -0,0 +1,34 @@
#! /bin/sh
# Utility to create manufacturer's OUI table
args=
refresh=0
while [ $# -gt 0 ]
do
case "$1" in
--refresh|--fetch|-r)
refresh=1
;;
--norefresh|--nofetch)
refresh=0
;;
--help)
echo "Usage: $0 --[no]refresh dbname"
exit
;;
*)
args="$args $1"
;;
esac
shift
done
if [ $refresh -gt 0 ]; then
[ -e oui.txt ] && rm -rf oui.txt
wget -nd 'http://standards.ieee.org/regauth/oui/oui.txt'
fi
awk -f ouiparse.awk < oui.txt | psql -e $args
exit