|
- #!/usr/bin/awk
-
- BEGIN {
- print "#include <sys/types.h>"
- print "#include <sys/ioctl.h>"
- print "#include <sys/time.h>"
- print "#include <sys/socket.h>"
- print "#include <net/if.h>"
- print "#include <net/route.h>"
- print "#include <netinet/in.h>"
- print "#include <netinet/ip_mroute.h>"
- print "#include <sys/sockio.h>"
- print "#include <stdio.h>"
-
- print "int"
- print "main()"
- print "{"
- }
-
- $1 == "#define" && $3 ~ "^_IO[WR]" {
- printf("\tprintf(\"%s = %%ld\\n\", %s);\n", $2, $2)
- }
-
- END {
- print " return 0;"
- print "}"
- }
|