Hi,
I'm new to the list, and I wish I didn't have to post this since
you've all probably heard it before, but I've scoured the FAQ and anything else
I could find and have not determined what the fix is...
A quick background, I have been programming C on SysV UNIX on AT&T, Sun,
and Intel hardware since the early 80's, but I am a relative newbie
to Linux, so please be gentle :-).
I intend to use diald on an old Pentium 133 which I currently have set up
with ipfwadm as a firewall / router / NAT box for my home.
It has a modem to connect to my ISP
and a PCI NE2000 clone NIC connected to my home LAN.
I want it to be able to do the typical dial-out-on-demand, disconnect-on-idle.
I may even want to use it with an ISDN link if I get tired of waiting
for DSL and cable modem service to arrive here.
I downloaded diald 0.99.1 and tried to build it on my Red Hat 5.2 system,
but the compile craps out here:
proxy_tap.c:19: linux/netlink.h: No such file or directory
I can't figure out where this header file comes from, or what RPM package
it might be in.
I did find a file, but it's not in the right place:
/usr/src/linux-2.0.36/include/net/netlink.h
I thought maybe I needed a newer version of Linux, but the FAQ is pretty clear
about it running on kernels back to 1.1, and since RH 5.2 is 2.0+
it can't be that.
I have attached the full make output, as well as my Makefile and config.h.
I'm sure I must have botched the configuration somehow.
On an editorial note, I am quite surprised that a utility as useful
as diald is not part of the standard Red Hat distribution.
Equally surprising to me is the fact that no ambitious users
have posted precompiled binaries for a few popular platforms on your FTP site.
Is the Linux OS platform itself too splintered to have
a single pre-compiled binary for Intel hardware for a given kernel version?
Or is it too dangerous from a security standpoint?
I'm guessing it's the latter.
Regards,
Mario
[mtd@firewall diald]$ make
cc -O2 -Wall -pipe -c diald.c -o diald.o
cc -O2 -Wall -pipe -c options.c -o options.o
cc -O2 -Wall -pipe -c modem.c -o modem.o
cc -O2 -Wall -pipe -c filter.c -o filter.o
cc -O2 -Wall -pipe -c slip.c -o slip.o
cc -O2 -Wall -pipe -c lock.c -o lock.o
cc -O2 -Wall -pipe -c ppp.c -o ppp.o
cc -O2 -Wall -pipe -c dev.c -o dev.o
cc -O2 -Wall -pipe -c proxyarp.c -o proxyarp.o
cc -O2 -Wall -pipe -c fsm.c -o fsm.o
cc -O2 -Wall -pipe -c timer.c -o timer.o
timer.c: In function `validate_function':
timer.c:87: warning: comparison of distinct pointer types lacks a cast
timer.c:88: warning: comparison of distinct pointer types lacks a cast
cc -O2 -Wall -pipe -c parse.c -o parse.o
cc -O2 -Wall -pipe -c buffer.c -o buffer.o
cc -O2 -Wall -pipe -c route.c -o route.o
cc -O2 -Wall -pipe -c bufio.c -o bufio.o
cc -O2 -Wall -pipe -c utils.c -o utils.o
cc -O2 -Wall -pipe -c firewall.c -o firewall.o
cc -O2 -Wall -pipe -c log.c -o log.o
cc -O2 -Wall -pipe -c access.c -o access.o
cc -O2 -Wall -pipe -c proxy.c -o proxy.o
cc -O2 -Wall -pipe -c proxy_tap.c -o proxy_tap.o
proxy_tap.c:19: linux/netlink.h: No such file or directory
proxy_tap.c: In function `proxy_tap_init':
proxy_tap.c:123: storage size of `nl' isn't known
proxy_tap.c:139: `NETLINK_TAPBASE' undeclared (first use this function)
proxy_tap.c:139: (Each undeclared identifier is reported only once
proxy_tap.c:139: for each function it appears in.)
proxy_tap.c:123: warning: unused variable `nl'
make: *** [proxy_tap.o] Error 1
# ------------------ USER CONFIGURABLE SETTINGS ---------------------------
# Once you have read, understood, and made any necessary changes
# you may comment out the next two lines.
#unconfig:
# @echo 'EDIT THE CONFIG SETTINGS IN THE MAKEFILE!'; exit 1
# The directories where files will be installed, you may want to change these.
# dctrl goes here
BINDIR=/usr/bin
# diald goes here
SBINDIR=/usr/sbin
# the manual page goes here
MANDIR=/usr/man
# the configuration files go here
LIBDIR=/usr/lib/diald
# Compiler flags. Note that with gcc 2.5.8 using -g without -O
# will cause it to miscompile the filter parsing code.
# Also note that some versions of gcc may generate bad code
# with the -fomit-frame-pointer option.
# Linux, libc.so.6, TCP access control via /etc/hosts.allow (tcp_wrappers)
#CFLAGS = -O2 -Wall -pipe -DTCP_WRAPPERS
#LIBS = -lwrap -lnsl
# Linux, libc.so.6, no TCP access control
CFLAGS = -O2 -Wall -pipe
LIBS = -lnsl
# Linux, libc.so.5, TCP access control via /etc/hosts.allow (tcp_wrappers)
#CFLAGS = -O2 -Wall -pipe -DTCP_WRAPPERS
#LIBS = -lwrap
# Linux, libc.so.5, no TCP access control
#CFLAGS = -O2 -Wall -pipe
#LIBS =
#Moderately paranoid CFLAGS (this is moderately useful):
#CFLAGS = -Wall -Wtraditional -Wshadow -Wpointer-arith \
# -Wcast-qual -Wcast-align -Wconversion \
# -Wstrict-prototypes -Wnested-externs -Winline \
# -Waggregate-return \
# -O2 -fomit-frame-pointer -pipe
# Totally paranoid CFLAGS: (Only useful if you like warning messages:-))
#CFLAGS = -Wall -Wtraditional -Wshadow -Wpointer-arith \
# -Wbad-function-cast -Wcast-qual -Wcast-align \
# -Wwrite-strings -Wconversion -Waggregate-return \
# -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations \
# -Wredundant-decls -Wnested-externs -Winline \
# -O2 -fomit-frame-pointer -pipe
# ------------------ END OF USER CONFIGURATIONS ---------------------------
OBJFILES=diald.o options.o modem.o filter.o slip.o lock.o ppp.o dev.o \
proxyarp.o fsm.o timer.o parse.o buffer.o \
route.o bufio.o utils.o firewall.o log.o access.o \
proxy.o proxy_tap.o proxy_slip.o proxy_dev.o shell.o
SOURCEFILES=diald.c options.c modem.c filter.c slip.c lock.c ppp.c dev.c \
proxyarp.c fsm.c timer.c firewall.c parse.c buffer.c \
route.c bufio.c utils.c log.c access.c \
proxy.c proxy_tap.c proxy_slip.c proxy_dev.c shell.c \
bin patches config
HFILES=config.h diald.h firewall.h fsm.h version.h timer.h bufio.h access.h
DOCFILES=CHANGES README BUGS THANKS LICENSE doc/diald.man doc/diald-faq.txt \
doc/dctrl.man doc/diald-examples.man doc/diald-control.man \
doc/diald-monitor.man
CONTRIBFILES=contrib
DISTFILES=Makefile $(SOURCEFILES) $(HFILES) $(DOCFILES) $(CONTRIBFILES)
diald: $(OBJFILES)
./fixwrappers
$(CC) $(LDFLAGS) -o diald $(OBJFILES) $(LIBS)
install: diald
-mkdir -p ${DESTDIR}${BINDIR}
install -o root -g bin bin/dctrl ${DESTDIR}${BINDIR}/dctrl
-mkdir -p ${DESTDIR}${SBINDIR}
install -o root -g bin diald ${DESTDIR}${SBINDIR}/diald
-mkdir -p ${DESTDIR}${MANDIR}/man1 ${DESTDIR}${MANDIR}/man5 \
${DESTDIR}${MANDIR}/man8
install -o root -g bin -m 0644 doc/diald.man ${DESTDIR}${MANDIR}/man8/diald.8
install -o root -g bin -m 0644 doc/dctrl.man ${DESTDIR}${MANDIR}/man1/dctrl.1
install -o root -g bin -m 0644 doc/diald-examples.man
${DESTDIR}${MANDIR}/man5/diald-examples.5
install -o root -g bin -m 0644 doc/diald-control.man
${DESTDIR}${MANDIR}/man5/diald-control.5
install -o root -g bin -m 0644 doc/diald-monitor.man
${DESTDIR}${MANDIR}/man5/diald-monitor.5
-mkdir -p ${DESTDIR}${LIBDIR}
install -o root -g bin lib/*.gif ${DESTDIR}${LIBDIR}
install -o root -g bin -m 0644 config/diald.defs ${DESTDIR}${LIBDIR}/diald.defs
install -o root -g bin -m 0644 config/standard.filter
${DESTDIR}${LIBDIR}/standard.filter
install -o root -g bin bin/connect ${DESTDIR}${LIBDIR}/connect
clean:
rm -f *.o diald
dist: $(DISTFILES)
d=diald-`sed -e '/VERSION/!d' -e 's/[^0-9.]*\([0-9.a]*\).*/\1/' -e q
version.h` ; \
rm -f ../$$d; \
ln -s `pwd` ../$$d; \
cd ..; \
files=""; \
for f in $(DISTFILES); do files="$$files $$d/$$f"; done; \
tar chof $$d/$$d.tar $$files; \
gzip $$d/$$d.tar ; \
rm -f $$d
depend:
$(CPP) -MM *.c > .depend
#
# include a dependency file if one exists
#
ifeq (.depend,$(wildcard .depend))
include .depend
endif
/*
* config.h - Configuration options for diald.
*
* Copyright (c) 1994, 1995, 1996 Eric Schenk.
* Copyright (c) 1999 Mike Jagdis.
* All rights reserved. Please see the file LICENSE which should be
* distributed with this software for terms of use.
*
* These are the compile time defaults for various system files.
* You may want to edit these to match your system before you compile diald.
* However, if you didn't, don't panic. Almost all of these locations can be
* configured at run time if necessary. The only thing you can't configure
* at run time is the location of the main diald configuration files.
*
*/
/*
* Diald needs to be able to find its default configuration files.
* These paths should match the installation path in the Makefile!
* THIS MUST BE CONFIGURED AT COMPILE TIME IF YOU WANT TO CHANGE IT!
*/
#define DIALD_CONFIG_FILE "/etc/diald.conf"
#define DIALD_DEFS_FILE "/usr/lib/diald/diald.defs"
/*
* The default access to be allowed on monitor connections. Note
* that connections on the control fifo can always do anything
* because there is no way to determine who asked. This only
* applies to TCP monitor connections. The full list of access
* flags can be found in access.h.
* N.B. If ACCESS_CONTROL is not set then *anything* received
* on the pipe is treated as a message and no commands are possible.
* If ACCESS_AUTH is not set then the "auth" command may not
* be used to get other than the default access capabilities.
*/
#define CONFIG_DEFAULT_ACCESS \
(ACCESS_CONTROL | ACCESS_AUTH \
| ACCESS_MONITOR)
#if 0
/* This is not needed. See the TODO file. */
/* The PORT_MASQ_BEGIN and PORT_MASQ_END defines specify the range
* of ports which may be used by the kernel masquerade code under Linux.
* Some sites that need to masquerade many connections at once may have
* increased this range. If so you should change the defines here. For a
* truely general diald you should leave both undefined but this adds some
* usually unnecessary overhead.
* N.B. The demasquerading needs to be enabled using the "demasq" option.
* FIXME: This probably isn't a big killer unless you have lots of
* short lived connections?
*/
#define PORT_MASQ_BEGIN 61000
#define PORT_MASQ_END (PORT_MASQ_BEGIN + 4096)
#endif
/*****************************************************************************
* EVERYTHING BELOW HERE IS RUN TIME CONFIGURABLE
* You can change these things if you want to save yourself some
* entries in your configuration files.
****************************************************************************/
/*
* Your lock files are probably somewhere else unless you
* happen to be running a newer distribution that is compiliant
* the the Linux File System Standard. On older distributions
* you will usually find them in /var/spool/uucp or /usr/spool/uucp.
*/
#define LOCK_PREFIX "/var/lock/LCK.."
/*
* If your lock files should contain binary PID's then
* set the following to 0. I think most linux
* distributions want ASCII PID's in the lock files.
*/
#define PIDSTRING 1
/*
* Define where to put the diald.pid file. Under the FSSTD this
* should be in /var/run, but you're system might have them
* elsewhere. Check and be sure.
*/
#define RUN_PREFIX "/var/run"
/* The following will all be searched for in /sbin:/usr/sbin:/bin:/usr/bin
* so you do not, normally, need to define any of these paths. If you
* have a really strange setup you can either define paths here or
* use the run time path-* options.
*/
#if 0
/*
* Diald needs to use some external binaries to set up
* routing tables and to bring up the proxy device. If
* you do not define the paths here diald will look for
* each program first in /sbin and then in /usr/sbin.
* If you wish to use a specific binary instead of the
* defined or search located binary you may use the path-*
* config options to override them.
*/
#undef PATH_ROUTE "/sbin/route"
#undef PATH_IFCONFIG "/sbin/ifconfig"
/*
* The "ip" program is the preferred way to set routes on Linux 2.2
* and beyond. Either specify the path here or use the "path-ip"
* config option. The "ip" program you use needs to understand
* the "metric" keyword - some older ones do not. You can find
* "ip" on: ftp://ftp.inr.ac.ru/ip-routing/
*/
#undef PATH_IP "/usr/sbin/ip"
/*
* Diald needs to know where to find the bootpc binary in order to
* use the bootp protocol for dynamic slip address determination.
*/
#undef PATH_BOOTPC "/usr/sbin/bootpc"
/*
* If you're never going to use pppd don't worry if this is wrong.
* Otherwise, find your pppd executable and set this path to match its
* location.
*/
#undef PATH_PPPD "/usr/sbin/pppd"
#endif