1 diff -ur pads-1.2/config.guess pads-1.2.mod//config.guess
2 --- pads-1.2/config.guess 2004-09-29 07:15:05.000000000 +0200
3 +++ pads-1.2.mod//config.guess 2010-12-19 14:27:38.706667834 +0100
6 # Attempt to guess a canonical system name.
7 # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
8 -# 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
9 +# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
10 +# Free Software Foundation, Inc.
12 -timestamp='2004-09-07'
13 +timestamp='2008-01-23'
15 # This file is free software; you can redistribute it and/or modify it
16 # under the terms of the GNU General Public License as published by
19 # You should have received a copy of the GNU General Public License
20 # along with this program; if not, write to the Free Software
21 -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
22 +# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
25 # As a special exception to the GNU General Public License, if you
26 # distribute this file as part of a program that contains a
27 # configuration script generated by Autoconf, you may include it under
28 # the same distribution terms that you use for the rest of that program.
31 # Originally written by Per Bothner <per@bothner.com>.
32 # Please send patches to <config-patches@gnu.org>. Submit a context
33 # diff and a properly formatted ChangeLog entry.
35 GNU config.guess ($timestamp)
37 Originally written by Per Bothner.
38 -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
39 -Free Software Foundation, Inc.
40 +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
41 +2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
43 This is free software; see the source for copying conditions. There is NO
44 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
46 while test $# -gt 0 ; do
48 --time-stamp | --time* | -t )
49 - echo "$timestamp" ; exit 0 ;;
50 + echo "$timestamp" ; exit ;;
52 - echo "$version" ; exit 0 ;;
53 + echo "$version" ; exit ;;
55 - echo "$usage"; exit 0 ;;
56 + echo "$usage"; exit ;;
57 -- ) # Stop option processing
59 - ) # Use stdin as input.
61 trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
62 trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
64 - { tmp=`(umask 077 && mktemp -d -q "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
65 + { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
66 { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
67 { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
68 { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
71 ,,*) CC_FOR_BUILD=$CC ;;
72 ,*,*) CC_FOR_BUILD=$HOST_CC ;;
74 +esac ; set_cc_for_build= ;'
76 # This is needed to find uname on a Pyramid OSx when run in the BSD universe.
77 # (ghazi@noc.rutgers.edu 1994-08-24)
79 arm*) machine=arm-unknown ;;
80 sh3el) machine=shl-unknown ;;
81 sh3eb) machine=sh-unknown ;;
82 + sh5el) machine=sh5le-unknown ;;
83 *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
85 # The Operating System including object format, if it has switched
87 # contains redundant information, the shorter form:
88 # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
89 echo "${machine}-${os}${release}"
92 - echo x86_64-unknown-openbsd${UNAME_RELEASE}
95 - echo m68k-unknown-openbsd${UNAME_RELEASE}
98 - echo arm-unknown-openbsd${UNAME_RELEASE}
101 - echo m68k-unknown-openbsd${UNAME_RELEASE}
103 - luna88k:OpenBSD:*:*)
104 - echo m88k-unknown-openbsd${UNAME_RELEASE}
106 - mac68k:OpenBSD:*:*)
107 - echo m68k-unknown-openbsd${UNAME_RELEASE}
109 - macppc:OpenBSD:*:*)
110 - echo powerpc-unknown-openbsd${UNAME_RELEASE}
112 - mvme68k:OpenBSD:*:*)
113 - echo m68k-unknown-openbsd${UNAME_RELEASE}
115 - mvme88k:OpenBSD:*:*)
116 - echo m88k-unknown-openbsd${UNAME_RELEASE}
118 - mvmeppc:OpenBSD:*:*)
119 - echo powerpc-unknown-openbsd${UNAME_RELEASE}
122 - echo mips64-unknown-openbsd${UNAME_RELEASE}
125 - echo m68k-unknown-openbsd${UNAME_RELEASE}
129 - echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE}
131 + UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
132 + echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
135 echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
139 + echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE}
142 - echo powerppc-unknown-mirbsd${UNAME_RELEASE}
144 + echo powerpc-unknown-mirbsd${UNAME_RELEASE}
147 echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
151 case $UNAME_RELEASE in
153 @@ -297,37 +269,43 @@
154 # A Xn.n version is an unreleased experimental baselevel.
155 # 1.2 uses "1.2" for uname -r.
156 echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
159 Alpha\ *:Windows_NT*:*)
160 # How do we know it's Interix rather than the generic POSIX subsystem?
161 # Should we change UNAME_MACHINE based on the output of uname instead
162 # of the specific Alpha model?
163 echo alpha-pc-interix
166 21064:Windows_NT:50:3)
167 echo alpha-dec-winnt3.5
170 Amiga*:UNIX_System_V:4.0:*)
171 echo m68k-unknown-sysv4
174 *:[Aa]miga[Oo][Ss]:*:*)
175 echo ${UNAME_MACHINE}-unknown-amigaos
178 *:[Mm]orph[Oo][Ss]:*:*)
179 echo ${UNAME_MACHINE}-unknown-morphos
183 echo i370-ibm-openedition
187 + echo s390-ibm-zvmoe
190 echo powerpc-ibm-os400
193 arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
194 echo arm-acorn-riscix${UNAME_RELEASE}
197 + arm:riscos:*:*|arm:RISCOS:*:*)
198 + echo arm-unknown-riscos
200 SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
201 echo hppa1.1-hitachi-hiuxmpp
204 Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
205 # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
206 if test "`(/bin/universe) 2>/dev/null`" = att ; then
207 @@ -335,32 +313,32 @@
209 echo pyramid-pyramid-bsd
214 echo pyramid-pyramid-svr4
217 DRS?6000:unix:4.0:6*)
220 - DRS?6000:UNIX_SV:4.2*:7*)
222 + DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
223 case `/usr/bin/uname -p` in
224 - sparc) echo sparc-icl-nx7 && exit 0 ;;
225 + sparc) echo sparc-icl-nx7; exit ;;
228 echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
231 sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
232 echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
236 + i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
237 echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
241 # According to config.sub, this is the proper way to canonicalize
242 # SunOS6. Hard to guess exactly what SunOS6 will be like, but
243 # it's likely to be more like Solaris than SunOS4.
244 echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
248 case "`/usr/bin/arch -k`" in
250 @@ -369,10 +347,10 @@
252 # Japanese Language versions have a version number like `4.1.3-JL'.
253 echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
257 echo m68k-sun-sunos${UNAME_RELEASE}
261 UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
262 test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
263 @@ -384,10 +362,10 @@
264 echo sparc-sun-sunos${UNAME_RELEASE}
270 echo sparc-auspex-sunos${UNAME_RELEASE}
273 # The situation for MiNT is a little confusing. The machine name
274 # can be virtually everything (everything which is not
275 # "atarist" or "atariste" at least should have a processor
276 @@ -398,40 +376,40 @@
278 atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
279 echo m68k-atari-mint${UNAME_RELEASE}
282 atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
283 echo m68k-atari-mint${UNAME_RELEASE}
286 *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
287 echo m68k-atari-mint${UNAME_RELEASE}
290 milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
291 echo m68k-milan-mint${UNAME_RELEASE}
294 hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
295 echo m68k-hades-mint${UNAME_RELEASE}
298 *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
299 echo m68k-unknown-mint${UNAME_RELEASE}
303 echo m68k-apple-machten${UNAME_RELEASE}
307 echo powerpc-apple-machten${UNAME_RELEASE}
311 echo mips-dec-mach_bsd4.3
315 echo mips-dec-ultrix${UNAME_RELEASE}
319 echo vax-dec-ultrix${UNAME_RELEASE}
322 2020:CLIX:*:* | 2430:CLIX:*:*)
323 echo clipper-intergraph-clix${UNAME_RELEASE}
326 mips:*:*:UMIPS | mips:*:*:RISCos)
327 eval $set_cc_for_build
328 sed 's/^ //' << EOF >$dummy.c
329 @@ -455,32 +433,33 @@
333 - $CC_FOR_BUILD -o $dummy $dummy.c \
334 - && $dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \
336 + $CC_FOR_BUILD -o $dummy $dummy.c &&
337 + dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` &&
338 + SYSTEM_NAME=`$dummy $dummyarg` &&
339 + { echo "$SYSTEM_NAME"; exit; }
340 echo mips-mips-riscos${UNAME_RELEASE}
343 Motorola:PowerMAX_OS:*:*)
344 echo powerpc-motorola-powermax
347 Motorola:*:4.3:PL8-*)
348 echo powerpc-harris-powermax
351 Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
352 echo powerpc-harris-powermax
355 Night_Hawk:Power_UNIX:*:*)
356 echo powerpc-harris-powerunix
360 echo m88k-harris-cxux7
364 echo m88k-motorola-sysv4
368 echo m88k-motorola-sysv3
372 # DG/UX returns AViiON for all architectures
373 UNAME_PROCESSOR=`/usr/bin/uname -p`
374 @@ -496,29 +475,29 @@
376 echo i586-dg-dgux${UNAME_RELEASE}
380 M88*:DolphinOS:*:*) # DolphinOS (SVR3)
381 echo m88k-dolphin-sysv3
385 # Delta 88k system running SVR3
386 echo m88k-motorola-sysv3
389 XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
390 echo m88k-tektronix-sysv3
393 Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
394 echo m68k-tektronix-bsd
398 echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
401 ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
402 - echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id
403 - exit 0 ;; # Note that: echo "'`uname -s`'" gives 'AIX '
404 + echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id
405 + exit ;; # Note that: echo "'`uname -s`'" gives 'AIX '
411 if [ -x /usr/bin/oslevel ] ; then
412 IBM_REV=`/usr/bin/oslevel`
414 IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
416 echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
420 if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
421 eval $set_cc_for_build
422 @@ -541,15 +520,19 @@
426 - $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0
427 - echo rs6000-ibm-aix3.2.5
428 + if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy`
430 + echo "$SYSTEM_NAME"
432 + echo rs6000-ibm-aix3.2.5
434 elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
435 echo rs6000-ibm-aix3.2.4
437 echo rs6000-ibm-aix3.2
443 IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
444 if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
446 @@ -562,28 +545,28 @@
447 IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
449 echo ${IBM_ARCH}-ibm-aix${IBM_REV}
456 ibmrt:4.4BSD:*|romp-ibm:BSD:*)
460 ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and
461 echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to
462 - exit 0 ;; # report: romp-ibm BSD 4.3
463 + exit ;; # report: romp-ibm BSD 4.3
465 echo rs6000-bull-bosx
472 9000/[34]??:4.3bsd:1.*:*)
476 hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
480 9000/[34678]??:HP-UX:*:*)
481 HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
482 case "${UNAME_MACHINE}" in
485 if [ ${HP_ARCH} = "hppa2.0w" ]
487 - # avoid double evaluation of $set_cc_for_build
488 - test -n "$CC_FOR_BUILD" || eval $set_cc_for_build
489 - if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E -) | grep __LP64__ >/dev/null
490 + eval $set_cc_for_build
492 + # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
493 + # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler
494 + # generating 64-bit code. GNU and HP use different nomenclature:
496 + # $ CC_FOR_BUILD=cc ./config.guess
497 + # => hppa2.0w-hp-hpux11.23
498 + # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
499 + # => hppa64-hp-hpux11.23
501 + if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
502 + grep __LP64__ >/dev/null
506 @@ -655,11 +648,11 @@
509 echo ${HP_ARCH}-hp-hpux${HPUX_REV}
513 HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
514 echo ia64-hp-hpux${HPUX_REV}
518 eval $set_cc_for_build
519 sed 's/^ //' << EOF >$dummy.c
520 @@ -687,158 +680,192 @@
524 - $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0
525 + $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` &&
526 + { echo "$SYSTEM_NAME"; exit; }
527 echo unknown-hitachi-hiuxwe2
530 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
538 *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
539 echo hppa1.0-hp-mpeix
542 hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
551 if [ -x /usr/sbin/sysversion ] ; then
552 echo ${UNAME_MACHINE}-unknown-osf1mk
554 echo ${UNAME_MACHINE}-unknown-osf1
559 echo hppa1.1-hp-lites
562 C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
566 C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
567 if getsysinfo -f scalar_acc
568 then echo c32-convex-bsd
569 else echo c2-convex-bsd
573 C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
577 C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
581 C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
586 echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
590 echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
591 | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
592 -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
597 echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
601 echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
605 echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
609 echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
612 F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
613 FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
614 FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
615 FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
616 echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
619 5000:UNIX_System_V:4.*:*)
620 FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
621 FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
622 echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
625 i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
626 echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
630 echo sparc-unknown-bsdi${UNAME_RELEASE}
634 echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
638 - echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
640 + case ${UNAME_MACHINE} in
642 + echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
644 + echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
646 + echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
650 echo ${UNAME_MACHINE}-pc-cygwin
655 echo ${UNAME_MACHINE}-pc-mingw32
659 + # uname -m includes "-pc" on this system.
660 + echo ${UNAME_MACHINE}-mingw32
663 echo ${UNAME_MACHINE}-pc-pw32
665 - x86:Interix*:[34]*)
666 - echo i586-pc-interix${UNAME_RELEASE}|sed -e 's/\..*//'
669 + *:Interix*:[3456]*)
670 + case ${UNAME_MACHINE} in
672 + echo i586-pc-interix${UNAME_RELEASE}
674 + EM64T | authenticamd)
675 + echo x86_64-unknown-interix${UNAME_RELEASE}
678 + echo ia64-unknown-interix${UNAME_RELEASE}
681 [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
682 echo i${UNAME_MACHINE}-pc-mks
685 i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
686 # How do we know it's Interix rather than the generic POSIX subsystem?
687 # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
688 # UNAME_MACHINE based on the output of uname instead of i386?
693 echo ${UNAME_MACHINE}-pc-uwin
696 + amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
697 + echo x86_64-unknown-cygwin
700 echo powerpcle-unknown-cygwin
704 echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
709 echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
713 # other systems with GNU libc and userland
714 echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
718 echo ${UNAME_MACHINE}-pc-minix
722 + eval $set_cc_for_build
723 + if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
724 + | grep -q __ARM_EABI__
726 + echo ${UNAME_MACHINE}-unknown-linux-gnu
728 + echo ${UNAME_MACHINE}-unknown-linux-gnueabi
732 echo ${UNAME_MACHINE}-unknown-linux-gnu
736 echo cris-axis-linux-gnu
740 echo crisv32-axis-linux-gnu
744 echo frv-unknown-linux-gnu
748 echo ${UNAME_MACHINE}-unknown-linux-gnu
752 echo ${UNAME_MACHINE}-unknown-linux-gnu
756 echo ${UNAME_MACHINE}-unknown-linux-gnu
760 eval $set_cc_for_build
761 sed 's/^ //' << EOF >$dummy.c
766 - eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
767 - test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0
768 + eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
773 + test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
776 eval $set_cc_for_build
777 @@ -874,15 +905,22 @@
781 - eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
782 - test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0
783 + eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
788 + test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
791 + echo or32-unknown-linux-gnu
794 echo powerpc-unknown-linux-gnu
798 echo powerpc64-unknown-linux-gnu
802 case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
803 EV5) UNAME_MACHINE=alphaev5 ;;
805 objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null
806 if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
807 echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
810 parisc:Linux:*:* | hppa:Linux:*:*)
812 case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
813 @@ -904,25 +942,31 @@
814 PA8*) echo hppa2.0-unknown-linux-gnu ;;
815 *) echo hppa-unknown-linux-gnu ;;
819 parisc64:Linux:*:* | hppa64:Linux:*:*)
820 echo hppa64-unknown-linux-gnu
823 s390:Linux:*:* | s390x:Linux:*:*)
824 echo ${UNAME_MACHINE}-ibm-linux
828 echo ${UNAME_MACHINE}-unknown-linux-gnu
832 echo ${UNAME_MACHINE}-unknown-linux-gnu
835 sparc:Linux:*:* | sparc64:Linux:*:*)
836 echo ${UNAME_MACHINE}-unknown-linux-gnu
840 + echo ${UNAME_MACHINE}-dec-linux-gnu
843 echo x86_64-unknown-linux-gnu
847 + echo ${UNAME_MACHINE}-unknown-linux-gnu
850 # The BFD linker knows what the default object file format is, so
851 # first see if it will tell us. cd to the root directory to prevent
852 @@ -940,15 +984,15 @@
855 echo "${UNAME_MACHINE}-pc-linux-gnuaout"
859 echo "${UNAME_MACHINE}-pc-linux-gnucoff"
863 # Either a pre-BFD a.out linker (linux-gnuoldld) or
864 # one that does not give us useful --help.
865 echo "${UNAME_MACHINE}-pc-linux-gnuoldld"
869 # Determine whether the default compiler is a.out or elf
870 eval $set_cc_for_build
875 - #ifdef __INTEL_COMPILER
876 + #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC)
880 @@ -975,16 +1019,23 @@
884 - eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`
885 - test x"${LIBC}" != x && echo "${UNAME_MACHINE}-pc-linux-${LIBC}" && exit 0
886 - test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0
887 + eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
892 + test x"${LIBC}" != x && {
893 + echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
896 + test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; }
899 # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
900 # earlier versions are messed up and put the nodename in both
901 # sysname and nodename.
902 echo i386-sequent-sysv4
905 i*86:UNIX_SV:4.2MP:2.*)
906 # Unixware is an offshoot of SVR4, but it has its own version
907 # number series starting with 2...
908 @@ -992,27 +1043,27 @@
909 # I just have to hope. -- rms.
910 # Use sysv4.2uw... so that sysv4* matches it.
911 echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
915 # If we were able to find `uname', then EMX Unix compatibility
916 # is probably installed.
917 echo ${UNAME_MACHINE}-pc-os2-emx
921 echo ${UNAME_MACHINE}-unknown-stop
925 echo ${UNAME_MACHINE}-unknown-atheos
930 echo ${UNAME_MACHINE}-pc-syllable
933 i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
934 echo i386-unknown-lynxos${UNAME_RELEASE}
938 echo ${UNAME_MACHINE}-pc-msdosdjgpp
941 i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
942 UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
943 if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
944 @@ -1020,15 +1071,16 @@
946 echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
952 + # UnixWare 7.x, OpenUNIX and OpenServer 6.
953 case `/bin/uname -X | grep "^Machine"` in
954 *486*) UNAME_MACHINE=i486 ;;
955 *Pentium) UNAME_MACHINE=i586 ;;
956 *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
958 echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
962 if test -f /usr/options/cb.name; then
963 UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
964 @@ -1046,73 +1098,73 @@
966 echo ${UNAME_MACHINE}-pc-sysv32
971 # Left here for compatibility:
972 # uname -m prints for DJGPP always 'pc', but it prints nothing about
973 # the processor, so we play safe by assuming i386.
974 echo i386-pc-msdosdjgpp
985 i860:*:4.*:*) # i860-SVR4
986 if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
987 echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
988 else # Add other i860-SVR4 vendors below as they are discovered.
989 echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4
995 echo m68010-convergent-sysv
998 mc68k:UNIX:SYSTEM5:3.51m)
999 echo m68k-convergent-sysv
1006 M68*:*:R3V[5678]*:*)
1007 - test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;;
1008 + test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;;
1009 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0)
1011 test -r /etc/.relid \
1012 && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
1013 /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
1014 - && echo i486-ncr-sysv4.3${OS_REL} && exit 0
1015 + && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
1016 /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
1017 - && echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;;
1018 + && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
1019 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
1020 /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
1021 - && echo i486-ncr-sysv4 && exit 0 ;;
1022 + && { echo i486-ncr-sysv4; exit; } ;;
1023 m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
1024 echo m68k-unknown-lynxos${UNAME_RELEASE}
1027 mc68030:UNIX_System_V:4.*:*)
1028 echo m68k-atari-sysv4
1031 TSUNAMI:LynxOS:2.*:*)
1032 echo sparc-unknown-lynxos${UNAME_RELEASE}
1035 rs6000:LynxOS:2.*:*)
1036 echo rs6000-unknown-lynxos${UNAME_RELEASE}
1039 PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*)
1040 echo powerpc-unknown-lynxos${UNAME_RELEASE}
1043 SM[BE]S:UNIX_SV:*:*)
1044 echo mips-dde-sysv${UNAME_RELEASE}
1047 RM*:ReliantUNIX-*:*:*)
1056 if uname -p 2>/dev/null >/dev/null ; then
1057 UNAME_MACHINE=`(uname -p) 2>/dev/null`
1058 @@ -1120,69 +1172,81 @@
1064 PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
1065 # says <Richard.M.Bartel@ccMail.Census.GOV>
1066 echo i586-unisys-sysv4
1069 *:UNIX_System_V:4*:FTX*)
1070 # From Gerald Hewes <hewes@openmarket.com>.
1071 # How about differentiating between stratus architectures? -djm
1072 echo hppa1.1-stratus-sysv4
1076 # From seanf@swdc.stratus.com.
1077 echo i860-stratus-sysv4
1081 + # From Paul.Green@stratus.com.
1082 + echo ${UNAME_MACHINE}-stratus-vos
1085 # From Paul.Green@stratus.com.
1086 echo hppa1.1-stratus-vos
1090 echo m68k-apple-aux${UNAME_RELEASE}
1094 echo mips-sony-newsos6
1097 R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
1098 if [ -d /usr/nec ]; then
1099 echo mips-nec-sysv${UNAME_RELEASE}
1101 echo mips-unknown-sysv${UNAME_RELEASE}
1105 BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only.
1106 echo powerpc-be-beos
1109 BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only.
1110 echo powerpc-apple-beos
1113 BePC:BeOS:*:*) # BeOS running on Intel PC compatible.
1118 echo sx4-nec-superux${UNAME_RELEASE}
1122 echo sx5-nec-superux${UNAME_RELEASE}
1126 echo sx6-nec-superux${UNAME_RELEASE}
1129 + SX-7:SUPER-UX:*:*)
1130 + echo sx7-nec-superux${UNAME_RELEASE}
1132 + SX-8:SUPER-UX:*:*)
1133 + echo sx8-nec-superux${UNAME_RELEASE}
1135 + SX-8R:SUPER-UX:*:*)
1136 + echo sx8r-nec-superux${UNAME_RELEASE}
1138 Power*:Rhapsody:*:*)
1139 echo powerpc-apple-rhapsody${UNAME_RELEASE}
1143 echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
1147 UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
1148 case $UNAME_PROCESSOR in
1149 - *86) UNAME_PROCESSOR=i686 ;;
1150 unknown) UNAME_PROCESSOR=powerpc ;;
1152 echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
1155 *:procnto*:*:* | *:QNX:[0123456789]*:*)
1156 UNAME_PROCESSOR=`uname -p`
1157 if test "$UNAME_PROCESSOR" = "x86"; then
1158 @@ -1190,22 +1254,25 @@
1161 echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
1168 + NSE-?:NONSTOP_KERNEL:*:*)
1169 + echo nse-tandem-nsk${UNAME_RELEASE}
1171 NSR-?:NONSTOP_KERNEL:*:*)
1172 echo nsr-tandem-nsk${UNAME_RELEASE}
1176 echo mips-compaq-nonstopux
1180 echo bs2000-siemens-sysv
1183 DS/*:UNIX_System_V:*:*)
1184 echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
1188 # "uname -m" is not consistent, so use $cputype instead. 386
1189 # is converted to i386 for consistency with other x86
1190 @@ -1216,38 +1283,47 @@
1191 UNAME_MACHINE="$cputype"
1193 echo ${UNAME_MACHINE}-unknown-plan9
1197 echo pdp10-unknown-tops10
1201 echo pdp10-unknown-tenex
1204 KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
1205 echo pdp10-dec-tops20
1208 XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
1209 echo pdp10-xkl-tops20
1213 echo pdp10-unknown-tops20
1217 echo pdp10-unknown-its
1221 echo mips-sei-seiux${UNAME_RELEASE}
1225 echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
1229 UNAME_MACHINE=`(uname -p) 2>/dev/null`
1230 case "${UNAME_MACHINE}" in
1231 - A*) echo alpha-dec-vms && exit 0 ;;
1232 - I*) echo ia64-dec-vms && exit 0 ;;
1233 - V*) echo vax-dec-vms && exit 0 ;;
1235 + A*) echo alpha-dec-vms ; exit ;;
1236 + I*) echo ia64-dec-vms ; exit ;;
1237 + V*) echo vax-dec-vms ; exit ;;
1240 + echo i386-pc-xenix
1243 + echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
1246 + echo ${UNAME_MACHINE}-pc-rdos
1250 #echo '(No uname command or uname output not recognized.)' 1>&2
1251 @@ -1279,7 +1355,7 @@
1254 #if defined (__arm) && defined (__acorn) && defined (__unix)
1255 - printf ("arm-acorn-riscix"); exit (0);
1256 + printf ("arm-acorn-riscix\n"); exit (0);
1259 #if defined (hp300) && !defined (hpux)
1260 @@ -1368,11 +1444,12 @@
1264 -$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && $dummy && exit 0
1265 +$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` &&
1266 + { echo "$SYSTEM_NAME"; exit; }
1268 # Apollos put the system type in the environment.
1270 -test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; }
1271 +test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; }
1273 # Convex versions that predate uname can use getsysinfo(1)
1275 @@ -1381,22 +1458,22 @@
1276 case `getsysinfo -f cpu_type` in
1282 if getsysinfo -f scalar_acc
1283 then echo c32-convex-bsd
1284 else echo c2-convex-bsd
1303 @@ -1407,7 +1484,9 @@
1304 the operating system you are using. It is advised that you
1305 download the most up to date version of the config scripts from
1307 - ftp://ftp.gnu.org/pub/gnu/config/
1308 + http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
1310 + http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
1312 If the version you run ($0) is already up to date, please
1313 send the following data and any information you think might be
1314 diff -ur pads-1.2/config.sub pads-1.2.mod//config.sub
1315 --- pads-1.2/config.sub 2004-09-29 07:15:05.000000000 +0200
1316 +++ pads-1.2.mod//config.sub 2010-12-19 14:27:38.723334500 +0100
1319 # Configuration validation subroutine script.
1320 # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
1321 -# 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
1322 +# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
1323 +# Free Software Foundation, Inc.
1325 -timestamp='2004-08-29'
1326 +timestamp='2008-01-16'
1328 # This file is (in principle) common to ALL GNU software.
1329 # The presence of a machine in this file suggests that SOME GNU software
1332 # You should have received a copy of the GNU General Public License
1333 # along with this program; if not, write to the Free Software
1334 -# Foundation, Inc., 59 Temple Place - Suite 330,
1335 -# Boston, MA 02111-1307, USA.
1337 +# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
1340 # As a special exception to the GNU General Public License, if you
1341 # distribute this file as part of a program that contains a
1342 # configuration script generated by Autoconf, you may include it under
1343 # the same distribution terms that you use for the rest of that program.
1346 # Please send patches to <config-patches@gnu.org>. Submit a context
1347 # diff and a properly formatted ChangeLog entry.
1351 GNU config.sub ($timestamp)
1353 -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
1354 -Free Software Foundation, Inc.
1355 +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
1356 +2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
1358 This is free software; see the source for copying conditions. There is NO
1359 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
1361 while test $# -gt 0 ; do
1363 --time-stamp | --time* | -t )
1364 - echo "$timestamp" ; exit 0 ;;
1365 + echo "$timestamp" ; exit ;;
1367 - echo "$version" ; exit 0 ;;
1368 + echo "$version" ; exit ;;
1369 --help | --h* | -h )
1370 - echo "$usage"; exit 0 ;;
1371 + echo "$usage"; exit ;;
1372 -- ) # Stop option processing
1374 - ) # Use stdin as input.
1377 # First pass through any local machine types.
1385 # Here we must recognize all the valid KERNEL-OS combinations.
1386 maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
1388 - nto-qnx* | linux-gnu* | linux-dietlibc | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | \
1389 - kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*)
1390 + nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \
1391 + uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \
1392 + storm-chaos* | os2-emx* | rtmk-nova*)
1394 basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
1396 @@ -170,6 +173,10 @@
1402 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
1406 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
1407 @@ -186,6 +193,10 @@
1408 # Don't forget version if it is 3.2v4 or newer.
1409 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
1412 + # Don't forget version if it is 3.2v4 or newer.
1413 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
1417 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
1418 @@ -230,14 +241,16 @@
1419 | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
1420 | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
1422 - | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \
1423 + | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \
1426 | d10v | d30v | dlx | dsp16xx \
1428 + | fido | fr30 | frv \
1429 | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
1430 | i370 | i860 | i960 | ia64 \
1432 - | m32r | m32rle | m68000 | m68k | m88k | mcore \
1433 + | m32c | m32r | m32rle | m68000 | m68k | m88k \
1434 + | maxq | mb | microblaze | mcore | mep \
1435 | mips | mipsbe | mipseb | mipsel | mipsle \
1437 | mips64 | mips64el \
1439 | mips64vr4100 | mips64vr4100el \
1440 | mips64vr4300 | mips64vr4300el \
1441 | mips64vr5000 | mips64vr5000el \
1442 + | mips64vr5900 | mips64vr5900el \
1443 | mipsisa32 | mipsisa32el \
1444 | mipsisa32r2 | mipsisa32r2el \
1445 | mipsisa64 | mipsisa64el \
1446 @@ -254,20 +268,24 @@
1447 | mipsisa64sr71k | mipsisa64sr71kel \
1448 | mipstx39 | mipstx39el \
1449 | mn10200 | mn10300 \
1454 - | openrisc | or32 \
1456 | pdp10 | pdp11 | pj | pjl \
1457 | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
1459 - | sh | sh[1234] | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \
1461 + | sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
1463 - | sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv8 | sparcv9 | sparcv9b \
1465 + | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
1466 + | sparcv8 | sparcv9 | sparcv9b | sparcv9v \
1467 + | spu | strongarm \
1468 | tahoe | thumb | tic4x | tic80 | tron \
1471 - | x86 | xscale | xstormy16 | xtensa \
1472 + | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \
1474 basic_machine=$basic_machine-unknown
1478 m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
1481 + basic_machine=mt-unknown
1484 # We use `pc' rather than `unknown'
1485 # because (1) that's what they normally are, and
1486 @@ -297,20 +318,20 @@
1487 | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
1488 | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
1489 | arm-* | armbe-* | armle-* | armeb-* | armv*-* \
1492 + | avr-* | avr32-* \
1493 + | bfin-* | bs2000-* \
1494 | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
1495 | clipper-* | craynv-* | cydra-* \
1496 | d10v-* | d30v-* | dlx-* \
1498 - | f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \
1499 + | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
1500 | h8300-* | h8500-* \
1501 | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
1502 | i*86-* | i860-* | i960-* | ia64-* \
1503 | ip2k-* | iq2000-* \
1504 - | m32r-* | m32rle-* \
1505 + | m32c-* | m32r-* | m32rle-* \
1506 | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
1507 - | m88110-* | m88k-* | mcore-* \
1508 + | m88110-* | m88k-* | maxq-* | mcore-* \
1509 | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
1511 | mips64-* | mips64el-* \
1513 | mips64vr4100-* | mips64vr4100el-* \
1514 | mips64vr4300-* | mips64vr4300el-* \
1515 | mips64vr5000-* | mips64vr5000el-* \
1516 + | mips64vr5900-* | mips64vr5900el-* \
1517 | mipsisa32-* | mipsisa32el-* \
1518 | mipsisa32r2-* | mipsisa32r2el-* \
1519 | mipsisa64-* | mipsisa64el-* \
1520 @@ -327,27 +349,34 @@
1521 | mipsisa64sr71k-* | mipsisa64sr71kel-* \
1522 | mipstx39-* | mipstx39el-* \
1526 + | nios-* | nios2-* \
1527 | none-* | np1-* | ns16k-* | ns32k-* \
1529 | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
1530 | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
1532 | romp-* | rs6000-* \
1533 - | sh-* | sh[1234]-* | sh[23]e-* | sh[34]eb-* | shbe-* \
1534 + | sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
1535 | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
1536 - | sparc-* | sparc64-* | sparc86x-* | sparclet-* | sparclite-* \
1537 - | sparcv8-* | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \
1538 + | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
1540 + | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \
1541 | tahoe-* | thumb-* \
1542 | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
1544 | v850-* | v850e-* | vax-* \
1546 - | x86-* | x86_64-* | xps100-* | xscale-* | xstormy16-* \
1548 + | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \
1549 + | xstormy16-* | xtensa*-* \
1553 + # Recognize the basic CPU types without company name, with glob match.
1555 + basic_machine=$basic_machine-unknown
1557 # Recognize the various machine names and aliases which stand
1558 # for a CPU type and a company and sometimes even an OS.
1560 @@ -418,6 +447,14 @@
1561 basic_machine=ns32k-sequent
1565 + basic_machine=bfin-unknown
1569 + basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'`
1573 basic_machine=c90-cray
1576 basic_machine=craynv-cray
1580 - basic_machine=cr16c-unknown
1582 + basic_machine=cr16-unknown
1586 @@ -489,6 +526,10 @@
1587 basic_machine=m88k-motorola
1591 + basic_machine=i586-pc
1595 basic_machine=rs6000-bull
1597 @@ -639,6 +680,14 @@
1598 basic_machine=m68k-isi
1602 + basic_machine=m68k-unknown
1606 + basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'`
1610 basic_machine=m88k-omron
1612 @@ -654,6 +703,10 @@
1613 basic_machine=i386-pc
1617 + basic_machine=arm-unknown
1621 basic_machine=m68000-convergent
1624 basic_machine=i386-pc
1628 + basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
1631 basic_machine=i370-ibm
1634 basic_machine=hppa1.1-oki
1638 + openrisc | openrisc-*)
1639 basic_machine=or32-unknown
1643 basic_machine=powerpc-ibm
1644 @@ -778,6 +833,14 @@
1645 basic_machine=i860-intel
1649 + basic_machine=hppa-unknown
1653 + basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'`
1657 basic_machine=sparc-tti
1659 @@ -787,6 +850,12 @@
1661 basic_machine=ns32k-pc532
1664 + basic_machine=i386-pc
1667 + basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'`
1669 pentium | p5 | k5 | k6 | nexgen | viac3)
1670 basic_machine=i586-pc
1672 @@ -843,6 +912,10 @@
1673 basic_machine=i586-unknown
1677 + basic_machine=i386-pc
1681 basic_machine=m68k-rom68k
1683 @@ -869,6 +942,10 @@
1685 basic_machine=mipsisa64sb1el-unknown
1688 + basic_machine=mipsisa32-sde
1692 basic_machine=mips-sei
1695 basic_machine=sh-hitachi
1699 + basic_machine=sh5le-unknown
1702 basic_machine=sh64-unknown
1704 @@ -969,6 +1049,10 @@
1705 basic_machine=tic6x-unknown
1709 + basic_machine=tile-unknown
1713 basic_machine=mipstx39-unknown
1715 @@ -1029,6 +1113,10 @@
1716 basic_machine=hppa1.1-winbond
1720 + basic_machine=i686-pc
1724 basic_machine=xps100-honeywell
1726 @@ -1078,13 +1166,10 @@
1728 basic_machine=we32k-att
1730 - sh3 | sh4 | sh[34]eb | sh[1234]le | sh[23]ele)
1731 + sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele)
1732 basic_machine=sh-unknown
1735 - basic_machine=sh64-unknown
1737 - sparc | sparcv8 | sparcv9 | sparcv9b)
1738 + sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
1739 basic_machine=sparc-sun
1742 @@ -1157,20 +1242,23 @@
1744 | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
1745 | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
1746 - | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* | -openbsd* \
1747 + | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
1748 + | -openbsd* | -solidbsd* \
1749 | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
1750 | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
1751 | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
1752 | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
1753 | -chorusos* | -chorusrdb* \
1754 | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
1755 - | -mingw32* | -linux-gnu* | -linux-uclibc* | -uxpv* | -beos* | -mpeix* | -udk* \
1756 + | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \
1757 + | -uxpv* | -beos* | -mpeix* | -udk* \
1758 | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
1759 | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
1760 | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
1761 | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
1762 | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
1763 - | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly*)
1764 + | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
1765 + | -skyos* | -haiku* | -rdos* | -toppers* | -drops*)
1766 # Remember, each alternative MUST END IN *, to match a version number.
1769 @@ -1188,7 +1276,7 @@
1770 os=`echo $os | sed -e 's|nto|nto-qnx|'`
1772 -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
1773 - | -windows* | -osx | -abug | -netware* | -os9* | -beos* \
1774 + | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \
1775 | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
1778 @@ -1297,6 +1385,9 @@
1788 @@ -1319,6 +1410,12 @@
1789 # system, and we'll never get to this point.
1791 case $basic_machine in
1801 @@ -1328,9 +1425,9 @@
1811 # This must come before the *-dec entry.
1814 @@ -1356,6 +1453,9 @@
1824 @@ -1374,6 +1474,9 @@
1834 @@ -1545,7 +1648,7 @@
1837 echo $basic_machine$os
1842 # eval: (add-hook 'write-file-hooks 'time-stamp)
1843 diff -ur pads-1.2/doc/ChangeLog pads-1.2.mod//doc/ChangeLog
1844 --- pads-1.2/doc/ChangeLog 2005-06-16 00:06:52.000000000 +0200
1845 +++ pads-1.2.mod//doc/ChangeLog 2010-12-19 14:27:38.843334500 +0100
1847 Passive Asset Detection System
1848 -$Id: ChangeLog,v 1.2 2005/06/15 22:06:52 mattshelton Exp $
1849 +$Id: ChangeLog,v 1.2 2005/11/02 23:56:12 jfs Exp $
1850 ------------------------------------------
1852 * Banner Grab Feature - This feature will drop the banners of services into a
1853 diff -ur pads-1.2/doc/INSTALL pads-1.2.mod//doc/INSTALL
1854 --- pads-1.2/doc/INSTALL 2005-02-10 07:05:01.000000000 +0100
1855 +++ pads-1.2.mod//doc/INSTALL 2010-12-19 14:27:38.856667834 +0100
1858 To install PADS, execute the following standard 'autoconf' commands:
1864 -Optionally, run './configure --help' for additional command line options. The following
1865 -options may be used:
1867 ---disable-vendor : This option will disable MAC vendor resolution. This will
1868 - : speed up the application.
1870 ---enable-banner-grab : Compile in the banner grabbing feature. This feature will
1871 - : dump the asset banners into a libpcap-formatted file. This
1872 - : feature will help further identify services and will aid in
1873 - : signature development. Please keep in mind that this will
1874 - : slow down performance
1879 +Optionally, run './configure --help' for additional command line
1880 +options. The following options may be used:
1882 +--disable-vendor : This option will disable MAC vendor
1883 + : resolution. This will : speed up the
1886 +--enable-banner-grab : Compile in the banner grabbing feature. This
1887 + : feature will : dump the asset banners into a
1888 + : libpcap-formatted file. This feature will
1889 + : help further identify services and will aid in
1890 + : signature development. Please keep in mind
1891 + : that this will : slow down performance
1893 +--use-native-pcre : Use the existing PCRE libraries instead of the
1894 + : ones included. This will shrink the size of
1897 ---use-native-pcre : Use the existing PCRE libraries instead of the ones included.
1898 - : This will shrink the size of the executable.
1900 -The libpcap library must be installed before you compile pads. It can be downloaded from
1901 -http://www.tcpdump.org.
1902 +The libpcap library must be installed before you compile pads. It can
1903 +be downloaded from http://www.tcpdump.org.
1906 matt@mattshelton.com
1909 +vim:expandtab:tw=72
1910 +$Id: INSTALL,v 1.2 2005/11/02 23:56:12 jfs Exp $
1911 diff -ur pads-1.2/doc/Makefile.am pads-1.2.mod//doc/Makefile.am
1912 --- pads-1.2/doc/Makefile.am 2005-06-15 23:58:49.000000000 +0200
1913 +++ pads-1.2.mod//doc/Makefile.am 2010-12-19 14:27:38.856667834 +0100
1915 -## $Id: Makefile.am,v 1.2 2005/06/15 21:58:49 mattshelton Exp $
1916 +## $Id: Makefile.am,v 1.2 2005/11/02 23:56:12 jfs Exp $
1917 AUTOMAKE_OPTIONS=foreign no-dependencies
1918 EXTRA_DIST = AUTHORS ChangeLog COPYING CREDITS INSTALL pads.8 pads.conf.8 pads-report.8 README
1920 diff -ur pads-1.2/doc/pads.8 pads-1.2.mod//doc/pads.8
1921 --- pads-1.2/doc/pads.8 2005-06-15 23:57:51.000000000 +0200
1922 +++ pads-1.2.mod//doc/pads.8 2010-12-19 14:27:38.856667834 +0100
1924 .\" along with this program; if not, write to the Free Software
1925 .\" Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
1927 -.\" $Id: pads.8,v 1.2 2005/06/15 21:57:51 mattshelton Exp $
1928 +.\" $Id: pads.8,v 1.2 2005/11/02 23:56:12 jfs Exp $
1929 .TH PADS 8 2005/06/17
1936 -PADS is a libpcap based detection engine used to passively detect network
1937 -assets. It is designed to complement IDS technology by providing context to
1939 +PADS is a libpcap based detection engine used to passively detect
1940 +network assets. It is designed to complement IDS technology by
1941 +providing context to IDS alerts.
1945 -- Passive: Records and identifies traffic seen on a network without actively
1946 - "scanning" a system. There will never be a packet sent from the pads
1949 -- Portable: Has the ability to be placed easily on a remote system. Does not
1950 - require additional external libraries other than those associated with
1953 -- Lightweight: Logging is sent to a simple CSV file. There is no need for a
1954 - database or other data repository installed on the local machine. All
1955 - correlation is done outside of the pads program.
1956 +- Passive: Records and identifies traffic seen on a network without
1957 + actively "scanning" a system. There will never be a packet sent from
1958 + the pads application.
1960 +- Portable: Has the ability to be placed easily on a remote system.
1961 + Does not require additional external libraries other than those
1962 + associated with libpcap.
1964 +- Lightweight: Logging is sent to a simple CSV file. There is no need
1965 + for a database or other data repository installed on the local
1966 + machine. All correlation is done outside of the pads program.
1971 Run PADS in the background (daemon mode).
1974 -Dump banner data into a libpcap formatted file. This feature will dump the
1975 -matched packet or the first 4 packets of an unmatched connection into a
1976 -specified file. This can be used to further identify a service and also aid
1977 -with signature development.
1979 -Please keep in mind that this feature must be compiled into the application in
1980 -order to use it. This can be done by adding '--enable-banner-grab' to the
1982 +Dump banner data into a libpcap formatted file. This feature will dump
1983 +the matched packet or the first 4 packets of an unmatched connection
1984 +into a specified file. This can be used to further identify a service
1985 +and also aid with signature development.
1987 +Please keep in mind that this feature must be compiled into the
1988 +application in order to use it. This can be done by adding
1989 +'--enable-banner-grab' to the 'configure' step.
1992 -This switch allows you to specify a group that PADS will drop to after the
1993 -libpcap interface has been initialized.
1994 +This switch allows you to specify a group that PADS will drop to after
1995 +the libpcap interface has been initialized.
2000 Specify an interface to be used.
2002 .IP "-n network list"
2003 -Specify a set of networks to be monitored. Only assets that exist within
2004 -these networks will be recorded. The networks should be specified in the
2005 -following format: \fI
2006 +Specify a set of networks to be monitored. Only assets that exist
2007 +within these networks will be recorded. The networks should be
2008 +specified in the following format: \fI
2009 10.10.10.0/24,192.168.0.0/16 \fP.
2012 -This switch allows you to specify a PID file to be used in conjunction with
2014 +This switch allows you to specify a PID file to be used in conjunction
2015 +with daemon (-D) mode.
2018 Read packets from a libpcap formatted file.
2021 -This switch allows you to specify a user that PADS will drop to after the
2022 -libpcap interface has been initialized.
2023 +This switch allows you to specify a user that PADS will drop to after
2024 +the libpcap interface has been initialized.
2027 Dump data into a file other than assets.csv.
2029 .IP "\fI expression\fP"
2030 -selects which packets will be processed. Please see \fI tcpdump(1)\fP for
2031 -details on the libpcap primitives.
2032 +selects which packets will be processed. Please see \fI tcpdump(1)\fP
2033 +for details on the libpcap primitives.
2036 pads.conf(8), pads-report(8), pads-archiver(8), tcpdump(8), pcre(3)
2040 Matt Shelton <matt@mattshelton.com>
2042 +.\" vim:tw=72 expandtab:
2043 diff -ur pads-1.2/doc/pads.conf.8 pads-1.2.mod//doc/pads.conf.8
2044 --- pads-1.2/doc/pads.conf.8 2005-06-15 23:57:12.000000000 +0200
2045 +++ pads-1.2.mod//doc/pads.conf.8 2010-12-19 14:27:38.856667834 +0100
2047 .\" along with this program; if not, write to the Free Software
2048 .\" Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
2050 -.\" $Id: pads.conf.8,v 1.1 2005/06/15 21:57:12 mattshelton Exp $
2051 +.\" $Id: pads.conf.8,v 1.2 2005/11/02 23:56:12 jfs Exp $
2052 .TH pads.conf 8 2005/06/17
2059 -his parameter determines whether the application will go into the background.
2060 +his parameter determines whether the application will go into the
2062 0 = Disable, 1 = Enable
2064 .IP "pid_file <file>"
2066 This contains the name of the interface PADS will listen to.
2068 .IP "filter <filter>"
2069 -This value contains a libpcap filter to be applied to the PADS session. For
2070 -example, to filter only SSH traffice, specify "filter 'port 22'".
2071 +This value contains a libpcap filter to be applied to the PADS session.
2072 +For example, to filter only SSH traffice, specify "filter 'port 22'".
2074 .IP "network <network>"
2075 -This string contains a comma seperated list of networks to be monitored. Only
2076 -assets found in these networks will be recorded. For example, "network
2077 -192.168.0.0/24,192.168.1.0/24,10.10.10.0/24".
2078 +This string contains a comma seperated list of networks to be monitored.
2079 +Only assets found in these networks will be recorded. For example,
2080 + "network 192.168.0.0/24,192.168.1.0/24,10.10.10.0/24".
2083 This output plugin displays PADS data to the screen. When using the
2084 configuration file, it defaults to off.
2086 .IP "output csv: <filename>"
2087 -This output plugin writes PADS data to a CSV file. Optionally, a CSV filename
2088 -can be specified as an argument.
2089 +This output plugin writes PADS data to a CSV file. Optionally, a CSV
2090 +filename can be specified as an argument.
2092 .IP "output fifo: <filename>"
2093 This output plugin writes PADS data to a FIFO file. Optionally, a FIFO
2097 Matt Shelton <matt@mattshelton.com>
2099 +.\" vim:tw=72 expandtab:
2100 diff -ur pads-1.2/doc/pads-report.8 pads-1.2.mod//doc/pads-report.8
2101 --- pads-1.2/doc/pads-report.8 2005-06-16 00:02:19.000000000 +0200
2102 +++ pads-1.2.mod//doc/pads-report.8 2010-12-19 14:27:38.856667834 +0100
2104 .\" along with this program; if not, write to the Free Software
2105 .\" Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
2107 -.\" $Id: pads-report.8,v 1.2 2005/06/15 22:02:19 mattshelton Exp $
2108 +.\" $Id: pads-report.8,v 1.2 2005/11/02 23:56:12 jfs Exp $
2109 .TH PADS 8 2005/06/17
2116 -pads-report is a Perl based reporting module to be used with Passive Asset Detection System (PADS). It will take
2117 -a raw PADS data file and process it into a readable text report.
2118 +pads-report is a Perl based reporting module to be used with Passive
2119 +Asset Detection System (PADS). It will take a raw PADS data file and
2120 +process it into a readable text report.
2125 Do not convert IP addresses to names.
2128 -Do not convert RFC 1918 IP addresses to names. The \fI -n\fP option will
2129 -override this option.
2130 +Do not convert RFC 1918 IP addresses to names. The \fI -n\fP option
2131 +will override this option.
2134 Read packets from a libpcap formatted file.
2138 Matt Shelton <matt@mattshelton.com>
2140 +.\" vim:tw=72 expandtab:
2141 diff -ur pads-1.2/doc/README pads-1.2.mod//doc/README
2142 --- pads-1.2/doc/README 2005-06-16 00:09:34.000000000 +0200
2143 +++ pads-1.2.mod//doc/README 2010-12-19 14:27:38.843334500 +0100
2148 -- Passive: Records and identifies traffic seen on a network without actively "scanning" a system.
2149 - There will never be a packet sent from the pads applications.
2151 -- Portable: Has the ability to be placed easily on a remote system. Does not require additional
2152 - external libraries other than those associated with libpcap.
2154 -- Lightweight: Logging is sent to a simple CSV file. There is no need for a database or other data
2155 - repository installed on the local machine. All correlation is done outside of the pads program.
2156 +- Passive: Records and identifies traffic seen on a network without
2157 + actively "scanning" a system. There will never be a packet sent from
2158 + the pads applications.
2160 +- Portable: Has the ability to be placed easily on a remote system.
2161 + Does not require additional external libraries other than those
2162 + associated with libpcap.
2164 +- Lightweight: Logging is sent to a simple CSV file. There is no need
2165 + for a database or other data repository installed on the local
2166 + machine. All correlation is done outside of the pads program.
2171 -Asset management is an important factor in information security. A good security administrator should
2172 -keep track of all devices attached to the network. Even though active scanners such as nmap and Nessus
2173 -are valuable tools, sometimes it necessary to identify network devices in a passive manner. Pads was
2174 -developed to sit along side the promiscuous interface of an IDS device. It will listen to network traffic
2175 -and attempt to identify the applications running on the network.
2176 +Asset management is an important factor in information security. A good
2177 +security administrator should keep track of all devices attached to the
2178 +network. Even though active scanners such as nmap and Nessus are
2179 +valuable tools, sometimes it necessary to identify network devices in a
2180 +passive manner. Pads was developed to sit along side the promiscuous
2181 +interface of an IDS device. It will listen to network traffic and
2182 +attempt to identify the applications running on the network.
2187 -By day I am an IDS analyst for a managed security provider. One of the challenges I face on a daily
2188 -basis is the inability to obtain customer asset data, particularly with the larger customers. This
2189 -information is critical not only for analysis but also device placement and tuning.
2191 -Many IDS deployments consist of a device with two interfaces. One interface contains a promiscuous
2192 -link to a remote network and the other link is for management and lives in the DMZ. This makes
2193 -active network scanners, like nmap, useless because the IDS team does not have anything but a one
2194 -way link into the network. They can only listen to traffic, not produce anything.
2196 -Pads was developed to solve this problem. It is modeled after my favorite scanning tool nmap,
2197 -specifically the .-sV. option. Unlike nmap, it will not generate any traffic while mapping the
2198 -network. Unfortunately, this method is potentially less accurate than active scanning but is often
2199 -necessary in an IDS environment.
2201 -As mentioned earlier, I am an IDS analyst by day. I see programming as a tool to aid me in my job.
2202 -This project was developed outside of work since I do not get paid to code. It was written to
2203 -fulfill a need for me. Hopefully others within the community will also get the chance to benefit
2205 +By day I am an IDS analyst for a managed security provider. One of the
2206 +challenges I face on a daily basis is the inability to obtain customer
2207 +asset data, particularly with the larger customers. This information is
2208 +critical not only for analysis but also device placement and tuning.
2210 +Many IDS deployments consist of a device with two interfaces. One
2211 +interface contains a promiscuous link to a remote network and the other
2212 +link is for management and lives in the DMZ. This makes active network
2213 +scanners, like nmap, useless because the IDS team does not have anything
2214 +but a one way link into the network. They can only listen to traffic,
2215 +not produce anything.
2217 +Pads was developed to solve this problem. It is modeled after my
2218 +favorite scanning tool nmap, specifically the .-sV. option. Unlike
2219 +nmap, it will not generate any traffic while mapping the network.
2220 +Unfortunately, this method is potentially less accurate than active
2221 +scanning but is often necessary in an IDS environment.
2223 +As mentioned earlier, I am an IDS analyst by day. I see programming as
2224 +a tool to aid me in my job. This project was developed outside of work
2225 +since I do not get paid to code. It was written to fulfill a need for
2226 +me. Hopefully others within the community will also get the chance to
2233 -w <file> : Dump data into file other than assets.csv.
2235 -Additional arguments will be processed as a libpcap filter. For example,
2236 -the following command will not only use interface hme1 but will also only
2237 -search for assets on port 22:
2238 +Additional arguments will be processed as a libpcap filter. For
2239 +example, the following command will not only use interface hme1 but will
2240 +also only search for assets on port 22:
2242 pads -i hme1 port 22
2246 -Regular expression support is provided by the PCRE library package, which is open source software,
2247 -written by Philip Hazel, and copyright by the University of Cambridge, England. It can be found on
2248 -the following FTP site:
2249 - ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/
2250 +Regular expression support is provided by the PCRE library package,
2251 +which is open source software, written by Philip Hazel, and copyright by
2252 +the University of Cambridge, England. It can be found on the following
2254 + ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/
2259 -Please let me know if you have constuctive feedback, need help, or have a bug / issue with the
2260 -application. For the time being, please contact me at matt@mattshelton.com.
2261 +Please let me know if you have constuctive feedback, need help, or have
2262 +a bug / issue with the application. For the time being, please contact
2263 +me at matt@mattshelton.com.
2268 -$Id: README,v 1.2 2005/06/15 22:09:34 mattshelton Exp $
2270 +vim:expandtab:sw=4:ts=4:tw=72:
2271 +$Id: README,v 1.2 2005/11/02 23:56:12 jfs Exp $
2272 diff -ur pads-1.2/etc/Makefile.am pads-1.2.mod//etc/Makefile.am
2273 --- pads-1.2/etc/Makefile.am 2005-05-14 22:13:20.000000000 +0200
2274 +++ pads-1.2.mod//etc/Makefile.am 2010-12-19 14:27:38.743334500 +0100
2276 -## $Id: Makefile.am,v 1.2 2005/05/14 20:13:20 mattshelton Exp $
2277 +## $Id: Makefile.am,v 1.2 2005/11/02 23:56:12 jfs Exp $
2278 AUTOMAKE_OPTIONS=foreign no-dependencies
2281 diff -ur pads-1.2/etc/pads.conf pads-1.2.mod//etc/pads.conf
2282 --- pads-1.2/etc/pads.conf 2005-05-21 18:35:11.000000000 +0200
2283 +++ pads-1.2.mod//etc/pads.conf 2010-12-19 14:27:38.743334500 +0100
2285 # This file contains configuration parameters for the PADS application. Please
2286 # visit http://passive.sourceforge.net for further information.
2288 -# $Id: pads.conf,v 1.5 2005/05/21 16:35:11 mattshelton Exp $
2289 +# $Id: pads.conf,v 1.3 2005/11/06 16:09:54 dgil-guest Exp $
2291 # ------------------------------------------------------------------------------
2294 # -------------------------
2295 # This output plugin writes PADS data to a CSV file. Optionally, a CSV filename
2296 # can be specified as an argument.
2297 -output csv: assets.csv
2298 +output csv: /var/lib/pads/assets.csv
2301 # -------------------------
2302 # This output plugin writes PADS data to a FIFO file. Optionally, a FIFO
2303 # filename can be specified as an argument.
2304 -#output fifo: pads.fifo
2305 +#output fifo: /var/lib/pads/pads.fifo
2306 diff -ur pads-1.2/etc/pads-ether-codes pads-1.2.mod//etc/pads-ether-codes
2307 --- pads-1.2/etc/pads-ether-codes 2005-02-10 07:05:01.000000000 +0100
2308 +++ pads-1.2.mod//etc/pads-ether-codes 2010-12-19 14:27:38.740001167 +0100
2310 # This file contains vendor codes used to map MAC addresses to vendor
2311 # names. It was taken from the Ettercap.
2313 -# $Id: pads-ether-codes,v 1.1 2005/02/10 06:05:01 mattshelton Exp $
2314 +# $Id: pads-ether-codes,v 1.2 2005/11/02 23:56:12 jfs Exp $
2316 ############################################################################
2318 diff -ur pads-1.2/etc/pads-signature-list pads-1.2.mod//etc/pads-signature-list
2319 --- pads-1.2/etc/pads-signature-list 2005-02-10 07:05:03.000000000 +0100
2320 +++ pads-1.2.mod//etc/pads-signature-list 2010-12-19 14:27:38.743334500 +0100
2322 # surrounding /'s. The signature should have one or two sets of ()'s
2323 # depending on the Version Info field.
2325 -# $Id: pads-signature-list,v 1.1 2005/02/10 06:05:03 mattshelton Exp $
2326 +# $Id: pads-signature-list,v 1.2 2005/11/02 23:56:12 jfs Exp $
2328 ############################################################################
2329 ssh,v/OpenSSH/$2/Protocol $1/,SSH-([.\d]+)-OpenSSH[_-](\S+)
2330 diff -ur pads-1.2/lib/bstring/Makefile.am pads-1.2.mod//lib/bstring/Makefile.am
2331 --- pads-1.2/lib/bstring/Makefile.am 2005-02-13 18:54:58.000000000 +0100
2332 +++ pads-1.2.mod//lib/bstring/Makefile.am 2010-12-19 14:27:38.730001168 +0100
2334 -# $Id: Makefile.am,v 1.1 2005/02/13 17:54:58 mattshelton Exp $
2335 +# $Id: Makefile.am,v 1.2 2005/11/02 23:56:12 jfs Exp $
2336 AUTOMAKE_OPTIONS=foreign no-dependencies
2337 noinst_LIBRARIES = libbstring.a
2338 libbstring_a_SOURCES = bstrlib.c bstrlib.h bstraux.c bstraux.h util.c util.h
2339 diff -ur pads-1.2/lib/bstring/Makefile.in pads-1.2.mod//lib/bstring/Makefile.in
2340 --- pads-1.2/lib/bstring/Makefile.in 2005-06-16 05:40:05.000000000 +0200
2341 +++ pads-1.2.mod//lib/bstring/Makefile.in 2010-12-19 14:27:38.730001168 +0100
2343 sysconfdir = @sysconfdir@
2344 target_alias = @target_alias@
2346 -# $Id: Makefile.am,v 1.1 2005/02/13 17:54:58 mattshelton Exp $
2347 +# $Id: Makefile.in,v 1.2 2005/11/02 23:56:12 jfs Exp $
2348 AUTOMAKE_OPTIONS = foreign no-dependencies
2349 noinst_LIBRARIES = libbstring.a
2350 libbstring_a_SOURCES = bstrlib.c bstrlib.h bstraux.c bstraux.h util.c util.h
2351 diff -ur pads-1.2/lib/bstring/util.c pads-1.2.mod//lib/bstring/util.c
2352 --- pads-1.2/lib/bstring/util.c 2005-02-13 18:54:58.000000000 +0100
2353 +++ pads-1.2.mod//lib/bstring/util.c 2010-12-19 14:27:38.723334500 +0100
2355 * along with this program; if not, write to the Free Software
2356 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
2358 - * $Id: util.c,v 1.1 2005/02/13 17:54:58 mattshelton Exp $
2359 + * $Id: util.c,v 1.2 2005/11/02 23:56:12 jfs Exp $
2361 **************************************************************************/
2363 diff -ur pads-1.2/lib/bstring/util.h pads-1.2.mod//lib/bstring/util.h
2364 --- pads-1.2/lib/bstring/util.h 2005-02-13 18:54:58.000000000 +0100
2365 +++ pads-1.2.mod//lib/bstring/util.h 2010-12-19 14:27:38.730001168 +0100
2367 * along with this program; if not, write to the Free Software
2368 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
2370 - * $Id: util.h,v 1.1 2005/02/13 17:54:58 mattshelton Exp $
2371 + * $Id: util.h,v 1.2 2005/11/02 23:56:12 jfs Exp $
2373 **************************************************************************/
2375 +#ifndef _BSTRING_UTIL_H
2376 +#define _BSTRING_UTIL_H
2378 /* INCLUDES ---------------------------------------- */
2379 #include "bstrlib.h"
2382 int bltrim (bstring string);
2383 int brtrim (bstring string);
2384 int btrim (bstring string);
2387 diff -ur pads-1.2/lib/Makefile.am pads-1.2.mod//lib/Makefile.am
2388 --- pads-1.2/lib/Makefile.am 2005-02-13 18:54:58.000000000 +0100
2389 +++ pads-1.2.mod//lib/Makefile.am 2010-12-19 14:27:38.723334500 +0100
2391 -## $Id: Makefile.am,v 1.2 2005/02/13 17:54:58 mattshelton Exp $
2392 +## $Id: Makefile.am,v 1.2 2005/11/02 23:56:12 jfs Exp $
2393 AUTOMAKE_OPTIONS=foreign no-dependencies
2395 diff -ur pads-1.2/Makefile.am pads-1.2.mod//Makefile.am
2396 --- pads-1.2/Makefile.am 2005-02-10 06:53:42.000000000 +0100
2397 +++ pads-1.2.mod//Makefile.am 2010-12-19 14:27:38.723334500 +0100
2399 -## $Id: Makefile.am,v 1.1 2005/02/10 05:53:42 mattshelton Exp $
2400 +## $Id: Makefile.am,v 1.2 2005/11/02 23:56:12 jfs Exp $
2401 AUTOMAKE_OPTIONS=foreign no-dependencies
2402 SUBDIRS = doc etc lib src
2403 EXTRA_DIST = COPYING
2404 diff -ur pads-1.2/src/configuration.c pads-1.2.mod//src/configuration.c
2405 --- pads-1.2/src/configuration.c 2005-04-27 15:50:29.000000000 +0200
2406 +++ pads-1.2.mod//src/configuration.c 2010-12-19 14:27:38.773334500 +0100
2408 * along with this program; if not, write to the Free Software
2409 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
2411 - * $Id: configuration.c,v 1.3 2005/04/27 13:50:29 mattshelton Exp $
2412 + * $Id: configuration.c,v 1.3 2005/11/02 23:56:12 jfs Exp $
2414 **************************************************************************/
2415 #include "configuration.h"
2419 bstrListDestroy(lines);
2424 /* ----------------------------------------------------------
2425 diff -ur pads-1.2/src/configuration.h pads-1.2.mod//src/configuration.h
2426 --- pads-1.2/src/configuration.h 2005-02-18 06:50:19.000000000 +0100
2427 +++ pads-1.2.mod//src/configuration.h 2010-12-19 14:27:38.783334500 +0100
2429 * along with this program; if not, write to the Free Software
2430 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
2432 - * $Id: configuration.h,v 1.2 2005/02/18 05:50:19 mattshelton Exp $
2433 + * $Id: configuration.h,v 1.3 2005/11/02 23:56:12 jfs Exp $
2435 **************************************************************************/
2437 +#ifndef _PADS_CONFIGURATION_H
2438 /* DEFINES ----------------------------------------- */
2439 +#define _PADS_CONFIGURATION_H 1
2446 /* INCLUDES ---------------------------------------- */
2447 -#include "global.h"
2450 +#include "global.h"
2452 #include "bstring/bstrlib.h"
2453 +#include "bstring/util.h"
2455 /* PROTOTYPES -------------------------------------- */
2456 void init_configuration (bstring conf_file);
2459 /* External Prototypes */
2460 int activate_output_plugin (bstring name, bstring args);
2462 diff -ur pads-1.2/src/global.h pads-1.2.mod//src/global.h
2463 --- pads-1.2/src/global.h 2005-04-27 15:45:47.000000000 +0200
2464 +++ pads-1.2.mod//src/global.h 2010-12-19 14:27:38.783334500 +0100
2466 * along with this program; if not, write to the Free Software
2467 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
2469 - * $Id: global.h,v 1.7 2005/04/27 13:45:47 mattshelton Exp $
2470 + * $Id: global.h,v 1.3 2005/11/02 23:56:12 jfs Exp $
2472 **************************************************************************/
2474 +#ifndef _PADS_GLOBAL_H
2475 +#define _PADS_GLOBAL_H 1
2476 #ifdef HAVE_CONFIG_H
2480 /* GLOBAL VARIABLES -------------------------------- */
2484 /* vim:expandtab:cindent:smartindent:ts=4:tw=0:sw=4:
2486 diff -ur pads-1.2/src/identification.c pads-1.2.mod//src/identification.c
2487 --- pads-1.2/src/identification.c 2005-05-14 22:14:34.000000000 +0200
2488 +++ pads-1.2.mod//src/identification.c 2010-12-19 14:27:38.783334500 +0100
2490 * along with this program; if not, write to the Free Software
2491 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
2493 - * $Id: identification.c,v 1.5 2005/05/14 20:14:34 mattshelton Exp $
2494 + * $Id: identification.c,v 1.3 2005/11/02 23:56:12 jfs Exp $
2496 **************************************************************************/
2497 #include "identification.h"
2501 bstrListDestroy(lines);
2509 /* Check to see if this line has something to read. */
2510 if (line->data[0] == '\0' || line->data[0] == '#')
2515 if ((raw_sig = bsplit(line, ',')) == NULL)
2517 Signature *list = signature_list;
2523 while (list != NULL) {
2525 printf("2a: %s\n", bdata(list->title.app));
2526 printf("2b: %s\n", bdata(list->title.ver));
2527 printf("2c: %s\n", bdata(list->title.misc));
2528 - printf("3: %s\n", list->regex);
2529 + printf("3: %s\n", (char *) list->regex);
2533 diff -ur pads-1.2/src/identification.h pads-1.2.mod//src/identification.h
2534 --- pads-1.2/src/identification.h 2005-02-13 19:28:28.000000000 +0100
2535 +++ pads-1.2.mod//src/identification.h 2010-12-19 14:27:38.763334501 +0100
2537 * along with this program; if not, write to the Free Software
2538 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
2540 - * $Id: identification.h,v 1.2 2005/02/13 18:28:28 mattshelton Exp $
2541 + * $Id: identification.h,v 1.3 2005/11/02 23:56:12 jfs Exp $
2543 **************************************************************************/
2545 +#ifndef _PADS_IDENTIFICATION_H
2546 /* INCLUDES ---------------------------------------- */
2547 +#define _PADS_IDENTIFICATION_H 1
2553 +#include "storage.h"
2554 +#include "output/output.h"
2556 #include <netinet/ip.h>
2557 #include <netinet/tcp.h>
2561 /* GLOBALS ----------------------------------------- */
2563 diff -ur pads-1.2/src/mac-resolution.c pads-1.2.mod//src/mac-resolution.c
2564 --- pads-1.2/src/mac-resolution.c 2005-05-14 22:15:21.000000000 +0200
2565 +++ pads-1.2.mod//src/mac-resolution.c 2010-12-19 14:27:38.763334501 +0100
2567 * along with this program; if not, write to the Free Software
2568 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
2570 - * $Id: mac-resolution.c,v 1.5 2005/05/14 20:15:21 mattshelton Exp $
2571 + * $Id: mac-resolution.c,v 1.3 2005/11/02 23:56:12 jfs Exp $
2573 **************************************************************************/
2574 #ifndef DISABLE_VENDOR
2578 bstrListDestroy(lines);
2590 /* Parse out the contents of the line. */
2591 if (sscanf(bdata(line), "%02X:%02X:%02X %80[^,\n],\n", &m1, &m2, &m3, vendor) != 4)
2596 while(list != NULL) {
2597 - printf("Mac: %s\nVendor: %s\n\n", list->mac, bdata(list->vendor));
2598 + printf("Mac: %d\nVendor: %s\n\n", list->mac, bdata(list->vendor));
2602 diff -ur pads-1.2/src/mac-resolution.h pads-1.2.mod//src/mac-resolution.h
2603 --- pads-1.2/src/mac-resolution.h 2005-02-16 02:47:35.000000000 +0100
2604 +++ pads-1.2.mod//src/mac-resolution.h 2010-12-19 14:27:38.783334500 +0100
2606 * along with this program; if not, write to the Free Software
2607 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
2609 - * $Id: mac-resolution.h,v 1.3 2005/02/16 01:47:35 mattshelton Exp $
2610 + * $Id: mac-resolution.h,v 1.3 2005/11/02 23:56:12 jfs Exp $
2612 **************************************************************************/
2614 +#ifndef _PADS_MAC_RESOLUTION_H
2615 /* DEFINES ----------------------------------------- */
2616 +#define _PADS_MAC_RESOLUTION_H 1
2618 /* INCLUDES ---------------------------------------- */
2624 /* PROTOTYPES -------------------------------------- */
2627 void show_vendor (void);
2631 diff -ur pads-1.2/src/Makefile.am pads-1.2.mod//src/Makefile.am
2632 --- pads-1.2/src/Makefile.am 2005-02-17 17:29:54.000000000 +0100
2633 +++ pads-1.2.mod//src/Makefile.am 2010-12-19 14:27:38.773334500 +0100
2635 -## $Id: Makefile.am,v 1.3 2005/02/17 16:29:54 mattshelton Exp $
2636 +## $Id: Makefile.am,v 1.2 2005/11/02 23:56:12 jfs Exp $
2637 AUTOMAKE_OPTIONS=foreign no-dependencies
2639 pads_SOURCES = pads.c pads.h \
2640 diff -ur pads-1.2/src/monnet.c pads-1.2.mod//src/monnet.c
2641 --- pads-1.2/src/monnet.c 2005-02-17 17:29:14.000000000 +0100
2642 +++ pads-1.2.mod//src/monnet.c 2010-12-19 14:27:38.773334500 +0100
2644 * along with this program; if not, write to the Free Software
2645 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
2647 - * $Id: monnet.c,v 1.3 2005/02/17 16:29:14 mattshelton Exp $
2648 + * $Id: monnet.c,v 1.2 2005/11/02 23:56:12 jfs Exp $
2650 **************************************************************************/
2655 char network[16], netmask[3], tmp[16];
2656 - struct in_addr in_net;
2658 /* Make sure something was defined. */
2659 if (cmdline == NULL)
2660 diff -ur pads-1.2/src/monnet.h pads-1.2.mod//src/monnet.h
2661 --- pads-1.2/src/monnet.h 2005-02-10 07:05:05.000000000 +0100
2662 +++ pads-1.2.mod//src/monnet.h 2010-12-19 14:27:38.743334500 +0100
2664 * along with this program; if not, write to the Free Software
2665 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
2667 - * $Id: monnet.h,v 1.1 2005/02/10 06:05:05 mattshelton Exp $
2668 + * $Id: monnet.h,v 1.3 2005/11/02 23:56:12 jfs Exp $
2670 **************************************************************************/
2672 +#ifndef _PADS_MONNET_H
2673 /* INCLUDES ---------------------------------------- */
2674 +#define _PADS_MONNET_H 1
2676 +#include <stdlib.h>
2677 #include <sys/types.h>
2678 +#include <arpa/inet.h>
2679 #include <netinet/in.h>
2683 /* DATA STRUCTURES --------------------------------- */
2688 /* GLOBALS ----------------------------------------- */
2690 diff -ur pads-1.2/src/output/Makefile.am pads-1.2.mod//src/output/Makefile.am
2691 --- pads-1.2/src/output/Makefile.am 2005-02-10 07:05:06.000000000 +0100
2692 +++ pads-1.2.mod//src/output/Makefile.am 2010-12-19 14:27:38.823334501 +0100
2694 -# $Id: Makefile.am,v 1.1 2005/02/10 06:05:06 mattshelton Exp $
2695 +# $Id: Makefile.am,v 1.2 2005/11/02 23:56:12 jfs Exp $
2696 AUTOMAKE_OPTIONS=foreign no-dependencies
2697 noinst_LIBRARIES = liboutput.a
2698 liboutput_a_SOURCES = output.c output.h \
2699 diff -ur pads-1.2/src/output/Makefile.in pads-1.2.mod//src/output/Makefile.in
2700 --- pads-1.2/src/output/Makefile.in 2005-06-16 05:40:05.000000000 +0200
2701 +++ pads-1.2.mod//src/output/Makefile.in 2010-12-19 14:27:38.810001166 +0100
2703 sysconfdir = @sysconfdir@
2704 target_alias = @target_alias@
2706 -# $Id: Makefile.am,v 1.1 2005/02/10 06:05:06 mattshelton Exp $
2707 +# $Id: Makefile.in,v 1.2 2005/11/02 23:56:12 jfs Exp $
2708 AUTOMAKE_OPTIONS = foreign no-dependencies
2709 noinst_LIBRARIES = liboutput.a
2710 liboutput_a_SOURCES = output.c output.h \
2711 diff -ur pads-1.2/src/output/output.c pads-1.2.mod//src/output/output.c
2712 --- pads-1.2/src/output/output.c 2005-02-18 06:39:09.000000000 +0100
2713 +++ pads-1.2.mod//src/output/output.c 2010-12-19 14:27:38.823334501 +0100
2715 * along with this program; if not, write to the Free Software
2716 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
2718 - * $Id: output.c,v 1.3 2005/02/18 05:39:09 mattshelton Exp $
2719 + * $Id: output.c,v 1.3 2005/11/02 23:56:12 jfs Exp $
2721 **************************************************************************/
2725 /* Make sure that a record was found. */
2730 /* Cycle through output plugins and print to those that are active. */
2731 head = output_plugin_list;
2734 /* Make sure that a record was found. */
2739 /* Cycle through output plugins and print to those that are active. */
2740 head = output_plugin_list;
2741 @@ -298,8 +298,12 @@
2743 int debug_output_list (void)
2745 - OutputPluginList *head, *head2;
2746 - OutputPlugin *tmp, *tmp2;
2747 + OutputPluginList *head;
2748 + OutputPlugin *tmp;
2750 + * OutputPluginList *head2;
2751 + * OutputPlugin *tmp2;
2755 printf("output_plugin_list:\n");
2756 diff -ur pads-1.2/src/output/output-csv.c pads-1.2.mod//src/output/output-csv.c
2757 --- pads-1.2/src/output/output-csv.c 2005-02-22 17:09:25.000000000 +0100
2758 +++ pads-1.2.mod//src/output/output-csv.c 2010-12-19 14:27:38.810001166 +0100
2760 /*************************************************************************
2763 - * Matt Shelton <matt@mattshelton.com>
2764 + * Matt Shelton <matt@mattshelton.com>
2766 * This output module writes PADS data to a CSV file.
2768 - * Copyright (C) 2004 Matt Shelton <matt@mattshelton.com>
2769 + * Copyright (C) 2004, 2005 Matt Shelton <matt@mattshelton.com>
2771 * This program is free software; you can redistribute it and/or modify
2772 * it under the terms of the GNU General Public License as published by
2774 * along with this program; if not, write to the Free Software
2775 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
2777 - * $Id: output-csv.c,v 1.6 2005/02/22 16:09:25 mattshelton Exp $
2778 + * $Id: output-csv.c,v 1.3 2005/11/02 23:56:12 jfs Exp $
2780 **************************************************************************/
2781 #include "output-csv.h"
2783 OutputCSVConf output_csv_conf;
2785 /* ----------------------------------------------------------
2786 - * FUNCTION : setup_output_csv
2787 - * DESCRIPTION : This function will register the output
2790 - * RETURN : 0 - Success
2792 + * FUNCTION : setup_output_csv
2793 + * DESCRIPTION : This function will register the output
2796 + * RETURN : 0 - Success
2798 * ---------------------------------------------------------- */
2800 setup_output_csv (void)
2802 OutputPlugin *plugin;
2805 /* Allocate and setup plugin data record. */
2806 plugin = (OutputPlugin*)malloc(sizeof(OutputPlugin));
2809 /* Register plugin with input module. */
2810 if ((register_output_plugin(plugin)) == -1) {
2811 - if (plugin != NULL)
2813 - log_message("warning: 'register_output_plugin' in function 'setup_output_csv' failed.");
2814 + if (plugin != NULL)
2816 + log_message("warning: 'register_output_plugin' in function 'setup_output_csv' failed.");
2822 /* ----------------------------------------------------------
2823 - * FUNCTION : init_output_csv
2824 - * DESCRIPTION : This function will initialize the output
2825 - * : CSV file. If the file already exists, it
2826 - * : will read in the file and add each asset
2827 - * : to the asset data structure.
2828 - * INPUT : 0 - CSV filename
2830 + * FUNCTION : init_output_csv
2831 + * DESCRIPTION : This function will initialize the output
2832 + * : CSV file. If the file already exists, it
2833 + * : will read in the file and add each asset
2834 + * : to the asset data structure.
2835 + * INPUT : 0 - CSV filename
2837 * --------------------------------------------------------- */
2839 init_output_csv (bstring filename)
2842 /* Make sure filename isn't NULL. */
2843 if (filename != NULL)
2844 - output_csv_conf.filename = bstrcpy(filename);
2845 + output_csv_conf.filename = bstrcpy(filename);
2847 - output_csv_conf.filename = bstrcpy(bfromcstr("assets.csv"));
2848 + output_csv_conf.filename = bstrcpy(bfromcstr("assets.csv"));
2850 /* Check to see if *filename exists. */
2851 if ((fp = fopen(bdata(output_csv_conf.filename), "r")) == NULL) {
2853 - /* File does not exist, create new.. */
2854 - if ((output_csv_conf.file = fopen(bdata(output_csv_conf.filename), "w")) != NULL) {
2855 - fprintf(output_csv_conf.file, "asset,port,proto,service,application,discovered\n");
2858 - err_message("Cannot open file %s!", bdata(output_csv_conf.filename));
2860 + /* File does not exist, create new.. */
2861 + if ((output_csv_conf.file = fopen(bdata(output_csv_conf.filename), "w")) != NULL) {
2862 + fprintf(output_csv_conf.file, "asset,port,proto,service,application,discovered\n");
2865 + err_message("Cannot open file %s!", bdata(output_csv_conf.filename));
2870 - /* File does exist, read it into data structure. */
2872 - read_report_file();
2874 - /* Open file and assign it to the global FILE pointer. */
2875 - if ((output_csv_conf.file = fopen(bdata(output_csv_conf.filename), "a")) == NULL) {
2876 - err_message("Cannot open file %s!", bdata(output_csv_conf.filename));
2878 + /* File does exist, read it into data structure. */
2880 + read_report_file();
2882 + /* Open file and assign it to the global FILE pointer. */
2883 + if ((output_csv_conf.file = fopen(bdata(output_csv_conf.filename), "a")) == NULL) {
2884 + err_message("Cannot open file %s!", bdata(output_csv_conf.filename));
2892 /* ----------------------------------------------------------
2893 - * FUNCTION : read_report_file
2894 - * DESCRIPTION : This function will read in a specified
2895 - * : report CSV file. It will then break a part
2896 - * : the line and add the assets to the
2897 - * : specified asset data structure.
2900 + * FUNCTION : read_report_file
2901 + * DESCRIPTION : This function will read in a specified
2902 + * : report CSV file. It will then break a part
2903 + * : the line and add the assets to the
2904 + * : specified asset data structure.
2907 * ---------------------------------------------------------- */
2909 read_report_file (void)
2910 @@ -130,30 +129,30 @@
2912 /* Open Signature File */
2913 if ((fp = fopen(bdata(output_csv_conf.filename), "r")) == NULL) {
2914 - err_message("Unable to open CSV file - %s", bdata(output_csv_conf.filename));
2915 + err_message("Unable to open CSV file - %s", bdata(output_csv_conf.filename));
2918 /* Read file into 'filedata' and process it accordingly. */
2919 filedata = bread ((bNread) fread, fp);
2920 if ((lines = bsplit(filedata, '\n')) != NULL) {
2921 - for (i = 0; i < lines->qty; i++) {
2922 - parse_raw_report(lines->entry[i]);
2924 + for (i = 0; i < lines->qty; i++) {
2925 + parse_raw_report(lines->entry[i]);
2931 bstrListDestroy(lines);
2936 /* ----------------------------------------------------------
2937 - * FUNCTION : parse_raw_report
2938 - * DESCRIPTION : This function will parse through a single
2939 - * : line of the CSV file.
2940 - * INPUT : 0 - Raw Line
2941 - * RETURN : 0 - Sucess
2943 + * FUNCTION : parse_raw_report
2944 + * DESCRIPTION : This function will parse through a single
2945 + * : line of the CSV file.
2946 + * INPUT : 0 - Raw Line
2947 + * RETURN : 0 - Sucess
2949 * ---------------------------------------------------------- */
2951 parse_raw_report (bstring line)
2952 @@ -172,37 +171,37 @@
2954 /* Check to see if this line has something to read. */
2955 if (line->data[0] == '\0' || line->data[0] == '#')
2959 /* Break line apart. */
2960 if ((list = bsplit(line, ',')) == NULL)
2964 /* Check to see if this line contains the header. */
2965 if ((biseqcstr(list->entry[0], "asset")) == 1) {
2967 - bstrListDestroy(list);
2970 + bstrListDestroy(list);
2974 /* Place data from 'list' into temporary data storage. */
2975 if ((inet_aton(bdata(list->entry[0]), &ip_addr)) == -1)
2979 if ((port = htons(atoi(bdata(list->entry[1])))) == -1)
2983 if ((proto = atoi(bdata(list->entry[2]))) == -1)
2987 if ((service = bstrcpy(list->entry[3])) == NULL)
2991 if ((application = bstrcpy(list->entry[4])) == NULL)
2994 if ((discovered = atol(bdata(list->entry[5]))) == -1)
2998 /* Make sure that this line contains 'good' data. */
2999 if (service->slen == 0 || application->slen == 0 || discovered <= 0)
3000 @@ -210,95 +209,95 @@
3002 /* Add Asset to Data Structure */
3003 if (proto == 0 && ret != -1) {
3005 - mac2hex(bdata(application), mac_addr, MAC_LEN);
3006 - add_arp_asset(ip_addr, mac_addr, discovered);
3008 + mac2hex(bdata(application), mac_addr, MAC_LEN);
3009 + add_arp_asset(ip_addr, mac_addr, discovered);
3011 - /* Everything Else */
3012 - add_asset(ip_addr, port, proto, service, application, discovered);
3013 + /* Everything Else */
3014 + add_asset(ip_addr, port, proto, service, application, discovered);
3019 - bstrListDestroy(list);
3020 + bstrListDestroy(list);
3021 if (service != NULL)
3022 - bdestroy(service);
3023 + bdestroy(service);
3024 if (application != NULL)
3025 - bdestroy(application);
3026 + bdestroy(application);
3031 /* ----------------------------------------------------------
3032 - * FUNCTION : print_asset_csv
3033 - * DESCRIPTION : This function will print an asset to the
3035 - * INPUT : 0 - Port
3036 - * : 1 - IP Address
3039 - * : 4 - Application
3040 - * : 5 - Discovered
3041 - * RETURN : 0 - Success
3043 + * FUNCTION : print_asset_csv
3044 + * DESCRIPTION : This function will print an asset to the
3046 + * INPUT : 0 - Port
3047 + * : 1 - IP Address
3050 + * : 4 - Application
3051 + * : 5 - Discovered
3052 + * RETURN : 0 - Success
3054 * ---------------------------------------------------------- */
3056 print_asset_csv (Asset *rec)
3058 if (output_csv_conf.file != NULL) {
3059 - if (gc.hide_unknowns == 0 || ((biseqcstr(rec->service, "unknown") != 0) &&
3060 - (biseqcstr(rec->application, "unknown") != 0))) {
3061 - fprintf(output_csv_conf.file, "%s,%d,%d,%s,%s,%d\n",
3062 - inet_ntoa(rec->ip_addr), ntohs(rec->port), rec->proto, bdata(rec->service),
3063 - bdata(rec->application), rec->discovered);
3064 - fflush(output_csv_conf.file);
3066 + if (gc.hide_unknowns == 0 || ((biseqcstr(rec->service, "unknown") != 0) &&
3067 + (biseqcstr(rec->application, "unknown") != 0))) {
3068 + fprintf(output_csv_conf.file, "%s,%d,%d,%s,%s,%ld\n",
3069 + inet_ntoa(rec->ip_addr), ntohs(rec->port), rec->proto, bdata(rec->service),
3070 + bdata(rec->application), rec->discovered);
3071 + fflush(output_csv_conf.file);
3074 - fprintf(stderr, "[!] ERROR: File handle not open!\n");
3076 + fprintf(stderr, "[!] ERROR: File handle not open!\n");
3083 /* ----------------------------------------------------------
3084 - * FUNCTION : print_arp_asset_csv
3085 - * DESCRIPTION : This function will print an ARP asset to
3087 - * INPUT : 0 - IP Address
3088 - * : 1 - MAC Address
3089 - * : 2 - MAC Resolved
3090 - * RETURN : 0 - Success
3092 + * FUNCTION : print_arp_asset_csv
3093 + * DESCRIPTION : This function will print an ARP asset to
3095 + * INPUT : 0 - IP Address
3096 + * : 1 - MAC Address
3097 + * : 2 - MAC Resolved
3098 + * RETURN : 0 - Success
3100 * ---------------------------------------------------------- */
3102 print_arp_asset_csv (ArpAsset *rec)
3105 if (output_csv_conf.file != NULL) {
3106 - if (rec->mac_resolved != NULL) {
3107 - fprintf(output_csv_conf.file, "%s,0,0,ARP (%s),%s,%d\n", inet_ntoa(rec->ip_addr),
3108 - bdata(rec->mac_resolved), hex2mac(rec->mac_addr), rec->discovered);
3110 - fprintf(output_csv_conf.file, "%s,0,0,ARP,%s,%d\n", inet_ntoa(rec->ip_addr),
3111 - hex2mac(rec->mac_addr), rec->discovered);
3113 + if (rec->mac_resolved != NULL) {
3114 + fprintf(output_csv_conf.file, "%s,0,0,ARP (%s),%s,%ld\n", inet_ntoa(rec->ip_addr),
3115 + bdata(rec->mac_resolved), hex2mac(rec->mac_addr), rec->discovered);
3117 + fprintf(output_csv_conf.file, "%s,0,0,ARP,%s,%ld\n", inet_ntoa(rec->ip_addr),
3118 + hex2mac(rec->mac_addr), rec->discovered);
3121 - fflush(output_csv_conf.file);
3122 + fflush(output_csv_conf.file);
3124 - fprintf(stderr, "[!] ERROR: File handle not open!\n");
3126 + fprintf(stderr, "[!] ERROR: File handle not open!\n");
3133 /* ----------------------------------------------------------
3134 - * FUNCTION : end_output_csv
3135 - * DESCRIPTION : This function will free the memory declared
3136 - * : by the screen output module.
3139 + * FUNCTION : end_output_csv
3140 + * DESCRIPTION : This function will free the memory declared
3141 + * : by the screen output module.
3144 * ---------------------------------------------------------- */
3147 @@ -307,9 +306,13 @@
3148 verbose_message("Closing CSV File.");
3150 if (output_csv_conf.file != NULL)
3151 - fclose(output_csv_conf.file);
3152 + fclose(output_csv_conf.file);
3154 if (output_csv_conf.filename != NULL)
3155 - bdestroy(output_csv_conf.filename);
3156 + bdestroy(output_csv_conf.filename);
3161 +/* vim:expandtab:cindent:smartindent:ts=4:tw=0:sw=4:
3163 diff -ur pads-1.2/src/output/output-csv.h pads-1.2.mod//src/output/output-csv.h
3164 --- pads-1.2/src/output/output-csv.h 2005-02-18 06:39:09.000000000 +0100
3165 +++ pads-1.2.mod//src/output/output-csv.h 2010-12-19 14:27:38.823334501 +0100
3167 * along with this program; if not, write to the Free Software
3168 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
3170 - * $Id: output-csv.h,v 1.3 2005/02/18 05:39:09 mattshelton Exp $
3171 + * $Id: output-csv.h,v 1.3 2005/11/02 23:56:12 jfs Exp $
3173 **************************************************************************/
3175 +#ifndef _PADS_OUTPUT_CSV_H
3176 /* DEFINES ----------------------------------------- */
3177 +#define _PADS_OUTPUT_CSV_H 1
3183 /* INCLUDES ---------------------------------------- */
3185 +#include <stdlib.h>
3186 +#include <arpa/inet.h>
3192 /* TYPEDEFS ---------------------------------------- */
3194 int print_arp_asset_csv (ArpAsset *rec);
3195 int end_output_csv (void);
3198 diff -ur pads-1.2/src/output/output-fifo.c pads-1.2.mod//src/output/output-fifo.c
3199 --- pads-1.2/src/output/output-fifo.c 2005-02-22 17:09:25.000000000 +0100
3200 +++ pads-1.2.mod//src/output/output-fifo.c 2010-12-19 14:27:38.796667834 +0100
3202 /*************************************************************************
3205 - * Matt Shelton <matt@mattshelton.com>
3206 + * Matt Shelton <matt@mattshelton.com>
3208 * This output module will write data to a FIFO named pipe. This will
3209 * allow external applications access to PADS data in real-time.
3211 - * Copyright (C) 2004 Matt Shelton <matt@mattshelton.com>
3212 + * Copyright (C) 2004, 2005 Matt Shelton <matt@mattshelton.com>
3214 * This program is free software; you can redistribute it and/or modify
3215 * it under the terms of the GNU General Public License as published by
3217 * along with this program; if not, write to the Free Software
3218 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
3220 - * $Id: output-fifo.c,v 1.6 2005/02/22 16:09:25 mattshelton Exp $
3221 + * $Id: output-fifo.c,v 1.3 2005/11/02 23:56:12 jfs Exp $
3223 **************************************************************************/
3224 #include "output-fifo.h"
3226 * begin with an action_id field. This field will allow different types
3227 * of output to be written to the FIFO.
3229 - * action_id action
3230 - * 01 TCP / ICMP Asset Discovered
3231 - * 02 ARP Asset Discovered
3232 - * 03 TCP / ICMP Statistic Information
3233 + * action_id action
3234 + * 01 TCP / ICMP Asset Discovered
3235 + * 02 ARP Asset Discovered
3236 + * 03 TCP / ICMP Statistic Information
3238 * The following lines contains an example of the data written to the
3241 OutputFIFOConf output_fifo_conf;
3243 /* ----------------------------------------------------------
3244 - * FUNCTION : setup_output_fifo
3245 - * DESCRIPTION : This function will register the output
3248 - * RETURN : 0 - Success
3250 + * FUNCTION : setup_output_fifo
3251 + * DESCRIPTION : This function will register the output
3254 + * RETURN : 0 - Success
3256 * ---------------------------------------------------------- */
3258 setup_output_fifo (void)
3260 OutputPlugin *plugin;
3263 /* Allocate and setup plugin data record. */
3264 plugin = (OutputPlugin*)malloc(sizeof(OutputPlugin));
3267 /* Register plugin with input module. */
3268 if ((register_output_plugin(plugin)) == -1) {
3269 - if (plugin != NULL)
3271 - log_message("warning: 'register_output_plugin' in function 'setup_output_fifo' failed.");
3272 + if (plugin != NULL)
3274 + log_message("warning: 'register_output_plugin' in function 'setup_output_fifo' failed.");
3280 /* ----------------------------------------------------------
3281 - * FUNCTION : init_output_fifo
3282 - * DESCRIPTION : This function will initialize the FIFO
3284 - * INPUT : 0 - FIFO filename
3286 + * FUNCTION : init_output_fifo
3287 + * DESCRIPTION : This function will initialize the FIFO
3289 + * INPUT : 0 - FIFO filename
3291 * --------------------------------------------------------- */
3293 init_output_fifo (bstring fifo_file)
3296 - register u_int len = 0;
3299 verbose_message("Initializing FIFO output plugin.");
3301 /* Make sure report_file isn't NULL. */
3302 if (fifo_file == NULL)
3303 - fifo_file = bstrcpy(bfromcstr("pads.fifo"));
3304 + fifo_file = bstrcpy(bfromcstr("pads.fifo"));
3306 output_fifo_conf.filename = bstrcpy(fifo_file);
3308 @@ -113,110 +108,110 @@
3310 verbose_message("Open FIFO File\n");
3311 if ((output_fifo_conf.file = fopen(bdata(fifo_file), "w+")) == NULL)
3312 - err_message("Unable to open FIFO file (%s)!\n", bdata(fifo_file));
3313 + err_message("Unable to open FIFO file (%s)!\n", bdata(fifo_file));
3319 /* ----------------------------------------------------------
3320 - * FUNCTION : print_asset_fifo
3321 - * DESCRIPTION : This function will print an asset to the
3323 - * INPUT : 0 - Port
3324 - * : 1 - IP Address
3327 - * : 4 - Application
3328 - * : 5 - Discovered
3329 - * RETURN : 0 - Success
3331 + * FUNCTION : print_asset_fifo
3332 + * DESCRIPTION : This function will print an asset to the
3334 + * INPUT : 0 - Port
3335 + * : 1 - IP Address
3338 + * : 4 - Application
3339 + * : 5 - Discovered
3340 + * RETURN : 0 - Success
3342 * ---------------------------------------------------------- */
3344 print_asset_fifo (Asset *rec)
3346 if (output_fifo_conf.file != NULL) {
3347 - if (gc.hide_unknowns == 0 || ((biseq(rec->service, bfromcstr("unknown")) != 0) &&
3348 - (biseq(rec->application, bfromcstr("unknown")) != 0))) {
3349 - fprintf(output_fifo_conf.file, "01,%s,%d,%d,%s,%s,%d\n",
3350 - inet_ntoa(rec->ip_addr), ntohs(rec->port), rec->proto, bdata(rec->service),
3351 - bdata(rec->application), rec->discovered);
3352 - fflush(output_fifo_conf.file);
3354 + if (gc.hide_unknowns == 0 || ((biseq(rec->service, bfromcstr("unknown")) != 0) &&
3355 + (biseq(rec->application, bfromcstr("unknown")) != 0))) {
3356 + fprintf(output_fifo_conf.file, "01,%s,%d,%d,%s,%s,%ld\n",
3357 + inet_ntoa(rec->ip_addr), ntohs(rec->port), rec->proto, bdata(rec->service),
3358 + bdata(rec->application), rec->discovered);
3359 + fflush(output_fifo_conf.file);
3362 - fprintf(stderr, "[!] ERROR: File handle not open!\n");
3364 + fprintf(stderr, "[!] ERROR: File handle not open!\n");
3371 /* ----------------------------------------------------------
3372 - * FUNCTION : print_arp_asset_fifo
3373 - * DESCRIPTION : This function will print an ARP asset to
3374 - * : the FIFO file.
3375 - * INPUT : 0 - IP Address
3376 - * : 1 - MAC Address
3377 - * RETURN : 0 - Success
3379 + * FUNCTION : print_arp_asset_fifo
3380 + * DESCRIPTION : This function will print an ARP asset to
3381 + * : the FIFO file.
3382 + * INPUT : 0 - IP Address
3383 + * : 1 - MAC Address
3384 + * RETURN : 0 - Success
3386 * ---------------------------------------------------------- */
3388 print_arp_asset_fifo (ArpAsset *rec)
3391 if (output_fifo_conf.file != NULL) {
3392 - if (rec->mac_resolved != NULL) {
3393 - fprintf(output_fifo_conf.file, "02,%s,%s,%s,%d\n", inet_ntoa(rec->ip_addr),
3394 - rec->mac_resolved, hex2mac(&rec->mac_addr), rec->discovered);
3396 - fprintf(output_fifo_conf.file, "02,%s,unknown,%s,%d\n", inet_ntoa(rec->ip_addr),
3397 - hex2mac(&rec->mac_addr), rec->discovered);
3399 + if (rec->mac_resolved != NULL) {
3400 + fprintf(output_fifo_conf.file, "02,%s,%s,%s,%ld\n", inet_ntoa(rec->ip_addr),
3401 + (char *)rec->mac_resolved, hex2mac(rec->mac_addr), rec->discovered);
3403 + fprintf(output_fifo_conf.file, "02,%s,unknown,%s,%ld\n", inet_ntoa(rec->ip_addr),
3404 + hex2mac(rec->mac_addr), rec->discovered);
3407 - fflush(output_fifo_conf.file);
3408 + fflush(output_fifo_conf.file);
3410 - fprintf(stderr, "[!] ERROR: File handle not open!\n");
3412 + fprintf(stderr, "[!] ERROR: File handle not open!\n");
3419 /* ----------------------------------------------------------
3420 - * FUNCTION : print_stat_fifo
3421 - * DESCRIPTION : This function will print statistic
3422 - * : information to the FIFO file.
3423 - * INPUT : 0 - IP Address
3426 - * RETURN : 0 - Success
3428 + * FUNCTION : print_stat_fifo
3429 + * DESCRIPTION : This function will print statistic
3430 + * : information to the FIFO file.
3431 + * INPUT : 0 - IP Address
3434 + * RETURN : 0 - Success
3436 * ---------------------------------------------------------- */
3438 print_stat_fifo (Asset *rec)
3440 if (output_fifo_conf.file != NULL) {
3441 - fprintf(output_fifo_conf.file, "03,%s,%d,%d,%d\n",
3442 - inet_ntoa(rec->ip_addr), ntohs(rec->port), rec->proto, time(NULL));
3443 - fflush(output_fifo_conf.file);
3444 + fprintf(output_fifo_conf.file, "03,%s,%d,%d,%ld\n",
3445 + inet_ntoa(rec->ip_addr), ntohs(rec->port), rec->proto, time(NULL));
3446 + fflush(output_fifo_conf.file);
3449 - fprintf(stderr, "[!] ERROR: File handle not open!\n");
3451 + fprintf(stderr, "[!] ERROR: File handle not open!\n");
3458 /* ----------------------------------------------------------
3459 - * FUNCTION : end_output_fifo
3460 - * DESCRIPTION : This function will free the memory declared
3461 - * : by the fifo output module.
3463 - * OUTPUT : 0 - Success
3465 + * FUNCTION : end_output_fifo
3466 + * DESCRIPTION : This function will free the memory declared
3467 + * : by the fifo output module.
3469 + * OUTPUT : 0 - Success
3471 * ---------------------------------------------------------- */
3474 +end_output_fifo (void)
3476 verbose_message("Ending CSV Output Plugin.");
3478 @@ -225,8 +220,10 @@
3481 if (output_fifo_conf.filename)
3482 - bdestroy(output_fifo_conf.filename);
3483 + bdestroy(output_fifo_conf.filename);
3488 +/* vim:expandtab:cindent:smartindent:ts=4:tw=0:sw=4:
3490 diff -ur pads-1.2/src/output/output-fifo.h pads-1.2.mod//src/output/output-fifo.h
3491 --- pads-1.2/src/output/output-fifo.h 2005-02-18 06:39:09.000000000 +0100
3492 +++ pads-1.2.mod//src/output/output-fifo.h 2010-12-19 14:27:38.833334500 +0100
3494 * along with this program; if not, write to the Free Software
3495 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
3497 - * $Id: output-fifo.h,v 1.3 2005/02/18 05:39:09 mattshelton Exp $
3498 + * $Id: output-fifo.h,v 1.3 2005/11/02 23:56:12 jfs Exp $
3500 **************************************************************************/
3502 +#ifndef _PSAD_OUTPUT_FIFO_H
3503 /* DEFINES ----------------------------------------- */
3504 +#define _PSAD_OUTPUT_FIFO_H 1
3509 /* INCLUDES ---------------------------------------- */
3511 #include <sys/stat.h>
3512 +#include <arpa/inet.h>
3519 /* TYPEDEFS ---------------------------------------- */
3520 typedef struct _OutputFIFOConf
3522 int print_stat_fifo (Asset *rec);
3523 int end_output_fifo (void);
3526 diff -ur pads-1.2/src/output/output.h pads-1.2.mod//src/output/output.h
3527 --- pads-1.2/src/output/output.h 2005-02-18 06:39:09.000000000 +0100
3528 +++ pads-1.2.mod//src/output/output.h 2010-12-19 14:27:38.823334501 +0100
3530 * along with this program; if not, write to the Free Software
3531 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
3533 - * $Id: output.h,v 1.3 2005/02/18 05:39:09 mattshelton Exp $
3534 + * $Id: output.h,v 1.3 2005/11/02 23:56:12 jfs Exp $
3536 **************************************************************************/
3538 +#ifndef _PADS_OUTPUT_H
3539 /* DEFINES ----------------------------------------- */
3540 +#define _PADS_OUTPUT_H 1
3549 +#include "storage.h"
3551 /* DATA STRUCTURES --------------------------------- */
3555 /* PROTOTYPES -------------------------------------- */
3557 +int setup_output_screen (void);
3558 +int setup_output_csv (void);
3559 +int setup_output_fifo (void);
3560 int register_output_plugin (OutputPlugin *plugin);
3561 int activate_output_plugin (bstring name, bstring args);
3562 int print_asset (struct in_addr ip_addr, u_int16_t port, unsigned short proto);
3564 int print_stat(struct in_addr ip_addr, u_int16_t port, unsigned short proto);
3565 void end_output (void);
3568 diff -ur pads-1.2/src/output/output-screen.c pads-1.2.mod//src/output/output-screen.c
3569 --- pads-1.2/src/output/output-screen.c 2005-02-22 17:09:25.000000000 +0100
3570 +++ pads-1.2.mod//src/output/output-screen.c 2010-12-19 14:27:38.823334501 +0100
3572 * along with this program; if not, write to the Free Software
3573 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
3575 - * $Id: output-screen.c,v 1.5 2005/02/22 16:09:25 mattshelton Exp $
3576 + * $Id: output-screen.c,v 1.2 2005/11/02 23:56:12 jfs Exp $
3578 **************************************************************************/
3579 #include "output-screen.h"
3581 setup_output_screen (void)
3583 OutputPlugin *plugin;
3586 /* Allocate and setup plugin data record. */
3587 plugin = (OutputPlugin*)malloc(sizeof(OutputPlugin));
3588 diff -ur pads-1.2/src/output/output-screen.h pads-1.2.mod//src/output/output-screen.h
3589 --- pads-1.2/src/output/output-screen.h 2005-02-18 06:39:09.000000000 +0100
3590 +++ pads-1.2.mod//src/output/output-screen.h 2010-12-19 14:27:38.796667834 +0100
3592 * along with this program; if not, write to the Free Software
3593 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
3595 - * $Id: output-screen.h,v 1.3 2005/02/18 05:39:09 mattshelton Exp $
3596 + * $Id: output-screen.h,v 1.3 2005/11/02 23:56:12 jfs Exp $
3598 **************************************************************************/
3600 +#ifndef _PADS_OUTPUT_SCREEN_H
3601 /* DEFINES ----------------------------------------- */
3602 +#define _PADS_OUTPUT_SCREEN_H 1
3608 /* INCLUDES ---------------------------------------- */
3610 +#include <arpa/inet.h>
3616 /* TYPEDEFS ---------------------------------------- */
3618 int print_asset_screen (Asset *rec);
3619 int print_arp_asset_screen (ArpAsset *rec);
3620 int end_output_screen (void);
3623 diff -ur pads-1.2/src/packet.c pads-1.2.mod//src/packet.c
3624 --- pads-1.2/src/packet.c 2005-02-16 02:47:35.000000000 +0100
3625 +++ pads-1.2.mod//src/packet.c 2010-12-19 14:27:38.773334500 +0100
3627 * along with this program; if not, write to the Free Software
3628 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
3630 - * $Id: packet.c,v 1.3 2005/02/16 01:47:35 mattshelton Exp $
3631 + * $Id: packet.c,v 1.2 2005/11/02 23:56:12 jfs Exp $
3633 **************************************************************************/
3635 diff -ur pads-1.2/src/packet.h pads-1.2.mod//src/packet.h
3636 --- pads-1.2/src/packet.h 2005-02-10 07:05:05.000000000 +0100
3637 +++ pads-1.2.mod//src/packet.h 2010-12-19 14:27:38.746667833 +0100
3639 * along with this program; if not, write to the Free Software
3640 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
3642 - * $Id: packet.h,v 1.1 2005/02/10 06:05:05 mattshelton Exp $
3643 + * $Id: packet.h,v 1.3 2005/11/02 23:56:12 jfs Exp $
3645 **************************************************************************/
3646 #ifdef HAVE_CONFIG_H
3649 /* INCLUDES ---------------------------------------- */
3651 +#include "storage.h"
3652 +#include "monnet.h"
3653 +#include "identification.h"
3654 +#include "output/output.h"
3656 #include <netinet/ip.h>
3657 #include <netinet/tcp.h>
3658 diff -ur pads-1.2/src/pads.c pads-1.2.mod//src/pads.c
3659 --- pads-1.2/src/pads.c 2005-06-16 00:00:40.000000000 +0200
3660 +++ pads-1.2.mod//src/pads.c 2010-12-19 14:27:38.763334501 +0100
3662 * along with this program; if not, write to the Free Software
3663 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
3665 - * $Id: pads.c,v 1.10 2005/06/15 22:00:40 mattshelton Exp $
3666 + * $Id: pads.c,v 1.3 2005/11/02 23:56:12 jfs Exp $
3668 **************************************************************************/
3670 @@ -478,9 +478,10 @@
3671 main(int argc, char *argv[])
3675 - struct pcap_pkthdr header; /* The header that pcap gives us */
3676 - const u_char *packet; /* The actual packet */
3679 + /* struct pcap_pkthdr header; */ /* The header that pcap gives us */
3680 + /* const u_char *packet; */ /* The actual packet */
3682 /* Copy Command Line Args */
3684 diff -ur pads-1.2/src/pads.h pads-1.2.mod//src/pads.h
3685 --- pads-1.2/src/pads.h 2005-03-11 02:04:12.000000000 +0100
3686 +++ pads-1.2.mod//src/pads.h 2010-12-19 14:27:38.773334500 +0100
3688 * along with this program; if not, write to the Free Software
3689 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
3691 - * $Id: pads.h,v 1.4 2005/03/11 01:04:12 mattshelton Exp $
3692 + * $Id: pads.h,v 1.3 2005/11/02 23:56:12 jfs Exp $
3694 **************************************************************************/
3697 /* DEFINES ----------------------------------------- */
3708 +#include "output/output.h"
3709 +#include "configuration.h"
3710 +#include "identification.h"
3711 +#include "mac-resolution.h"
3712 +#include "monnet.h"
3714 /* TYPEDEFS ---------------------------------------- */
3715 typedef void (*proc_t)(const struct pcap_pkthdr *, const u_char *);
3717 void init_pads(void);
3718 void main_pads(void);
3719 void end_pads(void);
3720 +int process_cmdline (int, char **);
3722 void sig_term_handler(int signal);
3723 void sig_int_handler(int signal);
3725 void process_eth (const struct pcap_pkthdr* pkthdr, const u_char* packet);
3726 void process_sll (const struct pcap_pkthdr* pkthdr, const u_char* packet);
3729 /* vim:expandtab:cindent:smartindent:ts=4:tw=0:sw=4:
3731 diff -ur pads-1.2/src/pads-report.pl pads-1.2.mod//src/pads-report.pl
3732 --- pads-1.2/src/pads-report.pl 2005-06-16 00:10:41.000000000 +0200
3733 +++ pads-1.2.mod//src/pads-report.pl 2010-12-19 14:27:38.763334501 +0100
3735 my $version = '1.2';
3736 my $date = '06/17/05';
3738 -# $Id: pads-report.pl,v 1.2 2005/06/15 22:10:41 mattshelton Exp $
3739 +# $Id: pads-report.pl,v 1.2 2005/11/02 23:56:12 jfs Exp $
3741 # ---------------------------------------------------------------------
3743 diff -ur pads-1.2/src/storage.c pads-1.2.mod//src/storage.c
3744 --- pads-1.2/src/storage.c 2005-02-16 02:47:35.000000000 +0100
3745 +++ pads-1.2.mod//src/storage.c 2010-12-19 14:27:38.796667834 +0100
3747 * along with this program; if not, write to the Free Software
3748 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
3750 - * $Id: storage.c,v 1.3 2005/02/16 01:47:35 mattshelton Exp $
3751 + * $Id: storage.c,v 1.2 2005/11/02 23:56:12 jfs Exp $
3753 **************************************************************************/
3754 #include "storage.h"
3756 printf("-- Begin Asset Database --\n");
3758 while (rec != NULL) {
3759 - printf("%d: %s,%d,%d,%d,%s,%s,%d\n",
3760 + printf("%d: %s,%d,%d,%ld,%s,%s,%d\n",
3761 id, inet_ntoa(rec->ip_addr), ntohs(rec->port),
3762 rec->proto, rec->discovered,
3763 bdata(rec->service), bdata(rec->application),
3766 arp = arp_asset_list;
3767 while (arp != NULL) {
3768 - printf("%d: %s,%s,%d\n", id, inet_ntoa(arp->ip_addr),
3769 - ether_ntoa(&arp->mac_addr), arp->discovered);
3770 + printf("%d: %s,%s,%ld\n", id, inet_ntoa(arp->ip_addr),
3771 + hex2mac(arp->mac_addr), arp->discovered);
3775 diff -ur pads-1.2/src/storage.h pads-1.2.mod//src/storage.h
3776 --- pads-1.2/src/storage.h 2005-02-16 02:47:35.000000000 +0100
3777 +++ pads-1.2.mod//src/storage.h 2010-12-19 14:27:38.773334500 +0100
3779 * along with this program; if not, write to the Free Software
3780 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
3782 - * $Id: storage.h,v 1.2 2005/02/16 01:47:35 mattshelton Exp $
3783 + * $Id: storage.h,v 1.3 2005/11/02 23:56:12 jfs Exp $
3785 **************************************************************************/
3787 +#ifndef _PADS_STORAGE_H
3788 /* INCLUDES ---------------------------------------- */
3789 +#define _PADS_STORAGE_H 1
3796 +#include "mac-resolution.h"
3798 +#include <arpa/inet.h>
3799 #include <netinet/ip.h>
3800 #include <netinet/tcp.h>
3801 +#include <netinet/ether.h>
3804 /* DEFINES ----------------------------------------- */
3808 /* GLOBALS ----------------------------------------- */
3810 diff -ur pads-1.2/src/util.c pads-1.2.mod//src/util.c
3811 --- pads-1.2/src/util.c 2005-03-11 02:31:15.000000000 +0100
3812 +++ pads-1.2.mod//src/util.c 2010-12-19 14:27:38.743334500 +0100
3814 * along with this program; if not, write to the Free Software
3815 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
3817 - * $Id: util.c,v 1.6 2005/03/11 01:31:15 mattshelton Exp $
3818 + * $Id: util.c,v 1.4 2005/11/02 23:56:12 jfs Exp $
3820 **************************************************************************/
3825 /* ----------------------------------------------------------
3826 - * FUNCTION : chomp
3827 - * DESCRIPTION : This function is similar to Perl's 'chomp'
3828 - * : command. It will strip off the '\n'
3829 - * : closest to the end of the string.
3830 - * INPUT : 0 - String
3831 - * : 1 - Size of String
3832 - * RETURN : 0 - '\n' removed
3833 - * : 1 - '\n' was never there
3834 - * ---------------------------------------------------------- */
3836 -chomp (char *string, int size)
3838 - for (size; size >= 0; size--) {
3839 - if (string[size] == '\n') {
3840 - string[size] = '\0';
3848 -/* ----------------------------------------------------------
3849 * FUNCTION : daemonize
3850 * DESCRIPTION : This function will place the application in
3853 struct passwd *this_user;
3855 /* Default PID File */
3856 - if (gc.pid_file->slen >= 0)
3858 gc.pid_file = bfromcstr("/var/run/pads.pid");
3860 /* Create PID File */
3862 err_message("'%s' group does not appear to exist.", bdata(group));
3863 if ((this_user = getpwnam(bdata(user))) == NULL)
3864 err_message("'%s' user does not appear to exist.", bdata(user));
3865 - if ((chown(pid_file, this_user->pw_uid, this_group->gr_gid)) != 0)
3866 + if ((chown((char *)pid_file, this_user->pw_uid, this_group->gr_gid)) != 0)
3867 err_message("Unable to change PID file's ownership.");
3870 diff -ur pads-1.2/src/util.h pads-1.2.mod//src/util.h
3871 --- pads-1.2/src/util.h 2005-02-22 17:09:25.000000000 +0100
3872 +++ pads-1.2.mod//src/util.h 2010-12-19 14:27:38.763334501 +0100
3874 * along with this program; if not, write to the Free Software
3875 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
3877 - * $Id: util.h,v 1.4 2005/02/22 16:09:25 mattshelton Exp $
3878 + * $Id: util.h,v 1.3 2005/11/02 23:56:12 jfs Exp $
3880 **************************************************************************/
3882 +#ifndef _PADS_UTIL_H
3883 /* INCLUDES ---------------------------------------- */
3884 +#define _PADS_UTIL_H 1
3885 +#include <unistd.h>
3888 #include <sys/types.h>
3889 #include <strings.h>
3898 /* PROTOTYPES -------------------------------------- */
3899 void strip_comment (char *string);
3900 -int chomp (char *string, int size);
3901 void daemonize (void);
3902 void init_pid_file (bstring pid_file, bstring user, bstring group);
3903 char *copy_argv(register char **argv);
3905 char *hex2mac(unsigned const char *mac);
3907 /* GLOBALS ----------------------------------------- */