1996-11-15 21:01:36 +03:00
|
|
|
#!/bin/sh
|
2013-03-01 22:25:13 +04:00
|
|
|
# $NetBSD: keywords.sh,v 1.11 2013/03/01 18:25:17 joerg Exp $
|
1996-11-15 21:01:36 +03:00
|
|
|
# @(#)keywords 8.2 (Berkeley) 3/19/94
|
|
|
|
#
|
|
|
|
# WARNING! If you change this file, re-run it!
|
|
|
|
|
|
|
|
# This program requires "new" awk (or GNU awk).
|
|
|
|
awk=${AWK:-awk}
|
|
|
|
|
|
|
|
cat << _EOF_ > _keywords.t1
|
|
|
|
add
|
1997-04-03 06:35:46 +04:00
|
|
|
atalk
|
1996-11-15 21:01:36 +03:00
|
|
|
blackhole
|
|
|
|
change
|
2001-01-27 07:51:17 +03:00
|
|
|
cloned
|
1996-11-15 21:01:36 +03:00
|
|
|
cloning
|
|
|
|
delete
|
|
|
|
dst
|
|
|
|
expire
|
|
|
|
flush
|
|
|
|
gateway
|
|
|
|
genmask
|
|
|
|
get
|
|
|
|
host
|
|
|
|
hopcount
|
|
|
|
iface
|
|
|
|
interface
|
|
|
|
ifa
|
|
|
|
ifp
|
|
|
|
inet
|
1999-07-02 19:29:02 +04:00
|
|
|
inet6
|
1996-11-15 21:01:36 +03:00
|
|
|
link
|
|
|
|
llinfo
|
|
|
|
lock
|
|
|
|
lockrest
|
|
|
|
mask
|
|
|
|
monitor
|
|
|
|
mtu
|
|
|
|
net
|
|
|
|
netmask
|
|
|
|
nostatic
|
1999-07-02 19:29:02 +04:00
|
|
|
prefixlen
|
1996-11-15 21:01:36 +03:00
|
|
|
proto1
|
|
|
|
proto2
|
|
|
|
recvpipe
|
|
|
|
reject
|
|
|
|
rtt
|
|
|
|
rttvar
|
|
|
|
sa
|
|
|
|
sendpipe
|
|
|
|
show
|
|
|
|
ssthresh
|
|
|
|
static
|
|
|
|
x25
|
|
|
|
xns
|
|
|
|
xresolve
|
2003-07-19 05:36:47 +04:00
|
|
|
flushall
|
2010-05-12 23:26:33 +04:00
|
|
|
nocloned
|
|
|
|
nocloning
|
|
|
|
noblackhole
|
|
|
|
noreject
|
2010-06-26 18:29:36 +04:00
|
|
|
mpls
|
|
|
|
tag
|
Move RTF_ANNOUNCE flag so that it no longer conflicts with RTF_PROTO2.
RTF_ANNOUNCE was defined as RTF_PROTO2. The flag is used to indicated
that host should act as a proxy for a link level arp or ndp request.
(If RTF_PROTO2 is used as an experimental flag (as advertised),
various problems can occur.)
This commit provides a first-class definition with its own bit for
RTF_ANNOUNCE, removes the old aliasing definitions, and adds support
for the new RTF_ANNOUNCE flag to netstat(8) and route(8).,
Also, remove unused RTF_ flags that collide with RTF_PROTO1:
netinet/icmp6.h defined RTF_PROBEMTU as RTF_PROTO1
netinet/if_inarp.h defined RTF_USETRAILERS as RTF_PROTO1
(Neither of these flags are used anywhere. Both have been removed
to reduce chances of collision with RTF_PROTO1.)
Figuring this out and the diff are the work of Beverly Schwartz of
BBN.
(Passed release build, boot in VM, with no apparently related atf
failures.)
Approved for Public Release, Distribution Unlimited
This material is based upon work supported by the Defense Advanced
Research Projects Agency and Space and Naval Warfare Systems Center,
Pacific, under Contract No. N66001-09-C-2073.
2011-11-11 19:09:32 +04:00
|
|
|
proxy
|
1996-11-15 21:01:36 +03:00
|
|
|
_EOF_
|
|
|
|
|
|
|
|
|
|
|
|
################################################################
|
|
|
|
# Setup
|
|
|
|
################################################################
|
|
|
|
|
|
|
|
# This creates a stream of:
|
|
|
|
# keyword KEYWORD
|
|
|
|
# (lower case, upper case).
|
|
|
|
tr a-z A-Z < _keywords.t1 |
|
|
|
|
paste _keywords.t1 - > _keywords.t2
|
|
|
|
|
|
|
|
|
|
|
|
################################################################
|
|
|
|
# Generate the h file
|
|
|
|
################################################################
|
|
|
|
exec > keywords.h
|
|
|
|
|
|
|
|
echo '/* $'NetBSD'$ */
|
|
|
|
|
|
|
|
/* WARNING! This file was generated by keywords.sh */
|
|
|
|
|
1996-12-16 22:53:02 +03:00
|
|
|
extern struct keytab {
|
2010-05-12 23:26:33 +04:00
|
|
|
const char *kt_cp;
|
1996-11-15 21:01:36 +03:00
|
|
|
int kt_i;
|
|
|
|
} keywords[];
|
|
|
|
|
|
|
|
' # defines follow
|
|
|
|
|
|
|
|
$awk '{
|
|
|
|
printf("#define\tK_%s\t%d\n", $2, NR);
|
|
|
|
}' < _keywords.t2
|
|
|
|
|
|
|
|
|
|
|
|
################################################################
|
|
|
|
# Generate the c file
|
|
|
|
################################################################
|
|
|
|
exec > keywords.c
|
|
|
|
|
|
|
|
echo '/* $'NetBSD'$ */
|
|
|
|
|
|
|
|
/* WARNING! This file was generated by keywords.sh */
|
|
|
|
|
|
|
|
#include "keywords.h"
|
|
|
|
|
|
|
|
struct keytab keywords[] = {
|
|
|
|
' # initializers follow
|
|
|
|
|
|
|
|
$awk '{
|
|
|
|
printf("\t{\"%s\", K_%s},\n", $1, $2);
|
|
|
|
}' < _keywords.t2
|
|
|
|
|
|
|
|
echo ' {0, 0}
|
|
|
|
};
|
|
|
|
' # tail
|
|
|
|
|
|
|
|
|
|
|
|
################################################################
|
|
|
|
# Cleanup
|
|
|
|
################################################################
|
|
|
|
|
|
|
|
rm -f _keywords.t1 _keywords.t2
|
|
|
|
exit 0
|