
				




                           Compiling and installing
                                     Xip





I - Get and compile libpcap


Lawrence Berkeley National Laboratory
Network Research Group
libpcap@ee.lbl.gov
ftp://ftp.ee.lbl.gov/

Note: Systems which don't have a kernel filter might have problems since
pcap XtInputCallbackProc hander will be called at any time causing the
application to drive X server crazy (meanwhile it's possible to stop
flow with Ctrl-C).

You won't have problem under alpha and freebsd, the following contrib
package might solve the problem for linux:

contrib/pcap-linux.c:

"A drop in replacement for the pcap-linux.c that is shipped with
libpcap-v0.4a6. Supports the Linux Socket Filter (LSF), a version of
BPF for Linux. You need to enable LSF support in the kernel and then
recompile libpcap. Also recompile any tools that use libpcap...like
tcpdump. A complete libpcap archive that supports IPv6 and LSF is
available at http://www.inner.net/~cmetz/ipv6. This code was taken
from that package."

II - Compiling


Here are the local configure options:

 Options                  Description                 Use
 -------                  -----------                 ---
 --with-extra-include=DIR add an extra include dir    Optional
 --with-extra-libpath=DIR add an extra libpath        Optional
 --with-pcap              use libpcap                 Mandatory
 --with-pcap-library      libpcap library location    Mandatory (*)
 --with-pcap-include      libpcap include location    Mandatory (*)
 --with-mg-kludge         compile with WITH_MG_KLUDGE (**)

(*) Unless it is already in the include path.
(**) Force the undef of HAVE_BITFIELDS and force the def of HAVE_STDARG_H. It 
is a hack for my system but might be useful for you. Is is forced on alpha
(Check liba/include/a_sysdep.h).

Example:

	$ ./configure --with-pcap --with-pcap-include-../libpcap-0.4a6 --with-pcap-library=../libpcap-0.4a6

Note for alpha systems: You might also compile libsendalpha by hand which
contain a plugin to write ethernet packets.

III - Porting


- If you encounter problems in compiling, you can have a look at the
files: liba/a_sysdep.c and liba/include/a_sysdep.h. All the work is
done to make the system dependent routines in these files. If you succeed
to compile liba (lib abstract) then you won't have trouble with other
libraries.

Please send comments or patches to mgall@capmedia.fr.

Note: It has been ported successfully on IRIX 4.0.5F, OSF1 V3.2 and Linux.

IV - Installing


- There is no installation features for the moment, but it is quite
simple to install by hand.

I suggest:

    package location:          system location:
    -----------------          ----------------
    xip/xip (binary)           /usr/local/bin/xip (stripped)
    xip/xip.1 (man)            /usr/local/man/cat1/xip.1 (nroffed) 
    xip/Xip.ad (resource file) /usr/local/lib/app-defaults/Xip (without .ad)
    xip/data (examples dir)    /usr/local/lib/xip/ (renamed)

V - Things to do


- Implementing nfs, samba, snmp, ... (as plugins?).
- Implementing ppp, atm, fddi.
- Implementing plugins for Linux and other systems to send packets as it
has been done in libsendalpha.
- A documentation about the plugin API.
- ...
