mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-12-24 16:49:39 -05:00
remove old files
This commit is contained in:
parent
2a869f5a99
commit
cbb281cc4e
61 changed files with 0 additions and 10810 deletions
|
|
@ -1,38 +0,0 @@
|
|||
#-----------------------------------------------------------------------------
|
||||
# Copyright (c) 1994 Regents of the University of Michigan.
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms are permitted
|
||||
# provided that this notice is preserved and that due credit is given
|
||||
# to the University of Michigan at Ann Arbor. The name of the University
|
||||
# may not be used to endorse or promote products derived from this
|
||||
# software without specific prior written permission. This software
|
||||
# is provided ``as is'' without express or implied warranty.
|
||||
#
|
||||
# LDAP buildtools makefile
|
||||
#
|
||||
#-----------------------------------------------------------------------------
|
||||
|
||||
all: FORCE
|
||||
@if [ ! -z "$(NEEDUNPROTO)" ]; then \
|
||||
cd unproto; $(MAKE) $(MFLAGS) CC="$(CC)"; \
|
||||
else \
|
||||
exit 0; \
|
||||
fi
|
||||
|
||||
install: FORCE
|
||||
|
||||
clean:
|
||||
cd unproto; $(MAKE) $(MFLAGS) clean
|
||||
cd platforms; $(MAKE) $(MFLAGS) clean
|
||||
|
||||
veryclean:
|
||||
cd unproto; $(MAKE) $(MFLAGS) clean
|
||||
cd platforms; $(MAKE) $(MFLAGS) veryclean
|
||||
|
||||
links:
|
||||
@echo "making links in `$(PWD)`"; \
|
||||
$(LN) .src/version .src/platforms .src/Make-append .src/install.sh . ; \
|
||||
( $(MKDIR) unproto; cd unproto; $(LN) ../.src/unproto .src; \
|
||||
$(LN) .src/Makefile .src/*.[ch] . )
|
||||
|
||||
98
build/PORTS
98
build/PORTS
|
|
@ -1,98 +0,0 @@
|
|||
This file gives some helpful hints for building LDAP on various machines.
|
||||
|
||||
LDAP has been built and tested on the following platforms. It will
|
||||
probably build fine under similar versions of the OS (e.g. it has
|
||||
been built and tested under SunOS 4.1.4, but probably builds fine
|
||||
under all SunOS 4.1.x systems).
|
||||
|
||||
If you port LDAP to a new platform, let us know so we can add it here.
|
||||
See the end of this file for some hints on doing a port. The following
|
||||
tables give some indication of the level of support there is for various
|
||||
platforms where the LDAP release has been built. Key:
|
||||
|
||||
X - all pieces are known to build and work
|
||||
B - all pieces build and are believed to work
|
||||
S - some pieces build and work
|
||||
O - an older LDAP release has been ported here; current status unknown
|
||||
? - unknown
|
||||
- - does not build and/or work at all
|
||||
|
||||
** Unix and Unix-like platforms:
|
||||
|
||||
OS Version libraries clients ldapd slapd slurpd
|
||||
---------- --------- ------- ----- ----- ------
|
||||
AIX 3.2.5 X X B B -(1)
|
||||
|
||||
HP-UX 9.05 X X ? B -(1)
|
||||
|
||||
Linux 1.3.76 X X O X -(1)
|
||||
|
||||
FreeBSD 2.0.5 X X ? B ?
|
||||
|
||||
NETBSD 0.9a O O ? ? ?
|
||||
|
||||
NeXTSTEP 3.2 O O ? ? ?
|
||||
|
||||
SunOS 4.1.4 X X X X X
|
||||
|
||||
SunOS 5.5 X X B X X
|
||||
(Solaris 2.5)
|
||||
|
||||
Ultrix 4.3 X X B B ?
|
||||
|
||||
OSF/1 3.2 X X X X ?
|
||||
|
||||
IRIX 5.x/6.x B B ? B ?
|
||||
|
||||
NCR MP-RAS 2.3 X X ? ? ?
|
||||
|
||||
(1) - required threads support not provided by vendor
|
||||
|
||||
** Non-Unix Platforms:
|
||||
|
||||
OS Version libraries clients ldapd slapd slurpd
|
||||
---------- --------- ------- ----- ----- ------
|
||||
MacOS 7.5 X - - - -
|
||||
(see the file libraries/macintosh/README for build instructions)
|
||||
|
||||
MSDOS O S - - -
|
||||
(see the file libraries/msdos/README for build instructions)
|
||||
|
||||
MS-Windows 3.x O - - - -
|
||||
(see the file libraries/msdos/README.WSA for build instructions)
|
||||
|
||||
MS-Win NT & 95 O ? ? ? ?
|
||||
|
||||
VMS X S X X ?
|
||||
(see the file libraries/vms/README.VMS for build instructions)
|
||||
|
||||
|
||||
** Hints on Porting LDAP to a New Platform
|
||||
|
||||
If your platform is not listed here, you will need to do a port. The
|
||||
place to start for Unix systems is by creating a new directory under
|
||||
the LDAP build/platforms directory and creating an appropriate
|
||||
Make-platform file. It is probably easiest to start by duplicating a
|
||||
directory there that is for a platform similar to yours.
|
||||
|
||||
Variables commonly set in the Make-platform files include:
|
||||
|
||||
CC - compiler to use, e.g. CC=cc or CC=gcc
|
||||
PLATFORMCFLAGS - flags added to every compile
|
||||
PLATFORMLDFLAGS - flags added to every link
|
||||
PLATFORMLIBS - extra libraries needed (added to the end of all link commands)
|
||||
LDBMLIB - ndbm library, needed if not in libc (e.g. LDBMLIB=-lndbm)
|
||||
NEEDUNPROTO=yes - set if your compiler doesn't understand prototypes; see the
|
||||
sunos4-cc and hpux-cc files for example usage
|
||||
INSTALL - BSD-like install command; if necessary, you can use a script
|
||||
we provide: INSTALL=$(LDAPSRC)/build/install.sh
|
||||
RANLIB - command to convert libraries for efficient random access;
|
||||
if your system has no ranlib, use RANLIB = ""
|
||||
other commands - see the file build/Make-append for a list
|
||||
|
||||
You will also need to modify the top-level LDAP Makefile .make-platform
|
||||
rule to know about your platform. Finally, you should look through the
|
||||
include/portable.h file and make any necessary adjustments.
|
||||
|
||||
Please send changes via e-mail to: ldap-support@umich.edu so they can be
|
||||
incorporated into future releases.
|
||||
|
|
@ -1,61 +0,0 @@
|
|||
#
|
||||
# LDAP FreeBSD GNU C Make-platform file
|
||||
#
|
||||
|
||||
|
||||
#
|
||||
# add any platform-specific overrides below here
|
||||
#
|
||||
EXTRACFLAGS=-O -g
|
||||
LDBMBACKEND=-DLDBM_USE_DBBTREE
|
||||
LDBMINCLUDE=-I/usr/include
|
||||
|
||||
EDITOR=/usr/bin/vi
|
||||
FINGER=/usr/bin/finger
|
||||
SENDMAIL=/usr/sbin/sendmail
|
||||
|
||||
LDAP_RUNDIR=/var/run
|
||||
|
||||
MANCOMPRESS=gzip
|
||||
MANCOMPRESSSUFFIX=.gz
|
||||
|
||||
# On most (if not all) 2.X versions of FreeBSD, Pthread(3) is not
|
||||
# installed by default. As such, -DNO_THREADS is used by default
|
||||
# on FreeBSD 2.X.
|
||||
#
|
||||
# FreeBSD 2.2.5 comes with a Chris Provenzano Pthreads
|
||||
# package, # but it must be manually built. See pthread(3) for details.
|
||||
# OpenLDAP is compatible with this version, uncomment the following
|
||||
# options:
|
||||
#
|
||||
#THREADS= -DPOSIX_THREADS -D_THREAD_SAFE \
|
||||
# -DPTHREAD_PREEMPTIVE -DSCHED_YIELD_MISSING
|
||||
#THREADSLIB= -lc_r
|
||||
#
|
||||
# Some versions of FreeBSD support the gcc option "-pthread" to
|
||||
# link with -lc_r. On those systems, uncomment the following:
|
||||
#THREADSLIB= -pthread
|
||||
#
|
||||
#
|
||||
# If the only thread package available is only Draft 4 compliant,
|
||||
# you can try the following:
|
||||
#THREADS= -DTHREAD_MIT_PTHREADS -D_THREAD_SAFE -DPTHREAD_PREEMPTIVE
|
||||
#
|
||||
# Note:
|
||||
# LDAP has a problem with the idea of implicit vs. explicit yields
|
||||
# in call conversion threading packages, like the MIT pthreads
|
||||
# package. Rather than resolve this globally, I (Terry Lambert) have
|
||||
# marked the threading as "preeemptive", even though it is
|
||||
# technically not.
|
||||
# This means that the implicit-yield threading is topologically
|
||||
# equivalent to preemptive threading.
|
||||
|
||||
# crypt(3) is in a separate library
|
||||
LDAP_CRYPT_LIB= -lcrypt
|
||||
|
||||
#
|
||||
# -------------------------------------------------------------------------
|
||||
# you will probably not need to edit anything below this point
|
||||
# -------------------------------------------------------------------------
|
||||
CC = gcc
|
||||
PLATFORMCFLAGS= -Dfreebsd
|
||||
|
|
@ -1,49 +0,0 @@
|
|||
#
|
||||
# LDAP FreeBSD GNU C Make-platform file
|
||||
#
|
||||
|
||||
#
|
||||
# add any platform-specific overrides below here
|
||||
#
|
||||
|
||||
LDBMBACKEND=-DLDBM_USE_DBBTREE
|
||||
LDBMINCLUDE=-I/usr/include
|
||||
|
||||
EDITOR=/usr/bin/vi
|
||||
FINGER=/usr/bin/finger
|
||||
SENDMAIL=/usr/sbin/sendmail
|
||||
|
||||
LDAP_RUNDIR=/var/run
|
||||
|
||||
MANCOMPRESS=gzip
|
||||
MANCOMPRESSSUFFIX=.gz
|
||||
|
||||
#
|
||||
# LDAP has a problem with the idea of implicit vs. explicit yields
|
||||
# in call conversion threading packages, like the MIT pthreads
|
||||
# package. Rather than resolve this globally, I have marked the
|
||||
# threading as "preeemptive", even though it is technically not.
|
||||
#
|
||||
# This means that the implicit-yield threading is topologically
|
||||
# equivalent to preemptive threading.
|
||||
#
|
||||
THREADS= -DPOSIX_THREADS -D_THREAD_SAFE -DPTHREAD_PREEMPTIVE
|
||||
|
||||
# use special gcc flag to include libc_r.a
|
||||
THREADSLIB= -pthread
|
||||
#THREADSLIB= -lc_r
|
||||
|
||||
# if you built/installed with -DNOLIBC_R, you'll need uncomment
|
||||
# out the following
|
||||
#THREADS= -DNO_THREADS
|
||||
#THREADSLIB=
|
||||
|
||||
# crypt(3) is in a separate library
|
||||
LDAP_CRYPT_LIB= -lcrypt
|
||||
|
||||
#
|
||||
# -------------------------------------------------------------------------
|
||||
# you will probably not need to edit anything below this point
|
||||
# -------------------------------------------------------------------------
|
||||
CC = gcc
|
||||
PLATFORMCFLAGS= -Dfreebsd
|
||||
|
|
@ -1,27 +0,0 @@
|
|||
#
|
||||
# LDAP Linux GNU C Make-platform file
|
||||
#
|
||||
|
||||
#
|
||||
# add any platform-specific overrides below here
|
||||
#
|
||||
|
||||
EXTRACFLAGS=-O -g
|
||||
CC = gcc
|
||||
RANLIB = "ranlib"
|
||||
|
||||
LDBMBACKEND=-DLDBM_USE_GDBM
|
||||
LDBMLIB=-lgdbm
|
||||
|
||||
PLATFORMCFLAGS= -Dlinux
|
||||
|
||||
# not all versions of Linux support POSIX Threads
|
||||
#THREADS=-DPOSIX_THREADS -DREENTRANT
|
||||
#THREADSLIB=-lpthread
|
||||
|
||||
# crypt(3) is in -lcrypt on some versions of Linux
|
||||
#LDAP_CRYPT_LIB= -lcrypt
|
||||
|
||||
LDAP_SENDMAIL=/usr/sbin/sendmail
|
||||
LDAP_EDITOR=/bin/vi
|
||||
LDAP_FINGER=/usr/bin/finger
|
||||
|
|
@ -1,65 +0,0 @@
|
|||
#-----------------------------------------------------------------------------
|
||||
# Copyright (c) 1995 Regents of the University of Michigan.
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms are permitted
|
||||
# provided that this notice is preserved and that due credit is given
|
||||
# to the University of Michigan at Ann Arbor. The name of the University
|
||||
# may not be used to endorse or promote products derived from this
|
||||
# software without specific prior written permission. This software
|
||||
# is provided ``as is'' without express or implied warranty.
|
||||
#
|
||||
# avl library makefile
|
||||
#
|
||||
#-----------------------------------------------------------------------------
|
||||
|
||||
LDAPSRC = ../..
|
||||
|
||||
SRCS = ldbm.c
|
||||
OBJS = ldbm.o
|
||||
|
||||
HDIR = ../../include
|
||||
|
||||
INCLUDES= -I$(HDIR)
|
||||
DEFINES = $(DEFS) $(LDBMDEFS)
|
||||
|
||||
CFLAGS = $(INCLUDES) $(DEFINES) $(ACFLAGS)
|
||||
|
||||
all: libldbm.a
|
||||
|
||||
libldbm.a: version.o
|
||||
$(AR) ruv $@ $(OBJS) version.o
|
||||
@if [ ! -z "$(RANLIB)" ]; then \
|
||||
$(RANLIB) $@; \
|
||||
fi; \
|
||||
$(RM) ../$@; \
|
||||
$(LN) libldbm/$@ ../$@
|
||||
|
||||
testldbm: libldbm.a testldbm.o
|
||||
$(CC) $(ALDFLAGS) -o $@ testldbm.o -L. -lavl
|
||||
|
||||
version.c: $(OBJS)
|
||||
$(RM) $@
|
||||
(u=$${USER-root} v=`$(CAT) ../../build/version` d=`$(PWD)` \
|
||||
h=`$(HOSTNAME)` t=`$(DATE)`; $(SED) -e "s|%WHEN%|$${t}|" \
|
||||
-e "s|%WHOANDWHERE%|$${u}@$${h}:$${d}|" \
|
||||
-e "s|%VERSION%|$${v}|" \
|
||||
< Version.c > $@)
|
||||
|
||||
install: all
|
||||
|
||||
lint: FORCE
|
||||
$(LINT) $(INCLUDES) $(DEFINES) $(SRCS)
|
||||
|
||||
5lint: FORCE
|
||||
$(5LINT) $(INCLUDES) $(DEFINES) $(SRCS)
|
||||
|
||||
clean: FORCE
|
||||
$(RM) libldbm.a ../libldbm.a testldbm *.o core a.out version.c
|
||||
|
||||
depend: FORCE
|
||||
$(MKDEP) $(INCLUDES) $(DEFINES) $(SRCS)
|
||||
|
||||
links:
|
||||
@$(LN) .src/*.[ch] .
|
||||
|
||||
|
|
@ -1,62 +0,0 @@
|
|||
#-----------------------------------------------------------------------------
|
||||
# Copyright (c) 1996 Regents of the University of Michigan.
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms are permitted
|
||||
# provided that this notice is preserved and that due credit is given
|
||||
# to the University of Michigan at Ann Arbor. The name of the University
|
||||
# may not be used to endorse or promote products derived from this
|
||||
# software without specific prior written permission. This software
|
||||
# is provided ``as is'' without express or implied warranty.
|
||||
#
|
||||
# ldif library makefile
|
||||
#
|
||||
#-----------------------------------------------------------------------------
|
||||
|
||||
LDAPSRC = ../..
|
||||
|
||||
SRCS = line64.c
|
||||
OBJS = line64.o
|
||||
|
||||
HDIR = ../../include
|
||||
|
||||
INCLUDES= -I$(HDIR)
|
||||
DEFINES = $(DEFS)
|
||||
|
||||
CFLAGS = $(INCLUDES) $(DEFINES) $(ACFLAGS)
|
||||
|
||||
all: libldif.a
|
||||
|
||||
libldif.a: version.o
|
||||
$(AR) ruv $@ $(OBJS) version.o
|
||||
@if [ ! -z "$(RANLIB)" ]; then \
|
||||
$(RANLIB) $@; \
|
||||
fi; \
|
||||
$(RM) ../$@; \
|
||||
$(LN) libldif/$@ ../$@
|
||||
|
||||
version.c: $(OBJS)
|
||||
$(RM) $@
|
||||
(u=$${USER-root} v=`$(CAT) ../../build/version` d=`$(PWD)` \
|
||||
h=`$(HOSTNAME)` t=`$(DATE)`; $(SED) -e "s|%WHEN%|$${t}|" \
|
||||
-e "s|%WHOANDWHERE%|$${u}@$${h}:$${d}|" \
|
||||
-e "s|%VERSION%|$${v}|" \
|
||||
< Version.c > $@)
|
||||
|
||||
install: all
|
||||
|
||||
lint: FORCE
|
||||
$(LINT) $(INCLUDES) $(DEFINES) $(SRCS)
|
||||
|
||||
5lint: FORCE
|
||||
$(5LINT) $(INCLUDES) $(DEFINES) $(SRCS)
|
||||
|
||||
clean: FORCE
|
||||
$(RM) libldif.a ../libldif.a *.o core a.out version.c
|
||||
|
||||
depend: FORCE
|
||||
$(MKDEP) $(INCLUDES) $(DEFINES) $(SRCS)
|
||||
|
||||
links:
|
||||
@$(LN) .src/*.[ch] .
|
||||
|
||||
|
|
@ -1,62 +0,0 @@
|
|||
#-----------------------------------------------------------------------------
|
||||
# Copyright (c) 1995 Regents of the University of Michigan.
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms are permitted
|
||||
# provided that this notice is preserved and that due credit is given
|
||||
# to the University of Michigan at Ann Arbor. The name of the University
|
||||
# may not be used to endorse or promote products derived from this
|
||||
# software without specific prior written permission. This software
|
||||
# is provided ``as is'' without express or implied warranty.
|
||||
#
|
||||
# lthreads library makefile
|
||||
#
|
||||
#-----------------------------------------------------------------------------
|
||||
|
||||
LDAPSRC = ../..
|
||||
|
||||
SRCS = rdwr.c thread.c stack.c
|
||||
OBJS = rdwr.o thread.o stack.o
|
||||
|
||||
HDIR = ../../include
|
||||
|
||||
INCLUDES= -I$(HDIR)
|
||||
DEFINES = $(DEFS) $(THREADS)
|
||||
|
||||
CFLAGS = $(INCLUDES) $(THREADSINCLUDE) $(DEFINES) $(ACFLAGS)
|
||||
|
||||
all: liblthread.a
|
||||
|
||||
liblthread.a: version.o
|
||||
$(AR) ruv $@ $(OBJS) version.o
|
||||
@if [ ! -z "$(RANLIB)" ]; then \
|
||||
$(RANLIB) $@; \
|
||||
fi; \
|
||||
$(RM) ../$@; \
|
||||
$(LN) liblthread/$@ ../$@
|
||||
|
||||
version.c: $(OBJS)
|
||||
$(RM) $@
|
||||
(u=$${USER-root} v=`$(CAT) ../../build/version` d=`$(PWD)` \
|
||||
h=`$(HOSTNAME)` t=`$(DATE)`; $(SED) -e "s|%WHEN%|$${t}|" \
|
||||
-e "s|%WHOANDWHERE%|$${u}@$${h}:$${d}|" \
|
||||
-e "s|%VERSION%|$${v}|" \
|
||||
< Version.c > $@)
|
||||
|
||||
install: all
|
||||
|
||||
lint: FORCE
|
||||
$(LINT) $(INCLUDES) $(DEFINES) $(SRCS)
|
||||
|
||||
5lint: FORCE
|
||||
$(5LINT) $(INCLUDES) $(DEFINES) $(SRCS)
|
||||
|
||||
clean: FORCE
|
||||
$(RM) liblthread.a ../liblthread.a *.o core a.out version.c
|
||||
|
||||
depend: FORCE
|
||||
$(MKDEP) $(INCLUDES) $(DEFINES) $(SRCS)
|
||||
|
||||
links:
|
||||
@$(LN) .src/*.[ch] .
|
||||
|
||||
|
|
@ -1,62 +0,0 @@
|
|||
#-----------------------------------------------------------------------------
|
||||
# Copyright (c) 1995 Regents of the University of Michigan.
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms are permitted
|
||||
# provided that this notice is preserved and that due credit is given
|
||||
# to the University of Michigan at Ann Arbor. The name of the University
|
||||
# may not be used to endorse or promote products derived from this
|
||||
# software without specific prior written permission. This software
|
||||
# is provided ``as is'' without express or implied warranty.
|
||||
#
|
||||
# lutil library makefile
|
||||
#
|
||||
#-----------------------------------------------------------------------------
|
||||
|
||||
LDAPSRC = ../..
|
||||
|
||||
SRCS = base64.c md5.c sha1.c
|
||||
OBJS = base64.o md5.o sha1.o
|
||||
|
||||
HDIR = ../../include
|
||||
|
||||
INCLUDES= -I$(HDIR)
|
||||
DEFINES = $(DEFS)
|
||||
|
||||
CFLAGS = $(INCLUDES) $(DEFINES) $(ACFLAGS)
|
||||
|
||||
all: liblutil.a
|
||||
|
||||
liblutil.a: version.o
|
||||
$(AR) ruv $@ $(OBJS) version.o
|
||||
@if [ ! -z "$(RANLIB)" ]; then \
|
||||
$(RANLIB) $@; \
|
||||
fi; \
|
||||
$(RM) ../$@; \
|
||||
$(LN) liblutil/$@ ../$@
|
||||
|
||||
version.c: $(OBJS)
|
||||
$(RM) $@
|
||||
(u=$${USER-root} v=`$(CAT) ../../build/version` d=`$(PWD)` \
|
||||
h=`$(HOSTNAME)` t=`$(DATE)`; $(SED) -e "s|%WHEN%|$${t}|" \
|
||||
-e "s|%WHOANDWHERE%|$${u}@$${h}:$${d}|" \
|
||||
-e "s|%VERSION%|$${v}|" \
|
||||
< Version.c > $@)
|
||||
|
||||
install: all
|
||||
|
||||
lint: FORCE
|
||||
$(LINT) $(INCLUDES) $(DEFINES) $(SRCS)
|
||||
|
||||
5lint: FORCE
|
||||
$(5LINT) $(INCLUDES) $(DEFINES) $(SRCS)
|
||||
|
||||
clean: FORCE
|
||||
$(RM) liblutil.a ../liblutil.a *.o core a.out version.c
|
||||
|
||||
depend: FORCE
|
||||
$(MKDEP) $(INCLUDES) $(DEFINES) $(SRCS)
|
||||
|
||||
links:
|
||||
@$(LN) .src/*.[ch] .
|
||||
|
||||
|
|
@ -1,48 +0,0 @@
|
|||
#-----------------------------------------------------------------------------
|
||||
# Copyright (c) 1994 Regents of the University of Michigan.
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms are permitted
|
||||
# provided that this notice is preserved and that due credit is given
|
||||
# to the University of Michigan at Ann Arbor. The name of the University
|
||||
# may not be used to endorse or promote products derived from this
|
||||
# software without specific prior written permission. This software
|
||||
# is provided ``as is'' without express or implied warranty.
|
||||
#
|
||||
# LDAP libraries/macintosh Makefile
|
||||
#
|
||||
#-----------------------------------------------------------------------------
|
||||
|
||||
############################################################################
|
||||
# #
|
||||
# You should not have to edit anything below this point #
|
||||
# #
|
||||
############################################################################
|
||||
|
||||
#
|
||||
# rules to make the software
|
||||
#
|
||||
|
||||
all: FORCE
|
||||
|
||||
#
|
||||
# rules to install the software
|
||||
#
|
||||
|
||||
install: all
|
||||
|
||||
#
|
||||
# rules to make clean
|
||||
#
|
||||
|
||||
clean: FORCE
|
||||
|
||||
veryclean: clean
|
||||
|
||||
#
|
||||
# rules to make depend
|
||||
#
|
||||
#
|
||||
depend: FORCE
|
||||
|
||||
links:
|
||||
|
|
@ -1,67 +0,0 @@
|
|||
LDAP Macintosh README
|
||||
|
||||
The lber and ldap client libraries have been ported to Macintosh.
|
||||
Build testing was originally done with Think C 5.0.4 and MPW 3.2, both
|
||||
running under System 7.1. Recently, it has been built using Metrowerks
|
||||
CodeWarrior 8.0 and Symantec C++ 7.0.3. The libaries have been tested
|
||||
under System 7.0, 7.1, and 7.5, and are believed to run under any
|
||||
System later than 6.0. None of the LDAP clients included in the
|
||||
distribution have been tested on the Mac.
|
||||
|
||||
MAKING THE DISTRIBUTION
|
||||
The instructions included here are for Symantec C 7.0.4, but the steps
|
||||
are very similar for the other environments.
|
||||
|
||||
To build the ldap and lber libraries (easiest to do as one project):
|
||||
|
||||
1) create a new project that contains the following files:
|
||||
libraries/liblber/decode.c
|
||||
libraries/liblber/encode.c
|
||||
libraries/liblber/io.c
|
||||
libraries/macintosh/tcp/dnr.c
|
||||
libraries/macintosh/tcp/tcp.c
|
||||
libraries/macintosh/macos-ip.c
|
||||
libraries/macintosh/strings.c
|
||||
plus all the .c files in libraries/libldap/, except test.c,
|
||||
tmpltest.c, and os-ip.c.
|
||||
|
||||
2) put all of the .h files in include/, libraries/macintosh/,
|
||||
libraries/libldap and libraries/macintosh/tcp somewhere
|
||||
in the same folder where the project is located.
|
||||
|
||||
3) Add the MacTraps, MacTraps2, Unix, and ANSI-small libraries
|
||||
(included with Symantec/ThinkC) to the project.
|
||||
|
||||
3) Bring up the Edit menu "Options..." dialog and set the following:
|
||||
Language Settings:
|
||||
Strict Prototype Enforcement/Require Prototypes
|
||||
Prefix:
|
||||
#define MACOS
|
||||
#define NEEDPROTOS
|
||||
#define NEEDGETOPT
|
||||
#define NO_USERINTERFACE
|
||||
#define FILTERFILE "ldapfilter.conf"
|
||||
#define TEMPLATEFILE "ldaptemplates.conf"
|
||||
|
||||
If you want to build a version of the library that does
|
||||
not have any global variables (such as for inclusion in a
|
||||
driver or other code module), add a "#define NO_GLOBALS"
|
||||
to the Prefix. The only catch is that the tcp/dnr.c
|
||||
file needs changes to remove the global variables.
|
||||
|
||||
If you want support for referrals (optionally enabled
|
||||
for each LDAP connection), add '#define LDAP_REFERRALS'
|
||||
to the prefix list. This is recommended.
|
||||
|
||||
4) Compile the project (Bring Up To Date under the Project menu)
|
||||
|
||||
5) If you would like to use the libldap/test.c program to test the
|
||||
library in an ugly console window, you will need to add the
|
||||
test.c file itself and the full ANSI library (instead of
|
||||
ANSI-small) to the project, and don't define NO_USERINTERFACE.
|
||||
|
||||
BUG REPORTING
|
||||
|
||||
Bug reports should be sent to bug-ldap@terminator.cc.umich.edu.
|
||||
|
||||
README Last updated 11 April 1996 by Mark Smith
|
||||
|
|
@ -1,104 +0,0 @@
|
|||
/*
|
||||
* Copyright (c) 1987 Regents of the University of California.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms are permitted
|
||||
* provided that: (1) source distributions retain this entire copyright
|
||||
* notice and comment, and (2) distributions including binaries display
|
||||
* the following acknowledgement: ``This product includes software
|
||||
* developed by the University of California, Berkeley and its contributors''
|
||||
* in the documentation or other materials provided with the distribution
|
||||
* and in all advertising materials mentioning features or use of this
|
||||
* software. Neither the name of the University nor the names of its
|
||||
* contributors may be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
|
||||
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*/
|
||||
|
||||
#if defined(LIBC_SCCS) && !defined(lint)
|
||||
static char sccsid[] = "@(#)getopt.c 4.12 (Berkeley) 6/1/90";
|
||||
#endif /* LIBC_SCCS and not lint */
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include "lber.h"
|
||||
#define index strchr
|
||||
#define rindex strrchr
|
||||
|
||||
/*
|
||||
* get option letter from argument vector
|
||||
*/
|
||||
int opterr = 1, /* if error message should be printed */
|
||||
optind = 1, /* index into parent argv vector */
|
||||
optopt; /* character checked for validity */
|
||||
char *optarg; /* argument associated with option */
|
||||
|
||||
#define BADCH (int)'?'
|
||||
#define EMSG ""
|
||||
|
||||
getopt(int nargc, char **nargv, char *ostr)
|
||||
{
|
||||
static char *place = EMSG; /* option letter processing */
|
||||
register char *oli; /* option letter list index */
|
||||
char *p;
|
||||
|
||||
if (!*place) { /* update scanning pointer */
|
||||
if (optind >= nargc || *(place = nargv[optind]) != '-') {
|
||||
place = EMSG;
|
||||
return(EOF);
|
||||
}
|
||||
if (place[1] && *++place == '-') { /* found "--" */
|
||||
++optind;
|
||||
place = EMSG;
|
||||
return(EOF);
|
||||
}
|
||||
} /* option letter okay? */
|
||||
if ((optopt = (int)*place++) == (int)':' ||
|
||||
!(oli = index(ostr, optopt))) {
|
||||
/*
|
||||
* if the user didn't specify '-' as an option,
|
||||
* assume it means EOF.
|
||||
*/
|
||||
if (optopt == (int)'-')
|
||||
return(EOF);
|
||||
if (!*place)
|
||||
++optind;
|
||||
if (opterr) {
|
||||
if (!(p = rindex(*nargv, '/')))
|
||||
p = *nargv;
|
||||
else
|
||||
++p;
|
||||
(void)fprintf(stderr, "%s: illegal option -- %c\n",
|
||||
p, optopt);
|
||||
}
|
||||
return(BADCH);
|
||||
}
|
||||
if (*++oli != ':') { /* don't need argument */
|
||||
optarg = NULL;
|
||||
if (!*place)
|
||||
++optind;
|
||||
}
|
||||
else { /* need an argument */
|
||||
if (*place) /* no white space */
|
||||
optarg = place;
|
||||
else if (nargc <= ++optind) { /* no arg */
|
||||
place = EMSG;
|
||||
if (!(p = rindex(*nargv, '/')))
|
||||
p = *nargv;
|
||||
else
|
||||
++p;
|
||||
if (opterr)
|
||||
(void)fprintf(stderr,
|
||||
"%s: option requires an argument -- %c\n",
|
||||
p, optopt);
|
||||
return(BADCH);
|
||||
}
|
||||
else /* white space */
|
||||
optarg = nargv[optind];
|
||||
place = EMSG;
|
||||
++optind;
|
||||
}
|
||||
return(optopt); /* dump back option letter */
|
||||
}
|
||||
|
|
@ -1,80 +0,0 @@
|
|||
/*
|
||||
* Copyright (c) 1992, 1994 Regents of the University of Michigan.
|
||||
* All rights reserved.
|
||||
*
|
||||
* kerberos-macos.c
|
||||
*/
|
||||
|
||||
#ifndef lint
|
||||
static char copyright[] = "@(#) Copyright (c) 1994 Regents of the University of Michigan.\nAll rights reserved.\n";
|
||||
#endif
|
||||
|
||||
#include "lber.h"
|
||||
#include "ldap.h"
|
||||
|
||||
#ifdef KERBEROS
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#ifdef THINK_C
|
||||
#include <pascal.h>
|
||||
#else /* THINK_C */
|
||||
#include <Strings.h>
|
||||
#endif /* THINK_C */
|
||||
#ifdef AUTHMAN
|
||||
#include <MixedMode.h>
|
||||
#include <Errors.h>
|
||||
#include "authLibrary.h"
|
||||
#include "ldap-int.h"
|
||||
|
||||
/*
|
||||
* ldap_get_kerberosv4_credentials - obtain kerberos v4 credentials for ldap.
|
||||
*/
|
||||
|
||||
/* ARGSUSED */
|
||||
char *
|
||||
ldap_get_kerberosv4_credentials( LDAP *ld, char *who, char *service, int *len )
|
||||
{
|
||||
static short authman_refnum = 0;
|
||||
char *cred, ticket[ MAX_KTXT_LEN ];
|
||||
short version, ticketlen, err;
|
||||
Str255 svcps, instps;
|
||||
|
||||
/*
|
||||
* make sure RJC's Authentication Manager 2.0 or better is available
|
||||
*/
|
||||
if ( authman_refnum == 0 && (( err = openAuthMan( &authman_refnum, &version )) != noErr || version < 2 )) {
|
||||
authman_refnum = 0;
|
||||
ld->ld_errno = LDAP_AUTH_UNKNOWN;
|
||||
return( NULL );
|
||||
}
|
||||
|
||||
strcpy( (char *)svcps, service );
|
||||
CtoPstr( (char *)svcps );
|
||||
#ifdef LDAP_REFERRALS
|
||||
strcpy( (char *)instps, ld->ld_defconn->lconn_krbinstance );
|
||||
#else /* LDAP_REFERRALS */
|
||||
strcpy( (char *)instps, ld->ld_host );
|
||||
#endif /* LDAP_REFERRALS */
|
||||
|
||||
CtoPstr( (char *)instps );
|
||||
if (( err = getV4Ticket( authman_refnum, &ticket, &ticketlen, &svcps, &instps,
|
||||
NULL, INFINITE_LIFETIME, 1 )) != noErr ) {
|
||||
ld->ld_errno = ( err == userCanceledErr ) ?
|
||||
LDAP_USER_CANCELLED : LDAP_INVALID_CREDENTIALS;
|
||||
return( NULL );
|
||||
}
|
||||
|
||||
if (( cred = malloc( ticketlen )) == NULL ) {
|
||||
ld->ld_errno = LDAP_NO_MEMORY;
|
||||
return( NULL );
|
||||
}
|
||||
|
||||
*len = ticketlen;
|
||||
memcpy( cred, (char *)ticket, ticketlen );
|
||||
return( cred );
|
||||
}
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
|
@ -1,291 +0,0 @@
|
|||
/*
|
||||
* Copyright (c) 1995 Regents of the University of Michigan.
|
||||
* All rights reserved.
|
||||
*
|
||||
* macos-ip.c -- Macintosh platform-specific TCP & UDP related code
|
||||
*/
|
||||
|
||||
#ifndef lint
|
||||
static char copyright[] = "@(#) Copyright (c) 1995 Regents of the University of Michigan.\nAll rights reserved.\n";
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <Memory.h>
|
||||
#include "macos.h"
|
||||
#include "lber.h"
|
||||
#include "ldap.h"
|
||||
#include "ldap-int.h"
|
||||
|
||||
int
|
||||
ldap_connect_to_host( Sockbuf *sb, char *host, unsigned long address,
|
||||
int port, int async )
|
||||
/*
|
||||
* if host == NULL, connect using address
|
||||
* "address" and "port" must be in network byte order
|
||||
* zero is returned upon success, -1 if fatal error, -2 EINPROGRESS
|
||||
* async is only used ifndef NO_REFERRALS (non-0 means don't wait for connect)
|
||||
* XXX async is not used yet!
|
||||
*/
|
||||
{
|
||||
void *tcps;
|
||||
short i;
|
||||
#ifdef SUPPORT_OPENTRANSPORT
|
||||
InetHostInfo hi;
|
||||
#else /* SUPPORT_OPENTRANSPORT */
|
||||
struct hostInfo hi;
|
||||
#endif /* SUPPORT_OPENTRANSPORT */
|
||||
|
||||
Debug( LDAP_DEBUG_TRACE, "ldap_connect_to_host: %s:%d\n",
|
||||
( host == NULL ) ? "(by address)" : host, ntohs( port ), 0 );
|
||||
|
||||
if ( host != NULL && gethostinfobyname( host, &hi ) != noErr ) {
|
||||
return( -1 );
|
||||
}
|
||||
|
||||
if (( tcps = tcpopen( NULL, TCP_BUFSIZ )) == NULL ) {
|
||||
Debug( LDAP_DEBUG_TRACE, "tcpopen failed\n", 0, 0, 0 );
|
||||
return( -1 );
|
||||
}
|
||||
|
||||
#ifdef SUPPORT_OPENTRANSPORT
|
||||
for ( i = 0; host == NULL || hi.addrs[ i ] != 0; ++i ) {
|
||||
if ( host != NULL ) {
|
||||
SAFEMEMCPY( (char *)&address, (char *)&hi.addrs[ i ], sizeof( long ));
|
||||
}
|
||||
#else /* SUPPORT_OPENTRANSPORT */
|
||||
for ( i = 0; host == NULL || hi.addr[ i ] != 0; ++i ) {
|
||||
if ( host != NULL ) {
|
||||
SAFEMEMCPY( (char *)&address, (char *)&hi.addr[ i ], sizeof( long ));
|
||||
}
|
||||
#endif /* SUPPORT_OPENTRANSPORT */
|
||||
|
||||
if ( tcpconnect( tcps, address, port ) > 0 ) {
|
||||
sb->sb_sd = (void *)tcps;
|
||||
return( 0 );
|
||||
}
|
||||
|
||||
if ( host == NULL ) { /* using single address -- not hi.addrs array */
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Debug( LDAP_DEBUG_TRACE, "tcpconnect failed\n", 0, 0, 0 );
|
||||
tcpclose( tcps );
|
||||
return( -1 );
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
ldap_close_connection( Sockbuf *sb )
|
||||
{
|
||||
tcpclose( (tcpstream *)sb->sb_sd );
|
||||
}
|
||||
|
||||
|
||||
#ifdef KERBEROS
|
||||
char *
|
||||
ldap_host_connected_to( Sockbuf *sb )
|
||||
{
|
||||
ip_addr addr;
|
||||
|
||||
#ifdef SUPPORT_OPENTRANSPORT
|
||||
InetHostInfo hi;
|
||||
#else /* SUPPORT_OPENTRANSPORT */
|
||||
struct hostInfo hi;
|
||||
#endif /* SUPPORT_OPENTRANSPORT */
|
||||
|
||||
if ( tcpgetpeername( (tcpstream *)sb->sb_sd, &addr, NULL ) != noErr ) {
|
||||
return( NULL );
|
||||
}
|
||||
|
||||
#ifdef SUPPORT_OPENTRANSPORT
|
||||
if ( gethostinfobyaddr( addr, &hi ) == noErr ) {
|
||||
return( strdup( hi.name ));
|
||||
}
|
||||
#else /* SUPPORT_OPENTRANSPORT */
|
||||
if ( gethostinfobyaddr( addr, &hi ) == noErr ) {
|
||||
return( strdup( hi.cname ));
|
||||
}
|
||||
#endif /* SUPPORT_OPENTRANSPORT */
|
||||
|
||||
return( NULL );
|
||||
}
|
||||
#endif /* KERBEROS */
|
||||
|
||||
|
||||
#ifdef LDAP_REFERRALS
|
||||
struct tcpstreaminfo {
|
||||
struct tcpstream *tcpsi_stream;
|
||||
Boolean tcpsi_check_read;
|
||||
Boolean tcpsi_is_read_ready;
|
||||
/* Boolean tcpsi_check_write; /* no write select support needed yet */
|
||||
/* Boolean tcpsi_is_write_ready; /* ditto */
|
||||
};
|
||||
|
||||
struct selectinfo {
|
||||
short si_count;
|
||||
struct tcpstreaminfo *si_streaminfo;
|
||||
};
|
||||
|
||||
|
||||
void
|
||||
ldap_mark_select_read( LDAP *ld, Sockbuf *sb )
|
||||
{
|
||||
struct selectinfo *sip;
|
||||
struct tcpstreaminfo *tcpsip;
|
||||
short i;
|
||||
|
||||
Debug( LDAP_DEBUG_TRACE, "ldap_mark_select_read: stream %x\n", (tcpstream *)sb->sb_sd, 0, 0 );
|
||||
|
||||
if (( sip = (struct selectinfo *)ld->ld_selectinfo ) == NULL ) {
|
||||
return;
|
||||
}
|
||||
|
||||
for ( i = 0; i < sip->si_count; ++i ) { /* make sure stream is not already in the list... */
|
||||
if ( sip->si_streaminfo[ i ].tcpsi_stream == (tcpstream *)sb->sb_sd ) {
|
||||
sip->si_streaminfo[ i ].tcpsi_check_read = true;
|
||||
sip->si_streaminfo[ i ].tcpsi_is_read_ready = false;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
/* add a new stream element to our array... */
|
||||
if ( sip->si_count <= 0 ) {
|
||||
tcpsip = (struct tcpstreaminfo *)malloc( sizeof( struct tcpstreaminfo ));
|
||||
} else {
|
||||
tcpsip = (struct tcpstreaminfo *)realloc( sip->si_streaminfo,
|
||||
( sip->si_count + 1 ) * sizeof( struct tcpstreaminfo ));
|
||||
}
|
||||
|
||||
if ( tcpsip != NULL ) {
|
||||
tcpsip[ sip->si_count ].tcpsi_stream = (tcpstream *)sb->sb_sd;
|
||||
tcpsip[ sip->si_count ].tcpsi_check_read = true;
|
||||
tcpsip[ sip->si_count ].tcpsi_is_read_ready = false;
|
||||
sip->si_streaminfo = tcpsip;
|
||||
++sip->si_count;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
ldap_mark_select_clear( LDAP *ld, Sockbuf *sb )
|
||||
{
|
||||
struct selectinfo *sip;
|
||||
short i;
|
||||
|
||||
Debug( LDAP_DEBUG_TRACE, "ldap_mark_select_clear: stream %x\n", (tcpstream *)sb->sb_sd, 0, 0 );
|
||||
|
||||
sip = (struct selectinfo *)ld->ld_selectinfo;
|
||||
if ( sip != NULL && sip->si_count > 0 && sip->si_streaminfo != NULL ) {
|
||||
for ( i = 0; i < sip->si_count; ++i ) {
|
||||
if ( sip->si_streaminfo[ i ].tcpsi_stream == (tcpstream *)sb->sb_sd ) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
if ( i < sip->si_count ) {
|
||||
--sip->si_count;
|
||||
for ( ; i < sip->si_count; ++i ) {
|
||||
sip->si_streaminfo[ i ] = sip->si_streaminfo[ i + 1 ];
|
||||
}
|
||||
/* we don't bother to use realloc to make the si_streaminfo array smaller */
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
ldap_is_read_ready( LDAP *ld, Sockbuf *sb )
|
||||
{
|
||||
struct selectinfo *sip;
|
||||
short i;
|
||||
|
||||
sip = (struct selectinfo *)ld->ld_selectinfo;
|
||||
if ( sip != NULL && sip->si_count > 0 && sip->si_streaminfo != NULL ) {
|
||||
for ( i = 0; i < sip->si_count; ++i ) {
|
||||
if ( sip->si_streaminfo[ i ].tcpsi_stream == (tcpstream *)sb->sb_sd ) {
|
||||
#ifdef LDAP_DEBUG
|
||||
if ( sip->si_streaminfo[ i ].tcpsi_is_read_ready ) {
|
||||
Debug( LDAP_DEBUG_TRACE, "ldap_is_read_ready: stream %x READY\n",
|
||||
(tcpstream *)sb->sb_sd, 0, 0 );
|
||||
} else {
|
||||
Debug( LDAP_DEBUG_TRACE, "ldap_is_read_ready: stream %x Not Ready\n",
|
||||
(tcpstream *)sb->sb_sd, 0, 0 );
|
||||
}
|
||||
#endif /* LDAP_DEBUG */
|
||||
return( sip->si_streaminfo[ i ].tcpsi_is_read_ready ? 1 : 0 );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Debug( LDAP_DEBUG_TRACE, "ldap_is_read_ready: stream %x: NOT FOUND\n", (tcpstream *)sb->sb_sd, 0, 0 );
|
||||
return( 0 );
|
||||
}
|
||||
|
||||
|
||||
void *
|
||||
ldap_new_select_info()
|
||||
{
|
||||
return( (void *)calloc( 1, sizeof( struct selectinfo )));
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
ldap_free_select_info( void *sip )
|
||||
{
|
||||
if ( sip != NULL ) {
|
||||
free( sip );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
do_ldap_select( LDAP *ld, struct timeval *timeout )
|
||||
{
|
||||
struct selectinfo *sip;
|
||||
Boolean ready, gotselecterr;
|
||||
long ticks, endticks;
|
||||
short i, err;
|
||||
|
||||
Debug( LDAP_DEBUG_TRACE, "do_ldap_select\n", 0, 0, 0 );
|
||||
|
||||
if (( sip = (struct selectinfo *)ld->ld_selectinfo ) == NULL ) {
|
||||
return( -1 );
|
||||
}
|
||||
|
||||
if ( sip->si_count == 0 ) {
|
||||
return( 1 );
|
||||
}
|
||||
|
||||
if ( timeout != NULL ) {
|
||||
endticks = 60 * timeout->tv_sec + ( 60 * timeout->tv_usec ) / 1000000 + TickCount();
|
||||
}
|
||||
|
||||
for ( i = 0; i < sip->si_count; ++i ) {
|
||||
if ( sip->si_streaminfo[ i ].tcpsi_check_read ) {
|
||||
sip->si_streaminfo[ i ].tcpsi_is_read_ready = false;
|
||||
}
|
||||
}
|
||||
|
||||
ready = gotselecterr = false;
|
||||
do {
|
||||
for ( i = 0; i < sip->si_count; ++i ) {
|
||||
if ( sip->si_streaminfo[ i ].tcpsi_check_read && !sip->si_streaminfo[ i ].tcpsi_is_read_ready ) {
|
||||
if (( err = tcpreadready( sip->si_streaminfo[ i ].tcpsi_stream )) > 0 ) {
|
||||
sip->si_streaminfo[ i ].tcpsi_is_read_ready = ready = true;
|
||||
} else if ( err < 0 ) {
|
||||
gotselecterr = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
if ( !ready && !gotselecterr ) {
|
||||
Delay( 2L, &ticks );
|
||||
SystemTask();
|
||||
}
|
||||
} while ( !ready && !gotselecterr && ( timeout == NULL || ticks < endticks ));
|
||||
|
||||
Debug( LDAP_DEBUG_TRACE, "do_ldap_select returns %d\n", ready ? 1 : ( gotselecterr ? -1 : 0 ), 0, 0 );
|
||||
return( ready ? 1 : ( gotselecterr ? -1 : 0 ));
|
||||
}
|
||||
#endif /* LDAP_REFERRALS */
|
||||
|
|
@ -1,32 +0,0 @@
|
|||
/*
|
||||
* macos.h: bridge unix and Mac for LBER/LDAP
|
||||
*/
|
||||
#define ntohl( l ) (l)
|
||||
#define htonl( l ) (l)
|
||||
#define ntohs( s ) (s)
|
||||
#define htons( s ) (s)
|
||||
|
||||
#ifdef NO_GLOBALS
|
||||
|
||||
#ifdef macintosh /* IUMagIDString declared in TextUtils.h under MPW */
|
||||
#include <TextUtils.h>
|
||||
#else /* macintosh */ /* IUMagIDString declared in Packages.h under ThinkC */
|
||||
#include <Packages.h>
|
||||
#endif /* macintosh */
|
||||
|
||||
#define strcasecmp( s1, s2 ) IUMagIDString( s1, s2, strlen( s1 ), \
|
||||
strlen( s2 ))
|
||||
#else /* NO_GLOBALS */
|
||||
int strcasecmp( char *s1, char *s2 );
|
||||
int strncasecmp( char *s1, char *s2, long n );
|
||||
#endif NO_GLOBALS
|
||||
|
||||
#include <Memory.h> /* to get BlockMove() */
|
||||
|
||||
char *strdup( char *s );
|
||||
|
||||
#ifndef isascii
|
||||
#define isascii(c) ((unsigned)(c)<=0177) /* for those who don't have this in ctype.h */
|
||||
#endif isascii
|
||||
|
||||
#include "tcp.h"
|
||||
|
|
@ -1,90 +0,0 @@
|
|||
/*
|
||||
* strings.c
|
||||
*/
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include "macos.h"
|
||||
|
||||
|
||||
#ifndef NO_GLOBALS
|
||||
/*
|
||||
* Copyright (c) 1987 Regents of the University of California.
|
||||
* All rights reserved. The Berkeley software License Agreement
|
||||
* specifies the terms and conditions for redistribution.
|
||||
*/
|
||||
/*
|
||||
* This array is designed for mapping upper and lower case letter
|
||||
* together for a case independent comparison. The mappings are
|
||||
* based upon ascii character sequences.
|
||||
*/
|
||||
static char charmap[] = {
|
||||
'\000', '\001', '\002', '\003', '\004', '\005', '\006', '\007',
|
||||
'\010', '\011', '\012', '\013', '\014', '\015', '\016', '\017',
|
||||
'\020', '\021', '\022', '\023', '\024', '\025', '\026', '\027',
|
||||
'\030', '\031', '\032', '\033', '\034', '\035', '\036', '\037',
|
||||
'\040', '\041', '\042', '\043', '\044', '\045', '\046', '\047',
|
||||
'\050', '\051', '\052', '\053', '\054', '\055', '\056', '\057',
|
||||
'\060', '\061', '\062', '\063', '\064', '\065', '\066', '\067',
|
||||
'\070', '\071', '\072', '\073', '\074', '\075', '\076', '\077',
|
||||
'\100', '\141', '\142', '\143', '\144', '\145', '\146', '\147',
|
||||
'\150', '\151', '\152', '\153', '\154', '\155', '\156', '\157',
|
||||
'\160', '\161', '\162', '\163', '\164', '\165', '\166', '\167',
|
||||
'\170', '\171', '\172', '\133', '\134', '\135', '\136', '\137',
|
||||
'\140', '\141', '\142', '\143', '\144', '\145', '\146', '\147',
|
||||
'\150', '\151', '\152', '\153', '\154', '\155', '\156', '\157',
|
||||
'\160', '\161', '\162', '\163', '\164', '\165', '\166', '\167',
|
||||
'\170', '\171', '\172', '\173', '\174', '\175', '\176', '\177',
|
||||
'\200', '\201', '\202', '\203', '\204', '\205', '\206', '\207',
|
||||
'\210', '\211', '\212', '\213', '\214', '\215', '\216', '\217',
|
||||
'\220', '\221', '\222', '\223', '\224', '\225', '\226', '\227',
|
||||
'\230', '\231', '\232', '\233', '\234', '\235', '\236', '\237',
|
||||
'\240', '\241', '\242', '\243', '\244', '\245', '\246', '\247',
|
||||
'\250', '\251', '\252', '\253', '\254', '\255', '\256', '\257',
|
||||
'\260', '\261', '\262', '\263', '\264', '\265', '\266', '\267',
|
||||
'\270', '\271', '\272', '\273', '\274', '\275', '\276', '\277',
|
||||
'\300', '\341', '\342', '\343', '\344', '\345', '\346', '\347',
|
||||
'\350', '\351', '\352', '\353', '\354', '\355', '\356', '\357',
|
||||
'\360', '\361', '\362', '\363', '\364', '\365', '\366', '\367',
|
||||
'\370', '\371', '\372', '\333', '\334', '\335', '\336', '\337',
|
||||
'\340', '\341', '\342', '\343', '\344', '\345', '\346', '\347',
|
||||
'\350', '\351', '\352', '\353', '\354', '\355', '\356', '\357',
|
||||
'\360', '\361', '\362', '\363', '\364', '\365', '\366', '\367',
|
||||
'\370', '\371', '\372', '\373', '\374', '\375', '\376', '\377',
|
||||
};
|
||||
|
||||
int
|
||||
strcasecmp(char *s1, char *s2)
|
||||
{
|
||||
register char *cm = charmap;
|
||||
|
||||
while (cm[*s1] == cm[*s2++])
|
||||
if (*s1++ == '\0')
|
||||
return(0);
|
||||
return(cm[*s1] - cm[*--s2]);
|
||||
}
|
||||
|
||||
int
|
||||
strncasecmp(char *s1, char *s2, long n)
|
||||
{
|
||||
register char *cm = charmap;
|
||||
|
||||
while (--n >= 0 && cm[*s1] == cm[*s2++])
|
||||
if (*s1++ == '\0')
|
||||
return(0);
|
||||
return(n < 0 ? 0 : cm[*s1] - cm[*--s2]);
|
||||
}
|
||||
#endif NO_GLOBALS
|
||||
|
||||
|
||||
char *
|
||||
strdup( char *p )
|
||||
{
|
||||
char *r;
|
||||
|
||||
r = (char *) malloc( strlen( p ) + 1 );
|
||||
if ( r != NULL ) {
|
||||
strcpy( r, p );
|
||||
}
|
||||
|
||||
return( r );
|
||||
}
|
||||
|
|
@ -1,200 +0,0 @@
|
|||
/*
|
||||
File: AddressXlation.h
|
||||
|
||||
Copyright: © 1984-1993 by Apple Computer, Inc., all rights reserved.
|
||||
|
||||
WARNING
|
||||
This file was auto generated by the interfacer tool. Modifications
|
||||
must be made to the master file.
|
||||
|
||||
*/
|
||||
|
||||
#ifndef __ADDRESSXLATION__
|
||||
#define __ADDRESSXLATION__
|
||||
|
||||
#ifndef __MACTCPCOMMONTYPES__
|
||||
#include "MacTCPCommonTypes.h"
|
||||
#endif
|
||||
|
||||
#define NUM_ALT_ADDRS 4
|
||||
|
||||
#if defined(powerc) || defined (__powerc)
|
||||
#pragma options align=mac68k
|
||||
#endif
|
||||
struct hostInfo {
|
||||
long rtnCode;
|
||||
char cname[255];
|
||||
unsigned long addr[NUM_ALT_ADDRS];
|
||||
};
|
||||
#if defined(powerc) || defined(__powerc)
|
||||
#pragma options align=reset
|
||||
#endif
|
||||
|
||||
typedef struct hostInfo hostInfo;
|
||||
|
||||
enum AddrClasses {
|
||||
A = 1,
|
||||
NS,
|
||||
CNAME = 5,
|
||||
HINFO = 13,
|
||||
MX = 15,
|
||||
lastClass = 32767
|
||||
};
|
||||
|
||||
typedef enum AddrClasses AddrClasses;
|
||||
|
||||
#if defined(powerc) || defined (__powerc)
|
||||
#pragma options align=mac68k
|
||||
#endif
|
||||
struct HInfoRec {
|
||||
char cpuType[30];
|
||||
char osType[30];
|
||||
};
|
||||
#if defined(powerc) || defined(__powerc)
|
||||
#pragma options align=reset
|
||||
#endif
|
||||
|
||||
typedef struct HInfoRec HInfoRec;
|
||||
|
||||
#if defined(powerc) || defined (__powerc)
|
||||
#pragma options align=mac68k
|
||||
#endif
|
||||
struct MXRec {
|
||||
unsigned short preference;
|
||||
char exchange[255];
|
||||
};
|
||||
#if defined(powerc) || defined(__powerc)
|
||||
#pragma options align=reset
|
||||
#endif
|
||||
|
||||
typedef struct MXRec MXRec;
|
||||
|
||||
#if defined(powerc) || defined (__powerc)
|
||||
#pragma options align=mac68k
|
||||
#endif
|
||||
struct returnRec {
|
||||
long rtnCode;
|
||||
char cname[255];
|
||||
union {
|
||||
unsigned long addr[NUM_ALT_ADDRS];
|
||||
struct HInfoRec hinfo;
|
||||
struct MXRec mx;
|
||||
} rdata;
|
||||
};
|
||||
#if defined(powerc) || defined(__powerc)
|
||||
#pragma options align=reset
|
||||
#endif
|
||||
|
||||
typedef struct returnRec returnRec;
|
||||
|
||||
#if defined(powerc) || defined (__powerc)
|
||||
#pragma options align=mac68k
|
||||
#endif
|
||||
struct cacheEntryRecord {
|
||||
char *cname;
|
||||
unsigned short type;
|
||||
unsigned short cacheClass;
|
||||
unsigned long ttl;
|
||||
union {
|
||||
char *name;
|
||||
ip_addr addr;
|
||||
} rdata;
|
||||
};
|
||||
#if defined(powerc) || defined(__powerc)
|
||||
#pragma options align=reset
|
||||
#endif
|
||||
|
||||
typedef struct cacheEntryRecord cacheEntryRecord;
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef pascal void (*EnumResultProcPtr)(struct cacheEntryRecord *cacheEntryRecordPtr, char *userDataPtr);
|
||||
|
||||
enum {
|
||||
uppEnumResultProcInfo = kPascalStackBased
|
||||
| STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(struct cacheEntryRecord*)))
|
||||
| STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(char*)))
|
||||
};
|
||||
|
||||
#if USESROUTINEDESCRIPTORS
|
||||
typedef UniversalProcPtr EnumResultUPP;
|
||||
|
||||
#define CallEnumResultProc(userRoutine, cacheEntryRecordPtr, userDataPtr) \
|
||||
CallUniversalProc((UniversalProcPtr)userRoutine, uppEnumResultProcInfo, cacheEntryRecordPtr, userDataPtr)
|
||||
#define NewEnumResultProc(userRoutine) \
|
||||
(EnumResultUPP) NewRoutineDescriptor((ProcPtr)userRoutine, uppEnumResultProcInfo, GetCurrentISA())
|
||||
#else
|
||||
typedef EnumResultProcPtr EnumResultUPP;
|
||||
|
||||
#define CallEnumResultProc(userRoutine, cacheEntryRecordPtr, userDataPtr) \
|
||||
(*userRoutine)(cacheEntryRecordPtr, userDataPtr)
|
||||
#define NewEnumResultProc(userRoutine) \
|
||||
(EnumResultUPP)(userRoutine)
|
||||
#endif
|
||||
|
||||
typedef pascal void (*ResultProcPtr)(struct hostInfo *hostInfoPtr, char *userDataPtr);
|
||||
|
||||
enum {
|
||||
uppResultProcInfo = kPascalStackBased
|
||||
| STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(struct hostInfo*)))
|
||||
| STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(char*)))
|
||||
};
|
||||
|
||||
#if USESROUTINEDESCRIPTORS
|
||||
typedef UniversalProcPtr ResultUPP;
|
||||
|
||||
#define CallResultProc(userRoutine, hostInfoPtr, userDataPtr) \
|
||||
CallUniversalProc((UniversalProcPtr)userRoutine, uppResultProcInfo, hostInfoPtr, userDataPtr)
|
||||
#define NewResultProc(userRoutine) \
|
||||
(ResultUPP) NewRoutineDescriptor((ProcPtr)userRoutine, uppResultProcInfo, GetCurrentISA())
|
||||
#else
|
||||
typedef ResultProcPtr ResultUPP;
|
||||
|
||||
#define CallResultProc(userRoutine, hostInfoPtr, userDataPtr) \
|
||||
(*userRoutine)(hostInfoPtr, userDataPtr)
|
||||
#define NewResultProc(userRoutine) \
|
||||
(ResultUPP)(userRoutine)
|
||||
#endif
|
||||
|
||||
typedef pascal void (*ResultProc2ProcPtr)(struct returnRec *returnRecPtr, char *userDataPtr);
|
||||
|
||||
enum {
|
||||
uppResultProc2ProcInfo = kPascalStackBased
|
||||
| STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(struct returnRec*)))
|
||||
| STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(char*)))
|
||||
};
|
||||
|
||||
#if USESROUTINEDESCRIPTORS
|
||||
typedef UniversalProcPtr ResultProc2UPP;
|
||||
|
||||
#define CallResultProc2Proc(userRoutine, returnRecPtr, userDataPtr) \
|
||||
CallUniversalProc((UniversalProcPtr)userRoutine, uppResultProc2ProcInfo, returnRecPtr, userDataPtr)
|
||||
#define NewResultProc2Proc(userRoutine) \
|
||||
(ResultProc2UPP) NewRoutineDescriptor((ProcPtr)userRoutine, uppResultProc2ProcInfo, GetCurrentISA())
|
||||
#else
|
||||
typedef ResultProc2ProcPtr ResultProc2UPP;
|
||||
|
||||
#define CallResultProc2Proc(userRoutine, returnRecPtr, userDataPtr) \
|
||||
(*userRoutine)(returnRecPtr, userDataPtr)
|
||||
#define NewResultProc2Proc(userRoutine) \
|
||||
(ResultProc2UPP)(userRoutine)
|
||||
#endif
|
||||
|
||||
typedef ResultProc2ProcPtr ResultProc2Ptr;
|
||||
|
||||
extern OSErr OpenResolver(char *fileName);
|
||||
extern OSErr StrToAddr(char *hostName, struct hostInfo *hostInfoPtr, ResultUPP ResultProc, char *userDataPtr);
|
||||
extern OSErr AddrToStr(unsigned long addr, char *addrStr);
|
||||
extern OSErr EnumCache(EnumResultUPP enumResultProc, char *userDataPtr);
|
||||
extern OSErr AddrToName(ip_addr addr, struct hostInfo *hostInfoPtr, ResultUPP ResultProc, char *userDataPtr);
|
||||
extern OSErr HInfo(char *hostName, struct returnRec *returnRecPtr, ResultProc2Ptr resultProc, char *userDataPtr);
|
||||
extern OSErr MXInfo(char *hostName, struct returnRec *returnRecPtr, ResultProc2Ptr resultProc, char *userDataPtr);
|
||||
extern OSErr CloseResolver(void);
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
|
|
@ -1,46 +0,0 @@
|
|||
/*
|
||||
File: GetMyIPAddr.h
|
||||
|
||||
Copyright: © 1984-1993 by Apple Computer, Inc., all rights reserved.
|
||||
|
||||
WARNING
|
||||
This file was auto generated by the interfacer tool. Modifications
|
||||
must be made to the master file.
|
||||
|
||||
*/
|
||||
|
||||
#ifndef __GETMYIPADDR__
|
||||
#define __GETMYIPADDR__
|
||||
|
||||
#ifndef __MACTCPCOMMONTYPES__
|
||||
#include <MacTCPCommonTypes.h>
|
||||
#endif
|
||||
|
||||
#define ipctlGetAddr 15 /* csCode to get our IP address */
|
||||
|
||||
#define GetIPParamBlockHeader \
|
||||
struct QElem *qLink; \
|
||||
short qType; \
|
||||
short ioTrap; \
|
||||
Ptr ioCmdAddr; \
|
||||
ProcPtr ioCompletion; \
|
||||
OSErr ioResult; \
|
||||
StringPtr ioNamePtr; \
|
||||
short ioVRefNum; \
|
||||
short ioCRefNum; \
|
||||
short csCode
|
||||
|
||||
#if defined(powerc) || defined (__powerc)
|
||||
#pragma options align=mac68k
|
||||
#endif
|
||||
struct GetAddrParamBlock {
|
||||
GetIPParamBlockHeader; /* standard I/O header */
|
||||
ip_addr ourAddress; /* our IP address */
|
||||
long ourNetMask; /* our IP net mask */
|
||||
};
|
||||
#if defined(powerc) || defined(__powerc)
|
||||
#pragma options align=reset
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
|
|
@ -1,220 +0,0 @@
|
|||
/*
|
||||
File: MacTCPCommonTypes.h
|
||||
|
||||
Copyright: © 1984-1993 by Apple Computer, Inc., all rights reserved.
|
||||
|
||||
WARNING
|
||||
This file was auto generated by the interfacer tool. Modifications
|
||||
must be made to the master file.
|
||||
|
||||
*/
|
||||
|
||||
#ifndef __MACTCPCOMMONTYPES__
|
||||
#define __MACTCPCOMMONTYPES__
|
||||
|
||||
#ifndef __TYPES__
|
||||
#include <Types.h>
|
||||
#endif
|
||||
|
||||
/* MacTCP return Codes in the range -23000 through -23049 */
|
||||
#define inProgress 1 /* I/O in progress */
|
||||
|
||||
#define ipBadLapErr -23000 /* bad network configuration */
|
||||
#define ipBadCnfgErr -23001 /* bad IP configuration error */
|
||||
#define ipNoCnfgErr -23002 /* missing IP or LAP configuration error */
|
||||
#define ipLoadErr -23003 /* error in MacTCP load */
|
||||
#define ipBadAddr -23004 /* error in getting address */
|
||||
#define connectionClosing -23005 /* connection is closing */
|
||||
#define invalidLength -23006
|
||||
#define connectionExists -23007 /* request conflicts with existing connection */
|
||||
#define connectionDoesntExist -23008 /* connection does not exist */
|
||||
#define insufficientResources -23009 /* insufficient resources to perform request */
|
||||
#define invalidStreamPtr -23010
|
||||
#define streamAlreadyOpen -23011
|
||||
#define connectionTerminated -23012
|
||||
#define invalidBufPtr -23013
|
||||
#define invalidRDS -23014
|
||||
#define invalidWDS -23014
|
||||
#define openFailed -23015
|
||||
#define commandTimeout -23016
|
||||
#define duplicateSocket -23017
|
||||
|
||||
/* Error codes from internal IP functions */
|
||||
#define ipDontFragErr -23032 /* Packet too large to send w/o fragmenting */
|
||||
#define ipDestDeadErr -23033 /* destination not responding */
|
||||
#define icmpEchoTimeoutErr -23035 /* ICMP echo timed-out */
|
||||
#define ipNoFragMemErr -23036 /* no memory to send fragmented pkt */
|
||||
#define ipRouteErr -23037 /* can't route packet off-net */
|
||||
|
||||
#define nameSyntaxErr -23041
|
||||
#define cacheFault -23042
|
||||
#define noResultProc -23043
|
||||
#define noNameServer -23044
|
||||
#define authNameErr -23045
|
||||
#define noAnsErr -23046
|
||||
#define dnrErr -23047
|
||||
#define outOfMemory -23048
|
||||
|
||||
#define BYTES_16WORD 2 /* bytes per 16 bit ip word */
|
||||
#define BYTES_32WORD 4 /* bytes per 32 bit ip word */
|
||||
#define BYTES_64WORD 8 /* bytes per 64 bit ip word */
|
||||
|
||||
typedef unsigned char b_8; /* 8-bit quantity */
|
||||
typedef unsigned short b_16; /* 16-bit quantity */
|
||||
typedef unsigned long b_32; /* 32-bit quantity */
|
||||
typedef b_32 ip_addr; /* IP address is 32-bits */
|
||||
|
||||
#if defined(powerc) || defined (__powerc)
|
||||
#pragma options align=mac68k
|
||||
#endif
|
||||
struct ip_addrbytes {
|
||||
union {
|
||||
b_32 addr;
|
||||
char byte[4];
|
||||
} a;
|
||||
};
|
||||
#if defined(powerc) || defined(__powerc)
|
||||
#pragma options align=reset
|
||||
#endif
|
||||
|
||||
typedef struct ip_addrbytes ip_addrbytes;
|
||||
|
||||
#if defined(powerc) || defined (__powerc)
|
||||
#pragma options align=mac68k
|
||||
#endif
|
||||
struct wdsEntry {
|
||||
unsigned short length;
|
||||
char *ptr;
|
||||
};
|
||||
#if defined(powerc) || defined(__powerc)
|
||||
#pragma options align=reset
|
||||
#endif
|
||||
|
||||
typedef struct wdsEntry wdsEntry;
|
||||
|
||||
#if defined(powerc) || defined (__powerc)
|
||||
#pragma options align=mac68k
|
||||
#endif
|
||||
struct rdsEntry {
|
||||
unsigned short length;
|
||||
char *ptr;
|
||||
};
|
||||
#if defined(powerc) || defined(__powerc)
|
||||
#pragma options align=reset
|
||||
#endif
|
||||
|
||||
typedef struct rdsEntry rdsEntry;
|
||||
|
||||
typedef unsigned long BufferPtr;
|
||||
|
||||
typedef unsigned long StreamPtr;
|
||||
|
||||
enum ICMPMsgType {
|
||||
netUnreach,
|
||||
hostUnreach,
|
||||
protocolUnreach,
|
||||
portUnreach,
|
||||
fragReqd,
|
||||
sourceRouteFailed,
|
||||
timeExceeded,
|
||||
parmProblem,
|
||||
missingOption,
|
||||
lastICMPMsgType = 32767
|
||||
};
|
||||
|
||||
typedef enum ICMPMsgType ICMPMsgType;
|
||||
|
||||
typedef b_16 ip_port;
|
||||
|
||||
#if defined(powerc) || defined (__powerc)
|
||||
#pragma options align=mac68k
|
||||
#endif
|
||||
struct ICMPReport {
|
||||
StreamPtr streamPtr;
|
||||
ip_addr localHost;
|
||||
ip_port localPort;
|
||||
ip_addr remoteHost;
|
||||
ip_port remotePort;
|
||||
short reportType;
|
||||
unsigned short optionalAddlInfo;
|
||||
unsigned long optionalAddlInfoPtr;
|
||||
};
|
||||
#if defined(powerc) || defined(__powerc)
|
||||
#pragma options align=reset
|
||||
#endif
|
||||
|
||||
typedef struct ICMPReport ICMPReport;
|
||||
|
||||
typedef OSErr (*OSErrProcPtr)();
|
||||
|
||||
enum {
|
||||
uppOSErrProcInfo = kCStackBased
|
||||
| RESULT_SIZE(SIZE_CODE(sizeof(OSErr)))
|
||||
};
|
||||
|
||||
#if USESROUTINEDESCRIPTORS
|
||||
typedef UniversalProcPtr OSErrUPP;
|
||||
|
||||
#define CallOSErrProc(userRoutine) \
|
||||
CallUniversalProc((UniversalProcPtr)userRoutine, uppOSErrProcInfo)
|
||||
#define NewOSErrProc(userRoutine) \
|
||||
(OSErrUPP) NewRoutineDescriptor((ProcPtr)userRoutine, uppOSErrProcInfo, GetCurrentISA())
|
||||
#else
|
||||
typedef OSErrProcPtr OSErrUPP;
|
||||
|
||||
#define CallOSErrProc(userRoutine) \
|
||||
(*userRoutine)()
|
||||
#define NewOSErrProc(userRoutine) \
|
||||
(OSErrUPP)(userRoutine)
|
||||
#endif
|
||||
|
||||
typedef Ptr (*PtrProcPtr)();
|
||||
|
||||
enum {
|
||||
uppPtrProcInfo = kCStackBased
|
||||
| RESULT_SIZE(SIZE_CODE(sizeof(Ptr)))
|
||||
};
|
||||
|
||||
#if USESROUTINEDESCRIPTORS
|
||||
typedef UniversalProcPtr PtrUPP;
|
||||
|
||||
#define CallPtrProc(userRoutine) \
|
||||
CallUniversalProc((UniversalProcPtr)userRoutine, uppPtrProcInfo)
|
||||
#define NewPtrProc(userRoutine) \
|
||||
(PtrUPP) NewRoutineDescriptor((ProcPtr)userRoutine, uppPtrProcInfo, GetCurrentISA())
|
||||
#else
|
||||
typedef PtrProcPtr PtrUPP;
|
||||
|
||||
#define CallPtrProc(userRoutine) \
|
||||
(*userRoutine)()
|
||||
#define NewPtrProc(userRoutine) \
|
||||
(PtrUPP)(userRoutine)
|
||||
#endif
|
||||
|
||||
typedef Boolean (*BooleanProcPtr)();
|
||||
|
||||
enum {
|
||||
uppBooleanProcInfo = kCStackBased
|
||||
| RESULT_SIZE(SIZE_CODE(sizeof(Boolean)))
|
||||
};
|
||||
|
||||
#if USESROUTINEDESCRIPTORS
|
||||
typedef UniversalProcPtr BooleanUPP;
|
||||
|
||||
#define CallBooleanProc(userRoutine) \
|
||||
CallUniversalProc((UniversalProcPtr)userRoutine, uppBooleanProcInfo)
|
||||
#define NewBooleanProc(userRoutine) \
|
||||
(BooleanUPP) NewRoutineDescriptor((ProcPtr)userRoutine, uppBooleanProcInfo, GetCurrentISA())
|
||||
#else
|
||||
typedef BooleanProcPtr BooleanUPP;
|
||||
|
||||
#define CallBooleanProc(userRoutine) \
|
||||
(*userRoutine)()
|
||||
#define NewBooleanProc(userRoutine) \
|
||||
(BooleanUPP)(userRoutine)
|
||||
#endif
|
||||
|
||||
typedef void (*voidProcPtr)();
|
||||
|
||||
#endif
|
||||
|
||||
|
|
@ -1,179 +0,0 @@
|
|||
/*
|
||||
File: MiscIPPB.h
|
||||
|
||||
Copyright: © 1984-1993 by Apple Computer, Inc., all rights reserved.
|
||||
|
||||
WARNING
|
||||
This file was auto generated by the interfacer tool. Modifications
|
||||
must be made to the master file.
|
||||
|
||||
*/
|
||||
|
||||
#ifndef __MISCIPPB__
|
||||
#define __MISCIPPB__
|
||||
|
||||
#ifndef __MACTCPCOMMONTYPES__
|
||||
#include <MacTCPCommonTypes.h>
|
||||
#endif
|
||||
|
||||
#ifndef __APPLETALK__
|
||||
#include <AppleTalk.h>
|
||||
#endif
|
||||
|
||||
#define ipctlEchoICMP 17 /* send icmp echo */
|
||||
#define ipctlLAPStats 19 /* get lap stats */
|
||||
|
||||
#define IPParamBlockHeader \
|
||||
struct QElem *qLink; \
|
||||
short qType; \
|
||||
short ioTrap; \
|
||||
Ptr ioCmdAddr; \
|
||||
ProcPtr ioCompletion; \
|
||||
OSErr ioResult; \
|
||||
StringPtr ioNamePtr; \
|
||||
short ioVRefNum; \
|
||||
short ioCRefNum; \
|
||||
short csCode
|
||||
|
||||
typedef void (*ICMPEchoNotifyProcPtr)(struct ICMPParamBlock *iopb);
|
||||
|
||||
enum {
|
||||
uppICMPEchoNotifyProcInfo = kCStackBased
|
||||
| STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(struct ICMPParamBlock*)))
|
||||
};
|
||||
|
||||
#if USESROUTINEDESCRIPTORS
|
||||
typedef UniversalProcPtr ICMPEchoNotifyUPP;
|
||||
|
||||
#define CallICMPEchoNotifyProc(userRoutine, iopb) \
|
||||
CallUniversalProc((UniversalProcPtr)userRoutine, uppICMPEchoNotifyProcInfo, iopb)
|
||||
#define NewICMPEchoNotifyProc(userRoutine) \
|
||||
(ICMPEchoNotifyUPP) NewRoutineDescriptor((ProcPtr)userRoutine, uppICMPEchoNotifyProcInfo, GetCurrentISA())
|
||||
#else
|
||||
typedef ICMPEchoNotifyProcPtr ICMPEchoNotifyUPP;
|
||||
|
||||
#define CallICMPEchoNotifyProc(userRoutine, iopb) \
|
||||
(*userRoutine)(iopb)
|
||||
#define NewICMPEchoNotifyProc(userRoutine) \
|
||||
(ICMPEchoNotifyUPP)(userRoutine)
|
||||
#endif
|
||||
|
||||
typedef ICMPEchoNotifyProcPtr ICMPEchoNotifyProc;
|
||||
|
||||
#if defined(powerc) || defined (__powerc)
|
||||
#pragma options align=mac68k
|
||||
#endif
|
||||
struct IPParamBlock {
|
||||
IPParamBlockHeader; /* standard I/O header */
|
||||
union {
|
||||
struct {
|
||||
ip_addr dest; /* echo to IP address */
|
||||
wdsEntry data;
|
||||
short timeout;
|
||||
Ptr options;
|
||||
unsigned short optLength;
|
||||
ICMPEchoNotifyProc icmpCompletion;
|
||||
unsigned long userDataPtr;
|
||||
} IPEchoPB;
|
||||
struct {
|
||||
struct LAPStats *lapStatsPtr;
|
||||
} LAPStatsPB;
|
||||
} csParam;
|
||||
};
|
||||
#if defined(powerc) || defined(__powerc)
|
||||
#pragma options align=reset
|
||||
#endif
|
||||
|
||||
#if defined(powerc) || defined (__powerc)
|
||||
#pragma options align=mac68k
|
||||
#endif
|
||||
struct ICMPParamBlock {
|
||||
IPParamBlockHeader; /* standard I/O header */
|
||||
short params[11];
|
||||
struct {
|
||||
unsigned long echoRequestOut; /* time in ticks of when the echo request went out */
|
||||
unsigned long echoReplyIn; /* time in ticks of when the reply was received */
|
||||
struct rdsEntry echoedData; /* data received in responce */
|
||||
Ptr options;
|
||||
unsigned long userDataPtr;
|
||||
} icmpEchoInfo;
|
||||
};
|
||||
#if defined(powerc) || defined(__powerc)
|
||||
#pragma options align=reset
|
||||
#endif
|
||||
|
||||
#if defined(powerc) || defined (__powerc)
|
||||
#pragma options align=mac68k
|
||||
#endif
|
||||
struct LAPStats {
|
||||
short ifType;
|
||||
char *ifString;
|
||||
short ifMaxMTU;
|
||||
long ifSpeed;
|
||||
short ifPhyAddrLength;
|
||||
char *ifPhysicalAddress;
|
||||
union {
|
||||
struct arp_entry *arp_table;
|
||||
struct nbp_entry *nbp_table;
|
||||
} AddrXlation;
|
||||
short slotNumber;
|
||||
};
|
||||
#if defined(powerc) || defined(__powerc)
|
||||
#pragma options align=reset
|
||||
#endif
|
||||
|
||||
typedef struct LAPStats LAPStats;
|
||||
|
||||
#define NBP_TABLE_SIZE 20
|
||||
|
||||
#define NBP_MAX_NAME_SIZE 16+10+2
|
||||
|
||||
#if defined(powerc) || defined (__powerc)
|
||||
#pragma options align=mac68k
|
||||
#endif
|
||||
struct nbp_entry {
|
||||
ip_addr ip_address; /* IP address */
|
||||
AddrBlock at_address; /* matching AppleTalk address */
|
||||
Boolean gateway; /* TRUE if entry for a gateway */
|
||||
Boolean valid; /* TRUE if LAP address is valid */
|
||||
Boolean probing; /* TRUE if NBP lookup pending */
|
||||
long age; /* ticks since cache entry verified */
|
||||
long access; /* ticks since last access */
|
||||
char filler[116]; /* for internal use only !!! */
|
||||
};
|
||||
#if defined(powerc) || defined(__powerc)
|
||||
#pragma options align=reset
|
||||
#endif
|
||||
|
||||
#define ARP_TABLE_SIZE 20 /* number of ARP table entries */
|
||||
|
||||
#if defined(powerc) || defined (__powerc)
|
||||
#pragma options align=mac68k
|
||||
#endif
|
||||
struct Enet_addr {
|
||||
b_16 en_hi;
|
||||
b_32 en_lo;
|
||||
};
|
||||
#if defined(powerc) || defined(__powerc)
|
||||
#pragma options align=reset
|
||||
#endif
|
||||
|
||||
typedef struct Enet_addr Enet_addr;
|
||||
|
||||
#if defined(powerc) || defined (__powerc)
|
||||
#pragma options align=mac68k
|
||||
#endif
|
||||
struct arp_entry {
|
||||
short age; /* cache aging field */
|
||||
b_16 protocol; /* Protocol type */
|
||||
ip_addr ip_address; /* IP address */
|
||||
Enet_addr en_address; /* matching Ethernet address */
|
||||
};
|
||||
#if defined(powerc) || defined(__powerc)
|
||||
#pragma options align=reset
|
||||
#endif
|
||||
|
||||
typedef struct arp_entry arp_entry;
|
||||
|
||||
#endif
|
||||
|
||||
|
|
@ -1,404 +0,0 @@
|
|||
/*
|
||||
File: TCPPB.h
|
||||
|
||||
Copyright: © 1984-1993 by Apple Computer, Inc., all rights reserved.
|
||||
|
||||
WARNING
|
||||
This file was auto generated by the interfacer tool. Modifications
|
||||
must be made to the master file.
|
||||
|
||||
*/
|
||||
|
||||
#ifndef __TCPPB__
|
||||
#define __TCPPB__
|
||||
|
||||
#ifndef __MACTCPCOMMONTYPES__
|
||||
#include <MacTCPCommonTypes.h>
|
||||
#endif
|
||||
|
||||
#define TCPCreate 30
|
||||
#define TCPPassiveOpen 31
|
||||
#define TCPActiveOpen 32
|
||||
#define TCPSend 34
|
||||
#define TCPNoCopyRcv 35
|
||||
#define TCPRcvBfrReturn 36
|
||||
#define TCPRcv 37
|
||||
#define TCPClose 38
|
||||
#define TCPAbort 39
|
||||
#define TCPStatus 40
|
||||
#define TCPExtendedStat 41
|
||||
#define TCPRelease 42
|
||||
#define TCPGlobalInfo 43
|
||||
#define TCPCtlMax 49
|
||||
|
||||
enum TCPEventCode {
|
||||
TCPClosing = 1,
|
||||
TCPULPTimeout,
|
||||
TCPTerminate,
|
||||
TCPDataArrival,
|
||||
TCPUrgent,
|
||||
TCPICMPReceived,
|
||||
lastEvent = 32767
|
||||
};
|
||||
|
||||
typedef enum TCPEventCode TCPEventCode;
|
||||
|
||||
enum TCPTerminationReason {
|
||||
TCPRemoteAbort = 2,
|
||||
TCPNetworkFailure,
|
||||
TCPSecPrecMismatch,
|
||||
TCPULPTimeoutTerminate,
|
||||
TCPULPAbort,
|
||||
TCPULPClose,
|
||||
TCPServiceError,
|
||||
lastReason = 32767
|
||||
};
|
||||
|
||||
// typedef TCPTerminationReason TCPTerminationReason;
|
||||
|
||||
typedef pascal void (*TCPNotifyProcPtr)(StreamPtr tcpStream, unsigned short eventCode, Ptr userDataPtr, unsigned short terminReason, struct ICMPReport *icmpMsg);
|
||||
|
||||
enum {
|
||||
uppTCPNotifyProcInfo = kPascalStackBased
|
||||
| STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(StreamPtr)))
|
||||
| STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(unsigned short)))
|
||||
| STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(Ptr)))
|
||||
| STACK_ROUTINE_PARAMETER(4, SIZE_CODE(sizeof(unsigned short)))
|
||||
| STACK_ROUTINE_PARAMETER(5, SIZE_CODE(sizeof(struct ICMPReport*)))
|
||||
};
|
||||
|
||||
#if USESROUTINEDESCRIPTORS
|
||||
typedef UniversalProcPtr TCPNotifyUPP;
|
||||
|
||||
#define CallTCPNotifyProc(userRoutine, tcpStream, eventCode, userDataPtr, terminReason, icmpMsg) \
|
||||
CallUniversalProc((UniversalProcPtr)userRoutine, uppTCPNotifyProcInfo, tcpStream, eventCode, userDataPtr, terminReason, icmpMsg)
|
||||
#define NewTCPNotifyProc(userRoutine) \
|
||||
(TCPNotifyUPP) NewRoutineDescriptor((ProcPtr)userRoutine, uppTCPNotifyProcInfo, GetCurrentISA())
|
||||
#else
|
||||
typedef TCPNotifyProcPtr TCPNotifyUPP;
|
||||
|
||||
#define CallTCPNotifyProc(userRoutine, tcpStream, eventCode, userDataPtr, terminReason, icmpMsg) \
|
||||
(*userRoutine)(tcpStream, eventCode, userDataPtr, terminReason, icmpMsg)
|
||||
#define NewTCPNotifyProc(userRoutine) \
|
||||
(TCPNotifyUPP)(userRoutine)
|
||||
#endif
|
||||
|
||||
typedef TCPNotifyProcPtr TCPNotifyProc;
|
||||
|
||||
typedef void (*TCPIOCompletionProcPtr)(struct TCPiopb *iopb);
|
||||
|
||||
enum {
|
||||
uppTCPIOCompletionProcInfo = kCStackBased
|
||||
| STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(struct TCPiopb*)))
|
||||
};
|
||||
|
||||
#if USESROUTINEDESCRIPTORS
|
||||
typedef UniversalProcPtr TCPIOCompletionUPP;
|
||||
|
||||
#define CallTCPIOCompletionProc(userRoutine, iopb) \
|
||||
CallUniversalProc((UniversalProcPtr)userRoutine, uppTCPIOCompletionProcInfo, iopb)
|
||||
#define NewTCPIOCompletionProc(userRoutine) \
|
||||
(TCPIOCompletionUPP) NewRoutineDescriptor((ProcPtr)userRoutine, uppTCPIOCompletionProcInfo, GetCurrentISA())
|
||||
#else
|
||||
typedef TCPIOCompletionProcPtr TCPIOCompletionUPP;
|
||||
|
||||
#define CallTCPIOCompletionProc(userRoutine, iopb) \
|
||||
(*userRoutine)(iopb)
|
||||
#define NewTCPIOCompletionProc(userRoutine) \
|
||||
(TCPIOCompletionUPP)(userRoutine)
|
||||
#endif
|
||||
|
||||
typedef TCPIOCompletionProcPtr TCPIOCompletionProc;
|
||||
|
||||
typedef unsigned short tcp_port;
|
||||
|
||||
typedef unsigned char byte;
|
||||
|
||||
enum { /* ValidityFlags */
|
||||
timeoutValue = 0x80,
|
||||
timeoutAction = 0x40,
|
||||
typeOfService = 0x20,
|
||||
precedence = 0x10
|
||||
};
|
||||
|
||||
enum { /* TOSFlags */
|
||||
lowDelay = 0x01,
|
||||
throughPut = 0x02,
|
||||
reliability = 0x04
|
||||
};
|
||||
|
||||
#if defined(powerc) || defined (__powerc)
|
||||
#pragma options align=mac68k
|
||||
#endif
|
||||
struct TCPCreatePB {
|
||||
Ptr rcvBuff;
|
||||
unsigned long rcvBuffLen;
|
||||
TCPNotifyUPP notifyProc;
|
||||
Ptr userDataPtr;
|
||||
};
|
||||
#if defined(powerc) || defined(__powerc)
|
||||
#pragma options align=reset
|
||||
#endif
|
||||
|
||||
typedef struct TCPCreatePB TCPCreatePB;
|
||||
|
||||
#if defined(powerc) || defined (__powerc)
|
||||
#pragma options align=mac68k
|
||||
#endif
|
||||
struct TCPOpenPB {
|
||||
byte ulpTimeoutValue;
|
||||
byte ulpTimeoutAction;
|
||||
byte validityFlags;
|
||||
byte commandTimeoutValue;
|
||||
ip_addr remoteHost;
|
||||
tcp_port remotePort;
|
||||
ip_addr localHost;
|
||||
tcp_port localPort;
|
||||
byte tosFlags;
|
||||
byte precedence;
|
||||
Boolean dontFrag;
|
||||
byte timeToLive;
|
||||
byte security;
|
||||
byte optionCnt;
|
||||
byte options[40];
|
||||
Ptr userDataPtr;
|
||||
};
|
||||
#if defined(powerc) || defined(__powerc)
|
||||
#pragma options align=reset
|
||||
#endif
|
||||
|
||||
typedef struct TCPOpenPB TCPOpenPB;
|
||||
|
||||
#if defined(powerc) || defined (__powerc)
|
||||
#pragma options align=mac68k
|
||||
#endif
|
||||
struct TCPSendPB {
|
||||
byte ulpTimeoutValue;
|
||||
byte ulpTimeoutAction;
|
||||
byte validityFlags;
|
||||
Boolean pushFlag;
|
||||
Boolean urgentFlag;
|
||||
Ptr wdsPtr;
|
||||
unsigned long sendFree;
|
||||
unsigned short sendLength;
|
||||
Ptr userDataPtr;
|
||||
};
|
||||
#if defined(powerc) || defined(__powerc)
|
||||
#pragma options align=reset
|
||||
#endif
|
||||
|
||||
typedef struct TCPSendPB TCPSendPB;
|
||||
|
||||
#if defined(powerc) || defined (__powerc)
|
||||
#pragma options align=mac68k
|
||||
#endif
|
||||
struct TCPReceivePB {
|
||||
byte commandTimeoutValue;
|
||||
byte filler;
|
||||
Boolean markFlag;
|
||||
Boolean urgentFlag;
|
||||
Ptr rcvBuff;
|
||||
unsigned short rcvBuffLen;
|
||||
Ptr rdsPtr;
|
||||
unsigned short rdsLength;
|
||||
unsigned short secondTimeStamp;
|
||||
Ptr userDataPtr;
|
||||
};
|
||||
#if defined(powerc) || defined(__powerc)
|
||||
#pragma options align=reset
|
||||
#endif
|
||||
|
||||
typedef struct TCPReceivePB TCPReceivePB;
|
||||
|
||||
#if defined(powerc) || defined (__powerc)
|
||||
#pragma options align=mac68k
|
||||
#endif
|
||||
struct TCPClosePB {
|
||||
byte ulpTimeoutValue;
|
||||
byte ulpTimeoutAction;
|
||||
byte validityFlags;
|
||||
Ptr userDataPtr;
|
||||
};
|
||||
#if defined(powerc) || defined(__powerc)
|
||||
#pragma options align=reset
|
||||
#endif
|
||||
|
||||
typedef struct TCPClosePB TCPClosePB;
|
||||
|
||||
#if defined(powerc) || defined (__powerc)
|
||||
#pragma options align=mac68k
|
||||
#endif
|
||||
struct HistoBucket {
|
||||
unsigned short value;
|
||||
unsigned long counter;
|
||||
};
|
||||
#if defined(powerc) || defined(__powerc)
|
||||
#pragma options align=reset
|
||||
#endif
|
||||
|
||||
typedef struct HistoBucket HistoBucket;
|
||||
|
||||
#define NumOfHistoBuckets 7
|
||||
|
||||
#if defined(powerc) || defined (__powerc)
|
||||
#pragma options align=mac68k
|
||||
#endif
|
||||
struct TCPConnectionStats {
|
||||
unsigned long dataPktsRcvd;
|
||||
unsigned long dataPktsSent;
|
||||
unsigned long dataPktsResent;
|
||||
unsigned long bytesRcvd;
|
||||
unsigned long bytesRcvdDup;
|
||||
unsigned long bytesRcvdPastWindow;
|
||||
unsigned long bytesSent;
|
||||
unsigned long bytesResent;
|
||||
unsigned short numHistoBuckets;
|
||||
struct HistoBucket sentSizeHisto[NumOfHistoBuckets];
|
||||
unsigned short lastRTT;
|
||||
unsigned short tmrSRTT;
|
||||
unsigned short rttVariance;
|
||||
unsigned short tmrRTO;
|
||||
byte sendTries;
|
||||
byte sourchQuenchRcvd;
|
||||
};
|
||||
#if defined(powerc) || defined(__powerc)
|
||||
#pragma options align=reset
|
||||
#endif
|
||||
|
||||
typedef struct TCPConnectionStats TCPConnectionStats;
|
||||
|
||||
#if defined(powerc) || defined (__powerc)
|
||||
#pragma options align=mac68k
|
||||
#endif
|
||||
struct TCPStatusPB {
|
||||
byte ulpTimeoutValue;
|
||||
byte ulpTimeoutAction;
|
||||
long unused;
|
||||
ip_addr remoteHost;
|
||||
tcp_port remotePort;
|
||||
ip_addr localHost;
|
||||
tcp_port localPort;
|
||||
byte tosFlags;
|
||||
byte precedence;
|
||||
byte connectionState;
|
||||
unsigned short sendWindow;
|
||||
unsigned short rcvWindow;
|
||||
unsigned short amtUnackedData;
|
||||
unsigned short amtUnreadData;
|
||||
Ptr securityLevelPtr;
|
||||
unsigned long sendUnacked;
|
||||
unsigned long sendNext;
|
||||
unsigned long congestionWindow;
|
||||
unsigned long rcvNext;
|
||||
unsigned long srtt;
|
||||
unsigned long lastRTT;
|
||||
unsigned long sendMaxSegSize;
|
||||
struct TCPConnectionStats *connStatPtr;
|
||||
Ptr userDataPtr;
|
||||
};
|
||||
#if defined(powerc) || defined(__powerc)
|
||||
#pragma options align=reset
|
||||
#endif
|
||||
|
||||
typedef struct TCPStatusPB TCPStatusPB;
|
||||
|
||||
#if defined(powerc) || defined (__powerc)
|
||||
#pragma options align=mac68k
|
||||
#endif
|
||||
struct TCPAbortPB {
|
||||
Ptr userDataPtr;
|
||||
};
|
||||
#if defined(powerc) || defined(__powerc)
|
||||
#pragma options align=reset
|
||||
#endif
|
||||
|
||||
typedef struct TCPAbortPB TCPAbortPB;
|
||||
|
||||
#if defined(powerc) || defined (__powerc)
|
||||
#pragma options align=mac68k
|
||||
#endif
|
||||
struct TCPParam {
|
||||
unsigned long tcpRtoA;
|
||||
unsigned long tcpRtoMin;
|
||||
unsigned long tcpRtoMax;
|
||||
unsigned long tcpMaxSegSize;
|
||||
unsigned long tcpMaxConn;
|
||||
unsigned long tcpMaxWindow;
|
||||
};
|
||||
#if defined(powerc) || defined(__powerc)
|
||||
#pragma options align=reset
|
||||
#endif
|
||||
|
||||
typedef struct TCPParam TCPParam;
|
||||
|
||||
#if defined(powerc) || defined (__powerc)
|
||||
#pragma options align=mac68k
|
||||
#endif
|
||||
struct TCPStats {
|
||||
unsigned long tcpConnAttempts;
|
||||
unsigned long tcpConnOpened;
|
||||
unsigned long tcpConnAccepted;
|
||||
unsigned long tcpConnClosed;
|
||||
unsigned long tcpConnAborted;
|
||||
unsigned long tcpOctetsIn;
|
||||
unsigned long tcpOctetsOut;
|
||||
unsigned long tcpOctetsInDup;
|
||||
unsigned long tcpOctetsRetrans;
|
||||
unsigned long tcpInputPkts;
|
||||
unsigned long tcpOutputPkts;
|
||||
unsigned long tcpDupPkts;
|
||||
unsigned long tcpRetransPkts;
|
||||
};
|
||||
#if defined(powerc) || defined(__powerc)
|
||||
#pragma options align=reset
|
||||
#endif
|
||||
|
||||
typedef struct TCPStats TCPStats;
|
||||
|
||||
#if defined(powerc) || defined (__powerc)
|
||||
#pragma options align=mac68k
|
||||
#endif
|
||||
struct TCPGlobalInfoPB {
|
||||
struct TCPParam *tcpParamPtr;
|
||||
struct TCPStats *tcpStatsPtr;
|
||||
StreamPtr *tcpCDBTable[1];
|
||||
Ptr userDataPtr;
|
||||
unsigned short maxTCPConnections;
|
||||
};
|
||||
#if defined(powerc) || defined(__powerc)
|
||||
#pragma options align=reset
|
||||
#endif
|
||||
|
||||
typedef struct TCPGlobalInfoPB TCPGlobalInfoPB;
|
||||
|
||||
#if defined(powerc) || defined (__powerc)
|
||||
#pragma options align=mac68k
|
||||
#endif
|
||||
struct TCPiopb {
|
||||
char fill12[12];
|
||||
TCPIOCompletionProc ioCompletion;
|
||||
short ioResult;
|
||||
char *ioNamePtr;
|
||||
short ioVRefNum;
|
||||
short ioCRefNum;
|
||||
short csCode;
|
||||
StreamPtr tcpStream;
|
||||
union {
|
||||
struct TCPCreatePB create;
|
||||
struct TCPOpenPB open;
|
||||
struct TCPSendPB send;
|
||||
struct TCPReceivePB receive;
|
||||
struct TCPClosePB close;
|
||||
struct TCPAbortPB abort;
|
||||
struct TCPStatusPB status;
|
||||
struct TCPGlobalInfoPB globalInfo;
|
||||
} csParam;
|
||||
};
|
||||
#if defined(powerc) || defined(__powerc)
|
||||
#pragma options align=reset
|
||||
#endif
|
||||
|
||||
typedef struct TCPiopb TCPiopb;
|
||||
|
||||
#endif
|
||||
|
||||
|
|
@ -1,190 +0,0 @@
|
|||
/*
|
||||
File: UDPPB.h
|
||||
|
||||
Copyright: © 1984-1993 by Apple Computer, Inc., all rights reserved.
|
||||
|
||||
WARNING
|
||||
This file was auto generated by the interfacer tool. Modifications
|
||||
must be made to the master file.
|
||||
|
||||
*/
|
||||
|
||||
#ifndef __UDPPB__
|
||||
#define __UDPPB__
|
||||
|
||||
#ifndef __MACTCPCOMMONTYPES__
|
||||
#include <MacTCPCommonTypes.h>
|
||||
#endif
|
||||
|
||||
#define UDPCreate 20
|
||||
#define UDPRead 21
|
||||
#define UDPBfrReturn 22
|
||||
#define UDPWrite 23
|
||||
#define UDPRelease 24
|
||||
#define UDPMaxMTUSize 25
|
||||
#define UDPStatus 26
|
||||
#define UDPMultiCreate 27
|
||||
#define UDPMultiSend 28
|
||||
#define UDPMultiRead 29
|
||||
#define UDPCtlMax 29
|
||||
|
||||
enum UDPEventCode {
|
||||
UDPDataArrival = 1,
|
||||
UDPICMPReceived,
|
||||
lastUDPEvent = 32767
|
||||
};
|
||||
|
||||
typedef enum UDPEventCode UDPEventCode;
|
||||
|
||||
typedef pascal void (*UDPNotifyProcPtr)(StreamPtr udpStream, unsigned short eventCode, Ptr userDataPtr, struct ICMPReport *icmpMsg);
|
||||
|
||||
enum {
|
||||
uppUDPNotifyProcInfo = kPascalStackBased
|
||||
| STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(StreamPtr)))
|
||||
| STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(unsigned short)))
|
||||
| STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(Ptr)))
|
||||
| STACK_ROUTINE_PARAMETER(4, SIZE_CODE(sizeof(struct ICMPReport*)))
|
||||
};
|
||||
|
||||
#if USESROUTINEDESCRIPTORS
|
||||
typedef UniversalProcPtr UDPNotifyUPP;
|
||||
|
||||
#define CallUDPNotifyProc(userRoutine, udpStream, eventCode, userDataPtr, icmpMsg) \
|
||||
CallUniversalProc((UniversalProcPtr)userRoutine, uppUDPNotifyProcInfo, udpStream, eventCode, userDataPtr, icmpMsg)
|
||||
#define NewUDPNotifyProc(userRoutine) \
|
||||
(UDPNotifyUPP) NewRoutineDescriptor((ProcPtr)userRoutine, uppUDPNotifyProcInfo, GetCurrentISA())
|
||||
#else
|
||||
typedef UDPNotifyProcPtr UDPNotifyUPP;
|
||||
|
||||
#define CallUDPNotifyProc(userRoutine, udpStream, eventCode, userDataPtr, icmpMsg) \
|
||||
(*userRoutine)(udpStream, eventCode, userDataPtr, icmpMsg)
|
||||
#define NewUDPNotifyProc(userRoutine) \
|
||||
(UDPNotifyUPP)(userRoutine)
|
||||
#endif
|
||||
|
||||
typedef UDPNotifyProcPtr UDPNotifyProc;
|
||||
|
||||
typedef void (*UDPIOCompletionProcPtr)(struct UDPiopb *iopb);
|
||||
|
||||
enum {
|
||||
uppUDPIOCompletionProcInfo = kCStackBased
|
||||
| STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(struct UDPiopb*)))
|
||||
};
|
||||
|
||||
#if USESROUTINEDESCRIPTORS
|
||||
typedef UniversalProcPtr UDPIOCompletionUPP;
|
||||
|
||||
#define CallUDPIOCompletionProc(userRoutine, iopb) \
|
||||
CallUniversalProc((UniversalProcPtr)userRoutine, uppUDPIOCompletionProcInfo, iopb)
|
||||
#define NewUDPIOCompletionProc(userRoutine) \
|
||||
(UDPIOCompletionUPP) NewRoutineDescriptor((ProcPtr)userRoutine, uppUDPIOCompletionProcInfo, GetCurrentISA())
|
||||
#else
|
||||
typedef UDPIOCompletionProcPtr UDPIOCompletionUPP;
|
||||
|
||||
#define CallUDPIOCompletionProc(userRoutine, iopb) \
|
||||
(*userRoutine)(iopb)
|
||||
#define NewUDPIOCompletionProc(userRoutine) \
|
||||
(UDPIOCompletionUPP)(userRoutine)
|
||||
#endif
|
||||
|
||||
typedef UDPIOCompletionProcPtr UDPIOCompletionProc;
|
||||
|
||||
typedef unsigned short udp_port;
|
||||
|
||||
#if defined(powerc) || defined (__powerc)
|
||||
#pragma options align=mac68k
|
||||
#endif
|
||||
struct UDPCreatePB { /* for create and release calls */
|
||||
Ptr rcvBuff;
|
||||
unsigned long rcvBuffLen;
|
||||
UDPNotifyProc notifyProc;
|
||||
unsigned short localPort;
|
||||
Ptr userDataPtr;
|
||||
udp_port endingPort;
|
||||
};
|
||||
#if defined(powerc) || defined(__powerc)
|
||||
#pragma options align=reset
|
||||
#endif
|
||||
|
||||
typedef struct UDPCreatePB UDPCreatePB;
|
||||
|
||||
#if defined(powerc) || defined (__powerc)
|
||||
#pragma options align=mac68k
|
||||
#endif
|
||||
struct UDPSendPB {
|
||||
unsigned short reserved;
|
||||
ip_addr remoteHost;
|
||||
udp_port remotePort;
|
||||
Ptr wdsPtr;
|
||||
Boolean checkSum;
|
||||
unsigned short sendLength;
|
||||
Ptr userDataPtr;
|
||||
udp_port localPort;
|
||||
};
|
||||
#if defined(powerc) || defined(__powerc)
|
||||
#pragma options align=reset
|
||||
#endif
|
||||
|
||||
typedef struct UDPSendPB UDPSendPB;
|
||||
|
||||
#if defined(powerc) || defined (__powerc)
|
||||
#pragma options align=mac68k
|
||||
#endif
|
||||
struct UDPReceivePB { /* for receive and buffer return calls */
|
||||
unsigned short timeOut;
|
||||
ip_addr remoteHost;
|
||||
udp_port remotePort;
|
||||
Ptr rcvBuff;
|
||||
unsigned short rcvBuffLen;
|
||||
unsigned short secondTimeStamp;
|
||||
Ptr userDataPtr;
|
||||
ip_addr destHost; /* only for use with multi rcv */
|
||||
udp_port destPort; /* only for use with multi rcv */
|
||||
};
|
||||
#if defined(powerc) || defined(__powerc)
|
||||
#pragma options align=reset
|
||||
#endif
|
||||
|
||||
typedef struct UDPReceivePB UDPReceivePB;
|
||||
|
||||
#if defined(powerc) || defined (__powerc)
|
||||
#pragma options align=mac68k
|
||||
#endif
|
||||
struct UDPMTUPB {
|
||||
unsigned short mtuSize;
|
||||
ip_addr remoteHost;
|
||||
Ptr userDataPtr;
|
||||
};
|
||||
#if defined(powerc) || defined(__powerc)
|
||||
#pragma options align=reset
|
||||
#endif
|
||||
|
||||
typedef struct UDPMTUPB UDPMTUPB;
|
||||
|
||||
#if defined(powerc) || defined (__powerc)
|
||||
#pragma options align=mac68k
|
||||
#endif
|
||||
struct UDPiopb {
|
||||
char fill12[12];
|
||||
UDPIOCompletionProc ioCompletion;
|
||||
short ioResult;
|
||||
char *ioNamePtr;
|
||||
short ioVRefNum;
|
||||
short ioCRefNum;
|
||||
short csCode;
|
||||
StreamPtr udpStream;
|
||||
union {
|
||||
struct UDPCreatePB create;
|
||||
struct UDPSendPB send;
|
||||
struct UDPReceivePB receive;
|
||||
struct UDPMTUPB mtu;
|
||||
} csParam;
|
||||
};
|
||||
#if defined(powerc) || defined(__powerc)
|
||||
#pragma options align=reset
|
||||
#endif
|
||||
|
||||
typedef struct UDPiopb UDPiopb;
|
||||
|
||||
#endif
|
||||
|
||||
|
|
@ -1,529 +0,0 @@
|
|||
/*
|
||||
DNR.c - DNR library for MPW
|
||||
|
||||
© Copyright 1988 by Apple Computer. All rights reserved
|
||||
|
||||
*/
|
||||
|
||||
#define MPW3.0
|
||||
|
||||
#include <OSUtils.h>
|
||||
#include <Errors.h>
|
||||
#include <Files.h>
|
||||
#include <Resources.h>
|
||||
#include <Memory.h>
|
||||
#include <Traps.h>
|
||||
#include <GestaltEqu.h>
|
||||
#include <Folders.h>
|
||||
#include <MixedMode.h>
|
||||
#include <ToolUtils.h>
|
||||
#include "AddressXlation.h"
|
||||
|
||||
/*
|
||||
* function prototypes
|
||||
*/
|
||||
static void GetSystemFolder(short *vRefNumP, long *dirIDP);
|
||||
static void GetCPanelFolder(short *vRefNumP, long *dirIDP);
|
||||
static short SearchFolderForDNRP(long targetType, long targetCreator, short vRefNum,
|
||||
long dirID);
|
||||
static short OpenOurRF( void );
|
||||
|
||||
|
||||
#define OPENRESOLVER 1L
|
||||
#define CLOSERESOLVER 2L
|
||||
#define STRTOADDR 3L
|
||||
#define ADDRTOSTR 4L
|
||||
#define ENUMCACHE 5L
|
||||
#define ADDRTONAME 6L
|
||||
#define HINFO 7L
|
||||
#define MXINFO 8L
|
||||
|
||||
Handle codeHndl = nil;
|
||||
UniversalProcPtr dnr = nil;
|
||||
|
||||
|
||||
static TrapType GetTrapType(unsigned long theTrap)
|
||||
{
|
||||
if (BitAnd(theTrap, 0x0800) > 0)
|
||||
return(ToolTrap);
|
||||
else
|
||||
return(OSTrap);
|
||||
}
|
||||
|
||||
static Boolean TrapAvailable(unsigned long trap)
|
||||
{
|
||||
TrapType trapType = ToolTrap;
|
||||
unsigned long numToolBoxTraps;
|
||||
|
||||
if (NGetTrapAddress(_InitGraf, ToolTrap) == NGetTrapAddress(0xAA6E, ToolTrap))
|
||||
numToolBoxTraps = 0x200;
|
||||
else
|
||||
numToolBoxTraps = 0x400;
|
||||
|
||||
trapType = GetTrapType(trap);
|
||||
if (trapType == ToolTrap) {
|
||||
trap = BitAnd(trap, 0x07FF);
|
||||
if (trap >= numToolBoxTraps)
|
||||
trap = _Unimplemented;
|
||||
}
|
||||
return(NGetTrapAddress(trap, trapType) != NGetTrapAddress(_Unimplemented, ToolTrap));
|
||||
|
||||
}
|
||||
|
||||
static void GetSystemFolder(short *vRefNumP, long *dirIDP)
|
||||
{
|
||||
SysEnvRec info;
|
||||
long wdProcID;
|
||||
|
||||
SysEnvirons(1, &info);
|
||||
if (GetWDInfo(info.sysVRefNum, vRefNumP, dirIDP, &wdProcID) != noErr) {
|
||||
*vRefNumP = 0;
|
||||
*dirIDP = 0;
|
||||
}
|
||||
}
|
||||
|
||||
static void GetCPanelFolder(short *vRefNumP, long *dirIDP)
|
||||
{
|
||||
Boolean hasFolderMgr = false;
|
||||
long feature;
|
||||
|
||||
if (Gestalt(gestaltFindFolderAttr, &feature) == noErr)
|
||||
hasFolderMgr = true;
|
||||
if (!hasFolderMgr) {
|
||||
GetSystemFolder(vRefNumP, dirIDP);
|
||||
return;
|
||||
}
|
||||
else {
|
||||
if (FindFolder(kOnSystemDisk, kControlPanelFolderType, kDontCreateFolder, vRefNumP, dirIDP) != noErr) {
|
||||
*vRefNumP = 0;
|
||||
*dirIDP = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* SearchFolderForDNRP is called to search a folder for files that might
|
||||
contain the 'dnrp' resource */
|
||||
static short SearchFolderForDNRP(long targetType, long targetCreator, short vRefNum, long dirID)
|
||||
{
|
||||
HParamBlockRec fi;
|
||||
Str255 filename;
|
||||
short refnum;
|
||||
|
||||
fi.fileParam.ioCompletion = nil;
|
||||
fi.fileParam.ioNamePtr = filename;
|
||||
fi.fileParam.ioVRefNum = vRefNum;
|
||||
fi.fileParam.ioDirID = dirID;
|
||||
fi.fileParam.ioFDirIndex = 1;
|
||||
|
||||
while (PBHGetFInfoSync(&fi) == noErr) {
|
||||
/* scan system folder for driver resource files of specific type & creator */
|
||||
if (fi.fileParam.ioFlFndrInfo.fdType == targetType &&
|
||||
fi.fileParam.ioFlFndrInfo.fdCreator == targetCreator) {
|
||||
/* found the MacTCP driver file? */
|
||||
refnum = HOpenResFile(vRefNum, dirID, filename, fsRdPerm);
|
||||
if (GetIndResource('dnrp', 1) == NULL)
|
||||
CloseResFile(refnum);
|
||||
else
|
||||
return refnum;
|
||||
}
|
||||
/* check next file in system folder */
|
||||
fi.fileParam.ioFDirIndex++;
|
||||
fi.fileParam.ioDirID = dirID; /* PBHGetFInfo() clobbers ioDirID */
|
||||
}
|
||||
return(-1);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* OpenOurRF is called to open the MacTCP driver resources */
|
||||
|
||||
static short OpenOurRF()
|
||||
{
|
||||
short refnum;
|
||||
short vRefNum;
|
||||
long dirID;
|
||||
|
||||
/* first search Control Panels for MacTCP 1.1 */
|
||||
GetCPanelFolder(&vRefNum, &dirID);
|
||||
refnum = SearchFolderForDNRP('cdev', 'ztcp', vRefNum, dirID);
|
||||
if (refnum != -1) return(refnum);
|
||||
|
||||
/* next search System Folder for MacTCP 1.0.x */
|
||||
GetSystemFolder(&vRefNum, &dirID);
|
||||
refnum = SearchFolderForDNRP('cdev', 'mtcp', vRefNum, dirID);
|
||||
if (refnum != -1) return(refnum);
|
||||
|
||||
/* finally, search Control Panels for MacTCP 1.0.x */
|
||||
GetCPanelFolder(&vRefNum, &dirID);
|
||||
refnum = SearchFolderForDNRP('cdev', 'mtcp', vRefNum, dirID);
|
||||
if (refnum != -1) return(refnum);
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
typedef OSErr (*OpenResolverProcPtr)(long selector, char* fileName);
|
||||
|
||||
enum {
|
||||
uppOpenResolverProcInfo = kCStackBased
|
||||
| RESULT_SIZE(SIZE_CODE(sizeof(short)))
|
||||
| STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(short)))
|
||||
| STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(char *)))
|
||||
};
|
||||
|
||||
#if USESROUTINEDESCRIPTORS
|
||||
typedef UniversalProcPtr OpenResolverUPP;
|
||||
|
||||
#define NewOpenResolverProc(userRoutine) \
|
||||
(OpenResolverUPP) NewRoutineDescriptor(userRoutine, uppOpenResolverProcInfo, GetCurrentISA())
|
||||
#define CallOpenResolverProc(userRoutine, selector, filename) \
|
||||
CallUniversalProc(userRoutine, uppOpenResolverProcInfo, selector, filename)
|
||||
#else
|
||||
typedef OpenResolverProcPtr OpenResolverUPP;
|
||||
|
||||
#define NewOpenResolverProc(userRoutine) \
|
||||
(OpenResolverUPP)(userRoutine)
|
||||
#define CallOpenResolverProc(userRoutine, selector, filename) \
|
||||
(*(OpenResolverProcPtr)userRoutine)(selector, filename)
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
OSErr OpenResolver(char *fileName)
|
||||
{
|
||||
short refnum;
|
||||
OSErr rc;
|
||||
|
||||
if (dnr != nil)
|
||||
/* resolver already loaded in */
|
||||
return(noErr);
|
||||
|
||||
/* open the MacTCP driver to get DNR resources. Search for it based on
|
||||
creator & type rather than simply file name */
|
||||
refnum = OpenOurRF();
|
||||
|
||||
/* ignore failures since the resource may have been installed in the
|
||||
System file if running on a Mac 512Ke */
|
||||
|
||||
/* load in the DNR resource package */
|
||||
codeHndl = GetIndResource('dnrp', 1);
|
||||
if (codeHndl == nil) {
|
||||
/* can't open DNR */
|
||||
return(ResError());
|
||||
}
|
||||
|
||||
DetachResource(codeHndl);
|
||||
if (refnum != -1) {
|
||||
CloseWD(refnum);
|
||||
CloseResFile(refnum);
|
||||
}
|
||||
|
||||
/* lock the DNR resource since it cannot be relocated while opened */
|
||||
HLock(codeHndl);
|
||||
dnr = (UniversalProcPtr) *codeHndl;
|
||||
|
||||
/* call open resolver */
|
||||
rc = CallOpenResolverProc(dnr, OPENRESOLVER, fileName);
|
||||
if (rc != noErr) {
|
||||
/* problem with open resolver, flush it */
|
||||
HUnlock(codeHndl);
|
||||
DisposeHandle(codeHndl);
|
||||
dnr = nil;
|
||||
}
|
||||
return(rc);
|
||||
}
|
||||
|
||||
|
||||
|
||||
typedef OSErr (*CloseResolverProcPtr)(long selector);
|
||||
|
||||
enum {
|
||||
uppCloseResolverProcInfo = kCStackBased
|
||||
| RESULT_SIZE(SIZE_CODE(sizeof(short)))
|
||||
| STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(short)))
|
||||
};
|
||||
|
||||
#if USESROUTINEDESCRIPTORS
|
||||
typedef UniversalProcPtr CloseResolverUPP;
|
||||
|
||||
#define NewCloseResolverProc(userRoutine) \
|
||||
(CloseResolverUPP) NewRoutineDescriptor(userRoutine, uppCloseResolverProcInfo, GetCurrentISA())
|
||||
#define CallCloseResolverProc(userRoutine, selector) \
|
||||
CallUniversalProc(userRoutine, uppCloseResolverProcInfo, selector)
|
||||
#else
|
||||
typedef CloseResolverProcPtr CloseResolverUPP;
|
||||
|
||||
#define NewCloseResolverProc(userRoutine) \
|
||||
(CloseResolverUPP)(userRoutine)
|
||||
#define CallCloseResolverProc(userRoutine, selector) \
|
||||
(*(CloseResolverProcPtr)userRoutine)(selector)
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
OSErr CloseResolver()
|
||||
{
|
||||
if (dnr == nil)
|
||||
/* resolver not loaded error */
|
||||
return(notOpenErr);
|
||||
|
||||
/* call close resolver */
|
||||
CallCloseResolverProc(dnr, CLOSERESOLVER);
|
||||
|
||||
/* release the DNR resource package */
|
||||
HUnlock(codeHndl);
|
||||
DisposeHandle(codeHndl);
|
||||
dnr = nil;
|
||||
return(noErr);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
typedef OSErr (*StrToAddrProcPtr)(long selector, char* hostName, struct hostInfo* rtnStruct,
|
||||
long resultProc, char* userData);
|
||||
|
||||
enum {
|
||||
uppStrToAddrProcInfo = kCStackBased
|
||||
| RESULT_SIZE(SIZE_CODE(sizeof(short)))
|
||||
| STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(short)))
|
||||
| STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(char *)))
|
||||
| STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(struct hostInfo *)))
|
||||
| STACK_ROUTINE_PARAMETER(4, SIZE_CODE(sizeof(long)))
|
||||
| STACK_ROUTINE_PARAMETER(5, SIZE_CODE(sizeof(char *)))
|
||||
};
|
||||
|
||||
#if USESROUTINEDESCRIPTORS
|
||||
typedef UniversalProcPtr StrToAddrUPP;
|
||||
|
||||
#define NewStrToAddrProc(userRoutine) \
|
||||
(StrToAddrUPP) NewRoutineDescriptor(userRoutine, uppStrToAddrProcInfo, GetCurrentISA())
|
||||
#define CallStrToAddrProc(userRoutine, selector, hostName, rtnStruct, resultProc, userData) \
|
||||
CallUniversalProc(userRoutine, uppStrToAddrProcInfo, selector, hostName, rtnStruct, resultProc, userData)
|
||||
#else
|
||||
typedef StrToAddrProcPtr StrToAddrUPP;
|
||||
|
||||
#define NewStrToAddrProc(userRoutine) \
|
||||
(StrToAddrUPP)(userRoutine)
|
||||
#define CallStrToAddrProc(userRoutine, selector, hostName, rtnStruct, resultProc, userData) \
|
||||
(*(StrToAddrProcPtr)userRoutine)(selector, hostName, rtnStruct, resultProc, userData)
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
OSErr StrToAddr(char *hostName, struct hostInfo *rtnStruct, ResultUPP resultupp, char *userDataPtr)
|
||||
{
|
||||
if (dnr == nil)
|
||||
/* resolver not loaded error */
|
||||
return(notOpenErr);
|
||||
|
||||
return(CallStrToAddrProc(dnr, STRTOADDR, hostName, rtnStruct, (long)resultupp, userDataPtr));
|
||||
}
|
||||
|
||||
|
||||
typedef OSErr (*AddrToStrProcPtr)(long selector, long address, char* hostName);
|
||||
|
||||
enum {
|
||||
uppAddrToStrProcInfo = kCStackBased
|
||||
| RESULT_SIZE(SIZE_CODE(sizeof(short)))
|
||||
| STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(short)))
|
||||
| STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(unsigned long)))
|
||||
| STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(char *)))
|
||||
};
|
||||
|
||||
#if USESROUTINEDESCRIPTORS
|
||||
typedef UniversalProcPtr AddrToStrUPP;
|
||||
|
||||
#define NewAddrToStrProc(userRoutine) \
|
||||
(AddrToStrUPP) NewRoutineDescriptor(userRoutine, uppAddrToStrProcInfo, GetCurrentISA())
|
||||
#define CallAddrToStrProc(userRoutine, selector, address, hostName) \
|
||||
CallUniversalProc(userRoutine, uppAddrToStrProcInfo, selector, address, hostName)
|
||||
#else
|
||||
typedef AddrToStrProcPtr AddrToStrUPP;
|
||||
|
||||
#define NewAddrToStrProc(userRoutine) \
|
||||
(AddrToStrUPP)(userRoutine)
|
||||
#define CallAddrToStrProc(userRoutine, selector, address, hostName) \
|
||||
(*(AddrToStrProcPtr)userRoutine)(selector, address, hostName)
|
||||
#endif
|
||||
|
||||
|
||||
OSErr AddrToStr(unsigned long addr, char *addrStr)
|
||||
{
|
||||
if (dnr == nil)
|
||||
/* resolver not loaded error */
|
||||
return(notOpenErr);
|
||||
|
||||
CallAddrToStrProc(dnr, ADDRTOSTR, addr, addrStr);
|
||||
|
||||
return(noErr);
|
||||
}
|
||||
|
||||
|
||||
|
||||
typedef OSErr (*EnumCacheProcPtr)(long selector, long result, char* userData);
|
||||
|
||||
enum {
|
||||
uppEnumCacheProcInfo = kCStackBased
|
||||
| RESULT_SIZE(SIZE_CODE(sizeof(short)))
|
||||
| STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(short)))
|
||||
| STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(long)))
|
||||
| STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(char *)))
|
||||
};
|
||||
|
||||
#if USESROUTINEDESCRIPTORS
|
||||
typedef UniversalProcPtr EnumCacheUPP;
|
||||
|
||||
#define NewEnumCacheProc(userRoutine) \
|
||||
(EnumCacheUPP) NewRoutineDescriptor(userRoutine, uppEnumCacheProcInfo, GetCurrentISA())
|
||||
#define CallEnumCacheProc(userRoutine, selector, result, userData) \
|
||||
CallUniversalProc(userRoutine, uppEnumCacheProcInfo, selector, result, userData)
|
||||
#else
|
||||
typedef EnumCacheProcPtr EnumCacheUPP;
|
||||
|
||||
#define NewEnumCacheProc(userRoutine) \
|
||||
(EnumCacheUPP)(userRoutine)
|
||||
#define CallEnumCacheProc(userRoutine, selector, result, userData) \
|
||||
(*(EnumCacheProcPtr)userRoutine)(selector, result, userData)
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
OSErr EnumCache(EnumResultUPP resultupp, char *userDataPtr)
|
||||
{
|
||||
if (dnr == nil)
|
||||
/* resolver not loaded error */
|
||||
return(notOpenErr);
|
||||
|
||||
return(CallEnumCacheProc(dnr, ENUMCACHE, (long)resultupp, userDataPtr));
|
||||
}
|
||||
|
||||
|
||||
|
||||
typedef OSErr (*AddrToNameProcPtr)(long selector, unsigned long addr, struct hostInfo* rtnStruct,
|
||||
long resultProc, char* userData);
|
||||
|
||||
enum {
|
||||
uppAddrToNameProcInfo = kCStackBased
|
||||
| RESULT_SIZE(SIZE_CODE(sizeof(short)))
|
||||
| STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(short)))
|
||||
| STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(unsigned long)))
|
||||
| STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(struct hostInfo *)))
|
||||
| STACK_ROUTINE_PARAMETER(4, SIZE_CODE(sizeof(long)))
|
||||
| STACK_ROUTINE_PARAMETER(5, SIZE_CODE(sizeof(char *)))
|
||||
|
||||
};
|
||||
|
||||
#if USESROUTINEDESCRIPTORS
|
||||
typedef UniversalProcPtr AddrToNameUPP;
|
||||
|
||||
#define NewAddrToNameProc(userRoutine) \
|
||||
(AddrToNameUPP) NewRoutineDescriptor(userRoutine, uppAddrToNameProcInfo, GetCurrentISA())
|
||||
#define CallAddrToNameProc(userRoutine, selector, addr, rtnStruct, resultProc, userData) \
|
||||
CallUniversalProc(userRoutine, uppAddrToNameProcInfo, selector, addr, rtnStruct, resultProc, userData)
|
||||
#else
|
||||
typedef AddrToNameProcPtr AddrToNameUPP;
|
||||
|
||||
#define NewAddrToNameProc(userRoutine) \
|
||||
(AddrToNameUPP)(userRoutine)
|
||||
#define CallAddrToNameProc(userRoutine, selector, addr, rtnStruct, resultProc, userData) \
|
||||
(*(AddrToNameProcPtr)userRoutine)(selector, addr, rtnStruct, resultProc, userData)
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
OSErr AddrToName(unsigned long addr, struct hostInfo *rtnStruct, ResultUPP resultupp,
|
||||
char *userDataPtr)
|
||||
{
|
||||
if (dnr == nil)
|
||||
/* resolver not loaded error */
|
||||
return(notOpenErr);
|
||||
|
||||
return(CallAddrToNameProc(dnr, ADDRTONAME, addr, rtnStruct, (long)resultupp, userDataPtr));
|
||||
}
|
||||
|
||||
|
||||
typedef OSErr (*HInfoProcPtr)(long selector, char* hostName, struct returnRec* returnRecPtr,
|
||||
long resultProc, char* userData);
|
||||
|
||||
enum {
|
||||
uppHInfoProcInfo = kCStackBased
|
||||
| RESULT_SIZE(SIZE_CODE(sizeof(short)))
|
||||
| STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(short)))
|
||||
| STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(char *)))
|
||||
| STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(struct returnRec *)))
|
||||
| STACK_ROUTINE_PARAMETER(4, SIZE_CODE(sizeof(long)))
|
||||
| STACK_ROUTINE_PARAMETER(5, SIZE_CODE(sizeof(char *)))
|
||||
|
||||
};
|
||||
|
||||
#if USESROUTINEDESCRIPTORS
|
||||
typedef UniversalProcPtr HInfoUPP;
|
||||
|
||||
#define NewHInfoProc(userRoutine) \
|
||||
(HInfoUPP) NewRoutineDescriptor(userRoutine, uppHInfoProcInfo, GetCurrentISA())
|
||||
#define CallHInfoProc(userRoutine, selector, hostName, returnRecPtr, resultProc, userData) \
|
||||
CallUniversalProc(userRoutine, uppHInfoProcInfo, selector, hostName, returnRecPtr, resultProc, userData)
|
||||
#else
|
||||
typedef HInfoProcPtr HInfoUPP;
|
||||
|
||||
#define NewHInfoProc(userRoutine) \
|
||||
(HInfoUPP)(userRoutine)
|
||||
#define CallHInfoProc(userRoutine, selector, hostName, returnRecPtr, resultProc, userData) \
|
||||
(*(HInfoProcPtr)userRoutine)( selector, hostName, returnRecPtr, resultProc, userData)
|
||||
#endif
|
||||
|
||||
extern OSErr HInfo(char *hostName, struct returnRec *returnRecPtr, ResultProc2Ptr resultProc,
|
||||
char *userDataPtr)
|
||||
{
|
||||
if (dnr == nil)
|
||||
/* resolver not loaded error */
|
||||
return(notOpenErr);
|
||||
|
||||
return(CallHInfoProc(dnr, HINFO, hostName, returnRecPtr, (long)resultProc, userDataPtr));
|
||||
}
|
||||
|
||||
|
||||
|
||||
typedef OSErr (*MXInfoProcPtr)(long selector, char* hostName, struct returnRec* returnRecPtr,
|
||||
long resultProc, char* userData);
|
||||
|
||||
enum {
|
||||
uppMXInfoProcInfo = kCStackBased
|
||||
| RESULT_SIZE(SIZE_CODE(sizeof(short)))
|
||||
| STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(short)))
|
||||
| STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(char *)))
|
||||
| STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(struct returnRec *)))
|
||||
| STACK_ROUTINE_PARAMETER(4, SIZE_CODE(sizeof(long)))
|
||||
| STACK_ROUTINE_PARAMETER(5, SIZE_CODE(sizeof(char *)))
|
||||
|
||||
};
|
||||
|
||||
#if USESROUTINEDESCRIPTORS
|
||||
typedef UniversalProcPtr MXInfoUPP;
|
||||
|
||||
#define NewMXInfoProc(userRoutine) \
|
||||
(MXInfoUPP) NewRoutineDescriptor(userRoutine, uppMXInfoProcInfo, GetCurrentISA())
|
||||
#define CallMXInfoProc(userRoutine, selector, hostName, returnRecPtr, resultProc, userData) \
|
||||
CallUniversalProc(userRoutine, selector, hostName, returnRecPtr, resultProc, userData)
|
||||
#else
|
||||
typedef MXInfoProcPtr MXInfoUPP;
|
||||
|
||||
#define NewMXInfoProc(userRoutine) \
|
||||
(MXInfoUPP)(userRoutine)
|
||||
#define CallMXInfoProc(userRoutine, selector, hostName, returnRecPtr, resultProc, userData) \
|
||||
(*(MXInfoProcPtr)userRoutine)(selector, hostName, returnRecPtr, resultProc, userData)
|
||||
#endif
|
||||
|
||||
|
||||
extern OSErr MXInfo(char *hostName, struct returnRec *returnRecPtr, ResultProc2Ptr resultProc,
|
||||
char *userDataPtr)
|
||||
{
|
||||
if (dnr == nil)
|
||||
/* resolver not loaded error */
|
||||
return(notOpenErr);
|
||||
|
||||
return(CallMXInfoProc(dnr, MXINFO, hostName, returnRecPtr, (long)resultProc, userDataPtr));
|
||||
}
|
||||
|
|
@ -1,982 +0,0 @@
|
|||
/*
|
||||
* Copyright (c) 1990-92 Regents of the University of Michigan.
|
||||
* All rights reserved.
|
||||
*
|
||||
* tcp.c -- TCP communication related routines
|
||||
*/
|
||||
#include "lber.h"
|
||||
#include "ldap.h"
|
||||
#include "tcp.h"
|
||||
|
||||
#include <Devices.h>
|
||||
#include <Desk.h> /* to get SystemTask() */
|
||||
#include <Memory.h>
|
||||
#include <Errors.h>
|
||||
#include <Gestalt.h>
|
||||
|
||||
/*
|
||||
* local prototypes
|
||||
*/
|
||||
#ifdef NEEDPROTOS
|
||||
void bzero( char *buf, unsigned long count );
|
||||
pascal void setdoneflag( struct hostInfo *hip, char *donep );
|
||||
pascal void tcp_asynchnotify( StreamPtr tstream, unsigned short event, Ptr userdatap,
|
||||
unsigned short term_reason, struct ICMPReport *icmpmsg );
|
||||
OSErr kick_mactcp( short *drefnump );
|
||||
#ifdef SUPPORT_OPENTRANSPORT
|
||||
pascal void EventHandler(tcpstream *tsp, OTEventCode event, OTResult result, void * /* cookie */);
|
||||
#endif /* SUPPORT_OPENTRANSPORT */
|
||||
#else /* NEEDPROTOS */
|
||||
void bzero();
|
||||
pascal void setdoneflag();
|
||||
pascal void tcp_asynchnotify();
|
||||
OSErr kick_mactcp();
|
||||
#ifdef SUPPORT_OPENTRANSPORT
|
||||
pascal void EventHandler();
|
||||
#endif /* SUPPORT_OPENTRANSPORT */
|
||||
#endif /* NEEDPROTOS */
|
||||
|
||||
#ifdef SUPPORT_OPENTRANSPORT
|
||||
static Boolean gHaveOT = false;
|
||||
#endif /* SUPPORT_OPENTRANSPORT */
|
||||
|
||||
|
||||
#ifdef SUPPORT_OPENTRANSPORT
|
||||
/*
|
||||
* Initialize the tcp module. This mainly consists of seeing if we have
|
||||
* Open Transport and initializing it and setting our global saying so.
|
||||
*/
|
||||
OSStatus
|
||||
tcp_init( void )
|
||||
{
|
||||
long result;
|
||||
OSStatus err;
|
||||
|
||||
gHaveOT = (( err = Gestalt( gestaltOpenTpt, &result )) == noErr &&
|
||||
( result & gestaltOpenTptPresent ) != 0 &&
|
||||
( result & gestaltOpenTptTCPPresent ) != 0 );
|
||||
|
||||
if ( gHaveOT ) {
|
||||
return( InitOpenTransport());
|
||||
} else {
|
||||
return( kOTNoError ); /* assume we have MacTCP */
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
tcp_shutdown( void )
|
||||
{
|
||||
if ( gHaveOT ) {
|
||||
CloseOpenTransport();
|
||||
}
|
||||
}
|
||||
|
||||
Boolean
|
||||
tcp_have_opentransport( void )
|
||||
{
|
||||
return( gHaveOT );
|
||||
}
|
||||
#endif /* SUPPORT_OPENTRANSPORT */
|
||||
|
||||
|
||||
/*
|
||||
* open and return an pointer to a TCP stream (return NULL if error)
|
||||
* "buf" is a buffer for receives of length "buflen."
|
||||
*/
|
||||
tcpstream *
|
||||
tcpopen( unsigned char * buf, long buflen ) {
|
||||
TCPiopb pb;
|
||||
OSStatus err;
|
||||
tcpstream * tsp;
|
||||
short drefnum;
|
||||
#ifdef SUPPORT_OPENTRANSPORT
|
||||
TEndpointInfo info;
|
||||
#endif /* SUPPORT_OPENTRANSPORT */
|
||||
|
||||
if (nil == (tsp = (tcpstream *)NewPtrClear(sizeof(tcpstream)))) {
|
||||
return( nil );
|
||||
}
|
||||
|
||||
#ifdef SUPPORT_OPENTRANSPORT
|
||||
if ( gHaveOT ) {
|
||||
|
||||
//
|
||||
// Now create a TCP
|
||||
//
|
||||
tsp->tcps_ep = OTOpenEndpoint( OTCreateConfiguration( kTCPName ), 0, &info, &err );
|
||||
|
||||
if ( !tsp->tcps_ep ) {
|
||||
if ( err == kOTNoError ) {
|
||||
err = -1;
|
||||
}
|
||||
}
|
||||
|
||||
if ( !err ) {
|
||||
err = OTSetSynchronous( tsp->tcps_ep );
|
||||
}
|
||||
|
||||
tsp->tcps_data = 0;
|
||||
tsp->tcps_terminated = tsp->tcps_connected = false;
|
||||
|
||||
//
|
||||
// Install notifier we're going to use
|
||||
//
|
||||
if ( !err ) {
|
||||
err = OTInstallNotifier( tsp->tcps_ep, (OTNotifyProcPtr) EventHandler, 0 );
|
||||
}
|
||||
|
||||
if ( err != kOTNoError ) {
|
||||
if ( tsp->tcps_ep ) {
|
||||
OTCloseProvider( tsp->tcps_ep );
|
||||
}
|
||||
DisposePtr( (Ptr)tsp );
|
||||
tsp = nil;
|
||||
}
|
||||
} else {
|
||||
#endif /* SUPPORT_OPENTRANSPORT */
|
||||
|
||||
if ( kick_mactcp( &drefnum ) != noErr ) {
|
||||
return ( nil );
|
||||
}
|
||||
|
||||
if (( tsp->tcps_notifyupp = NewTCPNotifyProc( tcp_asynchnotify )) == NULL ) {
|
||||
DisposePtr( (Ptr)tsp );
|
||||
return( nil );
|
||||
}
|
||||
|
||||
tsp->drefnum = drefnum;
|
||||
|
||||
if ( buflen == 0 ) {
|
||||
buflen = TCP_BUFSIZ;
|
||||
}
|
||||
|
||||
if ( buf == NULL &&
|
||||
(nil == ( buf = tsp->tcps_buffer = (unsigned char *)NewPtr( buflen )))) {
|
||||
DisposeRoutineDescriptor( tsp->tcps_notifyupp );
|
||||
DisposePtr( (Ptr)tsp );
|
||||
return( nil );
|
||||
}
|
||||
bzero( (char *)&pb, sizeof( pb ));
|
||||
pb.csCode = TCPCreate;
|
||||
pb.ioCRefNum = tsp->drefnum;
|
||||
pb.csParam.create.rcvBuff = (Ptr) buf;
|
||||
pb.csParam.create.rcvBuffLen = buflen;
|
||||
pb.csParam.create.notifyProc = tsp->tcps_notifyupp;
|
||||
pb.csParam.create.userDataPtr = (Ptr)tsp;
|
||||
|
||||
if (( err = PBControlSync( (ParmBlkPtr)&pb )) != noErr || pb.ioResult != noErr ) {
|
||||
DisposeRoutineDescriptor( tsp->tcps_notifyupp );
|
||||
DisposePtr( (Ptr)tsp->tcps_buffer );
|
||||
DisposePtr( (Ptr)tsp );
|
||||
return( nil );
|
||||
}
|
||||
|
||||
tsp->tcps_data = 0;
|
||||
tsp->tcps_terminated = tsp->tcps_connected = false;
|
||||
tsp->tcps_sptr = pb.tcpStream;
|
||||
|
||||
#ifdef SUPPORT_OPENTRANSPORT
|
||||
}
|
||||
#endif /* SUPPORT_OPENTRANSPORT */
|
||||
|
||||
return( tsp );
|
||||
}
|
||||
|
||||
/*
|
||||
* connect to remote host at IP address "addr", TCP port "port"
|
||||
* return local port assigned, 0 if error
|
||||
*/
|
||||
#ifdef SUPPORT_OPENTRANSPORT
|
||||
InetPort
|
||||
tcpconnect( tcpstream * tsp, InetHost addr, InetPort port ) {
|
||||
#else /* SUPPORT_OPENTRANSPORT */
|
||||
ip_port
|
||||
tcpconnect( tcpstream * tsp, ip_addr addr, ip_port port ) {
|
||||
#endif /* SUPPORT_OPENTRANSPORT */
|
||||
TCPiopb pb;
|
||||
OSStatus err;
|
||||
#ifdef SUPPORT_OPENTRANSPORT
|
||||
struct InetAddress sndsin, rcvsin, retsin;
|
||||
TCall sndcall, rcvcall;
|
||||
TBind ret;
|
||||
#endif /* SUPPORT_OPENTRANSPORT */
|
||||
|
||||
#ifdef SUPPORT_OPENTRANSPORT
|
||||
if ( gHaveOT ) {
|
||||
|
||||
if ( tsp->tcps_ep == NULL ) {
|
||||
return( 0 );
|
||||
}
|
||||
|
||||
bzero( (char *)&sndsin, sizeof( struct InetAddress ));
|
||||
bzero( (char *)&rcvsin, sizeof( struct InetAddress ));
|
||||
bzero( (char *)&retsin, sizeof( struct InetAddress ));
|
||||
bzero( (char *)&sndcall, sizeof( TCall ));
|
||||
bzero( (char *)&rcvcall, sizeof( TCall));
|
||||
bzero( (char *)&ret, sizeof( TBind ));
|
||||
|
||||
// Bind TCP to an address and port. We don't care which one, so we pass null for
|
||||
// the requested address.
|
||||
ret.addr.maxlen = sizeof( struct InetAddress );
|
||||
ret.addr.buf = (unsigned char *)&retsin;
|
||||
err = OTBind( tsp->tcps_ep, NULL, &ret );
|
||||
if ( err != kOTNoError ) {
|
||||
return( 0 );
|
||||
}
|
||||
|
||||
OTInitInetAddress( &sndsin, port, addr );
|
||||
sndcall.addr.len = sizeof( struct InetAddress );
|
||||
sndcall.addr.buf = (UInt8 *)&sndsin;
|
||||
|
||||
rcvcall.addr.maxlen = sizeof( struct InetAddress );
|
||||
rcvcall.addr.buf = (unsigned char *)&rcvsin;
|
||||
|
||||
err = OTConnect( tsp->tcps_ep, &sndcall, &rcvcall );
|
||||
if ( err != kOTNoError ) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
tsp->tcps_connected = true;
|
||||
tsp->tcps_remoteport = rcvsin.fPort;
|
||||
tsp->tcps_remoteaddr = rcvsin.fHost;
|
||||
return( retsin.fPort );
|
||||
|
||||
} else {
|
||||
#endif /* SUPPORT_OPENTRANSPORT */
|
||||
|
||||
if ( tsp->tcps_sptr == (StreamPtr)NULL ) {
|
||||
return( 0 );
|
||||
}
|
||||
|
||||
bzero( (char *)&pb, sizeof( pb ));
|
||||
pb.csCode = TCPActiveOpen;
|
||||
pb.ioCRefNum = tsp->drefnum;
|
||||
pb.tcpStream = tsp->tcps_sptr;
|
||||
pb.csParam.open.remoteHost = addr;
|
||||
pb.csParam.open.remotePort = port;
|
||||
pb.csParam.open.ulpTimeoutValue = 15;
|
||||
pb.csParam.open.validityFlags = timeoutValue;
|
||||
|
||||
if (( err = PBControlSync( (ParmBlkPtr)&pb )) != noErr || pb.ioResult != noErr ) {
|
||||
return( 0 );
|
||||
}
|
||||
|
||||
tsp->tcps_connected = true;
|
||||
return( pb.csParam.open.localPort );
|
||||
|
||||
#ifdef SUPPORT_OPENTRANSPORT
|
||||
}
|
||||
#endif /* SUPPORT_OPENTRANSPORT */
|
||||
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* close and release a TCP stream
|
||||
* returns 0 if no error, -1 if any error occurs
|
||||
*/
|
||||
short
|
||||
tcpclose( tcpstream * tsp ) {
|
||||
TCPiopb pb;
|
||||
OSStatus rc;
|
||||
|
||||
#ifdef SUPPORT_OPENTRANSPORT
|
||||
if ( gHaveOT ) {
|
||||
|
||||
|
||||
if ( tsp->tcps_ep == NULL ) {
|
||||
return( -1 );
|
||||
}
|
||||
|
||||
#ifdef notdef
|
||||
/*
|
||||
* if connected execute a close
|
||||
*/
|
||||
if ( tcp->tcps_connected ) {
|
||||
Call OTSndOrderlyDisconnect and wait for the other end to respond. This requires
|
||||
waiting for and reading any data that comes in in the meantime. This code was ifdefed
|
||||
out in the MacTCP so it is here too.
|
||||
}
|
||||
#endif /* notdef */
|
||||
|
||||
rc = OTSndDisconnect( tsp->tcps_ep, NULL );
|
||||
|
||||
OTCloseProvider( tsp->tcps_ep );
|
||||
DisposePtr( (Ptr)tsp );
|
||||
|
||||
if ( rc != 0 ) {
|
||||
rc = -1;
|
||||
}
|
||||
|
||||
} else {
|
||||
#endif /* SUPPORT_OPENTRANSPORT */
|
||||
|
||||
if ( tsp->tcps_sptr == (StreamPtr)NULL ) {
|
||||
return( -1 );
|
||||
}
|
||||
|
||||
#ifdef notdef
|
||||
/*
|
||||
* if connected execute a close
|
||||
*/
|
||||
if ( tcp->tcps_connected ) {
|
||||
bzero( (char *)&pb, sizeof( pb ));
|
||||
pb.csCode = TCPClose;
|
||||
pb.ioCRefNum = tsp->drefnum;
|
||||
pb.tcpStream = sp;
|
||||
pb.csParam.close.validityFlags = 0;
|
||||
PBControlSync( (ParmBlkPtr)&pb );
|
||||
}
|
||||
#endif /* notdef */
|
||||
|
||||
bzero( (char *)&pb, sizeof( pb ));
|
||||
pb.csCode = TCPRelease;
|
||||
pb.ioCRefNum = tsp->drefnum;
|
||||
pb.tcpStream = tsp->tcps_sptr;
|
||||
pb.csParam.close.validityFlags = 0;
|
||||
rc = 0;
|
||||
|
||||
if ( PBControlSync( (ParmBlkPtr)&pb ) != noErr || pb.ioResult != noErr ) {
|
||||
rc = -1;
|
||||
}
|
||||
|
||||
DisposeRoutineDescriptor( tsp->tcps_notifyupp );
|
||||
DisposePtr( (Ptr)tsp->tcps_buffer );
|
||||
DisposePtr( (Ptr)tsp );
|
||||
|
||||
#ifdef SUPPORT_OPENTRANSPORT
|
||||
}
|
||||
#endif /* SUPPORT_OPENTRANSPORT */
|
||||
|
||||
return( rc );
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* wait for new data to arrive
|
||||
*
|
||||
* if "timeout" is NULL, wait until data arrives or connection goes away
|
||||
* if "timeout" is a pointer to a zero'ed struct, poll
|
||||
* else wait for "timeout->tv_sec + timeout->tv_usec" seconds
|
||||
*/
|
||||
short
|
||||
tcpselect( tcpstream * tsp, struct timeval * timeout )
|
||||
{
|
||||
long ticks, endticks;
|
||||
short rc;
|
||||
|
||||
if ( timeout != NULL ) {
|
||||
endticks = 60 * timeout->tv_sec + ( 60 * timeout->tv_usec ) / 1000000 + TickCount();
|
||||
}
|
||||
ticks = 0;
|
||||
|
||||
while (( rc = tcpreadready( tsp )) == 0 && ( timeout == NULL || ticks < endticks )) {
|
||||
Delay( 2L, &ticks );
|
||||
SystemTask();
|
||||
}
|
||||
|
||||
return ( rc );
|
||||
}
|
||||
|
||||
|
||||
short
|
||||
tcpreadready( tcpstream *tsp )
|
||||
{
|
||||
#ifdef SUPPORT_OPENTRANSPORT
|
||||
size_t dataAvail;
|
||||
|
||||
if (gHaveOT) {
|
||||
if ( tsp->tcps_ep == NULL ) {
|
||||
return( -1 );
|
||||
}
|
||||
|
||||
OTCountDataBytes( tsp->tcps_ep, &dataAvail );
|
||||
tsp->tcps_data = ( dataAvail != 0 );
|
||||
} else {
|
||||
#endif /* SUPPORT_OPENTRANSPORT */
|
||||
if ( tsp->tcps_sptr == (StreamPtr)NULL ) {
|
||||
return( -1 );
|
||||
}
|
||||
|
||||
/* tsp->tcps_data is set in async. notify proc, so nothing for us to do here */
|
||||
#ifdef SUPPORT_OPENTRANSPORT
|
||||
}
|
||||
#endif /* SUPPORT_OPENTRANSPORT */
|
||||
return ( tsp->tcps_terminated ? -1 : ( tsp->tcps_data < 1 ) ? 0 : 1 );
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* read up to "rbuflen" bytes into "rbuf" from a connected TCP stream
|
||||
* wait up to "timeout" seconds for data (if timeout == 0, wait "forever")
|
||||
*/
|
||||
long
|
||||
tcpread( tcpstream * tsp, byte timeout, unsigned char * rbuf,
|
||||
unsigned short rbuflen, DialogPtr dlp ) {
|
||||
TCPiopb pb;
|
||||
unsigned long time, end_time;
|
||||
#ifdef SUPPORT_OPENTRANSPORT
|
||||
OTFlags flags;
|
||||
OTResult result;
|
||||
size_t dataAvail;
|
||||
#endif /* SUPPORT_OPENTRANSPORT */
|
||||
|
||||
#ifdef SUPPORT_OPENTRANSPORT
|
||||
if ( gHaveOT ) {
|
||||
|
||||
if ( tsp->tcps_ep == NULL ) {
|
||||
return( -1 );
|
||||
}
|
||||
|
||||
// Try to read data. Since we're in non-blocking mode, this will fail with kOTNoDataErr
|
||||
// if no data is available.
|
||||
result = OTRcv( tsp->tcps_ep, rbuf, rbuflen, &flags );
|
||||
if ( result == kOTNoDataErr ) {
|
||||
// Nothing available, wait for some. The ugly spin loop below is the way the old
|
||||
// MacTCP code worked. I should fix it, but I don't have time right now.
|
||||
tsp->tcps_data = 0;
|
||||
GetDateTime( &time );
|
||||
end_time = time + timeout;
|
||||
|
||||
while (( timeout <= 0 || end_time > time ) && tsp->tcps_data < 1 && !tsp->tcps_terminated ) {
|
||||
OTCountDataBytes( tsp->tcps_ep, &dataAvail );
|
||||
if ( dataAvail > 0 ) {
|
||||
tsp->tcps_data = 1;
|
||||
}
|
||||
GetDateTime( &time );
|
||||
SystemTask();
|
||||
}
|
||||
|
||||
if ( tsp->tcps_data < 1 ) {
|
||||
return( tsp->tcps_terminated ? -3 : -1 );
|
||||
}
|
||||
|
||||
// Should have data available now, try again.
|
||||
result = OTRcv( tsp->tcps_ep, rbuf, rbuflen, &flags );
|
||||
}
|
||||
|
||||
if ( result < 0 ) {
|
||||
return( -1 );
|
||||
}
|
||||
|
||||
OTCountDataBytes( tsp->tcps_ep, &dataAvail );
|
||||
if ( dataAvail == 0 ) {
|
||||
tsp->tcps_data = 0;
|
||||
}
|
||||
|
||||
return( result );
|
||||
|
||||
} else {
|
||||
#endif /* SUPPORT_OPENTRANSPORT */
|
||||
|
||||
if ( tsp->tcps_sptr == (StreamPtr)NULL ) {
|
||||
return( -1 );
|
||||
}
|
||||
|
||||
GetDateTime( &time );
|
||||
end_time = time + timeout;
|
||||
|
||||
while(( timeout <= 0 || end_time > time ) && tsp->tcps_data < 1 &&
|
||||
!tsp->tcps_terminated ) {
|
||||
GetDateTime( &time );
|
||||
SystemTask();
|
||||
}
|
||||
|
||||
if ( tsp->tcps_data < 1 ) {
|
||||
return( tsp->tcps_terminated ? -3 : -1 );
|
||||
}
|
||||
|
||||
bzero( (char *)&pb, sizeof( pb ));
|
||||
pb.csCode = TCPRcv;
|
||||
pb.ioCRefNum = tsp->drefnum;
|
||||
pb.tcpStream = tsp->tcps_sptr;
|
||||
pb.csParam.receive.commandTimeoutValue = timeout;
|
||||
pb.csParam.receive.rcvBuff = (char *)rbuf;
|
||||
pb.csParam.receive.rcvBuffLen = rbuflen;
|
||||
|
||||
if ( PBControlSync( (ParmBlkPtr)&pb ) != noErr || pb.ioResult != noErr ) {
|
||||
return( -1 );
|
||||
}
|
||||
|
||||
if ( --(tsp->tcps_data) < 0 ) {
|
||||
tsp->tcps_data = 0;
|
||||
}
|
||||
|
||||
return( pb.csParam.receive.rcvBuffLen );
|
||||
|
||||
#ifdef SUPPORT_OPENTRANSPORT
|
||||
}
|
||||
#endif /* SUPPORT_OPENTRANSPORT */
|
||||
#pragma unused (dlp)
|
||||
}
|
||||
|
||||
/*
|
||||
* send TCP data
|
||||
* "sp" is the stream to write to
|
||||
* "wbuf" is "wbuflen" bytes of data to send
|
||||
* returns < 0 if error, number of bytes written if no error
|
||||
*/
|
||||
long
|
||||
tcpwrite( tcpstream * tsp, unsigned char * wbuf, unsigned short wbuflen ) {
|
||||
TCPiopb pb;
|
||||
wdsEntry wds[ 2 ];
|
||||
OSErr err;
|
||||
#ifdef SUPPORT_OPENTRANSPORT
|
||||
OTResult result;
|
||||
unsigned short nwritten;
|
||||
#endif /* SUPPORT_OPENTRANSPORT */
|
||||
|
||||
#ifdef SUPPORT_OPENTRANSPORT
|
||||
if ( gHaveOT ) {
|
||||
|
||||
if ( tsp->tcps_ep == NULL ) {
|
||||
return( -1 );
|
||||
}
|
||||
|
||||
/*
|
||||
* We used to do a single call to OTSnd() here, framed with OTSetBlocking() and OTSetNonBlocking()
|
||||
* this caused crashes deep inside OpenTransport when writes were large or done in
|
||||
* rapid succession, so now we never turn on blocking mode
|
||||
*/
|
||||
nwritten = 0;
|
||||
while ( wbuflen > 0 ) {
|
||||
if (( result = OTSnd( tsp->tcps_ep, wbuf, wbuflen, 0 )) < 0 ) {
|
||||
if ( result != kOTFlowErr ) {
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
nwritten += result;
|
||||
if (( wbuflen -= result ) > 0 ) {
|
||||
SystemTask();
|
||||
wbuf += result;
|
||||
}
|
||||
}
|
||||
}
|
||||
return(( wbuflen == 0 ) ? nwritten : result );
|
||||
|
||||
} else {
|
||||
#endif /* SUPPORT_OPENTRANSPORT */
|
||||
|
||||
if ( tsp->tcps_sptr == (StreamPtr)NULL ) {
|
||||
return( -1 );
|
||||
}
|
||||
|
||||
wds[ 0 ].length = wbuflen;
|
||||
wds[ 0 ].ptr = (char *)wbuf;
|
||||
wds[ 1 ].length = 0;
|
||||
|
||||
bzero( (char *)&pb, sizeof( pb ));
|
||||
pb.csCode = TCPSend;
|
||||
pb.ioCRefNum = tsp->drefnum;
|
||||
pb.tcpStream = tsp->tcps_sptr;
|
||||
pb.csParam.send.wdsPtr = (Ptr)wds;
|
||||
pb.csParam.send.validityFlags = 0;
|
||||
|
||||
if (( err = PBControlSync( (ParmBlkPtr)&pb )) != noErr || pb.ioResult != noErr ) {
|
||||
return( -1 );
|
||||
}
|
||||
|
||||
return( wbuflen );
|
||||
|
||||
#ifdef SUPPORT_OPENTRANSPORT
|
||||
}
|
||||
#endif /* SUPPORT_OPENTRANSPORT */
|
||||
}
|
||||
|
||||
static pascal void
|
||||
tcp_asynchnotify(
|
||||
StreamPtr tstream,
|
||||
unsigned short event,
|
||||
Ptr userdatap,
|
||||
unsigned short term_reason,
|
||||
struct ICMPReport *icmpmsg
|
||||
)
|
||||
{
|
||||
tcpstream *tsp;
|
||||
|
||||
tsp = (tcpstream *)userdatap;
|
||||
switch( event ) {
|
||||
case TCPDataArrival:
|
||||
++(tsp->tcps_data);
|
||||
break;
|
||||
case TCPClosing:
|
||||
case TCPTerminate:
|
||||
case TCPULPTimeout:
|
||||
tsp->tcps_terminated = true;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
#pragma unused (tstream, term_reason, icmpmsg)
|
||||
}
|
||||
|
||||
|
||||
short
|
||||
tcpgetpeername( tcpstream *tsp, ip_addr *addrp, tcp_port *portp ) {
|
||||
TCPiopb pb;
|
||||
OSErr err;
|
||||
|
||||
#ifdef SUPPORT_OPENTRANSPORT
|
||||
if ( gHaveOT ) {
|
||||
|
||||
if ( tsp->tcps_ep == NULL ) {
|
||||
return( -1 );
|
||||
}
|
||||
|
||||
if ( addrp != NULL ) {
|
||||
*addrp = tsp->tcps_remoteaddr;
|
||||
}
|
||||
|
||||
if ( portp != NULL ) {
|
||||
*portp = tsp->tcps_remoteport;
|
||||
}
|
||||
|
||||
} else {
|
||||
#endif /* SUPPORT_OPENTRANSPORT */
|
||||
|
||||
if ( tsp->tcps_sptr == (StreamPtr)NULL ) {
|
||||
return( -1 );
|
||||
}
|
||||
|
||||
bzero( (char *)&pb, sizeof( pb ));
|
||||
pb.csCode = TCPStatus;
|
||||
pb.ioCRefNum = tsp->drefnum;
|
||||
pb.tcpStream = tsp->tcps_sptr;
|
||||
|
||||
if (( err = PBControlSync( (ParmBlkPtr)&pb )) != noErr || pb.ioResult != noErr ) {
|
||||
return( err );
|
||||
}
|
||||
|
||||
if ( addrp != NULL ) {
|
||||
*addrp = pb.csParam.status.remoteHost;
|
||||
}
|
||||
|
||||
if ( portp != NULL ) {
|
||||
*portp = pb.csParam.status.remotePort;
|
||||
}
|
||||
|
||||
#ifdef SUPPORT_OPENTRANSPORT
|
||||
}
|
||||
|
||||
return( kOTNoError );
|
||||
#else /* SUPPORT_OPENTRANSPORT */
|
||||
return( noErr );
|
||||
#endif /* SUPPORT_OPENTRANSPORT */
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* bzero -- set "len" bytes starting at "p" to zero
|
||||
*/
|
||||
static void
|
||||
bzero( char *p, unsigned long len )
|
||||
{
|
||||
unsigned long i;
|
||||
|
||||
for ( i = 0; i < len; ++i ) {
|
||||
*p++ = '\0';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
pascal void
|
||||
setdoneflag( struct hostInfo *hip, char *donep )
|
||||
{
|
||||
++(*donep);
|
||||
#pragma unused (hip)
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* return a hostInfo structure for "host" (return != noErr if error)
|
||||
*/
|
||||
short
|
||||
#ifdef SUPPORT_OPENTRANSPORT
|
||||
gethostinfobyname( char *host, InetHostInfo *hip ) {
|
||||
#else /* SUPPORT_OPENTRANSPORT */
|
||||
gethostinfobyname( char *host, struct hostInfo *hip ) {
|
||||
#endif /* SUPPORT_OPENTRANSPORT */
|
||||
char done = 0;
|
||||
OSStatus err;
|
||||
long time;
|
||||
ResultUPP rupp;
|
||||
#ifdef notdef
|
||||
struct dnr_struct dnr_global = {nil, 0};
|
||||
#endif /* notdef */
|
||||
#ifdef SUPPORT_OPENTRANSPORT
|
||||
hostInfo hi; /* Old MacTCP version of hostinfo */
|
||||
InetSvcRef inetsvc; /* Internet services reference */
|
||||
#endif /* SUPPORT_OPENTRANSPORT */
|
||||
|
||||
#ifdef SUPPORT_OPENTRANSPORT
|
||||
if ( gHaveOT ) {
|
||||
|
||||
// Get an Internet Services reference
|
||||
inetsvc = OTOpenInternetServices( kDefaultInternetServicesPath, 0, &err );
|
||||
if ( !inetsvc || err != kOTNoError ) {
|
||||
if ( err == kOTNoError ) {
|
||||
err = -1;
|
||||
}
|
||||
inetsvc = nil;
|
||||
}
|
||||
|
||||
if ( !err ) {
|
||||
err = OTInetStringToAddress( inetsvc, host, hip );
|
||||
}
|
||||
|
||||
if ( inetsvc ) {
|
||||
OTCloseProvider(inetsvc);
|
||||
}
|
||||
|
||||
} else {
|
||||
#endif /* SUPPORT_OPENTRANSPORT */
|
||||
|
||||
if (( err = kick_mactcp( NULL )) != noErr
|
||||
|| ( err = OpenResolver( /* &dnr_global, */ NULL )) != noErr ) {
|
||||
return( err );
|
||||
}
|
||||
|
||||
if (( rupp = NewResultProc( setdoneflag )) == NULL ) {
|
||||
err = memFullErr;
|
||||
} else {
|
||||
#ifdef SUPPORT_OPENTRANSPORT
|
||||
bzero( (char *)&hi, sizeof( hostInfo ));
|
||||
if (( err = StrToAddr( /* &dnr_global, */ host, &hi, rupp, &done )) == cacheFault ) {
|
||||
#else /* SUPPORT_OPENTRANSPORT */
|
||||
bzero((char *) hip, sizeof( hostInfo ));
|
||||
if (( err = StrToAddr( /* &dnr_global, */ host, hip, rupp, &done )) == cacheFault ) {
|
||||
#endif /* SUPPORT_OPENTRANSPORT */
|
||||
while( !done ) {
|
||||
Delay( 2L, &time ); // querying DN servers; wait for reply
|
||||
SystemTask();
|
||||
}
|
||||
#ifdef SUPPORT_OPENTRANSPORT
|
||||
err = hi.rtnCode;
|
||||
#else /* SUPPORT_OPENTRANSPORT */
|
||||
err = hip->rtnCode;
|
||||
#endif /* SUPPORT_OPENTRANSPORT */
|
||||
}
|
||||
DisposeRoutineDescriptor( rupp );
|
||||
}
|
||||
|
||||
CloseResolver( /* &dnr_global */ );
|
||||
|
||||
#ifdef SUPPORT_OPENTRANSPORT
|
||||
/* Copy the results to the InetHostInfo area passed in by caller */
|
||||
BlockMove(hi.cname, hip->name, kMaxHostNameLen);
|
||||
BlockMove(hi.addr, hip->addrs, 4*NUM_ALT_ADDRS);
|
||||
hip->addrs[NUM_ALT_ADDRS] = 0;
|
||||
|
||||
/* Convert the return code to an OT style return code */
|
||||
if ( err == nameSyntaxErr ) {
|
||||
err = kOTBadNameErr;
|
||||
} else if ( err == noNameServer || err == authNameErr || err == noAnsErr ) {
|
||||
err = kOTBadNameErr;
|
||||
} else if (err != noErr) {
|
||||
err = kOTSysErrorErr;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (( err == kOTNoError ) && ( hip->addrs[ 0 ] == 0 )) {
|
||||
err = kOTBadNameErr;
|
||||
}
|
||||
return( err );
|
||||
|
||||
#else /* SUPPORT_OPENTRANSPORT */
|
||||
if ( err != noErr || (( err == noErr ) && ( hip->addr[ 0 ] == 0 ))) {
|
||||
return( err == noErr ? noAnsErr : err );
|
||||
}
|
||||
return( noErr );
|
||||
#endif /* SUPPORT_OPENTRANSPORT */
|
||||
}
|
||||
|
||||
/*
|
||||
* return a hostInfo structure for "addr" (return != noErr if error)
|
||||
*/
|
||||
short
|
||||
#ifdef SUPPORT_OPENTRANSPORT
|
||||
gethostinfobyaddr( InetHost addr, InetHostInfo *hip )
|
||||
#else /* SUPPORT_OPENTRANSPORT */
|
||||
gethostinfobyaddr( ip_addr addr, struct hostInfo *hip )
|
||||
#endif /* SUPPORT_OPENTRANSPORT */
|
||||
{
|
||||
|
||||
char done = 0;
|
||||
OSStatus err;
|
||||
long time;
|
||||
ResultUPP rupp;
|
||||
#ifdef notdef
|
||||
struct dnr_struct dnr_global = {nil, 0};
|
||||
#endif /* notdef */
|
||||
#ifdef SUPPORT_OPENTRANSPORT
|
||||
hostInfo hi; /* Old MacTCP version of hostinfo */
|
||||
InetSvcRef inetsvc; /* Internet services reference */
|
||||
#endif /* SUPPORT_OPENTRANSPORT */
|
||||
|
||||
#ifdef SUPPORT_OPENTRANSPORT
|
||||
if ( gHaveOT ) {
|
||||
// Get an Internet Services reference
|
||||
inetsvc = OTOpenInternetServices( kDefaultInternetServicesPath, 0, &err );
|
||||
if ( !inetsvc || err != kOTNoError ) {
|
||||
if ( err == kOTNoError ) {
|
||||
err = -1;
|
||||
}
|
||||
inetsvc = nil;
|
||||
}
|
||||
|
||||
if ( !err ) {
|
||||
err = OTInetAddressToName( inetsvc, addr, hip->name );
|
||||
}
|
||||
|
||||
if ( inetsvc ) {
|
||||
OTCloseProvider( inetsvc );
|
||||
}
|
||||
|
||||
} else {
|
||||
#endif /* SUPPORT_OPENTRANSPORT */
|
||||
|
||||
if (( err = kick_mactcp( NULL )) != noErr ||
|
||||
( err = OpenResolver( /* &dnr_global, */ NULL )) != noErr )
|
||||
return( err );
|
||||
|
||||
if (( rupp = NewResultProc( setdoneflag )) == NULL ) {
|
||||
err = memFullErr;
|
||||
} else {
|
||||
#ifdef SUPPORT_OPENTRANSPORT
|
||||
bzero( (char *) &hi, sizeof( hostInfo ));
|
||||
if (( err = AddrToName( /* &dnr_global, */ addr, &hi, rupp, &done )) == cacheFault ) {
|
||||
#else /* SUPPORT_OPENTRANSPORT */
|
||||
bzero( (char *)hip, sizeof( hostInfo ));
|
||||
if (( err = AddrToName( /* &dnr_global, */ addr, hip, rupp, &done )) == cacheFault ) {
|
||||
#endif /* SUPPORT_OPENTRANSPORT */
|
||||
while( !done ) {
|
||||
Delay( 2L, &time ); // querying DN servers; wait for reply
|
||||
SystemTask();
|
||||
}
|
||||
#ifdef SUPPORT_OPENTRANSPORT
|
||||
err = hi.rtnCode;
|
||||
#else /* SUPPORT_OPENTRANSPORT */
|
||||
err = hip->rtnCode;
|
||||
#endif /* SUPPORT_OPENTRANSPORT */
|
||||
}
|
||||
DisposeRoutineDescriptor( rupp );
|
||||
}
|
||||
|
||||
CloseResolver( /* &dnr_global */ );
|
||||
|
||||
#ifdef SUPPORT_OPENTRANSPORT
|
||||
/* Copy the results to the InetHostInfo area passed in by caller */
|
||||
BlockMove(hi.cname, hip->name, kMaxHostNameLen);
|
||||
BlockMove(hi.addr, hip->addrs, 4*NUM_ALT_ADDRS);
|
||||
hip->addrs[NUM_ALT_ADDRS] = 0;
|
||||
|
||||
/* Convert the return code to an OT style return code */
|
||||
if (err == nameSyntaxErr) {
|
||||
err = kOTBadNameErr;
|
||||
} else if (err == noNameServer || err == authNameErr || err == noAnsErr) {
|
||||
err = kOTBadNameErr;
|
||||
} else if (err != noErr) {
|
||||
err = kOTSysErrorErr;
|
||||
}
|
||||
|
||||
}
|
||||
#endif /* SUPPORT_OPENTRANSPORT */
|
||||
|
||||
return( err );
|
||||
}
|
||||
|
||||
/*
|
||||
* return a ASCII equivalent of ipaddr. addrstr must be at large enough to hold the
|
||||
* result which is of the form "AAA.BBB.CCC.DDD" and can be a maximum of 16 bytes in size
|
||||
*/
|
||||
short
|
||||
#ifdef SUPPORT_OPENTRANSPORT
|
||||
ipaddr2str( InetHost ipaddr, char *addrstr )
|
||||
#else /* SUPPORT_OPENTRANSPORT */
|
||||
ipaddr2str( ip_addr ipaddr, char *addrstr )
|
||||
#endif /* SUPPORT_OPENTRANSPORT */
|
||||
{
|
||||
OSStatus err;
|
||||
#ifdef notdef
|
||||
struct dnr_struct dnr_global = {nil, 0};
|
||||
#endif /* notdef */
|
||||
|
||||
#ifdef SUPPORT_OPENTRANSPORT
|
||||
if ( gHaveOT ) {
|
||||
|
||||
OTInetHostToString( ipaddr, addrstr );
|
||||
err = kOTNoError;
|
||||
|
||||
} else {
|
||||
#endif /* SUPPORT_OPENTRANSPORT */
|
||||
|
||||
if (( err = kick_mactcp( NULL )) != noErr ||
|
||||
( err = OpenResolver( /* &dnr_global, */ NULL )) != noErr )
|
||||
return( err );
|
||||
|
||||
err = AddrToStr( ipaddr, addrstr );
|
||||
|
||||
CloseResolver( /* &dnr_global */ );
|
||||
|
||||
#ifdef SUPPORT_OPENTRANSPORT
|
||||
}
|
||||
#endif /* SUPPORT_OPENTRANSPORT */
|
||||
|
||||
return( err );
|
||||
}
|
||||
|
||||
|
||||
#ifdef SUPPORT_OPENTRANSPORT
|
||||
/*******************************************************************************
|
||||
** EventHandler
|
||||
********************************************************************************/
|
||||
pascal void EventHandler(tcpstream *tsp, OTEventCode event, OTResult result, void * /* cookie */)
|
||||
{
|
||||
|
||||
switch(event)
|
||||
{
|
||||
case T_ORDREL:
|
||||
case T_DISCONNECT:
|
||||
tsp->tcps_terminated = true;
|
||||
break;
|
||||
case T_DATA:
|
||||
case T_EXDATA:
|
||||
tsp->tcps_data += 1;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return;
|
||||
}
|
||||
#endif /* SUPPORT_OPENTRANSPORT */
|
||||
|
||||
|
||||
static OSErr
|
||||
kick_mactcp( short *drefnump )
|
||||
{
|
||||
short dref;
|
||||
OSErr err;
|
||||
struct GetAddrParamBlock gapb;
|
||||
|
||||
/*
|
||||
* we make sure the MacTCP driver is open and issue a "Get My Address" call
|
||||
* so that adevs like MacPPP are initialized (MacTCP is dumb)
|
||||
*/
|
||||
if (( err = OpenDriver( "\p.IPP", &dref )) != noErr ) {
|
||||
return( err );
|
||||
}
|
||||
|
||||
if ( drefnump != NULL ) {
|
||||
*drefnump = dref;
|
||||
}
|
||||
|
||||
bzero( (char *)&gapb, sizeof( gapb ));
|
||||
gapb.csCode = ipctlGetAddr;
|
||||
gapb.ioCRefNum = dref;
|
||||
|
||||
err = PBControlSync( (ParmBlkPtr)&gapb );
|
||||
|
||||
return( noErr );
|
||||
}
|
||||
|
|
@ -1,79 +0,0 @@
|
|||
/*
|
||||
* tcp.h interface to MCS's TCP routines
|
||||
*/
|
||||
|
||||
#include <Dialogs.h>
|
||||
#ifdef SUPPORT_OPENTRANSPORT
|
||||
#include <OpenTransport.h>
|
||||
#include <OpenTptInternet.h>
|
||||
#endif /* SUPPORT_OPENTRANSPORT */
|
||||
#include "MacTCPCommonTypes.h"
|
||||
#include "AddressXlation.h"
|
||||
#include "TCPPB.h"
|
||||
#include "GetMyIPAddr.h"
|
||||
|
||||
#ifndef TCP_BUFSIZ
|
||||
#define TCP_BUFSIZ 8192
|
||||
#endif /* TCP_BUFSIZ */
|
||||
|
||||
typedef struct tcpstream {
|
||||
StreamPtr tcps_sptr; /* stream pointer for MacTCP TCP PB calls */
|
||||
#ifdef SUPPORT_OPENTRANSPORT
|
||||
EndpointRef tcps_ep; /* OpenTransport end point */
|
||||
#endif /* SUPPORT_OPENTRANSPORT */
|
||||
short tcps_data; /* count of packets on read queue */
|
||||
short drefnum; /* driver ref num, for convenience */
|
||||
Boolean tcps_connected; /* true if connection was made */
|
||||
Boolean tcps_terminated; /* true if connection no longer exists */
|
||||
#ifdef SUPPORT_OPENTRANSPORT
|
||||
InetHost tcps_remoteaddr; /* Address of our peer */
|
||||
InetPort tcps_remoteport; /* Port number of our peer */
|
||||
#endif /* SUPPORT_OPENTRANSPORT */
|
||||
unsigned char *tcps_buffer; /* buffer given over to system to use */
|
||||
struct tcpstream *tcps_next; /* next one in chain */
|
||||
TCPNotifyUPP tcps_notifyupp; /* universal proc pointer for notify routine */
|
||||
} tcpstream, *tcpstreamptr;
|
||||
|
||||
/*
|
||||
* the Unix-y struct timeval
|
||||
*/
|
||||
struct timeval {
|
||||
long tv_sec; /* seconds */
|
||||
long tv_usec; /* and microseconds */
|
||||
};
|
||||
|
||||
#ifdef SUPPORT_OPENTRANSPORT
|
||||
typedef UInt8 byte;
|
||||
typedef UInt32 ip_addr;
|
||||
typedef UInt16 tcp_port;
|
||||
#endif /* SUPPORT_OPENTRANSPORT */
|
||||
|
||||
#define TCP_IS_TERMINATED( tsp ) (tsp)->tcps_terminated
|
||||
|
||||
/*
|
||||
* function prototypes
|
||||
*/
|
||||
#ifdef SUPPORT_OPENTRANSPORT
|
||||
OSStatus tcp_init(void);
|
||||
void tcp_shutdown(void);
|
||||
Boolean tcp_have_opentransport( void );
|
||||
#endif /* SUPPORT_OPENTRANSPORT */
|
||||
tcpstream *tcpopen( unsigned char * buf, long buflen );
|
||||
tcp_port tcpconnect( tcpstream *s, ip_addr addr, tcp_port port );
|
||||
short tcpclose( tcpstream *s );
|
||||
long tcpread( tcpstream *s, byte timeout, unsigned char * rbuf,
|
||||
unsigned short rbuflen, DialogPtr dlp );
|
||||
long tcpwrite( tcpstream *s, unsigned char * wbuf, unsigned short wbuflen );
|
||||
short tcpselect( tcpstream *s, struct timeval * timeout );
|
||||
short tcpreadready( tcpstream *tsp );
|
||||
short tcpgetpeername( tcpstream * tsp, ip_addr *addrp, tcp_port *portp );
|
||||
|
||||
#ifdef SUPPORT_OPENTRANSPORT
|
||||
short gethostinfobyname( char *host, InetHostInfo *hip );
|
||||
short gethostinfobyaddr(InetHost addr, InetHostInfo *hip );
|
||||
short ipaddr2str( InetHost ipaddr, char *addrstr );
|
||||
#else /* SUPPORT_OPENTRANSPORT */
|
||||
short gethostinfobyname( char *host, struct hostInfo *hip );
|
||||
short gethostinfobyaddr( ip_addr addr, struct hostInfo *hip );
|
||||
short ipaddr2str( ip_addr ipaddr, char *addrstr );
|
||||
#endif /* SUPPORT_OPENTRANSPORT */
|
||||
|
|
@ -1,48 +0,0 @@
|
|||
#-----------------------------------------------------------------------------
|
||||
# Copyright (c) 1994 Regents of the University of Michigan.
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms are permitted
|
||||
# provided that this notice is preserved and that due credit is given
|
||||
# to the University of Michigan at Ann Arbor. The name of the University
|
||||
# may not be used to endorse or promote products derived from this
|
||||
# software without specific prior written permission. This software
|
||||
# is provided ``as is'' without express or implied warranty.
|
||||
#
|
||||
# LDAP libraries/msdos Makefile
|
||||
#
|
||||
#-----------------------------------------------------------------------------
|
||||
|
||||
############################################################################
|
||||
# #
|
||||
# You should not have to edit anything below this point #
|
||||
# #
|
||||
############################################################################
|
||||
|
||||
#
|
||||
# rules to make the software
|
||||
#
|
||||
|
||||
all: FORCE
|
||||
|
||||
#
|
||||
# rules to install the software
|
||||
#
|
||||
|
||||
install: all
|
||||
|
||||
#
|
||||
# rules to make clean
|
||||
#
|
||||
|
||||
clean: FORCE
|
||||
|
||||
veryclean: clean
|
||||
|
||||
#
|
||||
# rules to make depend
|
||||
#
|
||||
#
|
||||
depend: FORCE
|
||||
|
||||
links:
|
||||
|
|
@ -1,12 +0,0 @@
|
|||
LDAP MSDOS Overview README
|
||||
|
||||
The lber and ldap client libraries have been ported to MSDOS, running
|
||||
over various flavors of TCP/IP. A list of ports and README files to
|
||||
see for further instruction follows:
|
||||
|
||||
MSDOS over NCSA Telnet TCP/IP README.CSA
|
||||
MSDOS over PCNFS README.NFS
|
||||
MSWindows over WinSock API README.WSA
|
||||
|
||||
|
||||
README Last updated 26 July 1993 Mark Smith
|
||||
|
|
@ -1,100 +0,0 @@
|
|||
LDAP MSDOS with NCSA Telnet TCP/IP stack README
|
||||
|
||||
The lber and ldap client libraries, and the ud client (called BUD on
|
||||
DOS) have been ported to MSDOS, running over the NCSA Telnet TCP/IP
|
||||
code (available from ftp.ncsa.uiuc.edu). Build testing was done with
|
||||
Microsoft C 5.00 and MSDOS 5.0. We plan to get Microsoft C 7.0 and
|
||||
join the 1990s soon....
|
||||
|
||||
This port was just completed as this is being written (4 September 1992),
|
||||
so it goes without saying that the code is largely untested under DOS.
|
||||
Be sure to report and bugs to us (see the end of this file for where to
|
||||
report bugs).
|
||||
|
||||
None of the other clients included in the distribution have been tested
|
||||
on the PC. The synchronous LDAP interface is also untested, although it
|
||||
does build okay.
|
||||
|
||||
MAKING THE DISTRIBUTION
|
||||
To build the ldap and lber libraries:
|
||||
|
||||
1) obtain the NCSA source and build it. The remainder of this
|
||||
README will assume the root of the NCSA source is a directory
|
||||
called "NCSA".
|
||||
|
||||
2) Create an NCSA\LDAP directory, and the following three
|
||||
directories underneath it: h, liblber, libldap. You should
|
||||
have a structure that looks like this:
|
||||
NCSA\
|
||||
LDAP\
|
||||
H\
|
||||
LIBLBER\
|
||||
LIBLDAP\
|
||||
|
||||
(lots of other NCSA directories)
|
||||
|
||||
3) Populate them from the distribution (files from the h/, liblber/,
|
||||
and libldap/ distribution directories get copied to H\,
|
||||
LIBLBER\, and LIBLDAP\ respectively).
|
||||
|
||||
4) Copy additional files for MSDOS to proper places:
|
||||
distribution file PC file
|
||||
msdos/makefile.msc LDAP\MAKEFILE.MSC
|
||||
msdos/msdos.h LDAP\H\MSDOS.H
|
||||
msdos/lp.c LDAP\LIBLBER\LP.C
|
||||
msdos/makelber.msc LDAP\LIBLBER\MAKELBER.MSC
|
||||
msdos/msdos.c LDAP\LIBLBER\MSDOS.C
|
||||
msdos/makeldap.msc LDAP\LIBLDAP\MAKELDAP.MSC
|
||||
msdos/opendos.c LDAP\LIBLDAP\OPENDOS.C
|
||||
|
||||
5) If you wish to change any compiler or linker switches, you
|
||||
should be able to do so just by editing the top-level
|
||||
MAKEFILE.MSC make file. There seems to be a problem if you
|
||||
add -DLDAP_DEBUG: the linker is unable to resolve the
|
||||
lber_debug variable (defined in liblber/decode.c, used there
|
||||
and in liblber/io.c). If anyone can figure out how to get it
|
||||
to work, let us know.
|
||||
|
||||
6) Build the library (this will also build the LDAP test program):
|
||||
cd NCSA\LDAP
|
||||
make makefile.msc
|
||||
If your DOS C compiler is as picky as ours, you will get many
|
||||
screen fulls of warnings that can safely be ignored.
|
||||
Note that if you try to make while sitting in the lower
|
||||
directories (LIBLDAP or LIBLBER), it will fail. This will
|
||||
hopefully be cleaned up in a later release.
|
||||
|
||||
7) Test the library using LTEST.EXE:
|
||||
cd to somewhere where there is a proper NCSA CONFIG.TEL file
|
||||
execute "LTEST <LDAP server host>" from there, and test away.
|
||||
|
||||
To build the ud client "BUD":
|
||||
1) Build the ldap and lber libraries (see above).
|
||||
|
||||
2) Create a directory called UD underneath your LDAP directory,
|
||||
and populate it with all the files from the ud/ directory
|
||||
from the distribution. Also add the following files:
|
||||
msdos/makeud.msc
|
||||
msdos/protoud.h
|
||||
macintosh/getopt.c (yes, put this in the LDAP\UD directory)
|
||||
|
||||
3) Change any desired options in UD.H or in the LDAP\MAKEFILE.MSC
|
||||
make file. You will probably want to set up your own
|
||||
site-specific values for DEFAULT_BASE and DEFAULT_SERVER (in
|
||||
UD.H).
|
||||
|
||||
4) Uncomment out the lines near the end of LDAP\MAKEFILE.MSC
|
||||
that define the rules to make ud.
|
||||
|
||||
5) Build bud.exe:
|
||||
cd NCSA\LDAP
|
||||
make makefile.msc
|
||||
You should now have a working bud.exe. Make sure you test
|
||||
it while in a directory that has a proper NCSA CONFIG.TEL file
|
||||
in it.
|
||||
|
||||
BUG REPORTING
|
||||
|
||||
Bug reports should be sent to bug-ldap@terminator.cc.umich.edu.
|
||||
|
||||
README Last updated 4 September 1992 Mark Smith
|
||||
|
|
@ -1,55 +0,0 @@
|
|||
LDAP MSDOS with SUN PC-NFS README
|
||||
|
||||
The lber and ldap client libraries have been ported to MSDOS, running over
|
||||
SUN PC-NFS. Build testing was done with Microsoft C 7.00, SUN PC-NFS
|
||||
Programmer's Toolkit version 4.0 and MSDOS 5.0.
|
||||
|
||||
This port is relatively untested so please be sure to report any bugs to
|
||||
us (see the end of this file for where to report bugs).
|
||||
|
||||
None of the clients included in the distribution have been tested
|
||||
on the PC over PC-NFS although UD has been tested over the NCSA TCP/IP port.
|
||||
|
||||
MAKING THE DISTRIBUTION
|
||||
To build the ldap and lber libraries on the PC:
|
||||
|
||||
1) Create a directory somewhere for your LDAP source files and then create
|
||||
the following three directories in it: h, liblber and libldap. You
|
||||
should have a structure something like
|
||||
|
||||
LDAP\H
|
||||
LDAP\LIBLDAP
|
||||
LDAP\LIBLBER
|
||||
|
||||
2) Populate them from the distribution (files from the h/, liblber/,
|
||||
and libldap/ distribution directories get copied to H\,
|
||||
LIBLBER\, and LIBLDAP\ respectively).
|
||||
|
||||
3) Copy additional files for MSDOS PC-NFS to proper places:
|
||||
distribution file PC file
|
||||
msdos/makefile.nfs LDAP\MAKEFILE
|
||||
msdos/msdos.h LDAP\H\MSDOS.H
|
||||
msdos/lp.c LDAP\LIBLBER\LP.C
|
||||
msdos/makelber.nfs LDAP\LIBLBER\MAKEFILE
|
||||
msdos/msdos.c LDAP\LIBLBER\MSDOS.C
|
||||
msdos/makeldap.nfs LDAP\LIBLDAP\MAKEFILE
|
||||
msdos/opendos.c LDAP\LIBLDAP\OPENDOS.C
|
||||
|
||||
4) If you wish to change any compiler or linker switches, you
|
||||
should be able to do so just by editing the top-level
|
||||
MAKEFILE.
|
||||
|
||||
5) Build the library (this will also build the LDAP test program):
|
||||
|
||||
CD LDAP
|
||||
NMAKE
|
||||
|
||||
You will get many screen fulls of warnings that can safely be ignored.
|
||||
|
||||
6) Test the library using LTEST.EXE.
|
||||
|
||||
BUG REPORTING
|
||||
|
||||
Bug reports should be sent to bug-ldap@terminator.cc.umich.edu.
|
||||
|
||||
README.NFS Last updated January 1993 Andy Powell (University of Bath)
|
||||
|
|
@ -1,228 +0,0 @@
|
|||
LDAP MSWindows with WinSock API README
|
||||
|
||||
The lber and ldap client libraries have been ported to Microsoft Windows
|
||||
in the form of a Windows Dynamic Link library called LIBLDAP.DLL and
|
||||
Ldap32.dll (16 and 32 bit versions respectively).
|
||||
|
||||
A Windows Socket API version 1.1 conformant TCP/IP WINSOCK.DLL is
|
||||
required for the LIBLDAP.DLL to run. Some patches have been
|
||||
incorporated that should make it possible to build the LIBLDAP.DLL under
|
||||
Borland C++ 3.1. Brief instructions are included later in this file.
|
||||
(There are no changes to the Borland support in this release.)
|
||||
|
||||
This release also include 16 and 32 bit versions of the ltest (&
|
||||
ltest32) API test programs. Instructions for building it are in the
|
||||
second half of this document. None of the other clients included in the
|
||||
distribution have been tested under Windows. The synchronous LDAP
|
||||
interface is also untested, although it does build okay.
|
||||
|
||||
At the very end of this document are some hints for writing applications
|
||||
that use the LIBLDAP.DLL.
|
||||
|
||||
We have also made a windows "kit" available at:
|
||||
|
||||
ftp://terminator.rs.itd.umich.edu/ldap/windows/winldap.zip
|
||||
|
||||
Our hope is that with this kit, you won't have to compile all this
|
||||
yourself (unless you want to). The kit includes:
|
||||
16 and 32bit dlls
|
||||
debug and release builds
|
||||
the LTest utility program
|
||||
man pages in the form of HLP files (new and old formats)
|
||||
include files
|
||||
sample config files
|
||||
|
||||
MAKING THE DISTRIBUTION
|
||||
|
||||
Build testing was done on Windows NT workstation 3.51 (service patch 2)
|
||||
(on NTFS which supports long filenames) using Microsoft Visual C++ 1.52c
|
||||
(16 bit) and Visual C++ 4.0 (32 bit).
|
||||
|
||||
To build the LIBLDAP.DLL library under Microsoft Visual C++ 1.52c
|
||||
(16bit) or Visual C++ 4.0 (32bit): (search forward in this file for
|
||||
"Borland" if you are using Borland C++)
|
||||
|
||||
1) Untar the ldap distribution somewhere on MSDOS. You will
|
||||
need at least the include and libraries subdirectories.
|
||||
A version of tar that works under MSDOS is a big help for
|
||||
this step
|
||||
|
||||
tar xf ldap.tar
|
||||
|
||||
This will create a directory called ldap or similar that
|
||||
contains the ldap source distribution. We will refer to
|
||||
that directory simply as "\ldap" from now on, but it could
|
||||
be anywhere and have any name on your system
|
||||
|
||||
Note that a lot of empty include files are on this distribution.
|
||||
This is because some compilers are not smart enough to properly
|
||||
generate dependencies (i.e. they ignore #ifdefs) so the file needs
|
||||
to be present, even if not used.
|
||||
|
||||
2) cd to the LDAP directory (root of your LDAP area on MSDOS) and
|
||||
execute the setupwsa batch file. This will copy a bunch of
|
||||
files from the ldap\libraries\msdos and
|
||||
ldap\libraries\msdos\winsock directories to the ldap\include
|
||||
and ldap\libraries\libldap directories:
|
||||
cd \ldap
|
||||
libraries\msdos\winsock\setupwsa.bat
|
||||
Note that a lot of empty include files are copied over... this
|
||||
is because some compilers are not smart enough to properly
|
||||
generate dependencies.
|
||||
|
||||
3) Create a WINSOCK.LIB import library from the WINSOCK.DEF file.
|
||||
You can also obtain a pre-built .LIB from ftp.microdyne.com in
|
||||
/pub/winsock/winsock-1.1/winsock.lib. To build an import
|
||||
library using Microsoft's IMPLIB utility:
|
||||
cd \ldap\libraries\libldap
|
||||
implib winsock.lib winsock.def
|
||||
|
||||
4) Now fire up MS Windows and start the Visual C++ Workbench. Open
|
||||
the project \ldap\libraries\libldap\libldap.mak or
|
||||
\ldap\libraries\libldap\ldap32.mak with the appropriate compiler.
|
||||
|
||||
Change the project "Include" directory to list the ldap
|
||||
include directory as well as the standard include directories
|
||||
(change by using the command found under the
|
||||
Options...Directories menu in the 16 bit compiler and
|
||||
Build/Settings in the 32bit compiler).
|
||||
|
||||
The preprocessor symbols I have defined are:
|
||||
WINSOCK, DOS, NEEDPROTOS, NO_USERINTERFACE, KERBEROS I ran
|
||||
into buffer length limitations when I tried to define more
|
||||
preprocessor symbols this way. So all the rest are defined
|
||||
in msdos.h. This makes the order of inclusion critical for
|
||||
msdos.h.
|
||||
|
||||
|
||||
Note: If you are using something other than Visual C++ you will
|
||||
need to create a makefile or other project file. It should
|
||||
include all of the .c files in the liblber and libldap
|
||||
directories, plus the libraries\libldap\libldap.def (or
|
||||
libraries\libldap\ldap32.def) module definition file. It
|
||||
will need to link in winsock.lib. You should use the large
|
||||
memory model.
|
||||
|
||||
5) Select Build LIBLDAP.DLL (or Rebuild All) from the Project
|
||||
menu to build the DLL. You will see many warnings,
|
||||
especially from the liblber code. Our experience is that it
|
||||
is safe to ignore them.
|
||||
|
||||
6) If you want to change what symbols are defined (for example
|
||||
WSHELPER, or LDAP_DEBUG), change them in msdos.h and
|
||||
recompile. LDAP_DEBUG now works in the windows environment.
|
||||
The comments in msdos.h explain what the various options are.
|
||||
|
||||
You should now have a functional LIBLDAP (or ldap32) dynamic link
|
||||
library. If you wish to build a version of ltest for MSWindows to test
|
||||
it, follow these next steps.
|
||||
|
||||
1) Copy the libldap test.c and LIBLDAP.DLL import library files
|
||||
to the Windows ltest directory. Under DOS:
|
||||
cd \ldap
|
||||
copy libraries\libldap\test.c libraries\msdos\winsock\ltest
|
||||
copy libraries\libldap\libldap.lib libraries\msdos\winsock\ltest
|
||||
|
||||
2) Open the project \ldap\libraries\msdos\winsock\ltest\ltest.mak
|
||||
(or ltest32.mdp) under the Microsoft Visual C++ Workbench.
|
||||
Change the project include directory to list the
|
||||
\ldap\include directory as well as the standard include
|
||||
directories.
|
||||
|
||||
3) Edit the string resource IDS_LDAP_HOST_NAME in ltest.rc (or
|
||||
ltest32.rc) and change the string "truelies" to the name of
|
||||
the LDAP server host you would like to test against.
|
||||
|
||||
Since this is a string resource, it may also be edited in the
|
||||
DLL with AppStudio. So you can change it without having to
|
||||
recompile.
|
||||
|
||||
4) Build the project. If you are not using Visual C++, you will
|
||||
need to create a makefile or other project file, and then
|
||||
build. The project should include all of the .c files in
|
||||
the ldap\libraries\msdos\winsock\ltest directory and the
|
||||
ltest.def module definition file. You will need to link in
|
||||
libldap.lib and winsock.lib (import libraries).
|
||||
|
||||
You should now have a functional ltest application. It is ugly, but it
|
||||
is useful for testing purposes. It doesn't try very hard to be a pretty
|
||||
MS Windows application.
|
||||
|
||||
|
||||
To build the LIBLDAP.DLL library under Borland C++ 3.1:
|
||||
|
||||
Note: No changes have been made wrt Borland compiler in this release.
|
||||
|
||||
1) Untar the ldap distribution somewhere on MSDOS. You will
|
||||
need at least the include and libaries subdirectories.
|
||||
A version of tar that works under MSDOS is a big help for
|
||||
this step:
|
||||
tar xf ldap.tar
|
||||
|
||||
This will create a directory called ldap or similar that
|
||||
contains the ldap source distribution. We will refer to
|
||||
that directory simply as "\ldap" from now on, but it could
|
||||
be anywhere and have any name on your system
|
||||
|
||||
2) cd to the LDAP directory (root of your LDAP area on MSDOS) and
|
||||
execute the setupwsa batch file. This will copy a bunch of
|
||||
files from the ldap\libraries\msdos and ldap\libraries\msdos\winsock
|
||||
directories to the ldap\include and ldap\libraries\libldap
|
||||
directories:
|
||||
cd \ldap
|
||||
libraries\msdos\winsock\setupwsa.bat
|
||||
|
||||
3) Start Borland C++ and create a new project here named
|
||||
libraries\libldap\libldap.prj and add all .c files in
|
||||
the libraries\liblber and libraries/libldap directories
|
||||
except open.c and test.c. Also add libldap.def and
|
||||
the winsock.lib.
|
||||
|
||||
4) Configure the project:
|
||||
Set include directories to have ..\..\include in them
|
||||
Set these #defines: NO_USERINTERFACE;DOS;NEEDPROTOS;WIN31;BC31
|
||||
Switch case-sensitive link/exports off
|
||||
Include the runtime library statically, and 'none' of the others
|
||||
|
||||
5) Do Build All
|
||||
|
||||
|
||||
WRITING APPLICATIONS THAT USE LIBLDAP.DLL
|
||||
|
||||
All of the normal LDAP and LBER calls documented in the man pages
|
||||
(contained in the ldap\doc\man directory) should work, except for
|
||||
ldap_perror (this is not supported under Windows since you will
|
||||
want to use an application-defined dialog; you can use ldap_err2string
|
||||
to obtain an error string to display in a message box or dialog).
|
||||
The LIBLDAP.DEF file has a complete list of available routines.
|
||||
|
||||
Any memory that you obtain as the result of a call to an LIBLDAP.DLL
|
||||
routine should NOT be freed by calling the free() routine in your
|
||||
C library. Instead, use the the new utility routine ldap_memfree.
|
||||
This is so the malloc/calloc and free routines all come from the same
|
||||
library (the one in libldap) rather than using libldap's malloc/calloc
|
||||
and the calling program's free. The 32bit compiler (in debug mode)
|
||||
FORCED me to be compulsive about this for the application I used to test.
|
||||
|
||||
To be friendly under Windows, you should use the asynchronous LDAP
|
||||
calls whenever possible.
|
||||
|
||||
One limitation of the current LIBLDAP.DLL is that each X.500 LDAP
|
||||
result message has to be smaller than 64K bytes. Ldap32.dll does
|
||||
NOT have this limitation.
|
||||
|
||||
To compile the dlls we define the following preprocessor variables.
|
||||
|
||||
WINSOCK, DOS, NEEDPROTOS, NO_USERINTERFACE, KERBEROS
|
||||
|
||||
Presumably you don't need KERBEROS. You may need some/all the
|
||||
others to take the right path through the include files. Also note
|
||||
that a few more preprocessor variables are defined in msdos.h. This
|
||||
means that msdos.h must be included before ldap.h or lber.h.
|
||||
|
||||
|
||||
BUG REPORTING
|
||||
|
||||
Bug reports should be sent to bug-ldap@umich.edu.
|
||||
|
||||
README Last updated 13 January 1996 by Steve Rothwell
|
||||
|
|
@ -1,265 +0,0 @@
|
|||
/* -------------------------------------------------------------
|
||||
lp.c
|
||||
|
||||
Routines common to lpr, lpq, and lprm.
|
||||
|
||||
Paul Hilchey May 1989
|
||||
|
||||
Copyright (C) 1989 The University of British Columbia
|
||||
All rights reserved.
|
||||
|
||||
history
|
||||
-------
|
||||
1/6/89 Microsoft C port by Heeren Pathak (NCSA)
|
||||
-------------------------------------------------------------
|
||||
*/
|
||||
|
||||
#ifdef DOS
|
||||
#ifndef PCNFS
|
||||
|
||||
#define LPR
|
||||
|
||||
#include <stdio.h>
|
||||
#include <conio.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdarg.h>
|
||||
#ifdef MEMORY_DEBUG
|
||||
#include "memdebug.h"
|
||||
#endif
|
||||
#include "netevent.h"
|
||||
#include "hostform.h"
|
||||
#include "lp.h"
|
||||
#include "externs.h"
|
||||
|
||||
#ifdef MSC
|
||||
#define EXIT_FAILURE 1
|
||||
#endif
|
||||
|
||||
void checkerr( void );
|
||||
|
||||
/****************************************************************
|
||||
* lookup *
|
||||
* Try to find the remote host in the local cache or from a *
|
||||
* domain name server. *
|
||||
* parameters: null terminated string containing the name or *
|
||||
* ip address of the host *
|
||||
* return value: pointer to machine info record, or 0 if the *
|
||||
* lookup failed *
|
||||
****************************************************************/
|
||||
struct machinfo *lookup(char *host)
|
||||
{
|
||||
int what,dat;
|
||||
int machine_number; /* used to identify domain lookup events */
|
||||
struct machinfo *machine_info;
|
||||
|
||||
machine_info = Sgethost(host); /* look up in hosts cache */
|
||||
|
||||
if (!machine_info) {
|
||||
if ((machine_number = Sdomain(host)) < 0)
|
||||
return(0); /* initiate domain name lookup */
|
||||
|
||||
/* wait for DOMOK or DOMFAIL event */
|
||||
while (machine_info==NULL) {
|
||||
switch(lgetevent(USERCLASS,&what,&dat)) {
|
||||
case DOMFAIL:
|
||||
/* lookup failed, return 0 */
|
||||
return(0);
|
||||
case DOMOK:
|
||||
/* get pointer to machine record */
|
||||
machine_info=Slooknum(machine_number);
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (debug) puts("Domain lookup worked");
|
||||
}
|
||||
return(machine_info);
|
||||
}
|
||||
|
||||
/*****************************************************************
|
||||
* open_connection *
|
||||
* Open the TCP connection. *
|
||||
* parameters: pointer to machine info record *
|
||||
* source port number *
|
||||
* destination port number *
|
||||
* return value: connection identifier (port number), or -1 if *
|
||||
* connection could not be opened *
|
||||
*****************************************************************/
|
||||
int open_connection(struct machinfo *machine_record, int source_port,
|
||||
int dest_port)
|
||||
{
|
||||
int ev,what,dat; /* parameters for lgetevent */
|
||||
int conid; /* connection identifier */
|
||||
|
||||
/* set the source port */
|
||||
netfromport(source_port);
|
||||
|
||||
/* initiate connection open */
|
||||
if (0 > (conid = Snetopen(machine_record,dest_port)))
|
||||
return(-1);
|
||||
|
||||
if (debug) puts("snetopen ok");
|
||||
|
||||
/* wait for connection to open or for attempt to fail */
|
||||
while(1) {
|
||||
if (0 != (ev = lgetevent(CONCLASS,&what,&dat))) {
|
||||
if (dat != conid) { /* not for us */
|
||||
/* netputevent(what,ev,dat); */
|
||||
continue;
|
||||
}
|
||||
if (ev == CONOPEN)
|
||||
break;
|
||||
else
|
||||
return(-1);
|
||||
}
|
||||
}
|
||||
if (debug) puts("Conopen");
|
||||
return(conid);
|
||||
}
|
||||
|
||||
|
||||
/*******************************************************************
|
||||
* crash *
|
||||
* Shut down all network stuff, print an error message to stderr, *
|
||||
* and abort. *
|
||||
* parameters: variable length argument list for the error *
|
||||
* message (a la printf) *
|
||||
*******************************************************************/
|
||||
void crash(char *msg,...)
|
||||
{
|
||||
va_list argptr;
|
||||
|
||||
fprintf(stderr,"\nError: ");
|
||||
va_start(argptr,msg);
|
||||
vfprintf(stderr,msg,argptr);
|
||||
va_end(argptr);
|
||||
fprintf(stderr,"\n");
|
||||
|
||||
/* shut everything down */
|
||||
netshut();
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
/*********************************************************************
|
||||
* Check for any error events that may have occured. Either print *
|
||||
* the message on stderr or just ignore it if it is probably not *
|
||||
* serious. Set debug on to see all error messages. *
|
||||
*********************************************************************/
|
||||
void checkerr(void )
|
||||
{
|
||||
char *errmsg;
|
||||
int i,j;
|
||||
|
||||
while (ERR1 == Sgetevent(ERRCLASS,&i,&j)) {
|
||||
if ((!debug) &&
|
||||
((300 <= j && j <= 399) || /* IP messages */
|
||||
(400 <= j && j <= 499) || /* TCP messages */
|
||||
(600 <= j && j <= 699) || /* ICMP messages */
|
||||
j == 801 || j == 805 || /* misc. domain stuff */
|
||||
j == 806))
|
||||
continue; /* just ignore them */
|
||||
errmsg = neterrstring(j);
|
||||
fprintf(stderr,"%s\n",errmsg);
|
||||
}
|
||||
}
|
||||
|
||||
/*********************************************************************
|
||||
* lgetevent *
|
||||
* Check for network events. The next pending non-error event is *
|
||||
* returned (if any). *
|
||||
* Takes the same parameters as sgetevent. *
|
||||
*********************************************************************/
|
||||
int lgetevent(int class, int *what, int *datp)
|
||||
{
|
||||
checkerr();
|
||||
return(Sgetevent(class, what, datp));
|
||||
}
|
||||
|
||||
/******************************************************************
|
||||
* nprintf *
|
||||
* Formatted write to an open TCP conection. Like fprintf, but *
|
||||
* use a connection id returned from snteopen instead of a file *
|
||||
* handle. The formatted string must not exceed 1023 bytes. *
|
||||
* Returns EOF if an error occurs *
|
||||
******************************************************************/
|
||||
int nprintf(int connection_id, char *format,...)
|
||||
#define BUFF_SIZE 1024
|
||||
{
|
||||
va_list argptr;
|
||||
char buff[BUFF_SIZE], *buff_ptr;
|
||||
int len1, len2;
|
||||
|
||||
va_start(argptr,format);
|
||||
len1 = vsprintf(buff,format,argptr);
|
||||
va_end(argptr);
|
||||
if ((len1 == EOF) || len1+1 >= BUFF_SIZE) return(EOF);
|
||||
buff_ptr = buff;
|
||||
while (buff_ptr < (buff + len1)) {
|
||||
len2 = netwrite(connection_id, buff_ptr,
|
||||
len1-(buff_ptr - buff));
|
||||
checkerr();
|
||||
Stask();
|
||||
if (len2 < 0) return(EOF);
|
||||
buff_ptr += len2;
|
||||
}
|
||||
if (debug) puts(buff);
|
||||
return (len1);
|
||||
}
|
||||
|
||||
/******************************************************************
|
||||
* nread *
|
||||
* Read from an open TCP connection. Waits for incoming data if *
|
||||
* there is none in the queue. Returns EOF if the connection *
|
||||
* closes and there is no more data. *
|
||||
* *
|
||||
* parameters: connection id returned by Snetopen *
|
||||
* buffer for returned data *
|
||||
* size of buffer *
|
||||
* returned value: number of characters read into the buffer *
|
||||
******************************************************************/
|
||||
|
||||
int nread(int connection_id, char *buff, int buff_size)
|
||||
{
|
||||
int class,data,ev;
|
||||
int len;
|
||||
|
||||
netpush(connection_id); /* flush buffer */
|
||||
|
||||
while (0 == netest(connection_id)) {
|
||||
ev = lgetevent(CONCLASS, &class, &data);
|
||||
if (!ev) continue;
|
||||
if (data != connection_id) { /* not for us; throw away */
|
||||
/* netputevent(class, ev, data); */
|
||||
continue;
|
||||
}
|
||||
if (debug) printf("nread %d %d\n",class,ev);
|
||||
if (ev == CONDATA) {
|
||||
len = netread(connection_id,buff,buff_size);
|
||||
if (len == 0) continue;
|
||||
return (len);
|
||||
}
|
||||
}
|
||||
/* throw away other events. getevent should be changed so we
|
||||
can retrieve events for a selected port only */
|
||||
while (lgetevent(USERCLASS | CONCLASS, &class, &data));
|
||||
return (EOF); /* connection is closed and no data in queue */
|
||||
}
|
||||
|
||||
#ifdef MSC
|
||||
#else
|
||||
#pragma warn .par
|
||||
#endif
|
||||
|
||||
/******************************************************************
|
||||
* breakstop *
|
||||
* Handle break interrupts by shutting down the network stuff and *
|
||||
* aborting. *
|
||||
******************************************************************/
|
||||
int breakstop(void )
|
||||
{
|
||||
netshut();
|
||||
return(0);
|
||||
}
|
||||
|
||||
#endif PCNFS
|
||||
#endif /* DOS */
|
||||
|
|
@ -1,78 +0,0 @@
|
|||
#-----------------------------------------------------------------------------
|
||||
# Copyright (c) 1992 Regents of the University of Michigan.
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms are permitted
|
||||
# provided that this notice is preserved and that due credit is given
|
||||
# to the University of Michigan at Ann Arbor. The name of the University
|
||||
# may not be used to endorse or promote products derived from this
|
||||
# software without specific prior written permission. This software
|
||||
# is provided ``as is'' without express or implied warranty.
|
||||
#
|
||||
# LDAP lightweight X.500 Directory access top level makefile for MSC
|
||||
#
|
||||
#-----------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
#
|
||||
# Edit the following variables to have appropriate values for your system
|
||||
#
|
||||
|
||||
#
|
||||
# You may want to change some of these things too
|
||||
#
|
||||
# two kinds of things go in ACFLAGS, global compiler flags (like -g to
|
||||
# generate symbol table info), and global defines (like -DKERBEROS to enable
|
||||
# kerberos version 4 authentication, or -DLDAP_DEBUG to compile in some
|
||||
# debugging info you can then turn on by setting ldap_debug)
|
||||
#
|
||||
ACFLAGS = -g -DNEEDPROTOS #-DLDAP_DEBUG # added to every $(CFLAGS)
|
||||
ALDFLAGS = # -g # always passed to ld
|
||||
UDDEFINES = -DUOFM # particular to ud
|
||||
|
||||
#
|
||||
# you probably don't need to edit these things, but if you want to use
|
||||
# a different make or c compiler, change it here.
|
||||
#
|
||||
MAKE = nmake
|
||||
CC = cl
|
||||
CFLAGS = /c /AL /DDOS /DMSC /Ox /W1 $(ACFLAGS) -I../h
|
||||
LD = link
|
||||
LDFLAGS = /m /ST:8192 $(ALDFLAGS)
|
||||
|
||||
############################################################################
|
||||
# #
|
||||
# You should not have to edit anything below this point #
|
||||
# #
|
||||
############################################################################
|
||||
|
||||
SDIRS = liblber ldapd libldap
|
||||
OTHERS = finger gopher ud
|
||||
|
||||
all: lber-library ldap-server ldap-library
|
||||
|
||||
library-only: lber-library ldap-library
|
||||
|
||||
others: ldap-finger ldap-gopher ldap-ud
|
||||
|
||||
lber-library:
|
||||
echo "cd liblber; $(MAKE) all"
|
||||
cd liblber
|
||||
$(MAKE) CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" LIBDIR=$(LIBDIR) \
|
||||
CC=$(CC) LD=$(LD) /F makelber.msc
|
||||
cd ..
|
||||
|
||||
ldap-library:
|
||||
echo "cd libldap; $(MAKE) all"
|
||||
cd libldap
|
||||
$(MAKE) CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" LIBDIR=$(LIBDIR) \
|
||||
CC=$(CC) LD=$(LD) /F makeldap.msc
|
||||
cd ..
|
||||
|
||||
#ldap-ud:
|
||||
# echo "cd ud; $(MAKE) all"
|
||||
# cd ud
|
||||
# $(MAKE) CFLAGS="$(CFLAGS) $(UDDEFINES)" LDFLAGS="$(LDFLAGS)" \
|
||||
# LIBDIR=$(LIBDIR) CC=$(CC) LD=$(LD) makeud.msc
|
||||
# cd ..
|
||||
|
|
@ -1,60 +0,0 @@
|
|||
#-----------------------------------------------------------------------------
|
||||
# Copyright (c) 1992 Regents of the University of Michigan.
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms are permitted
|
||||
# provided that this notice is preserved and that due credit is given
|
||||
# to the University of Michigan at Ann Arbor. The name of the University
|
||||
# may not be used to endorse or promote products derived from this
|
||||
# software without specific prior written permission. This software
|
||||
# is provided ``as is'' without express or implied warranty.
|
||||
#
|
||||
# LDAP lightweight X.500 Directory access top level makefile for MSC
|
||||
#
|
||||
#-----------------------------------------------------------------------------
|
||||
#
|
||||
# Edit the following variables to have appropriate values for your system
|
||||
#
|
||||
NOLOGO = /nologo
|
||||
MAKE = nmake $(NOLOGO)
|
||||
CFLAGS = /c /AL /DDOS /DMSC /DNEEDPROTOS /DPCNFS /W3 /Oas $(ACFLAGS) -I../h
|
||||
LDFLAGS = /m /SEG:256 /ST:8192
|
||||
|
||||
############################################################################
|
||||
# #
|
||||
# You should not have to edit anything below this point #
|
||||
# #
|
||||
############################################################################
|
||||
|
||||
SDIRS = liblber ldapd libldap
|
||||
OTHERS = finger gopher ud
|
||||
|
||||
all: lber-lib ldap-lib
|
||||
|
||||
lib-only: lber-lib ldap-lib
|
||||
|
||||
others: ldap-finger ldap-gopher ldap-ud
|
||||
|
||||
lber-lib:
|
||||
cd liblber
|
||||
$(MAKE) CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" all
|
||||
cd ..
|
||||
|
||||
ldap-lib:
|
||||
cd libldap
|
||||
$(MAKE) CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" all
|
||||
cd ..
|
||||
|
||||
#ldap-ud:
|
||||
# echo "cd ud; $(MAKE) all"
|
||||
# cd ud
|
||||
# $(MAKE) CFLAGS="$(CFLAGS) $(UDDEFINES)" LDFLAGS="$(LDFLAGS)" \
|
||||
# LIBDIR=$(LIBDIR) CC=$(CC) LD=$(LD) makeud.msc
|
||||
# cd ..
|
||||
|
||||
clean:
|
||||
cd liblber
|
||||
$(MAKE) clean
|
||||
cd ..\libldap
|
||||
$(MAKE) clean
|
||||
cd ..
|
||||
|
|
@ -1,58 +0,0 @@
|
|||
#-----------------------------------------------------------------------------
|
||||
# Copyright (c) 1992 Regents of the University of Michigan.
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms are permitted
|
||||
# provided that this notice is preserved and that due credit is given
|
||||
# to the University of Michigan at Ann Arbor. The name of the University
|
||||
# may not be used to endorse or promote products derived from this
|
||||
# software without specific prior written permission. This software
|
||||
# is provided ``as is'' without express or implied warranty.
|
||||
#
|
||||
# lightweight ber library makefile for MicroSoft C
|
||||
#
|
||||
#-----------------------------------------------------------------------------
|
||||
|
||||
SRCS = decode.c encode.c io.c msdos.c lp.c
|
||||
OBJS = decode.obj encode.obj io.obj msdos.obj lp.obj
|
||||
|
||||
CFLAGS = $(ACFLAGS) -I../h
|
||||
CC = echo "cd up a level first"
|
||||
|
||||
NCFLAGS = -I../../include
|
||||
|
||||
#default:
|
||||
# (cd ../; make lber-library)
|
||||
|
||||
all: $(OBJS) liblber.lib
|
||||
|
||||
decode.obj: decode.c
|
||||
$(CC) $(CFLAGS) decode.c
|
||||
|
||||
encode.obj: encode.c
|
||||
$(CC) $(CFLAGS) encode.c
|
||||
|
||||
io.obj: io.c
|
||||
$(CC) $(CFLAGS) io.c
|
||||
|
||||
msdos.obj: msdos.c
|
||||
$(CC) $(CFLAGS) $(NCFLAGS) msdos.c
|
||||
|
||||
lp.obj: lp.c
|
||||
$(CC) $(CFLAGS) $(NCFLAGS) lp.c
|
||||
|
||||
liblber.lib: $(OBJS)
|
||||
del liblber.lib
|
||||
lib liblber.lib +decode.obj+encode.obj+io.obj+msdos.obj+lp.obj;
|
||||
|
||||
#etest.obj: etest.c
|
||||
# $(CC) $(CFLAGS) etest.c
|
||||
|
||||
#etest: liblber.lib etest.obj
|
||||
# $(LD) $(LDFLAGS) etest,etest,nul,liblber
|
||||
|
||||
#dtest.obj: dtest.c
|
||||
# $(CC) $(CFLAGS) dtest.c
|
||||
|
||||
#dtest: liblber.lib dtest.obj
|
||||
# $(LD) $(LDFLAGS) dtest,dtest,nul,liblber
|
||||
|
|
@ -1,50 +0,0 @@
|
|||
#-----------------------------------------------------------------------------
|
||||
# Copyright (c) 1992 Regents of the University of Michigan.
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms are permitted
|
||||
# provided that this notice is preserved and that due credit is given
|
||||
# to the University of Michigan at Ann Arbor. The name of the University
|
||||
# may not be used to endorse or promote products derived from this
|
||||
# software without specific prior written permission. This software
|
||||
# is provided ``as is'' without express or implied warranty.
|
||||
#
|
||||
# LDAP lightweight X.500 Directory access top level makefile for MSC
|
||||
#
|
||||
#-----------------------------------------------------------------------------
|
||||
|
||||
SRCS = decode.c encode.c io.c msdos.c lp.c
|
||||
OBJS = decode.obj encode.obj io.obj msdos.obj lp.obj
|
||||
|
||||
NOLOGO = /nologo
|
||||
CC = cl $(NOLOGO)
|
||||
MAKE = nmake $(NOLOGO)
|
||||
|
||||
default:
|
||||
cd ..
|
||||
$(MAKE) lber-lib
|
||||
|
||||
all: $(OBJS) liblber.lib
|
||||
|
||||
decode.obj: decode.c
|
||||
$(CC) $(CFLAGS) decode.c
|
||||
|
||||
encode.obj: encode.c
|
||||
$(CC) $(CFLAGS) encode.c
|
||||
|
||||
io.obj: io.c
|
||||
$(CC) $(CFLAGS) io.c
|
||||
|
||||
msdos.obj: msdos.c
|
||||
$(CC) $(CFLAGS) msdos.c
|
||||
|
||||
lp.obj: lp.c
|
||||
$(CC) $(CFLAGS) lp.c
|
||||
|
||||
liblber.lib: $(OBJS)
|
||||
del liblber.lib
|
||||
lib $(NOLOGO) liblber.lib +decode.obj+encode.obj+io.obj+msdos.obj+lp.obj;
|
||||
|
||||
clean:
|
||||
del *.obj
|
||||
del *.lib
|
||||
|
|
@ -1,92 +0,0 @@
|
|||
#-----------------------------------------------------------------------------
|
||||
# Copyright (c) 1992 Regents of the University of Michigan.
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms are permitted
|
||||
# provided that this notice is preserved and that due credit is given
|
||||
# to the University of Michigan at Ann Arbor. The name of the University
|
||||
# may not be used to endorse or promote products derived from this
|
||||
# software without specific prior written permission. This software
|
||||
# is provided ``as is'' without express or implied warranty.
|
||||
#
|
||||
# LDAP library makefile for MicroSoft C
|
||||
#
|
||||
#-----------------------------------------------------------------------------
|
||||
|
||||
SRCS = bind.c opendos.c result.c error.c compare.c search.c parse.c \
|
||||
modify.c add.c modrdn.c delete.c abandon.c synchronous.c \
|
||||
kerberos.c
|
||||
OBJS = bind.obj opendos.obj result.obj error.obj compare.obj search.obj \
|
||||
parse.obj modify.obj add.obj modrdn.obj delete.obj abandon.obj \
|
||||
synchronous.obj kerberos.obj
|
||||
|
||||
CFLAGS = $(ACFLAGS) -I../h $(KRBINCLUDEDIR)
|
||||
NCFLAGS = -I../../include
|
||||
CC = echo "cd up a level first"
|
||||
|
||||
#default:
|
||||
# (cd ../; make ldap-library)
|
||||
|
||||
all: libldap.lib ltest
|
||||
|
||||
bind.obj: bind.c
|
||||
$(CC) $(CFLAGS) $(NCFLAGS) bind.c
|
||||
|
||||
opendos.obj: opendos.c
|
||||
$(CC) $(CFLAGS) $(NCFLAGS) opendos.c
|
||||
|
||||
result.obj: result.c
|
||||
$(CC) $(CFLAGS) $(NCFLAGS) result.c
|
||||
|
||||
error.obj: error.c
|
||||
$(CC) $(CFLAGS) error.c
|
||||
|
||||
compare.obj: compare.c
|
||||
$(CC) $(CFLAGS) compare.c
|
||||
|
||||
search.obj: search.c
|
||||
$(CC) $(CFLAGS) search.c
|
||||
|
||||
parse.obj: parse.c
|
||||
$(CC) $(CFLAGS) parse.c
|
||||
|
||||
modify.obj: modify.c
|
||||
$(CC) $(CFLAGS) modify.c
|
||||
|
||||
add.obj: add.c
|
||||
$(CC) $(CFLAGS) add.c
|
||||
|
||||
modrdn.obj: modrdn.c
|
||||
$(CC) $(CFLAGS) modrdn.c
|
||||
|
||||
delete.obj: delete.c
|
||||
$(CC) $(CFLAGS) delete.c
|
||||
|
||||
abandon.obj: abandon.c
|
||||
$(CC) $(CFLAGS) abandon.c
|
||||
|
||||
synchronous.obj: synchronous.c
|
||||
$(CC) $(CFLAGS) synchronous.c
|
||||
|
||||
kerberos.obj: kerberos.c
|
||||
$(CC) $(CFLAGS) kerberos.c
|
||||
|
||||
libldap.lib: $(OBJS)
|
||||
del libldap.lib
|
||||
lib libldap.lib +bind.obj+opendos.obj+result.obj+error.obj+compare.obj;
|
||||
lib libldap.lib +search.obj+parse.obj+modify.obj+add.obj+modrdn.obj;
|
||||
lib libldap.lib +delete.obj+abandon.obj+synchronous.obj+kerberos.obj;
|
||||
|
||||
test.obj: test.c
|
||||
$(CC) $(CFLAGS) test.c
|
||||
|
||||
ltest: libldap.lib test.obj ..\liblber\liblber.lib
|
||||
copy libldap.lib ..\..\lib
|
||||
copy ..\liblber\liblber.lib ..\..\lib
|
||||
cd ..\..\lib
|
||||
$(LD) $(LDFLAGS) ..\ldap\libldap\test+memdebug+ncsaio,ltest,nul,libldap+liblber.lib+tcp+sess+enet+common
|
||||
copy ltest.exe ..\ldap\libldap\ltest.exe
|
||||
del libldap.lib
|
||||
del liblber.lib
|
||||
del ltest.exe
|
||||
cd ..\ldap\libldap
|
||||
|
|
@ -1,97 +0,0 @@
|
|||
#-----------------------------------------------------------------------------
|
||||
# Copyright (c) 1992 Regents of the University of Michigan.
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms are permitted
|
||||
# provided that this notice is preserved and that due credit is given
|
||||
# to the University of Michigan at Ann Arbor. The name of the University
|
||||
# may not be used to endorse or promote products derived from this
|
||||
# software without specific prior written permission. This software
|
||||
# is provided ``as is'' without express or implied warranty.
|
||||
#
|
||||
# LDAP lightweight X.500 Directory access top level makefile for MSC
|
||||
#
|
||||
#-----------------------------------------------------------------------------
|
||||
|
||||
SRCS = bind.c opendos.c result.c error.c compare.c search.c parse.c \
|
||||
modify.c add.c modrdn.c delete.c abandon.c synchron.c \
|
||||
kerberos.c cache.c ufn.c
|
||||
OBJS = bind.obj opendos.obj result.obj error.obj compare.obj search.obj \
|
||||
parse.obj modify.obj add.obj modrdn.obj delete.obj abandon.obj \
|
||||
synchron.obj kerberos.obj cache.obj ufn.obj
|
||||
|
||||
NOLOGO = /nologo
|
||||
CC = cl $(NOLOGO)
|
||||
MAKE = nmake $(NOLOGO)
|
||||
LD = link $(NOLOGO)
|
||||
|
||||
default:
|
||||
cd ..
|
||||
$(MAKE) ldap-lib
|
||||
|
||||
all: libldap.lib ltest
|
||||
|
||||
bind.obj: bind.c
|
||||
$(CC) $(CFLAGS) bind.c
|
||||
|
||||
opendos.obj: opendos.c
|
||||
$(CC) $(CFLAGS) opendos.c
|
||||
|
||||
result.obj: result.c
|
||||
$(CC) $(CFLAGS) result.c
|
||||
|
||||
error.obj: error.c
|
||||
$(CC) $(CFLAGS) error.c
|
||||
|
||||
compare.obj: compare.c
|
||||
$(CC) $(CFLAGS) compare.c
|
||||
|
||||
search.obj: search.c
|
||||
$(CC) $(CFLAGS) search.c
|
||||
|
||||
parse.obj: parse.c
|
||||
$(CC) $(CFLAGS) parse.c
|
||||
|
||||
modify.obj: modify.c
|
||||
$(CC) $(CFLAGS) modify.c
|
||||
|
||||
add.obj: add.c
|
||||
$(CC) $(CFLAGS) add.c
|
||||
|
||||
modrdn.obj: modrdn.c
|
||||
$(CC) $(CFLAGS) modrdn.c
|
||||
|
||||
delete.obj: delete.c
|
||||
$(CC) $(CFLAGS) delete.c
|
||||
|
||||
abandon.obj: abandon.c
|
||||
$(CC) $(CFLAGS) abandon.c
|
||||
|
||||
synchron.obj: synchron.c
|
||||
$(CC) $(CFLAGS) synchron.c
|
||||
|
||||
kerberos.obj: kerberos.c
|
||||
$(CC) $(CFLAGS) kerberos.c
|
||||
|
||||
cache.obj: cache.c
|
||||
$(CC) $(CFLAGS) cache.c
|
||||
|
||||
ufn.obj: ufn.c
|
||||
$(CC) $(CFLAGS) ufn.c
|
||||
|
||||
libldap.lib: $(OBJS)
|
||||
del libldap.lib
|
||||
lib $(NOLOGO) libldap.lib +bind.obj+opendos.obj+result.obj+error.obj+compare.obj;
|
||||
lib $(NOLOGO) libldap.lib +search.obj+parse.obj+modify.obj+add.obj+modrdn.obj;
|
||||
lib $(NOLOGO) libldap.lib +delete.obj+abandon.obj+synchron.obj+kerberos.obj+cache.obj+ufn.obj;
|
||||
|
||||
test.obj: test.c
|
||||
$(CC) $(CFLAGS) test.c
|
||||
|
||||
ltest: libldap.lib test.obj ..\liblber\liblber.lib
|
||||
$(LD) $(LDFLAGS) test,ltest,nul,libldap+..\liblber\liblber+ltklib ;
|
||||
|
||||
clean:
|
||||
del *.obj
|
||||
del *.lib
|
||||
del *.exe
|
||||
|
|
@ -1,76 +0,0 @@
|
|||
#-----------------------------------------------------------------------------
|
||||
# Copyright (c) 1992 Regents of the University of Michigan.
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms are permitted
|
||||
# provided that this notice is preserved and that due credit is given
|
||||
# to the University of Michigan at Ann Arbor. The name of the University
|
||||
# may not be used to endorse or promote products derived from this
|
||||
# software without specific prior written permission. This software
|
||||
# is provided ``as is'' without express or implied warranty.
|
||||
#
|
||||
# ud makefile for Microsoft C
|
||||
#
|
||||
# Use -DUOFM for University of Michigan specifics like:
|
||||
# if ud should know about noBatchUpdates
|
||||
# Use -DDOS if building for a DOS machine
|
||||
# Use -DNOTERMCAP if there is no termcap library
|
||||
# also need to redefine/undefine the Makefile TERMLIB variable
|
||||
#-----------------------------------------------------------------------------
|
||||
SRCS= find.c mod.c print.c auth.c util.c help.c getopt.c versio.c
|
||||
OBJS= find.obj mod.obj print.obj auth.obj util.obj help.obj \
|
||||
getopt.obj version.obj
|
||||
HDRS= ud.h protoud.h
|
||||
|
||||
CFLAGS = $(ACFLAGS) -I../h
|
||||
NCFLAGS = -I../../include
|
||||
CC = echo "cd up a level first"
|
||||
|
||||
#default:
|
||||
# (cd ../; make ud)
|
||||
|
||||
all: ud
|
||||
|
||||
main.obj: main.c
|
||||
$(CC) $(CFLAGS) main.c
|
||||
|
||||
find.obj: find.c
|
||||
$(CC) $(CFLAGS) find.c
|
||||
|
||||
mod.obj: mod.c
|
||||
$(CC) $(CFLAGS) mod.c
|
||||
|
||||
print.obj: print.c
|
||||
$(CC) $(CFLAGS) print.c
|
||||
|
||||
auth.obj: auth.c
|
||||
$(CC) $(CFLAGS) auth.c
|
||||
|
||||
util.obj: util.c
|
||||
$(CC) $(CFLAGS) util.c
|
||||
|
||||
help.obj: help.c
|
||||
$(CC) $(CFLAGS) help.c
|
||||
|
||||
getopt.obj: getopt.c
|
||||
$(CC) $(CFLAGS) getopt.c
|
||||
|
||||
version.obj: version.c
|
||||
$(CC) $(CFLAGS) version.c
|
||||
|
||||
libud.lib: $(OBJS)
|
||||
del libud.lib
|
||||
lib libud.lib find.obj+mod.obj+print.obj+auth.obj+util.obj+help.obj+getopt+version;
|
||||
|
||||
bud: libud.lib ../libldap/libldap.lib ../liblber/liblber.lib
|
||||
copy libud.lib ..\..\lib
|
||||
copy ..\libldap\libldap.lib ..\..\lib
|
||||
copy ..\liblber\liblber.lib ..\..\lib
|
||||
cd ..\..\lib
|
||||
$(LD) $(LDFLAGS) ..\ldap\ud\main+memdebug+ncsaio,bud,nul,libud+libldap+liblber+tcp+sess+enet+common
|
||||
copy bud.exe ..\ldap\ud\bud.exe
|
||||
del libldap.lib
|
||||
del liblber.lib
|
||||
del bud.exe
|
||||
cd ..\ldap\ud
|
||||
|
||||
|
|
@ -1,84 +0,0 @@
|
|||
#ifndef PCNFS
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <dos.h>
|
||||
#include <stdarg.h>
|
||||
#include <io.h>
|
||||
#include <time.h>
|
||||
#define ffblk find_t
|
||||
#define ff_name name
|
||||
#include <signal.h>
|
||||
#include <direct.h>
|
||||
#include <malloc.h>
|
||||
|
||||
#define WINMASTER
|
||||
#define LPR
|
||||
|
||||
#ifdef MEMORY_DEBUG
|
||||
#include "memdebug.h"
|
||||
#endif
|
||||
#include "whatami.h"
|
||||
#include "hostform.h"
|
||||
#include "windat.h"
|
||||
#include "lp.h"
|
||||
#include "externs.h"
|
||||
#include "msdos.h"
|
||||
|
||||
/* Function prototypes */
|
||||
|
||||
int netup = 0;
|
||||
int connection_id;
|
||||
int cf_length = 0; /* current length of control_file */
|
||||
int sequence_number; /* sequence number for spooled file names */
|
||||
struct config *cp; /* configuration information */
|
||||
char username[9]; /* name of user */
|
||||
int debug = 0; /* 1 = print debugging info; set with -D option */
|
||||
|
||||
int ftppassword, /* not used; just to avoid unresolved external */
|
||||
bypass_passwd=0; /* whether to bypass the password check */
|
||||
|
||||
unsigned char path_name[_MAX_DRIVE+_MAX_DIR], /* character storage for the path name */
|
||||
temp_str[20],s[_MAX_DIR],temp_data[30];
|
||||
|
||||
/* Do session initialization. Snetinit reads config file. */
|
||||
ncsainit()
|
||||
{
|
||||
char *ptr;
|
||||
int i;
|
||||
if (netup) return;
|
||||
ptr = getenv("CONFIG.TEL");
|
||||
if (ptr != NULL) Shostfile(ptr);
|
||||
if(i=Snetinit()) {
|
||||
if(i==-2) /* BOOTP server not responding */
|
||||
netshut(); /* release network */
|
||||
crash("network initialization failed.");
|
||||
} /* end if */
|
||||
netup = 1;
|
||||
}
|
||||
|
||||
|
||||
int ncsaopen( address, port )
|
||||
unsigned long address;
|
||||
short port;
|
||||
{
|
||||
unsigned char *bob;
|
||||
struct machinfo *mr;
|
||||
short source_port;
|
||||
short handle;
|
||||
char s[256];
|
||||
|
||||
bob = (unsigned char *) &address;
|
||||
sprintf(s,"%u.%u.%u.%u\n",bob[0],bob[1],bob[2],bob[3]);
|
||||
mr = lookup(s);
|
||||
|
||||
/* open connection */
|
||||
/* pick a source port at random from the set of privileged ports */
|
||||
|
||||
srand((unsigned)time(NULL));
|
||||
|
||||
source_port = rand() % MAX_PRIV_PORT;
|
||||
handle = open_connection(mr, source_port, port);
|
||||
return(handle);
|
||||
}
|
||||
#endif /* PCNFS */
|
||||
|
|
@ -1,52 +0,0 @@
|
|||
/* ldapmsdos.h */
|
||||
/*
|
||||
* Copyright (c) 1992 Regents of the University of Michigan.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms are permitted
|
||||
* provided that this notice is preserved and that due credit is given
|
||||
* to the University of Michigan at Ann Arbor. The name of the University
|
||||
* may not be used to endorse or promote products derived from this
|
||||
* software without specific prior written permission. This software
|
||||
* is provided ``as is'' without express or implied warranty.
|
||||
*/
|
||||
|
||||
#ifdef PCNFS
|
||||
#include <sys/tk_types.h>
|
||||
#include <sys/socket.h>
|
||||
#include <sys/nfs_time.h>
|
||||
#endif /* PCNFS */
|
||||
|
||||
#ifdef NCSA
|
||||
#define NCSADOMAINFIX 1 /* see README.dos */
|
||||
|
||||
typedef unsigned short us;
|
||||
typedef unsigned long ul;
|
||||
#define ntohs(i) ((us)( (((us)i & 0xff) << 8) + (((us)i & 0xff00) >> 8) ))
|
||||
#define ntohl(i) ((ul)( (((ul)i & 0xff) << 24) + (((ul)i & 0xff00) << 8) + \
|
||||
(((ul)i & 0xff0000) >> 8) + \
|
||||
(((ul)i & 0xff000000) >> 24) ))
|
||||
#define htons(i) ntohs(i)
|
||||
#define htonl(i) ntohl(i)
|
||||
|
||||
typedef unsigned long ip_addr;
|
||||
typedef unsigned long u_long;
|
||||
typedef unsigned short u_short;
|
||||
typedef unsigned char u_char;
|
||||
|
||||
extern int ncsainit( void );
|
||||
extern int ncsaopen( unsigned long addr, short port );
|
||||
extern int nread(int connection_id, char *buff, int buff_size);
|
||||
#endif /* NCSA */
|
||||
|
||||
#if defined( PCNFS ) || defined( NCSA )
|
||||
#include <malloc.h>
|
||||
|
||||
struct timeval {
|
||||
long tv_sec;
|
||||
long tv_usec;
|
||||
};
|
||||
#endif /* PCNFS */
|
||||
|
||||
#define strcasecmp(a,b) stricmp(a,b)
|
||||
#define strncasecmp(a,b,len) strnicmp(a,b,len)
|
||||
|
|
@ -1,393 +0,0 @@
|
|||
/*
|
||||
* Copyright (c) 1992 Regents of the University of Michigan.
|
||||
* All rights reserved.
|
||||
*
|
||||
* open-dos.c
|
||||
*/
|
||||
|
||||
#ifndef lint
|
||||
static char copyright[] = "@(#) Copyright (c) 1992 Regents of the University of Michigan.\nAll rights reserved.\n";
|
||||
#endif
|
||||
|
||||
#include "lber.h"
|
||||
#include "ldap.h"
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <malloc.h>
|
||||
#ifdef PCNFS
|
||||
#include <tklib.h>
|
||||
#include <sys/tk_types.h>
|
||||
#include <sys/socket.h>
|
||||
#include <netinet/in.h>
|
||||
#include <netdb.h>
|
||||
#else /* PCNFS */
|
||||
#include "hostform.h"
|
||||
#include "externs.h"
|
||||
#endif /* PCNFS */
|
||||
#include "msdos.h"
|
||||
|
||||
#ifndef INADDR_LOOPBACK
|
||||
#define INADDR_LOOPBACK ((u_long) 0x7f000001)
|
||||
#endif
|
||||
|
||||
#ifdef LDAP_DEBUG
|
||||
int ldap_debug;
|
||||
#endif
|
||||
|
||||
#ifndef PCNFS
|
||||
u_long *lookup_addrs( char *host );
|
||||
extern long inet_addr( char *addr );
|
||||
extern struct machinfo *lookup( char *host );
|
||||
#endif /* PCNFS */
|
||||
|
||||
/*
|
||||
* ldap_open - initialize and connect to an ldap server. A magic cookie to
|
||||
* be used for future communication is returned on success, NULL on failure.
|
||||
*
|
||||
* Example:
|
||||
* LDAP *ld;
|
||||
* ld = ldap_open( hostname, port );
|
||||
*/
|
||||
|
||||
#ifdef PCNFS
|
||||
LDAP *ldap_open( host, port )
|
||||
char *host;
|
||||
int port;
|
||||
{
|
||||
int s;
|
||||
unsigned long address;
|
||||
struct sockaddr_in sock;
|
||||
struct hostent *hp;
|
||||
LDAP *ld;
|
||||
char *p, hostname[BUFSIZ];
|
||||
|
||||
Debug( LDAP_DEBUG_TRACE, "ldap_open\n", 0, 0, 0 );
|
||||
|
||||
if ( host == NULL ) {
|
||||
fprintf(stderr, "No hostname!\n");
|
||||
return( NULL );
|
||||
}
|
||||
if ( (hp = gethostbyname( host )) == NULL ) {
|
||||
perror( "gethostbyname" );
|
||||
return( NULL );
|
||||
}
|
||||
SAFEMEMCPY( (char *) &address, (char *) hp->h_addr, hp->h_length );
|
||||
strcpy( hostname, hp->h_name );
|
||||
if ( (p = strchr( hostname, '.' )) != NULL )
|
||||
*p = '\0';
|
||||
if ( port == 0 )
|
||||
port = LDAP_PORT;
|
||||
|
||||
if ( (s = socket( AF_INET, SOCK_STREAM, 0 )) < 0 ) {
|
||||
tk_perror( "socket" );
|
||||
return( NULL );
|
||||
}
|
||||
|
||||
memset( (char *)&sock, 0, sizeof(sock));
|
||||
SAFEMEMCPY( &sock.sin_addr, hp->h_addr, hp->h_length );
|
||||
sock.sin_family = hp->h_addrtype;
|
||||
sock.sin_port = htons( (u_short) port);
|
||||
|
||||
if (connect( s, (struct sockaddr *)&sock, sizeof(sock) ) < 0 ) {
|
||||
tk_perror( "connect" );
|
||||
return( NULL );
|
||||
}
|
||||
|
||||
if ( (ld = (LDAP *) calloc( sizeof(LDAP), 1 )) == NULL ) {
|
||||
close( s );
|
||||
return( NULL );
|
||||
}
|
||||
ld->ld_sb.sb_sd = s;
|
||||
ld->ld_host = strdup( hostname );
|
||||
ld->ld_version = LDAP_VERSION;
|
||||
|
||||
return( ld );
|
||||
}
|
||||
#else /* PCNFS */
|
||||
|
||||
LDAP *ldap_open( host, port )
|
||||
char *host;
|
||||
int port;
|
||||
{
|
||||
int s, i;
|
||||
unsigned long tmpaddr[2], *addrs;
|
||||
LDAP *ld;
|
||||
char *p, hostname[BUFSIZ];
|
||||
|
||||
Debug( LDAP_DEBUG_TRACE, "ldap_open\n", 0, 0, 0 );
|
||||
|
||||
ncsainit();
|
||||
tmpaddr[ 1 ] = 0;
|
||||
addrs = tmpaddr;
|
||||
if ( host != NULL ) {
|
||||
strcpy( hostname, host );
|
||||
if ( (tmpaddr[0] = inet_addr( host )) == -1 ) {
|
||||
if (( addrs = lookup_addrs( host )) == NULL ) {
|
||||
netshut();
|
||||
return( NULL );
|
||||
}
|
||||
}
|
||||
} else {
|
||||
tmpaddr[0] = INADDR_LOOPBACK;
|
||||
strcpy( hostname, "localhost" );
|
||||
}
|
||||
if ( (p = strchr( hostname, '.' )) != NULL )
|
||||
*p = '\0';
|
||||
if ( port == 0 )
|
||||
port = LDAP_PORT;
|
||||
|
||||
for ( i = 0; addrs[ i ] != 0; ++i ) {
|
||||
if ( (s = ncsaopen( addrs[ i ], port )) >= 0 ) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if ( addrs[ i ] == 0 ) {
|
||||
netshut();
|
||||
return( NULL );
|
||||
}
|
||||
|
||||
if ( (ld = (LDAP *) calloc( sizeof(LDAP), 1 )) == NULL ) {
|
||||
netclose( s );
|
||||
netshut();
|
||||
return( NULL );
|
||||
}
|
||||
ld->ld_sb.sb_sd = s;
|
||||
ld->ld_host = strdup( hostname );
|
||||
ld->ld_version = LDAP_VERSION;
|
||||
|
||||
return( ld );
|
||||
}
|
||||
|
||||
|
||||
u_long *
|
||||
lookup_addrs( host )
|
||||
char *host;
|
||||
{
|
||||
struct machinfo *mr;
|
||||
int numaddrs, i;
|
||||
char *ipp;
|
||||
u_long *addrs, along;
|
||||
|
||||
if (( mr = lookup( host )) == NULL ) {
|
||||
return( NULL );
|
||||
}
|
||||
|
||||
ipp = mr->hostip;
|
||||
#ifdef NCSADOMAINFIX
|
||||
numaddrs = 0;
|
||||
while ( numaddrs < 4 ) { /* maximum of 4 addresses */
|
||||
SAFEMEMCPY( (char *)&along, (char *)ipp, sizeof( u_long ));
|
||||
if ( along == 0 ) {
|
||||
break;
|
||||
}
|
||||
++numaddrs;
|
||||
ipp += 4;
|
||||
}
|
||||
#else /* NCSADOMAINFIX */
|
||||
numaddrs = 1;
|
||||
#endif /* NCSADOMAINFIX */
|
||||
|
||||
if (( addrs = (u_long *)malloc(( numaddrs + 1 ) * sizeof( u_long )))
|
||||
== NULL ) {
|
||||
return( NULL );
|
||||
}
|
||||
addrs[ numaddrs ] = 0;
|
||||
|
||||
for ( i = 0, ipp = mr->hostip; i < numaddrs; ++i, ipp += 4 ) {
|
||||
SAFEMEMCPY( (char *)&addrs[ i ], (char *)ipp, sizeof( u_long ));
|
||||
}
|
||||
|
||||
return( addrs );
|
||||
}
|
||||
|
||||
/*
|
||||
* Stand alone inet_addr derived from BSD 4.3 Networking Release 2 by MCS
|
||||
*
|
||||
* Copyright (c) 1992 Regents of the University of Michigan.
|
||||
* All rights reserved.
|
||||
*
|
||||
* inet_addr.c
|
||||
*/
|
||||
|
||||
/*
|
||||
* Copyright (c) 1983, 1990 Regents of the University of California.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. All advertising materials mentioning features or use of this software
|
||||
* must display the following acknowledgement:
|
||||
* This product includes software developed by the University of
|
||||
* California, Berkeley and its contributors.
|
||||
* 4. Neither the name of the University nor the names of its contributors
|
||||
* may be used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#if defined(LIBC_SCCS) && !defined(lint)
|
||||
static char sccsid[] = "@(#)inet_addr.c 5.10 (Berkeley) 2/24/91";
|
||||
#endif /* LIBC_SCCS and not lint */
|
||||
|
||||
#define STANDALONE 1
|
||||
|
||||
#ifdef STANDALONE
|
||||
#define INADDR_NONE 0xffffffff /* -1 return */
|
||||
#define const
|
||||
int inet_aton( char *cp, u_long *addr);
|
||||
|
||||
#else STANDALONE
|
||||
#include <netinet/in.h>
|
||||
#include <arpa/inet.h>
|
||||
#endif STANDALONE
|
||||
|
||||
#include <ctype.h>
|
||||
|
||||
#ifndef isascii
|
||||
#define isascii(c) ((unsigned)(c)<=0177) /* for broken machines */
|
||||
#endif isascii
|
||||
|
||||
/*
|
||||
* Ascii internet address interpretation routine.
|
||||
* The value returned is in network order.
|
||||
*/
|
||||
long
|
||||
inet_addr(cp)
|
||||
register const char *cp;
|
||||
{
|
||||
#ifdef STANDALONE
|
||||
u_long val;
|
||||
#else STANDALONE
|
||||
struct in_addr val;
|
||||
#endif STANDALONE
|
||||
|
||||
if (inet_aton(cp, &val))
|
||||
#ifdef STANDALONE
|
||||
return (val);
|
||||
#else STANDALONE
|
||||
return (val.s_addr);
|
||||
#endif STANDALONE
|
||||
return (INADDR_NONE);
|
||||
}
|
||||
|
||||
/*
|
||||
* Check whether "cp" is a valid ascii representation
|
||||
* of an Internet address and convert to a binary address.
|
||||
* Returns 1 if the address is valid, 0 if not.
|
||||
* This replaces inet_addr, the return value from which
|
||||
* cannot distinguish between failure and a local broadcast address.
|
||||
*/
|
||||
|
||||
inet_aton(cp, addr)
|
||||
register char *cp;
|
||||
#ifdef STANDALONE
|
||||
u_long *addr;
|
||||
#else STANDALONE
|
||||
struct in_addr *addr;
|
||||
#endif STANDALONE
|
||||
{
|
||||
register u_long val, base, n;
|
||||
register char c;
|
||||
u_long parts[4], *pp = parts;
|
||||
|
||||
for (;;) {
|
||||
/*
|
||||
* Collect number up to ``.''.
|
||||
* Values are specified as for C:
|
||||
* 0x=hex, 0=octal, other=decimal.
|
||||
*/
|
||||
val = 0; base = 10;
|
||||
if (*cp == '0') {
|
||||
if (*++cp == 'x' || *cp == 'X')
|
||||
base = 16, cp++;
|
||||
else
|
||||
base = 8;
|
||||
}
|
||||
while ((c = *cp) != '\0') {
|
||||
if (isascii(c) && isdigit(c)) {
|
||||
val = (val * base) + (c - '0');
|
||||
cp++;
|
||||
continue;
|
||||
}
|
||||
if (base == 16 && isascii(c) && isxdigit(c)) {
|
||||
val = (val << 4) +
|
||||
(c + 10 - (islower(c) ? 'a' : 'A'));
|
||||
cp++;
|
||||
continue;
|
||||
}
|
||||
break;
|
||||
}
|
||||
if (*cp == '.') {
|
||||
/*
|
||||
* Internet format:
|
||||
* a.b.c.d
|
||||
* a.b.c (with c treated as 16-bits)
|
||||
* a.b (with b treated as 24 bits)
|
||||
*/
|
||||
if (pp >= parts + 3 || val > 0xff)
|
||||
return (0);
|
||||
*pp++ = val, cp++;
|
||||
} else
|
||||
break;
|
||||
}
|
||||
/*
|
||||
* Check for trailing characters.
|
||||
*/
|
||||
if (*cp && (!isascii(*cp) || !isspace(*cp)))
|
||||
return (0);
|
||||
/*
|
||||
* Concoct the address according to
|
||||
* the number of parts specified.
|
||||
*/
|
||||
n = pp - parts + 1;
|
||||
switch (n) {
|
||||
|
||||
case 1: /* a -- 32 bits */
|
||||
break;
|
||||
|
||||
case 2: /* a.b -- 8.24 bits */
|
||||
if (val > 0xffffff)
|
||||
return (0);
|
||||
val |= parts[0] << 24;
|
||||
break;
|
||||
|
||||
case 3: /* a.b.c -- 8.8.16 bits */
|
||||
if (val > 0xffff)
|
||||
return (0);
|
||||
val |= (parts[0] << 24) | (parts[1] << 16);
|
||||
break;
|
||||
|
||||
case 4: /* a.b.c.d -- 8.8.8.8 bits */
|
||||
if (val > 0xff)
|
||||
return (0);
|
||||
val |= (parts[0] << 24) | (parts[1] << 16) | (parts[2] << 8);
|
||||
break;
|
||||
}
|
||||
if (addr)
|
||||
#ifdef STANDALONE
|
||||
*addr = htonl(val);
|
||||
#else STANDALONE
|
||||
addr->s_addr = htonl(val);
|
||||
#endif STANDALONE
|
||||
return (1);
|
||||
}
|
||||
|
||||
#endif /* PCNFS */
|
||||
|
|
@ -1,28 +0,0 @@
|
|||
extern int bind_info(void);
|
||||
extern int auth(char *who,char *best_guess);
|
||||
extern char *mygetpass(char *prompt);
|
||||
extern int iam(char *who);
|
||||
extern int print_my_name(void);
|
||||
extern int init_search(char * *attributes);
|
||||
extern int init_read(char * *attributes);
|
||||
extern int dxi_vrfy(char *dn);
|
||||
extern LDAPMessage *find(char *who);
|
||||
extern int pick_one(int i);
|
||||
extern int print_list(LDAPMessage *list,char * *names,int *matches);
|
||||
extern int main(int argc,char * *argv);
|
||||
extern int do_commands(void);
|
||||
extern int status(void);
|
||||
extern int change_base(char *s);
|
||||
extern int initialize_client(void);
|
||||
extern int attn(void);
|
||||
extern int print_help(char *s);
|
||||
extern char *alias(char *s);
|
||||
extern void printbase(char *lead,char *s);
|
||||
extern int fetch_buffer(char *buffer,int length,struct _iobuf *where);
|
||||
extern int modify(char *who);
|
||||
extern void set_pw(char *who);
|
||||
extern int change_field(char *tag,char *id,char (*val)[256],char *who);
|
||||
extern char *get_value(char *id,char *prompt);
|
||||
extern int parse_answer(LDAPMessage *s);
|
||||
extern int print_person(void);
|
||||
extern int print_entry(char (*s)[256],char *label);
|
||||
|
|
@ -1,119 +0,0 @@
|
|||
/*
|
||||
* Copyright (c) 1992, 1994 Regents of the University of Michigan.
|
||||
* All rights reserved.
|
||||
*
|
||||
* kerberos.c - for the windows environment
|
||||
*/
|
||||
|
||||
#include <msdos.h>
|
||||
#include "lber.h"
|
||||
#include "ldap.h"
|
||||
|
||||
#ifdef KERBEROS
|
||||
#ifdef WINSOCK
|
||||
#include <winsock.h>
|
||||
#endif
|
||||
#include <stdio.h>
|
||||
|
||||
#ifdef AUTHMAN
|
||||
#include <authlib.h>
|
||||
|
||||
/*
|
||||
* get_kerberosv4_credentials - obtain kerberos v4 credentials for ldap.
|
||||
* this includes krbtgt, and any service tickets
|
||||
*/
|
||||
|
||||
/* ARGSUSED */
|
||||
char *
|
||||
get_kerberosv4_credentials( LDAP *ld, char *who, char *service, int *len )
|
||||
{
|
||||
static short authman_refnum = 0;
|
||||
static char ticket[ MAX_KTXT_LEN ];
|
||||
short version, ticketlen, err;
|
||||
AUTH_PTR ticketStorage = ticket;
|
||||
AUTH_SHORT_PTR pTicketLen = &ticketlen;
|
||||
AUTH_STR_PTR pName = service;
|
||||
AUTH_STR_PTR pInstance;
|
||||
HINSTANCE instAuthLibDLL = NULL;
|
||||
pfn_openAuthMan fp_openAuthMan = NULL;
|
||||
pfn_closeAuthMan fp_closeAuthMan = NULL;
|
||||
pfn_getV4Ticket fp_getV4Ticket = NULL;
|
||||
|
||||
|
||||
#ifdef LDAP_REFERRALS
|
||||
pInstance = ld->ld_defconn->lconn_krbinstance;
|
||||
#else /* LDAP_REFERRALS */
|
||||
pInstance = ld->ld_host;
|
||||
#endif /* LDAP_REFERRALS */
|
||||
|
||||
if ( !pInstance ) { // if we don't know name of service host, no chance for service tickets
|
||||
ld->ld_errno = LDAP_LOCAL_ERROR;
|
||||
WSASetLastError(WSANO_ADDRESS);
|
||||
return( NULL );
|
||||
}
|
||||
|
||||
if ( !instAuthLibDLL )
|
||||
{
|
||||
unsigned int prevMode = SetErrorMode( SEM_NOOPENFILEERRORBOX ); // don't whine at user if you can't find it
|
||||
instAuthLibDLL = LoadLibrary("AuthLib.DLL");
|
||||
SetErrorMode( prevMode );
|
||||
|
||||
if ( instAuthLibDLL < HINSTANCE_ERROR ) // can't find authlib
|
||||
{
|
||||
ld->ld_errno = LDAP_AUTH_UNKNOWN;
|
||||
return( NULL );
|
||||
}
|
||||
|
||||
fp_openAuthMan = (pfn_openAuthMan)GetProcAddress( instAuthLibDLL, "openAuthMan" );
|
||||
fp_getV4Ticket = (pfn_getV4Ticket)GetProcAddress( instAuthLibDLL, "getV4Ticket" );
|
||||
fp_closeAuthMan = (pfn_closeAuthMan)GetProcAddress( instAuthLibDLL, "closeAuthMan" );
|
||||
|
||||
// verify that we found all the routines we need
|
||||
if (!(fp_closeAuthMan && fp_getV4Ticket && fp_openAuthMan))
|
||||
{
|
||||
FreeLibrary( instAuthLibDLL ); // free authlib.dll so it gets unloaded
|
||||
instAuthLibDLL = NULL;
|
||||
ld->ld_errno = LDAP_AUTH_UNKNOWN;
|
||||
return( NULL );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
* make sure RJC's Authentication Manager version isn't > 4.0
|
||||
*/
|
||||
if ( authman_refnum == 0 && (( err = (fp_openAuthMan)( &authman_refnum, &version )) != AUTH_NO_ERROR || AUTH_VERSION_CODE > version )) {
|
||||
ld->ld_errno = LDAP_AUTH_UNKNOWN;
|
||||
if ( AUTH_VERSION_CODE > version )
|
||||
{
|
||||
ld->ld_errno = LDAP_INAPPROPRIATE_AUTH; // version too old
|
||||
}
|
||||
(fp_closeAuthMan)( authman_refnum );
|
||||
authman_refnum = NULL;
|
||||
FreeLibrary( instAuthLibDLL ); // free authlib.dll so it gets unloaded
|
||||
instAuthLibDLL = NULL;
|
||||
return( NULL );
|
||||
}
|
||||
|
||||
if (( err = (fp_getV4Ticket)( authman_refnum, ticketStorage, pTicketLen, pName, pInstance,
|
||||
NULL, INFINITE_LIFETIME, 1 )) != AUTH_NO_ERROR ) {
|
||||
|
||||
ld->ld_errno = AUTH_USER_CANCELED == err ? LDAP_USER_CANCELLED : LDAP_INVALID_CREDENTIALS;
|
||||
(fp_closeAuthMan)( authman_refnum );
|
||||
authman_refnum = NULL;
|
||||
FreeLibrary( instAuthLibDLL ); // free authlib.dll so it gets unloaded
|
||||
instAuthLibDLL = NULL;
|
||||
return( NULL );
|
||||
}
|
||||
|
||||
*len = ticketlen;
|
||||
(fp_closeAuthMan)( authman_refnum ); // open pukes if you call twice with no close in between
|
||||
authman_refnum = NULL;
|
||||
FreeLibrary( instAuthLibDLL ); // free authlib.dll so it gets unloaded
|
||||
instAuthLibDLL = NULL;
|
||||
return( (char *)ticket );
|
||||
}
|
||||
|
||||
#endif /* AUTHMAN */
|
||||
#endif /* KERBEROS */
|
||||
|
||||
|
|
@ -1,166 +0,0 @@
|
|||
LIBRARY LDAP32
|
||||
DESCRIPTION 'Lightweight Directory Access Protocol Client API'
|
||||
CODE PRELOAD MOVEABLE DISCARDABLE
|
||||
DATA PRELOAD MOVEABLE SINGLE
|
||||
VERSION 3.2
|
||||
HEAPSIZE 4096
|
||||
|
||||
EXPORTS
|
||||
; we need to manually assign ordinal numbers so we can add new routines
|
||||
; and not disturb the ordinals and thus not require callers to relink.
|
||||
ldap_abandon @10
|
||||
ldap_add @11
|
||||
ldap_unbind @13
|
||||
ldap_enable_cache @14
|
||||
ldap_disable_cache @15
|
||||
ldap_destroy_cache @16
|
||||
ldap_flush_cache @17
|
||||
ldap_uncache_entry @18
|
||||
ldap_compare @19
|
||||
ldap_delete @20
|
||||
ldap_result2error @21
|
||||
ldap_err2string @22
|
||||
ldap_modify @23
|
||||
ldap_modrdn @24
|
||||
ldap_open @25
|
||||
ldap_first_entry @26
|
||||
ldap_next_entry @27
|
||||
ldap_delete_result_entry @28
|
||||
ldap_add_result_entry @29
|
||||
ldap_get_dn @30
|
||||
ldap_dn2ufn @31
|
||||
ldap_first_attribute @32
|
||||
ldap_next_attribute @33
|
||||
ldap_get_values @34
|
||||
ldap_get_values_len @35
|
||||
ldap_count_entries @36
|
||||
ldap_count_values @37
|
||||
ldap_value_free @38
|
||||
ldap_explode_dn @39
|
||||
ldap_result @40
|
||||
ldap_msgfree @41
|
||||
ldap_msgdelete @42
|
||||
ldap_search @43
|
||||
ldap_add_s @44
|
||||
ldap_bind_s @45
|
||||
ldap_unbind_s @46
|
||||
ldap_delete_s @47
|
||||
ldap_modify_s @48
|
||||
ldap_modrdn_s @49
|
||||
ldap_search_s @50
|
||||
ldap_search_st @51
|
||||
ldap_compare_s @52
|
||||
ldap_ufn_search_c @53
|
||||
ldap_ufn_search_s @54
|
||||
ldap_init_getfilter @55
|
||||
ldap_getfilter_free @56
|
||||
ldap_getfirstfilter @57
|
||||
ldap_getnextfilter @58
|
||||
ldap_simple_bind @59
|
||||
ldap_simple_bind_s @60
|
||||
ldap_bind @61
|
||||
ldap_friendly_name @62
|
||||
ldap_free_friendlymap @63
|
||||
ldap_ufn_search_ct @64
|
||||
ldap_set_cache_options @65
|
||||
ldap_uncache_request @66
|
||||
ldap_modrdn2 @67
|
||||
ldap_modrdn2_s @68
|
||||
ldap_ufn_setfilter @69
|
||||
ldap_ufn_setprefix @70
|
||||
ldap_ufn_timeout @71
|
||||
ldap_init_getfilter_buf @72
|
||||
ldap_setfilteraffixes @73
|
||||
ldap_sort_entries @74
|
||||
ldap_sort_values @75
|
||||
ldap_sort_strcasecmp @76
|
||||
ldap_count_values_len @77
|
||||
ldap_name2template @78
|
||||
ldap_value_free_len @79
|
||||
|
||||
; manually comment and uncomment these five as necessary
|
||||
; ldap_kerberos_bind1 @80
|
||||
; ldap_kerberos_bind2 @81
|
||||
; ldap_kerberos_bind_s @82
|
||||
; ldap_kerberos_bind1_s @83
|
||||
; ldap_kerberos_bind2_s @84
|
||||
|
||||
ldap_init @85
|
||||
ldap_is_dns_dn @86
|
||||
ldap_explode_dns @87
|
||||
ldap_mods_free @88
|
||||
|
||||
ldap_is_ldap_url @89
|
||||
ldap_free_urldesc @90
|
||||
ldap_url_parse @91
|
||||
ldap_url_search @92
|
||||
ldap_url_search_s @93
|
||||
ldap_url_search_st @94
|
||||
ldap_set_rebind_proc @95
|
||||
|
||||
ber_skip_tag @100
|
||||
ber_peek_tag @101
|
||||
ber_get_int @102
|
||||
ber_get_stringb @103
|
||||
ber_get_stringa @104
|
||||
ber_get_stringal @105
|
||||
ber_get_bitstringa @106
|
||||
ber_get_null @107
|
||||
ber_get_boolean @108
|
||||
ber_first_element @109
|
||||
ber_next_element @110
|
||||
ber_scanf @111
|
||||
ber_bvfree @112
|
||||
ber_bvecfree @113
|
||||
ber_put_int @114
|
||||
ber_put_ostring @115
|
||||
ber_put_string @116
|
||||
ber_put_bitstring @117
|
||||
ber_put_null @118
|
||||
ber_put_boolean @119
|
||||
ber_start_seq @120
|
||||
ber_start_set @121
|
||||
ber_put_seq @122
|
||||
ber_put_set @123
|
||||
ber_printf @124
|
||||
ber_read @125
|
||||
ber_write @126
|
||||
ber_free @127
|
||||
ber_flush @128
|
||||
ber_alloc @129
|
||||
ber_dup @130
|
||||
ber_get_next @131
|
||||
ber_get_tag @132
|
||||
ber_put_enum @133
|
||||
der_alloc @134
|
||||
ber_alloc_t @135
|
||||
ber_bvdup @136
|
||||
ber_init @137
|
||||
ber_reset @138
|
||||
|
||||
ldap_memfree @200
|
||||
|
||||
ldap_init_searchprefs @300
|
||||
ldap_init_searchprefs_buf @301
|
||||
ldap_free_searchprefs @302
|
||||
ldap_first_searchobj @303
|
||||
ldap_next_searchobj @304
|
||||
ldap_build_filter @305
|
||||
|
||||
ldap_init_templates @400
|
||||
ldap_init_templates_buf @401
|
||||
ldap_free_templates @402
|
||||
ldap_first_disptmpl @403
|
||||
ldap_next_disptmpl @404
|
||||
ldap_oc2template @405
|
||||
ldap_tmplattrs @406
|
||||
ldap_first_tmplrow @407
|
||||
ldap_next_tmplrow @408
|
||||
ldap_first_tmplcol @409
|
||||
ldap_next_tmplcol @410
|
||||
ldap_entry2text_search @411
|
||||
ldap_entry2text @412
|
||||
ldap_vals2text @413
|
||||
ldap_entry2html @414
|
||||
ldap_entry2html_search @415
|
||||
ldap_vals2html @416
|
||||
File diff suppressed because it is too large
Load diff
Binary file not shown.
|
|
@ -1,165 +0,0 @@
|
|||
LIBRARY LIBLDAP
|
||||
DESCRIPTION 'Lightweight Directory Access Protocol Client API'
|
||||
EXETYPE WINDOWS
|
||||
CODE PRELOAD MOVEABLE DISCARDABLE
|
||||
DATA PRELOAD MOVEABLE SINGLE
|
||||
|
||||
HEAPSIZE 4096
|
||||
|
||||
EXPORTS
|
||||
_ldap_abandon @10
|
||||
_ldap_add @11
|
||||
_ldap_unbind @13
|
||||
_ldap_enable_cache @14
|
||||
_ldap_disable_cache @15
|
||||
_ldap_destroy_cache @16
|
||||
_ldap_flush_cache @17
|
||||
_ldap_uncache_entry @18
|
||||
_ldap_compare @19
|
||||
_ldap_delete @20
|
||||
_ldap_result2error @21
|
||||
_ldap_err2string @22
|
||||
_ldap_modify @23
|
||||
_ldap_modrdn @24
|
||||
_ldap_open @25
|
||||
_ldap_first_entry @26
|
||||
_ldap_next_entry @27
|
||||
_ldap_delete_result_entry @28
|
||||
_ldap_add_result_entry @29
|
||||
_ldap_get_dn @30
|
||||
_ldap_dn2ufn @31
|
||||
_ldap_first_attribute @32
|
||||
_ldap_next_attribute @33
|
||||
_ldap_get_values @34
|
||||
_ldap_get_values_len @35
|
||||
_ldap_count_entries @36
|
||||
_ldap_count_values @37
|
||||
_ldap_value_free @38
|
||||
_ldap_explode_dn @39
|
||||
_ldap_result @40
|
||||
_ldap_msgfree @41
|
||||
_ldap_msgdelete @42
|
||||
_ldap_search @43
|
||||
_ldap_add_s @44
|
||||
_ldap_bind_s @45
|
||||
_ldap_unbind_s @46
|
||||
_ldap_delete_s @47
|
||||
_ldap_modify_s @48
|
||||
_ldap_modrdn_s @49
|
||||
_ldap_search_s @50
|
||||
_ldap_search_st @51
|
||||
_ldap_compare_s @52
|
||||
_ldap_ufn_search_c @53
|
||||
_ldap_ufn_search_s @54
|
||||
_ldap_init_getfilter @55
|
||||
_ldap_getfilter_free @56
|
||||
_ldap_getfirstfilter @57
|
||||
_ldap_getnextfilter @58
|
||||
_ldap_simple_bind @59
|
||||
_ldap_simple_bind_s @60
|
||||
_ldap_bind @61
|
||||
_ldap_friendly_name @62
|
||||
_ldap_free_friendlymap @63
|
||||
_ldap_ufn_search_ct @64
|
||||
_ldap_set_cache_options @65
|
||||
_ldap_uncache_request @66
|
||||
_ldap_modrdn2 @67
|
||||
_ldap_modrdn2_s @68
|
||||
_ldap_ufn_setfilter @69
|
||||
_ldap_ufn_setprefix @70
|
||||
_ldap_ufn_timeout @71
|
||||
_ldap_init_getfilter_buf @72
|
||||
_ldap_setfilteraffixes @73
|
||||
_ldap_sort_entries @74
|
||||
_ldap_sort_values @75
|
||||
_ldap_sort_strcasecmp @76
|
||||
_ldap_count_values_len @77
|
||||
_ldap_name2template @78
|
||||
_ldap_value_free_len @79
|
||||
|
||||
; manually comment and uncomment these five as necessary
|
||||
_ldap_kerberos_bind1 @80
|
||||
_ldap_kerberos_bind2 @81
|
||||
_ldap_kerberos_bind_s @82
|
||||
_ldap_kerberos_bind1_s @83
|
||||
_ldap_kerberos_bind2_s @84
|
||||
|
||||
_ldap_init @85
|
||||
_ldap_is_dns_dn @86
|
||||
_ldap_explode_dns @87
|
||||
_ldap_mods_free @88
|
||||
|
||||
_ldap_is_ldap_url @89
|
||||
_ldap_free_urldesc @90
|
||||
_ldap_url_parse @91
|
||||
_ldap_url_search @92
|
||||
_ldap_url_search_s @93
|
||||
_ldap_url_search_st @94
|
||||
_ldap_set_rebind_proc @95
|
||||
|
||||
_ber_skip_tag @100
|
||||
_ber_peek_tag @101
|
||||
_ber_get_int @102
|
||||
_ber_get_stringb @103
|
||||
_ber_get_stringa @104
|
||||
_ber_get_stringal @105
|
||||
_ber_get_bitstringa @106
|
||||
_ber_get_null @107
|
||||
_ber_get_boolean @108
|
||||
_ber_first_element @109
|
||||
_ber_next_element @110
|
||||
_ber_scanf @111
|
||||
_ber_bvfree @112
|
||||
_ber_bvecfree @113
|
||||
_ber_put_int @114
|
||||
_ber_put_ostring @115
|
||||
_ber_put_string @116
|
||||
_ber_put_bitstring @117
|
||||
_ber_put_null @118
|
||||
_ber_put_boolean @119
|
||||
_ber_start_seq @120
|
||||
_ber_start_set @121
|
||||
_ber_put_seq @122
|
||||
_ber_put_set @123
|
||||
_ber_printf @124
|
||||
_ber_read @125
|
||||
_ber_write @126
|
||||
_ber_free @127
|
||||
_ber_flush @128
|
||||
_ber_alloc @129
|
||||
_ber_dup @130
|
||||
_ber_get_next @131
|
||||
_ber_get_tag @132
|
||||
_ber_put_enum @133
|
||||
_der_alloc @134
|
||||
_ber_alloc_t @135
|
||||
_ber_bvdup @136
|
||||
_ber_init @137
|
||||
_ber_reset @138
|
||||
|
||||
_ldap_memfree @200
|
||||
|
||||
_ldap_init_searchprefs @300
|
||||
_ldap_init_searchprefs_buf @301
|
||||
_ldap_free_searchprefs @302
|
||||
_ldap_first_searchobj @303
|
||||
_ldap_next_searchobj @304
|
||||
_ldap_build_filter @305
|
||||
|
||||
_ldap_init_templates @400
|
||||
_ldap_init_templates_buf @401
|
||||
_ldap_free_templates @402
|
||||
_ldap_first_disptmpl @403
|
||||
_ldap_next_disptmpl @404
|
||||
_ldap_oc2template @405
|
||||
_ldap_tmplattrs @406
|
||||
_ldap_first_tmplrow @407
|
||||
_ldap_next_tmplrow @408
|
||||
_ldap_first_tmplcol @409
|
||||
_ldap_next_tmplcol @410
|
||||
_ldap_entry2text_search @411
|
||||
_ldap_entry2text @412
|
||||
_ldap_vals2text @413
|
||||
_ldap_entry2html @414
|
||||
_ldap_entry2html_search @415
|
||||
_ldap_vals2html @416
|
||||
|
|
@ -1,667 +0,0 @@
|
|||
# Microsoft Visual C++ generated build script - Do not modify
|
||||
|
||||
PROJ = LIBLDAP
|
||||
DEBUG = 0
|
||||
PROGTYPE = 1
|
||||
CALLER =
|
||||
ARGS =
|
||||
DLLS =
|
||||
D_RCDEFINES = /d_DEBUG
|
||||
R_RCDEFINES = /dNDEBUG
|
||||
ORIGIN = MSVC
|
||||
ORIGIN_VER = 1.00
|
||||
PROJPATH = C:\SRC\LDAP\LIBRAR~1\LIBLDAP\
|
||||
USEMFC = 0
|
||||
CC = cl
|
||||
CPP = cl
|
||||
CXX = cl
|
||||
CCREATEPCHFLAG =
|
||||
CPPCREATEPCHFLAG =
|
||||
CUSEPCHFLAG =
|
||||
CPPUSEPCHFLAG =
|
||||
FIRSTC = ABANDON.C
|
||||
FIRSTCPP =
|
||||
RC = rc
|
||||
CFLAGS_D_WDLL = /nologo /G2 /W3 /Gf /Zi /ALu /Od /D "_DEBUG" /D "WINSOCK" /D "DOS" /D "NEEDPROTOS" /D "NO_USERINTERFACE" /D "KERBEROS" /FR /Fd"LIBLDAP.PDB"
|
||||
CFLAGS_R_WDLL = /nologo /f- /G3 /W3 /Gf /ALu /Od /D "NDEBUG" /D "WINSOCK" /D "DOS" /D "NEEDPROTOS" /D "NO_USERINTERFACE" /D "KERBEROS"
|
||||
LFLAGS_D_WDLL = /NOLOGO /NOD /NOE /PACKC:61440 /ALIGN:16 /ONERROR:NOEXE /CO /MAP:FULL
|
||||
LFLAGS_R_WDLL = /NOLOGO /NOD /NOE /PACKC:61440 /ALIGN:16 /ONERROR:NOEXE /MAP:FULL
|
||||
LIBS_D_WDLL = oldnames libw ldllcew krbv4win commdlg.lib olecli.lib olesvr.lib shell.lib
|
||||
LIBS_R_WDLL = oldnames libw ldllcew krbv4win commdlg.lib olecli.lib olesvr.lib shell.lib
|
||||
RCFLAGS = /nologo
|
||||
RESFLAGS = /nologo
|
||||
RUNFLAGS =
|
||||
DEFFILE = LIBLDAP.DEF
|
||||
OBJS_EXT =
|
||||
LIBS_EXT = WINSOCK.LIB
|
||||
!if "$(DEBUG)" == "1"
|
||||
CFLAGS = $(CFLAGS_D_WDLL)
|
||||
LFLAGS = $(LFLAGS_D_WDLL)
|
||||
LIBS = $(LIBS_D_WDLL)
|
||||
MAPFILE = nul
|
||||
RCDEFINES = $(D_RCDEFINES)
|
||||
!else
|
||||
CFLAGS = $(CFLAGS_R_WDLL)
|
||||
LFLAGS = $(LFLAGS_R_WDLL)
|
||||
LIBS = $(LIBS_R_WDLL)
|
||||
MAPFILE = nul
|
||||
RCDEFINES = $(R_RCDEFINES)
|
||||
!endif
|
||||
!if [if exist MSVC.BND del MSVC.BND]
|
||||
!endif
|
||||
SBRS = ABANDON.SBR \
|
||||
ADD.SBR \
|
||||
BIND.SBR \
|
||||
CACHE.SBR \
|
||||
COMPARE.SBR \
|
||||
DELETE.SBR \
|
||||
ERROR.SBR \
|
||||
GETFILTE.SBR \
|
||||
REGEX.SBR \
|
||||
MODIFY.SBR \
|
||||
MODRDN.SBR \
|
||||
GETDN.SBR \
|
||||
GETENTRY.SBR \
|
||||
GETATTR.SBR \
|
||||
GETVALUE.SBR \
|
||||
ADDENTRY.SBR \
|
||||
RESULT.SBR \
|
||||
SEARCH.SBR \
|
||||
UFN.SBR \
|
||||
DECODE.SBR \
|
||||
ENCODE.SBR \
|
||||
IO.SBR \
|
||||
MSDOS.SBR \
|
||||
SBIND.SBR \
|
||||
UNBIND.SBR \
|
||||
KBIND.SBR \
|
||||
FRIENDLY.SBR \
|
||||
DISPTMPL.SBR \
|
||||
DSPARSE.SBR \
|
||||
FREE.SBR \
|
||||
SORT.SBR \
|
||||
SRCHPREF.SBR \
|
||||
TMPLOUT.SBR \
|
||||
REQUEST.SBR \
|
||||
WSOCKIP.SBR \
|
||||
OPEN.SBR \
|
||||
CHARSET.SBR \
|
||||
URL.SBR
|
||||
|
||||
|
||||
WINSOCK_DEP =
|
||||
|
||||
ABANDON_DEP = c:\src\ldap\include\sys/socket.h \
|
||||
c:\src\ldap\include\msdos.h \
|
||||
c:\msvc\include\winsock.h \
|
||||
c:\src\ldap\include\lber.h \
|
||||
c:\src\ldap\include\proto-lb.h \
|
||||
c:\src\ldap\include\ldap.h \
|
||||
c:\src\ldap\include\proto-ld.h \
|
||||
c:\src\ldap\librar~1\libldap\ldap-int.h
|
||||
|
||||
|
||||
ADD_DEP = c:\src\ldap\include\msdos.h \
|
||||
c:\msvc\include\winsock.h \
|
||||
c:\src\ldap\include\sys/socket.h \
|
||||
c:\src\ldap\include\lber.h \
|
||||
c:\src\ldap\include\proto-lb.h \
|
||||
c:\src\ldap\include\ldap.h \
|
||||
c:\src\ldap\include\proto-ld.h \
|
||||
c:\src\ldap\librar~1\libldap\ldap-int.h
|
||||
|
||||
|
||||
BIND_DEP = c:\src\ldap\include\msdos.h \
|
||||
c:\msvc\include\winsock.h \
|
||||
c:\src\ldap\include\sys/socket.h \
|
||||
c:\src\ldap\include\lber.h \
|
||||
c:\src\ldap\include\proto-lb.h \
|
||||
c:\src\ldap\include\ldap.h \
|
||||
c:\src\ldap\include\proto-ld.h
|
||||
|
||||
|
||||
CACHE_DEP = c:\src\ldap\include\msdos.h \
|
||||
c:\msvc\include\winsock.h \
|
||||
c:\src\ldap\include\sys/socket.h \
|
||||
c:\src\ldap\include\lber.h \
|
||||
c:\src\ldap\include\proto-lb.h \
|
||||
c:\src\ldap\include\ldap.h \
|
||||
c:\src\ldap\include\proto-ld.h \
|
||||
c:\src\ldap\librar~1\libldap\ldap-int.h
|
||||
|
||||
|
||||
COMPARE_DEP = c:\src\ldap\include\sys/socket.h \
|
||||
c:\src\ldap\include\lber.h \
|
||||
c:\src\ldap\include\proto-lb.h \
|
||||
c:\src\ldap\include\ldap.h \
|
||||
c:\src\ldap\include\msdos.h \
|
||||
c:\msvc\include\winsock.h \
|
||||
c:\src\ldap\include\proto-ld.h \
|
||||
c:\src\ldap\librar~1\libldap\ldap-int.h
|
||||
|
||||
|
||||
DELETE_DEP = c:\src\ldap\include\msdos.h \
|
||||
c:\msvc\include\winsock.h \
|
||||
c:\src\ldap\include\sys/socket.h \
|
||||
c:\src\ldap\include\lber.h \
|
||||
c:\src\ldap\include\proto-lb.h \
|
||||
c:\src\ldap\include\ldap.h \
|
||||
c:\src\ldap\include\proto-ld.h \
|
||||
c:\src\ldap\librar~1\libldap\ldap-int.h
|
||||
|
||||
|
||||
ERROR_DEP = c:\src\ldap\include\msdos.h \
|
||||
c:\msvc\include\winsock.h \
|
||||
c:\src\ldap\include\sys/socket.h \
|
||||
c:\src\ldap\include\lber.h \
|
||||
c:\src\ldap\include\proto-lb.h \
|
||||
c:\src\ldap\include\ldap.h \
|
||||
c:\src\ldap\include\proto-ld.h
|
||||
|
||||
|
||||
GETFILTE_DEP = c:\src\ldap\include\regex.h \
|
||||
c:\src\ldap\include\msdos.h \
|
||||
c:\msvc\include\winsock.h \
|
||||
c:\src\ldap\include\sys/file.h \
|
||||
c:\src\ldap\include\lber.h \
|
||||
c:\src\ldap\include\proto-lb.h \
|
||||
c:\src\ldap\include\ldap.h \
|
||||
c:\src\ldap\include\proto-ld.h
|
||||
|
||||
|
||||
REGEX_DEP = c:\src\ldap\include\portable.h \
|
||||
c:\src\ldap\include\regex.h
|
||||
|
||||
|
||||
MODIFY_DEP = c:\src\ldap\include\sys/socket.h \
|
||||
c:\src\ldap\include\lber.h \
|
||||
c:\src\ldap\include\proto-lb.h \
|
||||
c:\src\ldap\include\ldap.h \
|
||||
c:\src\ldap\include\msdos.h \
|
||||
c:\msvc\include\winsock.h \
|
||||
c:\src\ldap\include\proto-ld.h \
|
||||
c:\src\ldap\librar~1\libldap\ldap-int.h
|
||||
|
||||
|
||||
MODRDN_DEP = c:\src\ldap\include\sys/socket.h \
|
||||
c:\src\ldap\include\lber.h \
|
||||
c:\src\ldap\include\proto-lb.h \
|
||||
c:\src\ldap\include\ldap.h \
|
||||
c:\src\ldap\include\msdos.h \
|
||||
c:\msvc\include\winsock.h \
|
||||
c:\src\ldap\include\proto-ld.h \
|
||||
c:\src\ldap\librar~1\libldap\ldap-int.h
|
||||
|
||||
|
||||
GETDN_DEP = c:\src\ldap\include\msdos.h \
|
||||
c:\msvc\include\winsock.h \
|
||||
c:\src\ldap\include\sys/socket.h \
|
||||
c:\src\ldap\include\lber.h \
|
||||
c:\src\ldap\include\proto-lb.h \
|
||||
c:\src\ldap\include\ldap.h \
|
||||
c:\src\ldap\include\proto-ld.h
|
||||
|
||||
|
||||
GETENTRY_DEP = c:\src\ldap\include\msdos.h \
|
||||
c:\msvc\include\winsock.h \
|
||||
c:\src\ldap\include\sys/socket.h \
|
||||
c:\src\ldap\include\lber.h \
|
||||
c:\src\ldap\include\proto-lb.h \
|
||||
c:\src\ldap\include\ldap.h \
|
||||
c:\src\ldap\include\proto-ld.h
|
||||
|
||||
|
||||
GETATTR_DEP = c:\src\ldap\include\msdos.h \
|
||||
c:\msvc\include\winsock.h \
|
||||
c:\src\ldap\include\sys/socket.h \
|
||||
c:\src\ldap\include\lber.h \
|
||||
c:\src\ldap\include\proto-lb.h \
|
||||
c:\src\ldap\include\ldap.h \
|
||||
c:\src\ldap\include\proto-ld.h \
|
||||
c:\src\ldap\librar~1\libldap\ldap-int.h
|
||||
|
||||
|
||||
GETVALUE_DEP = c:\src\ldap\include\msdos.h \
|
||||
c:\msvc\include\winsock.h \
|
||||
c:\src\ldap\include\sys/socket.h \
|
||||
c:\src\ldap\include\lber.h \
|
||||
c:\src\ldap\include\proto-lb.h \
|
||||
c:\src\ldap\include\ldap.h \
|
||||
c:\src\ldap\include\proto-ld.h
|
||||
|
||||
|
||||
ADDENTRY_DEP = c:\src\ldap\include\msdos.h \
|
||||
c:\msvc\include\winsock.h \
|
||||
c:\src\ldap\include\sys/socket.h \
|
||||
c:\src\ldap\include\lber.h \
|
||||
c:\src\ldap\include\proto-lb.h \
|
||||
c:\src\ldap\include\ldap.h \
|
||||
c:\src\ldap\include\proto-ld.h
|
||||
|
||||
|
||||
RESULT_DEP = c:\src\ldap\include\msdos.h \
|
||||
c:\msvc\include\winsock.h \
|
||||
c:\src\ldap\include\sys/socket.h \
|
||||
c:\src\ldap\include\sys/select.h \
|
||||
c:\src\ldap\include\portable.h \
|
||||
c:\src\ldap\include\lber.h \
|
||||
c:\src\ldap\include\proto-lb.h \
|
||||
c:\src\ldap\include\ldap.h \
|
||||
c:\src\ldap\include\proto-ld.h \
|
||||
c:\src\ldap\librar~1\libldap\ldap-int.h
|
||||
|
||||
|
||||
SEARCH_DEP = c:\src\ldap\include\msdos.h \
|
||||
c:\msvc\include\winsock.h \
|
||||
c:\src\ldap\include\sys/socket.h \
|
||||
c:\src\ldap\include\lber.h \
|
||||
c:\src\ldap\include\proto-lb.h \
|
||||
c:\src\ldap\include\ldap.h \
|
||||
c:\src\ldap\include\proto-ld.h \
|
||||
c:\src\ldap\librar~1\libldap\ldap-int.h
|
||||
|
||||
|
||||
UFN_DEP = c:\src\ldap\include\msdos.h \
|
||||
c:\msvc\include\winsock.h \
|
||||
c:\src\ldap\include\sys/socket.h \
|
||||
c:\src\ldap\include\lber.h \
|
||||
c:\src\ldap\include\proto-lb.h \
|
||||
c:\src\ldap\include\ldap.h \
|
||||
c:\src\ldap\include\proto-ld.h
|
||||
|
||||
|
||||
DECODE_DEP = c:\src\ldap\include\sys/socket.h \
|
||||
c:\src\ldap\include\netinet/in.h \
|
||||
c:\src\ldap\include\msdos.h \
|
||||
c:\msvc\include\winsock.h \
|
||||
c:\src\ldap\include\lber.h \
|
||||
c:\src\ldap\include\proto-lb.h
|
||||
|
||||
|
||||
ENCODE_DEP = c:\src\ldap\include\sys/socket.h \
|
||||
c:\src\ldap\include\netinet/in.h \
|
||||
c:\src\ldap\include\lber.h \
|
||||
c:\src\ldap\include\proto-lb.h \
|
||||
c:\src\ldap\include\msdos.h \
|
||||
c:\msvc\include\winsock.h
|
||||
|
||||
|
||||
IO_DEP = c:\src\ldap\include\msdos.h \
|
||||
c:\msvc\include\winsock.h \
|
||||
c:\src\ldap\include\sys/socket.h \
|
||||
c:\src\ldap\include\netinet/in.h \
|
||||
c:\src\ldap\include\lber.h \
|
||||
c:\src\ldap\include\proto-lb.h
|
||||
|
||||
|
||||
MSDOS_DEP = c:\src\ldap\include\lber.h \
|
||||
c:\src\ldap\include\proto-lb.h \
|
||||
c:\src\ldap\include\ldap.h \
|
||||
c:\src\ldap\include\msdos.h \
|
||||
c:\msvc\include\winsock.h \
|
||||
c:\src\ldap\include\proto-ld.h
|
||||
|
||||
|
||||
SBIND_DEP = c:\src\ldap\include\sys/socket.h \
|
||||
c:\src\ldap\include\lber.h \
|
||||
c:\src\ldap\include\proto-lb.h \
|
||||
c:\src\ldap\include\ldap.h \
|
||||
c:\src\ldap\include\msdos.h \
|
||||
c:\msvc\include\winsock.h \
|
||||
c:\src\ldap\include\proto-ld.h \
|
||||
c:\src\ldap\librar~1\libldap\ldap-int.h
|
||||
|
||||
|
||||
UNBIND_DEP = c:\src\ldap\include\msdos.h \
|
||||
c:\msvc\include\winsock.h \
|
||||
c:\src\ldap\include\sys/socket.h \
|
||||
c:\src\ldap\include\lber.h \
|
||||
c:\src\ldap\include\proto-lb.h \
|
||||
c:\src\ldap\include\ldap.h \
|
||||
c:\src\ldap\include\proto-ld.h \
|
||||
c:\src\ldap\librar~1\libldap\ldap-int.h
|
||||
|
||||
|
||||
KBIND_DEP = c:\src\ldap\include\msdos.h \
|
||||
c:\msvc\include\winsock.h \
|
||||
c:\src\ldap\include\krb.h \
|
||||
c:\src\ldap\include\mit_copy.h \
|
||||
c:\src\ldap\include\conf.h \
|
||||
c:\src\ldap\include\osconf.h \
|
||||
c:\src\ldap\include\conf-pc.h \
|
||||
c:\src\ldap\include\des.h \
|
||||
c:\src\ldap\include\lsh_pwd.h \
|
||||
c:\src\ldap\include\sys/socket.h \
|
||||
c:\src\ldap\include\lber.h \
|
||||
c:\src\ldap\include\proto-lb.h \
|
||||
c:\src\ldap\include\ldap.h \
|
||||
c:\src\ldap\include\proto-ld.h \
|
||||
c:\src\ldap\librar~1\libldap\ldap-int.h
|
||||
|
||||
|
||||
FRIENDLY_DEP = c:\src\ldap\include\msdos.h \
|
||||
c:\msvc\include\winsock.h \
|
||||
c:\src\ldap\include\sys/socket.h \
|
||||
c:\src\ldap\include\lber.h \
|
||||
c:\src\ldap\include\proto-lb.h \
|
||||
c:\src\ldap\include\ldap.h \
|
||||
c:\src\ldap\include\proto-ld.h
|
||||
|
||||
|
||||
DISPTMPL_DEP = c:\src\ldap\include\msdos.h \
|
||||
c:\msvc\include\winsock.h \
|
||||
c:\src\ldap\include\sys/file.h \
|
||||
c:\src\ldap\include\lber.h \
|
||||
c:\src\ldap\include\proto-lb.h \
|
||||
c:\src\ldap\include\ldap.h \
|
||||
c:\src\ldap\include\proto-ld.h \
|
||||
c:\src\ldap\include\disptmpl.h
|
||||
|
||||
|
||||
DSPARSE_DEP = c:\src\ldap\include\msdos.h \
|
||||
c:\msvc\include\winsock.h \
|
||||
c:\src\ldap\include\sys/file.h \
|
||||
c:\src\ldap\include\lber.h \
|
||||
c:\src\ldap\include\proto-lb.h \
|
||||
c:\src\ldap\include\ldap.h \
|
||||
c:\src\ldap\include\proto-ld.h
|
||||
|
||||
|
||||
FREE_DEP = c:\src\ldap\include\msdos.h \
|
||||
c:\msvc\include\winsock.h \
|
||||
c:\src\ldap\include\lber.h \
|
||||
c:\src\ldap\include\proto-lb.h \
|
||||
c:\src\ldap\include\ldap.h \
|
||||
c:\src\ldap\include\proto-ld.h
|
||||
|
||||
|
||||
SORT_DEP = c:\src\ldap\include\msdos.h \
|
||||
c:\msvc\include\winsock.h \
|
||||
c:\src\ldap\include\lber.h \
|
||||
c:\src\ldap\include\proto-lb.h \
|
||||
c:\src\ldap\include\ldap.h \
|
||||
c:\src\ldap\include\proto-ld.h
|
||||
|
||||
|
||||
SRCHPREF_DEP = c:\src\ldap\include\msdos.h \
|
||||
c:\msvc\include\winsock.h \
|
||||
c:\src\ldap\include\sys/file.h \
|
||||
c:\src\ldap\include\lber.h \
|
||||
c:\src\ldap\include\proto-lb.h \
|
||||
c:\src\ldap\include\ldap.h \
|
||||
c:\src\ldap\include\proto-ld.h \
|
||||
c:\src\ldap\include\srchpref.h
|
||||
|
||||
|
||||
TMPLOUT_DEP = c:\src\ldap\include\msdos.h \
|
||||
c:\msvc\include\winsock.h \
|
||||
c:\src\ldap\include\sys/file.h \
|
||||
c:\src\ldap\include\sys/socket.h \
|
||||
c:\src\ldap\include\lber.h \
|
||||
c:\src\ldap\include\proto-lb.h \
|
||||
c:\src\ldap\include\ldap.h \
|
||||
c:\src\ldap\include\proto-ld.h \
|
||||
c:\src\ldap\include\disptmpl.h
|
||||
|
||||
|
||||
LIBLDAP_RCDEP =
|
||||
|
||||
REQUEST_DEP = c:\src\ldap\include\msdos.h \
|
||||
c:\msvc\include\winsock.h \
|
||||
c:\src\ldap\include\sys/socket.h \
|
||||
c:\src\ldap\include\sys/select.h \
|
||||
c:\src\ldap\include\portable.h \
|
||||
c:\src\ldap\include\lber.h \
|
||||
c:\src\ldap\include\proto-lb.h \
|
||||
c:\src\ldap\include\ldap.h \
|
||||
c:\src\ldap\include\proto-ld.h \
|
||||
c:\src\ldap\librar~1\libldap\ldap-int.h
|
||||
|
||||
|
||||
WSOCKIP_DEP = c:\src\ldap\include\msdos.h \
|
||||
c:\msvc\include\winsock.h \
|
||||
c:\src\ldap\include\wshelper.h \
|
||||
c:\src\ldap\include\resolv.h \
|
||||
c:\src\ldap\include\arpa/nameser.h \
|
||||
c:\src\ldap\include\hesiod.h \
|
||||
c:\src\ldap\include\sys/socket.h \
|
||||
c:\src\ldap\include\netinet/in.h \
|
||||
c:\src\ldap\include\netdb.h \
|
||||
c:\src\ldap\include\sys\socket.h \
|
||||
c:\src\ldap\include\sys/select.h \
|
||||
c:\src\ldap\include\portable.h \
|
||||
c:\src\ldap\include\lber.h \
|
||||
c:\src\ldap\include\proto-lb.h \
|
||||
c:\src\ldap\include\ldap.h \
|
||||
c:\src\ldap\include\proto-ld.h \
|
||||
c:\src\ldap\include\_sys/filio.h \
|
||||
c:\src\ldap\include\sys/filio.h \
|
||||
c:\src\ldap\include\_sys/ioctl.h \
|
||||
c:\src\ldap\include\sys/ioctl.h
|
||||
|
||||
|
||||
OPEN_DEP = c:\src\ldap\include\msdos.h \
|
||||
c:\msvc\include\winsock.h \
|
||||
c:\src\ldap\include\sys/socket.h \
|
||||
c:\src\ldap\include\sys/param.h \
|
||||
c:\src\ldap\include\netinet/in.h \
|
||||
c:\src\ldap\include\lber.h \
|
||||
c:\src\ldap\include\proto-lb.h \
|
||||
c:\src\ldap\include\ldap.h \
|
||||
c:\src\ldap\include\proto-ld.h \
|
||||
c:\src\ldap\librar~1\libldap\ldap-int.h
|
||||
|
||||
|
||||
CHARSET_DEP = c:\src\ldap\include\msdos.h \
|
||||
c:\msvc\include\winsock.h \
|
||||
c:\src\ldap\include\sys/socket.h \
|
||||
c:\src\ldap\include\sys/param.h \
|
||||
c:\src\ldap\include\lber.h \
|
||||
c:\src\ldap\include\proto-lb.h \
|
||||
c:\src\ldap\include\ldap.h \
|
||||
c:\src\ldap\include\proto-ld.h \
|
||||
c:\src\ldap\librar~1\libldap\ldap-int.h
|
||||
|
||||
|
||||
URL_DEP = c:\src\ldap\include\msdos.h \
|
||||
c:\msvc\include\winsock.h \
|
||||
c:\src\ldap\include\sys/socket.h \
|
||||
c:\src\ldap\include\lber.h \
|
||||
c:\src\ldap\include\proto-lb.h \
|
||||
c:\src\ldap\include\ldap.h \
|
||||
c:\src\ldap\include\proto-ld.h \
|
||||
c:\src\ldap\librar~1\libldap\ldap-int.h
|
||||
|
||||
|
||||
all: $(PROJ).DLL
|
||||
|
||||
ABANDON.OBJ: ABANDON.C $(ABANDON_DEP)
|
||||
$(CC) $(CFLAGS) $(CCREATEPCHFLAG) /c ABANDON.C
|
||||
|
||||
ADD.OBJ: ADD.C $(ADD_DEP)
|
||||
$(CC) $(CFLAGS) $(CUSEPCHFLAG) /c ADD.C
|
||||
|
||||
BIND.OBJ: BIND.C $(BIND_DEP)
|
||||
$(CC) $(CFLAGS) $(CUSEPCHFLAG) /c BIND.C
|
||||
|
||||
CACHE.OBJ: CACHE.C $(CACHE_DEP)
|
||||
$(CC) $(CFLAGS) $(CUSEPCHFLAG) /c CACHE.C
|
||||
|
||||
COMPARE.OBJ: COMPARE.C $(COMPARE_DEP)
|
||||
$(CC) $(CFLAGS) $(CUSEPCHFLAG) /c COMPARE.C
|
||||
|
||||
DELETE.OBJ: DELETE.C $(DELETE_DEP)
|
||||
$(CC) $(CFLAGS) $(CUSEPCHFLAG) /c DELETE.C
|
||||
|
||||
ERROR.OBJ: ERROR.C $(ERROR_DEP)
|
||||
$(CC) $(CFLAGS) $(CUSEPCHFLAG) /c ERROR.C
|
||||
|
||||
GETFILTE.OBJ: GETFILTE.C $(GETFILTE_DEP)
|
||||
$(CC) $(CFLAGS) $(CUSEPCHFLAG) /c GETFILTE.C
|
||||
|
||||
REGEX.OBJ: REGEX.C $(REGEX_DEP)
|
||||
$(CC) $(CFLAGS) $(CUSEPCHFLAG) /c REGEX.C
|
||||
|
||||
MODIFY.OBJ: MODIFY.C $(MODIFY_DEP)
|
||||
$(CC) $(CFLAGS) $(CUSEPCHFLAG) /c MODIFY.C
|
||||
|
||||
MODRDN.OBJ: MODRDN.C $(MODRDN_DEP)
|
||||
$(CC) $(CFLAGS) $(CUSEPCHFLAG) /c MODRDN.C
|
||||
|
||||
GETDN.OBJ: GETDN.C $(GETDN_DEP)
|
||||
$(CC) $(CFLAGS) $(CUSEPCHFLAG) /c GETDN.C
|
||||
|
||||
GETENTRY.OBJ: GETENTRY.C $(GETENTRY_DEP)
|
||||
$(CC) $(CFLAGS) $(CUSEPCHFLAG) /c GETENTRY.C
|
||||
|
||||
GETATTR.OBJ: GETATTR.C $(GETATTR_DEP)
|
||||
$(CC) $(CFLAGS) $(CUSEPCHFLAG) /c GETATTR.C
|
||||
|
||||
GETVALUE.OBJ: GETVALUE.C $(GETVALUE_DEP)
|
||||
$(CC) $(CFLAGS) $(CUSEPCHFLAG) /c GETVALUE.C
|
||||
|
||||
ADDENTRY.OBJ: ADDENTRY.C $(ADDENTRY_DEP)
|
||||
$(CC) $(CFLAGS) $(CUSEPCHFLAG) /c ADDENTRY.C
|
||||
|
||||
RESULT.OBJ: RESULT.C $(RESULT_DEP)
|
||||
$(CC) $(CFLAGS) $(CUSEPCHFLAG) /c RESULT.C
|
||||
|
||||
SEARCH.OBJ: SEARCH.C $(SEARCH_DEP)
|
||||
$(CC) $(CFLAGS) $(CUSEPCHFLAG) /c SEARCH.C
|
||||
|
||||
UFN.OBJ: UFN.C $(UFN_DEP)
|
||||
$(CC) $(CFLAGS) $(CUSEPCHFLAG) /c UFN.C
|
||||
|
||||
DECODE.OBJ: ..\LIBLBER\DECODE.C $(DECODE_DEP)
|
||||
$(CC) $(CFLAGS) $(CUSEPCHFLAG) /c ..\LIBLBER\DECODE.C
|
||||
|
||||
ENCODE.OBJ: ..\LIBLBER\ENCODE.C $(ENCODE_DEP)
|
||||
$(CC) $(CFLAGS) $(CUSEPCHFLAG) /c ..\LIBLBER\ENCODE.C
|
||||
|
||||
IO.OBJ: ..\LIBLBER\IO.C $(IO_DEP)
|
||||
$(CC) $(CFLAGS) $(CUSEPCHFLAG) /c ..\LIBLBER\IO.C
|
||||
|
||||
MSDOS.OBJ: MSDOS.C $(MSDOS_DEP)
|
||||
$(CC) $(CFLAGS) $(CUSEPCHFLAG) /c MSDOS.C
|
||||
|
||||
SBIND.OBJ: SBIND.C $(SBIND_DEP)
|
||||
$(CC) $(CFLAGS) $(CUSEPCHFLAG) /c SBIND.C
|
||||
|
||||
UNBIND.OBJ: UNBIND.C $(UNBIND_DEP)
|
||||
$(CC) $(CFLAGS) $(CUSEPCHFLAG) /c UNBIND.C
|
||||
|
||||
KBIND.OBJ: KBIND.C $(KBIND_DEP)
|
||||
$(CC) $(CFLAGS) $(CUSEPCHFLAG) /c KBIND.C
|
||||
|
||||
FRIENDLY.OBJ: FRIENDLY.C $(FRIENDLY_DEP)
|
||||
$(CC) $(CFLAGS) $(CUSEPCHFLAG) /c FRIENDLY.C
|
||||
|
||||
DISPTMPL.OBJ: DISPTMPL.C $(DISPTMPL_DEP)
|
||||
$(CC) $(CFLAGS) $(CUSEPCHFLAG) /c DISPTMPL.C
|
||||
|
||||
DSPARSE.OBJ: DSPARSE.C $(DSPARSE_DEP)
|
||||
$(CC) $(CFLAGS) $(CUSEPCHFLAG) /c DSPARSE.C
|
||||
|
||||
FREE.OBJ: FREE.C $(FREE_DEP)
|
||||
$(CC) $(CFLAGS) $(CUSEPCHFLAG) /c FREE.C
|
||||
|
||||
SORT.OBJ: SORT.C $(SORT_DEP)
|
||||
$(CC) $(CFLAGS) $(CUSEPCHFLAG) /c SORT.C
|
||||
|
||||
SRCHPREF.OBJ: SRCHPREF.C $(SRCHPREF_DEP)
|
||||
$(CC) $(CFLAGS) $(CUSEPCHFLAG) /c SRCHPREF.C
|
||||
|
||||
TMPLOUT.OBJ: TMPLOUT.C $(TMPLOUT_DEP)
|
||||
$(CC) $(CFLAGS) $(CUSEPCHFLAG) /c TMPLOUT.C
|
||||
|
||||
LIBLDAP.RES: LIBLDAP.RC $(LIBLDAP_RCDEP)
|
||||
$(RC) $(RCFLAGS) $(RCDEFINES) -r LIBLDAP.RC
|
||||
|
||||
REQUEST.OBJ: REQUEST.C $(REQUEST_DEP)
|
||||
$(CC) $(CFLAGS) $(CUSEPCHFLAG) /c REQUEST.C
|
||||
|
||||
WSOCKIP.OBJ: WSOCKIP.C $(WSOCKIP_DEP)
|
||||
$(CC) $(CFLAGS) $(CUSEPCHFLAG) /c WSOCKIP.C
|
||||
|
||||
OPEN.OBJ: OPEN.C $(OPEN_DEP)
|
||||
$(CC) $(CFLAGS) $(CUSEPCHFLAG) /c OPEN.C
|
||||
|
||||
CHARSET.OBJ: CHARSET.C $(CHARSET_DEP)
|
||||
$(CC) $(CFLAGS) $(CUSEPCHFLAG) /c CHARSET.C
|
||||
|
||||
URL.OBJ: URL.C $(URL_DEP)
|
||||
$(CC) $(CFLAGS) $(CUSEPCHFLAG) /c URL.C
|
||||
|
||||
|
||||
$(PROJ).DLL:: LIBLDAP.RES
|
||||
|
||||
$(PROJ).DLL:: ABANDON.OBJ ADD.OBJ BIND.OBJ CACHE.OBJ COMPARE.OBJ DELETE.OBJ ERROR.OBJ \
|
||||
GETFILTE.OBJ REGEX.OBJ MODIFY.OBJ MODRDN.OBJ GETDN.OBJ GETENTRY.OBJ GETATTR.OBJ GETVALUE.OBJ \
|
||||
ADDENTRY.OBJ RESULT.OBJ SEARCH.OBJ UFN.OBJ DECODE.OBJ ENCODE.OBJ IO.OBJ MSDOS.OBJ \
|
||||
SBIND.OBJ UNBIND.OBJ KBIND.OBJ FRIENDLY.OBJ DISPTMPL.OBJ DSPARSE.OBJ FREE.OBJ SORT.OBJ \
|
||||
SRCHPREF.OBJ TMPLOUT.OBJ REQUEST.OBJ WSOCKIP.OBJ OPEN.OBJ CHARSET.OBJ URL.OBJ $(OBJS_EXT) $(DEFFILE)
|
||||
echo >NUL @<<$(PROJ).CRF
|
||||
ABANDON.OBJ +
|
||||
ADD.OBJ +
|
||||
BIND.OBJ +
|
||||
CACHE.OBJ +
|
||||
COMPARE.OBJ +
|
||||
DELETE.OBJ +
|
||||
ERROR.OBJ +
|
||||
GETFILTE.OBJ +
|
||||
REGEX.OBJ +
|
||||
MODIFY.OBJ +
|
||||
MODRDN.OBJ +
|
||||
GETDN.OBJ +
|
||||
GETENTRY.OBJ +
|
||||
GETATTR.OBJ +
|
||||
GETVALUE.OBJ +
|
||||
ADDENTRY.OBJ +
|
||||
RESULT.OBJ +
|
||||
SEARCH.OBJ +
|
||||
UFN.OBJ +
|
||||
DECODE.OBJ +
|
||||
ENCODE.OBJ +
|
||||
IO.OBJ +
|
||||
MSDOS.OBJ +
|
||||
SBIND.OBJ +
|
||||
UNBIND.OBJ +
|
||||
KBIND.OBJ +
|
||||
FRIENDLY.OBJ +
|
||||
DISPTMPL.OBJ +
|
||||
DSPARSE.OBJ +
|
||||
FREE.OBJ +
|
||||
SORT.OBJ +
|
||||
SRCHPREF.OBJ +
|
||||
TMPLOUT.OBJ +
|
||||
REQUEST.OBJ +
|
||||
WSOCKIP.OBJ +
|
||||
OPEN.OBJ +
|
||||
CHARSET.OBJ +
|
||||
URL.OBJ +
|
||||
$(OBJS_EXT)
|
||||
$(PROJ).DLL
|
||||
$(MAPFILE)
|
||||
c:\msvc\lib\+
|
||||
c:\msvc\mfc\lib\+
|
||||
c:\src\lib\+
|
||||
WINSOCK.LIB+
|
||||
$(LIBS)
|
||||
$(DEFFILE);
|
||||
<<
|
||||
link $(LFLAGS) @$(PROJ).CRF
|
||||
$(RC) $(RESFLAGS) LIBLDAP.RES $@
|
||||
@copy $(PROJ).CRF MSVC.BND
|
||||
implib /nowep $(PROJ).LIB $(PROJ).DLL
|
||||
|
||||
$(PROJ).DLL:: LIBLDAP.RES
|
||||
if not exist MSVC.BND $(RC) $(RESFLAGS) LIBLDAP.RES $@
|
||||
|
||||
run: $(PROJ).DLL
|
||||
$(PROJ) $(RUNFLAGS)
|
||||
|
||||
|
||||
$(PROJ).BSC: $(SBRS)
|
||||
bscmake @<<
|
||||
/o$@ $(SBRS)
|
||||
<<
|
||||
|
|
@ -1,40 +0,0 @@
|
|||
#ifdef APSTUDIO_INVOKED
|
||||
#error: this file is not editable by App Studio; use an editor
|
||||
#endif //APSTUDIO_INVOKED
|
||||
|
||||
#include "ver.h"
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
FILEVERSION 3,3,0,0 // LIBLDAP version 3.3
|
||||
PRODUCTVERSION 3,3,0,0
|
||||
FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
|
||||
#ifdef _DEBUG
|
||||
FILEFLAGS (VS_FF_DEBUG|VS_FF_PRIVATEBUILD|VS_FF_PRERELEASE)
|
||||
#else
|
||||
FILEFLAGS VS_FF_PRERELEASE // beta version
|
||||
// FILEFLAGS 0 // final version
|
||||
#endif
|
||||
FILEOS VOS_DOS_WINDOWS16
|
||||
FILETYPE VFT_APP
|
||||
FILESUBTYPE 0
|
||||
BEGIN
|
||||
BLOCK "StringFileInfo"
|
||||
BEGIN
|
||||
BLOCK "040904E4" // lang=US English, Charset=Windows Multilingual
|
||||
BEGIN
|
||||
VALUE "CompanyName", "University of Michigan\0"
|
||||
VALUE "FileDescription", "Lightweight Directory Access Protocol Library\0"
|
||||
VALUE "FileVersion", "3.3b1\0"
|
||||
VALUE "InternalName", "LIBLDAP\0"
|
||||
VALUE "LegalCopyright", "Copyright (c) 1996 The Regents of The University of Michigan\0"
|
||||
VALUE "LegalTrademarks", "None\0"
|
||||
VALUE "OriginalFileName", "LIBLDAP.DLL\0"
|
||||
VALUE "ProductName", "LIBLDAP\0"
|
||||
VALUE "ProductVersion", "3.3b1\0"
|
||||
END
|
||||
END
|
||||
BLOCK "VarFileInfo"
|
||||
BEGIN
|
||||
VALUE "Translation", 0x409, 1252 // English + Windows ANSI codepage
|
||||
END
|
||||
END
|
||||
|
|
@ -1,680 +0,0 @@
|
|||
# Microsoft Visual C++ generated build script - Do not modify
|
||||
# Microsoft Visual C++ generated build script - Do not modify
|
||||
# but due to buffer length limitataions for both preprocessor defines
|
||||
# and include paths we went to using this file as an external makefile
|
||||
# April 1995 sgr@umich.edu
|
||||
|
||||
PROJ = LIBLDAP
|
||||
DEBUG = 0
|
||||
PROGTYPE = 1
|
||||
|
||||
WINSOCK = 1 # want winsock api, no vendor specific calls
|
||||
DOS = 1 # windows lives on top of DOS at present
|
||||
NEEDPROTOS = 1 # need strict typeing in fcn declarations
|
||||
KERBEROS = 1 # Kerberos or no, your choice
|
||||
|
||||
#include paths will vary per site, I've broken them up by function
|
||||
INC_MSVC = c:\msvc\include
|
||||
INC_LDAP = q:\src\ldap-3.2b1\include
|
||||
INC_KERBEROS = q:\src\krb\mit_env\kerberos\include;q:\src\krb\mit_env\kerberos
|
||||
INC_WSHELPER = c:\src\mit\wshelper
|
||||
INC_AUTHMAN = c:\src\authman\dll
|
||||
INC_MITENV = q:\src\krb\mit_env\localh
|
||||
|
||||
#order is important
|
||||
INCLUDE = $(INC_MSVC);$(INC_LDAP);$(INC_AUTHMAN);$(INC_MITENV);$(INC_KERBEROS);$(INC_WSHELPER)
|
||||
|
||||
LDAP_FLAGS = /D "TEMPLATEFILE" ="""ldtmpl.cfg"""\
|
||||
/D "FILTERFILE"="""ldfilter.cfg"""
|
||||
|
||||
!if "$(KERBEROS)" == "1"
|
||||
# WSHELPER
|
||||
# with kerberos, we need to use WSHELPER (Winsock Helper) to do
|
||||
# gethostbyaddr() calls for us because we can't count on the vendor's
|
||||
# (Novell) tcp/ip stack doing this right. The real name of the ldap
|
||||
# server is required to get service tickets.
|
||||
#
|
||||
LDAP_FLAGS = $(LDAP_FLAGS) /D "KERBEROS" /D "WSHELPER" /D "AUTHMAN"
|
||||
# SET INCLUDE=$(INCLUDE), $(INC_KERBEROS), $(INC_WSHELPER), $(INC_AUTHMAN), $(INC_MITENV)
|
||||
!endif
|
||||
# _WINDOWS
|
||||
# authman.h requires _WINDOWS (with a value!), which is set automatically by
|
||||
# particular options related to prolog/epilog code generation
|
||||
# which are true for AUTHMAN, but not libldap, so do this manually.
|
||||
#
|
||||
#
|
||||
# __MSDOS__
|
||||
# krb.h (well really osconf.h, via conf.h, via krb.h) doesn't recognize
|
||||
# microsoft's default "_MSDOS". It wants __MSDOS__, so provide it.
|
||||
#
|
||||
# WINDOWS
|
||||
# same crap, this time from conf-pc.h, this time with WINDOWS
|
||||
#
|
||||
# _WINDLL
|
||||
# Wshelper.h requires _WINDLL to be defined. Default configuration
|
||||
# of libldap doesn't use any prolog/epilog optimization, so _WINDLL
|
||||
# isn't defined by default.
|
||||
#
|
||||
!if "$(WINSOCK)"=="1"
|
||||
LDAP_FLAGS = $(LDAP_FLAGS)\
|
||||
/D "WINSOCK"\
|
||||
/D "_WINDOWS"\
|
||||
/D "__MSDOS__"\
|
||||
/D "WINDOWS"\
|
||||
/D "_WINDLL"\
|
||||
/D "NO_USERINTERFACE"
|
||||
!endif
|
||||
!if "$(DOS)"=="1"
|
||||
LDAP_FLAGS = $(LDAP_FLAGS) /D "DOS"
|
||||
!endif
|
||||
!if "$(NEEDPROTOS)"=="1"
|
||||
LDAP_FLAGS = $(LDAP_FLAGS) /D "NEEDPROTOS"
|
||||
!endif
|
||||
|
||||
CALLER =
|
||||
ARGS =
|
||||
DLLS =
|
||||
D_RCDEFINES = /d_DEBUG
|
||||
R_RCDEFINES = /dNDEBUG
|
||||
ORIGIN = MSVC
|
||||
ORIGIN_VER = 1.00
|
||||
PROJPATH = Q:\SRC\LDAP-3.2B1\LIB\LIBLDAP\
|
||||
USEMFC = 0
|
||||
CC = cl
|
||||
CPP = cl
|
||||
CXX = cl
|
||||
CCREATEPCHFLAG =
|
||||
CPPCREATEPCHFLAG =
|
||||
CUSEPCHFLAG =
|
||||
CPPUSEPCHFLAG =
|
||||
FIRSTC = ABANDON.C
|
||||
FIRSTCPP =
|
||||
RC = rc
|
||||
CFLAGS_D_WDLL = /nologo /G2 /W3 /Gf /Zi /ALu /Od /D "_DEBUG" /FR /Fd"LIBLDAP.PDB"
|
||||
CFLAGS_R_WDLL = /nologo /f- /G3 /W3 /Gf /ALu /Od /D "NDEBUG" /FR
|
||||
LFLAGS_D_WDLL = /NOLOGO /NOD /NOE /PACKC:61440 /ALIGN:16 /ONERROR:NOEXE /CO /MAP:FULL
|
||||
LFLAGS_R_WDLL = /NOLOGO /NOD /NOE /PACKC:61440 /ALIGN:16 /ONERROR:NOEXE /MAP:FULL
|
||||
LIBS_D_WDLL = oldnames libw ldllcew authlib krbv4win wshelper commdlg.lib olecli.lib olesvr.lib shell.lib
|
||||
LIBS_R_WDLL = oldnames libw ldllcew authlib krbv4win wshelper commdlg.lib olecli.lib olesvr.lib shell.lib
|
||||
RCFLAGS = /nologo
|
||||
RESFLAGS = /nologo
|
||||
RUNFLAGS =
|
||||
DEFFILE = LIBLDAP.DEF
|
||||
OBJS_EXT =
|
||||
LIBS_EXT = WINSOCK.LIB
|
||||
!if "$(DEBUG)" == "1"
|
||||
CFLAGS = $(CFLAGS_D_WDLL) $(LDAP_FLAGS)
|
||||
LFLAGS = $(LFLAGS_D_WDLL)
|
||||
LIBS = $(LIBS_D_WDLL)
|
||||
MAPFILE = nul
|
||||
RCDEFINES = $(D_RCDEFINES)
|
||||
!else
|
||||
CFLAGS = $(CFLAGS_R_WDLL) $(LDAP_FLAGS)
|
||||
LFLAGS = $(LFLAGS_R_WDLL)
|
||||
LIBS = $(LIBS_R_WDLL)
|
||||
MAPFILE = nul
|
||||
RCDEFINES = $(R_RCDEFINES)
|
||||
!endif
|
||||
!if [if exist MSVC.BND del MSVC.BND]
|
||||
!endif
|
||||
SBRS = ABANDON.SBR \
|
||||
ADD.SBR \
|
||||
BIND.SBR \
|
||||
CACHE.SBR \
|
||||
COMPARE.SBR \
|
||||
DELETE.SBR \
|
||||
ERROR.SBR \
|
||||
GETFILTE.SBR \
|
||||
REGEX.SBR \
|
||||
MODIFY.SBR \
|
||||
MODRDN.SBR \
|
||||
GETDN.SBR \
|
||||
GETENTRY.SBR \
|
||||
GETATTR.SBR \
|
||||
ADDENTRY.SBR \
|
||||
RESULT.SBR \
|
||||
SEARCH.SBR \
|
||||
UFN.SBR \
|
||||
OPENWSA.SBR \
|
||||
DECODE.SBR \
|
||||
ENCODE.SBR \
|
||||
IO.SBR \
|
||||
MSDOS.SBR \
|
||||
SBIND.SBR \
|
||||
UNBIND.SBR \
|
||||
KBIND.SBR \
|
||||
FRIENDLY.SBR \
|
||||
DISPTMPL.SBR \
|
||||
DSPARSE.SBR \
|
||||
FREE.SBR \
|
||||
SORT.SBR \
|
||||
SRCHPREF.SBR \
|
||||
TMPLOUT.SBR \
|
||||
KERBEROS.SBR \
|
||||
GETVALUE.SBR
|
||||
|
||||
|
||||
WINSOCK_DEP =
|
||||
|
||||
ABANDON_DEP = $(INC_LDAP)\sys\socket.h \
|
||||
$(INC_LDAP)\msdos.h \
|
||||
$(INC_LDAP)\winsock.h \
|
||||
$(INC_LDAP)\lber.h \
|
||||
$(INC_LDAP)\proto-lb.h \
|
||||
$(INC_LDAP)\ldap.h \
|
||||
$(INC_LDAP)\proto-ld.h
|
||||
|
||||
|
||||
ADD_DEP = $(INC_LDAP)\msdos.h \
|
||||
$(INC_LDAP)\winsock.h \
|
||||
$(INC_LDAP)\sys/socket.h \
|
||||
$(INC_LDAP)\lber.h \
|
||||
$(INC_LDAP)\proto-lb.h \
|
||||
$(INC_LDAP)\ldap.h \
|
||||
$(INC_LDAP)\proto-ld.h
|
||||
|
||||
|
||||
BIND_DEP = $(INC_LDAP)\msdos.h \
|
||||
$(INC_LDAP)\winsock.h \
|
||||
$(INC_LDAP)\sys/socket.h \
|
||||
$(INC_LDAP)\lber.h \
|
||||
$(INC_LDAP)\proto-lb.h \
|
||||
$(INC_LDAP)\ldap.h \
|
||||
$(INC_LDAP)\proto-ld.h
|
||||
|
||||
|
||||
CACHE_DEP = $(INC_LDAP)\msdos.h \
|
||||
$(INC_LDAP)\winsock.h \
|
||||
$(INC_LDAP)\sys/socket.h \
|
||||
$(INC_LDAP)\lber.h \
|
||||
$(INC_LDAP)\proto-lb.h \
|
||||
$(INC_LDAP)\ldap.h \
|
||||
$(INC_LDAP)\proto-ld.h
|
||||
|
||||
|
||||
COMPARE_DEP = $(INC_LDAP)\sys/socket.h \
|
||||
$(INC_LDAP)\lber.h \
|
||||
$(INC_LDAP)\proto-lb.h \
|
||||
$(INC_LDAP)\ldap.h \
|
||||
$(INC_LDAP)\winsock.h \
|
||||
$(INC_LDAP)\proto-ld.h
|
||||
|
||||
|
||||
DELETE_DEP = $(INC_LDAP)\msdos.h \
|
||||
$(INC_LDAP)\winsock.h \
|
||||
$(INC_LDAP)\sys/socket.h \
|
||||
$(INC_LDAP)\lber.h \
|
||||
$(INC_LDAP)\proto-lb.h \
|
||||
$(INC_LDAP)\ldap.h \
|
||||
$(INC_LDAP)\proto-ld.h
|
||||
|
||||
|
||||
ERROR_DEP = $(INC_LDAP)\msdos.h \
|
||||
$(INC_LDAP)\winsock.h \
|
||||
$(INC_LDAP)\sys/socket.h \
|
||||
$(INC_LDAP)\lber.h \
|
||||
$(INC_LDAP)\proto-lb.h \
|
||||
$(INC_LDAP)\ldap.h \
|
||||
$(INC_LDAP)\proto-ld.h
|
||||
|
||||
|
||||
GETFILTE_DEP = $(INC_LDAP)\regex.h \
|
||||
$(INC_LDAP)\msdos.h \
|
||||
$(INC_LDAP)\winsock.h \
|
||||
$(INC_LDAP)\sys/file.h \
|
||||
$(INC_LDAP)\lber.h \
|
||||
$(INC_LDAP)\proto-lb.h \
|
||||
$(INC_LDAP)\ldap.h \
|
||||
$(INC_LDAP)\proto-ld.h
|
||||
|
||||
|
||||
REGEX_DEP = $(INC_LDAP)\portable.h \
|
||||
$(INC_LDAP)\regex.h
|
||||
|
||||
|
||||
MODIFY_DEP = $(INC_LDAP)\sys/socket.h \
|
||||
$(INC_LDAP)\lber.h \
|
||||
$(INC_LDAP)\proto-lb.h \
|
||||
$(INC_LDAP)\ldap.h \
|
||||
$(INC_LDAP)\winsock.h \
|
||||
$(INC_LDAP)\proto-ld.h
|
||||
|
||||
|
||||
MODRDN_DEP = $(INC_LDAP)\sys/socket.h \
|
||||
$(INC_LDAP)\lber.h \
|
||||
$(INC_LDAP)\proto-lb.h \
|
||||
$(INC_LDAP)\ldap.h \
|
||||
$(INC_LDAP)\winsock.h \
|
||||
$(INC_LDAP)\proto-ld.h
|
||||
|
||||
|
||||
GETDN_DEP = $(INC_LDAP)\msdos.h \
|
||||
$(INC_LDAP)\winsock.h \
|
||||
$(INC_LDAP)\sys/socket.h \
|
||||
$(INC_LDAP)\lber.h \
|
||||
$(INC_LDAP)\proto-lb.h \
|
||||
$(INC_LDAP)\ldap.h \
|
||||
$(INC_LDAP)\proto-ld.h
|
||||
|
||||
|
||||
GETENTRY_DEP = $(INC_LDAP)\msdos.h \
|
||||
$(INC_LDAP)\winsock.h \
|
||||
$(INC_LDAP)\sys/socket.h \
|
||||
$(INC_LDAP)\lber.h \
|
||||
$(INC_LDAP)\proto-lb.h \
|
||||
$(INC_LDAP)\ldap.h \
|
||||
$(INC_LDAP)\proto-ld.h
|
||||
|
||||
|
||||
GETATTR_DEP = $(INC_LDAP)\msdos.h \
|
||||
$(INC_LDAP)\winsock.h \
|
||||
$(INC_LDAP)\sys/socket.h \
|
||||
$(INC_LDAP)\lber.h \
|
||||
$(INC_LDAP)\proto-lb.h \
|
||||
$(INC_LDAP)\ldap.h \
|
||||
$(INC_LDAP)\proto-ld.h
|
||||
|
||||
|
||||
ADDENTRY_DEP = $(INC_LDAP)\msdos.h \
|
||||
$(INC_LDAP)\winsock.h \
|
||||
$(INC_LDAP)\sys/socket.h \
|
||||
$(INC_LDAP)\lber.h \
|
||||
$(INC_LDAP)\proto-lb.h \
|
||||
$(INC_LDAP)\ldap.h \
|
||||
$(INC_LDAP)\proto-ld.h
|
||||
|
||||
|
||||
RESULT_DEP = $(INC_LDAP)\msdos.h \
|
||||
$(INC_LDAP)\winsock.h \
|
||||
$(INC_LDAP)\sys/socket.h \
|
||||
$(INC_LDAP)\sys/select.h \
|
||||
$(INC_LDAP)\portable.h \
|
||||
$(INC_LDAP)\lber.h \
|
||||
$(INC_LDAP)\proto-lb.h \
|
||||
$(INC_LDAP)\ldap.h \
|
||||
$(INC_LDAP)\proto-ld.h
|
||||
|
||||
|
||||
SEARCH_DEP = $(INC_LDAP)\sys/socket.h \
|
||||
$(INC_LDAP)\lber.h \
|
||||
$(INC_LDAP)\proto-lb.h \
|
||||
$(INC_LDAP)\ldap.h \
|
||||
$(INC_LDAP)\winsock.h \
|
||||
$(INC_LDAP)\proto-ld.h \
|
||||
$(INC_LDAP)\msdos.h
|
||||
|
||||
|
||||
UFN_DEP = $(INC_LDAP)\msdos.h \
|
||||
$(INC_LDAP)\winsock.h \
|
||||
$(INC_LDAP)\sys/socket.h \
|
||||
$(INC_LDAP)\lber.h \
|
||||
$(INC_LDAP)\proto-lb.h \
|
||||
$(INC_LDAP)\ldap.h \
|
||||
$(INC_LDAP)\proto-ld.h
|
||||
|
||||
|
||||
OPENWSA_DEP = $(INC_LDAP)\lber.h \
|
||||
$(INC_LDAP)\proto-lb.h \
|
||||
$(INC_LDAP)\ldap.h \
|
||||
$(INC_LDAP)\winsock.h \
|
||||
$(INC_LDAP)\proto-ld.h \
|
||||
$(INC_LDAP)\msdos.h \
|
||||
q:\src\mit\localh\wshelper.h \
|
||||
q:\src\mit\localh\resolv.h \
|
||||
q:\src\mit\localh\arpa/nameser.h \
|
||||
q:\src\mit\localh\hesiod.h
|
||||
|
||||
|
||||
DECODE_DEP = $(INC_LDAP)\sys/socket.h \
|
||||
$(INC_LDAP)\netinet/in.h \
|
||||
$(INC_LDAP)\msdos.h \
|
||||
$(INC_LDAP)\winsock.h \
|
||||
$(INC_LDAP)\lber.h \
|
||||
$(INC_LDAP)\proto-lb.h
|
||||
|
||||
|
||||
ENCODE_DEP = $(INC_LDAP)\sys/socket.h \
|
||||
$(INC_LDAP)\netinet/in.h \
|
||||
$(INC_LDAP)\lber.h \
|
||||
$(INC_LDAP)\proto-lb.h \
|
||||
$(INC_LDAP)\msdos.h \
|
||||
$(INC_LDAP)\winsock.h
|
||||
|
||||
|
||||
IO_DEP = $(INC_LDAP)\sys/socket.h \
|
||||
$(INC_LDAP)\netinet/in.h \
|
||||
$(INC_LDAP)\lber.h \
|
||||
$(INC_LDAP)\proto-lb.h \
|
||||
$(INC_LDAP)\winsock.h \
|
||||
$(INC_LDAP)\msdos.h
|
||||
|
||||
|
||||
MSDOS_DEP = $(INC_LDAP)\lber.h \
|
||||
$(INC_LDAP)\proto-lb.h \
|
||||
$(INC_LDAP)\ldap.h \
|
||||
$(INC_LDAP)\winsock.h \
|
||||
$(INC_LDAP)\proto-ld.h \
|
||||
$(INC_LDAP)\msdos.h
|
||||
|
||||
|
||||
SBIND_DEP = $(INC_LDAP)\sys/socket.h \
|
||||
$(INC_LDAP)\lber.h \
|
||||
$(INC_LDAP)\proto-lb.h \
|
||||
$(INC_LDAP)\ldap.h \
|
||||
$(INC_LDAP)\winsock.h \
|
||||
$(INC_LDAP)\proto-ld.h
|
||||
|
||||
|
||||
UNBIND_DEP = $(INC_LDAP)\msdos.h \
|
||||
$(INC_LDAP)\winsock.h \
|
||||
$(INC_LDAP)\sys/socket.h \
|
||||
$(INC_LDAP)\lber.h \
|
||||
$(INC_LDAP)\proto-lb.h \
|
||||
$(INC_LDAP)\ldap.h \
|
||||
$(INC_LDAP)\proto-ld.h
|
||||
|
||||
|
||||
KBIND_DEP = $(INC_LDAP)\msdos.h \
|
||||
$(INC_LDAP)\winsock.h \
|
||||
c:\src\h\krbv4\krb.h \
|
||||
q:\src\mit\localh\mit_copy.h \
|
||||
q:\src\mit\localh\conf.h \
|
||||
q:\src\mit\localh\osconf.h \
|
||||
q:\src\mit\localh\conf-pc.h \
|
||||
c:\src\h\krbv4\des.h \
|
||||
q:\src\mit\localh\lsh_pwd.h \
|
||||
$(INC_LDAP)\sys/socket.h \
|
||||
$(INC_LDAP)\lber.h \
|
||||
$(INC_LDAP)\proto-lb.h \
|
||||
$(INC_LDAP)\ldap.h \
|
||||
$(INC_LDAP)\proto-ld.h
|
||||
|
||||
|
||||
FRIENDLY_DEP = $(INC_LDAP)\msdos.h \
|
||||
$(INC_LDAP)\winsock.h \
|
||||
$(INC_LDAP)\sys/socket.h \
|
||||
$(INC_LDAP)\lber.h \
|
||||
$(INC_LDAP)\proto-lb.h \
|
||||
$(INC_LDAP)\ldap.h \
|
||||
$(INC_LDAP)\proto-ld.h
|
||||
|
||||
|
||||
DISPTMPL_DEP = $(INC_LDAP)\msdos.h \
|
||||
$(INC_LDAP)\winsock.h \
|
||||
$(INC_LDAP)\sys/file.h \
|
||||
$(INC_LDAP)\lber.h \
|
||||
$(INC_LDAP)\proto-lb.h \
|
||||
$(INC_LDAP)\ldap.h \
|
||||
$(INC_LDAP)\proto-ld.h \
|
||||
$(INC_LDAP)\disptmpl.h
|
||||
|
||||
|
||||
DSPARSE_DEP = $(INC_LDAP)\msdos.h \
|
||||
$(INC_LDAP)\winsock.h \
|
||||
$(INC_LDAP)\sys/file.h \
|
||||
$(INC_LDAP)\lber.h \
|
||||
$(INC_LDAP)\proto-lb.h \
|
||||
$(INC_LDAP)\ldap.h \
|
||||
$(INC_LDAP)\proto-ld.h
|
||||
|
||||
|
||||
FREE_DEP = $(INC_LDAP)\msdos.h \
|
||||
$(INC_LDAP)\winsock.h \
|
||||
$(INC_LDAP)\lber.h \
|
||||
$(INC_LDAP)\proto-lb.h \
|
||||
$(INC_LDAP)\ldap.h \
|
||||
$(INC_LDAP)\proto-ld.h
|
||||
|
||||
|
||||
SORT_DEP = $(INC_LDAP)\msdos.h \
|
||||
$(INC_LDAP)\winsock.h \
|
||||
$(INC_LDAP)\lber.h \
|
||||
$(INC_LDAP)\proto-lb.h \
|
||||
$(INC_LDAP)\ldap.h \
|
||||
$(INC_LDAP)\proto-ld.h
|
||||
|
||||
|
||||
SRCHPREF_DEP = $(INC_LDAP)\msdos.h \
|
||||
$(INC_LDAP)\winsock.h \
|
||||
$(INC_LDAP)\sys/file.h \
|
||||
$(INC_LDAP)\lber.h \
|
||||
$(INC_LDAP)\proto-lb.h \
|
||||
$(INC_LDAP)\ldap.h \
|
||||
$(INC_LDAP)\proto-ld.h \
|
||||
$(INC_LDAP)\srchpref.h
|
||||
|
||||
|
||||
TMPLOUT_DEP = $(INC_LDAP)\msdos.h \
|
||||
$(INC_LDAP)\winsock.h \
|
||||
$(INC_LDAP)\sys/file.h \
|
||||
$(INC_LDAP)\sys/socket.h \
|
||||
$(INC_LDAP)\lber.h \
|
||||
$(INC_LDAP)\proto-lb.h \
|
||||
$(INC_LDAP)\ldap.h \
|
||||
$(INC_LDAP)\proto-ld.h \
|
||||
$(INC_LDAP)\disptmpl.h
|
||||
|
||||
|
||||
LIBLDAP_RCDEP =
|
||||
|
||||
KERBEROS_DEP = $(INC_LDAP)\lber.h \
|
||||
$(INC_LDAP)\proto-lb.h \
|
||||
$(INC_LDAP)\ldap.h \
|
||||
$(INC_LDAP)\winsock.h \
|
||||
$(INC_LDAP)\proto-ld.h \
|
||||
$(INC_LDAP)\msdos.h \
|
||||
c:\src\authman\dll\authlib.h
|
||||
|
||||
|
||||
GETVALUE_DEP = $(INC_LDAP)\msdos.h \
|
||||
$(INC_LDAP)\winsock.h \
|
||||
$(INC_LDAP)\sys/socket.h \
|
||||
$(INC_LDAP)\lber.h \
|
||||
$(INC_LDAP)\proto-lb.h \
|
||||
$(INC_LDAP)\ldap.h \
|
||||
$(INC_LDAP)\proto-ld.h
|
||||
|
||||
|
||||
all: $(PROJ).DLL $(PROJ).BSC
|
||||
|
||||
clean:
|
||||
del *.aps
|
||||
del *.bsc
|
||||
del *.pdb
|
||||
del *.vcw
|
||||
del *.res
|
||||
del *.pch
|
||||
del *.obj
|
||||
del *.sbr
|
||||
# del *.map
|
||||
|
||||
ABANDON.OBJ: ABANDON.C $(ABANDON_DEP)
|
||||
$(CC) $(CFLAGS) $(CCREATEPCHFLAG) /c ABANDON.C
|
||||
|
||||
ADD.OBJ: ADD.C $(ADD_DEP)
|
||||
$(CC) $(CFLAGS) $(CUSEPCHFLAG) /c ADD.C
|
||||
|
||||
BIND.OBJ: BIND.C $(BIND_DEP)
|
||||
$(CC) $(CFLAGS) $(CUSEPCHFLAG) /c BIND.C
|
||||
|
||||
CACHE.OBJ: CACHE.C $(CACHE_DEP)
|
||||
$(CC) $(CFLAGS) $(CUSEPCHFLAG) /c CACHE.C
|
||||
|
||||
COMPARE.OBJ: COMPARE.C $(COMPARE_DEP)
|
||||
$(CC) $(CFLAGS) $(CUSEPCHFLAG) /c COMPARE.C
|
||||
|
||||
DELETE.OBJ: DELETE.C $(DELETE_DEP)
|
||||
$(CC) $(CFLAGS) $(CUSEPCHFLAG) /c DELETE.C
|
||||
|
||||
ERROR.OBJ: ERROR.C $(ERROR_DEP)
|
||||
$(CC) $(CFLAGS) $(CUSEPCHFLAG) /c ERROR.C
|
||||
|
||||
GETFILTE.OBJ: GETFILTE.C $(GETFILTE_DEP)
|
||||
$(CC) $(CFLAGS) $(CUSEPCHFLAG) /c GETFILTE.C
|
||||
|
||||
REGEX.OBJ: REGEX.C $(REGEX_DEP)
|
||||
$(CC) $(CFLAGS) $(CUSEPCHFLAG) /c REGEX.C
|
||||
|
||||
MODIFY.OBJ: MODIFY.C $(MODIFY_DEP)
|
||||
$(CC) $(CFLAGS) $(CUSEPCHFLAG) /c MODIFY.C
|
||||
|
||||
MODRDN.OBJ: MODRDN.C $(MODRDN_DEP)
|
||||
$(CC) $(CFLAGS) $(CUSEPCHFLAG) /c MODRDN.C
|
||||
|
||||
GETDN.OBJ: GETDN.C $(GETDN_DEP)
|
||||
$(CC) $(CFLAGS) $(CUSEPCHFLAG) /c GETDN.C
|
||||
|
||||
GETENTRY.OBJ: GETENTRY.C $(GETENTRY_DEP)
|
||||
$(CC) $(CFLAGS) $(CUSEPCHFLAG) /c GETENTRY.C
|
||||
|
||||
GETATTR.OBJ: GETATTR.C $(GETATTR_DEP)
|
||||
$(CC) $(CFLAGS) $(CUSEPCHFLAG) /c GETATTR.C
|
||||
|
||||
ADDENTRY.OBJ: ADDENTRY.C $(ADDENTRY_DEP)
|
||||
$(CC) $(CFLAGS) $(CUSEPCHFLAG) /c ADDENTRY.C
|
||||
|
||||
RESULT.OBJ: RESULT.C $(RESULT_DEP)
|
||||
$(CC) $(CFLAGS) $(CUSEPCHFLAG) /c RESULT.C
|
||||
|
||||
SEARCH.OBJ: SEARCH.C $(SEARCH_DEP)
|
||||
$(CC) $(CFLAGS) $(CUSEPCHFLAG) /c SEARCH.C
|
||||
|
||||
UFN.OBJ: UFN.C $(UFN_DEP)
|
||||
$(CC) $(CFLAGS) $(CUSEPCHFLAG) /c UFN.C
|
||||
|
||||
OPENWSA.OBJ: OPENWSA.C $(OPENWSA_DEP)
|
||||
$(CC) $(CFLAGS) $(CUSEPCHFLAG) /c OPENWSA.C
|
||||
|
||||
DECODE.OBJ: ..\LIBLBER\DECODE.C $(DECODE_DEP)
|
||||
$(CC) $(CFLAGS) $(CUSEPCHFLAG) /c ..\LIBLBER\DECODE.C
|
||||
|
||||
ENCODE.OBJ: ..\LIBLBER\ENCODE.C $(ENCODE_DEP)
|
||||
$(CC) $(CFLAGS) $(CUSEPCHFLAG) /c ..\LIBLBER\ENCODE.C
|
||||
|
||||
IO.OBJ: ..\LIBLBER\IO.C $(IO_DEP)
|
||||
$(CC) $(CFLAGS) $(CUSEPCHFLAG) /c ..\LIBLBER\IO.C
|
||||
|
||||
MSDOS.OBJ: MSDOS.C $(MSDOS_DEP)
|
||||
$(CC) $(CFLAGS) $(CUSEPCHFLAG) /c MSDOS.C
|
||||
|
||||
SBIND.OBJ: SBIND.C $(SBIND_DEP)
|
||||
$(CC) $(CFLAGS) $(CUSEPCHFLAG) /c SBIND.C
|
||||
|
||||
UNBIND.OBJ: UNBIND.C $(UNBIND_DEP)
|
||||
$(CC) $(CFLAGS) $(CUSEPCHFLAG) /c UNBIND.C
|
||||
|
||||
KBIND.OBJ: KBIND.C $(KBIND_DEP)
|
||||
$(CC) $(CFLAGS) $(CUSEPCHFLAG) /c KBIND.C
|
||||
|
||||
FRIENDLY.OBJ: FRIENDLY.C $(FRIENDLY_DEP)
|
||||
$(CC) $(CFLAGS) $(CUSEPCHFLAG) /c FRIENDLY.C
|
||||
|
||||
DISPTMPL.OBJ: DISPTMPL.C $(DISPTMPL_DEP)
|
||||
$(CC) $(CFLAGS) $(CUSEPCHFLAG) /c DISPTMPL.C
|
||||
|
||||
DSPARSE.OBJ: DSPARSE.C $(DSPARSE_DEP)
|
||||
$(CC) $(CFLAGS) $(CUSEPCHFLAG) /c DSPARSE.C
|
||||
|
||||
FREE.OBJ: FREE.C $(FREE_DEP)
|
||||
$(CC) $(CFLAGS) $(CUSEPCHFLAG) /c FREE.C
|
||||
|
||||
SORT.OBJ: SORT.C $(SORT_DEP)
|
||||
$(CC) $(CFLAGS) $(CUSEPCHFLAG) /c SORT.C
|
||||
|
||||
SRCHPREF.OBJ: SRCHPREF.C $(SRCHPREF_DEP)
|
||||
$(CC) $(CFLAGS) $(CUSEPCHFLAG) /c SRCHPREF.C
|
||||
|
||||
TMPLOUT.OBJ: TMPLOUT.C $(TMPLOUT_DEP)
|
||||
$(CC) $(CFLAGS) $(CUSEPCHFLAG) /c TMPLOUT.C
|
||||
|
||||
LIBLDAP.RES: LIBLDAP.RC $(LIBLDAP_RCDEP)
|
||||
$(RC) $(RCFLAGS) $(RCDEFINES) -r LIBLDAP.RC
|
||||
|
||||
KERBEROS.OBJ: ..\MSDOS\KERBEROS.C $(KERBEROS_DEP)
|
||||
$(CC) $(CFLAGS) $(CUSEPCHFLAG) /c ..\MSDOS\KERBEROS.C
|
||||
|
||||
GETVALUE.OBJ: GETVALUE.C $(GETVALUE_DEP)
|
||||
$(CC) $(CFLAGS) $(CUSEPCHFLAG) /c GETVALUE.C
|
||||
|
||||
|
||||
$(PROJ).DLL:: LIBLDAP.RES
|
||||
|
||||
$(PROJ).DLL:: ABANDON.OBJ ADD.OBJ BIND.OBJ CACHE.OBJ COMPARE.OBJ DELETE.OBJ ERROR.OBJ \
|
||||
GETFILTE.OBJ REGEX.OBJ MODIFY.OBJ MODRDN.OBJ GETDN.OBJ GETENTRY.OBJ GETATTR.OBJ ADDENTRY.OBJ \
|
||||
RESULT.OBJ SEARCH.OBJ UFN.OBJ OPENWSA.OBJ DECODE.OBJ ENCODE.OBJ IO.OBJ MSDOS.OBJ \
|
||||
SBIND.OBJ UNBIND.OBJ KBIND.OBJ FRIENDLY.OBJ DISPTMPL.OBJ DSPARSE.OBJ FREE.OBJ SORT.OBJ \
|
||||
SRCHPREF.OBJ TMPLOUT.OBJ KERBEROS.OBJ GETVALUE.OBJ $(OBJS_EXT) $(DEFFILE)
|
||||
echo >NUL @<<$(PROJ).CRF
|
||||
ABANDON.OBJ +
|
||||
ADD.OBJ +
|
||||
BIND.OBJ +
|
||||
CACHE.OBJ +
|
||||
COMPARE.OBJ +
|
||||
DELETE.OBJ +
|
||||
ERROR.OBJ +
|
||||
GETFILTE.OBJ +
|
||||
REGEX.OBJ +
|
||||
MODIFY.OBJ +
|
||||
MODRDN.OBJ +
|
||||
GETDN.OBJ +
|
||||
GETENTRY.OBJ +
|
||||
GETATTR.OBJ +
|
||||
ADDENTRY.OBJ +
|
||||
RESULT.OBJ +
|
||||
SEARCH.OBJ +
|
||||
UFN.OBJ +
|
||||
OPENWSA.OBJ +
|
||||
DECODE.OBJ +
|
||||
ENCODE.OBJ +
|
||||
IO.OBJ +
|
||||
MSDOS.OBJ +
|
||||
SBIND.OBJ +
|
||||
UNBIND.OBJ +
|
||||
KBIND.OBJ +
|
||||
FRIENDLY.OBJ +
|
||||
DISPTMPL.OBJ +
|
||||
DSPARSE.OBJ +
|
||||
FREE.OBJ +
|
||||
SORT.OBJ +
|
||||
SRCHPREF.OBJ +
|
||||
TMPLOUT.OBJ +
|
||||
KERBEROS.OBJ +
|
||||
GETVALUE.OBJ +
|
||||
$(OBJS_EXT)
|
||||
$(PROJ).DLL
|
||||
$(MAPFILE)
|
||||
c:\msvc\lib\+
|
||||
c:\msvc\mfc\lib\+
|
||||
c:\src\lib\+
|
||||
c:\src\mit\locallib\+
|
||||
WINSOCK.LIB+
|
||||
$(LIBS)
|
||||
$(DEFFILE);
|
||||
<<
|
||||
link $(LFLAGS) @$(PROJ).CRF
|
||||
$(RC) $(RESFLAGS) LIBLDAP.RES $@
|
||||
@copy $(PROJ).CRF MSVC.BND
|
||||
implib /nowep $(PROJ).LIB $(PROJ).DLL
|
||||
|
||||
$(PROJ).DLL:: LIBLDAP.RES
|
||||
if not exist MSVC.BND $(RC) $(RESFLAGS) LIBLDAP.RES $@
|
||||
|
||||
run: $(PROJ).DLL
|
||||
$(PROJ) $(RUNFLAGS)
|
||||
|
||||
#clean:
|
||||
# del *.aps
|
||||
# del *.bsc
|
||||
# del *.pdb
|
||||
# del *.vcw
|
||||
# del *.res
|
||||
# del *.pch
|
||||
# del *.obj
|
||||
# del *.sbr
|
||||
# del *.map
|
||||
|
||||
$(PROJ).BSC: $(SBRS)
|
||||
bscmake @<<
|
||||
/o$@ $(SBRS)
|
||||
<<
|
||||
|
||||
|
|
@ -1,133 +0,0 @@
|
|||
/*
|
||||
* Copyright (c) 1993 Regents of the University of Michigan.
|
||||
* All rights reserved.
|
||||
*
|
||||
* open-wsa.c -- libldap ldap_open routine that assumes Winsock API
|
||||
*/
|
||||
|
||||
#ifndef lint
|
||||
static char copyright[] = "@(#) Copyright (c) 1993 Regents of the University of Michigan.\nAll rights reserved.\n";
|
||||
#endif
|
||||
|
||||
#include "lber.h"
|
||||
#include "ldap.h"
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include "msdos.h"
|
||||
#ifdef WSHELPER
|
||||
#include "wshelper.h"
|
||||
#endif
|
||||
|
||||
#ifndef INADDR_LOOPBACK
|
||||
#define INADDR_LOOPBACK ((u_long) 0x7f000001)
|
||||
#endif
|
||||
|
||||
#ifdef LDAP_DEBUG
|
||||
int ldap_debug;
|
||||
#endif
|
||||
|
||||
/*
|
||||
* ldap_open - initialize and connect to an ldap server. A magic cookie to
|
||||
* be used for future communication is returned on success, NULL on failure.
|
||||
*
|
||||
* Example:
|
||||
* LDAP *ld;
|
||||
* ld = ldap_open( hostname, port );
|
||||
*/
|
||||
|
||||
LDAP *ldap_open( host, port )
|
||||
char *host;
|
||||
int port;
|
||||
{
|
||||
SOCKET s;
|
||||
struct sockaddr_in sock;
|
||||
struct hostent FAR *hp;
|
||||
LDAP *ld;
|
||||
unsigned long address;
|
||||
int i, connected;
|
||||
char *p, hostname[64];
|
||||
WSADATA wsadata;
|
||||
|
||||
Debug( LDAP_DEBUG_TRACE, "ldap_open\n", 0, 0, 0 );
|
||||
|
||||
if ( WSAStartup( 0x0101, &wsadata ) != 0 ) {
|
||||
return( NULL );
|
||||
}
|
||||
|
||||
hp = NULL;
|
||||
|
||||
if ( host != NULL ) {
|
||||
if (( address = inet_addr( host )) == INADDR_NONE ) {
|
||||
if (( hp = gethostbyname( host )) == NULL ) {
|
||||
WSACleanup();
|
||||
return( NULL );
|
||||
}
|
||||
}
|
||||
} else {
|
||||
address = htonl( INADDR_LOOPBACK );
|
||||
}
|
||||
|
||||
if ( port == 0 )
|
||||
port = LDAP_PORT;
|
||||
|
||||
if ( (s = socket( AF_INET, SOCK_STREAM, 0 )) == INVALID_SOCKET ) {
|
||||
WSACleanup();
|
||||
return( NULL );
|
||||
}
|
||||
|
||||
connected = 0;
|
||||
for ( i = 0; i == 0 || ( hp != NULL && hp->h_addr_list[ i ] != 0L );
|
||||
++i ) {
|
||||
if ( hp != NULL ) {
|
||||
SAFEMEMCPY( &sock.sin_addr.s_addr, hp->h_addr_list[ i ],
|
||||
sizeof( sock.sin_addr.s_addr ));
|
||||
} else {
|
||||
sock.sin_addr.s_addr = address;
|
||||
}
|
||||
sock.sin_family = AF_INET;
|
||||
sock.sin_port = htons( port );
|
||||
|
||||
if ( connect( s, (struct sockaddr *) &sock, sizeof(sock) ) != SOCKET_ERROR ) {
|
||||
connected = 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if ( !connected ) {
|
||||
closesocket( s );
|
||||
WSACleanup();
|
||||
return( NULL );
|
||||
}
|
||||
|
||||
/*
|
||||
* do a reverse lookup on the addr to get the official hostname.
|
||||
* this is necessary for kerberos to work right, since the official
|
||||
* hostname is used as the kerberos instance.
|
||||
*/
|
||||
|
||||
hostname[0] = '\0';
|
||||
#ifdef WSHELPER
|
||||
if ( (hp = rgethostbyaddr( (char *)&sock.sin_addr.s_addr,
|
||||
#else
|
||||
if ( (hp = gethostbyaddr( (char *)&sock.sin_addr.s_addr,
|
||||
#endif
|
||||
sizeof(sock.sin_addr.s_addr), AF_INET )) != NULL ) {
|
||||
if ( hp->h_name != NULL ) {
|
||||
if ( (p = strchr( hp->h_name, '.' )) != NULL ) {
|
||||
*p = '\0';
|
||||
}
|
||||
strcpy( hostname, hp->h_name );
|
||||
}
|
||||
}
|
||||
|
||||
if ( (ld = (LDAP *) calloc( sizeof(LDAP), 1 )) == NULL ) {
|
||||
closesocket( s );
|
||||
WSACleanup();
|
||||
return( NULL );
|
||||
}
|
||||
ld->ld_sb.sb_sd = s;
|
||||
ld->ld_host = strdup( hostname );
|
||||
ld->ld_version = LDAP_VERSION;
|
||||
|
||||
return( ld );
|
||||
}
|
||||
|
|
@ -1,69 +0,0 @@
|
|||
rem
|
||||
rem MSDOS batch file to setup LDAP source area for Windows Socket API build
|
||||
rem This should be run from the ***ROOT*** of the LDAP source tree
|
||||
rem
|
||||
rem Updated 4 April 1996 * Steve Rothwell * University of Michigan
|
||||
rem
|
||||
|
||||
mkdir include\sys
|
||||
mkdir include\_sys
|
||||
mkdir include\arpa
|
||||
mkdir include\netinet
|
||||
|
||||
rem original set of empty files
|
||||
copy libraries\msdos\winsock\include\file.h include\sys
|
||||
copy libraries\msdos\winsock\include\select.h include\sys
|
||||
copy libraries\msdos\winsock\include\socket.h include\sys
|
||||
copy libraries\msdos\winsock\include\param.h include\sys
|
||||
copy libraries\msdos\winsock\include\ioctl.h include\sys
|
||||
copy libraries\msdos\winsock\include\filio.h include\sys
|
||||
copy libraries\msdos\winsock\include\time.h include\sys
|
||||
copy libraries\msdos\winsock\include\in.h include\netinet
|
||||
|
||||
rem a newer copy
|
||||
copy libraries\msdos\winsock\include\wsa\winsock.h include
|
||||
|
||||
rem from MIT's kerberos stuff
|
||||
copy libraries\msdos\winsock\include\krb\krb.h include
|
||||
copy libraries\msdos\winsock\include\krb\des.h include
|
||||
|
||||
rem from MIT's "localh" collection
|
||||
copy libraries\msdos\winsock\include\krb\mit\mit_copy.h include
|
||||
copy libraries\msdos\winsock\include\krb\mit\conf.h include
|
||||
copy libraries\msdos\winsock\include\krb\mit\conf-pc.h include
|
||||
copy libraries\msdos\winsock\include\krb\mit\osconf.h include
|
||||
copy libraries\msdos\winsock\include\krb\mit\lsh_pwd.h include
|
||||
copy libraries\msdos\winsock\include\krb\mit\wshelper.h include
|
||||
copy libraries\msdos\winsock\include\krb\mit\resolv.h include
|
||||
copy libraries\msdos\winsock\include\krb\mit\hesiod.h include
|
||||
copy libraries\msdos\winsock\include\krb\mit\arpa\nameser.h include\arpa
|
||||
|
||||
rem from Novell's LWP "toolkit" collection
|
||||
copy libraries\msdos\winsock\include\net\_sys\filio.h include\_sys
|
||||
copy libraries\msdos\winsock\include\net\_sys\ioctl.h include\_sys
|
||||
copy libraries\msdos\winsock\include\net\netdb.h include
|
||||
|
||||
copy libraries\msdos\winsock\include\wsa.h include\msdos.h
|
||||
copy libraries\msdos\winsock\wsa.c libraries\libldap\msdos.c
|
||||
|
||||
copy libraries\msdos\winsock\wsockip.c libraries\libldap
|
||||
copy libraries\msdos\winsock\kerberos.c libraries\libldap
|
||||
|
||||
rem the Pieces you need for MSVC 1.52c
|
||||
copy libraries\msdos\winsock\libldap.def libraries\libldap
|
||||
copy libraries\msdos\winsock\libldap.mak libraries\libldap
|
||||
copy libraries\msdos\winsock\libldap.rc libraries\libldap
|
||||
copy libraries\msdos\winsock\wsa\winsock.def libraries\libldap
|
||||
|
||||
copy libraries\msdos\winsock\ldap32.def libraries\libldap
|
||||
copy libraries\msdos\winsock\ldap32.mak libraries\libldap
|
||||
copy libraries\msdos\winsock\ldap32.mdp libraries\libldap
|
||||
|
||||
attrib -r libraries\libldap\getfilter.c
|
||||
move libraries\libldap\getfilter.c libraries\libldap\getfilte.c
|
||||
attrib -r libraries\libldap\getvalues.c
|
||||
move libraries\libldap\getvalues.c libraries\libldap\getvalue.c
|
||||
attrib -r include\proto-ldap.h
|
||||
move include\proto-ldap.h include\proto-ld.h
|
||||
attrib -r include\proto-lber.h
|
||||
move include\proto-lber.h include\proto-lb.h
|
||||
|
|
@ -1,77 +0,0 @@
|
|||
@rem
|
||||
@rem this is UNsetupwsa.bat It reverses what setupwsa.bat does.
|
||||
@rem you SHOULD NOT use this file !!!
|
||||
@rem MSDOS batch file to setup LDAP source area for Windows Socket API build
|
||||
@rem This should be run from the ***ROOT*** of the LDAP source tree
|
||||
@rem
|
||||
@rem Updated 1 December 1995 * Steve Rothwell * University of Michigan
|
||||
@rem
|
||||
|
||||
@echo "You SHOULD NOT USE unsetupwsa.bat"
|
||||
@goto END
|
||||
|
||||
:UNSETUP
|
||||
|
||||
rem original set of empty files
|
||||
call copyback libraries\msdos\winsock\include\file.h include\sys\file.h
|
||||
call copyback libraries\msdos\winsock\include\select.h include\sys\select.h
|
||||
call copyback libraries\msdos\winsock\include\socket.h include\sys\socket.h
|
||||
call copyback libraries\msdos\winsock\include\param.h include\sys\param.h
|
||||
call copyback libraries\msdos\winsock\include\ioctl.h include\sys\ioctl.h
|
||||
call copyback libraries\msdos\winsock\include\filio.h include\sys\filio.h
|
||||
call copyback libraries\msdos\winsock\include\time.h include\sys\time.h
|
||||
call copyback libraries\msdos\winsock\include\in.h include\netinet\in.h
|
||||
|
||||
rem a newer copy
|
||||
call copyback libraries\msdos\winsock\include\wsa\winsock.h include\winsock.h
|
||||
|
||||
rem from MIT's kerberos stuff
|
||||
call copyback libraries\msdos\winsock\include\krb\krb.h include\krb.h
|
||||
call copyback libraries\msdos\winsock\include\krb\des.h include\des.h
|
||||
|
||||
rem from MIT's "localh" collection
|
||||
call copyback libraries\msdos\winsock\include\krb\mit\mit_copy.h include\mit_copy.h
|
||||
call copyback libraries\msdos\winsock\include\krb\mit\conf.h include\conf.h
|
||||
call copyback libraries\msdos\winsock\include\krb\mit\conf-pc.h include\conf-pc.h
|
||||
call copyback libraries\msdos\winsock\include\krb\mit\osconf.h include\osconf.h
|
||||
call copyback libraries\msdos\winsock\include\krb\mit\lsh_pwd.h include\lsh_pwd.h
|
||||
call copyback libraries\msdos\winsock\include\krb\mit\wshelper.h include\wshelper.h
|
||||
call copyback libraries\msdos\winsock\include\krb\mit\resolv.h include\resolv.h
|
||||
call copyback libraries\msdos\winsock\include\krb\mit\hesiod.h include\hesiod.h
|
||||
call copyback libraries\msdos\winsock\include\krb\mit\arpa\nameser.h include\arpa\nameser.h
|
||||
|
||||
rem from Novell's LWP "toolkit" collection
|
||||
call copyback libraries\msdos\winsock\include\net\_sys\filio.h include\_sys\filio.h
|
||||
call copyback libraries\msdos\winsock\include\net\_sys\ioctl.h include\_sys\ioctl.h
|
||||
call copyback libraries\msdos\winsock\include\net\netdb.h include\netdb.h
|
||||
|
||||
call copyback libraries\msdos\winsock\include\wsa.h include\msdos.h
|
||||
call copyback libraries\msdos\winsock\wsa.c libraries\libldap\msdos.c
|
||||
|
||||
call copyback libraries\msdos\winsock\wsockip.c libraries\libldap\wsockip.c
|
||||
call copyback libraries\msdos\winsock\kerberos.c libraries\libldap\kerberos.c
|
||||
|
||||
rem the Pieces you need for MSVC 1.52c
|
||||
call copyback libraries\msdos\winsock\libldap.def libraries\libldap\libldap.def
|
||||
call copyback libraries\msdos\winsock\libldap.mak libraries\libldap\libldap.mak
|
||||
call copyback libraries\msdos\winsock\libldap.rc libraries\libldap\libldap.rc
|
||||
call copyback libraries\msdos\winsock\wsa\winsock.def libraries\libldap\winsock.def
|
||||
|
||||
call copyback libraries\msdos\winsock\ldap32.def libraries\libldap\ldap32.def
|
||||
call copyback libraries\msdos\winsock\ldap32.mak libraries\libldap\ldap32.mak
|
||||
call copyback libraries\msdos\winsock\ldap32.mdp libraries\libldap\ldap32.mdp
|
||||
|
||||
call copyback libraries\libldap\getfilter.c libraries\libldap\getfilte.c
|
||||
call copyback libraries\libldap\getvalues.c libraries\libldap\getvalue.c
|
||||
call copyback include\proto-lber.h include\proto-lb.h
|
||||
call copyback include\proto-ldap.h include\proto-ld.h
|
||||
|
||||
rmdir include\netinet
|
||||
rmdir include\arpa
|
||||
rmdir include\_sys
|
||||
rmdir include\sys
|
||||
|
||||
goto END
|
||||
|
||||
:END
|
||||
|
||||
|
|
@ -1,91 +0,0 @@
|
|||
/*
|
||||
* Microsoft Windows specifics for LIBLDAP DLL
|
||||
*/
|
||||
#include "lber.h"
|
||||
#include "ldap.h"
|
||||
#include "msdos.h"
|
||||
|
||||
|
||||
#ifdef _WIN32
|
||||
/* Lifted from Q125688
|
||||
* How to Port a 16-bit DLL to a Win32 DLL
|
||||
* on the MSVC 4.0 CD
|
||||
*/
|
||||
BOOL WINAPI DllMain (HANDLE hModule, DWORD fdwReason, LPVOID lpReserved)
|
||||
{
|
||||
switch (fdwReason)
|
||||
{
|
||||
case DLL_PROCESS_ATTACH:
|
||||
/* Code from LibMain inserted here. Return TRUE to keep the
|
||||
DLL loaded or return FALSE to fail loading the DLL.
|
||||
|
||||
You may have to modify the code in your original LibMain to
|
||||
account for the fact that it may be called more than once.
|
||||
You will get one DLL_PROCESS_ATTACH for each process that
|
||||
loads the DLL. This is different from LibMain which gets
|
||||
called only once when the DLL is loaded. The only time this
|
||||
is critical is when you are using shared data sections.
|
||||
If you are using shared data sections for statically
|
||||
allocated data, you will need to be careful to initialize it
|
||||
only once. Check your code carefully.
|
||||
|
||||
Certain one-time initializations may now need to be done for
|
||||
each process that attaches. You may also not need code from
|
||||
your original LibMain because the operating system may now
|
||||
be doing it for you.
|
||||
*/
|
||||
/*
|
||||
* 16 bit code calls UnlockData()
|
||||
* which is mapped to UnlockSegment in windows.h
|
||||
* in 32 bit world UnlockData is not defined anywhere
|
||||
* UnlockSegment is mapped to GlobalUnfix in winbase.h
|
||||
* and the docs for both UnlockSegment and GlobalUnfix say
|
||||
* ".. function is oboslete. Segments have no meaning
|
||||
* in the 32-bit environment". So we do nothing here.
|
||||
*/
|
||||
break;
|
||||
|
||||
case DLL_THREAD_ATTACH:
|
||||
/* Called each time a thread is created in a process that has
|
||||
already loaded (attached to) this DLL. Does not get called
|
||||
for each thread that exists in the process before it loaded
|
||||
the DLL.
|
||||
|
||||
Do thread-specific initialization here.
|
||||
*/
|
||||
break;
|
||||
|
||||
case DLL_THREAD_DETACH:
|
||||
/* Same as above, but called when a thread in the process
|
||||
exits.
|
||||
|
||||
Do thread-specific cleanup here.
|
||||
*/
|
||||
break;
|
||||
|
||||
case DLL_PROCESS_DETACH:
|
||||
/* Code from _WEP inserted here. This code may (like the
|
||||
LibMain) not be necessary. Check to make certain that the
|
||||
operating system is not doing it for you.
|
||||
*/
|
||||
break;
|
||||
}
|
||||
/* The return value is only used for DLL_PROCESS_ATTACH; all other
|
||||
conditions are ignored. */
|
||||
return TRUE; // successful DLL_PROCESS_ATTACH
|
||||
}
|
||||
#else
|
||||
int CALLBACK
|
||||
LibMain( HINSTANCE hinst, WORD wDataSeg, WORD cbHeapSize, LPSTR lpszCmdLine )
|
||||
{
|
||||
UnlockData( 0 );
|
||||
return( 1 );
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
void
|
||||
ldap_memfree( void *p )
|
||||
{
|
||||
free( p );
|
||||
}
|
||||
|
|
@ -1,472 +0,0 @@
|
|||
/*
|
||||
* Copyright (c) 1995 Regents of the University of Michigan.
|
||||
* All rights reserved.
|
||||
*
|
||||
* os-ip.c -- platform-specific TCP & UDP related code
|
||||
*/
|
||||
|
||||
#ifndef lint
|
||||
static char copyright[] = "@(#) Copyright (c) 1995 Regents of the University of Michigan.\nAll rights reserved.\n";
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#if defined(WINSOCK) || defined(_WIN32)
|
||||
#include <io.h>
|
||||
#include "msdos.h"
|
||||
#include "stdarg.h"
|
||||
#ifdef KERBEROS
|
||||
#include "wshelper.h"
|
||||
#endif /* KERBEROS */
|
||||
#endif /* WINSOCK */
|
||||
#include <errno.h>
|
||||
|
||||
#ifdef _WIN32
|
||||
#include <io.h>
|
||||
#else /* _WIN32 */
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
#include <netinet/in.h>
|
||||
#include <netdb.h>
|
||||
#endif /* _WIN32 */
|
||||
#ifdef _AIX
|
||||
#include <sys/select.h>
|
||||
#endif /* _AIX */
|
||||
#include "portable.h"
|
||||
#include "lber.h"
|
||||
#include "ldap.h"
|
||||
|
||||
#ifdef NEED_FILIO
|
||||
#ifdef WINSOCK
|
||||
#include <_sys/filio.h>
|
||||
#else /* WINSOCK */
|
||||
#include <sys/filio.h>
|
||||
#endif /* WINSOCK */
|
||||
#else /* NEED_FILIO */
|
||||
#ifdef WINSOCK
|
||||
#include <_sys/ioctl.h>
|
||||
#else /* WINSOCK */
|
||||
#include <sys/ioctl.h>
|
||||
#endif /* WINSOCK */
|
||||
#endif /* NEED_FILIO */
|
||||
#ifdef USE_SYSCONF
|
||||
#include <unistd.h>
|
||||
#endif /* USE_SYSCONF */
|
||||
|
||||
|
||||
#ifdef MACOS
|
||||
#define tcp_close( s ) tcpclose( s )
|
||||
#else /* MACOS */
|
||||
#ifdef DOS
|
||||
#ifdef PCNFS
|
||||
#define tcp_close( s ) close( s )
|
||||
#endif /* PCNFS */
|
||||
#ifdef NCSA
|
||||
#define tcp_close( s ) netclose( s ); netshut()
|
||||
#endif /* NCSA */
|
||||
#ifdef WINSOCK
|
||||
#define tcp_close( s ) closesocket( s ); WSACleanup();
|
||||
#endif /* WINSOCK */
|
||||
#else /* DOS */
|
||||
#define tcp_close( s ) close( s )
|
||||
#endif /* DOS */
|
||||
#endif /* MACOS */
|
||||
|
||||
|
||||
#ifdef WINSOCK
|
||||
static WSADATA wsadata;
|
||||
|
||||
#ifdef LDAP_DEBUG
|
||||
void
|
||||
Debug( int level, char* fmt, ... )
|
||||
{
|
||||
char buf[BUFSIZ];
|
||||
va_list DbgArgs;
|
||||
int i = 0;
|
||||
char* arg[3] = { NULL, NULL, NULL };
|
||||
|
||||
va_start( DbgArgs, fmt );
|
||||
for ( i= 0; i < 3; i++ )
|
||||
{
|
||||
arg[i] = va_arg( DbgArgs, va_list );
|
||||
}
|
||||
va_end( DbgArgs ); /* Reset variable arguments. */
|
||||
|
||||
|
||||
wsprintf( buf, fmt, arg[0], arg[1], arg[2] );
|
||||
OutputDebugString( buf );
|
||||
}
|
||||
|
||||
#define BPLEN 48
|
||||
#include <ctype.h>
|
||||
|
||||
void
|
||||
lber_bprint( char *data, int len )
|
||||
{
|
||||
static char hexdig[] = "0123456789abcdef";
|
||||
char out[ BPLEN ];
|
||||
int i = 0;
|
||||
char buf[BUFSIZ];
|
||||
|
||||
memset( out, 0, BPLEN );
|
||||
buf[0] = '\0';
|
||||
for ( ;; ) {
|
||||
if ( len < 1 ) {
|
||||
wsprintf( buf, "\t%s\n", ( i == 0 ) ? "(end)" : out );
|
||||
OutputDebugString( buf );
|
||||
break;
|
||||
}
|
||||
|
||||
#ifndef HEX
|
||||
if ( isgraph( (unsigned char)*data )) {
|
||||
out[ i ] = ' ';
|
||||
out[ i+1 ] = *data;
|
||||
} else {
|
||||
#endif
|
||||
out[ i ] = hexdig[ ( *data & 0xf0 ) >> 4 ];
|
||||
out[ i+1 ] = hexdig[ *data & 0x0f ];
|
||||
#ifndef HEX
|
||||
}
|
||||
#endif
|
||||
i += 2;
|
||||
len--;
|
||||
data++;
|
||||
|
||||
if ( i > BPLEN - 2 ) {
|
||||
wsprintf( buf, "\t%s\n", out );
|
||||
OutputDebugString( buf );
|
||||
memset( out, 0, BPLEN );
|
||||
i = 0;
|
||||
continue;
|
||||
}
|
||||
out[ i++ ] = ' ';
|
||||
}
|
||||
}
|
||||
#endif /* LDAP_DEBUG */
|
||||
#endif /* WINSOCK */
|
||||
|
||||
int
|
||||
connect_to_host( Sockbuf *sb, char *host, unsigned long address,
|
||||
int port, int async )
|
||||
/*
|
||||
* if host == NULL, connect using address
|
||||
* "address" and "port" must be in network byte order
|
||||
* zero is returned upon success, -1 if fatal error, -2 EINPROGRESS
|
||||
* async is only used ifdef LDAP_REFERRALS (non-0 means don't wait for connect)
|
||||
* XXX async is not used yet!
|
||||
*/
|
||||
{
|
||||
int rc, i, s, connected, use_hp;
|
||||
struct sockaddr_in sin;
|
||||
struct hostent *hp;
|
||||
|
||||
#ifdef notyet
|
||||
#ifdef LDAP_REFERRALS
|
||||
int status; /* for ioctl call */
|
||||
#endif /* LDAP_REFERRALS */
|
||||
#endif /* notyet */
|
||||
|
||||
Debug( LDAP_DEBUG_TRACE, "connect_to_host: %s:%d\n",
|
||||
( host == NULL ) ? "(by address)" : host, ntohs( port ), 0 );
|
||||
|
||||
#ifdef WINSOCK
|
||||
if ( WSAStartup( 0x0101, &wsadata ) != 0 ) {
|
||||
return( (int)NULL );
|
||||
}
|
||||
#endif
|
||||
|
||||
hp = NULL;
|
||||
connected = use_hp = 0;
|
||||
|
||||
if ( host != NULL && ( address = inet_addr( host )) == -1 ) {
|
||||
if ( (hp = gethostbyname( host )) == NULL ) {
|
||||
#ifdef WINSOCK
|
||||
errno = WSAGetLastError();
|
||||
#else
|
||||
errno = EHOSTUNREACH; /* not exactly right, but... */
|
||||
#endif
|
||||
return( -1 );
|
||||
}
|
||||
use_hp = 1;
|
||||
}
|
||||
|
||||
rc = -1;
|
||||
for ( i = 0; !use_hp || ( hp->h_addr_list[ i ] != 0 ); i++ ) {
|
||||
if (( s = socket( AF_INET, SOCK_STREAM, 0 )) < 0 ) {
|
||||
return( -1 );
|
||||
}
|
||||
#ifdef notyet
|
||||
#ifdef LDAP_REFERRALS
|
||||
status = 1;
|
||||
if ( async && ioctl( s, FIONBIO, (caddr_t)&status ) == -1 ) {
|
||||
Debug( LDAP_DEBUG_ANY, "FIONBIO ioctl failed on %d\n",
|
||||
s, 0, 0 );
|
||||
}
|
||||
#endif /* LDAP_REFERRALS */
|
||||
#endif /* notyet */
|
||||
(void)memset( (char *)&sin, 0, sizeof( struct sockaddr_in ));
|
||||
sin.sin_family = AF_INET;
|
||||
sin.sin_port = port;
|
||||
SAFEMEMCPY( (char *) &sin.sin_addr.s_addr,
|
||||
( use_hp ? (char *) hp->h_addr_list[ i ] :
|
||||
(char *) &address ), sizeof( sin.sin_addr.s_addr) );
|
||||
|
||||
if ( connect( s, (struct sockaddr *)&sin,
|
||||
sizeof( struct sockaddr_in )) >= 0 ) {
|
||||
connected = 1;
|
||||
rc = 0;
|
||||
break;
|
||||
} else {
|
||||
#ifdef notyet
|
||||
#ifdef LDAP_REFERRALS
|
||||
#ifdef EAGAIN
|
||||
if ( errno == EINPROGRESS || errno == EAGAIN ) {
|
||||
#else /* EAGAIN */
|
||||
if ( errno == EINPROGRESS ) {
|
||||
#endif /* EAGAIN */
|
||||
Debug( LDAP_DEBUG_TRACE,
|
||||
"connect would block...\n", 0, 0, 0 );
|
||||
rc = -2;
|
||||
break;
|
||||
}
|
||||
#endif /* LDAP_REFERRALS */
|
||||
#endif /* notyet */
|
||||
|
||||
Debug( LDAP_DEBUG_TRACE, "%s", (char *)inet_ntoa( sin.sin_addr ), 0, 0 );
|
||||
|
||||
close( s );
|
||||
if ( !use_hp ) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
sb->sb_sd = s;
|
||||
|
||||
if ( connected ) {
|
||||
#ifdef notyet
|
||||
#ifdef LDAP_REFERRALS
|
||||
status = 0;
|
||||
if ( !async && ioctl( s, FIONBIO, (caddr_t)&on ) == -1 ) {
|
||||
Debug( LDAP_DEBUG_ANY, "FIONBIO ioctl failed on %d\n",
|
||||
s, 0, 0 );
|
||||
}
|
||||
#endif /* LDAP_REFERRALS */
|
||||
#endif /* notyet */
|
||||
|
||||
Debug( LDAP_DEBUG_TRACE, "sd %d connected to: %s\n",
|
||||
s, inet_ntoa( sin.sin_addr ), 0 );
|
||||
}
|
||||
|
||||
return( rc ); /* Do NOT call WSACleanup. We want to use socket and various routines */
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
close_connection( Sockbuf *sb )
|
||||
{
|
||||
tcp_close( sb->sb_sd );
|
||||
}
|
||||
|
||||
|
||||
#ifdef KERBEROS
|
||||
char *
|
||||
host_connected_to( Sockbuf *sb )
|
||||
{
|
||||
struct hostent *hp = NULL;
|
||||
int len;
|
||||
struct sockaddr_in sin;
|
||||
|
||||
#ifdef WINSOCK
|
||||
struct hostent lhp;
|
||||
char hName[BUFSIZ/2];
|
||||
unsigned int prevMode;
|
||||
|
||||
// Create a function pointer type that can be type-checked
|
||||
// by an ANSI-C compiler.
|
||||
typedef struct hostent FAR * (PASCAL FAR * LPGHBA)(const char FAR * addr, int len, int type);
|
||||
HINSTANCE hDLLInst;
|
||||
LPGHBA ghba = NULL; // Declare pointer to functions that can be type-checked.
|
||||
|
||||
memset(&lhp, 0x00, sizeof(struct hostent));
|
||||
hName[0] = '\0';
|
||||
#endif
|
||||
(void)memset( (char *)&sin, 0, sizeof( struct sockaddr_in ));
|
||||
len = sizeof( sin );
|
||||
if ( getpeername( sb->sb_sd, (struct sockaddr*) &sin, &len ) == -1 ) {
|
||||
return( NULL );
|
||||
}
|
||||
|
||||
/*
|
||||
* do a reverse lookup on the addr to get the official hostname.
|
||||
* this is necessary for kerberos to work right, since the official
|
||||
* hostname is used as the kerberos instance.
|
||||
*/
|
||||
#ifdef WINSOCK
|
||||
/*
|
||||
* Dynamically detect and use wshelper.dll if available. If not use
|
||||
* winsock's gethostbyaddr and cross your fingers.
|
||||
*/
|
||||
prevMode = SetErrorMode( SEM_NOOPENFILEERRORBOX );
|
||||
hDLLInst = LoadLibrary ("WSHELPER.DLL");
|
||||
SetErrorMode( prevMode );
|
||||
if (hDLLInst >= HINSTANCE_ERROR) {
|
||||
ghba = (LPGHBA)GetProcAddress (hDLLInst, "rgethostbyaddr");
|
||||
|
||||
if (ghba) {
|
||||
hp = (*ghba)( (char *)&sin.sin_addr,
|
||||
sizeof( sin.sin_addr.s_addr ), AF_INET );
|
||||
if ( hp && hp->h_name ) {
|
||||
/* copy name, put in our fake hp, make hp point to it
|
||||
* because this hp disappears when FreeLibrary is called */
|
||||
strcpy(hName, hp->h_name);
|
||||
lhp.h_name = &hName;
|
||||
hp = &lhp;
|
||||
}
|
||||
} else {
|
||||
hp = gethostbyaddr( (char *)&sin.sin_addr,
|
||||
sizeof( sin.sin_addr.s_addr ), AF_INET );
|
||||
}
|
||||
FreeLibrary (hDLLInst);
|
||||
} else {
|
||||
hp = gethostbyaddr( (char *)&sin.sin_addr,
|
||||
sizeof( sin.sin_addr.s_addr ), AF_INET );
|
||||
}
|
||||
#else
|
||||
hp = gethostbyaddr( (char *)&sin.sin_addr,
|
||||
sizeof( sin.sin_addr.s_addr ), AF_INET );
|
||||
#endif
|
||||
if ( hp != NULL ) {
|
||||
if ( hp->h_name != NULL ) {
|
||||
return( strdup( hp->h_name ));
|
||||
}
|
||||
}
|
||||
|
||||
return( NULL );
|
||||
}
|
||||
#endif /* KERBEROS */
|
||||
|
||||
|
||||
#ifdef LDAP_REFERRALS
|
||||
/* for UNIX */
|
||||
struct selectinfo {
|
||||
fd_set si_readfds;
|
||||
fd_set si_writefds;
|
||||
fd_set si_use_readfds;
|
||||
fd_set si_use_writefds;
|
||||
};
|
||||
|
||||
|
||||
void
|
||||
mark_select_write( LDAP *ld, Sockbuf *sb )
|
||||
{
|
||||
struct selectinfo *sip;
|
||||
|
||||
sip = (struct selectinfo *)ld->ld_selectinfo;
|
||||
|
||||
if ( !FD_ISSET( sb->sb_sd, &sip->si_writefds ))
|
||||
FD_SET( sb->sb_sd, &sip->si_writefds );
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
mark_select_read( LDAP *ld, Sockbuf *sb )
|
||||
{
|
||||
struct selectinfo *sip;
|
||||
|
||||
sip = (struct selectinfo *)ld->ld_selectinfo;
|
||||
|
||||
if ( !FD_ISSET( sb->sb_sd, &sip->si_readfds ))
|
||||
FD_SET( sb->sb_sd, &sip->si_readfds );
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
mark_select_clear( LDAP *ld, Sockbuf *sb )
|
||||
{
|
||||
struct selectinfo *sip;
|
||||
|
||||
sip = (struct selectinfo *)ld->ld_selectinfo;
|
||||
|
||||
FD_CLR( sb->sb_sd, &sip->si_writefds );
|
||||
FD_CLR( sb->sb_sd, &sip->si_readfds );
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
is_write_ready( LDAP *ld, Sockbuf *sb )
|
||||
{
|
||||
struct selectinfo *sip;
|
||||
|
||||
sip = (struct selectinfo *)ld->ld_selectinfo;
|
||||
|
||||
return( FD_ISSET( sb->sb_sd, &sip->si_use_writefds ));
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
is_read_ready( LDAP *ld, Sockbuf *sb )
|
||||
{
|
||||
struct selectinfo *sip;
|
||||
|
||||
sip = (struct selectinfo *)ld->ld_selectinfo;
|
||||
|
||||
return( FD_ISSET( sb->sb_sd, &sip->si_use_readfds ));
|
||||
}
|
||||
|
||||
|
||||
void *
|
||||
new_select_info()
|
||||
{
|
||||
struct selectinfo *sip;
|
||||
|
||||
if (( sip = (struct selectinfo *)calloc( 1,
|
||||
sizeof( struct selectinfo ))) != NULL ) {
|
||||
FD_ZERO( &sip->si_readfds );
|
||||
FD_ZERO( &sip->si_writefds );
|
||||
}
|
||||
|
||||
return( (void *)sip );
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
free_select_info( void *sip )
|
||||
{
|
||||
free( sip );
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
do_ldap_select( LDAP *ld, struct timeval *timeout )
|
||||
{
|
||||
struct selectinfo *sip;
|
||||
static int tblsize;
|
||||
|
||||
Debug( LDAP_DEBUG_TRACE, "do_ldap_select\n", 0, 0, 0 );
|
||||
|
||||
if ( tblsize == 0 ) {
|
||||
#ifdef USE_SYSCONF
|
||||
tblsize = sysconf( _SC_OPEN_MAX );
|
||||
#else /* USE_SYSCONF */
|
||||
#ifdef WINSOCK
|
||||
tblsize = FD_SETSIZE;
|
||||
#else
|
||||
tblsize = getdtablesize();
|
||||
#endif
|
||||
#endif /* USE_SYSCONF */
|
||||
#ifdef FD_SETSIZE
|
||||
if( tblsize > FD_SETSIZE ) {
|
||||
tblsize = FD_SETSIZE;
|
||||
}
|
||||
#endif /* FD_SETSIZE*/
|
||||
}
|
||||
|
||||
sip = (struct selectinfo *)ld->ld_selectinfo;
|
||||
sip->si_use_readfds = sip->si_readfds;
|
||||
sip->si_use_writefds = sip->si_writefds;
|
||||
|
||||
return( select( tblsize, &sip->si_use_readfds, &sip->si_use_writefds,
|
||||
NULL, timeout ));
|
||||
}
|
||||
#endif /* LDAP_REFERRALS */
|
||||
|
|
@ -1,97 +0,0 @@
|
|||
#-----------------------------------------------------------------------------
|
||||
# Copyright (c) 1990 Regents of the University of Michigan.
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms are permitted
|
||||
# provided that this notice is preserved and that due credit is given
|
||||
# to the University of Michigan at Ann Arbor. The name of the University
|
||||
# may not be used to endorse or promote products derived from this
|
||||
# software without specific prior written permission. This software
|
||||
# is provided ``as is'' without express or implied warranty.
|
||||
#
|
||||
# LDAP server daemon makefile
|
||||
#
|
||||
#-----------------------------------------------------------------------------
|
||||
LDAPSRC = ../..
|
||||
HDIR = $(LDAPSRC)/include
|
||||
LDIR = $(LDAPSRC)/libraries
|
||||
VERSIONFILE = $(LDAPSRC)/build/version
|
||||
|
||||
SRCS = main.c detach.c setproctitle.c request.c bind.c result.c error.c \
|
||||
search.c util.c compare.c message.c add.c delete.c modrdn.c modify.c \
|
||||
abandon.c syntax.c association.c kerberos.c certificate.c
|
||||
OBJS = main.o detach.o setproctitle.o request.o bind.o result.o error.o \
|
||||
search.o util.o compare.o message.o add.o delete.o modrdn.o modify.o \
|
||||
abandon.o syntax.o association.o kerberos.o LDAP_tables.o \
|
||||
certificate.o
|
||||
|
||||
INCLUDES= -I. -I$(HDIR) $(ISODEINCLUDEFLAG) $(KRBINCLUDEFLAG)
|
||||
DEFINES = $(DEFS) $(SERVERDEFS)
|
||||
CFLAGS = $(INCLUDES) $(DEFINES) $(ACFLAGS)
|
||||
LDFLAGS = -L$(LDIR) $(ISODELIBFLAG) $(KRBLIBFLAG)
|
||||
LIBS = -llber $(ISODELIBS) $(KRBLIBS) $(ALIBS)
|
||||
|
||||
all: FORCE
|
||||
@if [ "$(HAVEISODE)" = "yes" ]; then \
|
||||
$(MAKE) $(MFLAGS) CC="$(CC)" ldapd; \
|
||||
else \
|
||||
echo "uncomment the HAVEISODE=yes line in the Make-common file to build ldapd"; \
|
||||
fi
|
||||
|
||||
|
||||
ldapd: version.o
|
||||
$(CC) $(ALDFLAGS) -o $@ $(OBJS) version.o $(LDFLAGS) $(LIBS)
|
||||
|
||||
sldapd: version.o
|
||||
$(CC) $(ALDFLAGS) -static -o $@ $(OBJS) version.o $(LDFLAGS) $(LIBS) -lresolv
|
||||
|
||||
version.c: $(OBJS) $(LDIR)/liblber/liblber.a
|
||||
$(RM) $@
|
||||
(u=$${USER-root} v=`$(CAT) $(VERSIONFILE)` d=`$(PWD)` h=`$(HOSTNAME)` \
|
||||
t=`$(DATE)`; $(SED) -e "s|%WHEN%|$${t}|" \
|
||||
-e "s|%WHOANDWHERE%|$${u}@$${h}:$${d}|" \
|
||||
-e "s|%VERSION%|$${v}|" \
|
||||
< Version.c > $@)
|
||||
|
||||
request.o: LDAP-types.h
|
||||
|
||||
LDAP_tables.c: ldap.py
|
||||
@if [ ! -z "$(PEPSY)" ]; then \
|
||||
$(PEPSY) -A ldap.py; \
|
||||
else \
|
||||
touch LDAP_tables.c LDAP-types.h; \
|
||||
fi
|
||||
|
||||
LDAP-types.h: LDAP_tables.c
|
||||
|
||||
install: FORCE
|
||||
@if [ "$(HAVEISODE)" = "yes" ]; then \
|
||||
$(MAKE) $(MFLAGS) CC="$(CC)" install-ldapd; \
|
||||
else \
|
||||
echo "uncomment the HAVEISODE=yes line in the Make-common file to build and install ldapd"; \
|
||||
fi
|
||||
|
||||
install-ldapd: $(LDAP_LIBEXECDIR) $(LDAP_LIBEXECDIR)/ldapd
|
||||
|
||||
$(LDAP_LIBEXECDIR)/ldapd: ldapd
|
||||
$(INSTALL) $(INSTALLFLAGS) -m 755 ldapd $(LDAP_LIBEXECDIR)
|
||||
|
||||
lint: FORCE
|
||||
$(LINT) $(INCLUDES) $(DEFINES) $(SRCS)
|
||||
|
||||
5lint: FORCE
|
||||
$(5LINT) $(INCLUDES) $(DEFINES) $(SRCS)
|
||||
|
||||
clean: FORCE
|
||||
$(RM) ldapd sldapd *.o core a.out version.c LDAP*
|
||||
|
||||
depend: FORCE
|
||||
@if [ ! -z "$(HAVEISODE)" ]; then \
|
||||
$(MKDEP) $(INCLUDES) $(DEFINES) $(SRCS); \
|
||||
else \
|
||||
echo "uncomment the HAVEISODE=yes line in the Make-common file to build ldapd"; \
|
||||
fi
|
||||
|
||||
links:
|
||||
@$(LN) .src/*.py .src/*.[ch] .
|
||||
|
||||
|
|
@ -1,176 +0,0 @@
|
|||
#-----------------------------------------------------------------------------
|
||||
# Copyright (c) 1995 Regents of the University of Michigan.
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms are permitted
|
||||
# provided that this notice is preserved and that due credit is given
|
||||
# to the University of Michigan at Ann Arbor. The name of the University
|
||||
# may not be used to endorse or promote products derived from this
|
||||
# software without specific prior written permission. This software
|
||||
# is provided ``as is'' without express or implied warranty.
|
||||
#
|
||||
# Stand alone LDAP server daemon makefile
|
||||
#
|
||||
#-----------------------------------------------------------------------------
|
||||
LDAPSRC = ../..
|
||||
HDIR = $(LDAPSRC)/include
|
||||
LDIR = $(LDAPSRC)/libraries
|
||||
VERSIONFILE = $(LDAPSRC)/build/version
|
||||
|
||||
SRCS = main.c daemon.c connection.c search.c filter.c add.c charray.c \
|
||||
attr.c entry.c config.c backend.c result.c operation.c \
|
||||
dn.c compare.c modify.c delete.c modrdn.c ch_malloc.c \
|
||||
value.c ava.c bind.c unbind.c abandon.c filterentry.c \
|
||||
phonetic.c acl.c str2filter.c aclparse.c init.c \
|
||||
detach.c strdup.c tempnam.c repl.c lock.c \
|
||||
schema.c schemaparse.c monitor.c configinfo.c \
|
||||
suffixalias.c
|
||||
OBJS = main.o daemon.o connection.o search.o filter.o add.o charray.o \
|
||||
attr.o entry.o config.o backend.o result.o operation.o \
|
||||
dn.o compare.o modify.o delete.o modrdn.o ch_malloc.o \
|
||||
value.o ava.o bind.o unbind.o abandon.o filterentry.o \
|
||||
phonetic.o acl.o str2filter.o aclparse.o init.o \
|
||||
detach.o strdup.o tempnam.o repl.o lock.o \
|
||||
schema.o schemaparse.o monitor.o configinfo.o \
|
||||
suffixalias.o
|
||||
|
||||
INCLUDES= -I. -I$(HDIR) $(KRBINCLUDEFLAG)
|
||||
DEFINES = $(DEFS) $(SERVERDEFS)
|
||||
CFLAGS = $(INCLUDES) $(THREADSINCLUDE) $(DEFINES) $(ACFLAGS) $(THREADS)
|
||||
LDFLAGS = -L$(LDIR) $(KRBLIBFLAG)
|
||||
LIBS = $(KRBLIBS) -llber -lldbm -lavl -llthread -lldif -llutil \
|
||||
$(REGEXLIB) $(THREADSLIB) \
|
||||
$(LDBMLIB) $(LDAP_CRYPT_LIB) $(LDAP_TCP_WRAPPERS_LIB) $(ALIBS)
|
||||
|
||||
all: FORCE
|
||||
@if [ -z "$(MAKESLAPD)" ]; then \
|
||||
echo "uncomment the MAKESLAPD line in Make-common to make slapd"; \
|
||||
exit 0; \
|
||||
else \
|
||||
echo; \
|
||||
$(MAKE) $(MFLAGS) backendslib; \
|
||||
$(MAKE) $(MFLAGS) slapd; \
|
||||
(cd tools; $(MAKE) $(MFLAGS) all); \
|
||||
fi
|
||||
|
||||
backendslib: FORCE
|
||||
@for i in back-*; do \
|
||||
if [ -d $$i ]; then \
|
||||
echo; echo " cd $$i; $(MAKE) $(MFLAGS) all"; \
|
||||
( cd $$i; $(MAKE) $(MFLAGS) all ); \
|
||||
fi; \
|
||||
done; \
|
||||
echo; \
|
||||
$(MAKE) $(MFLAGS) libbackends.a
|
||||
|
||||
libbackends.a: .backend
|
||||
@$(RM) -r tmp
|
||||
@$(MKDIR) tmp
|
||||
@-for i in back-*/*.a; do \
|
||||
( \
|
||||
cd tmp; \
|
||||
$(AR) x ../$$i; \
|
||||
pre=`echo $$i | sed -e 's/\/.*$$//' -e 's/back-//'`; \
|
||||
for j in *.o; do \
|
||||
mv $$j $${pre}$$j; \
|
||||
done; \
|
||||
$(AR) ruv libbackends.a *.o 2>&1 | grep -v truncated; \
|
||||
$(RM) *.o __.SYMDEF; \
|
||||
echo "added backend library $$i"; \
|
||||
); \
|
||||
done
|
||||
@mv -f tmp/libbackends.a ./libbackends.a
|
||||
@$(RM) -r tmp
|
||||
@if [ ! -z "$(RANLIB)" ]; then \
|
||||
$(RANLIB) libbackends.a; \
|
||||
fi
|
||||
@ls -l libbackends.a
|
||||
|
||||
slapd: version.o
|
||||
$(CC) $(ALDFLAGS) -o slapd $(OBJS) version.o libbackends.a \
|
||||
$(LDFLAGS) $(LIBS)
|
||||
slapd.pure: version.o
|
||||
purify $(CC) $(ALDFLAGS) -o slapd.pure $(OBJS) version.o libbackends.a \
|
||||
$(LDFLAGS) $(LIBS)
|
||||
|
||||
version.c: libbackends.a $(OBJS) $(LDIR)/liblber/liblber.a \
|
||||
$(LDIR)/libldbm/libldbm.a $(LDIR)/liblthread/liblthread.a \
|
||||
$(LDIR)/libavl/libavl.a $(LDIR)/libldif/libldif.a
|
||||
$(RM) $@
|
||||
(u=$${USER-root} v=`$(CAT) $(VERSIONFILE)` d=`$(PWD)` h=`$(HOSTNAME)` \
|
||||
t=`$(DATE)`; $(SED) -e "s|%WHEN%|$${t}|" \
|
||||
-e "s|%WHOANDWHERE%|$${u}@$${h}:$${d}|" \
|
||||
-e "s|%VERSION%|$${v}|" \
|
||||
< Version.c > $@)
|
||||
|
||||
install: all $(LDAP_LIBEXECDIR) $(LDAP_LIBEXECDIR)/slapd \
|
||||
$(LDAP_ETCDIR) $(LDAP_ETCDIR)/slapd.conf \
|
||||
$(LDAP_ETCDIR)/slapd.at.conf $(LDAP_ETCDIR)/slapd.oc.conf \
|
||||
install-tools
|
||||
|
||||
|
||||
$(LDAP_LIBEXECDIR)/slapd: slapd
|
||||
@-$(MKDIR) -p $(LDAP_LIBEXECDIR)
|
||||
$(INSTALL) $(INSTALLFLAGS) -m 755 slapd $(LDAP_LIBEXECDIR)
|
||||
|
||||
$(LDAP_ETCDIR)/slapd.conf: slapd.conf
|
||||
@-$(MKDIR) -p $(LDAP_ETCDIR)
|
||||
$(SED) -e 's;%ETCDIR%;$(LDAP_ETCDIR);' slapd.conf > /tmp/slapd.$$
|
||||
-$(MV) $(LDAP_ETCDIR)/slapd.conf $(LDAP_ETCDIR)/slapd.conf-
|
||||
$(INSTALL) $(INSTALLFLAGS) -m 644 /tmp/slapd.$$ $(LDAP_ETCDIR)/slapd.conf
|
||||
$(RM) -f /tmp/slapd.$$
|
||||
|
||||
$(LDAP_ETCDIR)/slapd.at.conf: slapd.at.conf
|
||||
@-$(MKDIR) -p $(LDAP_ETCDIR)
|
||||
-$(MV) $(LDAP_ETCDIR)/slapd.at.conf $(LDAP_ETCDIR)/slapd.at.conf-
|
||||
$(INSTALL) $(INSTALLFLAGS) -m 644 slapd.at.conf $(LDAP_ETCDIR)
|
||||
|
||||
$(LDAP_ETCDIR)/slapd.oc.conf: slapd.oc.conf
|
||||
@-$(MKDIR) -p $(LDAP_ETCDIR)
|
||||
-$(MV) $(LDAP_ETCDIR)/slapd.oc.conf $(LDAP_ETCDIR)/slapd.oc.conf-
|
||||
$(INSTALL) $(INSTALLFLAGS) -m 644 slapd.oc.conf $(LDAP_ETCDIR)
|
||||
|
||||
install-tools: FORCE
|
||||
@-$(MKDIR) -p $(LDAP_SBINDIR)
|
||||
(cd tools; $(MAKE) $(MFLAGS) install)
|
||||
|
||||
lint: FORCE
|
||||
$(LINT) $(INCLUDES) $(DEFINES) $(SRCS)
|
||||
|
||||
5lint: FORCE
|
||||
$(5LINT) $(INCLUDES) $(DEFINES) $(SRCS)
|
||||
|
||||
clean: FORCE
|
||||
@echo "making clean in `$(PWD)`"
|
||||
$(RM) slapd slapd.pure *.o core a.out version.c libbackends.a .backend
|
||||
@for i in back-* tools; do \
|
||||
if [ -d $$i -a $$i != "RCS" ]; then \
|
||||
echo; echo " cd $$i; $(MAKE) $(MFLAGS) clean"; \
|
||||
( cd $$i; $(MAKE) $(MFLAGS) clean ); \
|
||||
fi; \
|
||||
done
|
||||
|
||||
depend: FORCE
|
||||
$(MKDEP) $(INCLUDES) $(DEFINES) $(SRCS)
|
||||
@for i in back-* tools; do \
|
||||
if [ -d $$i -a $$i != "RCS" ]; then \
|
||||
echo; echo " cd $$i; $(MAKE) $(MFLAGS) depend"; \
|
||||
( cd $$i; $(MAKE) $(MFLAGS) depend ); \
|
||||
fi; \
|
||||
done
|
||||
|
||||
|
||||
links:
|
||||
@echo "making links in `$(PWD)`"
|
||||
@$(LN) .src/*.[ch] .src/*.conf .
|
||||
@touch .backend
|
||||
@for i in .src/back-* .src/tools; do \
|
||||
if [ -d $$i -a $$i != ".src/RCS" ]; then \
|
||||
d=`basename $$i`; \
|
||||
( $(MKDIR) $$d; cd $$d; $(LN) ../.src/$$d .src; \
|
||||
$(LN) ../.src/$$d/Make-template . ; \
|
||||
$(MAKE) $(MFLAGS) MKDIR="$(MKDIR)" LN="$(LN)" \
|
||||
-f Make-template links ) ; \
|
||||
fi; \
|
||||
done;
|
||||
|
||||
|
|
@ -1,74 +0,0 @@
|
|||
#-----------------------------------------------------------------------------
|
||||
# Copyright (c) 1995 Regents of the University of Michigan.
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms are permitted
|
||||
# provided that this notice is preserved and that due credit is given
|
||||
# to the University of Michigan at Ann Arbor. The name of the University
|
||||
# may not be used to endorse or promote products derived from this
|
||||
# software without specific prior written permission. This software
|
||||
# is provided ``as is'' without express or implied warranty.
|
||||
#
|
||||
# ldbm backend to stand-alone LDAP server makefile
|
||||
#
|
||||
#-----------------------------------------------------------------------------
|
||||
LDAPSRC = ../../..
|
||||
HDIR = $(LDAPSRC)/include
|
||||
LDIR = $(LDAPSRC)/libraries
|
||||
VERSIONFILE = $(LDAPSRC)/build/version
|
||||
|
||||
SRCS = idl.c add.c search.c cache.c dbcache.c dn2id.c id2entry.c \
|
||||
index.c id2children.c nextid.c abandon.c compare.c \
|
||||
modify.c modrdn.c delete.c init.c config.c bind.c attr.c \
|
||||
filterindex.c unbind.c kerberos.c close.c group.c \
|
||||
alias.c
|
||||
OBJS = idl.o add.o search.o cache.o dbcache.o dn2id.o id2entry.o \
|
||||
index.o id2children.o nextid.o abandon.o compare.o \
|
||||
modify.o modrdn.o delete.o init.o config.o bind.o attr.o \
|
||||
filterindex.o unbind.o kerberos.o close.o group.o \
|
||||
alias.o
|
||||
|
||||
INCLUDES= -I. -I.. -I$(HDIR) $(KRBINCLUDEFLAG)
|
||||
DEFINES = $(DEFS) $(SERVERDEFS) $(THREADS)
|
||||
CFLAGS = $(INCLUDES) $(THREADSINCLUDE) $(DEFINES) $(ACFLAGS)
|
||||
LDFLAGS = -L$(LDIR) $(KRBLIBFLAG) $(LDAP_CRYPT_LIB)
|
||||
|
||||
all: FORCE
|
||||
-@echo "$(SLAPD_BACKENDS)" | grep LDAP_LDBM 2>&1 > /dev/null; \
|
||||
if [ $$? = 0 ]; then \
|
||||
$(MAKE) $(MFLAGS) CC="$(CC)" libback-ldbm.a; \
|
||||
else \
|
||||
echo "Include -DLDAP_LDBM in SLAPD_BACKENDS in the"; \
|
||||
echo "Make-common file to build the ldbm backend"; \
|
||||
fi
|
||||
|
||||
libback-ldbm.a: version.o
|
||||
$(AR) ruv $@ $(OBJS) version.o
|
||||
@if [ ! -z "$(RANLIB)" ]; then \
|
||||
$(RANLIB) $@; \
|
||||
fi
|
||||
@touch ../.backend
|
||||
|
||||
version.c: $(OBJS)
|
||||
$(RM) $@
|
||||
(u=$${USER-root} v=`$(CAT) $(VERSIONFILE)` d=`$(PWD)` h=`$(HOSTNAME)` \
|
||||
t=`$(DATE)`; $(SED) -e "s|%WHEN%|$${t}|" \
|
||||
-e "s|%WHOANDWHERE%|$${u}@$${h}:$${d}|" \
|
||||
-e "s|%VERSION%|$${v}|" \
|
||||
< Version.c > $@)
|
||||
|
||||
lint: FORCE
|
||||
$(LINT) $(INCLUDES) $(DEFINES) $(SRCS)
|
||||
|
||||
5lint: FORCE
|
||||
$(5LINT) $(INCLUDES) $(DEFINES) $(SRCS)
|
||||
|
||||
clean: FORCE
|
||||
$(RM) libback-ldbm.a *.o core a.out version.c
|
||||
|
||||
depend: FORCE
|
||||
$(MKDEP) $(INCLUDES) $(DEFINES) $(SRCS)
|
||||
|
||||
links:
|
||||
@$(LN) .src/*.[ch] .
|
||||
|
||||
|
|
@ -1,68 +0,0 @@
|
|||
#-----------------------------------------------------------------------------
|
||||
# Copyright (c) 1995 Regents of the University of Michigan.
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms are permitted
|
||||
# provided that this notice is preserved and that due credit is given
|
||||
# to the University of Michigan at Ann Arbor. The name of the University
|
||||
# may not be used to endorse or promote products derived from this
|
||||
# software without specific prior written permission. This software
|
||||
# is provided ``as is'' without express or implied warranty.
|
||||
#
|
||||
# /etc/passwd file backend to stand-alone LDAP server makefile
|
||||
#
|
||||
#-----------------------------------------------------------------------------
|
||||
LDAPSRC = ../../..
|
||||
HDIR = $(LDAPSRC)/include
|
||||
LDIR = $(LDAPSRC)/libraries
|
||||
VERSIONFILE = $(LDAPSRC)/build/version
|
||||
|
||||
SRCS = search.c config.c
|
||||
OBJS = search.o config.o
|
||||
|
||||
INCLUDES= -I. -I.. -I$(HDIR)
|
||||
DEFINES = $(DEFS) $(THREADS)
|
||||
CFLAGS = $(INCLUDES) $(THREADSINCLUDE) $(DEFINES) $(ACFLAGS)
|
||||
|
||||
all: FORCE
|
||||
-@echo "$(SLAPD_BACKENDS)" | grep LDAP_PASSWD 2>&1 > /dev/null; \
|
||||
if [ $$? = 0 ]; then \
|
||||
$(MAKE) $(MFLAGS) CC="$(CC)" libback-passwd.a; \
|
||||
else \
|
||||
echo "Include -DLDAP_PASSWD in SLAPD_BACKENDS in the"; \
|
||||
echo "Make-common file to build the passwd backend"; \
|
||||
fi
|
||||
|
||||
|
||||
libback-passwd.a: version.o
|
||||
$(AR) ruv $@ $(OBJS) version.o
|
||||
@if [ ! -z "$(RANLIB)" ]; then \
|
||||
$(RANLIB) $@; \
|
||||
fi
|
||||
@touch ../.backend
|
||||
|
||||
version.c: $(OBJS)
|
||||
$(RM) $@
|
||||
(u=$${USER-root} v=`$(CAT) $(VERSIONFILE)` d=`$(PWD)` h=`$(HOSTNAME)` \
|
||||
t=`$(DATE)`; $(SED) -e "s|%WHEN%|$${t}|" \
|
||||
-e "s|%WHOANDWHERE%|$${u}@$${h}:$${d}|" \
|
||||
-e "s|%VERSION%|$${v}|" \
|
||||
< Version.c > $@)
|
||||
|
||||
install: FORCE
|
||||
|
||||
lint: FORCE
|
||||
$(LINT) $(INCLUDES) $(DEFINES) $(SRCS)
|
||||
|
||||
5lint: FORCE
|
||||
$(5LINT) $(INCLUDES) $(DEFINES) $(SRCS)
|
||||
|
||||
clean: FORCE
|
||||
$(RM) libback-passwd.a *.o core a.out version.c
|
||||
|
||||
depend: FORCE
|
||||
$(MKDEP) $(INCLUDES) $(DEFINES) $(SRCS)
|
||||
|
||||
links:
|
||||
@$(LN) .src/*.[ch] .
|
||||
|
||||
|
|
@ -1,70 +0,0 @@
|
|||
#-----------------------------------------------------------------------------
|
||||
# Copyright (c) 1995 Regents of the University of Michigan.
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms are permitted
|
||||
# provided that this notice is preserved and that due credit is given
|
||||
# to the University of Michigan at Ann Arbor. The name of the University
|
||||
# may not be used to endorse or promote products derived from this
|
||||
# software without specific prior written permission. This software
|
||||
# is provided ``as is'' without express or implied warranty.
|
||||
#
|
||||
# shell backend to stand-alone LDAP server makefile
|
||||
#
|
||||
#-----------------------------------------------------------------------------
|
||||
LDAPSRC = ../../..
|
||||
HDIR = $(LDAPSRC)/include
|
||||
LDIR = $(LDAPSRC)/libraries
|
||||
VERSIONFILE = $(LDAPSRC)/build/version
|
||||
|
||||
SRCS = init.c config.c fork.c search.c bind.c unbind.c add.c delete.c \
|
||||
modify.c modrdn.c compare.c abandon.c result.c
|
||||
OBJS = init.o config.o fork.o search.o bind.o unbind.o add.o delete.o \
|
||||
modify.o modrdn.o compare.o abandon.o result.o
|
||||
|
||||
INCLUDES= -I. -I.. -I$(HDIR)
|
||||
DEFINES = $(DEFS) $(THREADS)
|
||||
CFLAGS = $(INCLUDES) $(THREADSINCLUDE) $(DEFINES) $(ACFLAGS)
|
||||
|
||||
all: FORCE
|
||||
-@echo "$(SLAPD_BACKENDS)" | grep LDAP_SHELL 2>&1 > /dev/null; \
|
||||
if [ $$? = 0 ]; then \
|
||||
$(MAKE) $(MFLAGS) CC="$(CC)" libback-shell.a; \
|
||||
else \
|
||||
echo "Include -DLDAP_SHELL in SLAPD_BACKENDS in the"; \
|
||||
echo "Make-common file to build the shell backend"; \
|
||||
fi
|
||||
|
||||
|
||||
libback-shell.a: version.o
|
||||
$(AR) ruv $@ $(OBJS) version.o
|
||||
@if [ ! -z "$(RANLIB)" ]; then \
|
||||
$(RANLIB) $@; \
|
||||
fi
|
||||
@touch ../.backend
|
||||
|
||||
version.c: $(OBJS)
|
||||
$(RM) $@
|
||||
(u=$${USER-root} v=`$(CAT) $(VERSIONFILE)` d=`$(PWD)` h=`$(HOSTNAME)` \
|
||||
t=`$(DATE)`; $(SED) -e "s|%WHEN%|$${t}|" \
|
||||
-e "s|%WHOANDWHERE%|$${u}@$${h}:$${d}|" \
|
||||
-e "s|%VERSION%|$${v}|" \
|
||||
< Version.c > $@)
|
||||
|
||||
install: FORCE
|
||||
|
||||
lint: FORCE
|
||||
$(LINT) $(INCLUDES) $(DEFINES) $(SRCS)
|
||||
|
||||
5lint: FORCE
|
||||
$(5LINT) $(INCLUDES) $(DEFINES) $(SRCS)
|
||||
|
||||
clean: FORCE
|
||||
$(RM) libback-shell.a *.o core a.out version.c
|
||||
|
||||
depend: FORCE
|
||||
$(MKDEP) $(INCLUDES) $(DEFINES) $(SRCS)
|
||||
|
||||
links:
|
||||
@$(LN) .src/*.[ch] .
|
||||
|
||||
|
|
@ -1,173 +0,0 @@
|
|||
#-----------------------------------------------------------------------------
|
||||
# Copyright (c) 1995 Regents of the University of Michigan.
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms are permitted
|
||||
# provided that this notice is preserved and that due credit is given
|
||||
# to the University of Michigan at Ann Arbor. The name of the University
|
||||
# may not be used to endorse or promote products derived from this
|
||||
# software without specific prior written permission. This software
|
||||
# is provided ``as is'' without express or implied warranty.
|
||||
#
|
||||
# Stand alone LDAP server tools makefile
|
||||
#
|
||||
#-----------------------------------------------------------------------------
|
||||
LDAPSRC = ../../..
|
||||
HDIR = $(LDAPSRC)/include
|
||||
LDIR = $(LDAPSRC)/libraries
|
||||
VERSIONFILE = $(LDAPSRC)/build/version
|
||||
|
||||
EDB2LDIFSRCS = edb2ldif.c ldapsyntax.c
|
||||
EDB2LDIFOBJS = edb2ldif.o ldapsyntax.o ../strdup.o
|
||||
|
||||
OBJS2 = ../config.o ../ch_malloc.o ../backend.o ../charray.o \
|
||||
../aclparse.o ../schema.o ../result.o ../filterentry.o \
|
||||
../acl.o ../phonetic.o ../attr.o ../value.o ../entry.o \
|
||||
../dn.o ../filter.o ../str2filter.o ../ava.o ../init.o \
|
||||
../schemaparse.o ../strdup.o
|
||||
|
||||
INCLUDES= -I. -I$(HDIR) $(EXINCLUDES)
|
||||
DEFINES = $(DEFS) $(LDAP_CRYPT) $(SERVERDEFS) $(THREADS)
|
||||
CFLAGS = $(INCLUDES) $(DEFINES) $(ACFLAGS)
|
||||
LDFLAGS = -L$(LDIR) $(EXLDFLAGS)
|
||||
LIBS = -lldif -lldap -llber -lldbm -llutil -lavl $(LDBMLIB) $(EXLIBS) $(ALIBS)
|
||||
LIBS2 = -lldif -lldbm -llutil -lavl $(LDBMLIB) -llber $(KRBLIBFLAG) $(KRBLIBS) \
|
||||
-llthread $(THREADSLIB) $(ALIBS) $(LDAP_CRYPT_LIB)
|
||||
|
||||
all: build-edb2ldif ldif2index ldif2ldbm ldbmcat ldif2id2entry \
|
||||
ldif2id2children centipede ldbmtest ldif
|
||||
|
||||
build-edb2ldif: FORCE
|
||||
@if [ "$(HAVEISODE)" = "yes" ]; then \
|
||||
$(MAKE) $(MFLAGS) CC="$(CC)" EXINCLUDES="$(ISODEINCLUDEFLAG)" \
|
||||
EXLDFLAGS="$(ISODELIBFLAG)" EXLIBS="$(ISODELIBS)" edb2ldif; \
|
||||
else \
|
||||
echo "uncomment the HAVEISODE=yes line in the Make-common file to build edb2ldif"; \
|
||||
fi
|
||||
|
||||
edb2ldif: edb2-vers.o
|
||||
$(CC) $(ALDFLAGS) -o $@ $(EDB2LDIFOBJS) edb2-vers.o \
|
||||
$(LDFLAGS) $(LIBS)
|
||||
|
||||
edb2-vers.c: $(EDB2LDIFOBJS)
|
||||
$(RM) $@
|
||||
(u=$${USER-root} v=`$(CAT) $(VERSIONFILE)` d=`$(PWD)` h=`$(HOSTNAME)` \
|
||||
t=`$(DATE)`; $(SED) -e "s|%WHEN%|$${t}|" \
|
||||
-e "s|%WHOANDWHERE%|$${u}@$${h}:$${d}|" \
|
||||
-e "s|%VERSION%|$${v}|" \
|
||||
< Vers-edb2.c > $@)
|
||||
|
||||
build-chlog2replog: FORCE
|
||||
@if [ "$(HAVEISODE)" = "yes" ]; then \
|
||||
$(MAKE) $(MFLAGS) CC="$(CC)" EXINCLUDES="$(ISODEINCLUDEFLAG)" \
|
||||
EXLDFLAGS="$(ISODELIBFLAG)" EXLIBS="$(ISODELIBS)" chlog2replog; \
|
||||
else \
|
||||
echo "uncomment the HAVEISODE=yes line in the Make-common file to build chlog2replog"; \
|
||||
fi
|
||||
|
||||
chlog2replog: chlog2replog.o ../lock.o ../ch_malloc.o
|
||||
$(CC) $(ALDFLAGS) -o $@ chlog2replog.o ../lock.o ../ch_malloc.o \
|
||||
$(LDFLAGS) $(LIBS)
|
||||
|
||||
ldif2index: ldif2index.o ../libbackends.a $(OBJS2)
|
||||
$(CC) $(ALDFLAGS) -o $@ ldif2index.o $(OBJS2) \
|
||||
../libbackends.a $(LDFLAGS) $(LIBS2)
|
||||
|
||||
ldif2ldbm: ldif2ldbm.o ../libbackends.a $(OBJS2)
|
||||
$(CC) $(ALDFLAGS) -o $@ ldif2ldbm.o $(OBJS2) \
|
||||
../libbackends.a $(LDFLAGS) $(LIBS2)
|
||||
|
||||
ldif2id2entry: ldif2id2entry.o ../libbackends.a $(OBJS2)
|
||||
$(CC) $(ALDFLAGS) -o $@ ldif2id2entry.o $(OBJS2) \
|
||||
../libbackends.a $(LDFLAGS) $(LIBS2)
|
||||
|
||||
ldif2id2children: ldif2id2children.o ../libbackends.a $(OBJS2)
|
||||
$(CC) $(ALDFLAGS) -o $@ ldif2id2children.o $(OBJS2) \
|
||||
../libbackends.a $(LDFLAGS) $(LIBS2)
|
||||
|
||||
ldbmcat: ldbmcat.o
|
||||
$(CC) $(ALDFLAGS) -o $@ ldbmcat.o $(LDFLAGS) $(LIBS)
|
||||
|
||||
ldif: ldif.o
|
||||
$(CC) $(ALDFLAGS) -o $@ ldif.o $(LDFLAGS) $(LIBS) $(LIBS2)
|
||||
|
||||
centipede: centipede.o
|
||||
$(CC) $(ALDFLAGS) -o $@ centipede.o $(LDFLAGS) $(LIBS) \
|
||||
$(KRBLIBFLAG) $(KRBLIBS)
|
||||
|
||||
sizecount: sizecount.o ../phonetic.o ../ch_malloc.o
|
||||
$(CC) $(ALDFLAGS) -o $@ sizecount.o ../phonetic.o ../ch_malloc.o \
|
||||
$(LDFLAGS) $(LIBS) $(KRBLIBFLAG) $(KRBLIBS)
|
||||
|
||||
ldbmtest: ldbmtest.o ../libbackends.a $(OBJS2)
|
||||
$(CC) $(ALDFLAGS) -o ldbmtest ldbmtest.o $(OBJS2) \
|
||||
../libbackends.a $(LDFLAGS) $(LIBS2)
|
||||
|
||||
install: $(LDAP_SBINDIR) $(LDAP_SBINDIR)/edb2ldif $(LDAP_SBINDIR)/ldif2ldbm \
|
||||
$(LDAP_SBINDIR)/ldif2index $(LDAP_SBINDIR)/ldif2id2entry \
|
||||
$(LDAP_SBINDIR)/ldif2id2children $(LDAP_SBINDIR)/ldbmcat \
|
||||
$(LDAP_SBINDIR)/centipede $(LDAP_SBINDIR)/ldbmtest \
|
||||
$(LDAP_SBINDIR)/ldif
|
||||
|
||||
$(LDAP_SBINDIR)/edb2ldif: build-edb2ldif
|
||||
@if [ "$(HAVEISODE)" = "yes" ]; then \
|
||||
$(INSTALL) $(INSTALLFLAGS) -m 755 edb2ldif $(LDAP_SBINDIR); \
|
||||
else \
|
||||
exit 0; \
|
||||
fi
|
||||
|
||||
$(LDAP_SBINDIR)/chlog2replog: build-chlog2replog
|
||||
@if [ "$(HAVEISODE)" = "yes" ]; then \
|
||||
$(INSTALL) $(INSTALLFLAGS) -m 755 chlog2replog $(LDAP_SBINDIR); \
|
||||
else \
|
||||
exit 0; \
|
||||
fi
|
||||
|
||||
$(LDAP_SBINDIR)/ldif2ldbm: ldif2ldbm
|
||||
$(INSTALL) $(INSTALLFLAGS) -m 755 ldif2ldbm $(LDAP_SBINDIR)
|
||||
|
||||
$(LDAP_SBINDIR)/ldif2index: ldif2index
|
||||
$(INSTALL) $(INSTALLFLAGS) -m 755 ldif2index $(LDAP_SBINDIR)
|
||||
|
||||
$(LDAP_SBINDIR)/ldif2id2entry: ldif2id2entry
|
||||
$(INSTALL) $(INSTALLFLAGS) -m 755 ldif2id2entry $(LDAP_SBINDIR)
|
||||
|
||||
$(LDAP_SBINDIR)/ldif2id2children: ldif2id2children
|
||||
$(INSTALL) $(INSTALLFLAGS) -m 755 ldif2id2children $(LDAP_SBINDIR)
|
||||
|
||||
$(LDAP_SBINDIR)/ldbmcat: ldbmcat
|
||||
$(INSTALL) $(INSTALLFLAGS) -m 755 ldbmcat $(LDAP_SBINDIR)
|
||||
|
||||
$(LDAP_SBINDIR)/ldif: ldif
|
||||
$(INSTALL) $(INSTALLFLAGS) -m 755 ldif $(LDAP_SBINDIR)
|
||||
|
||||
$(LDAP_SBINDIR)/centipede: centipede
|
||||
$(INSTALL) $(INSTALLFLAGS) -m 755 centipede $(LDAP_SBINDIR)
|
||||
|
||||
$(LDAP_SBINDIR)/ldbmtest: ldbmtest
|
||||
$(INSTALL) $(INSTALLFLAGS) -m 755 ldbmtest $(LDAP_SBINDIR)
|
||||
|
||||
lint: FORCE
|
||||
$(LINT) $(INCLUDES) $(DEFINES) $(SRCS)
|
||||
|
||||
5lint: FORCE
|
||||
$(5LINT) $(INCLUDES) $(DEFINES) $(SRCS)
|
||||
|
||||
clean: FORCE
|
||||
@echo "making clean in `$(PWD)`"
|
||||
$(RM) edb2ldif ldif2index *.o core a.out edb2-vers.c \
|
||||
ldif2ldbm ldif2id2entry ldif2id2children ldbmcat ldif \
|
||||
centipede chlog2replog sizecount ldbmtest
|
||||
|
||||
depend: FORCE
|
||||
@if [ ! -z "$(HAVEISODE)" ]; then \
|
||||
DEPENDEXTRAS="$(ISODEINCLUDEFLAG) chlog2replog.c $(EDB2LDIFSRCS)"; \
|
||||
fi; \
|
||||
$(MKDEP) $(INCLUDES) $(DEFINES) $$DEPENDEXTRAS ldif2index.c \
|
||||
ldif2ldbm.c ldif2id2entry.c ldif2id2children.c ldbmcat.c \
|
||||
centipede.c sizecount.c ldbmtest.c ldif.c
|
||||
|
||||
links:
|
||||
@echo "making links in `$(PWD)`"
|
||||
@$(LN) .src/*.[ch] .
|
||||
|
||||
Loading…
Reference in a new issue