Ypghost  should be self-contained in one C file, other  than  the
libpcap portable packet capturing library. 

If you haven't got libpcap use archie to find it, or try  getting
the  file  libpcap-0.0.6.tar.Z from the top  level  directory  of
anonymous  ftp  at  ftp.ee.lbl.gov.    Unfortunately  development
seems  to  have  stopped  on libpcap and  the  linux  version  of
libpcap  isn't incorporated into the standard release, so  you'll
probably  have to get it from the patched version of tcpdump  for
linux,  if you haven't already got it from my page.   You  almost
certainly  want to get the latest version of libpcap.   Naturally
you'll  need  to follow the instructions that come  with  libpcap
that  tells you how to compile it.  Finally, FreeBSD people  (and
probably  other  distributions  of BSD)  will  probably  have  to
recompile  their  kernel  with bpf support  before  libpcap  (and
hence ypghost) will work.  

Ypghost  (but not ypdump)  also needs a proper 4.4BSDlite   style
implementation  of raw sockets in order to be able to  spoof  the
source  address  in  the IP header.  Old kernels  such  as  SunOS
4.1.3  and most linux kernels will set the source address to  the
address  of the interface (i. e.  it wont work).  I  believe  the
very  latest linux 1.3.x development kernels (where x is  in  the
region of 90) have now been fixed.  If getting or using the  very
latest linux kernel is a problem then see the file LINUXMOD  that
tells you how to modify kernels that haven't been fixed.  

Compiling ypghost just basically consists of typing something like:

cc -o ypghost ypghost.c -lpcap

Where,

  cc		is a sensible ANSI C compiler, such as gcc, or /usr/ucb/cc
		on SunOS 5.4

  ypghost.c	is the version of ypghost.c you have, such as ypghost060.c

  -lpcap	specifies to use the libpcap.a library.  If you have not
		got this *installed* on your system, you'll have to also
		use some more options to specify extra directorys that
		the compiler should look in for librarys and header files.

On  SunOS 5.4 you might also need to specify some extra  librarys
with -lsocket and possibly -lnsl. 

For  example, on SunOS 5.4, if you had the libpcap.a and  pcap. h
files  in  the directory libpcap in the parent  directory  (i.e.
../libpcap), you might try: 

/usr/ucb/cc -I../libpcap -L../libpcap -o ypghost ypghost.c -lpcap -lsocket

I'm sure you'll work it out.

Similarly ypdump can be compiled by typing something like:

cc -o ypdump ypdump.c -lpcap

Finally,  just in case you haven't read this elsewhere,  I'm  not
responsible for anything ypghost does. 

Arny - arny@geek.org.uk

			http://www.unix.geek.org.uk/~arny/  (U.K.)
			http://www.unix.geek.net/~arny/     (U.S.)

