diff -c -P --recursive --exclude=COPYRIGHT --exclude=COPYING netstd.orig/icmpinfo-1.10.orig/Makefile netstd/icmpinfo-1.10/Makefile
*** netstd.orig/icmpinfo-1.10.orig/Makefile	Mon Aug  1 22:11:48 1994
--- netstd/icmpinfo-1.10/Makefile	Tue Aug  9 14:26:49 1994
***************
*** 22,32 ****
  
  LDFLAGS= $(CFLAGS)
  
! OBJECTS= recvping.o print.o err.o icmpinfo.o
  TARGET = icmpinfo
  
  $(TARGET):  $(OBJECTS)
  	$(CC) $(LDFLAGS) -o $@ $(OBJECTS) $(LDLIBS)
  
  tgz: clean
  	rm -f CHECKSUMS.asc
--- 22,36 ----
  
  LDFLAGS= $(CFLAGS)
  
! OBJECTS= recvping.o print.o err.o icmpinfo.o pid.o
  TARGET = icmpinfo
  
  $(TARGET):  $(OBJECTS)
  	$(CC) $(LDFLAGS) -o $@ $(OBJECTS) $(LDLIBS)
+ 
+ install: $(TARGET)
+ 	install -s -o root -g root -m 0755 icmpinfo ${DEBDIR}/usr/sbin
+ 	install -o root -g root -m 0644 icmpinfo.man ${DEBDIR}/usr/man/man1/icmpinfo.1
  
  tgz: clean
  	rm -f CHECKSUMS.asc
diff -c -P --recursive --exclude=COPYRIGHT --exclude=COPYING netstd.orig/icmpinfo-1.10.orig/README.Debian netstd/icmpinfo-1.10/README.Debian
*** netstd.orig/icmpinfo-1.10.orig/README.Debian	Thu Jan  1 01:00:00 1970
--- netstd/icmpinfo-1.10/README.Debian	Sat Jan 14 02:38:36 1995
***************
*** 0 ****
--- 1,9 ----
+ Last update: 08/08/94
+ 
+ The following things have been changed for the Debian distribution:
+ 
+ - changed the makefile (added an install target)
+ - added icmpinfo.c an option ('-k') to kill an icmpinfo background job
+ - added pid.c (functions: create pid file, kill process, signal handler)
+ 
+ Peter Tobias <tobias@et-inf.fho-emden.de>
diff -c -P --recursive --exclude=COPYRIGHT --exclude=COPYING netstd.orig/icmpinfo-1.10.orig/icmpinfo.c netstd/icmpinfo-1.10/icmpinfo.c
*** netstd.orig/icmpinfo-1.10.orig/icmpinfo.c	Mon Aug  1 22:40:37 1994
--- netstd/icmpinfo-1.10/icmpinfo.c	Thu Aug  4 23:17:10 1994
***************
*** 60,66 ****
   *	This program has to run SUID to ROOT to access the ICMP socket.
   */
  
! char	usage[] = "Usage:  icmpinfo [-v[v[v]]] [-s] [-n] [-p] [-l]\n   -v : more and more info\n   -s : show local interface address\n   -n : no name query (dot ip only)\n   -p : no port -> service name query\n   -l : fork + syslog output\nv1.10 - 8/1994 - dl";
  char	*pname;
  
  int main(argc, argv)
--- 60,66 ----
   *	This program has to run SUID to ROOT to access the ICMP socket.
   */
  
! char	usage[] = "Usage:  icmpinfo [-v[v[v]]] [-s] [-n] [-p] [-l] [-k]\n   -v : more and more info\n   -s : show local interface address\n   -n : no name query (dot ip only)\n   -p : no port -> service name query\n   -l : fork + syslog output\n   -k : kill background process\nv1.10 - 8/1994 - dl";
  char	*pname;
  
  int main(argc, argv)
***************
*** 99,104 ****
--- 99,108 ----
  			case 's':
  				showsrcip++;
  				break;
+ 			case 'k':
+ 				pid_kill();
+ 				exit(0);
+ 				break;
  			case 'h':
  		        default :
  				err_quit(usage);
***************
*** 128,133 ****
--- 132,138 ----
  	  openlog("icmpinfo",0,LOG_DAEMON);
  	  syslog(LOG_NOTICE,"started, PID=%d.",getpid());
  	  setsid();
+ 	  pid_file();
  	  close(0);
  	  close(1);
  	  close(2);
diff -c -P --recursive --exclude=COPYRIGHT --exclude=COPYING netstd.orig/icmpinfo-1.10.orig/icmpinfo.man netstd/icmpinfo-1.10/icmpinfo.man
*** netstd.orig/icmpinfo-1.10.orig/icmpinfo.man	Mon Aug  1 22:22:06 1994
--- netstd/icmpinfo-1.10/icmpinfo.man	Sun Aug  7 16:25:05 1994
***************
*** 6,12 ****
  .SH SYNOPSIS
  
  .B icmpinfo
! [\-v[v[v]]] [\-n] [\-p] [\-s] [\-l]
  
  .SH DESCRIPTION
  .BR Icmpinfo
--- 6,12 ----
  .SH SYNOPSIS
  
  .B icmpinfo
! [\-v[v[v]]] [\-n] [\-p] [\-s] [\-l] [\-k]
  
  .SH DESCRIPTION
  .BR Icmpinfo
***************
*** 60,65 ****
--- 60,72 ----
  .I "\-l"
  Forks and use the syslog(3) facility to record events (recomended use).
  (root only option).
+ 
+ .TP
+ .I "\-k"
+ Kills the background process started with the
+ .I "\-l"
+ option.
+ 
  .SH WARNINGS
  The packet decoding is planned for ICMP Unreachable outputs and might
  not be significant for all other Icmp types. Output can be shorter
diff -c -P --recursive --exclude=COPYRIGHT --exclude=COPYING netstd.orig/icmpinfo-1.10.orig/pid.c netstd/icmpinfo-1.10/pid.c
*** netstd.orig/icmpinfo-1.10.orig/pid.c	Thu Jan  1 01:00:00 1970
--- netstd/icmpinfo-1.10/pid.c	Sun Aug  7 15:53:18 1994
***************
*** 0 ****
--- 1,52 ----
+ #include <stdio.h>
+ #include <signal.h>
+ 
+ #define PIDFILE                 "/var/run/icmpinfo.pid"
+ 
+ extern char *pname;
+ 
+ void sig_handler(int);
+ void pid_file(void);
+ void pid_kill(void);
+ 
+ void pid_file(void)
+ {
+     FILE *fp;
+ 
+     if ((fp = fopen(PIDFILE, "w")) != (FILE *)NULL) {
+         fprintf(fp, "%d\n", getpid());
+         fclose(fp);
+     }
+     else
+     {
+         fprintf(stderr, "\n%s: Could not write PID file `%s', terminating.\n",
+             pname, PIDFILE);
+         exit(1);
+     }
+     signal(SIGHUP, sig_handler);
+     signal(SIGINT, sig_handler);
+     signal(SIGTERM, sig_handler);
+ }
+ 
+ void sig_handler(int sig)
+ {
+     unlink(PIDFILE);
+     exit(0);
+ }
+ 
+ void pid_kill(void)
+ {
+     FILE *fp;
+     int pid;
+ 
+     if ((fp = fopen(PIDFILE, "r")) != (FILE *)NULL)
+     {
+         if (fscanf(fp, "%d", &pid) == 1)
+         {
+             kill(pid, SIGHUP);
+             sleep(1);
+         }
+         fclose(fp);
+     }
+ }
+  
