wups
This commit is contained in:
parent
2863e75d83
commit
a413e33f66
58 changed files with 0 additions and 33417 deletions
57
.gitattributes
vendored
57
.gitattributes
vendored
|
@ -6,63 +6,6 @@
|
|||
/configure -text
|
||||
/configure.in -text
|
||||
/install-sh -text
|
||||
libopm/.cvsignore -text
|
||||
libopm/ChangeLog -text
|
||||
libopm/LICENSE -text
|
||||
libopm/Makefile.am -text
|
||||
libopm/Makefile.in -text
|
||||
libopm/OPM/.cvsignore -text
|
||||
libopm/OPM/Changes -text
|
||||
libopm/OPM/MANIFEST -text
|
||||
libopm/OPM/Makefile.PL -text
|
||||
libopm/OPM/OPM.pm -text
|
||||
libopm/OPM/OPM.xs -text
|
||||
libopm/OPM/README -text
|
||||
libopm/OPM/bopchecker.pl -text
|
||||
libopm/OPM/test.pl -text
|
||||
libopm/OPM/typemap -text
|
||||
libopm/aclocal.m4 -text
|
||||
libopm/acsite.m4 -text
|
||||
libopm/config.guess -text
|
||||
libopm/config.sub -text
|
||||
libopm/configure -text
|
||||
libopm/configure.in -text
|
||||
libopm/depcomp -text
|
||||
libopm/doc/.cvsignore -text
|
||||
libopm/doc/Doxyfile.in -text
|
||||
libopm/doc/Makefile.am -text
|
||||
libopm/doc/Makefile.in -text
|
||||
libopm/doc/libopm-api.txt -text
|
||||
libopm/install-sh -text
|
||||
libopm/ltmain.sh -text
|
||||
libopm/missing -text
|
||||
libopm/mkinstalldirs -text
|
||||
libopm/src/.cvsignore -text
|
||||
libopm/src/Makefile.am -text
|
||||
libopm/src/Makefile.in -text
|
||||
libopm/src/compat.c -text
|
||||
libopm/src/compat.h -text
|
||||
libopm/src/config.c -text
|
||||
libopm/src/config.h -text
|
||||
libopm/src/inet.c -text
|
||||
libopm/src/inet.h -text
|
||||
libopm/src/libopm.c -text
|
||||
libopm/src/libopm.h -text
|
||||
libopm/src/list.c -text
|
||||
libopm/src/list.h -text
|
||||
libopm/src/make -text
|
||||
libopm/src/malloc.c -text
|
||||
libopm/src/malloc.h -text
|
||||
libopm/src/opm.h -text
|
||||
libopm/src/opm_common.h -text
|
||||
libopm/src/opm_error.h -text
|
||||
libopm/src/opm_types.h -text
|
||||
libopm/src/proxy.c -text
|
||||
libopm/src/proxy.h -text
|
||||
libopm/src/setup.h.in -text
|
||||
libopm/src/snprintf.c -text
|
||||
libopm/src/snprintf.h -text
|
||||
libopm/src/test.c -text
|
||||
/modconfig.h.in -text
|
||||
/opsb.c -text
|
||||
/opsb.h -text
|
||||
|
|
|
@ -1,9 +0,0 @@
|
|||
Makefile
|
||||
autom4te-*
|
||||
config.log
|
||||
config.status
|
||||
libtool
|
||||
*.sw[op]
|
||||
stamp-h*
|
||||
autom4te.cache
|
||||
libtool
|
779
libopm/ChangeLog
779
libopm/ChangeLog
|
@ -1,779 +0,0 @@
|
|||
2003-01-06 12:40 andy
|
||||
|
||||
* doc/: .cvsignore, Makefile.in: Forgot Makefile.in
|
||||
|
||||
2003-01-06 11:22 andy
|
||||
|
||||
* OPM/bopchecker.pl: More ports.
|
||||
|
||||
2003-01-06 04:49 andy
|
||||
|
||||
* doc/.cvsignore: And ignore those.
|
||||
|
||||
2003-01-06 04:48 andy
|
||||
|
||||
* doc/: Doxyfile.in, Makefile.am: Start of doxygen stuff.
|
||||
|
||||
2003-01-05 12:22 andy
|
||||
|
||||
* Makefile.am, Makefile.in, configure, configure.in,
|
||||
src/Makefile.am, src/Makefile.in, src/compat.c, src/opm.h: Install
|
||||
opm_ headers, as requested by TimeMr14C and jv.
|
||||
|
||||
2003-01-05 12:07 strtok
|
||||
|
||||
* ChangeLog: Added ChangeLog
|
||||
|
||||
2003-01-03 20:49 andy
|
||||
|
||||
* OPM/bopchecker.pl: Updated for how we tend to be using this on
|
||||
Blitzed.
|
||||
|
||||
2003-01-02 22:18 strtok
|
||||
|
||||
* src/: libopm.c, libopm.h: memset sockaddr for bind()
|
||||
|
||||
2003-01-01 17:14 dgl
|
||||
|
||||
* OPM/bopchecker.pl: If protocols are provided only scan them,
|
||||
rather than doing everything + them. Also actually accept , in the
|
||||
input, as it was documented before..
|
||||
|
||||
2002-12-22 13:53 strtok
|
||||
|
||||
* src/libopm.c: Don't set fd close on exec
|
||||
|
||||
2002-12-22 13:41 strtok
|
||||
|
||||
* src/libopm.c: Set FD closed on exec
|
||||
|
||||
2002-12-16 11:46 andy
|
||||
|
||||
* src/config.c: Missed one instance of inetpton()
|
||||
|
||||
2002-12-16 09:53 andy
|
||||
|
||||
* configure, configure.in, src/inet.c, src/inet.h, src/libopm.c,
|
||||
src/setup.h.in: Add configure check for inet_pton.
|
||||
|
||||
Rename inetpton() in inet.c to inet_pton() and only use it if build
|
||||
host does not have its own inet_pton().
|
||||
|
||||
2002-12-15 17:22 strtok
|
||||
|
||||
* src/libopm.c: Put in ufds_size file descriptors instead of 1024
|
||||
|
||||
2002-12-15 17:03 strtok
|
||||
|
||||
* src/libopm.c: Changed timeout to 0 seconds!
|
||||
|
||||
2002-12-14 19:02 strtok
|
||||
|
||||
* src/: libopm.c, test.c: libopm.c: Grow ufds (poll array) as
|
||||
needed, rather than hard coded 1024 limit
|
||||
|
||||
2002-12-10 16:34 strtok
|
||||
|
||||
* doc/libopm-api.txt, src/libopm.c, src/opm.h, src/test.c: Added
|
||||
opm_scanend and opm_end functions to API
|
||||
|
||||
2002-12-09 16:44 strtok
|
||||
|
||||
* doc/libopm-api.txt, src/config.c, src/libopm.c, src/opm_types.h,
|
||||
src/test.c: Added OPM_TYPE_STRINGLIST Allow multiple entries for
|
||||
TARGET_STRING
|
||||
|
||||
2002-12-06 21:28 strtok
|
||||
|
||||
* src/: libopm.h, opm.h: Removed inet.h from opm.h. There was no
|
||||
reason for this inclusion.
|
||||
|
||||
2002-12-02 13:35 andy
|
||||
|
||||
* Makefile.in, aclocal.m4, src/Makefile.in: Update autotools.
|
||||
|
||||
2002-12-02 13:34 andy
|
||||
|
||||
* .cvsignore: [no log message]
|
||||
|
||||
2002-11-12 14:02 strtok
|
||||
|
||||
* Makefile.in, doc/libopm-api.txt, src/Makefile.in, src/libopm.c,
|
||||
src/opm.h: Added data element to OPM_REMOTE_T
|
||||
|
||||
2002-11-10 03:56 dgl
|
||||
|
||||
* OPM/bopchecker.pl: AnalogX proxy
|
||||
(http://www.analogx.com/contents/download/network/proxy.htm) seems
|
||||
to use port 6588
|
||||
|
||||
2002-11-07 18:56 strtok
|
||||
|
||||
* src/list.h: Added proper GPL to hybrid copyright
|
||||
|
||||
2002-11-07 13:09 strtok
|
||||
|
||||
* src/malloc.h: Added (void **) cast to MyFree #define to avoid
|
||||
warning
|
||||
|
||||
2002-11-07 12:19 strtok
|
||||
|
||||
* src/: libopm.c, malloc.c, malloc.h: Added code to MyFree to NULL
|
||||
a pointer after freeing it
|
||||
|
||||
2002-11-07 11:53 strtok
|
||||
|
||||
* src/malloc.c: Added != NULL check on MyFree as to avoid having to
|
||||
check for NULL BEFORE MyFree is called everytime
|
||||
|
||||
2002-11-06 17:37 strtok
|
||||
|
||||
* src/: libopm.c, libopm.h, proxy.c, proxy.h: Added SENDBUFLEN and
|
||||
READBUFLEN.
|
||||
|
||||
2002-11-06 16:38 dgl
|
||||
|
||||
* OPM/bopchecker.pl: Added some more http ports and put the adding
|
||||
code in a loop as generally http post and http are the same ports.
|
||||
|
||||
2002-11-06 16:31 dgl
|
||||
|
||||
* OPM/bopchecker.pl: It does help if you test after changing from
|
||||
using a : to a space as the seperator
|
||||
----------------------------------------------------------------------
|
||||
Enter Log. Lines beginning with `CVS:' are removed automatically
|
||||
Committing in . CVS: CVS: Modified Files: CVS: bopchecker.pl
|
||||
----------------------------------------------------------------------
|
||||
|
||||
2002-11-06 16:26 dgl
|
||||
|
||||
* OPM/: OPM.xs, bopchecker.pl: Make use of the opm_remote_addtype
|
||||
function by adding support for scanning additional ports in
|
||||
bopchecker.pl
|
||||
|
||||
Changed names to be consistant with rest of libopm Cisco -> ROUTER
|
||||
POST -> HTTPPOST and all uppercase names.
|
||||
|
||||
2002-11-05 23:36 strtok
|
||||
|
||||
* src/: config.c, test.c: Fixed memory leaks in config.c
|
||||
|
||||
2002-11-05 23:12 strtok
|
||||
|
||||
* src/: libopm.c, malloc.c, test.c: Fixed a bug where a freed conn
|
||||
was possibly used in the scan end code
|
||||
|
||||
2002-11-05 15:03 strtok
|
||||
|
||||
* doc/libopm-api.txt, src/test.c: Added note about the void *
|
||||
argument to the callback functions in the API documentation
|
||||
|
||||
2002-11-05 13:42 strtok
|
||||
|
||||
* doc/libopm-api.txt, src/libopm.c, src/opm.h, src/test.c: Added
|
||||
opm_remote_addtype function
|
||||
|
||||
2002-11-02 03:18 dgl
|
||||
|
||||
* OPM/OPM.pm: 10 seconds timeout isn't always quite enough..
|
||||
|
||||
2002-10-31 12:07 dgl
|
||||
|
||||
* OPM/OPM.pm: lowered fdlimit
|
||||
|
||||
2002-10-27 22:34 strtok
|
||||
|
||||
* OPM/OPM.xs, OPM/bopchecker.pl, OPM/test.pl, src/test.c: Removed
|
||||
TYPE_CUSTOM from perl module. Added TYPE_HTTPPOST to perl module.
|
||||
|
||||
2002-10-27 22:06 strtok
|
||||
|
||||
* src/: libopm.c, opm_types.h, proxy.c, proxy.h, test.c: Added dg's
|
||||
post proxy detection code. Tested on webcache.bt.net
|
||||
|
||||
2002-10-27 21:49 strtok
|
||||
|
||||
* src/: libopm.c, malloc.c: Added assert on calloc fail
|
||||
|
||||
2002-10-27 17:20 strtok
|
||||
|
||||
* src/libopm.c: Cleaned up write_function/read_function and added
|
||||
read_function functionality.
|
||||
|
||||
2002-10-27 17:13 strtok
|
||||
|
||||
* src/: libopm.c, libopm.h, opm.h, opm_types.h, proxy.c, proxy.h,
|
||||
test.c: Removed libopm_addcustom and custom protocol support.
|
||||
|
||||
2002-10-27 13:52 strtok
|
||||
|
||||
* src/libopm.c: Added comment for opm_active
|
||||
|
||||
2002-10-27 13:45 strtok
|
||||
|
||||
* src/libopm.c: Fixed bug where on timeouts, libopm did a callback
|
||||
after freeing the conn struct! (found by dg)
|
||||
|
||||
2002-10-27 12:07 dgl
|
||||
|
||||
* OPM/OPM.xs: removed remote callbacks
|
||||
|
||||
2002-10-27 11:20 strtok
|
||||
|
||||
* doc/libopm-api.txt, src/libopm.c, src/opm.h: Removed remote
|
||||
struct callbacks, now only scanner-wide callbacks are used.
|
||||
|
||||
2002-10-27 07:35 dgl
|
||||
|
||||
* OPM/: OPM.xs, bopchecker.pl: return textual versions of the
|
||||
protocols (and http post scanning in bopchecker - when custom
|
||||
protocols work that is)
|
||||
|
||||
2002-10-27 06:45 dgl
|
||||
|
||||
* OPM/.cvsignore: ignore Makefile too
|
||||
|
||||
2002-10-27 06:45 dgl
|
||||
|
||||
* OPM/bopchecker.pl: port wrong around around
|
||||
|
||||
2002-10-27 06:17 dgl
|
||||
|
||||
* OPM/OPM.xs, OPM/bopchecker.pl, src/libopm.c: OPM/bopchecker.pl:
|
||||
Added bopchecker.pl script (if you don't want to install the module
|
||||
to the whole system you can test it with): PERL_DL_NONLAZY=1
|
||||
/usr/bin/perl "-Iblib/lib" "-Iblib/arch" bopchecker.pl
|
||||
|
||||
src/libopm.c: OPM/OPM.xs: Added opm_active to return number of
|
||||
active scans (so bopchecker can exit when it has finished).
|
||||
|
||||
src/libopm.c: Cleaned up read() code so it didn't rely on timeout
|
||||
when the tcp port is closed.
|
||||
|
||||
2002-10-26 12:10 dgl
|
||||
|
||||
* OPM/: .cvsignore, Changes, MANIFEST, Makefile.PL, OPM.pm, OPM.xs,
|
||||
README, test.pl, typemap: The opm perl module!
|
||||
|
||||
2002-10-26 11:51 dgl
|
||||
|
||||
* src/: libopm.c, opm.h, test.c: patch to add data as param for
|
||||
callbacks..
|
||||
|
||||
2002-10-15 18:19 strtok
|
||||
|
||||
* src/proxy.c: Added logic to libopm_proxy_custom that finished
|
||||
parsing if the target string is larger than 511 characters
|
||||
|
||||
2002-10-15 13:00 strtok
|
||||
|
||||
* src/libopm.c: Initialize id and format to NULL in the built in
|
||||
protocol table
|
||||
|
||||
2002-10-15 12:55 strtok
|
||||
|
||||
* src/: libopm.c, libopm.h, opm.h, proxy.c, proxy.h, test.c: Added
|
||||
custom protocol support
|
||||
|
||||
2002-10-12 14:28 strtok
|
||||
|
||||
* src/: config.c, libopm.c, libopm.h, opm_types.h: Added default
|
||||
config settings
|
||||
|
||||
2002-09-23 17:41 strtok
|
||||
|
||||
* doc/libopm-api.txt, src/libopm.c, src/opm_error.h: Abort scans
|
||||
where there are no protocols defined (bug found by dg). In
|
||||
check_queue use LIST_SIZE of the individual connections list
|
||||
instead of the global protocols list when determining the projected
|
||||
file descriptor size
|
||||
|
||||
2002-09-21 20:42 strtok
|
||||
|
||||
* doc/libopm-api.txt: Fixed 'opm_remote_free' section header
|
||||
|
||||
2002-09-21 16:24 strtok
|
||||
|
||||
* doc/libopm-api.txt: Removed addr from OPM_REMOTE_T listing in api
|
||||
doc
|
||||
|
||||
2002-09-21 16:10 strtok
|
||||
|
||||
* src/: config.c, inet.h, libopm.c, opm_error.h, test.c: Added IPV4
|
||||
Binding functionality Added OPM_ERR_NOFD (CALLBACK_ERROR) Added
|
||||
OPM_ERR_BIND (CALLBACK_ERROR)
|
||||
|
||||
2002-09-21 15:33 strtok
|
||||
|
||||
* doc/libopm-api.txt, src/libopm.c, src/libopm.h, src/opm.h,
|
||||
src/opm_error.h, src/test.c: Moved OPM_REMOTE_T::addr to
|
||||
OPM_SCAN_T::addr Added OPM_ERR_BADADDR on return of opm_scan if the
|
||||
IP is bad
|
||||
|
||||
2002-09-20 23:59 strtok
|
||||
|
||||
* doc/libopm-api.txt: Added proxy types to API doc Fixed > on email
|
||||
in API doc
|
||||
|
||||
2002-09-20 22:50 strtok
|
||||
|
||||
* doc/libopm-api.txt: Better describing of OPM_ERR_T codes in
|
||||
libopm-api.txt
|
||||
|
||||
2002-09-20 22:09 strtok
|
||||
|
||||
* doc/libopm-api.txt, src/libopm.c: Updated libopm-api.txt
|
||||
|
||||
2002-09-20 20:31 strtok
|
||||
|
||||
* src/: malloc.c, malloc.h: Renamed malloc wrappers with libopm_
|
||||
prefix and added #defines for MyMalloc and MyFree
|
||||
|
||||
2002-09-20 19:41 strtok
|
||||
|
||||
* src/: libopm.c, proxy.c, proxy.h: Prefixed proxy functions with
|
||||
libopm_
|
||||
|
||||
2002-09-20 18:42 strtok
|
||||
|
||||
* src/: libopm.c, libopm.h, list.c, list.h, opm.h, opm_common.h:
|
||||
Prefixed functions in libopm.c and list.c with libopm_ Made certain
|
||||
functions (which should be) static
|
||||
|
||||
2002-09-20 17:50 strtok
|
||||
|
||||
* src/: config.c, config.h, libopm.c, opm.h, proxy.c, test.c:
|
||||
Changed all config.c functions to have a libopm_ prefix
|
||||
|
||||
2002-09-14 15:59 strtok
|
||||
|
||||
* doc/libopm-api.txt: Added libopm-api.txt
|
||||
|
||||
2002-09-14 14:58 strtok
|
||||
|
||||
* src/test.c: Use opm_callback on test.c instead of
|
||||
opm_remote_callback
|
||||
|
||||
2002-09-14 13:44 strtok
|
||||
|
||||
* src/: libopm.c, libopm.h, opm.h, opm_error.h, opm_types.h,
|
||||
test.c: Restructured callback code to use an array.
|
||||
|
||||
2002-09-13 19:07 strtok
|
||||
|
||||
* src/libopm.c: Removed printf's and comments used to debug
|
||||
|
||||
2002-09-13 19:04 strtok
|
||||
|
||||
* src/: libopm.c, opm.h: Created a scan queue, if this is working
|
||||
as it should be... the performance increase is amazing.
|
||||
|
||||
2002-09-11 23:40 andy
|
||||
|
||||
* configure, configure.in, src/setup.h.in: Check for Nick Faldo
|
||||
|
||||
2002-09-11 23:14 andy
|
||||
|
||||
* configure, configure.in, src/Makefile.am, src/Makefile.in,
|
||||
src/setup.h.in: Removing a bunch of unused autoconf tests.
|
||||
|
||||
2002-09-11 23:12 andy
|
||||
|
||||
* src/: compat.c, compat.h, proxy.c: Some systems don't have
|
||||
inet_aton(), Solaris being a great example. Here's our own
|
||||
implementation which is only included if inet_aton() is not
|
||||
available.
|
||||
|
||||
2002-09-11 22:58 andy
|
||||
|
||||
* src/inet.c: If a system has strings.h, it needs to be #included
|
||||
wherever string.h is #included.
|
||||
|
||||
2002-09-11 22:55 andy
|
||||
|
||||
* src/test.c: Check for unistd.h.
|
||||
|
||||
2002-09-11 22:50 andy
|
||||
|
||||
* src/.cvsignore: Ignore generated binary
|
||||
|
||||
2002-09-11 22:49 andy
|
||||
|
||||
* src/libopm.c: Check if we need & have sys/time.h.
|
||||
|
||||
2002-09-11 22:45 andy
|
||||
|
||||
* src/inet.h: Check HAVE_FCNTL_H.
|
||||
|
||||
2002-09-11 22:42 andy
|
||||
|
||||
* src/inet.h: Check HAVE_SYS_POLL_H.
|
||||
|
||||
2002-09-11 22:36 andy
|
||||
|
||||
* src/: config.c, inet.c, inet.h, libopm.c, list.c, malloc.c,
|
||||
malloc.h, opm.h, proxy.c, test.c: Add RCS tags to all .c files.
|
||||
Protect standard headers with STDC_HEADERS. Correct missing
|
||||
"const" in inetntop() prototype.
|
||||
|
||||
2002-09-11 21:39 andy
|
||||
|
||||
* src/: Makefile.am, Makefile.in: DOn't install "test" and
|
||||
"test_debug", they're just test programs.
|
||||
|
||||
2002-09-11 20:56 andy
|
||||
|
||||
* config.guess, config.sub: All of these files I initially copied
|
||||
in. But, apparently, "You should use the libtoolize program,
|
||||
rather than manually copying these files into your package."
|
||||
*smacked wrist*
|
||||
|
||||
2002-09-11 20:45 andy
|
||||
|
||||
* Makefile.in, configure, configure.in: Change default install
|
||||
prefix to /usr/local/libopm. Install LICENSE as well.
|
||||
|
||||
2002-09-11 20:41 andy
|
||||
|
||||
* Makefile.am, Makefile.in, aclocal.m4, config.guess, config.sub,
|
||||
configure, configure.in, depcomp, install-sh, ltmain.sh, missing,
|
||||
mkinstalldirs, src/Makefile.am, src/Makefile.in, src/setup.h.in:
|
||||
First stab at autoconf/automake/libtoolizing libopm.
|
||||
|
||||
2002-09-11 20:40 andy
|
||||
|
||||
* .cvsignore: And again -- some people will need ./configure
|
||||
|
||||
2002-09-11 20:38 andy
|
||||
|
||||
* src/.cvsignore: More things for CVS to ignore.
|
||||
|
||||
2002-09-11 20:33 andy
|
||||
|
||||
* .cvsignore: A little bit zealous with the cvsignore there.
|
||||
|
||||
2002-09-11 20:32 andy
|
||||
|
||||
* .cvsignore, src/.cvsignore: autoconf / automake / libtool produce
|
||||
lots of files that need to be ignored!
|
||||
|
||||
2002-09-11 11:49 strtok
|
||||
|
||||
* src/: config.c, libopm.c, malloc.c: Fixed various major memory
|
||||
leaks. Made more NULL style changes.
|
||||
|
||||
2002-09-11 00:47 strtok
|
||||
|
||||
* src/: config.c, libopm.c: Added checks for NULL function
|
||||
callbacks.
|
||||
|
||||
2002-09-09 13:15 strtok
|
||||
|
||||
* src/: libopm.c, test.c: Fixed scan_free and connection_free
|
||||
clenaup
|
||||
|
||||
2002-09-09 11:48 strtok
|
||||
|
||||
* src/libopm.c: Fix for timeouts. Only timeout a socket if it's not
|
||||
unestablished!
|
||||
|
||||
2002-09-09 11:44 strtok
|
||||
|
||||
* src/: libopm.c, opm.h: Added fd_limit functionality Added
|
||||
unsigned int fd_use in OPM_T
|
||||
|
||||
2002-09-09 11:07 strtok
|
||||
|
||||
* src/test.c: Updated test.c to handle error callbacks
|
||||
|
||||
2002-09-09 10:50 strtok
|
||||
|
||||
* src/: config.c, libopm.c, opm_error.h, opm_types.h: Added
|
||||
setup_remote function in libopm.c to fill a remote struct with
|
||||
temporary connection struct information Added OPM_CONFIG_MAX_READ
|
||||
and functionality Added OPM_CONFIG_TIMEOUT and functionality Added
|
||||
OPM_ERR_MAX_READ and do_error functionality
|
||||
|
||||
2002-09-09 00:54 strtok
|
||||
|
||||
* src/: libopm.c, test.c: Fixed timeout logic Fixed passing of
|
||||
proper protocol on fun_timeout
|
||||
|
||||
2002-09-09 00:50 strtok
|
||||
|
||||
* src/: libopm.c, proxy.c, proxy.h, test.c: Converted all protocols
|
||||
to libopm (cisco, socks4, socks5 and wingate)
|
||||
|
||||
2002-09-09 00:15 strtok
|
||||
|
||||
* src/: libopm.c, libopm.h, test.c: Added check_close code Added
|
||||
fun_timeout functionality Added fun_end functionality
|
||||
|
||||
2002-09-08 23:28 strtok
|
||||
|
||||
* src/: libopm.c, test.c: Added callback functionality for
|
||||
fun_negfail
|
||||
|
||||
2002-09-08 21:22 strtok
|
||||
|
||||
* src/: libopm.c, opm_error.h: Added OPM_ERR_BADPROTOCOL
|
||||
|
||||
2002-09-08 21:19 strtok
|
||||
|
||||
* src/: config.c, opm_error.h: Renamed OPM_ERR_INVALIDKEY to BADKEY
|
||||
Renamed OPM_ERR_BADADDRESS to BADVALUE
|
||||
|
||||
2002-09-08 21:16 strtok
|
||||
|
||||
* src/: config.c, libopm.c, libopm.h, opm.h, opm_error.h, test.c:
|
||||
Added do_error function Added error codes for opm_config return
|
||||
|
||||
2002-09-08 20:39 strtok
|
||||
|
||||
* src/: libopm.c, test.c: Added do_openproxy and open proxy
|
||||
callback
|
||||
|
||||
2002-09-08 20:12 strtok
|
||||
|
||||
* src/: proxy.c, proxy.h: Added proxy.c/proxy.h which contains
|
||||
protocol specific functions
|
||||
|
||||
2002-09-08 20:11 strtok
|
||||
|
||||
* src/: config.c, libopm.c, libopm.h, make, opm_error.h,
|
||||
opm_types.h, test.c: Read in data from connection and check against
|
||||
target string
|
||||
|
||||
2002-09-08 17:15 strtok
|
||||
|
||||
* src/list.c: Use NULL instead of 0 in list.c.
|
||||
|
||||
2002-09-08 16:56 strtok
|
||||
|
||||
* src/: inet.h, libopm.c, test.c: Added connect and poll code
|
||||
|
||||
2002-09-05 05:42 strtok
|
||||
|
||||
* src/: inet.h, libopm.c, list.h, opm_types.h: Added check_poll
|
||||
function and start of poll() code Added do_readready function Added
|
||||
do_writeready function
|
||||
|
||||
2002-09-04 21:28 strtok
|
||||
|
||||
* src/: inet.h, libopm.c, opm.h, test.c: Started socket framework
|
||||
with check_established, check_poll and do_connect
|
||||
|
||||
2002-09-04 18:56 strtok
|
||||
|
||||
* src/: libopm.c, list.h, opm.h, test.c: Adapted DLINK macros from
|
||||
hyb7 (androsyn)
|
||||
|
||||
2002-09-04 17:17 strtok
|
||||
|
||||
* src/inet.c: Added inet.c
|
||||
|
||||
2002-09-04 17:08 strtok
|
||||
|
||||
* src/: config.c, libopm.c, make, opm.h, test.c: Convert IP to byte
|
||||
format on opm_remote_create
|
||||
|
||||
2002-09-04 15:46 strtok
|
||||
|
||||
* src/: config.c, libopm.c, opm.h, opm_types.h: Added opm_cycle API
|
||||
function Fixed prototype for opm_remote_create Changed config vars
|
||||
and types to use OPM_ prefix
|
||||
|
||||
2002-09-04 14:47 strtok
|
||||
|
||||
* src/: libopm.h, opm.h: Added comments to libopm.h/opm.h
|
||||
|
||||
2002-09-04 14:18 strtok
|
||||
|
||||
* src/: config.c, inet.h: Added config ADDRESS type
|
||||
|
||||
2002-09-04 13:57 strtok
|
||||
|
||||
* src/: config.c, inet.h, opm_types.h: Added inet.h with common
|
||||
ipv4/ipv6
|
||||
|
||||
2002-09-03 23:51 strtok
|
||||
|
||||
* src/: config.h, libopm.h, opm.h, opm_error.h: Cleaned up various
|
||||
header files. Moved config API functions from config.h to opm.h
|
||||
|
||||
2002-09-03 23:36 strtok
|
||||
|
||||
* src/: libopm.h, opm.h: Seperated API and non API definitions
|
||||
between opm.h and libopm.h respectively
|
||||
|
||||
2002-09-03 23:19 strtok
|
||||
|
||||
* src/: libopm.c, list.c, list.h, opm_common.h: Moved list
|
||||
functions to list.h (structures still reside in opm_common.h)
|
||||
|
||||
2002-09-03 23:15 strtok
|
||||
|
||||
* src/: config.c, config.h, libopm.c, libopm.h, libopm_error.h,
|
||||
opm_error.h, opm_types.h: Moved libopm_error.h to opm_error.h Moved
|
||||
all type #defines to opm_types.h
|
||||
|
||||
2002-09-03 23:10 strtok
|
||||
|
||||
* src/: libopm.c, libopm.h, list.c, list.h, opm_common.h: Changed
|
||||
list.h to opm_common.h
|
||||
|
||||
2002-08-09 12:47 strtok
|
||||
|
||||
* src/: libopm.c, libopm.h: Changed OPM_SCAN_T::scans to
|
||||
OPM_SCAN_T::connections Added connection_create function Added
|
||||
connection_free function Added code to create the list of
|
||||
connections/protocols in scan_create
|
||||
|
||||
2002-08-08 20:44 strtok
|
||||
|
||||
* src/: config.c, config.h: Updated config_free function to free
|
||||
all data properly Added config_gettype(key) function
|
||||
|
||||
2002-08-08 17:32 strtok
|
||||
|
||||
* src/: config.c, config.h, libopm.h: Recode of config.c to use an
|
||||
array of void* instead of struct
|
||||
|
||||
2002-08-07 20:54 strtok
|
||||
|
||||
* src/: libopm.c, libopm.h, libopm_error.h: Added opm_scan function
|
||||
Added scan_create function Added scan_free function
|
||||
|
||||
2002-08-07 16:28 strtok
|
||||
|
||||
* src/: libopm.c, libopm.h: Renamed opm_init to opm_create Renamed
|
||||
opm_remote to opm_remote_create
|
||||
|
||||
2002-08-07 15:53 strtok
|
||||
|
||||
* src/: config.c, libopm.c, libopm.h: Added opm_remote_free
|
||||
function Moved prototypes for internal functions from libopm.h ->
|
||||
libopm.c
|
||||
|
||||
2002-08-07 14:22 strtok
|
||||
|
||||
* src/: config.c, config.h, libopm.c, libopm.h, libopm_error.h:
|
||||
Fixed memory leak in config_free Cleaned up opm_free Added
|
||||
libopm_error.h (to hold error codes), and OPM_ERR_T
|
||||
|
||||
2002-08-06 23:02 strtok
|
||||
|
||||
* src/: config.c, libopm.c, libopm.h, malloc.c: Further work on
|
||||
opm_free
|
||||
|
||||
2002-08-06 19:45 strtok
|
||||
|
||||
* src/: config.c, config.h, libopm.c, libopm.h: Added opm_free
|
||||
function Added protocol_config_free function
|
||||
|
||||
2002-08-06 18:13 strtok
|
||||
|
||||
* src/: libopm.c, libopm.h: Added opm_addtype function
|
||||
|
||||
2002-08-06 14:46 strtok
|
||||
|
||||
* src/: config.c, config.h, libopm.c, libopm.h: Added opm_config
|
||||
and config_set functions
|
||||
|
||||
2002-08-05 15:09 strtok
|
||||
|
||||
* src/: config.c, config.h: Added config.c/config.h to seperate
|
||||
config functions from the API
|
||||
|
||||
2002-08-05 15:07 strtok
|
||||
|
||||
* src/: libopm.c, libopm.h, malloc.c: Added opm_init() and
|
||||
config_create()
|
||||
|
||||
2002-08-05 14:33 strtok
|
||||
|
||||
* src/: libopm.c, libopm.h: Restructured structures
|
||||
|
||||
2002-08-05 12:51 strtok
|
||||
|
||||
* src/: libopm.c, list.c, list.h: No longer need list_t** in
|
||||
list_add and list_remove, this was from the attempted polymorphic
|
||||
code No need to cast returns from malloc
|
||||
|
||||
2002-08-05 11:46 strtok
|
||||
|
||||
* src/: libopm.c, libopm.h, list.c, list.h, malloc.c, malloc.h:
|
||||
Moved source files to src
|
||||
|
||||
2002-08-05 11:42 strtok
|
||||
|
||||
* libopm.c, libopm.h, list.c, list.h, malloc.c, malloc.h: Moved
|
||||
source files to src
|
||||
|
||||
2002-08-05 11:14 strtok
|
||||
|
||||
* list.c, list.h:
|
||||
----------------------------------------------------------------------
|
||||
Don't need list_t ** anymore in list_add, list_remove. This was
|
||||
from the attempted polymorphic code.
|
||||
|
||||
2002-08-05 11:07 strtok
|
||||
|
||||
* libopm.c, list.c: Removed any casts on MyMalloc
|
||||
|
||||
2002-08-05 01:29 strtok
|
||||
|
||||
* list.c: Fix for if head is also tail (1 element), this code
|
||||
really would be cleaner if circular
|
||||
|
||||
2002-08-05 01:08 strtok
|
||||
|
||||
* list.c, list.h: Changed all malloc/free to MyMalloc/MyFree in
|
||||
list.c Added node_free and list_free functions
|
||||
|
||||
2002-08-05 00:55 strtok
|
||||
|
||||
* list.c: Added elements to track number of elements in a list
|
||||
|
||||
2002-08-05 00:54 strtok
|
||||
|
||||
* list.c, list.h: Revamped list code to include a list_t and node_t
|
||||
|
||||
2002-08-04 20:31 strtok
|
||||
|
||||
* list.c, list.h: Added list_create function to create a list node
|
||||
Added list_add function to add a list node to a list
|
||||
|
||||
2002-08-03 19:01 strtok
|
||||
|
||||
* libopm.c: opm_new DOES have a return value
|
||||
|
||||
2002-08-03 18:56 strtok
|
||||
|
||||
* libopm.c, libopm.h: Added initializations to opm_new
|
||||
|
||||
2002-08-03 18:25 strtok
|
||||
|
||||
* libopm.c: Oops wrote over libopm.c with libopm.o (gcc -o libopm.c
|
||||
-c libopm.c)!
|
||||
|
||||
2002-08-03 18:15 strtok
|
||||
|
||||
* libopm.c, libopm.h, malloc.c:
|
||||
Added opm_new and opm_free functions. Added comments to malloc.c
|
||||
and libopm.c.
|
||||
|
||||
2002-08-03 17:16 strtok
|
||||
|
||||
* malloc.c, malloc.h:
|
||||
Added malloc/free functions, should make porting and error handling
|
||||
easier in the future.
|
||||
|
||||
2002-08-03 16:25 strtok
|
||||
|
||||
* LICENSE, libopm.c, libopm.h: Initial revision
|
||||
|
||||
2002-08-03 16:25 strtok
|
||||
|
||||
* LICENSE, libopm.c, libopm.h: initial import
|
||||
|
339
libopm/LICENSE
339
libopm/LICENSE
|
@ -1,339 +0,0 @@
|
|||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 2, June 1991
|
||||
|
||||
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
|
||||
675 Mass Ave, Cambridge, MA 02139, USA
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
License is intended to guarantee your freedom to share and change free
|
||||
software--to make sure the software is free for all its users. This
|
||||
General Public License applies to most of the Free Software
|
||||
Foundation's software and to any other program whose authors commit to
|
||||
using it. (Some other Free Software Foundation software is covered by
|
||||
the GNU Library General Public License instead.) You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
this service if you wish), that you receive source code or can get it
|
||||
if you want it, that you can change the software or use pieces of it
|
||||
in new free programs; and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid
|
||||
anyone to deny you these rights or to ask you to surrender the rights.
|
||||
These restrictions translate to certain responsibilities for you if you
|
||||
distribute copies of the software, or if you modify it.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must give the recipients all the rights that
|
||||
you have. You must make sure that they, too, receive or can get the
|
||||
source code. And you must show them these terms so they know their
|
||||
rights.
|
||||
|
||||
We protect your rights with two steps: (1) copyright the software, and
|
||||
(2) offer you this license which gives you legal permission to copy,
|
||||
distribute and/or modify the software.
|
||||
|
||||
Also, for each author's protection and ours, we want to make certain
|
||||
that everyone understands that there is no warranty for this free
|
||||
software. If the software is modified by someone else and passed on, we
|
||||
want its recipients to know that what they have is not the original, so
|
||||
that any problems introduced by others will not reflect on the original
|
||||
authors' reputations.
|
||||
|
||||
Finally, any free program is threatened constantly by software
|
||||
patents. We wish to avoid the danger that redistributors of a free
|
||||
program will individually obtain patent licenses, in effect making the
|
||||
program proprietary. To prevent this, we have made it clear that any
|
||||
patent must be licensed for everyone's free use or not licensed at all.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License applies to any program or other work which contains
|
||||
a notice placed by the copyright holder saying it may be distributed
|
||||
under the terms of this General Public License. The "Program", below,
|
||||
refers to any such program or work, and a "work based on the Program"
|
||||
means either the Program or any derivative work under copyright law:
|
||||
that is to say, a work containing the Program or a portion of it,
|
||||
either verbatim or with modifications and/or translated into another
|
||||
language. (Hereinafter, translation is included without limitation in
|
||||
the term "modification".) Each licensee is addressed as "you".
|
||||
|
||||
Activities other than copying, distribution and modification are not
|
||||
covered by this License; they are outside its scope. The act of
|
||||
running the Program is not restricted, and the output from the Program
|
||||
is covered only if its contents constitute a work based on the
|
||||
Program (independent of having been made by running the Program).
|
||||
Whether that is true depends on what the Program does.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Program's
|
||||
source code as you receive it, in any medium, provided that you
|
||||
conspicuously and appropriately publish on each copy an appropriate
|
||||
copyright notice and disclaimer of warranty; keep intact all the
|
||||
notices that refer to this License and to the absence of any warranty;
|
||||
and give any other recipients of the Program a copy of this License
|
||||
along with the Program.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy, and
|
||||
you may at your option offer warranty protection in exchange for a fee.
|
||||
|
||||
2. You may modify your copy or copies of the Program or any portion
|
||||
of it, thus forming a work based on the Program, and copy and
|
||||
distribute such modifications or work under the terms of Section 1
|
||||
above, provided that you also meet all of these conditions:
|
||||
|
||||
a) You must cause the modified files to carry prominent notices
|
||||
stating that you changed the files and the date of any change.
|
||||
|
||||
b) You must cause any work that you distribute or publish, that in
|
||||
whole or in part contains or is derived from the Program or any
|
||||
part thereof, to be licensed as a whole at no charge to all third
|
||||
parties under the terms of this License.
|
||||
|
||||
c) If the modified program normally reads commands interactively
|
||||
when run, you must cause it, when started running for such
|
||||
interactive use in the most ordinary way, to print or display an
|
||||
announcement including an appropriate copyright notice and a
|
||||
notice that there is no warranty (or else, saying that you provide
|
||||
a warranty) and that users may redistribute the program under
|
||||
these conditions, and telling the user how to view a copy of this
|
||||
License. (Exception: if the Program itself is interactive but
|
||||
does not normally print such an announcement, your work based on
|
||||
the Program is not required to print an announcement.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Program,
|
||||
and can be reasonably considered independent and separate works in
|
||||
themselves, then this License, and its terms, do not apply to those
|
||||
sections when you distribute them as separate works. But when you
|
||||
distribute the same sections as part of a whole which is a work based
|
||||
on the Program, the distribution of the whole must be on the terms of
|
||||
this License, whose permissions for other licensees extend to the
|
||||
entire whole, and thus to each and every part regardless of who wrote it.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest
|
||||
your rights to work written entirely by you; rather, the intent is to
|
||||
exercise the right to control the distribution of derivative or
|
||||
collective works based on the Program.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Program
|
||||
with the Program (or with a work based on the Program) on a volume of
|
||||
a storage or distribution medium does not bring the other work under
|
||||
the scope of this License.
|
||||
|
||||
3. You may copy and distribute the Program (or a work based on it,
|
||||
under Section 2) in object code or executable form under the terms of
|
||||
Sections 1 and 2 above provided that you also do one of the following:
|
||||
|
||||
a) Accompany it with the complete corresponding machine-readable
|
||||
source code, which must be distributed under the terms of Sections
|
||||
1 and 2 above on a medium customarily used for software interchange; or,
|
||||
|
||||
b) Accompany it with a written offer, valid for at least three
|
||||
years, to give any third party, for a charge no more than your
|
||||
cost of physically performing source distribution, a complete
|
||||
machine-readable copy of the corresponding source code, to be
|
||||
distributed under the terms of Sections 1 and 2 above on a medium
|
||||
customarily used for software interchange; or,
|
||||
|
||||
c) Accompany it with the information you received as to the offer
|
||||
to distribute corresponding source code. (This alternative is
|
||||
allowed only for noncommercial distribution and only if you
|
||||
received the program in object code or executable form with such
|
||||
an offer, in accord with Subsection b above.)
|
||||
|
||||
The source code for a work means the preferred form of the work for
|
||||
making modifications to it. For an executable work, complete source
|
||||
code means all the source code for all modules it contains, plus any
|
||||
associated interface definition files, plus the scripts used to
|
||||
control compilation and installation of the executable. However, as a
|
||||
special exception, the source code distributed need not include
|
||||
anything that is normally distributed (in either source or binary
|
||||
form) with the major components (compiler, kernel, and so on) of the
|
||||
operating system on which the executable runs, unless that component
|
||||
itself accompanies the executable.
|
||||
|
||||
If distribution of executable or object code is made by offering
|
||||
access to copy from a designated place, then offering equivalent
|
||||
access to copy the source code from the same place counts as
|
||||
distribution of the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
|
||||
4. You may not copy, modify, sublicense, or distribute the Program
|
||||
except as expressly provided under this License. Any attempt
|
||||
otherwise to copy, modify, sublicense or distribute the Program is
|
||||
void, and will automatically terminate your rights under this License.
|
||||
However, parties who have received copies, or rights, from you under
|
||||
this License will not have their licenses terminated so long as such
|
||||
parties remain in full compliance.
|
||||
|
||||
5. You are not required to accept this License, since you have not
|
||||
signed it. However, nothing else grants you permission to modify or
|
||||
distribute the Program or its derivative works. These actions are
|
||||
prohibited by law if you do not accept this License. Therefore, by
|
||||
modifying or distributing the Program (or any work based on the
|
||||
Program), you indicate your acceptance of this License to do so, and
|
||||
all its terms and conditions for copying, distributing or modifying
|
||||
the Program or works based on it.
|
||||
|
||||
6. Each time you redistribute the Program (or any work based on the
|
||||
Program), the recipient automatically receives a license from the
|
||||
original licensor to copy, distribute or modify the Program subject to
|
||||
these terms and conditions. You may not impose any further
|
||||
restrictions on the recipients' exercise of the rights granted herein.
|
||||
You are not responsible for enforcing compliance by third parties to
|
||||
this License.
|
||||
|
||||
7. If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues),
|
||||
conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot
|
||||
distribute so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you
|
||||
may not distribute the Program at all. For example, if a patent
|
||||
license would not permit royalty-free redistribution of the Program by
|
||||
all those who receive copies directly or indirectly through you, then
|
||||
the only way you could satisfy both it and this License would be to
|
||||
refrain entirely from distribution of the Program.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under
|
||||
any particular circumstance, the balance of the section is intended to
|
||||
apply and the section as a whole is intended to apply in other
|
||||
circumstances.
|
||||
|
||||
It is not the purpose of this section to induce you to infringe any
|
||||
patents or other property right claims or to contest validity of any
|
||||
such claims; this section has the sole purpose of protecting the
|
||||
integrity of the free software distribution system, which is
|
||||
implemented by public license practices. Many people have made
|
||||
generous contributions to the wide range of software distributed
|
||||
through that system in reliance on consistent application of that
|
||||
system; it is up to the author/donor to decide if he or she is willing
|
||||
to distribute software through any other system and a licensee cannot
|
||||
impose that choice.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to
|
||||
be a consequence of the rest of this License.
|
||||
|
||||
8. If the distribution and/or use of the Program is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Program under this License
|
||||
may add an explicit geographical distribution limitation excluding
|
||||
those countries, so that distribution is permitted only in or among
|
||||
countries not thus excluded. In such case, this License incorporates
|
||||
the limitation as if written in the body of this License.
|
||||
|
||||
9. The Free Software Foundation may publish revised and/or new versions
|
||||
of the General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Program
|
||||
specifies a version number of this License which applies to it and "any
|
||||
later version", you have the option of following the terms and conditions
|
||||
either of that version or of any later version published by the Free
|
||||
Software Foundation. If the Program does not specify a version number of
|
||||
this License, you may choose any version ever published by the Free Software
|
||||
Foundation.
|
||||
|
||||
10. If you wish to incorporate parts of the Program into other free
|
||||
programs whose distribution conditions are different, write to the author
|
||||
to ask for permission. For software which is copyrighted by the Free
|
||||
Software Foundation, write to the Free Software Foundation; we sometimes
|
||||
make exceptions for this. Our decision will be guided by the two goals
|
||||
of preserving the free status of all derivatives of our free software and
|
||||
of promoting the sharing and reuse of software generally.
|
||||
|
||||
NO WARRANTY
|
||||
|
||||
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
||||
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
|
||||
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
|
||||
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
|
||||
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
|
||||
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
|
||||
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
|
||||
REPAIR OR CORRECTION.
|
||||
|
||||
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
|
||||
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
|
||||
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
|
||||
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
|
||||
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
|
||||
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
Appendix: How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
convey the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) 19yy <name of author>
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program is interactive, make it output a short notice like this
|
||||
when it starts in an interactive mode:
|
||||
|
||||
Gnomovision version 69, Copyright (C) 19yy name of author
|
||||
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, the commands you use may
|
||||
be called something other than `show w' and `show c'; they could even be
|
||||
mouse-clicks or menu items--whatever suits your program.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or your
|
||||
school, if any, to sign a "copyright disclaimer" for the program, if
|
||||
necessary. Here is a sample; alter the names:
|
||||
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
|
||||
`Gnomovision' (which makes passes at compilers) written by James Hacker.
|
||||
|
||||
<signature of Ty Coon>, 1 April 1989
|
||||
Ty Coon, President of Vice
|
||||
|
||||
This General Public License does not permit incorporating your program into
|
||||
proprietary programs. If your program is a subroutine library, you may
|
||||
consider it more useful to permit linking proprietary applications with the
|
||||
library. If this is what you want to do, use the GNU Library General
|
||||
Public License instead of this License.
|
|
@ -1,12 +0,0 @@
|
|||
AUTOMAKE_OPTIONS = foreign
|
||||
|
||||
SUBDIRS = src
|
||||
|
||||
EXTRA_DIST = LICENSE
|
||||
|
||||
LIBTOOL_DEPS = @LIBTOOL_DEPS@
|
||||
libtool: $(LIBTOOL_DEPS)
|
||||
$(SHELL) ./config.status --recheck
|
||||
|
||||
docs:
|
||||
-cd doc && $(MAKE) $(AM_MAKEFLAGS) $@
|
|
@ -1,436 +0,0 @@
|
|||
# Makefile.in generated by automake 1.6.3 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
|
||||
# Free Software Foundation, Inc.
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
@SET_MAKE@
|
||||
SHELL = @SHELL@
|
||||
|
||||
srcdir = @srcdir@
|
||||
top_srcdir = @top_srcdir@
|
||||
VPATH = @srcdir@
|
||||
prefix = @prefix@
|
||||
exec_prefix = @exec_prefix@
|
||||
|
||||
bindir = @bindir@
|
||||
sbindir = @sbindir@
|
||||
libexecdir = @libexecdir@
|
||||
datadir = @datadir@
|
||||
sysconfdir = @sysconfdir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
localstatedir = @localstatedir@
|
||||
libdir = @libdir@
|
||||
infodir = @infodir@
|
||||
mandir = @mandir@
|
||||
includedir = @includedir@
|
||||
oldincludedir = /usr/include
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
top_builddir = .
|
||||
|
||||
ACLOCAL = @ACLOCAL@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
|
||||
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
install_sh_DATA = $(install_sh) -c -m 644
|
||||
install_sh_PROGRAM = $(install_sh) -c
|
||||
install_sh_SCRIPT = $(install_sh) -c
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_HEADER = $(INSTALL_DATA)
|
||||
transform = @program_transform_name@
|
||||
NORMAL_INSTALL = :
|
||||
PRE_INSTALL = :
|
||||
POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
host_alias = @host_alias@
|
||||
host_triplet = @host@
|
||||
|
||||
EXEEXT = @EXEEXT@
|
||||
OBJEXT = @OBJEXT@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
AMTAR = @AMTAR@
|
||||
AS = @AS@
|
||||
AWK = @AWK@
|
||||
CC = @CC@
|
||||
DEPDIR = @DEPDIR@
|
||||
DLLTOOL = @DLLTOOL@
|
||||
DOX_DIR_HTML = @DOX_DIR_HTML@
|
||||
DOX_DIR_LATEX = @DOX_DIR_LATEX@
|
||||
DOX_DIR_MAN = @DOX_DIR_MAN@
|
||||
ECHO = @ECHO@
|
||||
ETR_SOCKET_LIBS = @ETR_SOCKET_LIBS@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
LIBTOOL = @LIBTOOL@
|
||||
|
||||
LIBTOOL_DEPS = @LIBTOOL_DEPS@
|
||||
LNSL = @LNSL@
|
||||
LN_S = @LN_S@
|
||||
LSOCKET = @LSOCKET@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
MAINT = @MAINT@
|
||||
OBJDUMP = @OBJDUMP@
|
||||
PACKAGE = @PACKAGE@
|
||||
RANLIB = @RANLIB@
|
||||
STRIP = @STRIP@
|
||||
VERSION = @VERSION@
|
||||
am__include = @am__include@
|
||||
am__quote = @am__quote@
|
||||
install_sh = @install_sh@
|
||||
AUTOMAKE_OPTIONS = foreign
|
||||
|
||||
SUBDIRS = src
|
||||
|
||||
EXTRA_DIST = LICENSE
|
||||
subdir = .
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
|
||||
CONFIG_HEADER = $(top_builddir)/src/setup.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
DIST_SOURCES =
|
||||
|
||||
RECURSIVE_TARGETS = info-recursive dvi-recursive install-info-recursive \
|
||||
uninstall-info-recursive all-recursive install-data-recursive \
|
||||
install-exec-recursive installdirs-recursive install-recursive \
|
||||
uninstall-recursive check-recursive installcheck-recursive
|
||||
DIST_COMMON = ChangeLog Makefile.am Makefile.in aclocal.m4 config.guess \
|
||||
config.sub configure configure.in depcomp install-sh ltmain.sh \
|
||||
missing mkinstalldirs
|
||||
DIST_SUBDIRS = $(SUBDIRS)
|
||||
all: all-recursive
|
||||
|
||||
.SUFFIXES:
|
||||
|
||||
am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
|
||||
configure.lineno
|
||||
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
|
||||
cd $(top_srcdir) && \
|
||||
$(AUTOMAKE) --foreign Makefile
|
||||
Makefile: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)
|
||||
|
||||
$(top_builddir)/config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||
$(SHELL) ./config.status --recheck
|
||||
$(srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES)
|
||||
cd $(srcdir) && $(AUTOCONF)
|
||||
|
||||
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ configure.in
|
||||
cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
|
||||
|
||||
mostlyclean-libtool:
|
||||
-rm -f *.lo
|
||||
|
||||
clean-libtool:
|
||||
-rm -rf .libs _libs
|
||||
|
||||
distclean-libtool:
|
||||
-rm -f libtool
|
||||
uninstall-info-am:
|
||||
|
||||
# This directory's subdirectories are mostly independent; you can cd
|
||||
# into them and run `make' without going through this Makefile.
|
||||
# To change the values of `make' variables: instead of editing Makefiles,
|
||||
# (1) if the variable is set in `config.status', edit `config.status'
|
||||
# (which will cause the Makefiles to be regenerated when you run `make');
|
||||
# (2) otherwise, pass the desired values on the `make' command line.
|
||||
$(RECURSIVE_TARGETS):
|
||||
@set fnord $$MAKEFLAGS; amf=$$2; \
|
||||
dot_seen=no; \
|
||||
target=`echo $@ | sed s/-recursive//`; \
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
echo "Making $$target in $$subdir"; \
|
||||
if test "$$subdir" = "."; then \
|
||||
dot_seen=yes; \
|
||||
local_target="$$target-am"; \
|
||||
else \
|
||||
local_target="$$target"; \
|
||||
fi; \
|
||||
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|
||||
|| case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
|
||||
done; \
|
||||
if test "$$dot_seen" = "no"; then \
|
||||
$(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
|
||||
fi; test -z "$$fail"
|
||||
|
||||
mostlyclean-recursive clean-recursive distclean-recursive \
|
||||
maintainer-clean-recursive:
|
||||
@set fnord $$MAKEFLAGS; amf=$$2; \
|
||||
dot_seen=no; \
|
||||
case "$@" in \
|
||||
distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
|
||||
*) list='$(SUBDIRS)' ;; \
|
||||
esac; \
|
||||
rev=''; for subdir in $$list; do \
|
||||
if test "$$subdir" = "."; then :; else \
|
||||
rev="$$subdir $$rev"; \
|
||||
fi; \
|
||||
done; \
|
||||
rev="$$rev ."; \
|
||||
target=`echo $@ | sed s/-recursive//`; \
|
||||
for subdir in $$rev; do \
|
||||
echo "Making $$target in $$subdir"; \
|
||||
if test "$$subdir" = "."; then \
|
||||
local_target="$$target-am"; \
|
||||
else \
|
||||
local_target="$$target"; \
|
||||
fi; \
|
||||
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|
||||
|| case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
|
||||
done && test -z "$$fail"
|
||||
tags-recursive:
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
|
||||
done
|
||||
|
||||
ETAGS = etags
|
||||
ETAGSFLAGS =
|
||||
|
||||
tags: TAGS
|
||||
|
||||
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
mkid -fID $$unique
|
||||
|
||||
TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
tags=; \
|
||||
here=`pwd`; \
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
if test "$$subdir" = .; then :; else \
|
||||
test -f $$subdir/TAGS && tags="$$tags -i $$here/$$subdir/TAGS"; \
|
||||
fi; \
|
||||
done; \
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
test -z "$(ETAGS_ARGS)$$tags$$unique" \
|
||||
|| $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||
$$tags $$unique
|
||||
|
||||
GTAGS:
|
||||
here=`$(am__cd) $(top_builddir) && pwd` \
|
||||
&& cd $(top_srcdir) \
|
||||
&& gtags -i $(GTAGS_ARGS) $$here
|
||||
|
||||
distclean-tags:
|
||||
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
|
||||
top_distdir = .
|
||||
distdir = $(PACKAGE)-$(VERSION)
|
||||
|
||||
am__remove_distdir = \
|
||||
{ test ! -d $(distdir) \
|
||||
|| { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \
|
||||
&& rm -fr $(distdir); }; }
|
||||
|
||||
GZIP_ENV = --best
|
||||
distcleancheck_listfiles = find . -type f -print
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
$(am__remove_distdir)
|
||||
mkdir $(distdir)
|
||||
$(mkinstalldirs) $(distdir)/doc
|
||||
@list='$(DISTFILES)'; for file in $$list; do \
|
||||
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
|
||||
dir="/$$dir"; \
|
||||
$(mkinstalldirs) "$(distdir)$$dir"; \
|
||||
else \
|
||||
dir=''; \
|
||||
fi; \
|
||||
if test -d $$d/$$file; then \
|
||||
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
|
||||
fi; \
|
||||
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
|
||||
else \
|
||||
test -f $(distdir)/$$file \
|
||||
|| cp -p $$d/$$file $(distdir)/$$file \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
if test "$$subdir" = .; then :; else \
|
||||
test -d $(distdir)/$$subdir \
|
||||
|| mkdir $(distdir)/$$subdir \
|
||||
|| exit 1; \
|
||||
(cd $$subdir && \
|
||||
$(MAKE) $(AM_MAKEFLAGS) \
|
||||
top_distdir="$(top_distdir)" \
|
||||
distdir=../$(distdir)/$$subdir \
|
||||
distdir) \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
-find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \
|
||||
! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
|
||||
! -type d ! -perm -400 -exec chmod a+r {} \; -o \
|
||||
! -type d ! -perm -444 -exec $(SHELL) $(install_sh) -c -m a+r {} {} \; \
|
||||
|| chmod -R a+r $(distdir)
|
||||
dist-gzip: distdir
|
||||
$(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
|
||||
$(am__remove_distdir)
|
||||
|
||||
dist dist-all: distdir
|
||||
$(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
|
||||
$(am__remove_distdir)
|
||||
|
||||
# This target untars the dist file and tries a VPATH configuration. Then
|
||||
# it guarantees that the distribution is self-contained by making another
|
||||
# tarfile.
|
||||
distcheck: dist
|
||||
$(am__remove_distdir)
|
||||
GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(AMTAR) xf -
|
||||
chmod -R a-w $(distdir); chmod a+w $(distdir)
|
||||
mkdir $(distdir)/=build
|
||||
mkdir $(distdir)/=inst
|
||||
chmod a-w $(distdir)
|
||||
dc_install_base=`$(am__cd) $(distdir)/=inst && pwd` \
|
||||
&& cd $(distdir)/=build \
|
||||
&& ../configure --srcdir=.. --prefix=$$dc_install_base \
|
||||
$(DISTCHECK_CONFIGURE_FLAGS) \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) dvi \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) check \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) install \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) installcheck \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) uninstall \
|
||||
&& (test `find $$dc_install_base -type f -print | wc -l` -le 1 \
|
||||
|| { echo "ERROR: files left after uninstall:" ; \
|
||||
find $$dc_install_base -type f -print ; \
|
||||
exit 1; } >&2 ) \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) dist-gzip \
|
||||
&& rm -f $(distdir).tar.gz \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) distcleancheck
|
||||
$(am__remove_distdir)
|
||||
@echo "$(distdir).tar.gz is ready for distribution" | \
|
||||
sed 'h;s/./=/g;p;x;p;x'
|
||||
distcleancheck: distclean
|
||||
if test '$(srcdir)' = . ; then \
|
||||
echo "ERROR: distcleancheck can only run from a VPATH build" ; \
|
||||
exit 1 ; \
|
||||
fi
|
||||
test `$(distcleancheck_listfiles) | wc -l` -eq 0 \
|
||||
|| { echo "ERROR: files left after distclean:" ; \
|
||||
$(distcleancheck_listfiles) ; \
|
||||
exit 1; } >&2
|
||||
check-am: all-am
|
||||
check: check-recursive
|
||||
all-am: Makefile
|
||||
installdirs: installdirs-recursive
|
||||
installdirs-am:
|
||||
|
||||
install: install-recursive
|
||||
install-exec: install-exec-recursive
|
||||
install-data: install-data-recursive
|
||||
uninstall: uninstall-recursive
|
||||
|
||||
install-am: all-am
|
||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||
|
||||
installcheck: installcheck-recursive
|
||||
install-strip:
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
INSTALL_STRIP_FLAG=-s \
|
||||
`test -z '$(STRIP)' || \
|
||||
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
|
||||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
|
||||
distclean-generic:
|
||||
-rm -f Makefile $(CONFIG_CLEAN_FILES)
|
||||
|
||||
maintainer-clean-generic:
|
||||
@echo "This command is intended for maintainers to use"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
clean: clean-recursive
|
||||
|
||||
clean-am: clean-generic clean-libtool mostlyclean-am
|
||||
|
||||
distclean: distclean-recursive
|
||||
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
|
||||
distclean-am: clean-am distclean-generic distclean-libtool \
|
||||
distclean-tags
|
||||
|
||||
dvi: dvi-recursive
|
||||
|
||||
dvi-am:
|
||||
|
||||
info: info-recursive
|
||||
|
||||
info-am:
|
||||
|
||||
install-data-am:
|
||||
|
||||
install-exec-am:
|
||||
|
||||
install-info: install-info-recursive
|
||||
|
||||
install-man:
|
||||
|
||||
installcheck-am:
|
||||
|
||||
maintainer-clean: maintainer-clean-recursive
|
||||
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
|
||||
-rm -rf autom4te.cache
|
||||
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||
|
||||
mostlyclean: mostlyclean-recursive
|
||||
|
||||
mostlyclean-am: mostlyclean-generic mostlyclean-libtool
|
||||
|
||||
uninstall-am: uninstall-info-am
|
||||
|
||||
uninstall-info: uninstall-info-recursive
|
||||
|
||||
.PHONY: $(RECURSIVE_TARGETS) GTAGS all all-am check check-am clean \
|
||||
clean-generic clean-libtool clean-recursive dist dist-all \
|
||||
dist-gzip distcheck distclean distclean-generic \
|
||||
distclean-libtool distclean-recursive distclean-tags \
|
||||
distcleancheck distdir dvi dvi-am dvi-recursive info info-am \
|
||||
info-recursive install install-am install-data install-data-am \
|
||||
install-data-recursive install-exec install-exec-am \
|
||||
install-exec-recursive install-info install-info-am \
|
||||
install-info-recursive install-man install-recursive \
|
||||
install-strip installcheck installcheck-am installdirs \
|
||||
installdirs-am installdirs-recursive maintainer-clean \
|
||||
maintainer-clean-generic maintainer-clean-recursive mostlyclean \
|
||||
mostlyclean-generic mostlyclean-libtool mostlyclean-recursive \
|
||||
tags tags-recursive uninstall uninstall-am uninstall-info-am \
|
||||
uninstall-info-recursive uninstall-recursive
|
||||
|
||||
libtool: $(LIBTOOL_DEPS)
|
||||
$(SHELL) ./config.status --recheck
|
||||
|
||||
docs:
|
||||
-cd doc && $(MAKE) $(AM_MAKEFLAGS) $@
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
|
@ -1,25 +0,0 @@
|
|||
*.sw[po]
|
||||
Makefile.old
|
||||
OPM.c
|
||||
blib
|
||||
Makefile.aperl
|
||||
perlmain.c
|
||||
tmon.out
|
||||
mon.out
|
||||
so_locations
|
||||
pm_to_blib
|
||||
*.o
|
||||
*.a
|
||||
perl.exe
|
||||
perl
|
||||
perl
|
||||
OPM.bs
|
||||
OPM.bso
|
||||
OPM.def
|
||||
libOPM.def
|
||||
OPM.exp
|
||||
OPM.x
|
||||
core
|
||||
core.*perl.*.?
|
||||
*perl.core
|
||||
Makefile
|
|
@ -1,6 +0,0 @@
|
|||
Revision history for Perl extension OPM.
|
||||
|
||||
0.01 Sun Sep 22 01:46:37 2002
|
||||
- original version; created by h2xs 1.21 with options
|
||||
-O -n OPM cvs/libopm/src/opm_types.h cvs/libopm/src/opm_error.h
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
Changes
|
||||
Makefile.PL
|
||||
MANIFEST
|
||||
OPM.pm
|
||||
OPM.xs
|
||||
README
|
||||
test.pl
|
|
@ -1,17 +0,0 @@
|
|||
use ExtUtils::MakeMaker;
|
||||
# See lib/ExtUtils/MakeMaker.pm for details of how to influence
|
||||
# the contents of the Makefile that is written.
|
||||
WriteMakefile(
|
||||
'NAME' => 'OPM',
|
||||
'VERSION_FROM' => 'OPM.pm', # finds $VERSION
|
||||
'PREREQ_PM' => {}, # e.g., Module::Name => 1.1
|
||||
($] >= 5.005 ? ## Add these new keywords supported since 5.005
|
||||
(ABSTRACT_FROM => 'OPM.pm', # retrieve abstract from module
|
||||
AUTHOR => 'David Leadbeater <dg@blitzed.org>') : ()),
|
||||
'LIBS' => ['-L../src/.libs -lopm'], # e.g., '-lm'
|
||||
'DEFINE' => '', # e.g., '-DHAVE_SOMETHING'
|
||||
# Insert -I. if you add *.h files later:
|
||||
'INC' => '', # e.g., '-I/usr/include/other'
|
||||
# Un-comment this if you add C files to link with later:
|
||||
# 'OBJECT' => '$(O_FILES)', # link all the C files too
|
||||
);
|
|
@ -1,269 +0,0 @@
|
|||
package OPM;
|
||||
|
||||
use 5.005;
|
||||
use strict;
|
||||
use vars qw/@ISA $VERSION $AUTOLOAD/;
|
||||
use Carp;
|
||||
|
||||
require Exporter;
|
||||
require DynaLoader;
|
||||
|
||||
@ISA = qw(Exporter DynaLoader);
|
||||
|
||||
$VERSION = '0.01';
|
||||
|
||||
sub AUTOLOAD {
|
||||
# This AUTOLOAD is used to 'autoload' constants from the constant()
|
||||
# XS function. If a constant is not found then control is passed
|
||||
# to the AUTOLOAD in AutoLoader.
|
||||
|
||||
my $constname;
|
||||
($constname = $AUTOLOAD) =~ s/.*:://;
|
||||
croak "& not defined" if $constname eq 'constant';
|
||||
my $val = constant($constname, 0);
|
||||
if ($! != 0) {
|
||||
croak "Your vendor has not defined OPM macro $constname";
|
||||
}
|
||||
|
||||
{
|
||||
no strict 'refs';
|
||||
# Fixed between 5.005_53 and 5.005_61
|
||||
if ($] >= 5.00561) {
|
||||
*$AUTOLOAD = sub () { $val };
|
||||
}
|
||||
else {
|
||||
*$AUTOLOAD = sub { $val };
|
||||
}
|
||||
}
|
||||
goto &$AUTOLOAD;
|
||||
}
|
||||
|
||||
bootstrap OPM $VERSION;
|
||||
|
||||
# Preloaded methods go here.
|
||||
|
||||
sub new {
|
||||
my $package = shift;
|
||||
if(@_) {
|
||||
return _remote_create(@_);
|
||||
}else{
|
||||
my $scan = _create();
|
||||
return $scan unless ref $scan;
|
||||
|
||||
# It looks bad if we segfault easily, this just means we'll sit in an
|
||||
# infinite loop...
|
||||
$scan->config(OPM->CONFIG_FD_LIMIT, 512);
|
||||
$scan->config(OPM->CONFIG_MAX_READ, 4096);
|
||||
$scan->config(OPM->CONFIG_TIMEOUT, 30);
|
||||
|
||||
return $scan;
|
||||
}
|
||||
}
|
||||
|
||||
sub fatal_errors {
|
||||
OPM::_fatal_errors();
|
||||
}
|
||||
|
||||
package OPM::Scan;
|
||||
|
||||
sub config {
|
||||
my($scanner, $type, $var) = @_;
|
||||
if($var =~ /^\d+$/) {
|
||||
$scanner->_config_int($type, $var);
|
||||
}else{
|
||||
$scanner->_config_string($type, $var);
|
||||
}
|
||||
}
|
||||
|
||||
package OPM::Remote;
|
||||
|
||||
sub addr {
|
||||
my $remote = shift;
|
||||
return $remote->ip . ':' . $remote->port;
|
||||
}
|
||||
|
||||
#package OPM::Error;
|
||||
|
||||
1;
|
||||
__END__
|
||||
|
||||
=head1 NAME
|
||||
|
||||
OPM - Perl interface to libopm open proxy scanning library
|
||||
|
||||
=head1 INTRODUCTION
|
||||
|
||||
This is the perl API to the libopm open proxy scanning library. It is written
|
||||
in perl XS and interfaces with the C code. The API is very similar to the C API
|
||||
if you need further explaination of anything in this document reading the
|
||||
libopm-api.txt file that comes with libopm might provide answers.
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
use OPM;
|
||||
OPM->fatal_errors; # croak on errors
|
||||
|
||||
my $scan = OPM->new; # new scanner
|
||||
my $remote = OPM->new("127.0.0.1"); # new remote IP to scan
|
||||
$scan->scan($remote); # Scans it
|
||||
|
||||
=head1 CONSTANTS
|
||||
|
||||
Constants are accessed by using OPM->NAME_OF_CONSTANT, for example if in the C
|
||||
API the constant is OPM_TYPE_HTTP it would become OPM->TYPE_HTTP.
|
||||
|
||||
=head1 METHODS
|
||||
|
||||
=head2 new
|
||||
|
||||
With no arguments this creates a new scan object (an object inpackage
|
||||
OPM::Scan), or if given an IP address as an argument this will create a new
|
||||
remote object (OPM::Remote).
|
||||
|
||||
=head3 Examples
|
||||
|
||||
my $scan = OPM->new; # a new scanner
|
||||
|
||||
my $remote = new OPM("127.0.0.1"); # a new remote object
|
||||
|
||||
(Note the 'new OPM' and 'OPM->new' are exactly the same, as usual with perl
|
||||
there is more than one way to do the same thing).
|
||||
|
||||
Currently all methods except new must be used with an object, either a scan
|
||||
object (OPM::Scan) or a remote object (OPM::Remote). These are created with the
|
||||
new method described above.
|
||||
|
||||
=head1 Methods of OPM::Scan
|
||||
|
||||
|
||||
=head2 addtype
|
||||
|
||||
Adds a protocol and port to be scanned using this scanner. The same as the
|
||||
C API function. Returns an OPM::Error object.
|
||||
|
||||
=head3 Example
|
||||
|
||||
$scan->addtype(OPM->TYPE_HTTP, 8080);
|
||||
|
||||
=head2 scan
|
||||
|
||||
Queues a remote ready to be scanned. Returns an OPM::Error object.
|
||||
|
||||
=head3 Example
|
||||
|
||||
$scan->scan($remote);
|
||||
|
||||
=head2 callback
|
||||
|
||||
Adds a callback, to be called when a particular event occurs.
|
||||
Returns an OPM::Error object.
|
||||
|
||||
=head3 Examples
|
||||
|
||||
$scan->callback(OPM->CALLBACK_OPENPROXY, \&reference);
|
||||
|
||||
$scan->callback(OPM->CALLBACK_OPENPROXY, sub {
|
||||
my($scan, $remote, $val) = @_;
|
||||
# Do something good here..
|
||||
} );
|
||||
|
||||
=head2 cycle
|
||||
|
||||
Cycles through all remotes and pending scans, running callbacks as needed. This
|
||||
is intended to take as little time as possible, the application really needs to
|
||||
sleep() or similar to save CPU.
|
||||
|
||||
=head2 active
|
||||
|
||||
Returns the current number of active and pending scans for the scan object, can
|
||||
be used to decide when it is safe to end the program.
|
||||
|
||||
=head2 config
|
||||
|
||||
Sets a config variable, see the C API docs for more details. Returns an OPM::Error object.
|
||||
|
||||
=head3 Examples
|
||||
|
||||
$scan->config(OPM->CONFIG_SCAN_PORT, 6667);
|
||||
|
||||
$scan->config(OPM->CONFIG_TARGET_STRING, "something ircd sends");
|
||||
|
||||
=head2 end
|
||||
|
||||
Ends all scans and queued scans on a remote object.
|
||||
|
||||
=head3 Example
|
||||
|
||||
$scan->end($remote);
|
||||
|
||||
=head2 endscan
|
||||
|
||||
Ends all active scans on a remote object.
|
||||
|
||||
=head3 Example
|
||||
|
||||
$scan->endscan($remote);
|
||||
|
||||
=head1 Methods of OPM::Remote
|
||||
|
||||
OPM::Remote contains some methods which access the details in the struct rather
|
||||
than being equivilants of libopm C functions. They are ip, port, protocol and bytes_read.
|
||||
|
||||
=head2 ip
|
||||
|
||||
This returns the IP address associated with the OPM::Remote object
|
||||
|
||||
=head2 protocol, port, bytes_read
|
||||
|
||||
Used in callbacks these return details of the current protocol and port
|
||||
found open or closed on the OPM::Remote object. protocol returns a textual
|
||||
representation of the protocol. Possible values are currently HTTP, SOCKS4,
|
||||
SOCKS5, WINGATE, ROUTER, HTTPPOST.
|
||||
|
||||
=head2 addtype
|
||||
|
||||
The same as $scan->addtype, but adds the type only to the specific remote
|
||||
(used before the remote is sent to be scanned with $scan->scan).
|
||||
Returns an OPM::Error object.
|
||||
|
||||
=head1 OPM::Error
|
||||
|
||||
The return values of methods that can fail is blessed into OPM::Error. To check
|
||||
the type of error progmaticly the return value is used as a scalar reference,
|
||||
else to get a textual version the string method is called.
|
||||
|
||||
=head3 Example
|
||||
|
||||
my $error = $scan->scan($remote);
|
||||
if($$error != OPM->SUCCESS) {
|
||||
print "An error occured: " . $error->string . "\n";
|
||||
}
|
||||
|
||||
=head2 string
|
||||
Returns a textual representaion of the error.
|
||||
|
||||
=head1 Differences in C and Perl APIs
|
||||
|
||||
The main difference between the C and Perl API is that in the Perl API the
|
||||
functions are exposed as methods on objects rather than functions. A function
|
||||
called opm_remote_something will be called by calling $remote->something.
|
||||
opm_something mostly translates to $scan->something, apart from creating new
|
||||
objects.
|
||||
|
||||
In the C API you need to perform memory management by calling opm_free, in the
|
||||
Perl API this is handled automatically. When the object is no longer referenced
|
||||
it is freed (when DESTORY is called on the object internally opm_free is
|
||||
called). Note that you should still call $remote->free in the CALLBACK_END
|
||||
callback.
|
||||
|
||||
Constants are also accessed differently, see above for an explaination.
|
||||
|
||||
=head1 AUTHOR
|
||||
|
||||
David Leadbeater E<lt>dg@blitzed.orgE<gt>
|
||||
|
||||
=head1 SEE ALSO
|
||||
|
||||
libopm-api.txt
|
||||
|
||||
=cut
|
|
@ -1,329 +0,0 @@
|
|||
/* vim:set ts=8 noexpandtab: */
|
||||
#include "EXTERN.h"
|
||||
#include "perl.h"
|
||||
#include "XSUB.h"
|
||||
|
||||
#include "../src/opm.h"
|
||||
#include "../src/opm_types.h"
|
||||
#include "../src/opm_error.h"
|
||||
|
||||
static bool croak_on_error = 0;
|
||||
|
||||
typedef struct _OPM OPM_Scan;
|
||||
typedef struct _OPM_REMOTE OPM_Remote;
|
||||
typedef int OPM_Error;
|
||||
|
||||
/* This is used to store a define -> int mapping */
|
||||
typedef struct __defines {
|
||||
char *text;
|
||||
int num;
|
||||
} _defines;
|
||||
|
||||
/* The mappings (called as OPM::xx hence the lack of OPM_ names) */
|
||||
_defines define[] = {
|
||||
{"CALLBACK_END", OPM_CALLBACK_END},
|
||||
{"CALLBACK_ERROR", OPM_CALLBACK_ERROR},
|
||||
{"CALLBACK_NEGFAIL", OPM_CALLBACK_NEGFAIL},
|
||||
{"CALLBACK_OPENPROXY", OPM_CALLBACK_OPENPROXY},
|
||||
{"CALLBACK_TIMEOUT", OPM_CALLBACK_TIMEOUT},
|
||||
{"CONFIG_BIND_IP", OPM_CONFIG_BIND_IP},
|
||||
{"CONFIG_DNSBL_HOST", OPM_CONFIG_DNSBL_HOST},
|
||||
{"CONFIG_FD_LIMIT", OPM_CONFIG_FD_LIMIT},
|
||||
{"CONFIG_MAX_READ", OPM_CONFIG_MAX_READ},
|
||||
{"CONFIG_SCAN_IP", OPM_CONFIG_SCAN_IP},
|
||||
{"CONFIG_SCAN_PORT", OPM_CONFIG_SCAN_PORT},
|
||||
{"CONFIG_TARGET_STRING", OPM_CONFIG_TARGET_STRING},
|
||||
{"CONFIG_TIMEOUT", OPM_CONFIG_TIMEOUT},
|
||||
{"ERR_BADADDR", OPM_ERR_BADADDR},
|
||||
{"ERR_NOPROTOCOLS", OPM_ERR_NOPROTOCOLS},
|
||||
{"ERR_BADKEY", OPM_ERR_BADKEY},
|
||||
{"ERR_BADPROTOCOL", OPM_ERR_BADPROTOCOL},
|
||||
{"ERR_BADVALUE", OPM_ERR_BADVALUE},
|
||||
{"ERR_BIND", OPM_ERR_BIND},
|
||||
{"ERR_CBNOTFOUND", OPM_ERR_CBNOTFOUND},
|
||||
{"ERR_MAX_READ", OPM_ERR_MAX_READ},
|
||||
{"ERR_NOFD", OPM_ERR_NOFD},
|
||||
{"STATE_CLOSED", OPM_STATE_CLOSED},
|
||||
{"STATE_ESTABLISHED", OPM_STATE_ESTABLISHED},
|
||||
{"STATE_NEGSENT", OPM_STATE_NEGSENT},
|
||||
{"STATE_UNESTABLISHED", OPM_STATE_UNESTABLISHED},
|
||||
{"SUCCESS", OPM_SUCCESS},
|
||||
{"TYPE_HTTP", OPM_TYPE_HTTP},
|
||||
{"TYPE_ROUTER", OPM_TYPE_ROUTER},
|
||||
{"TYPE_SOCKS4", OPM_TYPE_SOCKS4},
|
||||
{"TYPE_SOCKS5", OPM_TYPE_SOCKS5},
|
||||
{"TYPE_WINGATE", OPM_TYPE_WINGATE},
|
||||
{"TYPE_HTTPPOST", OPM_TYPE_HTTPPOST},
|
||||
{NULL, 0},
|
||||
};
|
||||
|
||||
static int
|
||||
constant(char *name)
|
||||
{
|
||||
int i = -1;
|
||||
|
||||
errno = 0;
|
||||
while(define[++i].text != NULL)
|
||||
if(strEQ(name, define[i].text))
|
||||
return define[i].num;
|
||||
|
||||
errno = EINVAL;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static char
|
||||
*string_error(OPM_Error error)
|
||||
{
|
||||
switch(error)
|
||||
{
|
||||
case OPM_SUCCESS:
|
||||
return "Success";
|
||||
case OPM_ERR_BADKEY:
|
||||
return "Unknown or bad key value";
|
||||
case OPM_ERR_BADVALUE:
|
||||
return "Bad value matching key";
|
||||
case OPM_ERR_BADPROTOCOL:
|
||||
return "Unknown protocol in config";
|
||||
case OPM_ERR_MAX_READ:
|
||||
return "Socket reached MAX_READ";
|
||||
case OPM_ERR_CBNOTFOUND:
|
||||
return "Callback is out of range";
|
||||
case OPM_ERR_BADADDR:
|
||||
return "IP in remote struct is bad";
|
||||
case OPM_ERR_BIND:
|
||||
return "Error binding to BIND_IP";
|
||||
case OPM_ERR_NOFD:
|
||||
return "Unable to allocate file descriptor";
|
||||
case OPM_ERR_NOPROTOCOLS:
|
||||
return "No protocols are configured";
|
||||
}
|
||||
return "Unknown error";
|
||||
}
|
||||
|
||||
static void error_check(OPM_Error error)
|
||||
{
|
||||
if(croak_on_error)
|
||||
croak("%s", string_error(error));
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
static void perl_callback(OPM_Scan *scanner, OPM_Remote *remote, int val,
|
||||
void *func)
|
||||
{
|
||||
dSP;
|
||||
|
||||
ENTER;
|
||||
SAVETMPS;
|
||||
|
||||
PUSHMARK(SP);
|
||||
|
||||
XPUSHs(sv_2mortal(sv_bless(newRV_inc(newSViv((int)scanner)),
|
||||
gv_stashpv("OPM::Scan", 1))));
|
||||
XPUSHs(sv_2mortal(sv_bless(newRV_inc(newSViv((int)remote)),
|
||||
gv_stashpv("OPM::Remote", 1))));
|
||||
XPUSHs(sv_2mortal(newSViv(val)));
|
||||
|
||||
PUTBACK;
|
||||
|
||||
perl_call_sv((SV *) func, G_DISCARD);
|
||||
|
||||
FREETMPS;
|
||||
LEAVE;
|
||||
}
|
||||
|
||||
MODULE = OPM PACKAGE = OPM
|
||||
|
||||
int
|
||||
constant(sv,arg)
|
||||
PREINIT:
|
||||
STRLEN len;
|
||||
INPUT:
|
||||
SV * sv
|
||||
char * s = SvPV(sv, len);
|
||||
CODE:
|
||||
RETVAL = constant(s);
|
||||
OUTPUT:
|
||||
RETVAL
|
||||
|
||||
OPM_Scan *
|
||||
_create()
|
||||
CODE:
|
||||
RETVAL = opm_create();
|
||||
//printf("Created %p\n", RETVAL);
|
||||
OUTPUT:
|
||||
RETVAL
|
||||
|
||||
OPM_Remote *
|
||||
_remote_create(sv)
|
||||
PREINIT:
|
||||
STRLEN len;
|
||||
INPUT:
|
||||
SV * sv
|
||||
char * s = SvPV(sv, len);
|
||||
CODE:
|
||||
RETVAL = opm_remote_create(s);
|
||||
OUTPUT:
|
||||
RETVAL
|
||||
|
||||
void
|
||||
_fatal_errors()
|
||||
CODE:
|
||||
croak_on_error = 1;
|
||||
|
||||
MODULE = OPM PACKAGE = OPM::Scan PREFIX = opm_
|
||||
|
||||
void
|
||||
opm_DESTROY(scanner)
|
||||
OPM_Scan *scanner
|
||||
CODE:
|
||||
opm_free(scanner);
|
||||
|
||||
OPM_Error
|
||||
opm_addtype(scanner, type, port)
|
||||
OPM_Scan *scanner
|
||||
int type
|
||||
int port
|
||||
CODE:
|
||||
RETVAL = opm_addtype(scanner, type, port);
|
||||
if(RETVAL != OPM_SUCCESS)
|
||||
error_check(RETVAL);
|
||||
OUTPUT:
|
||||
RETVAL
|
||||
|
||||
OPM_Error
|
||||
opm_scan(scanner, remote)
|
||||
OPM_Scan *scanner
|
||||
OPM_Remote *remote
|
||||
CODE:
|
||||
RETVAL = opm_scan(scanner, remote);
|
||||
if(RETVAL != OPM_SUCCESS)
|
||||
error_check(RETVAL);
|
||||
OUTPUT:
|
||||
RETVAL
|
||||
|
||||
OPM_Error
|
||||
opm_callback(scanner, type, func)
|
||||
OPM_Scan *scanner
|
||||
int type
|
||||
SV *func
|
||||
CODE:
|
||||
RETVAL = opm_callback(scanner, type, &perl_callback, (void *)newSVsv(func));
|
||||
if(RETVAL != OPM_SUCCESS)
|
||||
error_check(RETVAL);
|
||||
OUTPUT:
|
||||
RETVAL
|
||||
|
||||
void
|
||||
opm_cycle(scanner)
|
||||
OPM_Scan *scanner
|
||||
|
||||
int
|
||||
opm_active(scanner)
|
||||
OPM_Scan *scanner
|
||||
|
||||
|
||||
OPM_Error
|
||||
opm__config_int(scanner, type, num)
|
||||
OPM_Scan *scanner
|
||||
int type
|
||||
int num
|
||||
CODE:
|
||||
RETVAL = opm_config(scanner, type, &num);
|
||||
if(RETVAL != OPM_SUCCESS)
|
||||
error_check(RETVAL);
|
||||
OUTPUT:
|
||||
RETVAL
|
||||
|
||||
OPM_Error
|
||||
opm__config_string(scanner, type, sv)
|
||||
OPM_Scan *scanner
|
||||
int type
|
||||
SV *sv
|
||||
PREINIT:
|
||||
STRLEN len;
|
||||
INPUT:
|
||||
char * s = SvPV(sv, len);
|
||||
CODE:
|
||||
RETVAL = opm_config(scanner, type, s);
|
||||
if(RETVAL != OPM_SUCCESS)
|
||||
error_check(RETVAL);
|
||||
OUTPUT:
|
||||
RETVAL
|
||||
|
||||
void
|
||||
opm_end(scanner, remote)
|
||||
OPM_Scan *scanner
|
||||
OPM_Remote *remote
|
||||
|
||||
void
|
||||
opm_endscan(scanner, remote)
|
||||
OPM_Scan *scanner
|
||||
OPM_Remote *remote
|
||||
|
||||
MODULE = OPM PACKAGE = OPM::Remote PREFIX = opm_remote_
|
||||
|
||||
void
|
||||
opm_remote_free(remote)
|
||||
OPM_Remote *remote
|
||||
|
||||
SV *
|
||||
opm_remote_ip(remote)
|
||||
OPM_Remote *remote
|
||||
CODE:
|
||||
RETVAL = newSVpv(remote->ip, 0);
|
||||
OUTPUT:
|
||||
RETVAL
|
||||
|
||||
SV *
|
||||
opm_remote_port(remote)
|
||||
OPM_Remote *remote
|
||||
CODE:
|
||||
RETVAL = newSViv(remote->port);
|
||||
OUTPUT:
|
||||
RETVAL
|
||||
|
||||
SV *
|
||||
opm_remote_protocol(remote)
|
||||
OPM_Remote *remote
|
||||
CODE:
|
||||
switch(remote->protocol) {
|
||||
case OPM_TYPE_HTTP: RETVAL = newSVpv("HTTP", 0); break;
|
||||
case OPM_TYPE_SOCKS4: RETVAL = newSVpv("SOCKS4", 0); break;
|
||||
case OPM_TYPE_SOCKS5: RETVAL = newSVpv("SOCKS5", 0); break;
|
||||
case OPM_TYPE_WINGATE: RETVAL = newSVpv("WINGATE", 0); break;
|
||||
case OPM_TYPE_ROUTER: RETVAL = newSVpv("ROUTER", 0); break;
|
||||
case OPM_TYPE_HTTPPOST: RETVAL = newSVpv("HTTPPOST", 0); break;
|
||||
}
|
||||
OUTPUT:
|
||||
RETVAL
|
||||
|
||||
SV *
|
||||
opm_remote_bytes_read(remote)
|
||||
OPM_Remote *remote
|
||||
CODE:
|
||||
RETVAL = newSViv(remote->bytes_read);
|
||||
OUTPUT:
|
||||
RETVAL
|
||||
|
||||
OPM_Error
|
||||
opm_remote_addtype(remote, type, port)
|
||||
OPM_Remote *remote
|
||||
int type
|
||||
int port
|
||||
CODE:
|
||||
RETVAL = opm_remote_addtype(remote, type, port);
|
||||
if(RETVAL != OPM_SUCCESS)
|
||||
error_check(RETVAL);
|
||||
OUTPUT:
|
||||
|
||||
MODULE = OPM PACKAGE = OPM::Error PREFIX = opm_error_
|
||||
|
||||
SV *
|
||||
opm_error_string(error)
|
||||
OPM_Error error
|
||||
CODE:
|
||||
RETVAL = newSVpv(string_error(error), 0);
|
||||
OUTPUT:
|
||||
RETVAL
|
||||
|
|
@ -1,35 +0,0 @@
|
|||
OPM version 0.01
|
||||
================
|
||||
|
||||
The README is used to introduce the module and provide instructions on
|
||||
how to install the module, any machine dependencies it may have (for
|
||||
example C compilers and installed libraries) and any other information
|
||||
that should be provided before the module is installed.
|
||||
|
||||
A README file is required for CPAN modules since CPAN extracts the
|
||||
README file from a module distribution so that people browsing the
|
||||
archive can use it get an idea of the modules uses. It is usually a
|
||||
good idea to provide version information here so that people can
|
||||
decide whether fixes for the module are worth downloading.
|
||||
|
||||
INSTALLATION
|
||||
|
||||
To install this module type the following:
|
||||
|
||||
perl Makefile.PL
|
||||
make
|
||||
make test
|
||||
make install
|
||||
|
||||
DEPENDENCIES
|
||||
|
||||
This module requires these other modules and libraries:
|
||||
|
||||
blah blah blah
|
||||
|
||||
COPYRIGHT AND LICENCE
|
||||
|
||||
Put the correct copyright and licence information here.
|
||||
|
||||
Copyright (C) 2002 A. U. Thor blah blah blah
|
||||
|
|
@ -1,171 +0,0 @@
|
|||
#!/usr/bin/perl
|
||||
# A basic open proxy checker based on libopm and the OPM perl module
|
||||
# Reads a file on stdin and returns if the proxies are open
|
||||
|
||||
# Basic protocol: (>> sent to bopchecker, << recived from bopchker).
|
||||
# >> ip.ad.re.ss
|
||||
# << ip.ad.re.ss open port,portN protocol,protocolN
|
||||
# << ip.ad.re.ss closed
|
||||
# << ip.ad.re.ss error string
|
||||
#
|
||||
# You can also specify additional ports and protocols to test:
|
||||
# >> ip.ad.re.ss [default] [port_list] [protocol_list]
|
||||
# Or use UNKNOWN as a protocol to try every protocol on that port:
|
||||
# >> ip.ad.re.ss [port] UNKNOWN
|
||||
#
|
||||
# Examples:
|
||||
#
|
||||
# Test all the default ports/protocols on 1.2.3.4
|
||||
# >> 1.2.3.4 default
|
||||
#
|
||||
# Test only HTTP CONNECT on port 5678 of host 1.2.3.4
|
||||
# >> 1.2.3.4 5678 HTTP
|
||||
#
|
||||
# Test all default ports/protocols, plus every protocol on port 5678
|
||||
# >> 1.2.3.4 default 5678 UNKNOWN
|
||||
|
||||
use strict;
|
||||
use IO::Select;
|
||||
use OPM;
|
||||
|
||||
# Buffer of input from STDIN
|
||||
my $buffer;
|
||||
# Temp. storage of ports proxies are open on
|
||||
my %open;
|
||||
# Number of open proxies found
|
||||
my $numopen;
|
||||
|
||||
my $select = new IO::Select ( \*STDIN );
|
||||
|
||||
my $scan = OPM->new or die("Error loading OPM");
|
||||
|
||||
sub add_default {
|
||||
my $remote = shift;
|
||||
|
||||
# Common ports are: 80, 3128, 8080
|
||||
# Less common: 81, 8000, 8888, 6588
|
||||
# Quite rare: 8002, 8081 + many others
|
||||
|
||||
# Common + Less common
|
||||
|
||||
for(80, 81, 1182, 3128, 4480, 6588, 8000, 8080) {
|
||||
$remote->addtype(OPM->TYPE_HTTP, $_);
|
||||
$remote->addtype(OPM->TYPE_HTTPPOST, $_);
|
||||
}
|
||||
|
||||
for(889, 25318) {
|
||||
$remote->addtype(OPM->TYPE_HTTP, $_);
|
||||
}
|
||||
|
||||
for(555, 5121, 8548) {
|
||||
$remote->addtype(OPM->TYPE_HTTPPOST, $_);
|
||||
}
|
||||
|
||||
for(889, 1080, 1180, 4914, 6826, 7198, 7366, 9036) {
|
||||
$remote->addtype(OPM->TYPE_SOCKS4, $_);
|
||||
}
|
||||
|
||||
# These seem to be even more common than port 1080, at least on IRCnet :(
|
||||
for(1080, 1813, 4438, 5104, 5113, 5262, 5634, 6552, 6561, 7464, 7810, 8130, 8148, 8175, 8520, 8814, 9100, 9186, 9447, 9578, 25791) {
|
||||
$remote->addtype(OPM->TYPE_SOCKS5, $_);
|
||||
}
|
||||
|
||||
$remote->addtype(OPM->TYPE_ROUTER, 23);
|
||||
|
||||
for(23, 1181) {
|
||||
$remote->addtype(OPM->TYPE_WINGATE, $_);
|
||||
}
|
||||
}
|
||||
|
||||
# local interface to bind to
|
||||
$scan->config(OPM->CONFIG_BIND_IP, "212.32.4.26");
|
||||
|
||||
# XXX: make configurable "quorn.blitzed.org"
|
||||
$scan->config(OPM->CONFIG_SCAN_IP, "212.32.4.26");
|
||||
$scan->config(OPM->CONFIG_SCAN_PORT, 16667);
|
||||
$scan->config(OPM->CONFIG_TARGET_STRING, "proxy check k thx");
|
||||
|
||||
$scan->callback(OPM->CALLBACK_END, \&callback_end);
|
||||
$scan->callback(OPM->CALLBACK_OPENPROXY, \&callback_openproxy);
|
||||
|
||||
MAIN: while(1) {
|
||||
for my $sock($select->can_read(0.5)) {
|
||||
my $tmp;
|
||||
if(sysread($sock, $tmp, 1024) == 0) {
|
||||
last MAIN;
|
||||
}
|
||||
$buffer .= $tmp;
|
||||
|
||||
while($buffer =~ s/^([^\n]+)\n//) {
|
||||
my($remote, $proxy, $proxyip);
|
||||
$proxy = $1;
|
||||
|
||||
($proxyip) = $proxy =~ /^([^ ]+)/;
|
||||
$remote = OPM->new($proxyip);
|
||||
|
||||
if($proxy !~ / / or $proxy =~ s/ default//) {
|
||||
add_default($remote);
|
||||
}
|
||||
|
||||
if($proxy =~ / (.+) (.+)$/) {
|
||||
my @ports = split ',', $1;
|
||||
my @types = split ',', $2;
|
||||
|
||||
for(0 .. $#ports) {
|
||||
# Make protocol 'UNKNOWN' be a shortcut for all protocols.
|
||||
if ($types[$_] eq 'UNKNOWN') {
|
||||
my $p = $_;
|
||||
for('HTTP','HTTPPOST','SOCKS4','SOCKS5','ROUTER','WINGATE') {
|
||||
$remote->addtype(OPM::constant("TYPE_$_", 0), $p);
|
||||
}
|
||||
next;
|
||||
}
|
||||
|
||||
unless(OPM::constant("TYPE_$types[$_]", 0)) {
|
||||
print "$proxyip error Unknown protocol type ($types[$_])\n";
|
||||
next;
|
||||
}
|
||||
$remote->addtype(
|
||||
OPM::constant("TYPE_$types[$_]", 0), $ports[$_]);
|
||||
}
|
||||
}
|
||||
|
||||
my $error = $scan->scan($remote);
|
||||
if($$error != OPM->SUCCESS) {
|
||||
print "$proxyip error " . $error->string . "\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
$scan->cycle;
|
||||
}
|
||||
|
||||
while($scan->active) {
|
||||
sleep 1;
|
||||
$scan->cycle;
|
||||
}
|
||||
|
||||
exit $numopen;
|
||||
|
||||
|
||||
sub callback_openproxy {
|
||||
my($scan, $remote, $val) = @_;
|
||||
push @{$open{$remote->ip}}, [$remote->port, $remote->protocol];
|
||||
}
|
||||
|
||||
sub callback_end {
|
||||
my($scan, $remote, $val) = @_;
|
||||
my $ip = $remote->ip;
|
||||
|
||||
if(exists $open{$ip}) {
|
||||
printf("%s open %s %s\n", $ip,
|
||||
join(",", map { $_->[0] } @{$open{$ip}}),
|
||||
join(",", map { $_->[1] } @{$open{$ip}}));
|
||||
delete $open{$ip};
|
||||
$numopen++;
|
||||
}else{
|
||||
print "$ip closed\n";
|
||||
}
|
||||
|
||||
$remote->free;
|
||||
}
|
||||
|
|
@ -1,96 +0,0 @@
|
|||
# Before `make install' is performed this script should be runnable with
|
||||
# `make test'. After `make install' it should work as `perl test.pl'
|
||||
|
||||
#########################
|
||||
|
||||
# change 'tests => 1' to 'tests => last_test_to_print';
|
||||
$^W = 1;
|
||||
|
||||
use strict;
|
||||
use Test;
|
||||
BEGIN {
|
||||
$ENV{LD_LIBRARY_PATH} = "../src/.libs"; # you didn't see this hack right?
|
||||
plan tests => 9;
|
||||
};
|
||||
|
||||
use OPM;
|
||||
|
||||
ok(1);
|
||||
|
||||
OPM->fatal_errors;
|
||||
my $scan = new OPM or die "loading OPM";
|
||||
|
||||
ok(2);
|
||||
|
||||
$scan->addtype(OPM->TYPE_HTTP, 80);
|
||||
$scan->addtype(OPM->TYPE_HTTP, 3128);
|
||||
$scan->addtype(OPM->TYPE_HTTP, 8080);
|
||||
$scan->addtype(OPM->TYPE_SOCKS4, 1080);
|
||||
$scan->addtype(OPM->TYPE_SOCKS5, 1080);
|
||||
$scan->addtype(OPM->TYPE_HTTPPOST, 3128);
|
||||
|
||||
$scan->config(OPM->CONFIG_SCAN_IP, "203.56.139.100");
|
||||
$scan->config(OPM->CONFIG_SCAN_PORT, 6667);
|
||||
$scan->config(OPM->CONFIG_TARGET_STRING, "*** Looking up your hostname...");
|
||||
|
||||
ok(3);
|
||||
|
||||
$scan->callback(OPM->CALLBACK_END, sub {
|
||||
my($scan, $remote, $val) = @_;
|
||||
print "end callback " . $remote->ip . "\n";
|
||||
$remote->free;
|
||||
|
||||
ok(7);
|
||||
} );
|
||||
$scan->callback(OPM->CALLBACK_OPENPROXY, sub {
|
||||
my($scan, $remote, $val) = @_;
|
||||
print "openproxy callback: " . $remote->addr . "\n";
|
||||
} );
|
||||
$scan->callback(OPM->CALLBACK_NEGFAIL, sub {
|
||||
my($scan, $remote, $val) = @_;
|
||||
if($remote->ip eq "127.0.0.1") {
|
||||
print "Ended 127.0.0.1\n";
|
||||
$scan->end($remote);
|
||||
}
|
||||
print "negfail callback " . $remote->addr . "\n";
|
||||
} );
|
||||
$scan->callback(OPM->CALLBACK_TIMEOUT, sub {
|
||||
my($scan, $remote, $val) = @_;
|
||||
print "timeout callback " . $remote->addr . "\n";
|
||||
} );
|
||||
$scan->callback(OPM->CALLBACK_ERROR, sub {
|
||||
my($scan, $remote, $val) = @_;
|
||||
print "error callback " . $remote->addr . "\n";
|
||||
} );
|
||||
|
||||
ok(4);
|
||||
|
||||
unless(exists $ENV{OPEN_PROXY}) {
|
||||
print "The rest of the tests require a valid open proxy; run\n";
|
||||
print "OPEN_PROXY=\"127.0.0.1\" make test\n";
|
||||
print "Where 127.0.0.1 is an open proxy\n";
|
||||
exit;
|
||||
}
|
||||
|
||||
my $remote1 = OPM->new($ENV{OPEN_PROXY});
|
||||
my $remote2 = OPM->new("127.0.0.1");
|
||||
|
||||
ok(5) if ref $remote1 and ref $remote2;
|
||||
|
||||
$scan->scan($remote1);
|
||||
$scan->scan($remote2);
|
||||
|
||||
ok(6);
|
||||
|
||||
print "Wait..\n";
|
||||
$scan->cycle;
|
||||
sleep 1;
|
||||
$scan->cycle;
|
||||
sleep 1;
|
||||
$scan->cycle;
|
||||
|
||||
ok(8);
|
||||
$scan = undef;
|
||||
|
||||
ok(9);
|
||||
|
|
@ -1,18 +0,0 @@
|
|||
TYPEMAP
|
||||
OPM_Scan * T_PTROBJ_SPECIAL
|
||||
OPM_Remote * T_PTROBJ_SPECIAL
|
||||
OPM_Error T_PTROBJ_SPECIAL
|
||||
|
||||
INPUT
|
||||
T_PTROBJ_SPECIAL
|
||||
if (sv_derived_from($arg, \"${(my $ntt=$ntype)=~s/_/::/g;$ntt=~s/Ptr$//;\$ntt}\")) {
|
||||
IV tmp = SvIV((SV*)SvRV($arg));
|
||||
$var = ($type) tmp;
|
||||
} else {
|
||||
croak(\"$var is not of type ${(my $ntt=$ntype)=~s/_/::/g;$ntt=~s/Ptr$//;\$ntt}\");
|
||||
}
|
||||
|
||||
OUTPUT
|
||||
T_PTROBJ_SPECIAL
|
||||
sv_setref_pv($arg, \"${(my $ntt=$ntype)=~s/_/::/g;$ntt=~s/Ptr$//;\$ntt}\", (void*)$var);
|
||||
|
4498
libopm/aclocal.m4
vendored
4498
libopm/aclocal.m4
vendored
File diff suppressed because it is too large
Load diff
132
libopm/acsite.m4
132
libopm/acsite.m4
|
@ -1,132 +0,0 @@
|
|||
dnl This is copyright Rüdiger Kuhlmann <info@ruediger-kuhlmann.de>
|
||||
|
||||
AC_DEFUN([AC_FUNC_SNPRINTF],
|
||||
[AC_CHECK_FUNCS(snprintf vsnprintf)
|
||||
AC_MSG_CHECKING(for working snprintf)
|
||||
AC_CACHE_VAL(ac_cv_have_working_snprintf,
|
||||
[AC_TRY_RUN(
|
||||
[#include <stdio.h>
|
||||
|
||||
int main(void)
|
||||
{
|
||||
char bufs[5] = { 'x', 'x', 'x', '\0', '\0' };
|
||||
char bufd[5] = { 'x', 'x', 'x', '\0', '\0' };
|
||||
int i;
|
||||
i = snprintf (bufs, 2, "%s", "111");
|
||||
if (strcmp (bufs, "1")) exit (1);
|
||||
if (i != 3) exit (1);
|
||||
i = snprintf (bufd, 2, "%d", 111);
|
||||
if (strcmp (bufd, "1")) exit (1);
|
||||
if (i != 3) exit (1);
|
||||
exit(0);
|
||||
}], ac_cv_have_working_snprintf=yes, ac_cv_have_working_snprintf=no, ac_cv_have_working_snprintf=cross)])
|
||||
AC_MSG_RESULT([$ac_cv_have_working_snprintf])
|
||||
AC_MSG_CHECKING(for working vsnprintf)
|
||||
AC_CACHE_VAL(ac_cv_have_working_vsnprintf,
|
||||
[AC_TRY_RUN(
|
||||
[#include <stdio.h>
|
||||
#include <stdarg.h>
|
||||
|
||||
int my_vsnprintf (char *buf, const char *tmpl, ...)
|
||||
{
|
||||
int i;
|
||||
va_list args;
|
||||
va_start (args, tmpl);
|
||||
i = vsnprintf (buf, 2, tmpl, args);
|
||||
va_end (args);
|
||||
return i;
|
||||
}
|
||||
|
||||
int main(void)
|
||||
{
|
||||
char bufs[5] = { 'x', 'x', 'x', '\0', '\0' };
|
||||
char bufd[5] = { 'x', 'x', 'x', '\0', '\0' };
|
||||
int i;
|
||||
i = my_vsnprintf (bufs, "%s", "111");
|
||||
if (strcmp (bufs, "1")) exit (1);
|
||||
if (i != 3) exit (1);
|
||||
i = my_vsnprintf (bufd, "%d", 111);
|
||||
if (strcmp (bufd, "1")) exit (1);
|
||||
if (i != 3) exit (1);
|
||||
exit(0);
|
||||
}], ac_cv_have_working_vsnprintf=yes, ac_cv_have_working_vsnprintf=no, ac_cv_have_working_vsnprintf=cross)])
|
||||
AC_MSG_RESULT([$ac_cv_have_working_vsnprintf])
|
||||
if test x$ac_cv_have_working_snprintf$ac_cv_have_working_vsnprintf != "xyesyes"; then
|
||||
AC_LIBOBJ(snprintf)
|
||||
AC_MSG_WARN([Replacing missing/broken (v)snprintf() with version from http://www.ijs.si/software/snprintf/.])
|
||||
AC_DEFINE(PREFER_PORTABLE_SNPRINTF, 1, "enable replacement (v)snprintf if system (v)snprintf is broken")
|
||||
fi])
|
||||
|
||||
dnl This macro figures out what libraries are required on this platform to link
|
||||
dnl sockets programs. It's usually -lsocket and/or -lnsl or neither. We test for
|
||||
dnl all three combinations.
|
||||
dnl Copyright Warren Young <warren@etr-usa.com>
|
||||
|
||||
AC_DEFUN([ETR_SOCKET_NSL],
|
||||
[
|
||||
AC_CACHE_CHECK(for libraries containing socket functions,
|
||||
ac_cv_socket_libs, [
|
||||
oCFLAGS=$CFLAGS
|
||||
|
||||
AC_TRY_LINK([
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
#include <netinet/in.h>
|
||||
#include <arpa/inet.h>
|
||||
],
|
||||
[
|
||||
struct in_addr add;
|
||||
int sd = socket(AF_INET, SOCK_STREAM, 0);
|
||||
inet_ntoa(add);
|
||||
],
|
||||
ac_cv_socket_libs=-lc, ac_cv_socket_libs=no)
|
||||
|
||||
if test x"$ac_cv_socket_libs" = "xno"
|
||||
then
|
||||
CFLAGS="$oCFLAGS -lsocket"
|
||||
AC_TRY_LINK([
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
#include <netinet/in.h>
|
||||
#include <arpa/inet.h>
|
||||
],
|
||||
[
|
||||
struct in_addr add;
|
||||
int sd = socket(AF_INET, SOCK_STREAM, 0);
|
||||
inet_ntoa(add);
|
||||
],
|
||||
ac_cv_socket_libs=-lsocket, ac_cv_socket_libs=no)
|
||||
fi
|
||||
|
||||
if test x"$ac_cv_socket_libs" = "xno"
|
||||
then
|
||||
CFLAGS="$oCFLAGS -lsocket -lnsl"
|
||||
AC_TRY_LINK([
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
#include <netinet/in.h>
|
||||
#include <arpa/inet.h>
|
||||
],
|
||||
[
|
||||
struct in_addr add;
|
||||
int sd = socket(AF_INET, SOCK_STREAM, 0);
|
||||
inet_ntoa(add);
|
||||
],
|
||||
ac_cv_socket_libs="-lsocket -lnsl", ac_cv_socket_libs=no)
|
||||
fi
|
||||
|
||||
CFLAGS=$oCFLAGS
|
||||
])
|
||||
|
||||
if test x"$ac_cv_socket_libs" = "xno"
|
||||
then
|
||||
AC_MSG_ERROR([Cannot find socket libraries])
|
||||
elif test x"$ac_cv_socket_libs" = "x-lc"
|
||||
then
|
||||
ETR_SOCKET_LIBS=""
|
||||
else
|
||||
ETR_SOCKET_LIBS="$ac_cv_socket_libs"
|
||||
fi
|
||||
|
||||
AC_SUBST(ETR_SOCKET_LIBS)
|
||||
]) dnl ETR_SOCKET_NSL
|
1317
libopm/config.guess
vendored
1317
libopm/config.guess
vendored
File diff suppressed because it is too large
Load diff
1411
libopm/config.sub
vendored
1411
libopm/config.sub
vendored
File diff suppressed because it is too large
Load diff
10650
libopm/configure
vendored
10650
libopm/configure
vendored
File diff suppressed because it is too large
Load diff
|
@ -1,101 +0,0 @@
|
|||
dnl Process this file with autoconf to produce a configure script.
|
||||
AC_INIT(libopm, [0.1])
|
||||
AC_CONFIG_SRCDIR(src/libopm.h)
|
||||
AM_CONFIG_HEADER(src/setup.h)
|
||||
AM_INIT_AUTOMAKE()
|
||||
AC_PREFIX_DEFAULT([/usr/local/libopm])
|
||||
AM_MAINTAINER_MODE
|
||||
|
||||
# for documentation purposes
|
||||
DOX_DIR_HTML=api
|
||||
DOX_DIR_LATEX=latex
|
||||
DOX_DIR_MAN=man
|
||||
|
||||
AC_SUBST(DOX_DIR_HTML)
|
||||
AC_SUBST(DOX_DIR_LATEX)
|
||||
AC_SUBST(DOX_DIR_MAN)
|
||||
|
||||
AC_ARG_WITH(extra-fascism,
|
||||
AC_HELP_STRING([--with-extra-fascism],
|
||||
[add extra gcc3-specific warning flags]),
|
||||
[CFLAGS="$CFLAGS -g -O0 -W -Wall -Wfloat-equal -Wbad-function-cast -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls -Wnested-externs"])
|
||||
|
||||
dnl AC_ARG_WITH(faldo,
|
||||
dnl AC_HELP_STRING([--with-faldo],
|
||||
dnl [make some use of Nick Faldo]))
|
||||
|
||||
dnl Checks for programs.
|
||||
AC_PROG_CC
|
||||
AC_PROG_LIBTOOL
|
||||
AC_SUBST(LIBTOOL_DEPS)
|
||||
|
||||
dnl check if we need -lsocket or -lnsl
|
||||
ETR_SOCKET_NSL
|
||||
|
||||
dnl Checks for header files.
|
||||
AC_HEADER_STDC
|
||||
|
||||
AC_CHECK_HEADERS(sys/poll.h, have_poll_sys_h=yes, have_sys_poll_h=no)
|
||||
|
||||
AC_CHECK_HEADERS(fcntl.h sys/time.h unistd.h strings.h)
|
||||
|
||||
dnl Checks for typedefs, structures, and compiler characteristics.
|
||||
AC_C_CONST
|
||||
AC_TYPE_SIZE_T
|
||||
AC_HEADER_TIME
|
||||
|
||||
AC_FUNC_SNPRINTF
|
||||
|
||||
dnl if they want select() or they don't have poll() then we need to check
|
||||
dnl that we actually have select()
|
||||
if test "$have_sys_poll_h" = "no"; then
|
||||
AC_CHECK_FUNCS(select, have_select=yes, have_select=no)
|
||||
if test "$have_select" = "no"; then
|
||||
AC_MSG_ERROR([No select() implementation found])
|
||||
fi
|
||||
fi
|
||||
|
||||
AC_CHECK_FUNCS(inet_aton inet_pton)
|
||||
|
||||
dnl Check if we can use gethostbyname2 for ipv6
|
||||
AC_CHECK_FUNCS(gethostbyname gethostbyname2)
|
||||
|
||||
dnl AIX fun
|
||||
AC_C_BIGENDIAN
|
||||
|
||||
dnl Solaris has to be weird doesn't it...
|
||||
AC_CHECK_LIB(socket, socket, AC_SUBST(LSOCKET, [-lsocket]))
|
||||
AC_CHECK_LIB(nsl, gethostbyname, AC_SUBST(LNSL, [-lnsl]))
|
||||
|
||||
dnl teehee - taken from MRTG / Tobias Oetiker
|
||||
dnl if test "$with_faldo" != "no"; then
|
||||
dnl echo $ECHO_N "checking for Nick Faldo $ECHO_C"
|
||||
dnl for bleh in 1 2 3; do
|
||||
dnl echo $ECHO_N "."
|
||||
dnl sleep 1
|
||||
dnl done
|
||||
dnl AC_MSG_RESULT([ http://blitzed.org/advocacy/enjoy.jpg])
|
||||
dnl fi
|
||||
|
||||
LTLIBOBJS=`echo "$LIB@&t@OBJS" |
|
||||
sed 's,\.[[^.]]* ,.lo ,g;s,\.[[^.]]*$,.lo,'`
|
||||
AC_SUBST(LTLIBOBJS)
|
||||
|
||||
dnl This comes last because configure won't actually work with -Werror in
|
||||
dnl the CFLAGS
|
||||
AC_ARG_WITH(werror,
|
||||
AC_HELP_STRING([--with-werror],
|
||||
[use -Werror to abort compilation on any warning]),
|
||||
[CFLAGS="$CFLAGS -Werror"])
|
||||
|
||||
AC_OUTPUT(Makefile src/Makefile doc/Makefile doc/Doxyfile)
|
||||
|
||||
echo "##############################################################################"
|
||||
echo "Everything is now configured. To compile libopm now, just type make. It"
|
||||
echo "requires GNU Make, which may be installed as gmake on your system."
|
||||
echo
|
||||
echo "libopm will be installed in ${prefix}. To change this, run:"
|
||||
echo " ./configure --prefix=DIRECTORY"
|
||||
echo
|
||||
echo "##############################################################################"
|
||||
echo
|
423
libopm/depcomp
423
libopm/depcomp
|
@ -1,423 +0,0 @@
|
|||
#! /bin/sh
|
||||
|
||||
# depcomp - compile a program generating dependencies as side-effects
|
||||
# Copyright 1999, 2000 Free Software Foundation, Inc.
|
||||
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2, or (at your option)
|
||||
# any later version.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||||
# 02111-1307, USA.
|
||||
|
||||
# As a special exception to the GNU General Public License, if you
|
||||
# distribute this file as part of a program that contains a
|
||||
# configuration script generated by Autoconf, you may include it under
|
||||
# the same distribution terms that you use for the rest of that program.
|
||||
|
||||
# Originally written by Alexandre Oliva <oliva@dcc.unicamp.br>.
|
||||
|
||||
if test -z "$depmode" || test -z "$source" || test -z "$object"; then
|
||||
echo "depcomp: Variables source, object and depmode must be set" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
# `libtool' can also be set to `yes' or `no'.
|
||||
|
||||
if test -z "$depfile"; then
|
||||
base=`echo "$object" | sed -e 's,^.*/,,' -e 's,\.\([^.]*\)$,.P\1,'`
|
||||
dir=`echo "$object" | sed 's,/.*$,/,'`
|
||||
if test "$dir" = "$object"; then
|
||||
dir=
|
||||
fi
|
||||
# FIXME: should be _deps on DOS.
|
||||
depfile="$dir.deps/$base"
|
||||
fi
|
||||
|
||||
tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}
|
||||
|
||||
rm -f "$tmpdepfile"
|
||||
|
||||
# Some modes work just like other modes, but use different flags. We
|
||||
# parameterize here, but still list the modes in the big case below,
|
||||
# to make depend.m4 easier to write. Note that we *cannot* use a case
|
||||
# here, because this file can only contain one case statement.
|
||||
if test "$depmode" = hp; then
|
||||
# HP compiler uses -M and no extra arg.
|
||||
gccflag=-M
|
||||
depmode=gcc
|
||||
fi
|
||||
|
||||
if test "$depmode" = dashXmstdout; then
|
||||
# This is just like dashmstdout with a different argument.
|
||||
dashmflag=-xM
|
||||
depmode=dashmstdout
|
||||
fi
|
||||
|
||||
case "$depmode" in
|
||||
gcc3)
|
||||
## gcc 3 implements dependency tracking that does exactly what
|
||||
## we want. Yay! Note: for some reason libtool 1.4 doesn't like
|
||||
## it if -MD -MP comes after the -MF stuff. Hmm.
|
||||
"$@" -MT "$object" -MD -MP -MF "$tmpdepfile"
|
||||
stat=$?
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
mv "$tmpdepfile" "$depfile"
|
||||
;;
|
||||
|
||||
gcc)
|
||||
## There are various ways to get dependency output from gcc. Here's
|
||||
## why we pick this rather obscure method:
|
||||
## - Don't want to use -MD because we'd like the dependencies to end
|
||||
## up in a subdir. Having to rename by hand is ugly.
|
||||
## (We might end up doing this anyway to support other compilers.)
|
||||
## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like
|
||||
## -MM, not -M (despite what the docs say).
|
||||
## - Using -M directly means running the compiler twice (even worse
|
||||
## than renaming).
|
||||
if test -z "$gccflag"; then
|
||||
gccflag=-MD,
|
||||
fi
|
||||
"$@" -Wp,"$gccflag$tmpdepfile"
|
||||
stat=$?
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
rm -f "$depfile"
|
||||
echo "$object : \\" > "$depfile"
|
||||
alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
|
||||
## The second -e expression handles DOS-style file names with drive letters.
|
||||
sed -e 's/^[^:]*: / /' \
|
||||
-e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile"
|
||||
## This next piece of magic avoids the `deleted header file' problem.
|
||||
## The problem is that when a header file which appears in a .P file
|
||||
## is deleted, the dependency causes make to die (because there is
|
||||
## typically no way to rebuild the header). We avoid this by adding
|
||||
## dummy dependencies for each header file. Too bad gcc doesn't do
|
||||
## this for us directly.
|
||||
tr ' ' '
|
||||
' < "$tmpdepfile" |
|
||||
## Some versions of gcc put a space before the `:'. On the theory
|
||||
## that the space means something, we add a space to the output as
|
||||
## well.
|
||||
## Some versions of the HPUX 10.20 sed can't process this invocation
|
||||
## correctly. Breaking it into two sed invocations is a workaround.
|
||||
sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
hp)
|
||||
# This case exists only to let depend.m4 do its work. It works by
|
||||
# looking at the text of this script. This case will never be run,
|
||||
# since it is checked for above.
|
||||
exit 1
|
||||
;;
|
||||
|
||||
sgi)
|
||||
if test "$libtool" = yes; then
|
||||
"$@" "-Wp,-MDupdate,$tmpdepfile"
|
||||
else
|
||||
"$@" -MDupdate "$tmpdepfile"
|
||||
fi
|
||||
stat=$?
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
rm -f "$depfile"
|
||||
|
||||
if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files
|
||||
echo "$object : \\" > "$depfile"
|
||||
|
||||
# Clip off the initial element (the dependent). Don't try to be
|
||||
# clever and replace this with sed code, as IRIX sed won't handle
|
||||
# lines with more than a fixed number of characters (4096 in
|
||||
# IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines;
|
||||
# the IRIX cc adds comments like `#:fec' to the end of the
|
||||
# dependency line.
|
||||
tr ' ' '
|
||||
' < "$tmpdepfile" \
|
||||
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \
|
||||
tr '
|
||||
' ' ' >> $depfile
|
||||
echo >> $depfile
|
||||
|
||||
# The second pass generates a dummy entry for each header file.
|
||||
tr ' ' '
|
||||
' < "$tmpdepfile" \
|
||||
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
|
||||
>> $depfile
|
||||
else
|
||||
# The sourcefile does not contain any dependencies, so just
|
||||
# store a dummy comment line, to avoid errors with the Makefile
|
||||
# "include basename.Plo" scheme.
|
||||
echo "#dummy" > "$depfile"
|
||||
fi
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
aix)
|
||||
# The C for AIX Compiler uses -M and outputs the dependencies
|
||||
# in a .u file. This file always lives in the current directory.
|
||||
# Also, the AIX compiler puts `$object:' at the start of each line;
|
||||
# $object doesn't have directory information.
|
||||
stripped=`echo "$object" | sed -e 's,^.*/,,' -e 's/\(.*\)\..*$/\1/'`
|
||||
tmpdepfile="$stripped.u"
|
||||
outname="$stripped.o"
|
||||
if test "$libtool" = yes; then
|
||||
"$@" -Wc,-M
|
||||
else
|
||||
"$@" -M
|
||||
fi
|
||||
|
||||
stat=$?
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
|
||||
if test -f "$tmpdepfile"; then
|
||||
# Each line is of the form `foo.o: dependent.h'.
|
||||
# Do two passes, one to just change these to
|
||||
# `$object: dependent.h' and one to simply `dependent.h:'.
|
||||
sed -e "s,^$outname:,$object :," < "$tmpdepfile" > "$depfile"
|
||||
sed -e "s,^$outname: \(.*\)$,\1:," < "$tmpdepfile" >> "$depfile"
|
||||
else
|
||||
# The sourcefile does not contain any dependencies, so just
|
||||
# store a dummy comment line, to avoid errors with the Makefile
|
||||
# "include basename.Plo" scheme.
|
||||
echo "#dummy" > "$depfile"
|
||||
fi
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
tru64)
|
||||
# The Tru64 compiler uses -MD to generate dependencies as a side
|
||||
# effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'.
|
||||
# At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
|
||||
# dependencies in `foo.d' instead, so we check for that too.
|
||||
# Subdirectories are respected.
|
||||
dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
|
||||
test "x$dir" = "x$object" && dir=
|
||||
base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
|
||||
|
||||
if test "$libtool" = yes; then
|
||||
tmpdepfile1="$dir.libs/$base.lo.d"
|
||||
tmpdepfile2="$dir.libs/$base.d"
|
||||
"$@" -Wc,-MD
|
||||
else
|
||||
tmpdepfile1="$dir$base.o.d"
|
||||
tmpdepfile2="$dir$base.d"
|
||||
"$@" -MD
|
||||
fi
|
||||
|
||||
stat=$?
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
rm -f "$tmpdepfile1" "$tmpdepfile2"
|
||||
exit $stat
|
||||
fi
|
||||
|
||||
if test -f "$tmpdepfile1"; then
|
||||
tmpdepfile="$tmpdepfile1"
|
||||
else
|
||||
tmpdepfile="$tmpdepfile2"
|
||||
fi
|
||||
if test -f "$tmpdepfile"; then
|
||||
sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
|
||||
# That's a space and a tab in the [].
|
||||
sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
|
||||
else
|
||||
echo "#dummy" > "$depfile"
|
||||
fi
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
#nosideeffect)
|
||||
# This comment above is used by automake to tell side-effect
|
||||
# dependency tracking mechanisms from slower ones.
|
||||
|
||||
dashmstdout)
|
||||
# Important note: in order to support this mode, a compiler *must*
|
||||
# always write the proprocessed file to stdout, regardless of -o.
|
||||
"$@" || exit $?
|
||||
|
||||
# Remove the call to Libtool.
|
||||
if test "$libtool" = yes; then
|
||||
while test $1 != '--mode=compile'; do
|
||||
shift
|
||||
done
|
||||
shift
|
||||
fi
|
||||
|
||||
# Remove `-o $object'. We will use -o /dev/null later,
|
||||
# however we can't do the remplacement now because
|
||||
# `-o $object' might simply not be used
|
||||
IFS=" "
|
||||
for arg
|
||||
do
|
||||
case $arg in
|
||||
-o)
|
||||
shift
|
||||
;;
|
||||
$object)
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
set fnord "$@" "$arg"
|
||||
shift # fnord
|
||||
shift # $arg
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
test -z "$dashmflag" && dashmflag=-M
|
||||
"$@" -o /dev/null $dashmflag | sed 's:^[^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile"
|
||||
rm -f "$depfile"
|
||||
cat < "$tmpdepfile" > "$depfile"
|
||||
tr ' ' '
|
||||
' < "$tmpdepfile" | \
|
||||
## Some versions of the HPUX 10.20 sed can't process this invocation
|
||||
## correctly. Breaking it into two sed invocations is a workaround.
|
||||
sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
dashXmstdout)
|
||||
# This case only exists to satisfy depend.m4. It is never actually
|
||||
# run, as this mode is specially recognized in the preamble.
|
||||
exit 1
|
||||
;;
|
||||
|
||||
makedepend)
|
||||
"$@" || exit $?
|
||||
# X makedepend
|
||||
shift
|
||||
cleared=no
|
||||
for arg in "$@"; do
|
||||
case $cleared in
|
||||
no)
|
||||
set ""; shift
|
||||
cleared=yes ;;
|
||||
esac
|
||||
case "$arg" in
|
||||
-D*|-I*)
|
||||
set fnord "$@" "$arg"; shift ;;
|
||||
-*)
|
||||
;;
|
||||
*)
|
||||
set fnord "$@" "$arg"; shift ;;
|
||||
esac
|
||||
done
|
||||
obj_suffix="`echo $object | sed 's/^.*\././'`"
|
||||
touch "$tmpdepfile"
|
||||
${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@"
|
||||
rm -f "$depfile"
|
||||
cat < "$tmpdepfile" > "$depfile"
|
||||
sed '1,2d' "$tmpdepfile" | tr ' ' '
|
||||
' | \
|
||||
## Some versions of the HPUX 10.20 sed can't process this invocation
|
||||
## correctly. Breaking it into two sed invocations is a workaround.
|
||||
sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile" "$tmpdepfile".bak
|
||||
;;
|
||||
|
||||
cpp)
|
||||
# Important note: in order to support this mode, a compiler *must*
|
||||
# always write the proprocessed file to stdout.
|
||||
"$@" || exit $?
|
||||
|
||||
# Remove the call to Libtool.
|
||||
if test "$libtool" = yes; then
|
||||
while test $1 != '--mode=compile'; do
|
||||
shift
|
||||
done
|
||||
shift
|
||||
fi
|
||||
|
||||
# Remove `-o $object'.
|
||||
IFS=" "
|
||||
for arg
|
||||
do
|
||||
case $arg in
|
||||
-o)
|
||||
shift
|
||||
;;
|
||||
$object)
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
set fnord "$@" "$arg"
|
||||
shift # fnord
|
||||
shift # $arg
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
"$@" -E |
|
||||
sed -n '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' |
|
||||
sed '$ s: \\$::' > "$tmpdepfile"
|
||||
rm -f "$depfile"
|
||||
echo "$object : \\" > "$depfile"
|
||||
cat < "$tmpdepfile" >> "$depfile"
|
||||
sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
msvisualcpp)
|
||||
# Important note: in order to support this mode, a compiler *must*
|
||||
# always write the proprocessed file to stdout, regardless of -o,
|
||||
# because we must use -o when running libtool.
|
||||
"$@" || exit $?
|
||||
IFS=" "
|
||||
for arg
|
||||
do
|
||||
case "$arg" in
|
||||
"-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
|
||||
set fnord "$@"
|
||||
shift
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
set fnord "$@" "$arg"
|
||||
shift
|
||||
shift
|
||||
;;
|
||||
esac
|
||||
done
|
||||
"$@" -E |
|
||||
sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile"
|
||||
rm -f "$depfile"
|
||||
echo "$object : \\" > "$depfile"
|
||||
. "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile"
|
||||
echo " " >> "$depfile"
|
||||
. "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::\1\::p' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
none)
|
||||
exec "$@"
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "Unknown depmode $depmode" 1>&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
exit 0
|
|
@ -1 +0,0 @@
|
|||
api latex man Doxyfile Makefile
|
|
@ -1,993 +0,0 @@
|
|||
# Doxyfile 1.2.18
|
||||
|
||||
# This file describes the settings to be used by the documentation system
|
||||
# doxygen (www.doxygen.org) for a project
|
||||
#
|
||||
# All text after a hash (#) is considered a comment and will be ignored
|
||||
# The format is:
|
||||
# TAG = value [value, ...]
|
||||
# For lists items can also be appended using:
|
||||
# TAG += value [value, ...]
|
||||
# Values that contain spaces should be placed between quotes (" ")
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# General configuration options
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
# The PROJECT_NAME tag is a single word (or a sequence of words surrounded
|
||||
# by quotes) that should identify the project.
|
||||
|
||||
PROJECT_NAME = @PACKAGE@
|
||||
|
||||
# The PROJECT_NUMBER tag can be used to enter a project or revision number.
|
||||
# This could be handy for archiving the generated documentation or
|
||||
# if some version control system is used.
|
||||
|
||||
PROJECT_NUMBER = @VERSION@
|
||||
|
||||
# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute)
|
||||
# base path where the generated documentation will be put.
|
||||
# If a relative path is entered, it will be relative to the location
|
||||
# where doxygen was started. If left blank the current directory will be used.
|
||||
|
||||
OUTPUT_DIRECTORY = .
|
||||
|
||||
# The OUTPUT_LANGUAGE tag is used to specify the language in which all
|
||||
# documentation generated by doxygen is written. Doxygen will use this
|
||||
# information to generate all constant output in the proper language.
|
||||
# The default language is English, other supported languages are:
|
||||
# Brazilian, Catalan, Chinese, Chinese-Traditional, Croatian, Czech, Danish, Dutch,
|
||||
# Finnish, French, German, Greek, Hungarian, Italian, Japanese, Japanese-en
|
||||
# (Japanese with english messages), Korean, Norwegian, Polish, Portuguese,
|
||||
# Romanian, Russian, Serbian, Slovak, Slovene, Spanish, Swedish and Ukrainian.
|
||||
|
||||
OUTPUT_LANGUAGE = English
|
||||
|
||||
# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in
|
||||
# documentation are documented, even if no documentation was available.
|
||||
# Private class members and static file members will be hidden unless
|
||||
# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES
|
||||
|
||||
EXTRACT_ALL = YES
|
||||
|
||||
# If the EXTRACT_PRIVATE tag is set to YES all private members of a class
|
||||
# will be included in the documentation.
|
||||
|
||||
EXTRACT_PRIVATE = YES
|
||||
|
||||
# If the EXTRACT_STATIC tag is set to YES all static members of a file
|
||||
# will be included in the documentation.
|
||||
|
||||
EXTRACT_STATIC = NO
|
||||
|
||||
# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs)
|
||||
# defined locally in source files will be included in the documentation.
|
||||
# If set to NO only classes defined in header files are included.
|
||||
|
||||
EXTRACT_LOCAL_CLASSES = YES
|
||||
|
||||
# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all
|
||||
# undocumented members of documented classes, files or namespaces.
|
||||
# If set to NO (the default) these members will be included in the
|
||||
# various overviews, but no documentation section is generated.
|
||||
# This option has no effect if EXTRACT_ALL is enabled.
|
||||
|
||||
HIDE_UNDOC_MEMBERS = NO
|
||||
|
||||
# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all
|
||||
# undocumented classes that are normally visible in the class hierarchy.
|
||||
# If set to NO (the default) these class will be included in the various
|
||||
# overviews. This option has no effect if EXTRACT_ALL is enabled.
|
||||
|
||||
HIDE_UNDOC_CLASSES = NO
|
||||
|
||||
# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all
|
||||
# friend (class|struct|union) declarations.
|
||||
# If set to NO (the default) these declarations will be included in the
|
||||
# documentation.
|
||||
|
||||
HIDE_FRIEND_COMPOUNDS = NO
|
||||
|
||||
# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will
|
||||
# include brief member descriptions after the members that are listed in
|
||||
# the file and class documentation (similar to JavaDoc).
|
||||
# Set to NO to disable this.
|
||||
|
||||
BRIEF_MEMBER_DESC = YES
|
||||
|
||||
# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend
|
||||
# the brief description of a member or function before the detailed description.
|
||||
# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the
|
||||
# brief descriptions will be completely suppressed.
|
||||
|
||||
REPEAT_BRIEF = YES
|
||||
|
||||
# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then
|
||||
# Doxygen will generate a detailed section even if there is only a brief
|
||||
# description.
|
||||
|
||||
ALWAYS_DETAILED_SEC = NO
|
||||
|
||||
# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all inherited
|
||||
# members of a class in the documentation of that class as if those members were
|
||||
# ordinary class members. Constructors, destructors and assignment operators of
|
||||
# the base classes will not be shown.
|
||||
|
||||
INLINE_INHERITED_MEMB = NO
|
||||
|
||||
# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full
|
||||
# path before files name in the file list and in the header files. If set
|
||||
# to NO the shortest path that makes the file name unique will be used.
|
||||
|
||||
FULL_PATH_NAMES = NO
|
||||
|
||||
# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag
|
||||
# can be used to strip a user defined part of the path. Stripping is
|
||||
# only done if one of the specified strings matches the left-hand part of
|
||||
# the path. It is allowed to use relative paths in the argument list.
|
||||
|
||||
STRIP_FROM_PATH =
|
||||
|
||||
# The INTERNAL_DOCS tag determines if documentation
|
||||
# that is typed after a \internal command is included. If the tag is set
|
||||
# to NO (the default) then the documentation will be excluded.
|
||||
# Set it to YES to include the internal documentation.
|
||||
|
||||
INTERNAL_DOCS = NO
|
||||
|
||||
# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct
|
||||
# doxygen to hide any special comment blocks from generated source code
|
||||
# fragments. Normal C and C++ comments will always remain visible.
|
||||
|
||||
STRIP_CODE_COMMENTS = YES
|
||||
|
||||
# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate
|
||||
# file names in lower case letters. If set to YES upper case letters are also
|
||||
# allowed. This is useful if you have classes or files whose names only differ
|
||||
# in case and if your file system supports case sensitive file names. Windows
|
||||
# users are adviced to set this option to NO.
|
||||
|
||||
CASE_SENSE_NAMES = NO
|
||||
|
||||
# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter
|
||||
# (but less readable) file names. This can be useful is your file systems
|
||||
# doesn't support long names like on DOS, Mac, or CD-ROM.
|
||||
|
||||
SHORT_NAMES = NO
|
||||
|
||||
# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen
|
||||
# will show members with their full class and namespace scopes in the
|
||||
# documentation. If set to YES the scope will be hidden.
|
||||
|
||||
HIDE_SCOPE_NAMES = NO
|
||||
|
||||
# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen
|
||||
# will generate a verbatim copy of the header file for each class for
|
||||
# which an include is specified. Set to NO to disable this.
|
||||
|
||||
VERBATIM_HEADERS = NO
|
||||
|
||||
# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen
|
||||
# will put list of the files that are included by a file in the documentation
|
||||
# of that file.
|
||||
|
||||
SHOW_INCLUDE_FILES = YES
|
||||
|
||||
# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen
|
||||
# will interpret the first line (until the first dot) of a JavaDoc-style
|
||||
# comment as the brief description. If set to NO, the JavaDoc
|
||||
# comments will behave just like the Qt-style comments (thus requiring an
|
||||
# explict @brief command for a brief description.
|
||||
|
||||
JAVADOC_AUTOBRIEF = NO
|
||||
|
||||
# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen
|
||||
# treat a multi-line C++ special comment block (i.e. a block of //! or ///
|
||||
# comments) as a brief description. This used to be the default behaviour.
|
||||
# The new default is to treat a multi-line C++ comment block as a detailed
|
||||
# description. Set this tag to YES if you prefer the old behaviour instead.
|
||||
|
||||
MULTILINE_CPP_IS_BRIEF = NO
|
||||
|
||||
# If the DETAILS_AT_TOP tag is set to YES then Doxygen
|
||||
# will output the detailed description near the top, like JavaDoc.
|
||||
# If set to NO, the detailed description appears after the member
|
||||
# documentation.
|
||||
|
||||
DETAILS_AT_TOP = NO
|
||||
|
||||
# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented
|
||||
# member inherits the documentation from any documented member that it
|
||||
# reimplements.
|
||||
|
||||
INHERIT_DOCS = YES
|
||||
|
||||
# If the INLINE_INFO tag is set to YES (the default) then a tag [inline]
|
||||
# is inserted in the documentation for inline members.
|
||||
|
||||
INLINE_INFO = YES
|
||||
|
||||
# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen
|
||||
# will sort the (detailed) documentation of file and class members
|
||||
# alphabetically by member name. If set to NO the members will appear in
|
||||
# declaration order.
|
||||
|
||||
SORT_MEMBER_DOCS = NO
|
||||
|
||||
# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC
|
||||
# tag is set to YES, then doxygen will reuse the documentation of the first
|
||||
# member in the group (if any) for the other members of the group. By default
|
||||
# all members of a group must be documented explicitly.
|
||||
|
||||
DISTRIBUTE_GROUP_DOC = YES
|
||||
|
||||
# The TAB_SIZE tag can be used to set the number of spaces in a tab.
|
||||
# Doxygen uses this value to replace tabs by spaces in code fragments.
|
||||
|
||||
TAB_SIZE = 3
|
||||
|
||||
# The GENERATE_TODOLIST tag can be used to enable (YES) or
|
||||
# disable (NO) the todo list. This list is created by putting \todo
|
||||
# commands in the documentation.
|
||||
|
||||
GENERATE_TODOLIST = YES
|
||||
|
||||
# The GENERATE_TESTLIST tag can be used to enable (YES) or
|
||||
# disable (NO) the test list. This list is created by putting \test
|
||||
# commands in the documentation.
|
||||
|
||||
GENERATE_TESTLIST = YES
|
||||
|
||||
# The GENERATE_BUGLIST tag can be used to enable (YES) or
|
||||
# disable (NO) the bug list. This list is created by putting \bug
|
||||
# commands in the documentation.
|
||||
|
||||
GENERATE_BUGLIST = YES
|
||||
|
||||
# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or
|
||||
# disable (NO) the deprecated list. This list is created by putting \deprecated commands in the documentation.
|
||||
|
||||
GENERATE_DEPRECATEDLIST= YES
|
||||
|
||||
# This tag can be used to specify a number of aliases that acts
|
||||
# as commands in the documentation. An alias has the form "name=value".
|
||||
# For example adding "sideeffect=\par Side Effects:\n" will allow you to
|
||||
# put the command \sideeffect (or @sideeffect) in the documentation, which
|
||||
# will result in a user defined paragraph with heading "Side Effects:".
|
||||
# You can put \n's in the value part of an alias to insert newlines.
|
||||
|
||||
ALIASES =
|
||||
|
||||
# The ENABLED_SECTIONS tag can be used to enable conditional
|
||||
# documentation sections, marked by \if sectionname ... \endif.
|
||||
|
||||
ENABLED_SECTIONS =
|
||||
|
||||
# The MAX_INITIALIZER_LINES tag determines the maximum number of lines
|
||||
# the initial value of a variable or define consist of for it to appear in
|
||||
# the documentation. If the initializer consists of more lines than specified
|
||||
# here it will be hidden. Use a value of 0 to hide initializers completely.
|
||||
# The appearance of the initializer of individual variables and defines in the
|
||||
# documentation can be controlled using \showinitializer or \hideinitializer
|
||||
# command in the documentation regardless of this setting.
|
||||
|
||||
MAX_INITIALIZER_LINES = 30
|
||||
|
||||
# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources
|
||||
# only. Doxygen will then generate output that is more tailored for C.
|
||||
# For instance some of the names that are used will be different. The list
|
||||
# of all members will be omitted, etc.
|
||||
|
||||
OPTIMIZE_OUTPUT_FOR_C = YES
|
||||
|
||||
# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java sources
|
||||
# only. Doxygen will then generate output that is more tailored for Java.
|
||||
# For instance namespaces will be presented as packages, qualified scopes
|
||||
# will look different, etc.
|
||||
|
||||
OPTIMIZE_OUTPUT_JAVA = NO
|
||||
|
||||
# Set the SHOW_USED_FILES tag to NO to disable the list of files generated
|
||||
# at the bottom of the documentation of classes and structs. If set to YES the
|
||||
# list will mention the files that were used to generate the documentation.
|
||||
|
||||
SHOW_USED_FILES = YES
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to warning and progress messages
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
# The QUIET tag can be used to turn on/off the messages that are generated
|
||||
# by doxygen. Possible values are YES and NO. If left blank NO is used.
|
||||
|
||||
QUIET = NO
|
||||
|
||||
# The WARNINGS tag can be used to turn on/off the warning messages that are
|
||||
# generated by doxygen. Possible values are YES and NO. If left blank
|
||||
# NO is used.
|
||||
|
||||
WARNINGS = YES
|
||||
|
||||
# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings
|
||||
# for undocumented members. If EXTRACT_ALL is set to YES then this flag will
|
||||
# automatically be disabled.
|
||||
|
||||
WARN_IF_UNDOCUMENTED = YES
|
||||
|
||||
# The WARN_FORMAT tag determines the format of the warning messages that
|
||||
# doxygen can produce. The string should contain the $file, $line, and $text
|
||||
# tags, which will be replaced by the file and line number from which the
|
||||
# warning originated and the warning text.
|
||||
|
||||
WARN_FORMAT = "$file:$line: $text"
|
||||
|
||||
# The WARN_LOGFILE tag can be used to specify a file to which warning
|
||||
# and error messages should be written. If left blank the output is written
|
||||
# to stderr.
|
||||
|
||||
WARN_LOGFILE =
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to the input files
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
# The INPUT tag can be used to specify the files and/or directories that contain
|
||||
# documented source files. You may enter file names like "myfile.cpp" or
|
||||
# directories like "/usr/src/myproject". Separate the files or directories
|
||||
# with spaces.
|
||||
|
||||
INPUT = ../src
|
||||
|
||||
# If the value of the INPUT tag contains directories, you can use the
|
||||
# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
|
||||
# and *.h) to filter out the source-files in the directories. If left
|
||||
# blank the following patterns are tested:
|
||||
# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx *.hpp
|
||||
# *.h++ *.idl *.odl
|
||||
|
||||
FILE_PATTERNS =
|
||||
|
||||
# The RECURSIVE tag can be used to turn specify whether or not subdirectories
|
||||
# should be searched for input files as well. Possible values are YES and NO.
|
||||
# If left blank NO is used.
|
||||
|
||||
RECURSIVE = YES
|
||||
|
||||
# The EXCLUDE tag can be used to specify files and/or directories that should
|
||||
# excluded from the INPUT source files. This way you can easily exclude a
|
||||
# subdirectory from a directory tree whose root is specified with the INPUT tag.
|
||||
|
||||
EXCLUDE =
|
||||
|
||||
# The EXCLUDE_SYMLINKS tag can be used select whether or not files or directories
|
||||
# that are symbolic links (a Unix filesystem feature) are excluded from the input.
|
||||
|
||||
EXCLUDE_SYMLINKS = NO
|
||||
|
||||
# If the value of the INPUT tag contains directories, you can use the
|
||||
# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude
|
||||
# certain files from those directories.
|
||||
|
||||
EXCLUDE_PATTERNS =
|
||||
|
||||
# The EXAMPLE_PATH tag can be used to specify one or more files or
|
||||
# directories that contain example code fragments that are included (see
|
||||
# the \include command).
|
||||
|
||||
EXAMPLE_PATH =
|
||||
|
||||
# If the value of the EXAMPLE_PATH tag contains directories, you can use the
|
||||
# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
|
||||
# and *.h) to filter out the source-files in the directories. If left
|
||||
# blank all files are included.
|
||||
|
||||
EXAMPLE_PATTERNS =
|
||||
|
||||
# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be
|
||||
# searched for input files to be used with the \include or \dontinclude
|
||||
# commands irrespective of the value of the RECURSIVE tag.
|
||||
# Possible values are YES and NO. If left blank NO is used.
|
||||
|
||||
EXAMPLE_RECURSIVE = NO
|
||||
|
||||
# The IMAGE_PATH tag can be used to specify one or more files or
|
||||
# directories that contain image that are included in the documentation (see
|
||||
# the \image command).
|
||||
|
||||
IMAGE_PATH =
|
||||
|
||||
# The INPUT_FILTER tag can be used to specify a program that doxygen should
|
||||
# invoke to filter for each input file. Doxygen will invoke the filter program
|
||||
# by executing (via popen()) the command <filter> <input-file>, where <filter>
|
||||
# is the value of the INPUT_FILTER tag, and <input-file> is the name of an
|
||||
# input file. Doxygen will then use the output that the filter program writes
|
||||
# to standard output.
|
||||
|
||||
INPUT_FILTER =
|
||||
|
||||
# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using
|
||||
# INPUT_FILTER) will be used to filter the input files when producing source
|
||||
# files to browse (i.e. when SOURCE_BROWSER is set to YES).
|
||||
|
||||
FILTER_SOURCE_FILES = NO
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to source browsing
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
# If the SOURCE_BROWSER tag is set to YES then a list of source files will
|
||||
# be generated. Documented entities will be cross-referenced with these sources.
|
||||
|
||||
SOURCE_BROWSER = NO
|
||||
|
||||
# Setting the INLINE_SOURCES tag to YES will include the body
|
||||
# of functions and classes directly in the documentation.
|
||||
|
||||
INLINE_SOURCES = NO
|
||||
|
||||
# If the REFERENCED_BY_RELATION tag is set to YES (the default)
|
||||
# then for each documented function all documented
|
||||
# functions referencing it will be listed.
|
||||
|
||||
REFERENCED_BY_RELATION = YES
|
||||
|
||||
# If the REFERENCES_RELATION tag is set to YES (the default)
|
||||
# then for each documented function all documented entities
|
||||
# called/used by that function will be listed.
|
||||
|
||||
REFERENCES_RELATION = YES
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to the alphabetical class index
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index
|
||||
# of all compounds will be generated. Enable this if the project
|
||||
# contains a lot of classes, structs, unions or interfaces.
|
||||
|
||||
ALPHABETICAL_INDEX = YES
|
||||
|
||||
# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then
|
||||
# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns
|
||||
# in which this list will be split (can be a number in the range [1..20])
|
||||
|
||||
COLS_IN_ALPHA_INDEX = 5
|
||||
|
||||
# In case all classes in a project start with a common prefix, all
|
||||
# classes will be put under the same header in the alphabetical index.
|
||||
# The IGNORE_PREFIX tag can be used to specify one or more prefixes that
|
||||
# should be ignored while generating the index headers.
|
||||
|
||||
IGNORE_PREFIX =
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to the HTML output
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
# If the GENERATE_HTML tag is set to YES (the default) Doxygen will
|
||||
# generate HTML output.
|
||||
|
||||
GENERATE_HTML = YES
|
||||
|
||||
# The HTML_OUTPUT tag is used to specify where the HTML docs will be put.
|
||||
# If a relative path is entered the value of OUTPUT_DIRECTORY will be
|
||||
# put in front of it. If left blank `html' will be used as the default path.
|
||||
|
||||
HTML_OUTPUT = @DOX_DIR_HTML@
|
||||
|
||||
# The HTML_FILE_EXTENSION tag can be used to specify the file extension for
|
||||
# each generated HTML page (for example: .htm,.php,.asp). If it is left blank
|
||||
# doxygen will generate files with .html extension.
|
||||
|
||||
HTML_FILE_EXTENSION = .html
|
||||
|
||||
# The HTML_HEADER tag can be used to specify a personal HTML header for
|
||||
# each generated HTML page. If it is left blank doxygen will generate a
|
||||
# standard header.
|
||||
|
||||
HTML_HEADER =
|
||||
|
||||
# The HTML_FOOTER tag can be used to specify a personal HTML footer for
|
||||
# each generated HTML page. If it is left blank doxygen will generate a
|
||||
# standard footer.
|
||||
|
||||
HTML_FOOTER =
|
||||
|
||||
# The HTML_STYLESHEET tag can be used to specify a user defined cascading
|
||||
# style sheet that is used by each HTML page. It can be used to
|
||||
# fine-tune the look of the HTML output. If the tag is left blank doxygen
|
||||
# will generate a default style sheet
|
||||
|
||||
HTML_STYLESHEET = libopm.css
|
||||
|
||||
# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes,
|
||||
# files or namespaces will be aligned in HTML using tables. If set to
|
||||
# NO a bullet list will be used.
|
||||
|
||||
HTML_ALIGN_MEMBERS = YES
|
||||
|
||||
# If the GENERATE_HTMLHELP tag is set to YES, additional index files
|
||||
# will be generated that can be used as input for tools like the
|
||||
# Microsoft HTML help workshop to generate a compressed HTML help file (.chm)
|
||||
# of the generated HTML documentation.
|
||||
|
||||
GENERATE_HTMLHELP = NO
|
||||
|
||||
# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can
|
||||
# be used to specify the file name of the resulting .chm file. You
|
||||
# can add a path in front of the file if the result should not be
|
||||
# written to the html output dir.
|
||||
|
||||
CHM_FILE =
|
||||
|
||||
# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can
|
||||
# be used to specify the location (absolute path including file name) of
|
||||
# the HTML help compiler (hhc.exe). If non empty doxygen will try to run
|
||||
# the html help compiler on the generated index.hhp.
|
||||
|
||||
HHC_LOCATION =
|
||||
|
||||
# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag
|
||||
# controls if a separate .chi index file is generated (YES) or that
|
||||
# it should be included in the master .chm file (NO).
|
||||
|
||||
GENERATE_CHI = NO
|
||||
|
||||
# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag
|
||||
# controls whether a binary table of contents is generated (YES) or a
|
||||
# normal table of contents (NO) in the .chm file.
|
||||
|
||||
BINARY_TOC = NO
|
||||
|
||||
# The TOC_EXPAND flag can be set to YES to add extra items for group members
|
||||
# to the contents of the Html help documentation and to the tree view.
|
||||
|
||||
TOC_EXPAND = NO
|
||||
|
||||
# The DISABLE_INDEX tag can be used to turn on/off the condensed index at
|
||||
# top of each HTML page. The value NO (the default) enables the index and
|
||||
# the value YES disables it.
|
||||
|
||||
DISABLE_INDEX = NO
|
||||
|
||||
# This tag can be used to set the number of enum values (range [1..20])
|
||||
# that doxygen will group on one line in the generated HTML documentation.
|
||||
|
||||
ENUM_VALUES_PER_LINE = 4
|
||||
|
||||
# If the GENERATE_TREEVIEW tag is set to YES, a side panel will be
|
||||
# generated containing a tree-like index structure (just like the one that
|
||||
# is generated for HTML Help). For this to work a browser that supports
|
||||
# JavaScript and frames is required (for instance Mozilla, Netscape 4.0+,
|
||||
# or Internet explorer 4.0+). Note that for large projects the tree generation
|
||||
# can take a very long time. In such cases it is better to disable this feature.
|
||||
# Windows users are probably better off using the HTML help feature.
|
||||
|
||||
GENERATE_TREEVIEW = NO
|
||||
|
||||
# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be
|
||||
# used to set the initial width (in pixels) of the frame in which the tree
|
||||
# is shown.
|
||||
|
||||
TREEVIEW_WIDTH = 250
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to the LaTeX output
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will
|
||||
# generate Latex output.
|
||||
|
||||
GENERATE_LATEX = YES
|
||||
|
||||
# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put.
|
||||
# If a relative path is entered the value of OUTPUT_DIRECTORY will be
|
||||
# put in front of it. If left blank `latex' will be used as the default path.
|
||||
|
||||
LATEX_OUTPUT = @DOX_DIR_LATEX@
|
||||
|
||||
# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be invoked. If left blank `latex' will be used as the default command name.
|
||||
|
||||
LATEX_CMD_NAME = latex
|
||||
|
||||
# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to
|
||||
# generate index for LaTeX. If left blank `makeindex' will be used as the
|
||||
# default command name.
|
||||
|
||||
MAKEINDEX_CMD_NAME = makeindex
|
||||
|
||||
# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact
|
||||
# LaTeX documents. This may be useful for small projects and may help to
|
||||
# save some trees in general.
|
||||
|
||||
COMPACT_LATEX = NO
|
||||
|
||||
# The PAPER_TYPE tag can be used to set the paper type that is used
|
||||
# by the printer. Possible values are: a4, a4wide, letter, legal and
|
||||
# executive. If left blank a4wide will be used.
|
||||
|
||||
PAPER_TYPE = a4wide
|
||||
|
||||
# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX
|
||||
# packages that should be included in the LaTeX output.
|
||||
|
||||
EXTRA_PACKAGES =
|
||||
|
||||
# The LATEX_HEADER tag can be used to specify a personal LaTeX header for
|
||||
# the generated latex document. The header should contain everything until
|
||||
# the first chapter. If it is left blank doxygen will generate a
|
||||
# standard header. Notice: only use this tag if you know what you are doing!
|
||||
|
||||
LATEX_HEADER =
|
||||
|
||||
# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated
|
||||
# is prepared for conversion to pdf (using ps2pdf). The pdf file will
|
||||
# contain links (just like the HTML output) instead of page references
|
||||
# This makes the output suitable for online browsing using a pdf viewer.
|
||||
|
||||
PDF_HYPERLINKS = YES
|
||||
|
||||
# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of
|
||||
# plain latex in the generated Makefile. Set this option to YES to get a
|
||||
# higher quality PDF documentation.
|
||||
|
||||
USE_PDFLATEX = NO
|
||||
|
||||
# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode.
|
||||
# command to the generated LaTeX files. This will instruct LaTeX to keep
|
||||
# running if errors occur, instead of asking the user for help.
|
||||
# This option is also used when generating formulas in HTML.
|
||||
|
||||
LATEX_BATCHMODE = NO
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to the RTF output
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output
|
||||
# The RTF output is optimised for Word 97 and may not look very pretty with
|
||||
# other RTF readers or editors.
|
||||
|
||||
GENERATE_RTF = NO
|
||||
|
||||
# The RTF_OUTPUT tag is used to specify where the RTF docs will be put.
|
||||
# If a relative path is entered the value of OUTPUT_DIRECTORY will be
|
||||
# put in front of it. If left blank `rtf' will be used as the default path.
|
||||
|
||||
RTF_OUTPUT = rtf
|
||||
|
||||
# If the COMPACT_RTF tag is set to YES Doxygen generates more compact
|
||||
# RTF documents. This may be useful for small projects and may help to
|
||||
# save some trees in general.
|
||||
|
||||
COMPACT_RTF = NO
|
||||
|
||||
# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated
|
||||
# will contain hyperlink fields. The RTF file will
|
||||
# contain links (just like the HTML output) instead of page references.
|
||||
# This makes the output suitable for online browsing using WORD or other
|
||||
# programs which support those fields.
|
||||
# Note: wordpad (write) and others do not support links.
|
||||
|
||||
RTF_HYPERLINKS = NO
|
||||
|
||||
# Load stylesheet definitions from file. Syntax is similar to doxygen's
|
||||
# config file, i.e. a series of assigments. You only have to provide
|
||||
# replacements, missing definitions are set to their default value.
|
||||
|
||||
RTF_STYLESHEET_FILE =
|
||||
|
||||
# Set optional variables used in the generation of an rtf document.
|
||||
# Syntax is similar to doxygen's config file.
|
||||
|
||||
RTF_EXTENSIONS_FILE =
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to the man page output
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
# If the GENERATE_MAN tag is set to YES (the default) Doxygen will
|
||||
# generate man pages
|
||||
|
||||
GENERATE_MAN = YES
|
||||
|
||||
# The MAN_OUTPUT tag is used to specify where the man pages will be put.
|
||||
# If a relative path is entered the value of OUTPUT_DIRECTORY will be
|
||||
# put in front of it. If left blank `man' will be used as the default path.
|
||||
|
||||
MAN_OUTPUT = @DOX_DIR_MAN@
|
||||
|
||||
# The MAN_EXTENSION tag determines the extension that is added to
|
||||
# the generated man pages (default is the subroutine's section .3)
|
||||
|
||||
MAN_EXTENSION = .3
|
||||
|
||||
# If the MAN_LINKS tag is set to YES and Doxygen generates man output,
|
||||
# then it will generate one additional man file for each entity
|
||||
# documented in the real man page(s). These additional files
|
||||
# only source the real man page, but without them the man command
|
||||
# would be unable to find the correct page. The default is NO.
|
||||
|
||||
MAN_LINKS = NO
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to the XML output
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
# If the GENERATE_XML tag is set to YES Doxygen will
|
||||
# generate an XML file that captures the structure of
|
||||
# the code including all documentation. Note that this
|
||||
# feature is still experimental and incomplete at the
|
||||
# moment.
|
||||
|
||||
GENERATE_XML = NO
|
||||
|
||||
# The XML_SCHEMA tag can be used to specify an XML schema,
|
||||
# which can be used by a validating XML parser to check the
|
||||
# syntax of the XML files.
|
||||
|
||||
XML_SCHEMA =
|
||||
|
||||
# The XML_DTD tag can be used to specify an XML DTD,
|
||||
# which can be used by a validating XML parser to check the
|
||||
# syntax of the XML files.
|
||||
|
||||
XML_DTD =
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options for the AutoGen Definitions output
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will
|
||||
# generate an AutoGen Definitions (see autogen.sf.net) file
|
||||
# that captures the structure of the code including all
|
||||
# documentation. Note that this feature is still experimental
|
||||
# and incomplete at the moment.
|
||||
|
||||
GENERATE_AUTOGEN_DEF = NO
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration options related to the preprocessor
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will
|
||||
# evaluate all C-preprocessor directives found in the sources and include
|
||||
# files.
|
||||
|
||||
ENABLE_PREPROCESSING = YES
|
||||
|
||||
# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro
|
||||
# names in the source code. If set to NO (the default) only conditional
|
||||
# compilation will be performed. Macro expansion can be done in a controlled
|
||||
# way by setting EXPAND_ONLY_PREDEF to YES.
|
||||
|
||||
MACRO_EXPANSION = YES
|
||||
|
||||
# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES
|
||||
# then the macro expansion is limited to the macros specified with the
|
||||
# PREDEFINED and EXPAND_AS_PREDEFINED tags.
|
||||
|
||||
EXPAND_ONLY_PREDEF = NO
|
||||
|
||||
# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files
|
||||
# in the INCLUDE_PATH (see below) will be search if a #include is found.
|
||||
|
||||
SEARCH_INCLUDES = YES
|
||||
|
||||
# The INCLUDE_PATH tag can be used to specify one or more directories that
|
||||
# contain include files that are not input files but should be processed by
|
||||
# the preprocessor.
|
||||
|
||||
INCLUDE_PATH =
|
||||
|
||||
# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard
|
||||
# patterns (like *.h and *.hpp) to filter out the header-files in the
|
||||
# directories. If left blank, the patterns specified with FILE_PATTERNS will
|
||||
# be used.
|
||||
|
||||
INCLUDE_FILE_PATTERNS =
|
||||
|
||||
# The PREDEFINED tag can be used to specify one or more macro names that
|
||||
# are defined before the preprocessor is started (similar to the -D option of
|
||||
# gcc). The argument of the tag is a list of macros of the form: name
|
||||
# or name=definition (no spaces). If the definition and the = are
|
||||
# omitted =1 is assumed.
|
||||
|
||||
PREDEFINED =
|
||||
|
||||
# If the MACRO_EXPANSION and EXPAND_PREDEF_ONLY tags are set to YES then
|
||||
# this tag can be used to specify a list of macro names that should be expanded.
|
||||
# The macro definition that is found in the sources will be used.
|
||||
# Use the PREDEFINED tag if you want to use a different macro definition.
|
||||
|
||||
EXPAND_AS_DEFINED =
|
||||
|
||||
# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then
|
||||
# doxygen's preprocessor will remove all function-like macros that are alone
|
||||
# on a line, have an all uppercase name, and do not end with a semicolon. Such
|
||||
# function macros are typically used for boiler-plate code, and will confuse the
|
||||
# parser if not removed.
|
||||
|
||||
SKIP_FUNCTION_MACROS = YES
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration::addtions related to external references
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
# The TAGFILES tag can be used to specify one or more tagfiles.
|
||||
|
||||
TAGFILES =
|
||||
|
||||
# When a file name is specified after GENERATE_TAGFILE, doxygen will create
|
||||
# a tag file that is based on the input files it reads.
|
||||
|
||||
GENERATE_TAGFILE =
|
||||
|
||||
# If the ALLEXTERNALS tag is set to YES all external classes will be listed
|
||||
# in the class index. If set to NO only the inherited external classes
|
||||
# will be listed.
|
||||
|
||||
ALLEXTERNALS = NO
|
||||
|
||||
# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed
|
||||
# in the modules index. If set to NO, only the current project's groups will
|
||||
# be listed.
|
||||
|
||||
EXTERNAL_GROUPS = YES
|
||||
|
||||
# The PERL_PATH should be the absolute path and name of the perl script
|
||||
# interpreter (i.e. the result of `which perl').
|
||||
|
||||
PERL_PATH = /usr/bin/perl
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration options related to the dot tool
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will
|
||||
# generate a inheritance diagram (in Html, RTF and LaTeX) for classes with base or
|
||||
# super classes. Setting the tag to NO turns the diagrams off. Note that this
|
||||
# option is superceded by the HAVE_DOT option below. This is only a fallback. It is
|
||||
# recommended to install and use dot, since it yield more powerful graphs.
|
||||
|
||||
CLASS_DIAGRAMS = YES
|
||||
|
||||
# If set to YES, the inheritance and collaboration graphs will hide
|
||||
# inheritance and usage relations if the target is undocumented
|
||||
# or is not a class.
|
||||
|
||||
HIDE_UNDOC_RELATIONS = YES
|
||||
|
||||
# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is
|
||||
# available from the path. This tool is part of Graphviz, a graph visualization
|
||||
# toolkit from AT&T and Lucent Bell Labs. The other options in this section
|
||||
# have no effect if this option is set to NO (the default)
|
||||
|
||||
HAVE_DOT = NO
|
||||
|
||||
# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen
|
||||
# will generate a graph for each documented class showing the direct and
|
||||
# indirect inheritance relations. Setting this tag to YES will force the
|
||||
# the CLASS_DIAGRAMS tag to NO.
|
||||
|
||||
CLASS_GRAPH = YES
|
||||
|
||||
# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen
|
||||
# will generate a graph for each documented class showing the direct and
|
||||
# indirect implementation dependencies (inheritance, containment, and
|
||||
# class references variables) of the class with other documented classes.
|
||||
|
||||
COLLABORATION_GRAPH = YES
|
||||
|
||||
# If set to YES, the inheritance and collaboration graphs will show the
|
||||
# relations between templates and their instances.
|
||||
|
||||
TEMPLATE_RELATIONS = YES
|
||||
|
||||
# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT
|
||||
# tags are set to YES then doxygen will generate a graph for each documented
|
||||
# file showing the direct and indirect include dependencies of the file with
|
||||
# other documented files.
|
||||
|
||||
INCLUDE_GRAPH = YES
|
||||
|
||||
# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and
|
||||
# HAVE_DOT tags are set to YES then doxygen will generate a graph for each
|
||||
# documented header file showing the documented files that directly or
|
||||
# indirectly include this file.
|
||||
|
||||
INCLUDED_BY_GRAPH = YES
|
||||
|
||||
# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen
|
||||
# will graphical hierarchy of all classes instead of a textual one.
|
||||
|
||||
GRAPHICAL_HIERARCHY = YES
|
||||
|
||||
# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images
|
||||
# generated by dot. Possible values are png, jpg, or gif
|
||||
# If left blank png will be used.
|
||||
|
||||
DOT_IMAGE_FORMAT = png
|
||||
|
||||
# The tag DOT_PATH can be used to specify the path where the dot tool can be
|
||||
# found. If left blank, it is assumed the dot tool can be found on the path.
|
||||
|
||||
DOT_PATH =
|
||||
|
||||
# The DOTFILE_DIRS tag can be used to specify one or more directories that
|
||||
# contain dot files that are included in the documentation (see the
|
||||
# \dotfile command).
|
||||
|
||||
DOTFILE_DIRS =
|
||||
|
||||
# The MAX_DOT_GRAPH_WIDTH tag can be used to set the maximum allowed width
|
||||
# (in pixels) of the graphs generated by dot. If a graph becomes larger than
|
||||
# this value, doxygen will try to truncate the graph, so that it fits within
|
||||
# the specified constraint. Beware that most browsers cannot cope with very
|
||||
# large images.
|
||||
|
||||
MAX_DOT_GRAPH_WIDTH = 1024
|
||||
|
||||
# The MAX_DOT_GRAPH_HEIGHT tag can be used to set the maximum allows height
|
||||
# (in pixels) of the graphs generated by dot. If a graph becomes larger than
|
||||
# this value, doxygen will try to truncate the graph, so that it fits within
|
||||
# the specified constraint. Beware that most browsers cannot cope with very
|
||||
# large images.
|
||||
|
||||
MAX_DOT_GRAPH_HEIGHT = 1024
|
||||
|
||||
# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will
|
||||
# generate a legend page explaining the meaning of the various boxes and
|
||||
# arrows in the dot generated graphs.
|
||||
|
||||
GENERATE_LEGEND = YES
|
||||
|
||||
# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will
|
||||
# remove the intermedate dot files that are used to generate
|
||||
# the various graphs.
|
||||
|
||||
DOT_CLEANUP = YES
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration::addtions related to the search engine
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
# The SEARCHENGINE tag specifies whether or not a search engine should be
|
||||
# used. If set to NO the values of all tags below this one will be ignored.
|
||||
|
||||
SEARCHENGINE = NO
|
||||
|
||||
# The CGI_NAME tag should be the name of the CGI script that
|
||||
# starts the search engine (doxysearch) with the correct parameters.
|
||||
# A script with this name will be generated by doxygen.
|
||||
|
||||
CGI_NAME = search.cgi
|
||||
|
||||
# The CGI_URL tag should be the absolute URL to the directory where the
|
||||
# cgi binaries are located. See the documentation of your http daemon for
|
||||
# details.
|
||||
|
||||
CGI_URL =
|
||||
|
||||
# The DOC_URL tag should be the absolute URL to the directory where the
|
||||
# documentation is located. If left blank the absolute path to the
|
||||
# documentation, with file:// prepended to it, will be used.
|
||||
|
||||
DOC_URL =
|
||||
|
||||
# The DOC_ABSPATH tag should be the absolute path to the directory where the
|
||||
# documentation is located. If left blank the directory on the local machine
|
||||
# will be used.
|
||||
|
||||
DOC_ABSPATH =
|
||||
|
||||
# The BIN_ABSPATH tag must point to the directory where the doxysearch binary
|
||||
# is installed.
|
||||
|
||||
BIN_ABSPATH = /usr/local/bin/
|
||||
|
||||
# The EXT_DOC_PATHS tag can be used to specify one or more paths to
|
||||
# documentation generated for other projects. This allows doxysearch to search
|
||||
# the documentation for these projects as well.
|
||||
|
||||
EXT_DOC_PATHS =
|
|
@ -1,6 +0,0 @@
|
|||
docs: Doxyfile
|
||||
-rm -rf @DOX_DIR_HTML@ @DOX_DIR_LATEX@
|
||||
cd $(srcdir) && doxygen Doxyfile
|
||||
|
||||
clean:
|
||||
-rm -rf @DOX_DIR_HTML@ @DOX_DIR_LATEX@
|
|
@ -1,233 +0,0 @@
|
|||
# Makefile.in generated by automake 1.6.3 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
|
||||
# Free Software Foundation, Inc.
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
@SET_MAKE@
|
||||
SHELL = @SHELL@
|
||||
|
||||
srcdir = @srcdir@
|
||||
top_srcdir = @top_srcdir@
|
||||
VPATH = @srcdir@
|
||||
prefix = @prefix@
|
||||
exec_prefix = @exec_prefix@
|
||||
|
||||
bindir = @bindir@
|
||||
sbindir = @sbindir@
|
||||
libexecdir = @libexecdir@
|
||||
datadir = @datadir@
|
||||
sysconfdir = @sysconfdir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
localstatedir = @localstatedir@
|
||||
libdir = @libdir@
|
||||
infodir = @infodir@
|
||||
mandir = @mandir@
|
||||
includedir = @includedir@
|
||||
oldincludedir = /usr/include
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
top_builddir = ..
|
||||
|
||||
ACLOCAL = @ACLOCAL@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
|
||||
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
install_sh_DATA = $(install_sh) -c -m 644
|
||||
install_sh_PROGRAM = $(install_sh) -c
|
||||
install_sh_SCRIPT = $(install_sh) -c
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_HEADER = $(INSTALL_DATA)
|
||||
transform = @program_transform_name@
|
||||
NORMAL_INSTALL = :
|
||||
PRE_INSTALL = :
|
||||
POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
host_alias = @host_alias@
|
||||
host_triplet = @host@
|
||||
|
||||
EXEEXT = @EXEEXT@
|
||||
OBJEXT = @OBJEXT@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
AMTAR = @AMTAR@
|
||||
AS = @AS@
|
||||
AWK = @AWK@
|
||||
CC = @CC@
|
||||
DEPDIR = @DEPDIR@
|
||||
DLLTOOL = @DLLTOOL@
|
||||
DOX_DIR_HTML = @DOX_DIR_HTML@
|
||||
DOX_DIR_LATEX = @DOX_DIR_LATEX@
|
||||
DOX_DIR_MAN = @DOX_DIR_MAN@
|
||||
ECHO = @ECHO@
|
||||
ETR_SOCKET_LIBS = @ETR_SOCKET_LIBS@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
LIBTOOL = @LIBTOOL@
|
||||
LIBTOOL_DEPS = @LIBTOOL_DEPS@
|
||||
LNSL = @LNSL@
|
||||
LN_S = @LN_S@
|
||||
LSOCKET = @LSOCKET@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
MAINT = @MAINT@
|
||||
OBJDUMP = @OBJDUMP@
|
||||
PACKAGE = @PACKAGE@
|
||||
RANLIB = @RANLIB@
|
||||
STRIP = @STRIP@
|
||||
VERSION = @VERSION@
|
||||
am__include = @am__include@
|
||||
am__quote = @am__quote@
|
||||
install_sh = @install_sh@
|
||||
subdir = doc
|
||||
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
|
||||
CONFIG_HEADER = $(top_builddir)/src/setup.h
|
||||
CONFIG_CLEAN_FILES = Doxyfile
|
||||
DIST_SOURCES =
|
||||
DIST_COMMON = Doxyfile.in Makefile.am Makefile.in
|
||||
all: all-am
|
||||
|
||||
.SUFFIXES:
|
||||
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
|
||||
cd $(top_srcdir) && \
|
||||
$(AUTOMAKE) --gnu doc/Makefile
|
||||
Makefile: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)
|
||||
Doxyfile: $(top_builddir)/config.status Doxyfile.in
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
|
||||
|
||||
mostlyclean-libtool:
|
||||
-rm -f *.lo
|
||||
|
||||
clean-libtool:
|
||||
-rm -rf .libs _libs
|
||||
|
||||
distclean-libtool:
|
||||
-rm -f libtool
|
||||
uninstall-info-am:
|
||||
tags: TAGS
|
||||
TAGS:
|
||||
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
|
||||
top_distdir = ..
|
||||
distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
@list='$(DISTFILES)'; for file in $$list; do \
|
||||
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
|
||||
dir="/$$dir"; \
|
||||
$(mkinstalldirs) "$(distdir)$$dir"; \
|
||||
else \
|
||||
dir=''; \
|
||||
fi; \
|
||||
if test -d $$d/$$file; then \
|
||||
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
|
||||
fi; \
|
||||
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
|
||||
else \
|
||||
test -f $(distdir)/$$file \
|
||||
|| cp -p $$d/$$file $(distdir)/$$file \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
check-am: all-am
|
||||
check: check-am
|
||||
all-am: Makefile
|
||||
|
||||
installdirs:
|
||||
|
||||
install: install-am
|
||||
install-exec: install-exec-am
|
||||
install-data: install-data-am
|
||||
uninstall: uninstall-am
|
||||
|
||||
install-am: all-am
|
||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||
|
||||
installcheck: installcheck-am
|
||||
install-strip:
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
INSTALL_STRIP_FLAG=-s \
|
||||
`test -z '$(STRIP)' || \
|
||||
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
|
||||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
|
||||
distclean-generic:
|
||||
-rm -f Makefile $(CONFIG_CLEAN_FILES)
|
||||
|
||||
maintainer-clean-generic:
|
||||
@echo "This command is intended for maintainers to use"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
clean: clean-am
|
||||
|
||||
clean-am: clean-generic clean-libtool mostlyclean-am
|
||||
|
||||
distclean: distclean-am
|
||||
|
||||
distclean-am: clean-am distclean-generic distclean-libtool
|
||||
|
||||
dvi: dvi-am
|
||||
|
||||
dvi-am:
|
||||
|
||||
info: info-am
|
||||
|
||||
info-am:
|
||||
|
||||
install-data-am:
|
||||
|
||||
install-exec-am:
|
||||
|
||||
install-info: install-info-am
|
||||
|
||||
install-man:
|
||||
|
||||
installcheck-am:
|
||||
|
||||
maintainer-clean: maintainer-clean-am
|
||||
|
||||
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||
|
||||
mostlyclean: mostlyclean-am
|
||||
|
||||
mostlyclean-am: mostlyclean-generic mostlyclean-libtool
|
||||
|
||||
uninstall-am: uninstall-info-am
|
||||
|
||||
.PHONY: all all-am check check-am clean clean-generic clean-libtool \
|
||||
distclean distclean-generic distclean-libtool distdir dvi \
|
||||
dvi-am info info-am install install-am install-data \
|
||||
install-data-am install-exec install-exec-am install-info \
|
||||
install-info-am install-man install-strip installcheck \
|
||||
installcheck-am installdirs maintainer-clean \
|
||||
maintainer-clean-generic mostlyclean mostlyclean-generic \
|
||||
mostlyclean-libtool uninstall uninstall-am uninstall-info-am
|
||||
|
||||
docs: Doxyfile
|
||||
-rm -rf @DOX_DIR_HTML@ @DOX_DIR_LATEX@
|
||||
cd $(srcdir) && doxygen Doxyfile
|
||||
|
||||
clean:
|
||||
-rm -rf @DOX_DIR_HTML@ @DOX_DIR_LATEX@
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
|
@ -1,348 +0,0 @@
|
|||
Overview of libopm API
|
||||
Erik Fears <strtok@blitzed.org>
|
||||
|
||||
1.0 Overview
|
||||
-------------
|
||||
|
||||
The open proxy monitor library provides an API interface to an open proxy
|
||||
scanner. File descriptor and memory allocation are handled internally by calls
|
||||
to API functions aswell as the main IO loop (opm_cycle). Configuration, callback
|
||||
registry and protocol types are all on a scanner based level. This provides means
|
||||
to create multiple 'virtual scanners', each with it's own configuration, limits
|
||||
and protocols.
|
||||
|
||||
|
||||
2.0 API Data Types
|
||||
------------------
|
||||
|
||||
OPM_T
|
||||
This type holds information regarding a 'virtual scanner'. It is the highest
|
||||
type created to proxy scan.
|
||||
|
||||
OPM_REMOTE_T
|
||||
|
||||
This structure holds information regarding a remote host. An OPM_REMOTE_T must
|
||||
be created for each host libopm will scan. The OPM_REMOTE_T struct will be passed
|
||||
back on callbacks, so that the client will be able to determine the IP, port and
|
||||
protocol in question.
|
||||
|
||||
The OPM_REMOTE_T structure is defined in opm.h and is as follows:
|
||||
|
||||
struct OPM_REMOTE_T {
|
||||
char *ip;
|
||||
|
||||
unsigned short int port;
|
||||
unsigned short int protocol;
|
||||
unsigned short int bytes_read;
|
||||
|
||||
OPM_PROTOCOL_T *protocols;
|
||||
|
||||
void *data;
|
||||
}
|
||||
|
||||
The members of the OPM_REMOTE_T structure are:
|
||||
|
||||
ip
|
||||
The ip of the host in human readble form.
|
||||
|
||||
port
|
||||
Port used in callbacks.
|
||||
|
||||
protocol
|
||||
Protocol used in callbacks.
|
||||
|
||||
bytes_read
|
||||
Number of bytes read before the callback.
|
||||
|
||||
callbacks
|
||||
An array of callbacks associated with this OPM_REMOTE_T. This
|
||||
element is handled internally by the API.
|
||||
|
||||
data
|
||||
An arbitrary pointer used if the client program wants to store additional
|
||||
data in the remote struct. This can be used to avoid having to have a seperate
|
||||
list of scans outside of the library.
|
||||
|
||||
2.1 C API Functions
|
||||
-------------------
|
||||
|
||||
|
||||
OPM_T *opm_create(void)
|
||||
|
||||
Parameters: None
|
||||
Return: Pointer to OPM_T
|
||||
|
||||
The opm_create function is used to create a new scanner object. Memory for the object
|
||||
will be created internally and can be freed with the opm_free function.
|
||||
|
||||
|
||||
|
||||
|
||||
void opm_free(OPM_T *)
|
||||
|
||||
Parameters: Pointer to OPM_T object to free
|
||||
Return: None
|
||||
|
||||
The opm_free struct will free a scanner object. All configuration and scans the scanner
|
||||
is engaged in will be destroyed.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
OPM_REMOTE_T *opm_remote_create(char *)
|
||||
|
||||
Parameters: Pointer to string containing human readable IP address of remote host
|
||||
Return: Pointer to OPM_REMOTE_T
|
||||
|
||||
The opm_remote_create function will allocate and setup a OPM_REMOTE_T object which
|
||||
contains information on a remote host being scanned. OPM_REMOTE_T objects are passed
|
||||
to the scanner to initiate scanning, and then are passed back on events.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
void opm_remote_free(OPM_REMOTE_T *)
|
||||
|
||||
Parameters: OPM_REMOTE_T object to free
|
||||
Return: None
|
||||
|
||||
The opm_remote_free function frees up an OPM_REMOTE_T struct.
|
||||
|
||||
WARNING: Freeing an OPM_REMOTE_T struct after it has been passed to
|
||||
a scanner (via opm_scan) would give unpredictable results.
|
||||
|
||||
It is only safe to free an OPM_REMOTE_T struct after the end scan
|
||||
callback has been called.
|
||||
|
||||
|
||||
|
||||
OPM_ERR_T opm_config(OPM_T *, int, void *)
|
||||
|
||||
Parameters: OPM_T: object to set configuration options with
|
||||
int: configuration option to set
|
||||
void *: Pointer to data to set the data to
|
||||
|
||||
Return: OPM_ERR_T or OPM_SUCCESS on success
|
||||
|
||||
OPM_ERR_BADVALUE: Unable to set the given value (bad formatting).
|
||||
OPM_ERR_BADKEY: The key (configuration option) is unknown.
|
||||
|
||||
The opm_config function sets various options on the individual scanner
|
||||
objects. A pointer to the data to set the option to is required. The scanner
|
||||
will make a copy of the data and store it internally.
|
||||
|
||||
Configuration Types
|
||||
|
||||
OPTION TYPE DESCRIPTION
|
||||
--------------------------------------------------------------------------
|
||||
|
||||
OPM_CONFIG_FD_LIMIT int Max file descriptor limit
|
||||
|
||||
OPM_CONFIG_BIND_IP char * IP to bind to for outgoing scans
|
||||
|
||||
OPM_CONFIG_TARGET_STRING list of char * Target strings used to verify open proxies
|
||||
|
||||
OPM_CONFIG_SCAN_IP char * IP to command proxies to connect to
|
||||
|
||||
OPM_CONFIG_SCAN_PORT int port to command proxies to connect to
|
||||
|
||||
OPM_CONFIG_MAX_READ int Maximum amount of data (in bytes) to be read from
|
||||
the remote connection until it is dropped.
|
||||
|
||||
OPM_CONFIG_TIMEOUT int Time in seconds before a negotiation is considered
|
||||
timed out, and closed.
|
||||
|
||||
OPM_CONFIG_DNSBL_HOST char * DNSBL host
|
||||
|
||||
|
||||
|
||||
Example:
|
||||
int fd_limit, max_read;
|
||||
OPM_T *scanner;
|
||||
|
||||
scanner = opm_create();
|
||||
|
||||
fd_limit = 1024;
|
||||
max_read = 4096;
|
||||
|
||||
opm_config(scanner, OPM_CONFIG_FD_LIMIT, &fd_limit);
|
||||
opm_config(scanner, OPM_CONFIG_MAX_READ, &max_read);
|
||||
opm_config(scanner, OPM_CONFIG_BIND_IP, "10.0.0.1");
|
||||
opm_config(scanner, OPM_CONFIG_TARGET_STRING, "Match1");
|
||||
opm_config(scanner, OPM_CONFIG_TARET_STRING, "Match2");
|
||||
|
||||
opm_free(scanner);
|
||||
|
||||
|
||||
|
||||
OPM_ERR_T opm_addtype(OPM_T *, int, int)
|
||||
OPM_ERR_T opm_remote_addtype(OPM_REMOTE_T *, int, int)
|
||||
|
||||
Parameters: OPM_T scanner to add type to
|
||||
int: type to add
|
||||
int: port of type to add
|
||||
|
||||
Return: OPM_ERR_T or OPM_SUCCESS on success
|
||||
|
||||
OPM_ERR_BADPROTOCOL: Bad protocol type
|
||||
|
||||
The opm_addtype function adds a protocol type and port to the scanner's
|
||||
protocol list. This list determines what ports the scanner will scan on,
|
||||
and what protocols it will check for on those ports. Each protocol/port will
|
||||
result in 1 file descriptor used per scan.
|
||||
|
||||
The opm_remote_addtype functions works similarly, but adds the protocol
|
||||
configuration to an individual remote struct instead.
|
||||
|
||||
|
||||
Type Description
|
||||
---------------------------------------------------------------------
|
||||
OPM_TYPE_HTTP Open http proxies
|
||||
OPM_TYPE_SOCKS4 Open socks 4 proxies
|
||||
OPM_TYPE_SOCKS5 Open socks 5 proxies
|
||||
OPM_TYPE_ROUTER Routers with default passwords set (usually cisco)
|
||||
OPM_TYPE_WINGATE Open wingate proxy
|
||||
OPM_TYPE_POST Opm HTTP post proxy
|
||||
|
||||
Example:
|
||||
|
||||
OPM_T *scanner;
|
||||
scanner = opm_create();
|
||||
|
||||
opm_addtype(scanner, OPM_TYPE_HTTP, 80);
|
||||
opm_addtype(scanner, OPM_TYPE_HTTP, 8080);
|
||||
opm_addtype(scanner, OPM_TYPE_HTTP, 3128);
|
||||
opm_addtype(scanner, OPM_TYPE_SOCKS4, 1080);
|
||||
opm_addtype(scanner, OPM_TYPE_SOCKS5, 1080);
|
||||
opm_addtype(scanner, OPM_TYPE_ROUTER, 23);
|
||||
opm_addtype(scanner, OPM_TYPE_WINGATE, 23);
|
||||
opm_addtype(scanner, OPM_TYPE_POST, 80);
|
||||
|
||||
opm_free(scanner);
|
||||
|
||||
|
||||
OPM_ERR_T opm_scan(OPM_T *, OPM_REMOTE_T *)
|
||||
|
||||
Parameters: OPM_T: Scanner to scan on
|
||||
OPM_REMOTE_T: Object containing information on remote host to scan
|
||||
|
||||
Return: OPM_ERR_T or OPM_SUCCESS on success
|
||||
|
||||
OPM_ERR_BADADDR: The address within the OPM_REMOTE_T is not valid.
|
||||
OPM_ERR_NOPROTOCOLS: No protocols are configured.
|
||||
|
||||
The opm_scan functions adds a remote host object to the scanner's scan queue
|
||||
(or begins scanning on it if there is no queue).
|
||||
|
||||
Example:
|
||||
|
||||
OPM_T *scanner;
|
||||
OPM_REMOTE_T *remote_host;
|
||||
|
||||
scanner = opm_create();
|
||||
remote_host = opm_remote_create("10.0.0.1");
|
||||
|
||||
opm_addtype(scanner, OPM_TYPE_HTTP, 80);
|
||||
|
||||
opm_scan(scanner, remote_host);
|
||||
|
||||
|
||||
|
||||
void opm_end(OPM_T *, OPM_REMOTE_T *)
|
||||
void opm_endscan(OPM_T *, OPM_REMOTE_T *)
|
||||
|
||||
Parameters: OPM_T Scanner to end scan on
|
||||
OPM_REMOTE_T Scan to end
|
||||
|
||||
Return: None, OPM_CALLBACK_END will still be called
|
||||
when the scans end
|
||||
|
||||
The opm_end function ends all scans using the passed OPM_REMOTE_T. The
|
||||
opm_endscan will only end active scans (scans in the queue are not
|
||||
traversed). This is useful if it is known only one scan using the remote
|
||||
struct exists, but it is also known that the scan has already active.
|
||||
Using opm_endscan will save time by not traversing the queue list.
|
||||
|
||||
IMPORTANT: If the opm_end function ends any scans in the queue, the
|
||||
OPM_CALLBACK_END callback will be called immadiately for
|
||||
those scans. Any scans in the active scan list will be set
|
||||
OPM_STATE_CLOSED and OPM_CALLBACK_END for those scans will
|
||||
be called on the next opm_cycle.
|
||||
|
||||
|
||||
OPM_ERR_T opm_callback(OPM_T *, int, OPM_CALLBACK_T, void *)
|
||||
|
||||
Parameters: OPM_T: Scanner to set callbacks on
|
||||
int: Callback type
|
||||
OPM_CALLBACK_T: Pointer to custom callback function
|
||||
void *: Pointer to be passed back, this is generally NULL
|
||||
|
||||
Return: OPM_ERR_T or OPM_SUCCESS on success
|
||||
|
||||
OPM_ERR_CBNOTFOUND: The given callback type is unknown
|
||||
|
||||
|
||||
|
||||
typedef void OPM_CALLBACK_T (OPM_T *, OPM_REMOTE_T *, int);
|
||||
|
||||
|
||||
The opm_callback function is used to set a scanner wide callback function
|
||||
for events. The opm_remote_callback can be used to set remote host specific
|
||||
callback functions.
|
||||
|
||||
The first parameter to the callback function is the scanner in question, the
|
||||
second is the remote host object in question, and the third is an optional integer
|
||||
used for error codes.
|
||||
|
||||
The the OPENPROXY, NEGFAIL, TIMEOUT, and ERROR functions, the OPM_REMOTE struct
|
||||
will have OPM_REMOTE_T::protocol, OPM_REMOTE_T::port and OPM_REMOTE_T::bytes_read
|
||||
set.
|
||||
|
||||
Type Description
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
OPM_CALLBACK_OPENPROXY An open proxy has been found.
|
||||
|
||||
OPM_CALLBACK_NEGFAIL Negotiation with the remote end has failed.
|
||||
|
||||
OPM_CALLBACK_TIMEOUT Neogitation with the remote end has timed out
|
||||
|
||||
OPM_CALLBACK_END Scan on remote host is complete, the OPM_REMOTE_T
|
||||
has been removed from the scanner and is safe to
|
||||
opm_remote_free
|
||||
|
||||
OPM_CALLBACK_ERROR An error has occured.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
void opm_cycle(OPM_T *)
|
||||
|
||||
Parameters: OPM_T: Scanner to cycle
|
||||
Return: None
|
||||
|
||||
opm_cycle passes one cycle to a scanner. During a cycle the following functions
|
||||
are performed in order:
|
||||
|
||||
1. Scans are moved from a queue list to a live scan list if OPM_CONFIG_FD_LIMIT has not
|
||||
yet been reached.
|
||||
|
||||
2. Scans in the live scan list are 'established'. That is, if OPM_CONFIG_FD_LIMIT has not
|
||||
yet been reached, new connections will be established until OPM_CONFIG_FD_LIMIT is reached
|
||||
or all scans have active file descriptors.
|
||||
|
||||
3. All scans are polled for read, write and negotiation failed events. Upon write event,
|
||||
negotiation related data is sent to the remote host to negotiate the open proxy. Upon
|
||||
read event, data is read in and tested against target strings. Upon negotiation fail (HUP)
|
||||
events, scans are marked closed.
|
||||
|
||||
4. Free up the file descriptors of connections marked closed and remove such connections
|
||||
from the scan list. If no connections are left for a given remote host, consider the scan
|
||||
on that host ended and remove it from the scanner.
|
||||
|
||||
opm_cycle will need to be called consistently within the main loop of the client application.
|
||||
opm_cycle will not block or cause delays. It is up to the client application to rate calls to
|
||||
opm_cycle in order to save CPU.
|
|
@ -1,251 +0,0 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
# install - install a program, script, or datafile
|
||||
# This comes from X11R5 (mit/util/scripts/install.sh).
|
||||
#
|
||||
# Copyright 1991 by the Massachusetts Institute of Technology
|
||||
#
|
||||
# Permission to use, copy, modify, distribute, and sell this software and its
|
||||
# documentation for any purpose is hereby granted without fee, provided that
|
||||
# the above copyright notice appear in all copies and that both that
|
||||
# copyright notice and this permission notice appear in supporting
|
||||
# documentation, and that the name of M.I.T. not be used in advertising or
|
||||
# publicity pertaining to distribution of the software without specific,
|
||||
# written prior permission. M.I.T. makes no representations about the
|
||||
# suitability of this software for any purpose. It is provided "as is"
|
||||
# without express or implied warranty.
|
||||
#
|
||||
# Calling this script install-sh is preferred over install.sh, to prevent
|
||||
# `make' implicit rules from creating a file called install from it
|
||||
# when there is no Makefile.
|
||||
#
|
||||
# This script is compatible with the BSD install script, but was written
|
||||
# from scratch. It can only install one file at a time, a restriction
|
||||
# shared with many OS's install programs.
|
||||
|
||||
|
||||
# set DOITPROG to echo to test this script
|
||||
|
||||
# Don't use :- since 4.3BSD and earlier shells don't like it.
|
||||
doit="${DOITPROG-}"
|
||||
|
||||
|
||||
# put in absolute paths if you don't have them in your path; or use env. vars.
|
||||
|
||||
mvprog="${MVPROG-mv}"
|
||||
cpprog="${CPPROG-cp}"
|
||||
chmodprog="${CHMODPROG-chmod}"
|
||||
chownprog="${CHOWNPROG-chown}"
|
||||
chgrpprog="${CHGRPPROG-chgrp}"
|
||||
stripprog="${STRIPPROG-strip}"
|
||||
rmprog="${RMPROG-rm}"
|
||||
mkdirprog="${MKDIRPROG-mkdir}"
|
||||
|
||||
transformbasename=""
|
||||
transform_arg=""
|
||||
instcmd="$mvprog"
|
||||
chmodcmd="$chmodprog 0755"
|
||||
chowncmd=""
|
||||
chgrpcmd=""
|
||||
stripcmd=""
|
||||
rmcmd="$rmprog -f"
|
||||
mvcmd="$mvprog"
|
||||
src=""
|
||||
dst=""
|
||||
dir_arg=""
|
||||
|
||||
while [ x"$1" != x ]; do
|
||||
case $1 in
|
||||
-c) instcmd="$cpprog"
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-d) dir_arg=true
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-m) chmodcmd="$chmodprog $2"
|
||||
shift
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-o) chowncmd="$chownprog $2"
|
||||
shift
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-g) chgrpcmd="$chgrpprog $2"
|
||||
shift
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-s) stripcmd="$stripprog"
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-t=*) transformarg=`echo $1 | sed 's/-t=//'`
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-b=*) transformbasename=`echo $1 | sed 's/-b=//'`
|
||||
shift
|
||||
continue;;
|
||||
|
||||
*) if [ x"$src" = x ]
|
||||
then
|
||||
src=$1
|
||||
else
|
||||
# this colon is to work around a 386BSD /bin/sh bug
|
||||
:
|
||||
dst=$1
|
||||
fi
|
||||
shift
|
||||
continue;;
|
||||
esac
|
||||
done
|
||||
|
||||
if [ x"$src" = x ]
|
||||
then
|
||||
echo "install: no input file specified"
|
||||
exit 1
|
||||
else
|
||||
true
|
||||
fi
|
||||
|
||||
if [ x"$dir_arg" != x ]; then
|
||||
dst=$src
|
||||
src=""
|
||||
|
||||
if [ -d $dst ]; then
|
||||
instcmd=:
|
||||
chmodcmd=""
|
||||
else
|
||||
instcmd=mkdir
|
||||
fi
|
||||
else
|
||||
|
||||
# Waiting for this to be detected by the "$instcmd $src $dsttmp" command
|
||||
# might cause directories to be created, which would be especially bad
|
||||
# if $src (and thus $dsttmp) contains '*'.
|
||||
|
||||
if [ -f $src -o -d $src ]
|
||||
then
|
||||
true
|
||||
else
|
||||
echo "install: $src does not exist"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ x"$dst" = x ]
|
||||
then
|
||||
echo "install: no destination specified"
|
||||
exit 1
|
||||
else
|
||||
true
|
||||
fi
|
||||
|
||||
# If destination is a directory, append the input filename; if your system
|
||||
# does not like double slashes in filenames, you may need to add some logic
|
||||
|
||||
if [ -d $dst ]
|
||||
then
|
||||
dst="$dst"/`basename $src`
|
||||
else
|
||||
true
|
||||
fi
|
||||
fi
|
||||
|
||||
## this sed command emulates the dirname command
|
||||
dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
|
||||
|
||||
# Make sure that the destination directory exists.
|
||||
# this part is taken from Noah Friedman's mkinstalldirs script
|
||||
|
||||
# Skip lots of stat calls in the usual case.
|
||||
if [ ! -d "$dstdir" ]; then
|
||||
defaultIFS='
|
||||
'
|
||||
IFS="${IFS-${defaultIFS}}"
|
||||
|
||||
oIFS="${IFS}"
|
||||
# Some sh's can't handle IFS=/ for some reason.
|
||||
IFS='%'
|
||||
set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'`
|
||||
IFS="${oIFS}"
|
||||
|
||||
pathcomp=''
|
||||
|
||||
while [ $# -ne 0 ] ; do
|
||||
pathcomp="${pathcomp}${1}"
|
||||
shift
|
||||
|
||||
if [ ! -d "${pathcomp}" ] ;
|
||||
then
|
||||
$mkdirprog "${pathcomp}"
|
||||
else
|
||||
true
|
||||
fi
|
||||
|
||||
pathcomp="${pathcomp}/"
|
||||
done
|
||||
fi
|
||||
|
||||
if [ x"$dir_arg" != x ]
|
||||
then
|
||||
$doit $instcmd $dst &&
|
||||
|
||||
if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else true ; fi &&
|
||||
if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else true ; fi &&
|
||||
if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else true ; fi &&
|
||||
if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else true ; fi
|
||||
else
|
||||
|
||||
# If we're going to rename the final executable, determine the name now.
|
||||
|
||||
if [ x"$transformarg" = x ]
|
||||
then
|
||||
dstfile=`basename $dst`
|
||||
else
|
||||
dstfile=`basename $dst $transformbasename |
|
||||
sed $transformarg`$transformbasename
|
||||
fi
|
||||
|
||||
# don't allow the sed command to completely eliminate the filename
|
||||
|
||||
if [ x"$dstfile" = x ]
|
||||
then
|
||||
dstfile=`basename $dst`
|
||||
else
|
||||
true
|
||||
fi
|
||||
|
||||
# Make a temp file name in the proper directory.
|
||||
|
||||
dsttmp=$dstdir/#inst.$$#
|
||||
|
||||
# Move or copy the file name to the temp name
|
||||
|
||||
$doit $instcmd $src $dsttmp &&
|
||||
|
||||
trap "rm -f ${dsttmp}" 0 &&
|
||||
|
||||
# and set any options; do chmod last to preserve setuid bits
|
||||
|
||||
# If any of these fail, we abort the whole thing. If we want to
|
||||
# ignore errors from any of these, just make sure not to ignore
|
||||
# errors from the above "$doit $instcmd $src $dsttmp" command.
|
||||
|
||||
if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else true;fi &&
|
||||
if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi &&
|
||||
if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else true;fi &&
|
||||
if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else true;fi &&
|
||||
|
||||
# Now rename the file to the real destination.
|
||||
|
||||
$doit $rmcmd -f $dstdir/$dstfile &&
|
||||
$doit $mvcmd $dsttmp $dstdir/$dstfile
|
||||
|
||||
fi &&
|
||||
|
||||
|
||||
exit 0
|
5064
libopm/ltmain.sh
5064
libopm/ltmain.sh
File diff suppressed because it is too large
Load diff
336
libopm/missing
336
libopm/missing
|
@ -1,336 +0,0 @@
|
|||
#! /bin/sh
|
||||
# Common stub for a few missing GNU programs while installing.
|
||||
# Copyright (C) 1996, 1997, 1999, 2000, 2002 Free Software Foundation, Inc.
|
||||
# Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
|
||||
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2, or (at your option)
|
||||
# any later version.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||||
# 02111-1307, USA.
|
||||
|
||||
# As a special exception to the GNU General Public License, if you
|
||||
# distribute this file as part of a program that contains a
|
||||
# configuration script generated by Autoconf, you may include it under
|
||||
# the same distribution terms that you use for the rest of that program.
|
||||
|
||||
if test $# -eq 0; then
|
||||
echo 1>&2 "Try \`$0 --help' for more information"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
run=:
|
||||
|
||||
# In the cases where this matters, `missing' is being run in the
|
||||
# srcdir already.
|
||||
if test -f configure.ac; then
|
||||
configure_ac=configure.ac
|
||||
else
|
||||
configure_ac=configure.in
|
||||
fi
|
||||
|
||||
case "$1" in
|
||||
--run)
|
||||
# Try to run requested program, and just exit if it succeeds.
|
||||
run=
|
||||
shift
|
||||
"$@" && exit 0
|
||||
;;
|
||||
esac
|
||||
|
||||
# If it does not exist, or fails to run (possibly an outdated version),
|
||||
# try to emulate it.
|
||||
case "$1" in
|
||||
|
||||
-h|--h|--he|--hel|--help)
|
||||
echo "\
|
||||
$0 [OPTION]... PROGRAM [ARGUMENT]...
|
||||
|
||||
Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an
|
||||
error status if there is no known handling for PROGRAM.
|
||||
|
||||
Options:
|
||||
-h, --help display this help and exit
|
||||
-v, --version output version information and exit
|
||||
--run try to run the given command, and emulate it if it fails
|
||||
|
||||
Supported PROGRAM values:
|
||||
aclocal touch file \`aclocal.m4'
|
||||
autoconf touch file \`configure'
|
||||
autoheader touch file \`config.h.in'
|
||||
automake touch all \`Makefile.in' files
|
||||
bison create \`y.tab.[ch]', if possible, from existing .[ch]
|
||||
flex create \`lex.yy.c', if possible, from existing .c
|
||||
help2man touch the output file
|
||||
lex create \`lex.yy.c', if possible, from existing .c
|
||||
makeinfo touch the output file
|
||||
tar try tar, gnutar, gtar, then tar without non-portable flags
|
||||
yacc create \`y.tab.[ch]', if possible, from existing .[ch]"
|
||||
;;
|
||||
|
||||
-v|--v|--ve|--ver|--vers|--versi|--versio|--version)
|
||||
echo "missing 0.4 - GNU automake"
|
||||
;;
|
||||
|
||||
-*)
|
||||
echo 1>&2 "$0: Unknown \`$1' option"
|
||||
echo 1>&2 "Try \`$0 --help' for more information"
|
||||
exit 1
|
||||
;;
|
||||
|
||||
aclocal*)
|
||||
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
|
||||
# We have it, but it failed.
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is missing on your system. You should only need it if
|
||||
you modified \`acinclude.m4' or \`${configure_ac}'. You might want
|
||||
to install the \`Automake' and \`Perl' packages. Grab them from
|
||||
any GNU archive site."
|
||||
touch aclocal.m4
|
||||
;;
|
||||
|
||||
autoconf)
|
||||
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
|
||||
# We have it, but it failed.
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is missing on your system. You should only need it if
|
||||
you modified \`${configure_ac}'. You might want to install the
|
||||
\`Autoconf' and \`GNU m4' packages. Grab them from any GNU
|
||||
archive site."
|
||||
touch configure
|
||||
;;
|
||||
|
||||
autoheader)
|
||||
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
|
||||
# We have it, but it failed.
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is missing on your system. You should only need it if
|
||||
you modified \`acconfig.h' or \`${configure_ac}'. You might want
|
||||
to install the \`Autoconf' and \`GNU m4' packages. Grab them
|
||||
from any GNU archive site."
|
||||
files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}`
|
||||
test -z "$files" && files="config.h"
|
||||
touch_files=
|
||||
for f in $files; do
|
||||
case "$f" in
|
||||
*:*) touch_files="$touch_files "`echo "$f" |
|
||||
sed -e 's/^[^:]*://' -e 's/:.*//'`;;
|
||||
*) touch_files="$touch_files $f.in";;
|
||||
esac
|
||||
done
|
||||
touch $touch_files
|
||||
;;
|
||||
|
||||
automake*)
|
||||
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
|
||||
# We have it, but it failed.
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is missing on your system. You should only need it if
|
||||
you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'.
|
||||
You might want to install the \`Automake' and \`Perl' packages.
|
||||
Grab them from any GNU archive site."
|
||||
find . -type f -name Makefile.am -print |
|
||||
sed 's/\.am$/.in/' |
|
||||
while read f; do touch "$f"; done
|
||||
;;
|
||||
|
||||
autom4te)
|
||||
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
|
||||
# We have it, but it failed.
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is needed, and you do not seem to have it handy on your
|
||||
system. You might have modified some files without having the
|
||||
proper tools for further handling them.
|
||||
You can get \`$1Help2man' as part of \`Autoconf' from any GNU
|
||||
archive site."
|
||||
|
||||
file=`echo "$*" | sed -n 's/.*--output[ =]*\([^ ]*\).*/\1/p'`
|
||||
test -z "$file" && file=`echo "$*" | sed -n 's/.*-o[ ]*\([^ ]*\).*/\1/p'`
|
||||
if test -f "$file"; then
|
||||
touch $file
|
||||
else
|
||||
test -z "$file" || exec >$file
|
||||
echo "#! /bin/sh"
|
||||
echo "# Created by GNU Automake missing as a replacement of"
|
||||
echo "# $ $@"
|
||||
echo "exit 0"
|
||||
chmod +x $file
|
||||
exit 1
|
||||
fi
|
||||
;;
|
||||
|
||||
bison|yacc)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is missing on your system. You should only need it if
|
||||
you modified a \`.y' file. You may need the \`Bison' package
|
||||
in order for those modifications to take effect. You can get
|
||||
\`Bison' from any GNU archive site."
|
||||
rm -f y.tab.c y.tab.h
|
||||
if [ $# -ne 1 ]; then
|
||||
eval LASTARG="\${$#}"
|
||||
case "$LASTARG" in
|
||||
*.y)
|
||||
SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
|
||||
if [ -f "$SRCFILE" ]; then
|
||||
cp "$SRCFILE" y.tab.c
|
||||
fi
|
||||
SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
|
||||
if [ -f "$SRCFILE" ]; then
|
||||
cp "$SRCFILE" y.tab.h
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
if [ ! -f y.tab.h ]; then
|
||||
echo >y.tab.h
|
||||
fi
|
||||
if [ ! -f y.tab.c ]; then
|
||||
echo 'main() { return 0; }' >y.tab.c
|
||||
fi
|
||||
;;
|
||||
|
||||
lex|flex)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is missing on your system. You should only need it if
|
||||
you modified a \`.l' file. You may need the \`Flex' package
|
||||
in order for those modifications to take effect. You can get
|
||||
\`Flex' from any GNU archive site."
|
||||
rm -f lex.yy.c
|
||||
if [ $# -ne 1 ]; then
|
||||
eval LASTARG="\${$#}"
|
||||
case "$LASTARG" in
|
||||
*.l)
|
||||
SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
|
||||
if [ -f "$SRCFILE" ]; then
|
||||
cp "$SRCFILE" lex.yy.c
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
if [ ! -f lex.yy.c ]; then
|
||||
echo 'main() { return 0; }' >lex.yy.c
|
||||
fi
|
||||
;;
|
||||
|
||||
help2man)
|
||||
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
|
||||
# We have it, but it failed.
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is missing on your system. You should only need it if
|
||||
you modified a dependency of a manual page. You may need the
|
||||
\`Help2man' package in order for those modifications to take
|
||||
effect. You can get \`Help2man' from any GNU archive site."
|
||||
|
||||
file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
|
||||
if test -z "$file"; then
|
||||
file=`echo "$*" | sed -n 's/.*--output=\([^ ]*\).*/\1/p'`
|
||||
fi
|
||||
if [ -f "$file" ]; then
|
||||
touch $file
|
||||
else
|
||||
test -z "$file" || exec >$file
|
||||
echo ".ab help2man is required to generate this page"
|
||||
exit 1
|
||||
fi
|
||||
;;
|
||||
|
||||
makeinfo)
|
||||
if test -z "$run" && (makeinfo --version) > /dev/null 2>&1; then
|
||||
# We have makeinfo, but it failed.
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is missing on your system. You should only need it if
|
||||
you modified a \`.texi' or \`.texinfo' file, or any other file
|
||||
indirectly affecting the aspect of the manual. The spurious
|
||||
call might also be the consequence of using a buggy \`make' (AIX,
|
||||
DU, IRIX). You might want to install the \`Texinfo' package or
|
||||
the \`GNU make' package. Grab either from any GNU archive site."
|
||||
file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
|
||||
if test -z "$file"; then
|
||||
file=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
|
||||
file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $file`
|
||||
fi
|
||||
touch $file
|
||||
;;
|
||||
|
||||
tar)
|
||||
shift
|
||||
if test -n "$run"; then
|
||||
echo 1>&2 "ERROR: \`tar' requires --run"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# We have already tried tar in the generic part.
|
||||
# Look for gnutar/gtar before invocation to avoid ugly error
|
||||
# messages.
|
||||
if (gnutar --version > /dev/null 2>&1); then
|
||||
gnutar "$@" && exit 0
|
||||
fi
|
||||
if (gtar --version > /dev/null 2>&1); then
|
||||
gtar "$@" && exit 0
|
||||
fi
|
||||
firstarg="$1"
|
||||
if shift; then
|
||||
case "$firstarg" in
|
||||
*o*)
|
||||
firstarg=`echo "$firstarg" | sed s/o//`
|
||||
tar "$firstarg" "$@" && exit 0
|
||||
;;
|
||||
esac
|
||||
case "$firstarg" in
|
||||
*h*)
|
||||
firstarg=`echo "$firstarg" | sed s/h//`
|
||||
tar "$firstarg" "$@" && exit 0
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
echo 1>&2 "\
|
||||
WARNING: I can't seem to be able to run \`tar' with the given arguments.
|
||||
You may want to install GNU tar or Free paxutils, or check the
|
||||
command line arguments."
|
||||
exit 1
|
||||
;;
|
||||
|
||||
*)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is needed, and you do not seem to have it handy on your
|
||||
system. You might have modified some files without having the
|
||||
proper tools for further handling them. Check the \`README' file,
|
||||
it often tells you about the needed prerequirements for installing
|
||||
this package. You may also peek at any GNU archive site, in case
|
||||
some other package would contain this missing \`$1' program."
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
exit 0
|
|
@ -1,40 +0,0 @@
|
|||
#! /bin/sh
|
||||
# mkinstalldirs --- make directory hierarchy
|
||||
# Author: Noah Friedman <friedman@prep.ai.mit.edu>
|
||||
# Created: 1993-05-16
|
||||
# Public domain
|
||||
|
||||
# $Id: mkinstalldirs,v 1.1 2002/09/12 03:41:17 andy Exp $
|
||||
|
||||
errstatus=0
|
||||
|
||||
for file
|
||||
do
|
||||
set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'`
|
||||
shift
|
||||
|
||||
pathcomp=
|
||||
for d
|
||||
do
|
||||
pathcomp="$pathcomp$d"
|
||||
case "$pathcomp" in
|
||||
-* ) pathcomp=./$pathcomp ;;
|
||||
esac
|
||||
|
||||
if test ! -d "$pathcomp"; then
|
||||
echo "mkdir $pathcomp"
|
||||
|
||||
mkdir "$pathcomp" || lasterr=$?
|
||||
|
||||
if test ! -d "$pathcomp"; then
|
||||
errstatus=$lasterr
|
||||
fi
|
||||
fi
|
||||
|
||||
pathcomp="$pathcomp/"
|
||||
done
|
||||
done
|
||||
|
||||
exit $errstatus
|
||||
|
||||
# mkinstalldirs ends here
|
|
@ -1,10 +0,0 @@
|
|||
*.sw[op]
|
||||
Makefile
|
||||
*.lo
|
||||
*.la
|
||||
setup.h
|
||||
stamp-h*
|
||||
.deps
|
||||
.libs
|
||||
test
|
||||
test_debug
|
|
@ -1,19 +0,0 @@
|
|||
lib_LTLIBRARIES = libopm.la
|
||||
|
||||
libopm_la_SOURCES = compat.c compat.h config.c config.h inet.c inet.h \
|
||||
libopm.c libopm.h list.c list.h malloc.c malloc.h opm_common.h \
|
||||
opm_error.h opm.h opm_types.h proxy.c proxy.h setup.h
|
||||
|
||||
include_HEADERS = opm.h opm_error.h opm_types.h opm_common.h
|
||||
|
||||
libopm_la_LIBADD = @ETR_SOCKET_LIBS@ @LTLIBOBJS@
|
||||
|
||||
noinst_PROGRAMS = test test_debug
|
||||
test_SOURCES = test.c
|
||||
test_LDADD = libopm.la compat.o @LIBOBJS@
|
||||
|
||||
# An easier-to-debug version of test
|
||||
|
||||
test_debug_SOURCES = test.c
|
||||
test_debug_LDADD = libopm.la compat.o @LIBOBJS@
|
||||
test_debug_LDFLAGS = -static
|
|
@ -1,452 +0,0 @@
|
|||
# Makefile.in generated by automake 1.6.3 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
|
||||
# Free Software Foundation, Inc.
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
@SET_MAKE@
|
||||
SHELL = @SHELL@
|
||||
|
||||
srcdir = @srcdir@
|
||||
top_srcdir = @top_srcdir@
|
||||
VPATH = @srcdir@
|
||||
prefix = @prefix@
|
||||
exec_prefix = @exec_prefix@
|
||||
|
||||
bindir = @bindir@
|
||||
sbindir = @sbindir@
|
||||
libexecdir = @libexecdir@
|
||||
datadir = @datadir@
|
||||
sysconfdir = @sysconfdir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
localstatedir = @localstatedir@
|
||||
libdir = @libdir@
|
||||
infodir = @infodir@
|
||||
mandir = @mandir@
|
||||
includedir = @includedir@
|
||||
oldincludedir = /usr/include
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
top_builddir = ..
|
||||
|
||||
ACLOCAL = @ACLOCAL@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
|
||||
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
install_sh_DATA = $(install_sh) -c -m 644
|
||||
install_sh_PROGRAM = $(install_sh) -c
|
||||
install_sh_SCRIPT = $(install_sh) -c
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_HEADER = $(INSTALL_DATA)
|
||||
transform = @program_transform_name@
|
||||
NORMAL_INSTALL = :
|
||||
PRE_INSTALL = :
|
||||
POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
host_alias = @host_alias@
|
||||
host_triplet = @host@
|
||||
|
||||
EXEEXT = @EXEEXT@
|
||||
OBJEXT = @OBJEXT@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
AMTAR = @AMTAR@
|
||||
AS = @AS@
|
||||
AWK = @AWK@
|
||||
CC = @CC@
|
||||
DEPDIR = @DEPDIR@
|
||||
DLLTOOL = @DLLTOOL@
|
||||
DOX_DIR_HTML = @DOX_DIR_HTML@
|
||||
DOX_DIR_LATEX = @DOX_DIR_LATEX@
|
||||
DOX_DIR_MAN = @DOX_DIR_MAN@
|
||||
ECHO = @ECHO@
|
||||
ETR_SOCKET_LIBS = @ETR_SOCKET_LIBS@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
LIBTOOL = @LIBTOOL@
|
||||
LIBTOOL_DEPS = @LIBTOOL_DEPS@
|
||||
LNSL = @LNSL@
|
||||
LN_S = @LN_S@
|
||||
LSOCKET = @LSOCKET@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
MAINT = @MAINT@
|
||||
OBJDUMP = @OBJDUMP@
|
||||
PACKAGE = @PACKAGE@
|
||||
RANLIB = @RANLIB@
|
||||
STRIP = @STRIP@
|
||||
VERSION = @VERSION@
|
||||
am__include = @am__include@
|
||||
am__quote = @am__quote@
|
||||
install_sh = @install_sh@
|
||||
lib_LTLIBRARIES = libopm.la
|
||||
|
||||
libopm_la_SOURCES = compat.c compat.h config.c config.h inet.c inet.h \
|
||||
libopm.c libopm.h list.c list.h malloc.c malloc.h opm_common.h \
|
||||
opm_error.h opm.h opm_types.h proxy.c proxy.h setup.h
|
||||
|
||||
|
||||
include_HEADERS = opm.h opm_error.h opm_types.h opm_common.h
|
||||
|
||||
libopm_la_LIBADD = @ETR_SOCKET_LIBS@ @LTLIBOBJS@
|
||||
|
||||
noinst_PROGRAMS = test test_debug
|
||||
test_SOURCES = test.c
|
||||
test_LDADD = libopm.la compat.o @LIBOBJS@
|
||||
|
||||
|
||||
# An easier-to-debug version of test
|
||||
test_debug_SOURCES = test.c
|
||||
test_debug_LDADD = libopm.la compat.o @LIBOBJS@
|
||||
test_debug_LDFLAGS = -static
|
||||
subdir = src
|
||||
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
|
||||
CONFIG_HEADER = setup.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
LTLIBRARIES = $(lib_LTLIBRARIES)
|
||||
|
||||
libopm_la_LDFLAGS =
|
||||
libopm_la_DEPENDENCIES = @LTLIBOBJS@
|
||||
am_libopm_la_OBJECTS = compat.lo config.lo inet.lo libopm.lo list.lo \
|
||||
malloc.lo proxy.lo
|
||||
libopm_la_OBJECTS = $(am_libopm_la_OBJECTS)
|
||||
noinst_PROGRAMS = test$(EXEEXT) test_debug$(EXEEXT)
|
||||
PROGRAMS = $(noinst_PROGRAMS)
|
||||
|
||||
am_test_OBJECTS = test.$(OBJEXT)
|
||||
test_OBJECTS = $(am_test_OBJECTS)
|
||||
test_DEPENDENCIES = libopm.la compat.o @LIBOBJS@
|
||||
test_LDFLAGS =
|
||||
am_test_debug_OBJECTS = test.$(OBJEXT)
|
||||
test_debug_OBJECTS = $(am_test_debug_OBJECTS)
|
||||
test_debug_DEPENDENCIES = libopm.la compat.o @LIBOBJS@
|
||||
|
||||
DEFS = @DEFS@
|
||||
DEFAULT_INCLUDES = -I. -I$(srcdir) -I.
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBS = @LIBS@
|
||||
depcomp = $(SHELL) $(top_srcdir)/depcomp
|
||||
am__depfiles_maybe = depfiles
|
||||
@AMDEP_TRUE@DEP_FILES = $(DEPDIR)/snprintf.Plo $(DEPDIR)/snprintf.Po \
|
||||
@AMDEP_TRUE@ ./$(DEPDIR)/compat.Plo ./$(DEPDIR)/config.Plo \
|
||||
@AMDEP_TRUE@ ./$(DEPDIR)/inet.Plo ./$(DEPDIR)/libopm.Plo \
|
||||
@AMDEP_TRUE@ ./$(DEPDIR)/list.Plo ./$(DEPDIR)/malloc.Plo \
|
||||
@AMDEP_TRUE@ ./$(DEPDIR)/proxy.Plo ./$(DEPDIR)/test.Po
|
||||
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
|
||||
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
|
||||
LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) \
|
||||
$(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
|
||||
CCLD = $(CC)
|
||||
LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
|
||||
$(AM_LDFLAGS) $(LDFLAGS) -o $@
|
||||
CFLAGS = @CFLAGS@
|
||||
DIST_SOURCES = $(libopm_la_SOURCES) $(test_SOURCES) \
|
||||
$(test_debug_SOURCES)
|
||||
HEADERS = $(include_HEADERS)
|
||||
|
||||
DIST_COMMON = $(include_HEADERS) Makefile.am Makefile.in setup.h.in \
|
||||
snprintf.c
|
||||
SOURCES = $(libopm_la_SOURCES) $(test_SOURCES) $(test_debug_SOURCES)
|
||||
|
||||
all: setup.h
|
||||
$(MAKE) $(AM_MAKEFLAGS) all-am
|
||||
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .c .lo .o .obj
|
||||
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
|
||||
cd $(top_srcdir) && \
|
||||
$(AUTOMAKE) --gnu src/Makefile
|
||||
Makefile: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)
|
||||
|
||||
setup.h: stamp-h1
|
||||
@if test ! -f $@; then \
|
||||
rm -f stamp-h1; \
|
||||
$(MAKE) stamp-h1; \
|
||||
else :; fi
|
||||
|
||||
stamp-h1: $(srcdir)/setup.h.in $(top_builddir)/config.status
|
||||
@rm -f stamp-h1
|
||||
cd $(top_builddir) && $(SHELL) ./config.status src/setup.h
|
||||
|
||||
$(srcdir)/setup.h.in: @MAINTAINER_MODE_TRUE@ $(top_srcdir)/configure.in $(ACLOCAL_M4)
|
||||
cd $(top_srcdir) && $(AUTOHEADER)
|
||||
touch $(srcdir)/setup.h.in
|
||||
|
||||
distclean-hdr:
|
||||
-rm -f setup.h stamp-h1
|
||||
libLTLIBRARIES_INSTALL = $(INSTALL)
|
||||
install-libLTLIBRARIES: $(lib_LTLIBRARIES)
|
||||
@$(NORMAL_INSTALL)
|
||||
$(mkinstalldirs) $(DESTDIR)$(libdir)
|
||||
@list='$(lib_LTLIBRARIES)'; for p in $$list; do \
|
||||
if test -f $$p; then \
|
||||
f="`echo $$p | sed -e 's|^.*/||'`"; \
|
||||
echo " $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) $$p $(DESTDIR)$(libdir)/$$f"; \
|
||||
$(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) $$p $(DESTDIR)$(libdir)/$$f; \
|
||||
else :; fi; \
|
||||
done
|
||||
|
||||
uninstall-libLTLIBRARIES:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
@list='$(lib_LTLIBRARIES)'; for p in $$list; do \
|
||||
p="`echo $$p | sed -e 's|^.*/||'`"; \
|
||||
echo " $(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(libdir)/$$p"; \
|
||||
$(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(libdir)/$$p; \
|
||||
done
|
||||
|
||||
clean-libLTLIBRARIES:
|
||||
-test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES)
|
||||
@list='$(lib_LTLIBRARIES)'; for p in $$list; do \
|
||||
dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
|
||||
test -z "$dir" && dir=.; \
|
||||
echo "rm -f \"$${dir}/so_locations\""; \
|
||||
rm -f "$${dir}/so_locations"; \
|
||||
done
|
||||
libopm.la: $(libopm_la_OBJECTS) $(libopm_la_DEPENDENCIES)
|
||||
$(LINK) -rpath $(libdir) $(libopm_la_LDFLAGS) $(libopm_la_OBJECTS) $(libopm_la_LIBADD) $(LIBS)
|
||||
|
||||
clean-noinstPROGRAMS:
|
||||
@list='$(noinst_PROGRAMS)'; for p in $$list; do \
|
||||
f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
|
||||
echo " rm -f $$p $$f"; \
|
||||
rm -f $$p $$f ; \
|
||||
done
|
||||
test$(EXEEXT): $(test_OBJECTS) $(test_DEPENDENCIES)
|
||||
@rm -f test$(EXEEXT)
|
||||
$(LINK) $(test_LDFLAGS) $(test_OBJECTS) $(test_LDADD) $(LIBS)
|
||||
test_debug$(EXEEXT): $(test_debug_OBJECTS) $(test_debug_DEPENDENCIES)
|
||||
@rm -f test_debug$(EXEEXT)
|
||||
$(LINK) $(test_debug_LDFLAGS) $(test_debug_OBJECTS) $(test_debug_LDADD) $(LIBS)
|
||||
|
||||
mostlyclean-compile:
|
||||
-rm -f *.$(OBJEXT) core *.core
|
||||
|
||||
distclean-compile:
|
||||
-rm -f *.tab.c
|
||||
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/snprintf.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/snprintf.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/compat.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/config.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/inet.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libopm.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/list.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/malloc.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/proxy.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test.Po@am__quote@
|
||||
|
||||
distclean-depend:
|
||||
-rm -rf $(DEPDIR) ./$(DEPDIR)
|
||||
|
||||
.c.o:
|
||||
@AMDEP_TRUE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
$(COMPILE) -c `test -f '$<' || echo '$(srcdir)/'`$<
|
||||
|
||||
.c.obj:
|
||||
@AMDEP_TRUE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
$(COMPILE) -c `cygpath -w $<`
|
||||
|
||||
.c.lo:
|
||||
@AMDEP_TRUE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@ depfile='$(DEPDIR)/$*.Plo' tmpdepfile='$(DEPDIR)/$*.TPlo' @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
$(LTCOMPILE) -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<
|
||||
CCDEPMODE = @CCDEPMODE@
|
||||
|
||||
mostlyclean-libtool:
|
||||
-rm -f *.lo
|
||||
|
||||
clean-libtool:
|
||||
-rm -rf .libs _libs
|
||||
|
||||
distclean-libtool:
|
||||
-rm -f libtool
|
||||
uninstall-info-am:
|
||||
includeHEADERS_INSTALL = $(INSTALL_HEADER)
|
||||
install-includeHEADERS: $(include_HEADERS)
|
||||
@$(NORMAL_INSTALL)
|
||||
$(mkinstalldirs) $(DESTDIR)$(includedir)
|
||||
@list='$(include_HEADERS)'; for p in $$list; do \
|
||||
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
|
||||
f="`echo $$p | sed -e 's|^.*/||'`"; \
|
||||
echo " $(includeHEADERS_INSTALL) $$d$$p $(DESTDIR)$(includedir)/$$f"; \
|
||||
$(includeHEADERS_INSTALL) $$d$$p $(DESTDIR)$(includedir)/$$f; \
|
||||
done
|
||||
|
||||
uninstall-includeHEADERS:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
@list='$(include_HEADERS)'; for p in $$list; do \
|
||||
f="`echo $$p | sed -e 's|^.*/||'`"; \
|
||||
echo " rm -f $(DESTDIR)$(includedir)/$$f"; \
|
||||
rm -f $(DESTDIR)$(includedir)/$$f; \
|
||||
done
|
||||
|
||||
ETAGS = etags
|
||||
ETAGSFLAGS =
|
||||
|
||||
tags: TAGS
|
||||
|
||||
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
mkid -fID $$unique
|
||||
|
||||
TAGS: $(HEADERS) $(SOURCES) setup.h.in $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
tags=; \
|
||||
here=`pwd`; \
|
||||
list='$(SOURCES) $(HEADERS) setup.h.in $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
test -z "$(ETAGS_ARGS)$$tags$$unique" \
|
||||
|| $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||
$$tags $$unique
|
||||
|
||||
GTAGS:
|
||||
here=`$(am__cd) $(top_builddir) && pwd` \
|
||||
&& cd $(top_srcdir) \
|
||||
&& gtags -i $(GTAGS_ARGS) $$here
|
||||
|
||||
distclean-tags:
|
||||
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
|
||||
top_distdir = ..
|
||||
distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
@list='$(DISTFILES)'; for file in $$list; do \
|
||||
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
|
||||
dir="/$$dir"; \
|
||||
$(mkinstalldirs) "$(distdir)$$dir"; \
|
||||
else \
|
||||
dir=''; \
|
||||
fi; \
|
||||
if test -d $$d/$$file; then \
|
||||
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
|
||||
fi; \
|
||||
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
|
||||
else \
|
||||
test -f $(distdir)/$$file \
|
||||
|| cp -p $$d/$$file $(distdir)/$$file \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
check-am: all-am
|
||||
check: check-am
|
||||
all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) $(HEADERS) setup.h
|
||||
|
||||
installdirs:
|
||||
$(mkinstalldirs) $(DESTDIR)$(libdir) $(DESTDIR)$(includedir)
|
||||
|
||||
install: install-am
|
||||
install-exec: install-exec-am
|
||||
install-data: install-data-am
|
||||
uninstall: uninstall-am
|
||||
|
||||
install-am: all-am
|
||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||
|
||||
installcheck: installcheck-am
|
||||
install-strip:
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
INSTALL_STRIP_FLAG=-s \
|
||||
`test -z '$(STRIP)' || \
|
||||
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
|
||||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
|
||||
distclean-generic:
|
||||
-rm -f Makefile $(CONFIG_CLEAN_FILES)
|
||||
|
||||
maintainer-clean-generic:
|
||||
@echo "This command is intended for maintainers to use"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
clean: clean-am
|
||||
|
||||
clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \
|
||||
clean-noinstPROGRAMS mostlyclean-am
|
||||
|
||||
distclean: distclean-am
|
||||
|
||||
distclean-am: clean-am distclean-compile distclean-depend \
|
||||
distclean-generic distclean-hdr distclean-libtool \
|
||||
distclean-tags
|
||||
|
||||
dvi: dvi-am
|
||||
|
||||
dvi-am:
|
||||
|
||||
info: info-am
|
||||
|
||||
info-am:
|
||||
|
||||
install-data-am: install-includeHEADERS
|
||||
|
||||
install-exec-am: install-libLTLIBRARIES
|
||||
|
||||
install-info: install-info-am
|
||||
|
||||
install-man:
|
||||
|
||||
installcheck-am:
|
||||
|
||||
maintainer-clean: maintainer-clean-am
|
||||
|
||||
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||
|
||||
mostlyclean: mostlyclean-am
|
||||
|
||||
mostlyclean-am: mostlyclean-compile mostlyclean-generic \
|
||||
mostlyclean-libtool
|
||||
|
||||
uninstall-am: uninstall-includeHEADERS uninstall-info-am \
|
||||
uninstall-libLTLIBRARIES
|
||||
|
||||
.PHONY: GTAGS all all-am check check-am clean clean-generic \
|
||||
clean-libLTLIBRARIES clean-libtool clean-noinstPROGRAMS \
|
||||
distclean distclean-compile distclean-depend distclean-generic \
|
||||
distclean-hdr distclean-libtool distclean-tags distdir dvi \
|
||||
dvi-am info info-am install install-am install-data \
|
||||
install-data-am install-exec install-exec-am \
|
||||
install-includeHEADERS install-info install-info-am \
|
||||
install-libLTLIBRARIES install-man install-strip installcheck \
|
||||
installcheck-am installdirs maintainer-clean \
|
||||
maintainer-clean-generic mostlyclean mostlyclean-compile \
|
||||
mostlyclean-generic mostlyclean-libtool tags uninstall \
|
||||
uninstall-am uninstall-includeHEADERS uninstall-info-am \
|
||||
uninstall-libLTLIBRARIES
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
|
@ -1,70 +0,0 @@
|
|||
/* vim: set shiftwidth=3 softtabstop=3 expandtab: */
|
||||
|
||||
/*
|
||||
* Copyright (C) 2002 Andy Smith
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to
|
||||
*
|
||||
* The Free Software Foundation, Inc.
|
||||
* 59 Temple Place - Suite 330
|
||||
* Boston, MA 02111-1307, USA
|
||||
*/
|
||||
|
||||
#include "setup.h"
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#ifdef STDC_HEADERS
|
||||
# include <string.h>
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_INET_ATON
|
||||
# include <netinet/in.h>
|
||||
#endif
|
||||
|
||||
#include "compat.h"
|
||||
#include "opm.h"
|
||||
|
||||
RCSID("$Id: compat.c,v 1.3 2003/01/11 06:18:41 andy Exp $");
|
||||
|
||||
#ifndef HAVE_INET_ATON
|
||||
/*
|
||||
* An implementation of inet_aton for those systems that don't have it
|
||||
* (Solaris, ...)
|
||||
*/
|
||||
int libopm_inet_aton(const char *cp, struct in_addr *inp)
|
||||
{
|
||||
unsigned int a1, a2, a3, a4;
|
||||
unsigned long ret;
|
||||
|
||||
if (strcmp(cp, "255.255.255.255") == 0) {
|
||||
inp->s_addr = (unsigned) -1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (sscanf(cp, "%u.%u.%u.%u", &a1, &a2, &a3, &a4) != 4 ||
|
||||
a1 > 255 || a2 > 255 || a3 > 255 || a4 > 255) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
ret = (a1 << 24) | (a2 << 16) | (a3 << 8) | a4;
|
||||
|
||||
inp->s_addr = htonl(ret);
|
||||
|
||||
if (inp->s_addr == (unsigned) -1) {
|
||||
return 0;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
#endif
|
|
@ -1,29 +0,0 @@
|
|||
#ifndef COMPAT_H
|
||||
#define COMPAT_H
|
||||
|
||||
#ifndef INADDR_NONE
|
||||
#define INADDR_NONE 0xffffffff
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_INET_ATON
|
||||
#undef inet_aton
|
||||
#define inet_aton libopm_inet_aton
|
||||
extern int libopm_inet_aton(const char *cp, struct in_addr *inp);
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_SNPRINTF
|
||||
#undef snprintf
|
||||
#define snprintf libopm_snprintf
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_VSNPRINTF
|
||||
#undef vsnprintf
|
||||
#define vsnprintf libopm_vsnprintf
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_INET_PTON
|
||||
#undef inet_pton
|
||||
#define inet_pton libopm_inet_pton
|
||||
#endif
|
||||
|
||||
#endif
|
|
@ -1,264 +0,0 @@
|
|||
/*
|
||||
* Copyright (C) 2002 Erik Fears
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to
|
||||
*
|
||||
* The Free Software Foundation, Inc.
|
||||
* 59 Temple Place - Suite 330
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
#include "setup.h"
|
||||
|
||||
#include "malloc.h"
|
||||
#include "config.h"
|
||||
#include "inet.h"
|
||||
#include "opm_error.h"
|
||||
#include "opm_types.h"
|
||||
#include "opm_common.h"
|
||||
#include "list.h"
|
||||
|
||||
#ifdef STDC_HEADERS
|
||||
# include <string.h>
|
||||
#endif
|
||||
|
||||
RCSID("$Id: config.c,v 1.27 2003/06/20 04:18:44 andy Exp $");
|
||||
|
||||
static OPM_CONFIG_HASH_T HASH[] = {
|
||||
{OPM_CONFIG_FD_LIMIT, OPM_TYPE_INT},
|
||||
{OPM_CONFIG_BIND_IP , OPM_TYPE_ADDRESS},
|
||||
{OPM_CONFIG_DNSBL_HOST, OPM_TYPE_STRING},
|
||||
{OPM_CONFIG_TARGET_STRING, OPM_TYPE_STRINGLIST},
|
||||
{OPM_CONFIG_SCAN_IP, OPM_TYPE_STRING},
|
||||
{OPM_CONFIG_SCAN_PORT, OPM_TYPE_INT},
|
||||
{OPM_CONFIG_MAX_READ, OPM_TYPE_INT},
|
||||
{OPM_CONFIG_TIMEOUT, OPM_TYPE_INT},
|
||||
};
|
||||
|
||||
|
||||
/* config_create
|
||||
*
|
||||
* Create an OPM_CONFIG_T struct, set default values and return it
|
||||
*
|
||||
* Parameters:
|
||||
* None;
|
||||
*
|
||||
* Return:
|
||||
* Pointer to allocated OPM_CONFIG_T struct
|
||||
*/
|
||||
|
||||
OPM_CONFIG_T *libopm_config_create()
|
||||
{
|
||||
int num, i;
|
||||
OPM_CONFIG_T *ret;
|
||||
|
||||
num = sizeof(HASH) / sizeof(OPM_CONFIG_HASH_T);
|
||||
|
||||
ret = MyMalloc(sizeof(OPM_CONFIG_T));
|
||||
ret->vars = MyMalloc(sizeof(void *) * num);
|
||||
|
||||
|
||||
/* Set default config items. This in the future would be much better
|
||||
if it could set realistic defaults for each individual config item.
|
||||
|
||||
OPM_TYPE_INT = 0
|
||||
OPM_TYPE_STRING = ""
|
||||
OPM_TYPE_ADDRESS = 0.0.0.0
|
||||
OPM_TYPE_STRINGLIST = empty list
|
||||
*/
|
||||
|
||||
for(i = 0; i < num; i++)
|
||||
{
|
||||
switch(libopm_config_gettype(i))
|
||||
{
|
||||
case OPM_TYPE_INT:
|
||||
ret->vars[i] = MyMalloc(sizeof(int));
|
||||
*(int *) ret->vars[i] = 0;
|
||||
break;
|
||||
|
||||
case OPM_TYPE_STRING:
|
||||
(char *) ret->vars[i] = strdup("");
|
||||
break;
|
||||
|
||||
case OPM_TYPE_ADDRESS:
|
||||
(opm_sockaddr *) ret->vars[i] = MyMalloc(sizeof(opm_sockaddr));
|
||||
memset((opm_sockaddr *) ret->vars[i], 0, sizeof(opm_sockaddr));
|
||||
break;
|
||||
|
||||
case OPM_TYPE_STRINGLIST:
|
||||
(OPM_LIST_T *) ret->vars[i] = libopm_list_create();
|
||||
break;
|
||||
default:
|
||||
ret->vars[i] = NULL;
|
||||
}
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/* config_free
|
||||
*
|
||||
* Free config structure and clean up
|
||||
*
|
||||
* Parameters:
|
||||
* config: Structure to free/cleanup
|
||||
*
|
||||
* Return:
|
||||
* None
|
||||
*/
|
||||
|
||||
void libopm_config_free(OPM_CONFIG_T *config)
|
||||
{
|
||||
int num, i;
|
||||
OPM_NODE_T *p, *next;
|
||||
OPM_LIST_T *list;
|
||||
|
||||
num = sizeof(HASH) / sizeof(OPM_CONFIG_HASH_T);
|
||||
|
||||
for(i = 0; i < num; i++)
|
||||
{
|
||||
if(config->vars[i] == NULL)
|
||||
continue;
|
||||
|
||||
switch(libopm_config_gettype(i))
|
||||
{
|
||||
case OPM_TYPE_STRINGLIST:
|
||||
list = (OPM_LIST_T *) config->vars[i];
|
||||
LIST_FOREACH_SAFE(p, next, list->head)
|
||||
{
|
||||
MyFree(p->data);
|
||||
MyFree(p);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
MyFree(config->vars[i]);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
MyFree(config->vars);
|
||||
MyFree(config);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/* config_set
|
||||
*
|
||||
* Set configuration options on config struct.
|
||||
*
|
||||
* Parameters:
|
||||
* config: Config struct to set parameters on
|
||||
* key: Variable within the struct to set
|
||||
* value: Address of value to set
|
||||
*
|
||||
* Return:
|
||||
* 1: Variable was set
|
||||
* 0: Some error occured
|
||||
*/
|
||||
|
||||
OPM_ERR_T libopm_config_set(OPM_CONFIG_T *config, int key, void *value)
|
||||
{
|
||||
|
||||
int num;
|
||||
OPM_NODE_T *node;
|
||||
|
||||
num = sizeof(HASH) / sizeof(OPM_CONFIG_HASH_T);
|
||||
|
||||
if(key < 0 || key >= num)
|
||||
return OPM_ERR_BADKEY; /* Return appropriate error code eventually */
|
||||
|
||||
switch(libopm_config_gettype(key))
|
||||
{
|
||||
case OPM_TYPE_STRING:
|
||||
if((char *) config->vars[key] != NULL)
|
||||
MyFree(config->vars[key]);
|
||||
(char *) config->vars[key] = strdup((char *) value);
|
||||
break;
|
||||
|
||||
case OPM_TYPE_INT:
|
||||
*(int *) config->vars[key] = *(int *) value;
|
||||
break;
|
||||
|
||||
case OPM_TYPE_ADDRESS:
|
||||
if( inet_pton(AF_INET, (char *) value, &( ((opm_sockaddr *)config->vars[key])->sa4.sin_addr))
|
||||
<= 0)
|
||||
return OPM_ERR_BADVALUE; /* return appropriate err code */
|
||||
break;
|
||||
|
||||
case OPM_TYPE_STRINGLIST:
|
||||
node = libopm_node_create(strdup((char *) value));
|
||||
libopm_list_add((OPM_LIST_T *) config->vars[key], node);
|
||||
break;
|
||||
|
||||
default:
|
||||
return OPM_ERR_BADKEY; /* return appropriate err code */
|
||||
|
||||
}
|
||||
|
||||
return OPM_SUCCESS;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/* config_gettype
|
||||
*
|
||||
* Get type of key.
|
||||
*
|
||||
* Parameters:
|
||||
* key: Key to get type of.
|
||||
*
|
||||
* Return:
|
||||
* TYPE_? of key
|
||||
*/
|
||||
|
||||
int libopm_config_gettype(int key)
|
||||
{
|
||||
int num, i;
|
||||
|
||||
num = sizeof(HASH) / sizeof(OPM_CONFIG_HASH_T);
|
||||
|
||||
for(i = 0; i < num; i++)
|
||||
if(HASH[i].key == key)
|
||||
return HASH[i].type;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* config
|
||||
*
|
||||
* Retrieve a specific config variable from
|
||||
* an OPM_CONFIG_T struct. This is basically a
|
||||
* wrapper to extracting the variable from the
|
||||
* array.
|
||||
*
|
||||
* Parameters:
|
||||
* config: Config struct to extract from
|
||||
* key: Value to extract
|
||||
*
|
||||
* Return:
|
||||
* -ADDRESS- to extracted value in array. This address
|
||||
* will have to be cast on the return end to be any use.
|
||||
*/
|
||||
|
||||
void *libopm_config(OPM_CONFIG_T *config, int key)
|
||||
{
|
||||
return config->vars[key];
|
||||
}
|
|
@ -1,20 +0,0 @@
|
|||
#ifndef CONFIG_H
|
||||
#define CONFIG_H
|
||||
|
||||
#include "libopm.h"
|
||||
|
||||
typedef struct _opm_config_hash OPM_CONFIG_HASH_T;
|
||||
|
||||
struct _opm_config_hash {
|
||||
int key;
|
||||
int type;
|
||||
};
|
||||
|
||||
void libopm_config_free(OPM_CONFIG_T *);
|
||||
void *libopm_config(OPM_CONFIG_T *, int);
|
||||
int libopm_config_gettype(int);
|
||||
OPM_CONFIG_T *libopm_config_create(void);
|
||||
OPM_ERR_T libopm_config_set(OPM_CONFIG_T *, int , void *);
|
||||
|
||||
|
||||
#endif /* CONFIG_H */
|
|
@ -1,534 +0,0 @@
|
|||
/*
|
||||
Copyright (C) 2002 by the past and present ircd coders, and others.
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License
|
||||
as published by the Free Software Foundation; either version 2
|
||||
of the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to
|
||||
|
||||
The Free Software Foundation, Inc.
|
||||
59 Temple Place - Suite 330
|
||||
Boston, MA 02111-1307, USA.
|
||||
|
||||
*/
|
||||
|
||||
/*
|
||||
* This code is borrowed from ircd-hybrid version 7
|
||||
* -TimeMr14C
|
||||
*/
|
||||
|
||||
#include "setup.h"
|
||||
|
||||
#include <errno.h>
|
||||
#include <stdio.h>
|
||||
#include <assert.h>
|
||||
#if STDC_HEADERS
|
||||
# include <string.h>
|
||||
# include <stdlib.h>
|
||||
#endif
|
||||
#ifdef HAVE_STRINGS_H
|
||||
# include <strings.h>
|
||||
#endif
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
#include <netinet/in.h>
|
||||
#include <netdb.h>
|
||||
|
||||
#include "inet.h"
|
||||
#include "opm.h"
|
||||
|
||||
#ifndef INADDRSZ
|
||||
#define INADDRSZ 4
|
||||
#endif
|
||||
|
||||
#ifdef IPV6
|
||||
#ifndef IN6ADDRSZ
|
||||
#define IN6ADDRSZ 16
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
#ifndef INT16SZ
|
||||
#define INT16SZ 2
|
||||
#endif
|
||||
|
||||
#ifdef IPV6
|
||||
#define HOSTIPLEN 53
|
||||
#else
|
||||
#define HOSTIPLEN 15
|
||||
#endif
|
||||
|
||||
RCSID("$Id: inet.c,v 1.7 2003/06/20 04:18:44 andy Exp $");
|
||||
|
||||
extern const unsigned char ToLowerTab[];
|
||||
#define ToLower(c) (ToLowerTab[(unsigned char)(c)])
|
||||
|
||||
/*
|
||||
* From: Thomas Helvey <tomh@inxpress.net>
|
||||
*/
|
||||
#if 0
|
||||
static const char *IpQuadTab[] = {
|
||||
"0", "1", "2", "3", "4", "5", "6", "7", "8", "9",
|
||||
"10", "11", "12", "13", "14", "15", "16", "17", "18", "19",
|
||||
"20", "21", "22", "23", "24", "25", "26", "27", "28", "29",
|
||||
"30", "31", "32", "33", "34", "35", "36", "37", "38", "39",
|
||||
"40", "41", "42", "43", "44", "45", "46", "47", "48", "49",
|
||||
"50", "51", "52", "53", "54", "55", "56", "57", "58", "59",
|
||||
"60", "61", "62", "63", "64", "65", "66", "67", "68", "69",
|
||||
"70", "71", "72", "73", "74", "75", "76", "77", "78", "79",
|
||||
"80", "81", "82", "83", "84", "85", "86", "87", "88", "89",
|
||||
"90", "91", "92", "93", "94", "95", "96", "97", "98", "99",
|
||||
"100", "101", "102", "103", "104", "105", "106", "107", "108", "109",
|
||||
"110", "111", "112", "113", "114", "115", "116", "117", "118", "119",
|
||||
"120", "121", "122", "123", "124", "125", "126", "127", "128", "129",
|
||||
"130", "131", "132", "133", "134", "135", "136", "137", "138", "139",
|
||||
"140", "141", "142", "143", "144", "145", "146", "147", "148", "149",
|
||||
"150", "151", "152", "153", "154", "155", "156", "157", "158", "159",
|
||||
"160", "161", "162", "163", "164", "165", "166", "167", "168", "169",
|
||||
"170", "171", "172", "173", "174", "175", "176", "177", "178", "179",
|
||||
"180", "181", "182", "183", "184", "185", "186", "187", "188", "189",
|
||||
"190", "191", "192", "193", "194", "195", "196", "197", "198", "199",
|
||||
"200", "201", "202", "203", "204", "205", "206", "207", "208", "209",
|
||||
"210", "211", "212", "213", "214", "215", "216", "217", "218", "219",
|
||||
"220", "221", "222", "223", "224", "225", "226", "227", "228", "229",
|
||||
"230", "231", "232", "233", "234", "235", "236", "237", "238", "239",
|
||||
"240", "241", "242", "243", "244", "245", "246", "247", "248", "249",
|
||||
"250", "251", "252", "253", "254", "255"
|
||||
};
|
||||
#endif
|
||||
|
||||
/*
|
||||
* inetntoa - in_addr to string
|
||||
* changed name to remove collision possibility and
|
||||
* so behaviour is guaranteed to take a pointer arg.
|
||||
* -avalon 23/11/92
|
||||
* inet_ntoa -- returned the dotted notation of a given
|
||||
* internet number
|
||||
* argv 11/90).
|
||||
* inet_ntoa -- its broken on some Ultrix/Dynix too. -avalon
|
||||
*
|
||||
* XXX - Again not used anywhere?
|
||||
* -grifferz
|
||||
*/
|
||||
|
||||
#if 0
|
||||
static char *inetntoa(char *in)
|
||||
{
|
||||
static char buf[16];
|
||||
register char *bufptr = buf;
|
||||
register const unsigned char *a = (const unsigned char *) in;
|
||||
register const char *n;
|
||||
|
||||
n = IpQuadTab[*a++];
|
||||
while (*n)
|
||||
*bufptr++ = *n++;
|
||||
*bufptr++ = '.';
|
||||
n = IpQuadTab[*a++];
|
||||
while (*n)
|
||||
*bufptr++ = *n++;
|
||||
*bufptr++ = '.';
|
||||
n = IpQuadTab[*a++];
|
||||
while (*n)
|
||||
*bufptr++ = *n++;
|
||||
*bufptr++ = '.';
|
||||
n = IpQuadTab[*a];
|
||||
while (*n)
|
||||
*bufptr++ = *n++;
|
||||
*bufptr = '\0';
|
||||
return buf;
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Copyright (c) 1996-1999 by Internet Software Consortium.
|
||||
*
|
||||
* Permission to use, copy, modify, and distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
* copyright notice and this permission notice appear in all copies.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
|
||||
* ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
|
||||
* CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
|
||||
* DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
|
||||
* PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
|
||||
* ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
|
||||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
/*
|
||||
* WARNING: Don't even consider trying to compile this on a system where
|
||||
* sizeof(int) < 4. sizeof(int) > 4 is fine; all the world's not a VAX.
|
||||
*/
|
||||
|
||||
/*
|
||||
* XXX - this does not seem to be used anywhere currently.
|
||||
* -grifferz
|
||||
*/
|
||||
#if 0
|
||||
static const char *inet_ntop4(const u_char *src, char *dst, unsigned int size);
|
||||
#endif
|
||||
|
||||
#ifdef IPV6
|
||||
static const char *inet_ntop6(const u_char *src, char *dst, unsigned int size);
|
||||
#endif
|
||||
|
||||
/* const char *
|
||||
* inet_ntop4(src, dst, size)
|
||||
* format an IPv4 address
|
||||
* return:
|
||||
* `dst' (as a const)
|
||||
* notes:
|
||||
* (1) uses no statics
|
||||
* (2) takes a u_char* not an in_addr as input
|
||||
* author:
|
||||
* Paul Vixie, 1996.
|
||||
*
|
||||
* XXX - this does not seem to be used anywhere currently.
|
||||
* -grifferz
|
||||
*/
|
||||
#if 0
|
||||
static const char *inet_ntop4(const unsigned char *src, char *dst, unsigned int size)
|
||||
{
|
||||
if (size < 15)
|
||||
return NULL;
|
||||
return strcpy(dst, inetntoa((char *) src));
|
||||
}
|
||||
#endif
|
||||
|
||||
/* const char *
|
||||
* inet_ntop6(src, dst, size)
|
||||
* convert IPv6 binary address into presentation (printable) format
|
||||
* author:
|
||||
* Paul Vixie, 1996.
|
||||
*/
|
||||
#ifdef IPV6
|
||||
static const char *inet_ntop6(const unsigned char *src, char *dst, unsigned int size)
|
||||
{
|
||||
/*
|
||||
* Note that int32_t and int16_t need only be "at least" large enough
|
||||
* to contain a value of the specified size. On some systems, like
|
||||
* Crays, there is no such thing as an integer variable with 16 bits.
|
||||
* Keep this in mind if you think this function should have been coded
|
||||
* to use pointer overlays. All the world's not a VAX.
|
||||
*/
|
||||
char tmp[sizeof "ffff:ffff:ffff:ffff:ffff:ffff:255.255.255.255"], *tp;
|
||||
struct {
|
||||
int base, len;
|
||||
} best, cur;
|
||||
u_int words[IN6ADDRSZ / INT16SZ];
|
||||
int i;
|
||||
|
||||
/*
|
||||
* Preprocess:
|
||||
* Copy the input (bytewise) array into a wordwise array.
|
||||
* Find the longest run of 0x00's in src[] for :: shorthanding.
|
||||
*/
|
||||
memset(words, '\0', sizeof words);
|
||||
for (i = 0; i < IN6ADDRSZ; i += 2)
|
||||
words[i / 2] = (src[i] << 8) | src[i + 1];
|
||||
best.base = -1;
|
||||
cur.base = -1;
|
||||
for (i = 0; i < (IN6ADDRSZ / INT16SZ); i++) {
|
||||
if (words[i] == 0) {
|
||||
if (cur.base == -1)
|
||||
cur.base = i, cur.len = 1;
|
||||
else
|
||||
cur.len++;
|
||||
} else {
|
||||
if (cur.base != -1) {
|
||||
if (best.base == -1 || cur.len > best.len)
|
||||
best = cur;
|
||||
cur.base = -1;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (cur.base != -1) {
|
||||
if (best.base == -1 || cur.len > best.len)
|
||||
best = cur;
|
||||
}
|
||||
if (best.base != -1 && best.len < 2)
|
||||
best.base = -1;
|
||||
|
||||
/*
|
||||
* Format the result.
|
||||
*/
|
||||
tp = tmp;
|
||||
for (i = 0; i < (IN6ADDRSZ / INT16SZ); i++) {
|
||||
/* Are we inside the best run of 0x00's? */
|
||||
if (best.base != -1 && i >= best.base && i < (best.base + best.len)) {
|
||||
if (i == best.base)
|
||||
*tp++ = ':';
|
||||
continue;
|
||||
}
|
||||
/* Are we following an initial run of 0x00s or any real hex? */
|
||||
if (i != 0)
|
||||
*tp++ = ':';
|
||||
/* Is this address an encapsulated IPv4? */
|
||||
if (i == 6 && best.base == 0 && (best.len == 6 || (best.len == 5 && words[5] == 0xffff))) {
|
||||
if (!inet_ntop4(src + 12, tp, sizeof tmp - (tp - tmp)))
|
||||
return (NULL);
|
||||
tp += strlen(tp);
|
||||
break;
|
||||
}
|
||||
tp += sprintf(tp, "%x", words[i]);
|
||||
}
|
||||
/* Was it a trailing run of 0x00's? */
|
||||
if (best.base != -1 && (best.base + best.len) == (IN6ADDRSZ / INT16SZ))
|
||||
*tp++ = ':';
|
||||
|
||||
*tp++ = '\0';
|
||||
|
||||
/*
|
||||
* Check for overflow, copy, and we're done.
|
||||
*/
|
||||
|
||||
if ((tp - tmp) > size) {
|
||||
return (NULL);
|
||||
}
|
||||
return strcpy(dst, tmp);
|
||||
}
|
||||
#endif
|
||||
|
||||
#if 0
|
||||
|
||||
/*
|
||||
* This code doesn't seem to be used anywhere currently?
|
||||
* -grifferz
|
||||
*/
|
||||
|
||||
/* char *
|
||||
* inetntop(af, src, dst, size)
|
||||
* convert a network format address to presentation format.
|
||||
* return:
|
||||
* pointer to presentation format address (`dst'), or NULL (see errno).
|
||||
* author:
|
||||
* Paul Vixie, 1996.
|
||||
*/
|
||||
const char *inetntop(int af, const void *src, char *dst, unsigned int size)
|
||||
{
|
||||
switch (af) {
|
||||
case AF_INET:
|
||||
return (inet_ntop4(src, dst, size));
|
||||
#ifdef IPV6
|
||||
case AF_INET6:
|
||||
if (IN6_IS_ADDR_V4MAPPED((const struct in6_addr *) src) ||
|
||||
IN6_IS_ADDR_V4COMPAT((const struct in6_addr *) src))
|
||||
return (inet_ntop4
|
||||
((unsigned char *) &((struct in6_addr *) src)->s6_addr[12], dst, size));
|
||||
else
|
||||
return (inet_ntop6(src, dst, size));
|
||||
|
||||
#endif
|
||||
default:
|
||||
return (NULL);
|
||||
}
|
||||
/* NOTREACHED */
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* WARNING: Don't even consider trying to compile this on a system where
|
||||
* sizeof(int) < 4. sizeof(int) > 4 is fine; all the world's not a VAX.
|
||||
*/
|
||||
|
||||
/* int
|
||||
* inet_pton(af, src, dst)
|
||||
* convert from presentation format (which usually means ASCII printable)
|
||||
* to network format (which is usually some kind of binary format).
|
||||
* return:
|
||||
* 1 if the address was valid for the specified address family
|
||||
* 0 if the address wasn't valid (`dst' is untouched in this case)
|
||||
* -1 if some other error occurred (`dst' is untouched in this case, too)
|
||||
* author:
|
||||
* Paul Vixie, 1996.
|
||||
*/
|
||||
|
||||
/* int
|
||||
* inet_pton4(src, dst)
|
||||
* like inet_aton() but without all the hexadecimal and shorthand.
|
||||
* return:
|
||||
* 1 if `src' is a valid dotted quad, else 0.
|
||||
* notice:
|
||||
* does not touch `dst' unless it's returning 1.
|
||||
* author:
|
||||
* Paul Vixie, 1996.
|
||||
*/
|
||||
|
||||
#ifndef HAVE_INET_PTON
|
||||
|
||||
static int inet_pton4(src, dst)
|
||||
const char *src;
|
||||
unsigned char *dst;
|
||||
{
|
||||
int saw_digit, octets, ch;
|
||||
unsigned char tmp[INADDRSZ], *tp;
|
||||
|
||||
saw_digit = 0;
|
||||
octets = 0;
|
||||
*(tp = tmp) = 0;
|
||||
while ((ch = *src++) != '\0') {
|
||||
|
||||
if (ch >= '0' && ch <= '9') {
|
||||
unsigned int new = *tp * 10 + (ch - '0');
|
||||
|
||||
if (new > 255)
|
||||
return (0);
|
||||
*tp = new;
|
||||
if (!saw_digit) {
|
||||
if (++octets > 4)
|
||||
return (0);
|
||||
saw_digit = 1;
|
||||
}
|
||||
} else if (ch == '.' && saw_digit) {
|
||||
if (octets == 4)
|
||||
return (0);
|
||||
*++tp = 0;
|
||||
saw_digit = 0;
|
||||
} else
|
||||
return (0);
|
||||
}
|
||||
if (octets < 4)
|
||||
return (0);
|
||||
memcpy(dst, tmp, INADDRSZ);
|
||||
return (1);
|
||||
}
|
||||
|
||||
#ifdef IPV6
|
||||
/* int
|
||||
* inet_pton6(src, dst)
|
||||
* convert presentation level address to network order binary form.
|
||||
* return:
|
||||
* 1 if `src' is a valid [RFC1884 2.2] address, else 0.
|
||||
* notice:
|
||||
* (1) does not touch `dst' unless it's returning 1.
|
||||
* (2) :: in a full address is silently ignored.
|
||||
* credit:
|
||||
* inspired by Mark Andrews.
|
||||
* author:
|
||||
* Paul Vixie, 1996.
|
||||
*/
|
||||
|
||||
static int inet_pton6(src, dst)
|
||||
const char *src;
|
||||
unsigned char *dst;
|
||||
{
|
||||
static const char xdigits[] = "0123456789abcdef";
|
||||
unsigned char tmp[IN6ADDRSZ], *tp, *endp, *colonp;
|
||||
const char *curtok;
|
||||
int ch, saw_xdigit;
|
||||
unsigned int val;
|
||||
|
||||
tp = memset(tmp, '\0', IN6ADDRSZ);
|
||||
endp = tp + IN6ADDRSZ;
|
||||
colonp = NULL;
|
||||
/* Leading :: requires some special handling. */
|
||||
if (*src == ':')
|
||||
if (*++src != ':')
|
||||
return (0);
|
||||
curtok = src;
|
||||
saw_xdigit = 0;
|
||||
val = 0;
|
||||
while ((ch = ToLower(*src++)) != '\0') {
|
||||
const char *pch;
|
||||
|
||||
pch = strchr(xdigits, ch);
|
||||
if (pch != NULL) {
|
||||
val <<= 4;
|
||||
val |= (pch - xdigits);
|
||||
if (val > 0xffff)
|
||||
return (0);
|
||||
saw_xdigit = 1;
|
||||
continue;
|
||||
}
|
||||
if (ch == ':') {
|
||||
curtok = src;
|
||||
if (!saw_xdigit) {
|
||||
if (colonp)
|
||||
return (0);
|
||||
colonp = tp;
|
||||
continue;
|
||||
} else if (*src == '\0') {
|
||||
return (0);
|
||||
}
|
||||
if (tp + INT16SZ > endp)
|
||||
return (0);
|
||||
*tp++ = (unsigned char) (val >> 8) & 0xff;
|
||||
*tp++ = (unsigned char) val & 0xff;
|
||||
saw_xdigit = 0;
|
||||
val = 0;
|
||||
continue;
|
||||
}
|
||||
|
||||
if (*src != '\0' && ch == '.') {
|
||||
if (((tp + INADDRSZ) <= endp) && inet_pton4(curtok, tp) > 0) {
|
||||
tp += INADDRSZ;
|
||||
saw_xdigit = 0;
|
||||
break; /* '\0' was seen by inet_pton4(). */
|
||||
}
|
||||
} else
|
||||
continue;
|
||||
return (0);
|
||||
}
|
||||
if (saw_xdigit) {
|
||||
if (tp + INT16SZ > endp)
|
||||
return (0);
|
||||
*tp++ = (unsigned char) (val >> 8) & 0xff;
|
||||
*tp++ = (unsigned char) val & 0xff;
|
||||
}
|
||||
if (colonp != NULL) {
|
||||
/*
|
||||
* Since some memmove()'s erroneously fail to handle
|
||||
* overlapping regions, we'll do the shift by hand.
|
||||
*/
|
||||
const int n = tp - colonp;
|
||||
int i;
|
||||
|
||||
if (tp == endp)
|
||||
return (0);
|
||||
for (i = 1; i <= n; i++) {
|
||||
endp[-i] = colonp[n - i];
|
||||
colonp[n - i] = 0;
|
||||
}
|
||||
tp = endp;
|
||||
}
|
||||
if (tp != endp)
|
||||
return (0);
|
||||
memcpy(dst, tmp, IN6ADDRSZ);
|
||||
return (1);
|
||||
}
|
||||
#endif /* IPv6 */
|
||||
|
||||
int inet_pton(af, src, dst)
|
||||
int af;
|
||||
const char *src;
|
||||
void *dst;
|
||||
{
|
||||
switch (af) {
|
||||
case AF_INET:
|
||||
return (inet_pton4(src, dst));
|
||||
#ifdef IPV6
|
||||
case AF_INET6:
|
||||
/* Somebody might have passed as an IPv4 address this is sick but it works */
|
||||
if (inet_pton4(src, dst)) {
|
||||
char tmp[HOSTIPLEN];
|
||||
sprintf(tmp, "::ffff:%s", src);
|
||||
return (inet_pton6(tmp, dst));
|
||||
} else
|
||||
return (inet_pton6(src, dst));
|
||||
#endif /* IPv6 */
|
||||
default:
|
||||
return (-1);
|
||||
}
|
||||
/* NOTREACHED */
|
||||
}
|
||||
|
||||
#endif
|
|
@ -1,40 +0,0 @@
|
|||
#ifndef INET_H
|
||||
#define INET_H
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
#include <netinet/in.h>
|
||||
#include <arpa/inet.h>
|
||||
#include <netdb.h>
|
||||
#ifdef HAVE_FCNTL_H
|
||||
# include <fcntl.h>
|
||||
#endif
|
||||
#include <sys/types.h>
|
||||
|
||||
#ifdef HAVE_SYS_POLL_H
|
||||
# include <sys/poll.h>
|
||||
#endif
|
||||
|
||||
#ifndef AF_INET6
|
||||
# define AF_INET6 10
|
||||
#endif
|
||||
|
||||
typedef struct _opm_sockaddr opm_sockaddr;
|
||||
typedef struct _opm_inaddr opm_inaddr;
|
||||
|
||||
struct _opm_sockaddr {
|
||||
struct sockaddr_in sa4;
|
||||
};
|
||||
|
||||
struct _opm_inaddr {
|
||||
struct in_addr in4;
|
||||
};
|
||||
|
||||
#ifndef HAVE_INET_PTON
|
||||
extern int inet_pton(int, const char *, void *);
|
||||
#endif
|
||||
extern const char *inetntop(int, const void *, char *, unsigned int);
|
||||
extern struct hostent *opm_gethostbyname(const char *);
|
||||
|
||||
|
||||
#endif /* INET_H */
|
1432
libopm/src/libopm.c
1432
libopm/src/libopm.c
File diff suppressed because it is too large
Load diff
|
@ -1,58 +0,0 @@
|
|||
#ifndef LIBOPM_H
|
||||
#define LIBOPM_H
|
||||
|
||||
#include "config.h"
|
||||
#include "inet.h"
|
||||
#include "opm_common.h"
|
||||
#include "opm.h"
|
||||
|
||||
#define CBLEN 5 /* Number of callback functions */
|
||||
#define READBUFLEN 128 /* Size of conn->readbuf */
|
||||
#define SENDBUFLEN 512 /* Size of sendbuffer in proxy.c */
|
||||
|
||||
typedef struct _OPM_SCAN OPM_SCAN_T;
|
||||
typedef struct _OPM_CONNECTION OPM_CONNECTION_T;
|
||||
typedef struct _OPM_PROTOCOL_CONFIG OPM_PROTOCOL_CONFIG_T;
|
||||
typedef struct _OPM_PROTOCOL OPM_PROTOCOL_T;
|
||||
|
||||
/* Types of hard coded proxy READ/WRITE functions which are
|
||||
setup in a table in libopm.c */
|
||||
|
||||
typedef int OPM_PROXYWRITE_T (OPM_T *, OPM_SCAN_T *, OPM_CONNECTION_T *);
|
||||
typedef int OPM_PROXYREAD_T (OPM_T *, OPM_SCAN_T *, OPM_CONNECTION_T *);
|
||||
|
||||
struct _OPM_SCAN {
|
||||
opm_sockaddr addr; /* Address in byte order of remote client */
|
||||
OPM_REMOTE_T *remote; /* Pointed to the OPM_REMOTE_T for this scan, passed by client */
|
||||
OPM_LIST_T *connections; /* List of individual connections of this scan (1 for each protocol) */
|
||||
};
|
||||
|
||||
struct _OPM_CONNECTION {
|
||||
|
||||
OPM_PROTOCOL_T *protocol; /* Pointer to specific protocol this connection handles */
|
||||
unsigned short int port; /* Some protocols have multiple ports, eg. HTTP */
|
||||
|
||||
int fd; /* Allocated file descriptor, 0 if not yet allocated */
|
||||
unsigned short int bytes_read; /* Bytes read so far in this connection */
|
||||
char readbuf[READBUFLEN + 1]; /* 128 byte read buffer, anything over 128 is probably not of use */
|
||||
unsigned short int readlen; /* Length of readbuf */
|
||||
unsigned short int state; /* State of connection */
|
||||
time_t creation; /* When this connection was established */
|
||||
};
|
||||
|
||||
struct _OPM_PROTOCOL_CONFIG
|
||||
{
|
||||
OPM_PROTOCOL_T *type; /* Protocol type */
|
||||
unsigned short int port; /* Port to connect on */
|
||||
|
||||
};
|
||||
|
||||
struct _OPM_PROTOCOL
|
||||
{
|
||||
int type; /* Protocol type */
|
||||
|
||||
OPM_PROXYWRITE_T *write_function; /* Write function handler for this protocol */
|
||||
OPM_PROXYREAD_T *read_function; /* Read function handler for this protocol */
|
||||
};
|
||||
|
||||
#endif /* LIBOPM_H */
|
|
@ -1,119 +0,0 @@
|
|||
/*
|
||||
* Copyright (C) 2002-2003 Erik Fears
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to
|
||||
*
|
||||
* The Free Software Foundation, Inc.
|
||||
* 59 Temple Place - Suite 330
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
#include "setup.h"
|
||||
|
||||
#include "opm_common.h"
|
||||
#include "list.h"
|
||||
#include "malloc.h"
|
||||
#include "opm.h"
|
||||
|
||||
RCSID("$Id: list.c,v 1.11 2003/06/27 18:51:02 strtok Exp $");
|
||||
|
||||
OPM_NODE_T *libopm_node_create(void *data)
|
||||
{
|
||||
OPM_NODE_T *node = MyMalloc(sizeof *node);
|
||||
node->next = NULL;
|
||||
node->prev = NULL;
|
||||
node->data = (void *) data;
|
||||
|
||||
return node;
|
||||
}
|
||||
|
||||
OPM_LIST_T *libopm_list_create()
|
||||
{
|
||||
OPM_LIST_T *list = MyMalloc(sizeof *list);
|
||||
|
||||
list->head = NULL;
|
||||
list->tail = NULL;
|
||||
|
||||
list->elements = 0;
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
OPM_NODE_T *libopm_list_add(OPM_LIST_T *list, OPM_NODE_T *node)
|
||||
{
|
||||
|
||||
if(list == NULL || node == NULL)
|
||||
return NULL;
|
||||
|
||||
if(list->tail == NULL)
|
||||
{
|
||||
list->head = node;
|
||||
list->tail = node;
|
||||
|
||||
node->next = NULL;
|
||||
node->prev = NULL;
|
||||
}
|
||||
else
|
||||
{
|
||||
node->prev = list->tail;
|
||||
list->tail->next = node;
|
||||
list->tail = node;
|
||||
node->next = NULL;
|
||||
}
|
||||
|
||||
list->elements++;
|
||||
return node;
|
||||
}
|
||||
|
||||
OPM_NODE_T *libopm_list_remove(OPM_LIST_T *list, OPM_NODE_T *node)
|
||||
{
|
||||
|
||||
if(list == NULL || node == NULL)
|
||||
return NULL;
|
||||
|
||||
if(node == list->head)
|
||||
{
|
||||
list->head = node->next;
|
||||
|
||||
if(node->next)
|
||||
node->next->prev = NULL;
|
||||
else
|
||||
list->tail = NULL;
|
||||
}
|
||||
else if(node == list->tail)
|
||||
{
|
||||
list->tail = list->tail->prev;
|
||||
list->tail->next = NULL;
|
||||
}
|
||||
else
|
||||
{
|
||||
node->prev->next = node->next;
|
||||
node->next->prev = node->prev;
|
||||
}
|
||||
|
||||
list->elements--;
|
||||
return node;
|
||||
}
|
||||
|
||||
void libopm_list_free(OPM_LIST_T *list)
|
||||
{
|
||||
MyFree(list);
|
||||
}
|
||||
|
||||
void libopm_node_free(OPM_NODE_T *node)
|
||||
{
|
||||
MyFree(node);
|
||||
}
|
|
@ -1,42 +0,0 @@
|
|||
#ifndef LIST_H
|
||||
#define LIST_H
|
||||
|
||||
|
||||
/* Copyright (C) 2002 by the past and present ircd coders, and others.
|
||||
* Adapted from Hybrid7 DLINK macros
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to
|
||||
*
|
||||
* The Free Software Foundation, Inc.
|
||||
* 59 Temple Place - Suite 330
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*
|
||||
*/
|
||||
|
||||
#define LIST_FOREACH(pos, head) for (pos = (head); pos != NULL; pos = pos->next)
|
||||
#define LIST_FOREACH_SAFE(pos, n, head) for (pos = (head), n = pos ? pos->next : NULL; pos != NULL; pos = n, n = pos ? pos->next : NULL)
|
||||
#define LIST_FOREACH_PREV(pos, head) for (pos = (head); pos != NULL; pos = pos->prev)
|
||||
#define LIST_SIZE(list) list->elements
|
||||
/* End Copyright */
|
||||
|
||||
OPM_NODE_T *libopm_node_create(void *);
|
||||
OPM_LIST_T *libopm_list_create(void);
|
||||
|
||||
OPM_NODE_T *libopm_list_add(OPM_LIST_T *, OPM_NODE_T *);
|
||||
OPM_NODE_T *libopm_list_remove(OPM_LIST_T *, OPM_NODE_T *);
|
||||
|
||||
void libopm_list_free(OPM_LIST_T *);
|
||||
void libopm_node_free(OPM_NODE_T *);
|
||||
|
||||
#endif /* LIST_H */
|
|
@ -1,10 +0,0 @@
|
|||
#!/bin/sh
|
||||
gcc -g -o libopm.o -c libopm.c
|
||||
gcc -g -o malloc.o -c malloc.c
|
||||
gcc -g -o list.o -c list.c
|
||||
gcc -g -o config.o -c config.c
|
||||
gcc -g -o inet.o -c inet.c
|
||||
gcc -g -o proxy.o -c proxy.c
|
||||
ar rcs libopm.a libopm.o malloc.o list.o config.o inet.o proxy.o
|
||||
gcc -g test.c -o test -L. -lopm
|
||||
|
|
@ -1,72 +0,0 @@
|
|||
/*
|
||||
* Copyright (C) 2002 Erik Fears
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to
|
||||
*
|
||||
* The Free Software Foundation, Inc.
|
||||
* 59 Temple Place - Suite 330
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
#include <assert.h>
|
||||
#include "setup.h"
|
||||
|
||||
#include "malloc.h"
|
||||
#include "opm.h"
|
||||
|
||||
RCSID("$Id: malloc.c,v 1.10 2002/11/07 20:19:06 strtok Exp $");
|
||||
|
||||
|
||||
/* MyMalloc
|
||||
*
|
||||
* A wrapper function for malloc(), for catching memory issues
|
||||
* and error handling.
|
||||
*
|
||||
* Parameters
|
||||
* bytes: amount in bytes to allocate
|
||||
*
|
||||
* Return:
|
||||
* Pointer to allocated memory
|
||||
*/
|
||||
|
||||
void *libopm_MyMalloc(size_t bytes)
|
||||
{
|
||||
void *ret = calloc(1, bytes);
|
||||
|
||||
assert(ret);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* MyFree
|
||||
*
|
||||
* Free memory allocated with MyMalloc
|
||||
*
|
||||
* Parameters:
|
||||
* var: pointer to memory to free
|
||||
*
|
||||
* Return:
|
||||
* None
|
||||
*/
|
||||
|
||||
void libopm_MyFree(void **var)
|
||||
{
|
||||
if(*var != NULL)
|
||||
free(*var);
|
||||
*var = NULL;
|
||||
}
|
|
@ -1,16 +0,0 @@
|
|||
#ifndef MALLOC_H
|
||||
#define MALLOC_H
|
||||
|
||||
#include "setup.h"
|
||||
|
||||
#ifdef STDC_HEADERS
|
||||
# include <stdlib.h>
|
||||
#endif
|
||||
|
||||
#define MyMalloc(SIZE) libopm_MyMalloc(SIZE)
|
||||
#define MyFree(X) libopm_MyFree((void **) &X)
|
||||
|
||||
void *libopm_MyMalloc(size_t bytes);
|
||||
void libopm_MyFree(void **var);
|
||||
|
||||
#endif /* MALLOC_H */
|
|
@ -1,80 +0,0 @@
|
|||
/* vim: set shiftwidth=3 softtabstop=3 expandtab: */
|
||||
|
||||
/** \file opm.h
|
||||
* \brief Main header for libopm.
|
||||
* \author Erik Fears
|
||||
* \version $Id: opm.h,v 1.26 2003/06/20 04:18:44 andy Exp $
|
||||
*/
|
||||
|
||||
#ifndef OPM_H
|
||||
#define OPM_H
|
||||
|
||||
#include "opm_common.h"
|
||||
|
||||
/* Stuff to shut up warnings about rcsid being unused. */
|
||||
#define USE_VAR(var) static char sizeof##var = sizeof(sizeof##var) + sizeof(var)
|
||||
/* RCS tag. */
|
||||
#define RCSID(x) static char rcsid[] = x; USE_VAR(rcsid);
|
||||
|
||||
|
||||
typedef struct _OPM_CONFIG OPM_CONFIG_T;
|
||||
typedef struct _OPM OPM_T;
|
||||
typedef struct _OPM_REMOTE OPM_REMOTE_T;
|
||||
typedef struct _OPM_CALLBACK OPM_CALLBACK_T;
|
||||
|
||||
typedef int OPM_ERR_T;
|
||||
|
||||
typedef void OPM_CALLBACK_FUNC (OPM_T *, OPM_REMOTE_T *, int, void *);
|
||||
|
||||
struct _OPM_CALLBACK {
|
||||
OPM_CALLBACK_FUNC *func;
|
||||
void *data;
|
||||
};
|
||||
|
||||
struct _OPM_CONFIG {
|
||||
void **vars;
|
||||
};
|
||||
|
||||
struct _OPM {
|
||||
OPM_CONFIG_T *config; /* Individual scanner configuration */
|
||||
OPM_LIST_T *queue; /* List of scans in the queue (not yet established) */
|
||||
OPM_LIST_T *scans; /* List of scans (each scan containing a list of connections) */
|
||||
OPM_LIST_T *protocols; /* List of protocols this scanner handles */
|
||||
unsigned int fd_use; /* Number of file descriptors in use */
|
||||
|
||||
OPM_CALLBACK_T *callbacks; /* Scanner wide callbacks */
|
||||
};
|
||||
|
||||
struct _OPM_REMOTE {
|
||||
|
||||
char *ip; /* Readable IP address */
|
||||
|
||||
unsigned short int port; /* Port passed back on certain callbacks */
|
||||
unsigned short int protocol; /* Protocol passed back on certain callbacks */
|
||||
unsigned short int bytes_read; /* Bytes read passed back on certain callbacks */
|
||||
|
||||
OPM_LIST_T *protocols; /* Remote specific protocols */
|
||||
|
||||
void *data; /* Arbitrary data that the client can point to for any purpose*/
|
||||
};
|
||||
|
||||
OPM_T *opm_create(void);
|
||||
void opm_free(OPM_T *);
|
||||
|
||||
OPM_REMOTE_T *opm_remote_create(const char *);
|
||||
void opm_remote_free(OPM_REMOTE_T *);
|
||||
|
||||
OPM_ERR_T opm_config(OPM_T *, int, void *);
|
||||
OPM_ERR_T opm_scan(OPM_T *, OPM_REMOTE_T *);
|
||||
void opm_end(OPM_T *, OPM_REMOTE_T *);
|
||||
void opm_endscan(OPM_T *, OPM_REMOTE_T *);
|
||||
|
||||
OPM_ERR_T opm_addtype(OPM_T *, int, unsigned short int);
|
||||
OPM_ERR_T opm_remote_addtype(OPM_REMOTE_T *, int, unsigned short int);
|
||||
OPM_ERR_T opm_callback(OPM_T *, int, OPM_CALLBACK_FUNC *, void *);
|
||||
|
||||
void opm_cycle(OPM_T *);
|
||||
|
||||
size_t opm_active(OPM_T *);
|
||||
|
||||
#endif /* OPM_H */
|
|
@ -1,24 +0,0 @@
|
|||
#ifndef OPM_COMMON_H
|
||||
#define OPM_COMMON_H
|
||||
|
||||
typedef struct _libopm_node OPM_NODE_T;
|
||||
typedef struct _libopm_list OPM_LIST_T;
|
||||
|
||||
|
||||
struct _libopm_list {
|
||||
|
||||
struct _libopm_node *head;
|
||||
struct _libopm_node *tail;
|
||||
|
||||
int elements;
|
||||
};
|
||||
|
||||
struct _libopm_node {
|
||||
|
||||
struct _libopm_node *next;
|
||||
struct _libopm_node *prev;
|
||||
|
||||
void *data;
|
||||
};
|
||||
|
||||
#endif /* OPM_COMMON_H */
|
|
@ -1,26 +0,0 @@
|
|||
#ifndef LIBOPM_ERROR_H
|
||||
#define LIBOPM_ERROR_H
|
||||
|
||||
/* Success */
|
||||
#define OPM_SUCCESS 1
|
||||
|
||||
/* Configuration Errors */
|
||||
#define OPM_ERR_BADKEY 2 /* Unknown or bad key value */
|
||||
#define OPM_ERR_BADVALUE 3 /* Bad value matching key */
|
||||
#define OPM_ERR_BADPROTOCOL 4 /* Unknown protocol in config */
|
||||
|
||||
/* Read Errors */
|
||||
#define OPM_ERR_MAX_READ 5 /* Socket reached MAX_READ */
|
||||
|
||||
/* Callback Registration Errors */
|
||||
#define OPM_ERR_CBNOTFOUND 6 /* Callback is out of range */
|
||||
|
||||
/* opm_scan errors */
|
||||
#define OPM_ERR_BADADDR 7 /* IP in remote struct is bad */
|
||||
#define OPM_ERR_NOPROTOCOLS 8 /* No protocols to scan! */
|
||||
|
||||
/* bind/connect errors */
|
||||
#define OPM_ERR_BIND 9 /* Error binding to BIND_IP */
|
||||
#define OPM_ERR_NOFD 10/* Unable to allocate file descriptor */
|
||||
|
||||
#endif /* LIBOPM_ERROR_H */
|
|
@ -1,44 +0,0 @@
|
|||
#ifndef OPM_TYPES_H
|
||||
#define OPM_TYPES_H
|
||||
|
||||
/* Configuration Directives */
|
||||
#define OPM_CONFIG_FD_LIMIT 0
|
||||
#define OPM_CONFIG_BIND_IP 1
|
||||
#define OPM_CONFIG_DNSBL_HOST 2
|
||||
#define OPM_CONFIG_TARGET_STRING 3
|
||||
#define OPM_CONFIG_SCAN_IP 4
|
||||
#define OPM_CONFIG_SCAN_PORT 5
|
||||
#define OPM_CONFIG_MAX_READ 6
|
||||
#define OPM_CONFIG_TIMEOUT 7
|
||||
|
||||
/* Configuration Variable Types */
|
||||
#define OPM_TYPE_INT 1
|
||||
#define OPM_TYPE_STRING 2
|
||||
#define OPM_TYPE_ADDRESS 3
|
||||
#define OPM_TYPE_STRINGLIST 4
|
||||
|
||||
/* Protocols */
|
||||
#define OPM_TYPE_HTTP 1
|
||||
#define OPM_TYPE_SOCKS4 2
|
||||
#define OPM_TYPE_SOCKS5 3
|
||||
#define OPM_TYPE_WINGATE 4
|
||||
#define OPM_TYPE_ROUTER 5
|
||||
#define OPM_TYPE_HTTPPOST 6
|
||||
|
||||
/* States */
|
||||
#define OPM_STATE_UNESTABLISHED 1
|
||||
#define OPM_STATE_ESTABLISHED 2
|
||||
#define OPM_STATE_NEGSENT 3
|
||||
#define OPM_STATE_CLOSED 4
|
||||
|
||||
|
||||
/* Callbacks -- If more callback types are added,
|
||||
CBLEN will need to be changed in libopm.h accordingly */
|
||||
|
||||
#define OPM_CALLBACK_OPENPROXY 0 /* An open proxy has been found REMOTE/SCANNER */
|
||||
#define OPM_CALLBACK_NEGFAIL 1 /* Negotiation to a proxy has failed REMOTE/SCANNER */
|
||||
#define OPM_CALLBACK_END 2 /* A scan has ended REMOTE/SCANNER */
|
||||
#define OPM_CALLBACK_ERROR 3 /* An unrecoverable error has occured */
|
||||
#define OPM_CALLBACK_TIMEOUT 4 /* Specific scan (protocol) on host has timed out */
|
||||
|
||||
#endif /* OPM_TYPES_H */
|
|
@ -1,243 +0,0 @@
|
|||
/* vim: set shiftwidth=3 softtabstop=3 expandtab: */
|
||||
|
||||
/* Copyright (C) 2002 Erik Fears
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to
|
||||
*
|
||||
* The Free Software Foundation, Inc.
|
||||
* 59 Temple Place - Suite 330
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
#include "setup.h"
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#ifdef STDC_HEADERS
|
||||
# include <stdlib.h>
|
||||
# include <string.h>
|
||||
#endif
|
||||
|
||||
#include "inet.h"
|
||||
#include "compat.h"
|
||||
#include "config.h"
|
||||
#include "proxy.h"
|
||||
#include "opm_common.h"
|
||||
#include "opm_types.h"
|
||||
#include "opm_error.h"
|
||||
#include "libopm.h"
|
||||
|
||||
RCSID("$Id: proxy.c,v 1.16 2003/06/21 04:27:32 andy Exp $");
|
||||
|
||||
static char SENDBUF[SENDBUFLEN + 1];
|
||||
|
||||
int libopm_proxy_http_write(OPM_T *scanner, OPM_SCAN_T *scan, OPM_CONNECTION_T *conn)
|
||||
{
|
||||
USE_VAR(scan);
|
||||
|
||||
snprintf(SENDBUF, SENDBUFLEN, "CONNECT %s:%d HTTP/1.0\r\n\r\n",
|
||||
(char *) libopm_config(scanner->config, OPM_CONFIG_SCAN_IP),
|
||||
*(int *) libopm_config(scanner->config, OPM_CONFIG_SCAN_PORT));
|
||||
|
||||
if(send(conn->fd, SENDBUF, strlen(SENDBUF), 0) == -1)
|
||||
return 0; /* Return error code ? */
|
||||
|
||||
return OPM_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* CONNECT request byte order for socks4
|
||||
*
|
||||
* +----+----+----+----+----+----+----+----+----+----+....+----+
|
||||
* | VN | CD | DSTPORT | DSTIP | USERID |NULL|
|
||||
* +----+----+----+----+----+----+----+----+----+----+....+----+
|
||||
* # of bytes: 1 1 2 4 variable 1
|
||||
*
|
||||
* VN = Version, CD = Command Code (1 is connect request)
|
||||
*/
|
||||
|
||||
int libopm_proxy_socks4_write(OPM_T *scanner, OPM_SCAN_T *scan, OPM_CONNECTION_T *conn)
|
||||
{
|
||||
struct in_addr addr;
|
||||
unsigned long laddr;
|
||||
int len, scan_port;
|
||||
char *scan_ip;
|
||||
USE_VAR(scan);
|
||||
|
||||
scan_ip = (char *) libopm_config(scanner->config, OPM_CONFIG_SCAN_IP);
|
||||
scan_port = *(int *) libopm_config(scanner->config, OPM_CONFIG_SCAN_PORT);
|
||||
|
||||
laddr = htonl(addr.s_addr);
|
||||
|
||||
len = snprintf(SENDBUF, SENDBUFLEN, "%c%c%c%c%c%c%c%c%c", 4, 1,
|
||||
(((unsigned short) scan_port) >> 8) & 0xFF,
|
||||
(((unsigned short) scan_port) & 0xFF),
|
||||
(char) (laddr >> 24) & 0xFF, (char) (laddr >> 16) & 0xFF,
|
||||
(char) (laddr >> 8) & 0xFF, (char) laddr & 0xFF, 0);
|
||||
|
||||
send(conn->fd, SENDBUF, (unsigned int)len, 0);
|
||||
|
||||
return OPM_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Send version authentication selection message to socks5
|
||||
*
|
||||
* +----+----------+----------+
|
||||
* |VER | NMETHODS | METHODS |
|
||||
* +----+----------+----------+
|
||||
* | 1 | 1 | 1 to 255 |
|
||||
* +----+----------+----------+
|
||||
*
|
||||
* VER always contains 5, for socks version 5
|
||||
* Method 0 is 'No authentication required'
|
||||
*
|
||||
*
|
||||
*
|
||||
* The SOCKS request is formed as follows:
|
||||
*
|
||||
* +----+-----+-------+------+----------+----------+
|
||||
* |VER | CMD | RSV | ATYP | DST.ADDR | DST.PORT |
|
||||
* +----+-----+-------+------+----------+----------+
|
||||
* | 1 | 1 | X'00' | 1 | Variable | 2 |
|
||||
* +----+-----+-------+------+----------+----------+
|
||||
*
|
||||
*
|
||||
* o VER protocol version: X'05'
|
||||
* o CMD
|
||||
* o CONNECT X'01'
|
||||
* o BIND X'02'
|
||||
* o UDP ASSOCIATE X'03'
|
||||
* o RSV RESERVED
|
||||
* o ATYP address type of following address
|
||||
* o IP V4 address: X'01'
|
||||
* o DOMAINNAME: X'03'
|
||||
* o IP V6 address: X'04'
|
||||
* o DST.ADDR desired destination address
|
||||
* o DST.PORT desired destination port in network octet
|
||||
* order
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
int libopm_proxy_socks5_write(OPM_T *scanner, OPM_SCAN_T *scan, OPM_CONNECTION_T *conn)
|
||||
{
|
||||
struct in_addr addr;
|
||||
unsigned long laddr;
|
||||
int len, scan_port;
|
||||
char *scan_ip;
|
||||
USE_VAR(scan);
|
||||
|
||||
scan_ip = (char *) libopm_config(scanner->config, OPM_CONFIG_SCAN_IP);
|
||||
scan_port = *(int *) libopm_config(scanner->config, OPM_CONFIG_SCAN_PORT);
|
||||
|
||||
laddr = htonl(addr.s_addr);
|
||||
|
||||
/* Form authentication string */
|
||||
/* Version 5, 1 number of methods, 0 method (no auth). */
|
||||
len = snprintf(SENDBUF, SENDBUFLEN, "%c%c%c", 5, 1, 0);
|
||||
send(conn->fd, SENDBUF, (unsigned int)len, 0);
|
||||
|
||||
/* Form request string */
|
||||
|
||||
/* Will need to write ipv6 support here in future
|
||||
* as socks5 is ipv6 compatible
|
||||
*/
|
||||
len = snprintf(SENDBUF, SENDBUFLEN, "%c%c%c%c%c%c%c%c%c%c", 5, 1, 0, 1,
|
||||
(char) (laddr >> 24) & 0xFF, (char) (laddr >> 16) & 0xFF,
|
||||
(char) (laddr >> 8) & 0xFF, (char) laddr & 0xFF,
|
||||
(((unsigned short) scan_port) >> 8) & 0xFF,
|
||||
(((unsigned short) scan_port) & 0xFF));
|
||||
|
||||
send(conn->fd, SENDBUF, (unsigned int)len, 0);
|
||||
|
||||
return OPM_SUCCESS;
|
||||
}
|
||||
|
||||
/*
|
||||
* Open wingates require no authentication, they will send a prompt when
|
||||
* connect.
|
||||
*/
|
||||
|
||||
int libopm_proxy_wingate_write(OPM_T *scanner, OPM_SCAN_T *scan, OPM_CONNECTION_T *conn)
|
||||
{
|
||||
int scan_port, len;
|
||||
char *scan_ip;
|
||||
USE_VAR(scan);
|
||||
|
||||
scan_ip = (char *) libopm_config(scanner->config, OPM_CONFIG_SCAN_IP);
|
||||
scan_port = *(int *) libopm_config(scanner->config, OPM_CONFIG_SCAN_PORT);
|
||||
|
||||
len = snprintf(SENDBUF, SENDBUFLEN, "%s:%d\r\n", scan_ip, scan_port);
|
||||
send(conn->fd, SENDBUF, (unsigned int)len, 0);
|
||||
|
||||
return OPM_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Cisco scanning
|
||||
*
|
||||
* Some cisco routers have 'cisco' set as password which allow open telnet
|
||||
* relay. Attempt to connect using cisco as a password, then give command for
|
||||
* telnet to the scanip/scanport
|
||||
*/
|
||||
|
||||
int libopm_proxy_router_write(OPM_T *scanner, OPM_SCAN_T *scan, OPM_CONNECTION_T *conn)
|
||||
{
|
||||
int len, scan_port;
|
||||
char *scan_ip;
|
||||
USE_VAR(scan);
|
||||
|
||||
scan_ip = (char *) libopm_config(scanner->config, OPM_CONFIG_SCAN_IP);
|
||||
scan_port = *(int *) libopm_config(scanner->config, OPM_CONFIG_SCAN_PORT);
|
||||
|
||||
len = snprintf(SENDBUF, SENDBUFLEN, "cisco\r\n");
|
||||
send(conn->fd, SENDBUF, (unsigned int)len, 0);
|
||||
|
||||
len = snprintf(SENDBUF, SENDBUFLEN, "telnet %s %d\r\n", scan_ip, scan_port);
|
||||
send(conn->fd, SENDBUF, (unsigned int)len, 0);
|
||||
|
||||
return OPM_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* HTTP POST Scanning
|
||||
*
|
||||
*/
|
||||
|
||||
int libopm_proxy_httppost_write(OPM_T *scanner, OPM_SCAN_T *scan, OPM_CONNECTION_T *conn)
|
||||
{
|
||||
int len, scan_port;
|
||||
char *scan_ip;
|
||||
USE_VAR(scan);
|
||||
|
||||
scan_ip = (char *) libopm_config(scanner->config, OPM_CONFIG_SCAN_IP);
|
||||
scan_port = *(int *) libopm_config(scanner->config, OPM_CONFIG_SCAN_PORT);
|
||||
|
||||
len = snprintf(SENDBUF, SENDBUFLEN, "POST http://%s:%d/ HTTP/1.0\r\n"
|
||||
"Content-type: text/plain\r\n"
|
||||
"Content-length: 5\r\n\r\n"
|
||||
"quit\r\n\r\n",
|
||||
scan_ip, scan_port);
|
||||
|
||||
send(conn->fd, SENDBUF, (unsigned int)len, 0);
|
||||
|
||||
return OPM_SUCCESS;
|
||||
}
|
|
@ -1,14 +0,0 @@
|
|||
#ifndef PROXY_H
|
||||
#define PROXY_H
|
||||
|
||||
#include "libopm.h"
|
||||
|
||||
int libopm_proxy_http_write(OPM_T *, OPM_SCAN_T *, OPM_CONNECTION_T *);
|
||||
int libopm_proxy_socks4_write(OPM_T *, OPM_SCAN_T *, OPM_CONNECTION_T *);
|
||||
int libopm_proxy_socks5_write(OPM_T *, OPM_SCAN_T *, OPM_CONNECTION_T *);
|
||||
int libopm_proxy_wingate_write(OPM_T *, OPM_SCAN_T *, OPM_CONNECTION_T *);
|
||||
int libopm_proxy_router_write(OPM_T *, OPM_SCAN_T *, OPM_CONNECTION_T *);
|
||||
int libopm_proxy_httppost_write(OPM_T *, OPM_SCAN_T *, OPM_CONNECTION_T *);
|
||||
|
||||
|
||||
#endif /* PROXY_H */
|
|
@ -1,101 +0,0 @@
|
|||
/* src/setup.h.in. Generated from configure.in by autoheader. */
|
||||
|
||||
/* Define to 1 if you have the <dlfcn.h> header file. */
|
||||
#undef HAVE_DLFCN_H
|
||||
|
||||
/* Define to 1 if you have the <fcntl.h> header file. */
|
||||
#undef HAVE_FCNTL_H
|
||||
|
||||
/* Define to 1 if you have the `gethostbyname' function. */
|
||||
#undef HAVE_GETHOSTBYNAME
|
||||
|
||||
/* Define to 1 if you have the `gethostbyname2' function. */
|
||||
#undef HAVE_GETHOSTBYNAME2
|
||||
|
||||
/* Define to 1 if you have the `inet_aton' function. */
|
||||
#undef HAVE_INET_ATON
|
||||
|
||||
/* Define to 1 if you have the `inet_pton' function. */
|
||||
#undef HAVE_INET_PTON
|
||||
|
||||
/* Define to 1 if you have the <inttypes.h> header file. */
|
||||
#undef HAVE_INTTYPES_H
|
||||
|
||||
/* Define to 1 if you have the <memory.h> header file. */
|
||||
#undef HAVE_MEMORY_H
|
||||
|
||||
/* Define to 1 if you have the `select' function. */
|
||||
#undef HAVE_SELECT
|
||||
|
||||
/* Define to 1 if you have the `snprintf' function. */
|
||||
#undef HAVE_SNPRINTF
|
||||
|
||||
/* Define to 1 if you have the <stdint.h> header file. */
|
||||
#undef HAVE_STDINT_H
|
||||
|
||||
/* Define to 1 if you have the <stdlib.h> header file. */
|
||||
#undef HAVE_STDLIB_H
|
||||
|
||||
/* Define to 1 if you have the <strings.h> header file. */
|
||||
#undef HAVE_STRINGS_H
|
||||
|
||||
/* Define to 1 if you have the <string.h> header file. */
|
||||
#undef HAVE_STRING_H
|
||||
|
||||
/* Define to 1 if you have the <sys/poll.h> header file. */
|
||||
#undef HAVE_SYS_POLL_H
|
||||
|
||||
/* Define to 1 if you have the <sys/stat.h> header file. */
|
||||
#undef HAVE_SYS_STAT_H
|
||||
|
||||
/* Define to 1 if you have the <sys/time.h> header file. */
|
||||
#undef HAVE_SYS_TIME_H
|
||||
|
||||
/* Define to 1 if you have the <sys/types.h> header file. */
|
||||
#undef HAVE_SYS_TYPES_H
|
||||
|
||||
/* Define to 1 if you have the <unistd.h> header file. */
|
||||
#undef HAVE_UNISTD_H
|
||||
|
||||
/* Define to 1 if you have the `vsnprintf' function. */
|
||||
#undef HAVE_VSNPRINTF
|
||||
|
||||
/* Name of package */
|
||||
#undef PACKAGE
|
||||
|
||||
/* Define to the address where bug reports for this package should be sent. */
|
||||
#undef PACKAGE_BUGREPORT
|
||||
|
||||
/* Define to the full name of this package. */
|
||||
#undef PACKAGE_NAME
|
||||
|
||||
/* Define to the full name and version of this package. */
|
||||
#undef PACKAGE_STRING
|
||||
|
||||
/* Define to the one symbol short name of this package. */
|
||||
#undef PACKAGE_TARNAME
|
||||
|
||||
/* Define to the version of this package. */
|
||||
#undef PACKAGE_VERSION
|
||||
|
||||
/* "enable replacement (v)snprintf if system (v)snprintf is broken" */
|
||||
#undef PREFER_PORTABLE_SNPRINTF
|
||||
|
||||
/* Define to 1 if you have the ANSI C header files. */
|
||||
#undef STDC_HEADERS
|
||||
|
||||
/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
|
||||
#undef TIME_WITH_SYS_TIME
|
||||
|
||||
/* Version number of package */
|
||||
#undef VERSION
|
||||
|
||||
/* Define to 1 if your processor stores words with the most significant byte
|
||||
first (like Motorola and SPARC, unlike Intel and VAX). */
|
||||
#undef WORDS_BIGENDIAN
|
||||
|
||||
/* Define to empty if `const' does not conform to ANSI C. */
|
||||
#undef const
|
||||
|
||||
/* Define to `unsigned' if <sys/types.h> does not define. */
|
||||
#undef size_t
|
File diff suppressed because it is too large
Load diff
|
@ -1,34 +0,0 @@
|
|||
#ifndef _PORTABLE_SNPRINTF_H_
|
||||
#define _PORTABLE_SNPRINTF_H_
|
||||
#include <stddef.h>
|
||||
#include <stdarg.h>
|
||||
|
||||
#define PORTABLE_SNPRINTF_VERSION_MAJOR 2
|
||||
#define PORTABLE_SNPRINTF_VERSION_MINOR 2
|
||||
|
||||
#ifdef HAVE_SNPRINTF
|
||||
#include <stdio.h>
|
||||
#else
|
||||
extern int libopm_snprintf(char *, size_t, const char *, /*args*/ ...);
|
||||
extern int libopm_vsnprintf(char *, size_t, const char *, va_list);
|
||||
#undef snprintf
|
||||
#undef vsnprintf
|
||||
#define snprintf libopm_snprintf
|
||||
#define vsnprintf libopm_vsnprintf
|
||||
#endif
|
||||
|
||||
#if defined(HAVE_SNPRINTF) && defined(PREFER_PORTABLE_SNPRINTF)
|
||||
extern int portable_snprintf(char *str, size_t str_m, const char *fmt, /*args*/ ...);
|
||||
extern int portable_vsnprintf(char *str, size_t str_m, const char *fmt, va_list ap);
|
||||
#undef snprintf
|
||||
#undef vsnprintf
|
||||
#define snprintf portable_snprintf
|
||||
#define vsnprintf portable_vsnprintf
|
||||
#endif
|
||||
|
||||
extern int asprintf (char **ptr, const char *fmt, /*args*/ ...);
|
||||
extern int vasprintf (char **ptr, const char *fmt, va_list ap);
|
||||
extern int asnprintf (char **ptr, size_t str_m, const char *fmt, /*args*/ ...);
|
||||
extern int vasnprintf(char **ptr, size_t str_m, const char *fmt, va_list ap);
|
||||
|
||||
#endif
|
|
@ -1,224 +0,0 @@
|
|||
/*
|
||||
* Copyright (C) 2002 Erik Fears
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to
|
||||
*
|
||||
* The Free Software Foundation, Inc.
|
||||
* 59 Temple Place - Suite 330
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
#include "setup.h"
|
||||
|
||||
#include <stdio.h>
|
||||
#include "opm.h"
|
||||
#include "opm_error.h"
|
||||
#include "opm_types.h"
|
||||
#include "compat.h"
|
||||
#ifdef HAVE_UNISTD_H
|
||||
# include <unistd.h>
|
||||
#endif
|
||||
|
||||
RCSID("$Id: test.c,v 1.36 2003/06/20 04:55:14 andy Exp $");
|
||||
|
||||
#define ARRAY_SIZEOF(x) (sizeof(x) / sizeof((x)[0]))
|
||||
|
||||
void open_proxy(OPM_T *, OPM_REMOTE_T *, int, void *);
|
||||
void negotiation_failed(OPM_T *, OPM_REMOTE_T *, int, void *);
|
||||
void timeout(OPM_T *, OPM_REMOTE_T *, int, void *);
|
||||
void end(OPM_T *, OPM_REMOTE_T *, int, void *);
|
||||
void handle_error(OPM_T *, OPM_REMOTE_T *, int, void *);
|
||||
|
||||
int complete = 0;
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
OPM_ERR_T err;
|
||||
int fdlimit = 1024;
|
||||
int scan_port = 6667;
|
||||
int max_read = 4096;
|
||||
int scantimeout = 10;
|
||||
unsigned int i, s;
|
||||
|
||||
unsigned short http_ports[] = {
|
||||
8000, 8080, 3128, 80
|
||||
};
|
||||
|
||||
unsigned short wingate_ports[] = {
|
||||
23
|
||||
};
|
||||
|
||||
unsigned short router_ports[] = {
|
||||
23
|
||||
};
|
||||
|
||||
unsigned short socks4_ports[] = {
|
||||
1080
|
||||
};
|
||||
|
||||
unsigned short socks5_ports[] = {
|
||||
1080
|
||||
};
|
||||
|
||||
unsigned short httppost_ports[] = {
|
||||
80, 8090, 3128
|
||||
};
|
||||
|
||||
OPM_T *scanner;
|
||||
OPM_REMOTE_T *remote;
|
||||
|
||||
scanner = opm_create();
|
||||
|
||||
if(argc >= 2)
|
||||
remote = opm_remote_create(argv[1]);
|
||||
else
|
||||
remote = opm_remote_create("127.0.0.1");
|
||||
|
||||
/* Setup callbacks */
|
||||
opm_callback(scanner, OPM_CALLBACK_OPENPROXY, &open_proxy, NULL);
|
||||
opm_callback(scanner, OPM_CALLBACK_NEGFAIL, &negotiation_failed, NULL);
|
||||
opm_callback(scanner, OPM_CALLBACK_TIMEOUT, &timeout, NULL);
|
||||
opm_callback(scanner, OPM_CALLBACK_END, &end, NULL);
|
||||
opm_callback(scanner, OPM_CALLBACK_ERROR, &handle_error, NULL);
|
||||
|
||||
|
||||
/* Setup the scanner configuration */
|
||||
opm_config(scanner, OPM_CONFIG_FD_LIMIT, &fdlimit);
|
||||
opm_config(scanner, OPM_CONFIG_SCAN_IP, "216.175.104.202");
|
||||
opm_config(scanner, OPM_CONFIG_SCAN_PORT, &scan_port);
|
||||
opm_config(scanner, OPM_CONFIG_TARGET_STRING, "*** Looking up your hostname...");
|
||||
opm_config(scanner, OPM_CONFIG_TARGET_STRING, "ERROR :Trying to reconnect too fast.");
|
||||
opm_config(scanner, OPM_CONFIG_TIMEOUT, &scantimeout);
|
||||
opm_config(scanner, OPM_CONFIG_MAX_READ, &max_read);
|
||||
|
||||
/* Setup the protocol configuration */
|
||||
for (s = ARRAY_SIZEOF(http_ports), i = 0; i < s; i++) {
|
||||
opm_addtype(scanner, OPM_TYPE_HTTP, http_ports[i]);
|
||||
}
|
||||
|
||||
for (s = ARRAY_SIZEOF(wingate_ports), i = 0; i < s; i++) {
|
||||
opm_addtype(scanner, OPM_TYPE_WINGATE, wingate_ports[i]);
|
||||
}
|
||||
|
||||
for (s = ARRAY_SIZEOF(router_ports), i = 0; i < s; i++) {
|
||||
opm_addtype(scanner, OPM_TYPE_ROUTER, router_ports[i]);
|
||||
}
|
||||
|
||||
for (s = ARRAY_SIZEOF(socks4_ports), i = 0; i < s; i++) {
|
||||
opm_addtype(scanner, OPM_TYPE_SOCKS4, socks4_ports[i]);
|
||||
}
|
||||
|
||||
for (s = ARRAY_SIZEOF(socks5_ports), i = 0; i < s; i++) {
|
||||
opm_addtype(scanner, OPM_TYPE_SOCKS5, socks5_ports[i]);
|
||||
}
|
||||
|
||||
for (s = ARRAY_SIZEOF(httppost_ports), i = 0; i < s; i++) {
|
||||
opm_addtype(scanner, OPM_TYPE_HTTPPOST, httppost_ports[i]);
|
||||
}
|
||||
|
||||
/* Remote structs can also have their own extended protocol configurations. For instance
|
||||
if the target hostname contains strings such as 'proxy' or 'www', extended ports could
|
||||
be scanned. */
|
||||
opm_remote_addtype(remote, OPM_TYPE_HTTP, 8001);
|
||||
opm_remote_addtype(remote, OPM_TYPE_HTTP, 8002);
|
||||
|
||||
switch(err = opm_scan(scanner, remote))
|
||||
{
|
||||
case OPM_SUCCESS:
|
||||
break;
|
||||
case OPM_ERR_BADADDR:
|
||||
printf("Bad address\n");
|
||||
opm_free(scanner);
|
||||
opm_remote_free(remote);
|
||||
return 0;
|
||||
default:
|
||||
printf("Unknown Error %d\n", err);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
while(!complete)
|
||||
opm_cycle(scanner);
|
||||
|
||||
opm_free(scanner);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
void open_proxy(OPM_T *scanner, OPM_REMOTE_T *remote, int notused,
|
||||
void *data)
|
||||
{
|
||||
USE_VAR(notused);
|
||||
USE_VAR(data);
|
||||
|
||||
printf("Open proxy on %s:%d [%d bytes read]\n", remote->ip,
|
||||
remote->port, remote->bytes_read);
|
||||
opm_end(scanner, remote);
|
||||
}
|
||||
|
||||
void negotiation_failed(OPM_T *scanner, OPM_REMOTE_T *remote, int notused,
|
||||
void *data)
|
||||
{
|
||||
USE_VAR(scanner);
|
||||
USE_VAR(notused);
|
||||
USE_VAR(data);
|
||||
|
||||
printf("Negotiation on %s:%d failed [%d bytes read]\n", remote->ip,
|
||||
remote->port, remote->bytes_read);
|
||||
}
|
||||
|
||||
void timeout(OPM_T *scanner, OPM_REMOTE_T *remote, int notused, void *data)
|
||||
{
|
||||
USE_VAR(scanner);
|
||||
USE_VAR(notused);
|
||||
USE_VAR(data);
|
||||
|
||||
printf("Negotiation timed out on %s:%d\n", remote->ip, remote->port);
|
||||
}
|
||||
|
||||
void end(OPM_T *scanner, OPM_REMOTE_T *remote, int notused, void *data)
|
||||
{
|
||||
USE_VAR(scanner);
|
||||
USE_VAR(notused);
|
||||
USE_VAR(data);
|
||||
|
||||
printf("Scan on %s has ended\n", remote->ip);
|
||||
opm_remote_free(remote);
|
||||
complete = 1;
|
||||
}
|
||||
|
||||
void handle_error(OPM_T *scanner, OPM_REMOTE_T *remote, int err, void *data)
|
||||
{
|
||||
USE_VAR(scanner);
|
||||
USE_VAR(data);
|
||||
|
||||
switch(err)
|
||||
{
|
||||
case OPM_ERR_MAX_READ:
|
||||
printf("Reached MAX READ on %s:%d\n", remote->ip, remote->port);
|
||||
break;
|
||||
case OPM_ERR_BIND:
|
||||
printf("Unable to bind for %s:%d\n", remote->ip, remote->port);
|
||||
break;
|
||||
case OPM_ERR_NOFD:
|
||||
printf("Unable to allocate file descriptor for %s:%d\n",
|
||||
remote->ip, remote->port);
|
||||
break;
|
||||
default:
|
||||
printf("Unknown error on %s:%d, err = %d\n", remote->ip,
|
||||
remote->port, err);
|
||||
}
|
||||
}
|
Reference in a new issue