#!/bin/sh
# @(#) $Id: massagevendor,v 1.3 2004/01/28 19:32:24 leres Exp $ (LBL)
#
# - Massage:
#
#	http://standards.ieee.org/regauth/oui/oui.txt
#
#   into ethercodes.dat format.
#
# - Deal with duplicates in oui.txt (concatenate company names)
#
(sed -n \
    -e 's/^\([0-9A-F][0-9A-F]\)-\([0-9A-F][0-9A-F]\)-\([0-9A-F][0-9A-F]\)  *(hex)[ 	]*\(..*\)/\1\2\3	\4/p' \
    $* | \
    awk -f /usr/obj/ports/arpwatch-2.1a15/fake-sgi/usr/local/share/examples/arpwatch/euppertolower.awk | \
    sed -n \
    -e 's/^\([0-9A-Za-z][0-9A-Za-z]\)\([0-9A-Za-z][0-9A-Za-z]\)\([0-9A-Za-z][0-9A-Za-z]\)[ 	]\(.*\)$/\1:\2:\3	\4/' \
    -e 's/^0//' -e 's/:0\([0-9A-Za-z]\)/:\1/g' -e p | \
    sort | \
    awk -f /usr/obj/ports/arpwatch-2.1a15/fake-sgi/usr/local/share/examples/arpwatch/duplicates.awk ) | \
    awk -f /usr/obj/ports/arpwatch-2.1a15/fake-sgi/usr/local/share/examples/arpwatch/p.awk | \
    sort
