#!/bin/sh
echo "generating linktypes_list.h" >&2
(
  echo "/* autogenerated by $0 */"
  egrep '^#define DLT_' /usr/include/pcap/dlt.h | \
    awk '{print $2}' | \
    grep -v \( | \
    while read dlt; do
      echo "#ifdef $dlt"
      echo "LT($dlt)"
      echo "#endif"
    done
) > linktypes_list.h
# vim:set ts=2 sts=2 sw=2 tw=80 et:
