1121934Sharti# 2121934Sharti# Copyright (c) 2001-2003 3121934Sharti# Fraunhofer Institute for Open Communication Systems (FhG Fokus). 4121934Sharti# All rights reserved. 5121934Sharti# 6121934Sharti# Redistribution and use in source and binary forms, with or without 7121934Sharti# modification, are permitted provided that the following conditions 8121934Sharti# are met: 9121934Sharti# 1. Redistributions of source code must retain the above copyright 10121934Sharti# notice, this list of conditions and the following disclaimer. 11121934Sharti# 2. Redistributions in binary form must reproduce the above copyright 12121934Sharti# notice, this list of conditions and the following disclaimer in the 13121934Sharti# documentation and/or other materials provided with the distribution. 14121934Sharti# 15121934Sharti# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 16121934Sharti# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 17121934Sharti# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 18121934Sharti# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 19121934Sharti# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 20121934Sharti# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 21121934Sharti# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 22121934Sharti# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 23121934Sharti# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 24121934Sharti# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 25121934Sharti# SUCH DAMAGE. 26121934Sharti# 27121934Sharti# Author: Hartmut Brandt <harti@freebsd.org> 28121934Sharti# 29131826Sharti# $Begemot: libunimsg/netnatm/msg/genieh.awk,v 1.4 2004/07/08 08:22:03 brandt Exp $ 30121934Sharti# 31121934Sharti# Generate IE header file 32121934Sharti# 33121934Shartifunction begin() { 34121934Sharti} 35121934Sharti 36121934Shartifunction first_element() { 37121934Sharti print "/* This file was created automatically" 38121934Sharti print " * Source file: " id 39121934Sharti print " */" 40121934Sharti print "" 41121934Sharti print "#ifndef _NETNATM_MSG_UNI_IE_H_" 42121934Sharti print "#define _NETNATM_MSG_UNI_IE_H_" 43121934Sharti print "" 44121934Sharti print "union uni_ieall {" 45121934Sharti print " struct uni_iehdr h;" 46121934Sharti} 47121934Sharti 48121934Shartifunction end() { 49121934Sharti print "};" 50121934Sharti print "" 51121934Sharti print "#endif" 52121934Sharti} 53121934Sharti 54121934Shartifunction element_default() { 55121934Sharti} 56121934Sharti 57121934Shartifunction element() { 58121934Sharti if(ie in u) return 59121934Sharti u[ie] = 1 60121934Sharti print " struct uni_ie_" ie " " ie ";" 61121934Sharti} 62