From bed979f9fca44b5437131e20c7719ad7c96da922 Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Wed, 21 Oct 1998 02:36:02 +0000 Subject: [PATCH] No longer supported. --- libraries/macintosh/README | 67 - libraries/macintosh/getopt.c | 104 -- libraries/macintosh/kerberos-macos.c | 80 - libraries/macintosh/macos-ip.c | 291 --- libraries/macintosh/macos.h | 32 - libraries/macintosh/strings.c | 90 - libraries/macintosh/tcp/AddressXlation.h | 200 -- libraries/macintosh/tcp/GetMyIPAddr.h | 46 - libraries/macintosh/tcp/MacTCPCommonTypes.h | 220 --- libraries/macintosh/tcp/MiscIPPB.h | 179 -- libraries/macintosh/tcp/TCPPB.h | 404 ---- libraries/macintosh/tcp/UDPPB.h | 190 -- libraries/macintosh/tcp/dnr.c | 529 ------ libraries/macintosh/tcp/tcp.c | 982 ---------- libraries/macintosh/tcp/tcp.h | 79 - libraries/msdos/README | 12 - libraries/msdos/README.CSA | 100 - libraries/msdos/README.NFS | 55 - libraries/msdos/README.WSA | 228 --- libraries/msdos/lp.c | 265 --- libraries/msdos/makefile.msc | 78 - libraries/msdos/makefile.nfs | 60 - libraries/msdos/makelber.msc | 58 - libraries/msdos/makelber.nfs | 50 - libraries/msdos/makeldap.msc | 92 - libraries/msdos/makeldap.nfs | 97 - libraries/msdos/makeud.msc | 76 - libraries/msdos/msdos.c | 84 - libraries/msdos/msdos.h | 52 - libraries/msdos/opendos.c | 393 ---- libraries/msdos/protoud.h | 28 - libraries/msdos/winsock/include/file.h | 4 - libraries/msdos/winsock/include/filio.h | 4 - libraries/msdos/winsock/include/in.h | 4 - libraries/msdos/winsock/include/ioctl.h | 4 - libraries/msdos/winsock/include/krb/des.h | 63 - libraries/msdos/winsock/include/krb/krb.h | 504 ----- .../winsock/include/krb/mit/arpa/nameser.h | 257 --- .../msdos/winsock/include/krb/mit/conf-pc.h | 80 - .../msdos/winsock/include/krb/mit/conf.h | 81 - .../msdos/winsock/include/krb/mit/hesiod.h | 113 -- .../msdos/winsock/include/krb/mit/lsh_pwd.h | 56 - .../msdos/winsock/include/krb/mit/mit_copy.h | 22 - .../msdos/winsock/include/krb/mit/osconf.h | 63 - .../msdos/winsock/include/krb/mit/resolv.h | 144 -- .../msdos/winsock/include/krb/mit/wshelper.h | 62 - .../msdos/winsock/include/net/_sys/filio.h | 4 - .../msdos/winsock/include/net/_sys/ioctl.h | 4 - libraries/msdos/winsock/include/net/netdb.h | 4 - libraries/msdos/winsock/include/param.h | 4 - libraries/msdos/winsock/include/select.h | 4 - libraries/msdos/winsock/include/socket.h | 4 - libraries/msdos/winsock/include/time.h | 4 - libraries/msdos/winsock/include/wsa.h | 132 -- libraries/msdos/winsock/include/wsa/errno.c | 21 - libraries/msdos/winsock/include/wsa/errno.rc | 57 - .../msdos/winsock/include/wsa/winsock.def | 84 - libraries/msdos/winsock/include/wsa/winsock.h | 906 --------- libraries/msdos/winsock/kerberos.c | 119 -- libraries/msdos/winsock/ldap32.def | 166 -- libraries/msdos/winsock/ldap32.mak | 1632 ----------------- libraries/msdos/winsock/ldap32.mdp | Bin 43520 -> 0 bytes libraries/msdos/winsock/libldap.def | 165 -- libraries/msdos/winsock/libldap.mak | 667 ------- libraries/msdos/winsock/libldap.rc | 40 - libraries/msdos/winsock/ltest/console.c | 257 --- libraries/msdos/winsock/ltest/console.h | 19 - libraries/msdos/winsock/ltest/inpdlg.dlg | 14 - libraries/msdos/winsock/ltest/inpdlg.h | 1 - libraries/msdos/winsock/ltest/ltest.def | 9 - libraries/msdos/winsock/ltest/ltest.mak | 140 -- libraries/msdos/winsock/ltest/ltest.rc | 22 - libraries/msdos/winsock/ltest/ltest32.mak | 348 ---- libraries/msdos/winsock/ltest/ltest32.mdp | Bin 37376 -> 0 bytes libraries/msdos/winsock/ltest/textwind.c | 130 -- libraries/msdos/winsock/ltest/textwind.h | 13 - libraries/msdos/winsock/makefile | 680 ------- libraries/msdos/winsock/openwsa.c | 133 -- libraries/msdos/winsock/setupwsa.bat | 69 - libraries/msdos/winsock/unsetupwsa.bat | 77 - libraries/msdos/winsock/winkit/readme.txt | 182 -- libraries/msdos/winsock/winkit/windowskit.cmd | 1 - libraries/msdos/winsock/winkit/windowskit.mak | 172 -- libraries/msdos/winsock/wsa.c | 91 - libraries/msdos/winsock/wsa/errno.c | 21 - libraries/msdos/winsock/wsa/errno.rc | 57 - libraries/msdos/winsock/wsa/winsock.def | 84 - libraries/msdos/winsock/wsa/winsock.h | 826 --------- libraries/msdos/winsock/wsockip.c | 467 ----- libraries/vms/README.VMS | 16 - libraries/vms/getopt.c | 106 -- libraries/vms/strings.c | 97 - libraries/vms/ucx_select.h | 28 - 93 files changed, 14759 deletions(-) delete mode 100644 libraries/macintosh/README delete mode 100644 libraries/macintosh/getopt.c delete mode 100644 libraries/macintosh/kerberos-macos.c delete mode 100644 libraries/macintosh/macos-ip.c delete mode 100644 libraries/macintosh/macos.h delete mode 100644 libraries/macintosh/strings.c delete mode 100644 libraries/macintosh/tcp/AddressXlation.h delete mode 100644 libraries/macintosh/tcp/GetMyIPAddr.h delete mode 100644 libraries/macintosh/tcp/MacTCPCommonTypes.h delete mode 100644 libraries/macintosh/tcp/MiscIPPB.h delete mode 100644 libraries/macintosh/tcp/TCPPB.h delete mode 100644 libraries/macintosh/tcp/UDPPB.h delete mode 100644 libraries/macintosh/tcp/dnr.c delete mode 100644 libraries/macintosh/tcp/tcp.c delete mode 100644 libraries/macintosh/tcp/tcp.h delete mode 100644 libraries/msdos/README delete mode 100644 libraries/msdos/README.CSA delete mode 100644 libraries/msdos/README.NFS delete mode 100644 libraries/msdos/README.WSA delete mode 100644 libraries/msdos/lp.c delete mode 100644 libraries/msdos/makefile.msc delete mode 100644 libraries/msdos/makefile.nfs delete mode 100644 libraries/msdos/makelber.msc delete mode 100644 libraries/msdos/makelber.nfs delete mode 100644 libraries/msdos/makeldap.msc delete mode 100644 libraries/msdos/makeldap.nfs delete mode 100644 libraries/msdos/makeud.msc delete mode 100644 libraries/msdos/msdos.c delete mode 100644 libraries/msdos/msdos.h delete mode 100644 libraries/msdos/opendos.c delete mode 100644 libraries/msdos/protoud.h delete mode 100644 libraries/msdos/winsock/include/file.h delete mode 100644 libraries/msdos/winsock/include/filio.h delete mode 100644 libraries/msdos/winsock/include/in.h delete mode 100644 libraries/msdos/winsock/include/ioctl.h delete mode 100644 libraries/msdos/winsock/include/krb/des.h delete mode 100644 libraries/msdos/winsock/include/krb/krb.h delete mode 100644 libraries/msdos/winsock/include/krb/mit/arpa/nameser.h delete mode 100644 libraries/msdos/winsock/include/krb/mit/conf-pc.h delete mode 100644 libraries/msdos/winsock/include/krb/mit/conf.h delete mode 100644 libraries/msdos/winsock/include/krb/mit/hesiod.h delete mode 100644 libraries/msdos/winsock/include/krb/mit/lsh_pwd.h delete mode 100644 libraries/msdos/winsock/include/krb/mit/mit_copy.h delete mode 100644 libraries/msdos/winsock/include/krb/mit/osconf.h delete mode 100644 libraries/msdos/winsock/include/krb/mit/resolv.h delete mode 100644 libraries/msdos/winsock/include/krb/mit/wshelper.h delete mode 100644 libraries/msdos/winsock/include/net/_sys/filio.h delete mode 100644 libraries/msdos/winsock/include/net/_sys/ioctl.h delete mode 100644 libraries/msdos/winsock/include/net/netdb.h delete mode 100644 libraries/msdos/winsock/include/param.h delete mode 100644 libraries/msdos/winsock/include/select.h delete mode 100644 libraries/msdos/winsock/include/socket.h delete mode 100644 libraries/msdos/winsock/include/time.h delete mode 100644 libraries/msdos/winsock/include/wsa.h delete mode 100644 libraries/msdos/winsock/include/wsa/errno.c delete mode 100644 libraries/msdos/winsock/include/wsa/errno.rc delete mode 100644 libraries/msdos/winsock/include/wsa/winsock.def delete mode 100644 libraries/msdos/winsock/include/wsa/winsock.h delete mode 100644 libraries/msdos/winsock/kerberos.c delete mode 100644 libraries/msdos/winsock/ldap32.def delete mode 100644 libraries/msdos/winsock/ldap32.mak delete mode 100644 libraries/msdos/winsock/ldap32.mdp delete mode 100644 libraries/msdos/winsock/libldap.def delete mode 100644 libraries/msdos/winsock/libldap.mak delete mode 100644 libraries/msdos/winsock/libldap.rc delete mode 100644 libraries/msdos/winsock/ltest/console.c delete mode 100644 libraries/msdos/winsock/ltest/console.h delete mode 100644 libraries/msdos/winsock/ltest/inpdlg.dlg delete mode 100644 libraries/msdos/winsock/ltest/inpdlg.h delete mode 100644 libraries/msdos/winsock/ltest/ltest.def delete mode 100644 libraries/msdos/winsock/ltest/ltest.mak delete mode 100644 libraries/msdos/winsock/ltest/ltest.rc delete mode 100644 libraries/msdos/winsock/ltest/ltest32.mak delete mode 100644 libraries/msdos/winsock/ltest/ltest32.mdp delete mode 100644 libraries/msdos/winsock/ltest/textwind.c delete mode 100644 libraries/msdos/winsock/ltest/textwind.h delete mode 100644 libraries/msdos/winsock/makefile delete mode 100644 libraries/msdos/winsock/openwsa.c delete mode 100644 libraries/msdos/winsock/setupwsa.bat delete mode 100644 libraries/msdos/winsock/unsetupwsa.bat delete mode 100644 libraries/msdos/winsock/winkit/readme.txt delete mode 100644 libraries/msdos/winsock/winkit/windowskit.cmd delete mode 100644 libraries/msdos/winsock/winkit/windowskit.mak delete mode 100644 libraries/msdos/winsock/wsa.c delete mode 100644 libraries/msdos/winsock/wsa/errno.c delete mode 100644 libraries/msdos/winsock/wsa/errno.rc delete mode 100644 libraries/msdos/winsock/wsa/winsock.def delete mode 100644 libraries/msdos/winsock/wsa/winsock.h delete mode 100644 libraries/msdos/winsock/wsockip.c delete mode 100644 libraries/vms/README.VMS delete mode 100644 libraries/vms/getopt.c delete mode 100644 libraries/vms/strings.c delete mode 100644 libraries/vms/ucx_select.h diff --git a/libraries/macintosh/README b/libraries/macintosh/README deleted file mode 100644 index ac5ceb9cdb..0000000000 --- a/libraries/macintosh/README +++ /dev/null @@ -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 diff --git a/libraries/macintosh/getopt.c b/libraries/macintosh/getopt.c deleted file mode 100644 index 25e5d0baf0..0000000000 --- a/libraries/macintosh/getopt.c +++ /dev/null @@ -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 -#include -#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 */ -} diff --git a/libraries/macintosh/kerberos-macos.c b/libraries/macintosh/kerberos-macos.c deleted file mode 100644 index ee9c31c6b1..0000000000 --- a/libraries/macintosh/kerberos-macos.c +++ /dev/null @@ -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 -#include -#include -#ifdef THINK_C -#include -#else /* THINK_C */ -#include -#endif /* THINK_C */ -#ifdef AUTHMAN -#include -#include -#include "authLibrary.h" -#include "ldap-int.h" - -/* - * get_kerberosv4_credentials - obtain kerberos v4 credentials for ldap. - */ - -/* ARGSUSED */ -char * -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 diff --git a/libraries/macintosh/macos-ip.c b/libraries/macintosh/macos-ip.c deleted file mode 100644 index 3a6a1805c2..0000000000 --- a/libraries/macintosh/macos-ip.c +++ /dev/null @@ -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 -#include -#include -#include -#include "macos.h" -#include "lber.h" -#include "ldap.h" -#include "ldap-int.h" - -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 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, "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 -close_connection( Sockbuf *sb ) -{ - tcpclose( (tcpstream *)sb->sb_sd ); -} - - -#ifdef KERBEROS -char * -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 -mark_select_read( LDAP *ld, Sockbuf *sb ) -{ - struct selectinfo *sip; - struct tcpstreaminfo *tcpsip; - short i; - - Debug( LDAP_DEBUG_TRACE, "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 -mark_select_clear( LDAP *ld, Sockbuf *sb ) -{ - struct selectinfo *sip; - short i; - - Debug( LDAP_DEBUG_TRACE, "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 -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, "is_read_ready: stream %x READY\n", - (tcpstream *)sb->sb_sd, 0, 0 ); - } else { - Debug( LDAP_DEBUG_TRACE, "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, "is_read_ready: stream %x: NOT FOUND\n", (tcpstream *)sb->sb_sd, 0, 0 ); - return( 0 ); -} - - -void * -new_select_info() -{ - return( (void *)calloc( 1, sizeof( struct selectinfo ))); -} - - -void -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 */ diff --git a/libraries/macintosh/macos.h b/libraries/macintosh/macos.h deleted file mode 100644 index d765413c34..0000000000 --- a/libraries/macintosh/macos.h +++ /dev/null @@ -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 -#else /* macintosh */ /* IUMagIDString declared in Packages.h under ThinkC */ -#include -#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 /* 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" diff --git a/libraries/macintosh/strings.c b/libraries/macintosh/strings.c deleted file mode 100644 index 5b9044111f..0000000000 --- a/libraries/macintosh/strings.c +++ /dev/null @@ -1,90 +0,0 @@ -/* - * strings.c - */ -#include -#include -#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 ); -} diff --git a/libraries/macintosh/tcp/AddressXlation.h b/libraries/macintosh/tcp/AddressXlation.h deleted file mode 100644 index 8157cc571a..0000000000 --- a/libraries/macintosh/tcp/AddressXlation.h +++ /dev/null @@ -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 - diff --git a/libraries/macintosh/tcp/GetMyIPAddr.h b/libraries/macintosh/tcp/GetMyIPAddr.h deleted file mode 100644 index 253cdf6939..0000000000 --- a/libraries/macintosh/tcp/GetMyIPAddr.h +++ /dev/null @@ -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 -#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 - diff --git a/libraries/macintosh/tcp/MacTCPCommonTypes.h b/libraries/macintosh/tcp/MacTCPCommonTypes.h deleted file mode 100644 index f806fdcc93..0000000000 --- a/libraries/macintosh/tcp/MacTCPCommonTypes.h +++ /dev/null @@ -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 -#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 - diff --git a/libraries/macintosh/tcp/MiscIPPB.h b/libraries/macintosh/tcp/MiscIPPB.h deleted file mode 100644 index 28a29833b3..0000000000 --- a/libraries/macintosh/tcp/MiscIPPB.h +++ /dev/null @@ -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 -#endif - -#ifndef __APPLETALK__ -#include -#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 - diff --git a/libraries/macintosh/tcp/TCPPB.h b/libraries/macintosh/tcp/TCPPB.h deleted file mode 100644 index ddb6fa0697..0000000000 --- a/libraries/macintosh/tcp/TCPPB.h +++ /dev/null @@ -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 -#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 - diff --git a/libraries/macintosh/tcp/UDPPB.h b/libraries/macintosh/tcp/UDPPB.h deleted file mode 100644 index f8c7bbdfe5..0000000000 --- a/libraries/macintosh/tcp/UDPPB.h +++ /dev/null @@ -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 -#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 - diff --git a/libraries/macintosh/tcp/dnr.c b/libraries/macintosh/tcp/dnr.c deleted file mode 100644 index 47ea30ab86..0000000000 --- a/libraries/macintosh/tcp/dnr.c +++ /dev/null @@ -1,529 +0,0 @@ -/* - DNR.c - DNR library for MPW - - © Copyright 1988 by Apple Computer. All rights reserved - -*/ - -#define MPW3.0 - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#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)); -} diff --git a/libraries/macintosh/tcp/tcp.c b/libraries/macintosh/tcp/tcp.c deleted file mode 100644 index 80d0878cf4..0000000000 --- a/libraries/macintosh/tcp/tcp.c +++ /dev/null @@ -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 -#include /* to get SystemTask() */ -#include -#include -#include - -/* - * 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 ); -} diff --git a/libraries/macintosh/tcp/tcp.h b/libraries/macintosh/tcp/tcp.h deleted file mode 100644 index 0c7b8e44d2..0000000000 --- a/libraries/macintosh/tcp/tcp.h +++ /dev/null @@ -1,79 +0,0 @@ -/* - * tcp.h interface to MCS's TCP routines - */ - -#include -#ifdef SUPPORT_OPENTRANSPORT -#include -#include -#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 */ diff --git a/libraries/msdos/README b/libraries/msdos/README deleted file mode 100644 index 95520174ce..0000000000 --- a/libraries/msdos/README +++ /dev/null @@ -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 diff --git a/libraries/msdos/README.CSA b/libraries/msdos/README.CSA deleted file mode 100644 index 0b005394f8..0000000000 --- a/libraries/msdos/README.CSA +++ /dev/null @@ -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 " 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 diff --git a/libraries/msdos/README.NFS b/libraries/msdos/README.NFS deleted file mode 100644 index 0965a8b168..0000000000 --- a/libraries/msdos/README.NFS +++ /dev/null @@ -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) diff --git a/libraries/msdos/README.WSA b/libraries/msdos/README.WSA deleted file mode 100644 index 3e8d75fc84..0000000000 --- a/libraries/msdos/README.WSA +++ /dev/null @@ -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 diff --git a/libraries/msdos/lp.c b/libraries/msdos/lp.c deleted file mode 100644 index 85551d442b..0000000000 --- a/libraries/msdos/lp.c +++ /dev/null @@ -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 -#include -#include -#include -#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 */ diff --git a/libraries/msdos/makefile.msc b/libraries/msdos/makefile.msc deleted file mode 100644 index f70f03b730..0000000000 --- a/libraries/msdos/makefile.msc +++ /dev/null @@ -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 .. diff --git a/libraries/msdos/makefile.nfs b/libraries/msdos/makefile.nfs deleted file mode 100644 index ae827f2a1a..0000000000 --- a/libraries/msdos/makefile.nfs +++ /dev/null @@ -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 .. diff --git a/libraries/msdos/makelber.msc b/libraries/msdos/makelber.msc deleted file mode 100644 index ae5bf671c2..0000000000 --- a/libraries/msdos/makelber.msc +++ /dev/null @@ -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 diff --git a/libraries/msdos/makelber.nfs b/libraries/msdos/makelber.nfs deleted file mode 100644 index f0025a6440..0000000000 --- a/libraries/msdos/makelber.nfs +++ /dev/null @@ -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 diff --git a/libraries/msdos/makeldap.msc b/libraries/msdos/makeldap.msc deleted file mode 100644 index 1d068974da..0000000000 --- a/libraries/msdos/makeldap.msc +++ /dev/null @@ -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 diff --git a/libraries/msdos/makeldap.nfs b/libraries/msdos/makeldap.nfs deleted file mode 100644 index 939264b5d5..0000000000 --- a/libraries/msdos/makeldap.nfs +++ /dev/null @@ -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 diff --git a/libraries/msdos/makeud.msc b/libraries/msdos/makeud.msc deleted file mode 100644 index dfa1197966..0000000000 --- a/libraries/msdos/makeud.msc +++ /dev/null @@ -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 - diff --git a/libraries/msdos/msdos.c b/libraries/msdos/msdos.c deleted file mode 100644 index ecfc957e95..0000000000 --- a/libraries/msdos/msdos.c +++ /dev/null @@ -1,84 +0,0 @@ -#ifndef PCNFS -#include -#include -#include -#include -#include -#include -#include -#define ffblk find_t -#define ff_name name -#include -#include -#include - -#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 */ diff --git a/libraries/msdos/msdos.h b/libraries/msdos/msdos.h deleted file mode 100644 index b670463111..0000000000 --- a/libraries/msdos/msdos.h +++ /dev/null @@ -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 -#include -#include -#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 - -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) diff --git a/libraries/msdos/opendos.c b/libraries/msdos/opendos.c deleted file mode 100644 index 68752dbdfa..0000000000 --- a/libraries/msdos/opendos.c +++ /dev/null @@ -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 -#include -#include -#ifdef PCNFS -#include -#include -#include -#include -#include -#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 -#include -#endif STANDALONE - -#include - -#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 */ diff --git a/libraries/msdos/protoud.h b/libraries/msdos/protoud.h deleted file mode 100644 index d78f5b7bd6..0000000000 --- a/libraries/msdos/protoud.h +++ /dev/null @@ -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); diff --git a/libraries/msdos/winsock/include/file.h b/libraries/msdos/winsock/include/file.h deleted file mode 100644 index cead0808d2..0000000000 --- a/libraries/msdos/winsock/include/file.h +++ /dev/null @@ -1,4 +0,0 @@ -/* - * This file is intentionally empty. Some compilers require the presence of - * an include file, even if the "#ifdef"s exclude it from actual use. PTUI ! - */ diff --git a/libraries/msdos/winsock/include/filio.h b/libraries/msdos/winsock/include/filio.h deleted file mode 100644 index cead0808d2..0000000000 --- a/libraries/msdos/winsock/include/filio.h +++ /dev/null @@ -1,4 +0,0 @@ -/* - * This file is intentionally empty. Some compilers require the presence of - * an include file, even if the "#ifdef"s exclude it from actual use. PTUI ! - */ diff --git a/libraries/msdos/winsock/include/in.h b/libraries/msdos/winsock/include/in.h deleted file mode 100644 index cead0808d2..0000000000 --- a/libraries/msdos/winsock/include/in.h +++ /dev/null @@ -1,4 +0,0 @@ -/* - * This file is intentionally empty. Some compilers require the presence of - * an include file, even if the "#ifdef"s exclude it from actual use. PTUI ! - */ diff --git a/libraries/msdos/winsock/include/ioctl.h b/libraries/msdos/winsock/include/ioctl.h deleted file mode 100644 index cead0808d2..0000000000 --- a/libraries/msdos/winsock/include/ioctl.h +++ /dev/null @@ -1,4 +0,0 @@ -/* - * This file is intentionally empty. Some compilers require the presence of - * an include file, even if the "#ifdef"s exclude it from actual use. PTUI ! - */ diff --git a/libraries/msdos/winsock/include/krb/des.h b/libraries/msdos/winsock/include/krb/des.h deleted file mode 100644 index 58699c59dc..0000000000 --- a/libraries/msdos/winsock/include/krb/des.h +++ /dev/null @@ -1,63 +0,0 @@ -/* - * $Source: Q:/SRC/KRB/MIT/ORIGINAL/INCLUDE/RCS/DES.H $ - * $Author: shabby $ - * $Header: Q:/SRC/KRB/MIT/ORIGINAL/INCLUDE/RCS/DES.H 1.3 1994/08/31 07:02:28 shabby Exp $ - * - * Copyright 1987, 1988 by the Massachusetts Institute of Technology. - * - * For copying and distribution information, please see the file - * . - * - * Include file for the Data Encryption Standard library. - */ - -/* only do the whole thing once */ -#ifndef DES_DEFS -#define DES_DEFS - -#include - -typedef unsigned char des_cblock[8]; /* crypto-block size */ -/* Key schedule */ -typedef struct des_ks_struct { des_cblock _; } des_key_schedule[16]; - -#define DES_KEY_SZ (sizeof(des_cblock)) -#define DES_ENCRYPT 1 -#define DES_DECRYPT 0 - -#ifndef NCOMPAT -#define C_Block des_cblock -#define Key_schedule des_key_schedule -#define ENCRYPT DES_ENCRYPT -#define DECRYPT DES_DECRYPT -#define KEY_SZ DES_KEY_SZ -#define string_to_key des_string_to_key -#define read_pw_string des_read_pw_string -#define random_key des_random_key -#define pcbc_encrypt des_pcbc_encrypt -#define key_sched des_key_sched -#define cbc_encrypt des_cbc_encrypt -#define cbc_cksum des_cbc_cksum -#define C_Block_print des_cblock_print -#define quad_cksum des_quad_cksum -typedef struct des_ks_struct bit_64; -#endif - -#define des_cblock_print(x) des_cblock_print_file(x, stdout) - -int des_check_key_parity(des_cblock); -int des_is_weak_key(des_cblock); - -/* Function prototypes */ -int des_key_sched(des_cblock,des_key_schedule); -int des_ecb_encrypt(unsigned long*,unsigned long*,des_key_schedule,int); -int des_pcbc_encrypt(des_cblock*,des_cblock*,long,des_key_schedule, - des_cblock*,int); - -unsigned long des_cbc_cksum(des_cblock*,des_cblock*,long, - des_key_schedule,des_cblock*); - -int des_is_weak_key(des_cblock); -void des_fixup_key_parity(des_cblock); -int des_check_key_parity(des_cblock); -#endif /* DES_DEFS */ diff --git a/libraries/msdos/winsock/include/krb/krb.h b/libraries/msdos/winsock/include/krb/krb.h deleted file mode 100644 index d9e2b178a4..0000000000 --- a/libraries/msdos/winsock/include/krb/krb.h +++ /dev/null @@ -1,504 +0,0 @@ -/* - * $Source: Q:/SRC/KRB/MIT/ORIGINAL/RCS/KRB.H $ - * $Author: pbh $ - * $Header: Q:/SRC/KRB/MIT/ORIGINAL/RCS/KRB.H 1.5 1994/09/08 22:47:00 pbh Exp $ - * - * Copyright 1987, 1988 by the Massachusetts Institute of Technology. - * - * For copying and distribution information, please see the file - * . - * - * Include file for the Kerberos library. - */ - -/* Only one time, please */ -#ifndef KRB_DEFS -#define KRB_DEFS - -#include -#include - -/* Need some defs from des.h */ -#include - -/* Text describing error codes */ -#define MAX_KRB_ERRORS 256 -#ifndef WINDOWS -extern char *krb_err_txt[MAX_KRB_ERRORS]; -#else -extern char FAR *krb_err_txt[MAX_KRB_ERRORS]; -#endif - - -/* These are not defined for at least SunOS 3.3 and Ultrix 2.2 */ -#if defined(ULTRIX022) || (defined(SunOS) && SunOS < 40) -#define FD_ZERO(p) ((p)->fds_bits[0] = 0) -#define FD_SET(n, p) ((p)->fds_bits[0] |= (1 << (n))) -#define FD_ISSET(n, p) ((p)->fds_bits[0] & (1 << (n))) -#endif /* ULTRIX022 || SunOS */ - -/* General definitions */ -#define KSUCCESS 0 -#define KFAILURE 255 - -#ifdef NO_UIDGID_T -typedef unsigned short uid_t; -typedef unsigned short gid_t; -#endif /* NO_UIDGID_T */ - -/* - * Kerberos specific definitions - * - * KRBLOG is the log file for the kerberos master server. KRB_CONF is - * the configuration file where different host machines running master - * and slave servers can be found. KRB_MASTER is the name of the - * machine with the master database. The admin_server runs on this - * machine, and all changes to the db (as opposed to read-only - * requests, which can go to slaves) must go to it. KRB_HOST is the - * default machine * when looking for a kerberos slave server. Other - * possibilities are * in the KRB_CONF file. KRB_REALM is the name of - * the realm. - */ - -#ifdef notdef -this is server - only, does not belong here; -#define KRBLOG "/kerberos/kerberos.log" -are these used anyplace '?'; -#define VX_KRB_HSTFILE "/etc/krbhst" -#define PC_KRB_HSTFILE "\\kerberos\\krbhst" -#endif -#ifdef IBMPC -#define KRB_CONF "%s\\kerb\\krb.con" -#define KRB_RLM_TRANS "%s\\KERB\\krbrealm.con" -#else -#define KRB_CONF "/etc/krb.conf" -#define KRB_RLM_TRANS "/etc/krb.realms" -#endif -#define KRB_MASTER "kerberos.mit.edu" -#define KRB_REALM "ATHENA.MIT.EDU" -#define KRB_HOST KRB_MASTER - -/* The maximum sizes for aname, realm, sname, and instance +1 */ -#define ANAME_SZ 40 -#define REALM_SZ 40 -#define SNAME_SZ 40 -#define INST_SZ 40 -/* include space for '.' and '@' */ -#define MAX_K_NAME_SZ (ANAME_SZ + INST_SZ + REALM_SZ + 2) -#define KKEY_SZ 100 -#define VERSION_SZ 1 -#define MSG_TYPE_SZ 1 -#define DATE_SZ 26 /* RTI date output */ - -#define MAX_HSTNM 100 - -#ifndef DEFAULT_TKT_LIFE /* allow compile-time override */ -#define DEFAULT_TKT_LIFE 96 /* default lifetime for krb_mk_req - & co., 8 hrs */ -#endif - -/* Definition of text structure used to pass text around */ -#define MAX_KTXT_LEN 1250 - -struct ktext { - int length; /* Length of the text */ - unsigned char dat[MAX_KTXT_LEN]; /* The data itself */ - unsigned long mbz; /* zero to catch runaway strings */ -}; - -typedef struct ktext far *KTEXT; -typedef struct ktext far *KTEXT_FP; -typedef struct ktext KTEXT_ST; - - -/* Definitions for send_to_kdc */ -#define CLIENT_KRB_TIMEOUT 10 /* time between retries */ /* changed from 4, 8-14-94 pbh */ -#define CLIENT_KRB_RETRY 5 /* retry this many times */ -#define CLIENT_KRB_BUFLEN 512 /* max unfragmented packet */ - -/* Definitions for ticket file utilities */ -#define R_TKT_FIL 0 -#define W_TKT_FIL 1 - -/* Definitions for cl_get_tgt */ -#ifdef PC -#define CL_GTGT_INIT_FILE "\\kerberos\\k_in_tkts" -#else -#define CL_GTGT_INIT_FILE "/etc/k_in_tkts" -#endif /* PC */ - -/* Parameters for rd_ap_req */ -/* Maximum alloable clock skew in seconds */ -#define CLOCK_SKEW 5*60 -/* Filename for readservkey */ -#define KEYFILE "/etc/srvtab" - -/* Structure definition for rd_ap_req */ - -struct auth_dat { - unsigned char k_flags; /* Flags from ticket */ - char pname[ANAME_SZ]; /* Principal's name */ - char pinst[INST_SZ]; /* His Instance */ - char prealm[REALM_SZ]; /* His Realm */ - unsigned long checksum; /* Data checksum (opt) */ - C_Block session; /* Session Key */ - int life; /* Life of ticket */ - unsigned long time_sec; /* Time ticket issued */ - unsigned long address; /* Address in ticket */ - KTEXT_ST reply; /* Auth reply (opt) */ -}; - -typedef struct auth_dat AUTH_DAT; - -/* Structure definition for credentials returned by get_cred */ - -struct credentials { - char service[ANAME_SZ]; /* Service name */ - char instance[INST_SZ]; /* Instance */ - char realm[REALM_SZ]; /* Auth domain */ - C_Block session; /* Session key */ - int lifetime; /* Lifetime */ - int kvno; /* Key version number */ - KTEXT_ST ticket_st; /* The ticket itself */ - long issue_date; /* The issue time */ - char pname[ANAME_SZ]; /* Principal's name */ - char pinst[INST_SZ]; /* Principal's instance */ -}; - -typedef struct credentials CREDENTIALS; - -/* Structure definition for rd_private_msg and rd_safe_msg */ - -struct msg_dat { - unsigned char far *app_data; /* pointer to appl data */ - unsigned long app_length; /* length of appl data */ - unsigned long hash; /* hash to lookup replay */ - int swap; /* swap bytes? */ - long time_sec; /* msg timestamp seconds */ - unsigned char time_5ms; /* msg timestamp 5ms units */ -}; - -typedef struct msg_dat MSG_DAT; - - -/* Location of ticket file for save_cred and get_cred */ -#define TKT_FILE tkt_string() -#define TKT_ENV "KERBEROS_TICKETS" -typedef struct { - unsigned buf_size; - unsigned dummy; - unsigned eof_ptr; - int sema; /* semaphore 0 - OK, -1 - lock write, +ve lock read */ -} tkt_header; - -tkt_header far *tkt_ptr(void); - -#define KM_TKFILE 0 -#define KM_KRBMEM 1 - -#define TKT_ROOT "/tmp/tkt" /* not used in OS/2 anyway */ - -/* Error codes returned from the KDC */ -#define KDC_OK 0 /* Request OK */ -#define KDC_NAME_EXP 1 /* Principal expired */ -#define KDC_SERVICE_EXP 2 /* Service expired */ -#define KDC_AUTH_EXP 3 /* Auth expired */ -#define KDC_PKT_VER 4 /* Protocol version unknown */ -#define KDC_P_MKEY_VER 5 /* Wrong master key version */ -#define KDC_S_MKEY_VER 6 /* Wrong master key version */ -#define KDC_BYTE_ORDER 7 /* Byte order unknown */ -#define KDC_PR_UNKNOWN 8 /* Principal unknown */ -#define KDC_PR_N_UNIQUE 9 /* Principal not unique */ -#define KDC_NULL_KEY 10 /* Principal has null key */ -#define KDC_GEN_ERR 20 /* Generic error from KDC */ - - -/* Values returned by get_credentials */ -#define GC_OK 0 /* Retrieve OK */ -#define RET_OK 0 /* Retrieve OK */ -#define GC_TKFIL 21 /* Can't read ticket file */ -#define RET_TKFIL 21 /* Can't read ticket file */ -#define GC_NOTKT 22 /* Can't find ticket or TGT */ -#define RET_NOTKT 22 /* Can't find ticket or TGT */ - - -/* Values returned by mk_ap_req */ -#define MK_AP_OK 0 /* Success */ -#define MK_AP_TGTEXP 26 /* TGT Expired */ - -/* Values returned by rd_ap_req */ -#define RD_AP_OK 0 /* Request authentic */ -#define RD_AP_UNDEC 31 /* Can't decode authenticator */ -#define RD_AP_EXP 32 /* Ticket expired */ -#define RD_AP_NYV 33 /* Ticket not yet valid */ -#define RD_AP_REPEAT 34 /* Repeated request */ -#define RD_AP_NOT_US 35 /* The ticket isn't for us */ -#define RD_AP_INCON 36 /* Request is inconsistent */ -#define RD_AP_TIME 37 /* delta_t too big */ -#define RD_AP_BADD 38 /* Incorrect net address */ -#define RD_AP_VERSION 39 /* protocol version mismatch */ -#define RD_AP_MSG_TYPE 40 /* invalid msg type */ -#define RD_AP_MODIFIED 41 /* message stream modified */ -#define RD_AP_ORDER 42 /* message out of order */ -#define RD_AP_UNAUTHOR 43 /* unauthorized request */ - -/* Values returned by get_pw_tkt */ -#define GT_PW_OK 0 /* Got password changing tkt */ -#define GT_PW_NULL 51 /* Current PW is null */ -#define GT_PW_BADPW 52 /* Incorrect current password */ -#define GT_PW_PROT 53 /* Protocol Error */ -#define GT_PW_KDCERR 54 /* Error returned by KDC */ -#define GT_PW_NULLTKT 55 /* Null tkt returned by KDC */ - - -/* Values returned by send_to_kdc */ -#define SKDC_OK 0 /* Response received */ -#define SKDC_RETRY 56 /* Retry count exceeded */ -#define SKDC_CANT 57 /* Can't send request */ - -/* - * Values returned by get_intkt - * (can also return SKDC_* and KDC errors) - */ - -#define INTK_OK 0 /* Ticket obtained */ -#define INTK_W_NOTALL 61 /* Not ALL tickets returned */ -#define INTK_BADPW 62 /* Incorrect password */ -#define INTK_PROT 63 /* Protocol Error */ -#define INTK_ERR 70 /* Other error */ - -/* Values returned by get_adtkt */ -#define AD_OK 0 /* Ticket Obtained */ -#define AD_NOTGT 71 /* Don't have tgt */ - -/* Error codes returned by ticket file utilities */ -#define NO_TKT_FIL 76 /* No ticket file found */ -#define TKT_FIL_ACC 77 /* Couldn't access tkt file */ -#define TKT_FIL_LCK 78 /* Couldn't lock ticket file */ -#define TKT_FIL_FMT 79 /* Bad ticket file format */ -#define TKT_FIL_INI 80 /* tf_init not called first */ - -/* Error code returned by kparse_name */ -#define KNAME_FMT 81 /* Bad Kerberos name format */ - -/* Error code returned by krb_mk_safe */ -#define SAFE_PRIV_ERROR -1 /* syscall error */ - -/* - * macros for byte swapping; also scratch space - * u_quad 0-->7, 1-->6, 2-->5, 3-->4, 4-->3, 5-->2, 6-->1, 7-->0 - * u_long 0-->3, 1-->2, 2-->1, 3-->0 - * u_short 0-->1, 1-->0 - */ - -#define swap_u_16(x) {\ - unsigned long _krb_swap_tmp[4];\ - _swab(((char *) x) +0, ((char *) _krb_swap_tmp) +14 ,2); \ - _swab(((char *) x) +2, ((char *) _krb_swap_tmp) +12 ,2); \ - _swab(((char *) x) +4, ((char *) _krb_swap_tmp) +10 ,2); \ - _swab(((char *) x) +6, ((char *) _krb_swap_tmp) +8 ,2); \ - _swab(((char *) x) +8, ((char *) _krb_swap_tmp) +6 ,2); \ - _swab(((char *) x) +10,((char *) _krb_swap_tmp) +4 ,2); \ - _swab(((char *) x) +12,((char *) _krb_swap_tmp) +2 ,2); \ - _swab(((char *) x) +14,((char *) _krb_swap_tmp) +0 ,2); \ - bcopy((char *)_krb_swap_tmp,(char *)x,16);\ - } - -#define swap_u_12(x) {\ - unsigned long _krb_swap_tmp[4];\ - _swab(( char *) x, ((char *) _krb_swap_tmp) +10 ,2); \ - _swab(((char *) x) +2, ((char *) _krb_swap_tmp) +8 ,2); \ - _swab(((char *) x) +4, ((char *) _krb_swap_tmp) +6 ,2); \ - _swab(((char *) x) +6, ((char *) _krb_swap_tmp) +4 ,2); \ - _swab(((char *) x) +8, ((char *) _krb_swap_tmp) +2 ,2); \ - _swab(((char *) x) +10,((char *) _krb_swap_tmp) +0 ,2); \ - bcopy((char *)_krb_swap_tmp,(char *)x,12);\ - } - -#define swap_C_Block(x) {\ - unsigned long _krb_swap_tmp[4];\ - _swab(( char *) x, ((char *) _krb_swap_tmp) +6 ,2); \ - _swab(((char *) x) +2,((char *) _krb_swap_tmp) +4 ,2); \ - _swab(((char *) x) +4,((char *) _krb_swap_tmp) +2 ,2); \ - _swab(((char *) x) +6,((char *) _krb_swap_tmp) ,2); \ - bcopy((char *)_krb_swap_tmp,(char *)x,8);\ - } -#define swap_u_quad(x) {\ - unsigned long _krb_swap_tmp[4];\ - _swab(( char *) &x, ((char *) _krb_swap_tmp) +6 ,2); \ - _swab(((char *) &x) +2,((char *) _krb_swap_tmp) +4 ,2); \ - _swab(((char *) &x) +4,((char *) _krb_swap_tmp) +2 ,2); \ - _swab(((char *) &x) +6,((char *) _krb_swap_tmp) ,2); \ - bcopy((char *)_krb_swap_tmp,(char *)&x,8);\ - } - -#define swap_u_long(x) {\ - unsigned long _krb_swap_tmp[4];\ - _swab((char *) &x, ((char *) _krb_swap_tmp) +2 ,2); \ - _swab(((char *) &x) +2,((char *) _krb_swap_tmp),2); \ - x = _krb_swap_tmp[0]; \ - } - -#define swap_u_short(x) {\ - unsigned short _krb_swap_sh_tmp; \ - _swab((char *) &x, ( &_krb_swap_sh_tmp) ,2); \ - x = (unsigned short) _krb_swap_sh_tmp; \ - } - -/* Kerberos ticket flag field bit definitions */ -#define K_FLAG_ORDER 0 /* bit 0 --> lsb */ -#define K_FLAG_1 /* reserved */ -#define K_FLAG_2 /* reserved */ -#define K_FLAG_3 /* reserved */ -#define K_FLAG_4 /* reserved */ -#define K_FLAG_5 /* reserved */ -#define K_FLAG_6 /* reserved */ -#define K_FLAG_7 /* reserved, bit 7 --> msb */ - -char *tkt_string(); - -#ifdef OLDNAMES -#define krb_mk_req mk_ap_req -#define krb_rd_req rd_ap_req -#define krb_kntoln an_to_ln -#define krb_set_key set_serv_key -#define krb_get_cred get_credentials -#define krb_mk_priv mk_private_msg -#define krb_rd_priv rd_private_msg -#define krb_mk_safe mk_safe_msg -#define krb_rd_safe rd_safe_msg -#define krb_mk_err mk_appl_err_msg -#define krb_rd_err rd_appl_err_msg -#define krb_ck_repl check_replay -#define krb_get_pw_in_tkt get_in_tkt -#define krb_get_svc_in_tkt get_svc_in_tkt -#define krb_get_pw_tkt get_pw_tkt -#define krb_realmofhost krb_getrealm -#define krb_get_phost get_phost -#define krb_get_krbhst get_krbhst -#define krb_get_lrealm get_krbrlm -#endif /* OLDNAMES */ - -/* Defines for krb_sendauth and krb_recvauth */ - -#define KOPT_DONT_MK_REQ 0x00000001 /* don't call krb_mk_req */ -#define KOPT_DO_MUTUAL 0x00000002 /* do mutual auth */ - -#define KOPT_DONT_CANON 0x00000004 /* - * don't canonicalize inst as - * a hostname - */ - -#define KRB_SENDAUTH_VLEN 8 /* length for version strings */ - -#ifdef ATHENA_COMPAT -#define KOPT_DO_OLDSTYLE 0x00000008 /* use the old-style protocol */ -#endif /* ATHENA_COMPAT */ - -#ifdef WINDOWS -#include -int gettimeofday(struct timeval *tv, struct timezone *tz); -void tkt_free(tkt_header FAR* hdr); -int krb_get_tf_fullname(char *tf, char *name, char *inst, char *realm); -/* Windows prototypes */ -int FAR PASCAL krb_sendauth(long,int,KTEXT_FP,LPSTR,LPSTR,LPSTR,unsigned long, - MSG_DAT FAR *,CREDENTIALS FAR *, Key_schedule FAR *, - struct sockaddr_in FAR *,struct sockaddr_in FAR *, LPSTR); -char FAR* FAR* FAR get_krb_err_txt(void); -/* 2-22-93, pbh */ -int FAR krb_get_tf_realm(char FAR *,char FAR *); -int FAR tf_init(char FAR*,int); -int FAR tf_get_pname(char FAR*); -int FAR tf_get_pinst(char FAR*); -int FAR tf_get_cred(CREDENTIALS FAR*); -void FAR tf_close(void); -int FAR tf_save_cred(char FAR*,char FAR*,char FAR*,C_Block,int,int,KTEXT,long); -BOOL FAR k_isinst(char FAR *s); -BOOL FAR k_isrealm(char FAR *s); -BOOL FAR k_isname(char FAR *s); -int FAR set_krb_debug( int ); /* Warning, unique to Windows! */ -int FAR set_krb_ap_req_debug( int ); /* Warning, unique to Windows! */ -LPSTR FAR PASCAL get_krb_err_txt_entry( int i); /* Warning, unique to Windows! */ -int FAR PASCAL krb_mk_req(KTEXT,LPSTR,LPSTR,LPSTR,long); -LPSTR FAR PASCAL krb_getrealm( char FAR *host); -/* end 2-22-93, pbh */ - -#ifdef WINSOCK -#define bcopy(a,b,c) memcpy( (b), (a), (c) ) -#define bzero(a,b) memset( (a), 0, (b) ) -#endif /* WINSOCK */ - - -/* -#ifdef __cplusplus -int printf(char far*,...); -#else -int printf(); -#endif -*/ - -int FAR kname_parse(char FAR*,char FAR*,char FAR*,char FAR*); -int FAR krb_get_pw_in_tkt(char FAR*,char FAR*,char FAR*,char FAR*,char FAR*,int,char FAR*); -int FAR dest_tkt(void); -int FAR krb_get_lrealm(LPSTR ,int); - -int FAR krb_use_kerbmem(); -int FAR krb_check_tgt(); -int FAR krb_check_serv(char *); - -int FAR krb_get_cred(char FAR*,char FAR*,char FAR*,CREDENTIALS FAR*); -int FAR send_to_kdc(KTEXT,KTEXT,char FAR*); - -#define MIT_PWD_DLL_CLASS "MITPasswordWndDLL" - -#else /* end of WINDOWS start of DOS */ - -/* DOS prototypes */ -int krb_get_in_tkt(char *, char *, char *, char *, char *, int, int (*)(), int (*)(), char *); -long krb_mk_priv( u_char *, u_char *, u_long, Key_schedule, C_Block, - struct sockaddr_in *, struct sockaddr_in *); -char* krb_getrealm( char *host); -char* krb_realmofhost( char *host); -int krb_get_tf_realm(char*,char*); -int krb_get_tf_fullname(char*,char*,char*,char*); -int get_ad_tkt(char*,char*,char*,int); -int krb_get_cred(char*,char*,char*,CREDENTIALS*); -int krb_get_krbhst(char*,char*,int); -int krb_get_lrealm(char*,int); -char* krb_get_phost(char*); -int krb_mk_req(KTEXT,char*,char*,char*,long); -int krb_set_lifetime(int); - -#ifndef WINSOCK -int krb_net_read(int,char*,int); -int krb_net_write(int,char*,int); -#else -int krb_net_read(SOCKET,char*,int); -int krb_net_write(SOCKET,char*,int); -#endif /*winsock*/ - -KTEXT pkt_cipher(KTEXT); -int pkt_clen(KTEXT); -long krb_rd_priv(unsigned char*,unsigned long,Key_schedule,C_Block, - struct sockaddr_in*, struct sockaddr_in*,MSG_DAT*); -int save_credentials(char*,char*,char*,C_Block,int,int,KTEXT,long); -int send_to_kdc(KTEXT,KTEXT,char*); -int krb_sendauth(long,int,KTEXT,char*,char*,char*,u_long, - MSG_DAT*,CREDENTIALS*,Key_schedule, - struct sockaddr_in*,struct sockaddr_in*,char*); -int tf_init(char*,int); -int tf_get_pname(char*); -int tf_get_pinst(char*); -int tf_get_cred(CREDENTIALS*); -void tf_close(void); -int tf_save_cred(char*,char*,char*,C_Block,int,int,KTEXT,long); -int kname_parse(char*,char*,char*,char*); -int krb_get_pw_in_tkt(char*,char*,char*,char*,char*,int,char*); -int dest_tkt(void); - -int krb_use_kerbmem(); -int krb_check_tgt(); -int krb_check_serv(char *); - -#endif /* WINDOWS */ -#endif /* KRB_DEFS */ diff --git a/libraries/msdos/winsock/include/krb/mit/arpa/nameser.h b/libraries/msdos/winsock/include/krb/mit/arpa/nameser.h deleted file mode 100644 index bc6ffcb06e..0000000000 --- a/libraries/msdos/winsock/include/krb/mit/arpa/nameser.h +++ /dev/null @@ -1,257 +0,0 @@ -/* - * Copyright (c) 1983, 1989 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. - * - * @(#)nameser.h 5.25 (Berkeley) 4/3/91 - */ - -#ifndef _NAMESER_H_ -#define _NAMESER_H_ - -/* - * Define constants based on rfc883 - */ -#define PACKETSZ 512 /* maximum packet size */ -#define MAXDNAME 256 /* maximum domain name */ -#define MAXCDNAME 255 /* maximum compressed domain name */ -#define MAXLABEL 63 /* maximum length of domain label */ - /* Number of bytes of fixed size data in query structure */ -#define QFIXEDSZ 4 - /* number of bytes of fixed size data in resource record */ -#define RRFIXEDSZ 10 - -/* - * Internet nameserver port number - */ -#define NAMESERVER_PORT 53 - -/* - * Currently defined opcodes - */ -#define QUERY 0x0 /* standard query */ -#define IQUERY 0x1 /* inverse query */ -#define STATUS 0x2 /* nameserver status query */ -/*#define xxx 0x3 /* 0x3 reserved */ - /* non standard */ -#define UPDATEA 0x9 /* add resource record */ -#define UPDATED 0xa /* delete a specific resource record */ -#define UPDATEDA 0xb /* delete all nemed resource record */ -#define UPDATEM 0xc /* modify a specific resource record */ -#define UPDATEMA 0xd /* modify all named resource record */ - -#define ZONEINIT 0xe /* initial zone transfer */ -#define ZONEREF 0xf /* incremental zone referesh */ - -/* - * Currently defined response codes - */ -#define NOERROR 0 /* no error */ -#define FORMERR 1 /* format error */ -#define SERVFAIL 2 /* server failure */ -#define NXDOMAIN 3 /* non existent domain */ -#define NOTIMP 4 /* not implemented */ -#define REFUSED 5 /* query refused */ - /* non standard */ -#define NOCHANGE 0xf /* update failed to change db */ - -/* - * Type values for resources and queries - */ -#define T_A 1 /* host address */ -#define T_NS 2 /* authoritative server */ -#define T_MD 3 /* mail destination */ -#define T_MF 4 /* mail forwarder */ -#define T_CNAME 5 /* connonical name */ -#define T_SOA 6 /* start of authority zone */ -#define T_MB 7 /* mailbox domain name */ -#define T_MG 8 /* mail group member */ -#define T_MR 9 /* mail rename name */ -#define T_NULL 10 /* null resource record */ -#define T_WKS 11 /* well known service */ -#define T_PTR 12 /* domain name pointer */ -#define T_HINFO 13 /* host information */ -#define T_MINFO 14 /* mailbox information */ -#define T_MX 15 /* mail routing information */ -#define T_TXT 16 /* text strings */ - /* non standard */ -#define T_UINFO 100 /* user (finger) information */ -#define T_UID 101 /* user ID */ -#define T_GID 102 /* group ID */ -#define T_UNSPEC 103 /* Unspecified format (binary data) */ - /* Query type values which do not appear in resource records */ -#define T_AXFR 252 /* transfer zone of authority */ -#define T_MAILB 253 /* transfer mailbox records */ -#define T_MAILA 254 /* transfer mail agent records */ -#define T_ANY 255 /* wildcard match */ - -/* - * Values for class field - */ - -#define C_IN 1 /* the arpa internet */ -#define C_CHAOS 3 /* for chaos net at MIT */ -#define C_HS 4 /* for Hesiod name server at MIT */ - /* Query class values which do not appear in resource records */ -#define C_ANY 255 /* wildcard match */ - -/* - * Status return codes for T_UNSPEC conversion routines - */ -#define CONV_SUCCESS 0 -#define CONV_OVERFLOW -1 -#define CONV_BADFMT -2 -#define CONV_BADCKSUM -3 -#define CONV_BADBUFLEN -4 - -#ifndef BYTE_ORDER -#define LITTLE_ENDIAN 1234 /* least-significant byte first (vax) */ -#define BIG_ENDIAN 4321 /* most-significant byte first (IBM, net) */ -#define PDP_ENDIAN 3412 /* LSB first in word, MSW first in long (pdp) */ - -#if defined(vax) || defined(ns32000) || defined(sun386) || defined(MIPSEL) || \ - defined(BIT_ZERO_ON_RIGHT) -#define BYTE_ORDER LITTLE_ENDIAN - -#endif -#if defined(sel) || defined(pyr) || defined(mc68000) || defined(sparc) || \ - defined(is68k) || defined(tahoe) || defined(ibm032) || defined(ibm370) || \ - defined(MIPSEB) || defined (BIT_ZERO_ON_LEFT) -#define BYTE_ORDER BIG_ENDIAN -#endif -#endif /* BYTE_ORDER */ - -#ifndef BYTE_ORDER - /* you must determine what the correct bit order is for your compiler */ - #define BYTE_ORDER LITTLE_ENDIAN /* for Intel x86 series */ -#endif -/* - * Structure for query header, the order of the fields is machine and - * compiler dependent, in our case, the bits within a byte are assignd - * least significant first, while the order of transmition is most - * significant first. This requires a somewhat confusing rearrangement. - */ - -#ifdef _WINDLL -/* define UNIX types */ -#include -#endif - -typedef struct { - u_short id; /* query identification number */ -#if BYTE_ORDER == BIG_ENDIAN - /* fields in third byte */ - u_char qr:1; /* response flag */ - u_char opcode:4; /* purpose of message */ - u_char aa:1; /* authoritive answer */ - u_char tc:1; /* truncated message */ - u_char rd:1; /* recursion desired */ - /* fields in fourth byte */ - u_char ra:1; /* recursion available */ - u_char pr:1; /* primary server required (non standard) */ - u_char unused:2; /* unused bits */ - u_char rcode:4; /* response code */ -#endif -#if BYTE_ORDER == LITTLE_ENDIAN || BYTE_ORDER == PDP_ENDIAN - /* fields in third byte */ - u_char rd:1; /* recursion desired */ - u_char tc:1; /* truncated message */ - u_char aa:1; /* authoritive answer */ - u_char opcode:4; /* purpose of message */ - u_char qr:1; /* response flag */ - /* fields in fourth byte */ - u_char rcode:4; /* response code */ - u_char unused:2; /* unused bits */ - u_char pr:1; /* primary server required (non standard) */ - u_char ra:1; /* recursion available */ -#endif - /* remaining bytes */ - u_short qdcount; /* number of question entries */ - u_short ancount; /* number of answer entries */ - u_short nscount; /* number of authority entries */ - u_short arcount; /* number of resource entries */ -} HEADER; - -/* - * Defines for handling compressed domain names - */ -#define INDIR_MASK 0xc0 - -/* - * Structure for passing resource records around. - */ -struct rrec { - short r_zone; /* zone number */ - short r_class; /* class number */ - short r_type; /* type number */ - u_long r_ttl; /* time to live */ - int r_size; /* size of data area */ - char *r_data; /* pointer to data */ -}; - -extern u_short _getshort(); -extern u_long _getlong(); - -/* - * Inline versions of get/put short/long. - * Pointer is advanced; we assume that both arguments - * are lvalues and will already be in registers. - * cp MUST be u_char *. - */ -#define GETSHORT(s, cp) { \ - (s) = *(cp)++ << 8; \ - (s) |= *(cp)++; \ -} - -#define GETLONG(l, cp) { \ - (l) = *(cp)++ << 8; \ - (l) |= *(cp)++; (l) <<= 8; \ - (l) |= *(cp)++; (l) <<= 8; \ - (l) |= *(cp)++; \ -} - - -#define PUTSHORT(s, cp) { \ - *(cp)++ = (s) >> 8; \ - *(cp)++ = (s); \ -} - -/* - * Warning: PUTLONG destroys its first argument. - */ -#define PUTLONG(l, cp) { \ - (cp)[3] = l; \ - (cp)[2] = (l >>= 8); \ - (cp)[1] = (l >>= 8); \ - (cp)[0] = l >> 8; \ - (cp) += sizeof(u_long); \ -} - -#endif /* !_NAMESER_H_ */ diff --git a/libraries/msdos/winsock/include/krb/mit/conf-pc.h b/libraries/msdos/winsock/include/krb/mit/conf-pc.h deleted file mode 100644 index 169a5e27c6..0000000000 --- a/libraries/msdos/winsock/include/krb/mit/conf-pc.h +++ /dev/null @@ -1,80 +0,0 @@ -/* - * $Source: F:/DOSDEV/NEWKRB/INCLUDE/RCS/conf-pc.h $ - * $Author: pbh $ - * $Header: F:/DOSDEV/NEWKRB/INCLUDE/RCS/conf-pc.h 1.2 1994/08/16 18:43:42 pbh Exp $ - * - * Copyright 1988 by the Massachusetts Institute of Technology. - * - * For copying and distribution information, please see the file - * . - * - * Machine-type definitions: IBM PC 8086 - */ - -#include - -#ifndef IBMPC - #define IBMPC -#endif - -#if defined(__WINDOWS__) && !defined(WINDOWS) -#define WINDOWS -#endif - -#if defined(__OS2__) && !defined(OS2) -#define OS2 -#endif - -#ifndef OS2 -#define BITS16 -#define CROSSMSDOS -/* OS/2 is 32 bit!!!! */ -#else -#define BITS32 -#endif -#define LSBFIRST - -#define index(s,c) strchr(s,c) /* PC version of index */ -#define rindex(s,c) strrchr(s,c) - -typedef unsigned char u_char; -typedef unsigned long u_long; -typedef unsigned short u_short; -typedef short uid_t; - -#if !defined(WINDOWS) && !defined(DWORD) -typedef long DWORD; -#endif - -#ifdef OS2 -typedef char *LPSTR; -typedef char *LPBYTE; -typedef char *CHARPTR; -typedef char *LPINT; -typedef unsigned int WORD; - -#define far -#define near -#define FAR -#define PASCAL -#include -#define lstrcpy strcpy -#define lstrlen strlen -#define lstrcmp strcmp -#define lstrcpyn strncpy -#endif - -#if defined(OS2) || defined(WINDOWS) -#define creat _creat -#define read _read -#define write _write -#define open _open -#define close _close -#define stat(x,y) _stat(x,y) -#define putch _putch -#define getch _getch -#endif - -#ifdef WINDOWS -#include -#endif diff --git a/libraries/msdos/winsock/include/krb/mit/conf.h b/libraries/msdos/winsock/include/krb/mit/conf.h deleted file mode 100644 index 17c53458ae..0000000000 --- a/libraries/msdos/winsock/include/krb/mit/conf.h +++ /dev/null @@ -1,81 +0,0 @@ -/* - * $Source: F:/DOSDEV/NEWKRB/INCLUDE/RCS/conf.h $ - * $Author: pbh $ - * $Header: F:/DOSDEV/NEWKRB/INCLUDE/RCS/conf.h 1.2 1994/08/16 18:43:42 pbh Exp $ - * - * Copyright 1988 by the Massachusetts Institute of Technology. - * - * For copying and distribution information, please see the file - * . - * - * Configuration info for operating system, hardware description, - * language implementation, C library, etc. - * - * This file should be included in (almost) every file in the Kerberos - * sources, and probably should *not* be needed outside of those - * sources. (How do we deal with /usr/include/des.h and - * /usr/include/krb.h?) - */ - -#ifndef _CONF_H_ -#define _CONF_H_ - -#include - -#include "osconf.h" - -#ifdef SHORTNAMES -#include "names.h" -#endif - -/* - * Language implementation-specific definitions - */ - -/* special cases */ -#ifdef __HIGHC__ -/* broken implementation of ANSI C */ -#undef __STDC__ -#endif - -#if !defined(__STDC__) && !defined(__BORLANDC__) -#define const -#define volatile -#define signed -typedef char *pointer; /* pointer to generic data */ -#define PROTOTYPE(p) () -#else -typedef void *pointer; -#define PROTOTYPE(p) p -#endif - -/* Does your compiler understand "void"? */ -#ifdef notdef -#define void int -#endif - -/* - * A few checks to see that necessary definitions are included. - */ - -/* byte order */ -/* #define LSBFIRST */ -/* #define BITS16 */ -/* #define CROSSMSDOS */ - -#ifndef MSBFIRST -#ifndef LSBFIRST -#error byte order not defined -#endif -#endif - -/* machine size */ -#ifndef BITS16 -#ifndef BITS32 -#error number of bits? -#endif -#endif - -/* end of checks */ - -#endif /* _CONF_H_ */ diff --git a/libraries/msdos/winsock/include/krb/mit/hesiod.h b/libraries/msdos/winsock/include/krb/mit/hesiod.h deleted file mode 100644 index c357444bcf..0000000000 --- a/libraries/msdos/winsock/include/krb/mit/hesiod.h +++ /dev/null @@ -1,113 +0,0 @@ -/* This file contains definitions for use by the Hesiod name service and - * applications. - * - * For copying and distribution information, see the file . - * - * Original version by Steve Dyer, IBM/Project Athena. - * - * $Author: probe $ - * $Athena: hesiod.h,v 1.3 88/08/07 21:52:39 treese Locked $ - * $Header: /afs/rel-eng.athena.mit.edu/project/release/current/source/athena/athena.lib/hesiod/RCS/hesiod.h,v 1.6 90/07/20 13:09:16 probe Exp $ - * $Source: /afs/rel-eng.athena.mit.edu/project/release/current/source/athena/athena.lib/hesiod/RCS/hesiod.h,v $ - * $Log: hesiod.h,v $ - * Revision 1.6 90/07/20 13:09:16 probe - * Incorrect declaration of hes_getpwnam() - * - * Revision 1.5 90/07/11 16:49:12 probe - * Patches from - * Added missing declarations - * - * Revision 1.5 90/07/09 18:44:30 mar - * mention hes_getservbyname(), hes_getpwent() - * - * Revision 1.4 88/08/07 23:18:00 treese - * Second-public-distribution - * - * Revision 1.3 88/08/07 21:52:39 treese - * First public distribution - * - * Revision 1.2 88/06/05 19:51:32 treese - * Cleaned up for public distribution - * - */ - -/* Configuration information. */ - -#ifndef _HESIOD_ -#define _HESIOD_ - -#ifdef WINDOWS -#include -#endif - -#if !defined(WINDOWS) && !defined(_WINDOWS) -#define HESIOD_CONF "/etc/hesiod.conf" /* Configuration file. */ -#else -#define HESIOD_CONF "c:\\net\\tcp\\hesiod.cfg" -#endif - -#define DEF_RHS ".Athena.MIT.EDU" /* Defaults if HESIOD_CONF */ -#define DEF_LHS ".ns" /* file is not present. */ - -/* Error codes. */ - -#define HES_ER_UNINIT -1 /* uninitialized */ -#define HES_ER_OK 0 /* no error */ -#define HES_ER_NOTFOUND 1 /* Hesiod name not found by server */ -#define HES_ER_CONFIG 2 /* local problem (no config file?) */ -#define HES_ER_NET 3 /* network problem */ - -/* Declaration of routines */ - -#ifdef __cplusplus -extern "C" { -#endif - -#if !defined(WINDOWS) && !defined(_WINDOWS) -char *hes_to_bind(); -char **hes_resolve(); -int hes_error(); -#else -#ifndef _WSHELPER_ -LPSTR FAR PASCAL hes_to_bind(LPSTR HesiodName, LPSTR HesiodNameType); -LPSTR * FAR PASCAL hes_resolve(LPSTR HesiodName, LPSTR HesiodNameType); -int FAR PASCAL hes_error(void); -#endif -#endif - - -/* For use in getting post-office information. */ - -#if !defined(WINDOWS) && !defined(_WINDOWS) -struct hes_postoffice { - char *po_type; - char *po_host; - char *po_name; -}; -#else -struct hes_postoffice { - LPSTR po_type; - LPSTR po_host; - LPSTR po_name; -}; -#endif - -/* Other routines */ - -#if !defined(WINDOWS) && !defined(_WINDOWS) -struct hes_postoffice *hes_getmailhost(); -struct servent *hes_getservbyname(); -struct passwd *hes_getpwnam(); -struct passwd *hes_getpwuid(); -#else -struct hes_postoffice FAR * WINAPI hes_getmailhost(LPSTR user); -struct servent FAR * WINAPI hes_getservbyname(LPSTR name, LPSTR proto); -struct passwd FAR * WINAPI hes_getpwnam(LPSTR nam); -struct passwd FAR * WINAPI hes_getpwuid(int uid); -#endif - -#ifdef __cplusplus -} -#endif - -#endif /* _HESIOD_ */ diff --git a/libraries/msdos/winsock/include/krb/mit/lsh_pwd.h b/libraries/msdos/winsock/include/krb/mit/lsh_pwd.h deleted file mode 100644 index c51a2965e6..0000000000 --- a/libraries/msdos/winsock/include/krb/mit/lsh_pwd.h +++ /dev/null @@ -1,56 +0,0 @@ -/* LSH_PWD.H this is the include file for the LSH_PWD.C */ - -/* Included from krb.h - CRS 940805 */ - -#ifndef __LSH_PWD__ -#define __LSH_PWD__ - -// Definition of the info structure that is passed to tell the dialog box what state it -// should be in. - -#include - -typedef struct { - int dlgtype; -#define DLGTYPE_PASSWD 0 -#define DLGTYPE_CHPASSWD 1 - int dlgstatemax; // I am not sure what this is yet. STUFF TO DO! - LPSTR title; // The title on the Dialog box - for Renewing or Initializing. - LPSTR principal; -} LSH_DLGINFO, FAR *LPLSH_DLGINFO; - - -// Some defines swiped from leash.h -// These are necessary but they must be kept sync'ed with leash.h -#define HELPFILE "kerberos.hlp" -#define PASSWORDCHAR '#' - -#define DLGHT(ht) (HIWORD(GetDialogBaseUnits())*(ht)/8) -#define DLGWD(wd) (LOWORD(GetDialogBaseUnits())*(wd)/4) - -// external variables -#ifdef PDLL -long lsh_errno; -char *err_context; /* error context */ -char FAR *kadm_info; /* to get info from the kadm* files */ -long dlgu; /* dialog units */ -#ifdef WINSOCK -HINSTANCE hinstWinSock = NULL; -#endif // WINSOCK -#endif // PDLL - -// local macros stolen from leash.h -#ifndef MAKEWORD -#define MAKEWORD(low, high) ((WORD)(((BYTE)(low)) | (((UINT)((BYTE)(high))) << 8))) -#endif /*MAKEWORD*/ - - -// Function Prototypes. -int FAR PASCAL _export Lsh_Enter_Password_Dialog(HWND hParent, LPLSH_DLGINFO lpdlginfo); -int FAR PASCAL _export Lsh_Change_Password_Dialog(HWND hParent, LPLSH_DLGINFO lpdlginfo); -int lsh_com_err_proc (LPSTR whoami, long code, LPSTR fmt, va_list args); -int _export DoNiftyErrorReport(long errnum, LPSTR what); -LONG FAR PASCAL _export MITPwdWinProcDLL(HWND hWnd, WORD message, WORD wParam, LONG lParam); -BOOL FAR PASCAL _export PasswordProcDLL(HWND hDialog, WORD message, WORD wParam, LONG lParam); -LONG FAR PASCAL _export lsh_get_lsh_errno( LONG FAR *err_val); -#endif __LSH_PWD__ diff --git a/libraries/msdos/winsock/include/krb/mit/mit_copy.h b/libraries/msdos/winsock/include/krb/mit/mit_copy.h deleted file mode 100644 index b47de92f81..0000000000 --- a/libraries/msdos/winsock/include/krb/mit/mit_copy.h +++ /dev/null @@ -1,22 +0,0 @@ -/* - Copyright (C) 1989 by the Massachusetts Institute of Technology - - Export of this software from the United States of America is assumed - to require a specific license from the United States Government. - It is the responsibility of any person or organization contemplating - export to obtain such a license before exporting. - -WITHIN THAT CONSTRAINT, permission to use, copy, modify, and -distribute this software and its documentation for any purpose and -without fee is hereby granted, provided that the above copyright -notice appear in all copies and that both that copyright notice and -this permission notice appear in supporting documentation, and that -the name of M.I.T. not be used in advertising or publicity pertaining -to distribution of the software without specific, written prior -permission. M.I.T. makes no representations about the suitability of -this software for any purpose. It is provided "as is" without express -or implied warranty. - - */ - - diff --git a/libraries/msdos/winsock/include/krb/mit/osconf.h b/libraries/msdos/winsock/include/krb/mit/osconf.h deleted file mode 100644 index 644b0e3139..0000000000 --- a/libraries/msdos/winsock/include/krb/mit/osconf.h +++ /dev/null @@ -1,63 +0,0 @@ -/* - * $Source: F:/DOSDEV/NEWKRB/INCLUDE/RCS/osconf.h $ - * $Author: pbh $ - * $Header: F:/DOSDEV/NEWKRB/INCLUDE/RCS/osconf.h 1.2 1994/08/16 18:43:42 pbh Exp $ - * - * Copyright 1988 by the Massachusetts Institute of Technology. - * - * For copying and distribution information, please see the file - * . - * - * Athena configuration. - */ - -#include - -#ifndef _OSCONF_H_ -#define _OSCONF_H_ - -#if defined(IBMPC) && !defined(PC) -#define PC -#endif - -#ifdef tahoe -#include "conf-bsdtahoe.h" -#else /* !tahoe */ -#ifdef vax -#include "conf-bsdvax.h" -#else /* !vax */ -#if defined(mips) && defined(ultrix) -#include "conf-ultmips2.h" -#else /* !Ultrix MIPS-2 */ -#ifdef ibm032 -#include "conf-bsdibm032.h" -#else /* !ibm032 */ -#ifdef apollo -#include "conf-bsdapollo.h" -#else /* !apollo */ -#ifdef sun -#ifdef sparc -#include "conf-bsdsparc.h" -#else /* sun but not sparc */ -#ifdef i386 -#include "conf-bsd386i.h" -#else /* sun but not (sparc or 386i) */ -#include "conf-bsdm68k.h" -#endif /* i386 */ -#endif /* sparc */ -#else /* !sun */ -#ifdef pyr -#include "conf-pyr.h" -#else -#if defined(PC) || defined(__MSDOS__) || defined(OS2) -#include "conf-pc.h" -#endif /* PC */ -#endif /* pyr */ -#endif /* sun */ -#endif /* apollo */ -#endif /* ibm032 */ -#endif /* mips */ -#endif /* vax */ -#endif /* tahoe */ - -#endif /* _OSCONF_H_ */ diff --git a/libraries/msdos/winsock/include/krb/mit/resolv.h b/libraries/msdos/winsock/include/krb/mit/resolv.h deleted file mode 100644 index ebe0a281d8..0000000000 --- a/libraries/msdos/winsock/include/krb/mit/resolv.h +++ /dev/null @@ -1,144 +0,0 @@ -/* - WSHelper DNS/Hesiod Library for WINSOCK - resolv.h -*/ - -/* - * Copyright (c) 1983, 1987, 1989 The 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. - * - * @(#)resolv.h 5.15 (Berkeley) 4/3/91 - */ - -#ifndef _RESOLV_H_ -#define _RESOLV_H_ - -/* - * Resolver configuration file. - * Normally not present, but may contain the address of the - * inital name server(s) to query and the domain search list. - */ - -#ifndef _PATH_RESCONF -#if !defined(WINDOWS) && !defined(_WINDOWS) -#define _PATH_RESCONF "/etc/resolv.conf" -#else -#define _PATH_RESCONF "c:\\net\\tcp\\resolv.cfg" -#endif -#endif - -#ifndef MAXDNAME -#include -#endif - -/* - * Global defines and variables for resolver stub. - */ -#define MAXNS 3 /* max # name servers we'll track */ -#define MAXDFLSRCH 3 /* # default domain levels to try */ -#define MAXDNSRCH 6 /* max # domains in search path */ -#define LOCALDOMAINPARTS 2 /* min levels in name that is "local" */ - -#define RES_TIMEOUT 5 /* min. seconds between retries */ - -// new -#define MAXMXRECS 8 - -struct mxent { - int numrecs; - u_short pref[MAXMXRECS]; - char FAR * FAR * hostname; -}; - -struct state { - int retrans; /* retransmition time interval */ - int retry; /* number of times to retransmit */ - long options; /* option flags - see below. */ - int nscount; /* number of name servers */ - struct sockaddr_in nsaddr_list[MAXNS]; /* address of name server */ -#define nsaddr nsaddr_list[0] /* for backward compatibility */ - u_short id; /* current packet id */ - char defdname[MAXDNAME]; /* default domain */ - char *dnsrch[MAXDNSRCH+1]; /* components of domain to search */ -}; - -/* - * Resolver options - */ -#define RES_INIT 0x0001 /* address initialized */ -#define RES_DEBUG 0x0002 /* print debug messages */ -#define RES_AAONLY 0x0004 /* authoritative answers only */ -#define RES_USEVC 0x0008 /* use virtual circuit */ -#define RES_PRIMARY 0x0010 /* query primary server only */ -#define RES_IGNTC 0x0020 /* ignore trucation errors */ -#define RES_RECURSE 0x0040 /* recursion desired */ -#define RES_DEFNAMES 0x0080 /* use default domain name */ -#define RES_STAYOPEN 0x0100 /* Keep TCP socket open */ -#define RES_DNSRCH 0x0200 /* search up local domain tree */ - -#define RES_DEFAULT (RES_RECURSE | RES_DEFNAMES | RES_DNSRCH) - -extern struct state _res; - -#include - -/* Private routines shared between libc/net, named, nslookup and others. */ -#define dn_skipname __dn_skipname -#define fp_query __fp_query -#define hostalias __hostalias -#define putlong __putlong -#define putshort __putshort -#define p_class __p_class -#define p_time __p_time -#define p_type __p_type - -#if !defined(WINDOWS) && !defined(_WINDOWS) -__BEGIN_DECLS -int __dn_skipname __P((const u_char *, const u_char *)); -void __fp_query __P((char *, FILE *)); -char *__hostalias __P((const char *)); -void __putlong __P((u_long, u_char *)); -void __putshort __P((u_short, u_char *)); -char *__p_class __P((int)); -char *__p_time __P((u_long)); -char *__p_type __P((int)); - -int dn_comp __P((const u_char *, u_char *, int, u_char **, u_char **)); -int dn_expand __P((const u_char *, const u_char *, const u_char *, - u_char *, int)); -int res_init __P((void)); -int res_mkquery __P((int, const char *, int, int, const char *, int, - const struct rrec *, char *, int)); -int res_send __P((const char *, int, char *, int)); -__END_DECLS -#endif - -#endif /* !_RESOLV_H_ */ diff --git a/libraries/msdos/winsock/include/krb/mit/wshelper.h b/libraries/msdos/winsock/include/krb/mit/wshelper.h deleted file mode 100644 index 971c85a490..0000000000 --- a/libraries/msdos/winsock/include/krb/mit/wshelper.h +++ /dev/null @@ -1,62 +0,0 @@ -/* - WSHelper DNS/Hesiod Library for WINSOCK - wshelper.h -*/ - -#ifndef _WSHELPER_ -#define _WSHELPER_ - -#include -#include -#include - -#ifdef __cplusplus -extern "C" { -#endif - -int FAR PASCAL res_mkquery(int op, char FAR *dname, int qclass, int type, - char FAR *data, int datalen, struct rrec FAR *newrr, - char FAR *buf, int buflen); - -int FAR PASCAL res_send(char FAR *msg, int msglen, char FAR *answer, int anslen); - -int FAR PASCAL res_init(); - -int FAR PASCAL dn_comp(char FAR *exp_dn, char FAR *comp_dn, int length, - char FAR * FAR *dnptrs, char FAR * FAR *lastdnptr); - -int FAR PASCAL dn_expand(char FAR *msg, char FAR *eomorig, char FAR *comp_dn, - char FAR *exp_dn, int length); - -struct hostent FAR* FAR PASCAL rgethostbyname(char FAR *name); - -struct hostent FAR* FAR PASCAL rgethostbyaddr(char FAR *addr, int len, int type); - -LPSTR FAR PASCAL hes_to_bind(char FAR *HesiodName, char FAR *HesiodNameType); - -LPSTR * FAR PASCAL hes_resolve(char FAR *HesiodName, char FAR *HesiodNameType); - -int FAR PASCAL hes_error(void); - -void FAR PASCAL res_setopts(long opts); - -long FAR PASCAL res_getopts(void); - -unsigned long FAR PASCAL inet_aton(register const char *cp, struct in_addr *addr); - -LPSTR FAR PASCAL gethinfobyname(LPSTR name); - -LPSTR FAR PASCAL getmxbyname(LPSTR name); - -LPSTR FAR PASCAL getrecordbyname(LPSTR name, int rectype); - -DWORD FAR PASCAL rrhost( LPSTR lpHost ); - -struct servent FAR * FAR PASCAL rgetservbyname(LPSTR name, LPSTR proto); - -#ifdef __cplusplus -} -#endif - -#endif /* _WSHELPER_ */ - diff --git a/libraries/msdos/winsock/include/net/_sys/filio.h b/libraries/msdos/winsock/include/net/_sys/filio.h deleted file mode 100644 index f352fdd480..0000000000 --- a/libraries/msdos/winsock/include/net/_sys/filio.h +++ /dev/null @@ -1,4 +0,0 @@ -#ifndef _SOCKET -#include -#endif - diff --git a/libraries/msdos/winsock/include/net/_sys/ioctl.h b/libraries/msdos/winsock/include/net/_sys/ioctl.h deleted file mode 100644 index f352fdd480..0000000000 --- a/libraries/msdos/winsock/include/net/_sys/ioctl.h +++ /dev/null @@ -1,4 +0,0 @@ -#ifndef _SOCKET -#include -#endif - diff --git a/libraries/msdos/winsock/include/net/netdb.h b/libraries/msdos/winsock/include/net/netdb.h deleted file mode 100644 index f352fdd480..0000000000 --- a/libraries/msdos/winsock/include/net/netdb.h +++ /dev/null @@ -1,4 +0,0 @@ -#ifndef _SOCKET -#include -#endif - diff --git a/libraries/msdos/winsock/include/param.h b/libraries/msdos/winsock/include/param.h deleted file mode 100644 index cead0808d2..0000000000 --- a/libraries/msdos/winsock/include/param.h +++ /dev/null @@ -1,4 +0,0 @@ -/* - * This file is intentionally empty. Some compilers require the presence of - * an include file, even if the "#ifdef"s exclude it from actual use. PTUI ! - */ diff --git a/libraries/msdos/winsock/include/select.h b/libraries/msdos/winsock/include/select.h deleted file mode 100644 index cead0808d2..0000000000 --- a/libraries/msdos/winsock/include/select.h +++ /dev/null @@ -1,4 +0,0 @@ -/* - * This file is intentionally empty. Some compilers require the presence of - * an include file, even if the "#ifdef"s exclude it from actual use. PTUI ! - */ diff --git a/libraries/msdos/winsock/include/socket.h b/libraries/msdos/winsock/include/socket.h deleted file mode 100644 index cead0808d2..0000000000 --- a/libraries/msdos/winsock/include/socket.h +++ /dev/null @@ -1,4 +0,0 @@ -/* - * This file is intentionally empty. Some compilers require the presence of - * an include file, even if the "#ifdef"s exclude it from actual use. PTUI ! - */ diff --git a/libraries/msdos/winsock/include/time.h b/libraries/msdos/winsock/include/time.h deleted file mode 100644 index cead0808d2..0000000000 --- a/libraries/msdos/winsock/include/time.h +++ /dev/null @@ -1,4 +0,0 @@ -/* - * This file is intentionally empty. Some compilers require the presence of - * an include file, even if the "#ifdef"s exclude it from actual use. PTUI ! - */ diff --git a/libraries/msdos/winsock/include/wsa.h b/libraries/msdos/winsock/include/wsa.h deleted file mode 100644 index 808697c57c..0000000000 --- a/libraries/msdos/winsock/include/wsa.h +++ /dev/null @@ -1,132 +0,0 @@ -/* wsa.h */ -/* - * Copyright (c) 1993 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. - */ - -#ifndef _MSDOS_H -#define _MSDOS_H - -/* - * NOTE: This file should be included via ldap.h. Many symbols are - * defined here that are needed BEFORE anything else is included. - * Be careful !!! - */ -/* - * The following are defined within the Integrated Development Environment - * of Microsoft's Visual C++ Compiler (v1.52c) - * (Options/Project/Compiler/Preprocessor/Symbols and Macros to Define) - * But there's a (buffer length) limit to how long this list can be, so - * I'm doing the rest here in msdos.h - * WINSOCK, DOS, NEEDPROTOS, NO_USERINTERFACE - */ -/* - * MIT's krb.h doesn't use the symbols provided by Microsoft. - * It needs __MSDOS__ and WINDOWS. Normally _WINDOWS is provided by MS - * but it's based on having the prolog/epilog optimization switches set - * in a way that we don't set them. So define it manually. - * - * kbind.c needs __MSDOS__ for krb.h to include osconf.h - * which includes conf-pc.h which defines byte order and such - */ -#define __MSDOS__ -/* - * conf-pc.h wants WINDOWS rather than _WINDOWS which Microsoft provides - */ -#define WINDOWS - -/* - * Where two of the config files live in the windows environment - * There are two others also; ldfriend.cfg, & srchpref.cfg - * These names are different that the unix names due to 8.3 rule - */ -#define FILTERFILE "ldfilter.cfg" -#define TEMPLATEFILE "disptmpl.cfg" -/* - * These are not automatically defined for us even though we're a DLL. They - * are triggered by prolog/epilog configuration options that we don't use. - * But be careful not to redefine them for other apps that include this file. - */ -#ifndef _WINDLL -/* - * Needed by wshelper.h - */ -#define _WINDLL -#endif - -#ifndef _WINDOWS -/* - * Needed by authlib.h via kerberos.c via AUTHMAN - */ -#define _WINDOWS 1 -#endif - -/* - * KERBEROS must be defined as a preprocessor symbol in the compiler. - * It's too late to define it in this file. - */ - -/* - * AUTHMAN - Use Authlib.dll as a higher level interface to krbv4win.dll - * (kerberos). If defined, get_kerberosv4_credentials in kerberos.c is - * used and authlib.dll (and krbv4win.dll) are dynamically loaded and used. - * If AUTHMAN is not defined, the get_kerberosv4_credentials in - * kbind.c works just fine, but requires the presence of krbv4win.dll at - * load time. - */ -/* don't want to be dependent on authman - * #define AUTHMAN - */ - -/* - * define WSHELPER if you want wsockip.c to use rgethostbyaddr() (in - * WSHELPER.DLL) rather than gethostbyaddr(). You might want this if your - * gethostbyaddr() returns the WRONG host name and you want to use - * kerberos authentication (need host name to form service ticket - * request). Most won't want kerberos, and of those, there might actually - * be some vendors who really do the lookup rather than use cached info - * from gethostbyname() calls. - */ -#define WSHELPER -/* - * The new slapd stuff - */ -#define LDAP_REFERRALS -/* - * LDAP character string translation routines - * I compiled and tested these and they seemed to work. - * The thing to test with is: - * cn=Charset Test Entry, ou=SWITCHdirectory, o=SWITCH, c=CH - * - * I'm disabling it for release. -#define STR_TRANSLATION -#define LDAP_CHARSET_8859 88591 -#define LDAP_DEFAULT_CHARSET LDAP_CHARSET_8859 - */ - - - -#define LDAP_DEBUG -#include - - -#include -#include -#ifndef _WIN32 -#define memcpy( a, b, n ) _fmemcpy( a, b, n ) -#define strcpy( a, b ) _fstrcpy( a, b ) -#define strchr( a, c ) _fstrchr( a, c ) -#endif /* !_WIN32 */ -#define strcasecmp(a,b) stricmp(a,b) -#define strncasecmp(a,b,len) strnicmp(a,b,len) - -#endif /* _MSDOS_H */ - - diff --git a/libraries/msdos/winsock/include/wsa/errno.c b/libraries/msdos/winsock/include/wsa/errno.c deleted file mode 100644 index cb49c5fe62..0000000000 --- a/libraries/msdos/winsock/include/wsa/errno.c +++ /dev/null @@ -1,21 +0,0 @@ -#include - -/* Copies string corresponding to the error code provided */ -/* into buf, maximum length len. Returns length actually */ -/* copied to buffer, or zero if error code is unknown. */ -/* String resources should be present for each error code */ -/* using the value of the code as the string ID (except for */ -/* error = 0, which is mapped to WSABASEERR to keep it with */ -/* the others). The DLL is free to use any string IDs that */ -/* are less than WSABASEERR for its own use. The LibMain */ -/* procedure of the DLL is presumed to have saved its */ -/* HINSTANCE in the global variable hInst. */ - -int PASCAL FAR WSAsperror (int errorcode, char far * buf, int len) -{ - if (errorcode == 0) - errorcode = WSABASEERR; - if (errorcode < WSABASEERR) - return 0; - return LoadString(hInst,errorcode,buf,len); -} diff --git a/libraries/msdos/winsock/include/wsa/errno.rc b/libraries/msdos/winsock/include/wsa/errno.rc deleted file mode 100644 index 1252957877..0000000000 --- a/libraries/msdos/winsock/include/wsa/errno.rc +++ /dev/null @@ -1,57 +0,0 @@ -#include - -STRINGTABLE -BEGIN - WSABASEERR, "[0] No Error" - WSAEINTR, "[10004] Interrupted system call" - WSAEBADF, "[10009] Bad file number" - WSAEACCES, "[10013] Permission denied" - WSAEFAULT, "[10014] Bad address" - WSAEINVAL, "[10022] Invalid argument" - WSAEMFILE, "[10024] Too many open files" - WSAEWOULDBLOCK, "[10035] Operation would block" - WSAEINPROGRESS, "[10036] Operation now in progress" - WSAEALREADY, "[10037] Operation already in progress" - WSAENOTSOCK, "[10038] Socket operation on non-socket" - WSAEDESTADDRREQ, "[10039] Destination address required" - WSAEMSGSIZE, "[10040] Message too long" - WSAEPROTOTYPE, "[10041] Protocol wrong type for socket" - WSAENOPROTOOPT, "[10042] Bad protocol option" - WSAEPROTONOSUPPORT, "[10043] Protocol not supported" - WSAESOCKTNOSUPPORT, "[10044] Socket type not supported" - WSAEOPNOTSUPP, "[10045] Operation not supported on socket" - WSAEPFNOSUPPORT, "[10046] Protocol family not supported" - WSAEAFNOSUPPORT, "[10047] Address family not supported by protocol family" - WSAEADDRINUSE, "[10048] Address already in use" - WSAEADDRNOTAVAIL, "[10049] Can't assign requested address" - WSAENETDOWN, "[10050] Network is down" - WSAENETUNREACH, "[10051] Network is unreachable" - WSAENETRESET, "[10052] Net dropped connection or reset" - WSAECONNABORTED, "[10053] Software caused connection abort" - WSAECONNRESET, "[10054] Connection reset by peer" - WSAENOBUFS, "[10055] No buffer space available" - WSAEISCONN, "[10056] Socket is already connected" - WSAENOTCONN, "[10057] Socket is not connected" - WSAESHUTDOWN, "[10058] Can't send after socket shutdown" - WSAETOOMANYREFS, "[10059] Too many references, can't splice" - WSAETIMEDOUT, "[10060] Connection timed out" - WSAECONNREFUSED, "[10061] Connection refused" - WSAELOOP, "[10062] Too many levels of symbolic links" - WSAENAMETOOLONG, "[10063] File name too long" - WSAEHOSTDOWN, "[10064] Host is down" - WSAEHOSTUNREACH, "[10065] No Route to Host" - WSAENOTEMPTY, "[10066] Directory not empty" - WSAEPROCLIM, "[10067] Too many processes" - WSAEUSERS, "[10068] Too many users" - WSAEDQUOT, "[10069] Disc Quota Exceeded" - WSAESTALE, "[10070] Stale NFS file handle" - WSAEREMOTE, "[10071] Too many levels of remote in path" - WSASYSNOTREADY, "[10091] Network SubSystem is unavailable" - WSAVERNOTSUPPORTED, "[10092] WINSOCK DLL Version out of range" - WSANOTINITIALIZED, "[10093] Successful WSASTARTUP not yet performed" - WSAHOST_NOT_FOUND, "[11001] Host not found" - WSATRY_AGAIN, "[11002] Non-Authoritative Host not found" - WSANO_RECOVERY, "[11003] Non-Recoverable errors: FORMERR, REFUSED, NOTIMP" - WSANO_DATA, "[11004] Valid name, no data record of requested -type" -END diff --git a/libraries/msdos/winsock/include/wsa/winsock.def b/libraries/msdos/winsock/include/wsa/winsock.def deleted file mode 100644 index 0aa0953284..0000000000 --- a/libraries/msdos/winsock/include/wsa/winsock.def +++ /dev/null @@ -1,84 +0,0 @@ -; -; File: winsock.def -; System: MS-Windows 3.x -; Summary: Module definition file for Windows Sockets DLL. -; - -LIBRARY WINSOCK ; Application's module name - -DESCRIPTION 'BSD Socket API for Windows' - -EXETYPE WINDOWS ; required for all windows applications - -STUB 'WINSTUB.EXE' ; generates error message if application - ; is run without Windows - -;CODE can be FIXED in memory because of potential upcalls -CODE PRELOAD FIXED - -;DATA must be SINGLE and at a FIXED location since this is a DLL -DATA PRELOAD FIXED SINGLE - -HEAPSIZE 1024 -STACKSIZE 16384 - -; All functions that will be called by any Windows routine -; must be exported. Any additional exports beyond those defined -; here must have ordinal numbers 1000 or above. - -EXPORTS - accept @1 - bind @2 - closesocket @3 - connect @4 - getpeername @5 - getsockname @6 - getsockopt @7 - htonl @8 - htons @9 - inet_addr @10 - inet_ntoa @11 - ioctlsocket @12 - listen @13 - ntohl @14 - ntohs @15 - recv @16 - recvfrom @17 - select @18 - send @19 - sendto @20 - setsockopt @21 - shutdown @22 - socket @23 - - gethostbyaddr @51 - gethostbyname @52 - getprotobyname @53 - getprotobynumber @54 - getservbyname @55 - getservbyport @56 - gethostname @57 - - WSAAsyncSelect @101 - WSAAsyncGetHostByAddr @102 - WSAAsyncGetHostByName @103 - WSAAsyncGetProtoByNumber @104 - WSAAsyncGetProtoByName @105 - WSAAsyncGetServByPort @106 - WSAAsyncGetServByName @107 - WSACancelAsyncRequest @108 - WSASetBlockingHook @109 - WSAUnhookBlockingHook @110 - WSAGetLastError @111 - WSASetLastError @112 - WSACancelBlockingCall @113 - WSAIsBlocking @114 - WSAStartup @115 - WSACleanup @116 - - __WSAFDIsSet @151 - - WEP @500 RESIDENTNAME - -;eof - diff --git a/libraries/msdos/winsock/include/wsa/winsock.h b/libraries/msdos/winsock/include/wsa/winsock.h deleted file mode 100644 index c73fe4ca16..0000000000 --- a/libraries/msdos/winsock/include/wsa/winsock.h +++ /dev/null @@ -1,906 +0,0 @@ -/* WINSOCK.H--definitions to be used with the WINSOCK.DLL - * - * This header file corresponds to version 1.1 of the Windows Sockets specification. - * - * This file includes parts which are Copyright (c) 1982-1986 Regents - * of the University of California. All rights reserved. The - * Berkeley Software License Agreement specifies the terms and - * conditions for redistribution. - * - * Change log: - * - * Fri Apr 23 16:31:01 1993 Mark Towfiq (towfiq@Microdyne.COM) - * New version from David Treadwell which adds extern "C" around - * __WSAFDIsSet() and removes "const" from buf param of - * WSAAsyncGetHostByAddr(). Added change log. - * - * Sat May 15 10:55:00 1993 David Treadwell (davidtr@microsoft.com) - * Fix the IN_CLASSC macro to account for class-D multicasts. - * Add AF_IPX == AF_NS. - * - */ - -#ifndef _WINSOCKAPI_ -#define _WINSOCKAPI_ - -/* - * Pull in WINDOWS.H if necessary - */ -#ifndef _INC_WINDOWS -#include -#endif /* _INC_WINDOWS */ - -/* - * Basic system type definitions, taken from the BSD file sys/types.h. - */ -typedef unsigned char u_char; -typedef unsigned short u_short; -typedef unsigned int u_int; -typedef unsigned long u_long; - -/* - * The new type to be used in all - * instances which refer to sockets. - */ -typedef u_int SOCKET; - -/* - * Select uses arrays of SOCKETs. These macros manipulate such - * arrays. FD_SETSIZE may be defined by the user before including - * this file, but the default here should be >= 64. - * - * CAVEAT IMPLEMENTOR and USER: THESE MACROS AND TYPES MUST BE - * INCLUDED IN WINSOCK.H EXACTLY AS SHOWN HERE. - */ -#ifndef FD_SETSIZE -#define FD_SETSIZE 64 -#endif /* FD_SETSIZE */ - -typedef struct fd_set { - u_int fd_count; /* how many are SET? */ - SOCKET fd_array[FD_SETSIZE]; /* an array of SOCKETs */ -} fd_set; - -#ifdef __cplusplus -extern "C" { -#endif - -extern int PASCAL FAR __WSAFDIsSet(SOCKET, fd_set FAR *); - -#ifdef __cplusplus -} -#endif - - -#define FD_CLR(fd, set) do { \ - u_int __i; \ - for (__i = 0; __i < ((fd_set FAR *)(set))->fd_count ; __i++) { \ - if (((fd_set FAR *)(set))->fd_array[__i] == fd) { \ - while (__i < ((fd_set FAR *)(set))->fd_count-1) { \ - ((fd_set FAR *)(set))->fd_array[__i] = \ - ((fd_set FAR *)(set))->fd_array[__i+1]; \ - __i++; \ - } \ - ((fd_set FAR *)(set))->fd_count--; \ - break; \ - } \ - } \ -} while(0) - -#define FD_SET(fd, set) do { \ - if (((fd_set FAR *)(set))->fd_count < FD_SETSIZE) \ - ((fd_set FAR *)(set))->fd_array[((fd_set FAR *)(set))->fd_count++]=(fd);\ -} while(0) - -#define FD_ZERO(set) (((fd_set FAR *)(set))->fd_count=0) - -#define FD_ISSET(fd, set) __WSAFDIsSet((SOCKET)(fd), (fd_set FAR *)(set)) - -/* - * Structure used in select() call, taken from the BSD file sys/time.h. - */ -struct timeval { - long tv_sec; /* seconds */ - long tv_usec; /* and microseconds */ -}; - -/* - * Operations on timevals. - * - * NB: timercmp does not work for >= or <=. - */ -#define timerisset(tvp) ((tvp)->tv_sec || (tvp)->tv_usec) -#define timercmp(tvp, uvp, cmp) \ - ((tvp)->tv_sec cmp (uvp)->tv_sec || \ - (tvp)->tv_sec == (uvp)->tv_sec && (tvp)->tv_usec cmp (uvp)->tv_usec) -#define timerclear(tvp) (tvp)->tv_sec = (tvp)->tv_usec = 0 - -/* - * Commands for ioctlsocket(), taken from the BSD file fcntl.h. - * - * - * Ioctl's have the command encoded in the lower word, - * and the size of any in or out parameters in the upper - * word. The high 2 bits of the upper word are used - * to encode the in/out status of the parameter; for now - * we restrict parameters to at most 128 bytes. - */ -#define IOCPARM_MASK 0x7f /* parameters must be < 128 bytes */ -#define IOC_VOID 0x20000000 /* no parameters */ -#define IOC_OUT 0x40000000 /* copy out parameters */ -#define IOC_IN 0x80000000 /* copy in parameters */ -#define IOC_INOUT (IOC_IN|IOC_OUT) - /* 0x20000000 distinguishes new & - old ioctl's */ -#define _IO(x,y) (IOC_VOID|((x)<<8)|(y)) - -#define _IOR(x,y,t) (IOC_OUT|(((long)sizeof(t)&IOCPARM_MASK)<<16)|((x)<<8)|(y)) - -#define _IOW(x,y,t) (IOC_IN|(((long)sizeof(t)&IOCPARM_MASK)<<16)|((x)<<8)|(y)) - -#define FIONREAD _IOR('f', 127, u_long) /* get # bytes to read */ -#define FIONBIO _IOW('f', 126, u_long) /* set/clear non-blocking i/o */ -#define FIOASYNC _IOW('f', 125, u_long) /* set/clear async i/o */ - -/* Socket I/O Controls */ -#define SIOCSHIWAT _IOW('s', 0, u_long) /* set high watermark */ -#define SIOCGHIWAT _IOR('s', 1, u_long) /* get high watermark */ -#define SIOCSLOWAT _IOW('s', 2, u_long) /* set low watermark */ -#define SIOCGLOWAT _IOR('s', 3, u_long) /* get low watermark */ -#define SIOCATMARK _IOR('s', 7, u_long) /* at oob mark? */ - -/* - * Structures returned by network data base library, taken from the - * BSD file netdb.h. All addresses are supplied in host order, and - * returned in network order (suitable for use in system calls). - */ - -struct hostent { - char FAR * h_name; /* official name of host */ - char FAR * FAR * h_aliases; /* alias list */ - short h_addrtype; /* host address type */ - short h_length; /* length of address */ - char FAR * FAR * h_addr_list; /* list of addresses */ -#define h_addr h_addr_list[0] /* address, for backward compat */ -}; - -/* - * It is assumed here that a network number - * fits in 32 bits. - */ -struct netent { - char FAR * n_name; /* official name of net */ - char FAR * FAR * n_aliases; /* alias list */ - short n_addrtype; /* net address type */ - u_long n_net; /* network # */ -}; - -struct servent { - char FAR * s_name; /* official service name */ - char FAR * FAR * s_aliases; /* alias list */ - short s_port; /* port # */ - char FAR * s_proto; /* protocol to use */ -}; - -struct protoent { - char FAR * p_name; /* official protocol name */ - char FAR * FAR * p_aliases; /* alias list */ - short p_proto; /* protocol # */ -}; - -/* - * Constants and structures defined by the internet system, - * Per RFC 790, September 1981, taken from the BSD file netinet/in.h. - */ - -/* - * Protocols - */ -#define IPPROTO_IP 0 /* dummy for IP */ -#define IPPROTO_ICMP 1 /* control message protocol */ -#define IPPROTO_GGP 2 /* gateway^2 (deprecated) */ -#define IPPROTO_TCP 6 /* tcp */ -#define IPPROTO_PUP 12 /* pup */ -#define IPPROTO_UDP 17 /* user datagram protocol */ -#define IPPROTO_IDP 22 /* xns idp */ -#define IPPROTO_ND 77 /* UNOFFICIAL net disk proto */ - -#define IPPROTO_RAW 255 /* raw IP packet */ -#define IPPROTO_MAX 256 - -/* - * Port/socket numbers: network standard functions - */ -#define IPPORT_ECHO 7 -#define IPPORT_DISCARD 9 -#define IPPORT_SYSTAT 11 -#define IPPORT_DAYTIME 13 -#define IPPORT_NETSTAT 15 -#define IPPORT_FTP 21 -#define IPPORT_TELNET 23 -#define IPPORT_SMTP 25 -#define IPPORT_TIMESERVER 37 -#define IPPORT_NAMESERVER 42 -#define IPPORT_WHOIS 43 -#define IPPORT_MTP 57 - -/* - * Port/socket numbers: host specific functions - */ -#define IPPORT_TFTP 69 -#define IPPORT_RJE 77 -#define IPPORT_FINGER 79 -#define IPPORT_TTYLINK 87 -#define IPPORT_SUPDUP 95 - -/* - * UNIX TCP sockets - */ -#define IPPORT_EXECSERVER 512 -#define IPPORT_LOGINSERVER 513 -#define IPPORT_CMDSERVER 514 -#define IPPORT_EFSSERVER 520 - -/* - * UNIX UDP sockets - */ -#define IPPORT_BIFFUDP 512 -#define IPPORT_WHOSERVER 513 -#define IPPORT_ROUTESERVER 520 - /* 520+1 also used */ - -/* - * Ports < IPPORT_RESERVED are reserved for - * privileged processes (e.g. root). - */ -#define IPPORT_RESERVED 1024 - -/* - * Link numbers - */ -#define IMPLINK_IP 155 -#define IMPLINK_LOWEXPER 156 -#define IMPLINK_HIGHEXPER 158 - -/* - * Internet address (old style... should be updated) - */ -struct in_addr { - union { - struct { u_char s_b1,s_b2,s_b3,s_b4; } S_un_b; - struct { u_short s_w1,s_w2; } S_un_w; - u_long S_addr; - } S_un; -#define s_addr S_un.S_addr - /* can be used for most tcp & ip code */ -#define s_host S_un.S_un_b.s_b2 - /* host on imp */ -#define s_net S_un.S_un_b.s_b1 - /* network */ -#define s_imp S_un.S_un_w.s_w2 - /* imp */ -#define s_impno S_un.S_un_b.s_b4 - /* imp # */ -#define s_lh S_un.S_un_b.s_b3 - /* logical host */ -}; - -/* - * Definitions of bits in internet address integers. - * On subnets, the decomposition of addresses to host and net parts - * is done according to subnet mask, not the masks here. - */ -#define IN_CLASSA(i) (((long)(i) & 0x80000000) == 0) -#define IN_CLASSA_NET 0xff000000 -#define IN_CLASSA_NSHIFT 24 -#define IN_CLASSA_HOST 0x00ffffff -#define IN_CLASSA_MAX 128 - -#define IN_CLASSB(i) (((long)(i) & 0xc0000000) == 0x80000000) -#define IN_CLASSB_NET 0xffff0000 -#define IN_CLASSB_NSHIFT 16 -#define IN_CLASSB_HOST 0x0000ffff -#define IN_CLASSB_MAX 65536 - -#define IN_CLASSC(i) (((long)(i) & 0xe0000000) == 0xc0000000) -#define IN_CLASSC_NET 0xffffff00 -#define IN_CLASSC_NSHIFT 8 -#define IN_CLASSC_HOST 0x000000ff - -#define INADDR_ANY (u_long)0x00000000 -#define INADDR_LOOPBACK 0x7f000001 -#define INADDR_BROADCAST (u_long)0xffffffff -#define INADDR_NONE 0xffffffff - -/* - * Socket address, internet style. - */ -struct sockaddr_in { - short sin_family; - u_short sin_port; - struct in_addr sin_addr; - char sin_zero[8]; -}; - -#define WSADESCRIPTION_LEN 256 -#define WSASYS_STATUS_LEN 128 - -typedef struct WSAData { - WORD wVersion; - WORD wHighVersion; - char szDescription[WSADESCRIPTION_LEN+1]; - char szSystemStatus[WSASYS_STATUS_LEN+1]; - unsigned short iMaxSockets; - unsigned short iMaxUdpDg; - char FAR * lpVendorInfo; -} WSADATA; - -typedef WSADATA FAR *LPWSADATA; - -/* - * Options for use with [gs]etsockopt at the IP level. - */ -#define IP_OPTIONS 1 /* set/get IP per-packet options */ -#define IP_MULTICAST_IF 2 /* set/get IP multicast interface */ -#define IP_MULTICAST_TTL 3 /* set/get IP multicast timetolive */ -#define IP_MULTICAST_LOOP 4 /* set/get IP multicast loopback */ -#define IP_ADD_MEMBERSHIP 5 /* add an IP group membership */ -#define IP_DROP_MEMBERSHIP 6 /* drop an IP group membership */ - -#define IP_DEFAULT_MULTICAST_TTL 1 /* normally limit m'casts to 1 hop */ -#define IP_DEFAULT_MULTICAST_LOOP 1 /* normally hear sends if a member */ -#define IP_MAX_MEMBERSHIPS 20 /* per socket; must fit in one mbuf */ - -/* - * Argument structure for IP_ADD_MEMBERSHIP and IP_DROP_MEMBERSHIP. - */ -struct ip_mreq { - struct in_addr imr_multiaddr; /* IP multicast address of group */ - struct in_addr imr_interface; /* local IP address of interface */ -}; - -/* - * Definitions related to sockets: types, address families, options, - * taken from the BSD file sys/socket.h. - */ - -/* - * This is used instead of -1, since the - * SOCKET type is unsigned. - */ -#define INVALID_SOCKET (SOCKET)(~0) -#define SOCKET_ERROR (-1) - -/* - * Types - */ -#define SOCK_STREAM 1 /* stream socket */ -#define SOCK_DGRAM 2 /* datagram socket */ -#define SOCK_RAW 3 /* raw-protocol interface */ -#define SOCK_RDM 4 /* reliably-delivered message */ -#define SOCK_SEQPACKET 5 /* sequenced packet stream */ - -/* - * Option flags per-socket. - */ -#define SO_DEBUG 0x0001 /* turn on debugging info recording */ -#define SO_ACCEPTCONN 0x0002 /* socket has had listen() */ -#define SO_REUSEADDR 0x0004 /* allow local address reuse */ -#define SO_KEEPALIVE 0x0008 /* keep connections alive */ -#define SO_DONTROUTE 0x0010 /* just use interface addresses */ -#define SO_BROADCAST 0x0020 /* permit sending of broadcast msgs */ -#define SO_USELOOPBACK 0x0040 /* bypass hardware when possible */ -#define SO_LINGER 0x0080 /* linger on close if data present */ -#define SO_OOBINLINE 0x0100 /* leave received OOB data in line */ - -#define SO_DONTLINGER (u_int)(~SO_LINGER) - -/* - * Additional options. - */ -#define SO_SNDBUF 0x1001 /* send buffer size */ -#define SO_RCVBUF 0x1002 /* receive buffer size */ -#define SO_SNDLOWAT 0x1003 /* send low-water mark */ -#define SO_RCVLOWAT 0x1004 /* receive low-water mark */ -#define SO_SNDTIMEO 0x1005 /* send timeout */ -#define SO_RCVTIMEO 0x1006 /* receive timeout */ -#define SO_ERROR 0x1007 /* get error status and clear */ -#define SO_TYPE 0x1008 /* get socket type */ - -/* - * Options for connect and disconnect data and options. Used only by - * non-TCP/IP transports such as DECNet, OSI TP4, etc. - */ -#define SO_CONNDATA 0x7000 -#define SO_CONNOPT 0x7001 -#define SO_DISCDATA 0x7002 -#define SO_DISCOPT 0x7003 -#define SO_CONNDATALEN 0x7004 -#define SO_CONNOPTLEN 0x7005 -#define SO_DISCDATALEN 0x7006 -#define SO_DISCOPTLEN 0x7007 - -/* - * Option for opening sockets for synchronous access. - */ -#define SO_OPENTYPE 0x7008 - -#define SO_SYNCHRONOUS_ALERT 0x10 -#define SO_SYNCHRONOUS_NONALERT 0x20 - -/* - * Other NT-specific options. - */ -#define SO_MAXDG 0x7009 -#define SO_MAXPATHDG 0x700A - -/* - * TCP options. - */ -#define TCP_NODELAY 0x0001 -#define TCP_BSDURGENT 0x7000 - -/* - * Address families. - */ -#define AF_UNSPEC 0 /* unspecified */ -#define AF_UNIX 1 /* local to host (pipes, portals) */ -#define AF_INET 2 /* internetwork: UDP, TCP, etc. */ -#define AF_IMPLINK 3 /* arpanet imp addresses */ -#define AF_PUP 4 /* pup protocols: e.g. BSP */ -#define AF_CHAOS 5 /* mit CHAOS protocols */ -#define AF_IPX 6 /* IPX and SPX */ -#define AF_NS 6 /* XEROX NS protocols */ -#define AF_ISO 7 /* ISO protocols */ -#define AF_OSI AF_ISO /* OSI is ISO */ -#define AF_ECMA 8 /* european computer manufacturers */ -#define AF_DATAKIT 9 /* datakit protocols */ -#define AF_CCITT 10 /* CCITT protocols, X.25 etc */ -#define AF_SNA 11 /* IBM SNA */ -#define AF_DECnet 12 /* DECnet */ -#define AF_DLI 13 /* Direct data link interface */ -#define AF_LAT 14 /* LAT */ -#define AF_HYLINK 15 /* NSC Hyperchannel */ -#define AF_APPLETALK 16 /* AppleTalk */ -#define AF_NETBIOS 17 /* NetBios-style addresses */ - -#define AF_MAX 18 - -/* - * Structure used by kernel to store most - * addresses. - */ -struct sockaddr { - u_short sa_family; /* address family */ - char sa_data[14]; /* up to 14 bytes of direct address */ -}; - -/* - * Structure used by kernel to pass protocol - * information in raw sockets. - */ -struct sockproto { - u_short sp_family; /* address family */ - u_short sp_protocol; /* protocol */ -}; - -/* - * Protocol families, same as address families for now. - */ -#define PF_UNSPEC AF_UNSPEC -#define PF_UNIX AF_UNIX -#define PF_INET AF_INET -#define PF_IMPLINK AF_IMPLINK -#define PF_PUP AF_PUP -#define PF_CHAOS AF_CHAOS -#define PF_NS AF_NS -#define PF_IPX AF_IPX -#define PF_ISO AF_ISO -#define PF_OSI AF_OSI -#define PF_ECMA AF_ECMA -#define PF_DATAKIT AF_DATAKIT -#define PF_CCITT AF_CCITT -#define PF_SNA AF_SNA -#define PF_DECnet AF_DECnet -#define PF_DLI AF_DLI -#define PF_LAT AF_LAT -#define PF_HYLINK AF_HYLINK -#define PF_APPLETALK AF_APPLETALK - -#define PF_MAX AF_MAX - -/* - * Structure used for manipulating linger option. - */ -struct linger { - u_short l_onoff; /* option on/off */ - u_short l_linger; /* linger time */ -}; - -/* - * Level number for (get/set)sockopt() to apply to socket itself. - */ -#define SOL_SOCKET 0xffff /* options for socket level */ - -/* - * Maximum queue length specifiable by listen. - */ -#define SOMAXCONN 5 - -#define MSG_OOB 0x1 /* process out-of-band data */ -#define MSG_PEEK 0x2 /* peek at incoming message */ -#define MSG_DONTROUTE 0x4 /* send without using routing tables */ - -#define MSG_MAXIOVLEN 16 - -#define MSG_PARTIAL 0x8000 /* partial send or recv for message xport */ - -/* - * Define constant based on rfc883, used by gethostbyxxxx() calls. - */ -#define MAXGETHOSTSTRUCT 1024 - -/* - * Define flags to be used with the WSAAsyncSelect() call. - */ -#define FD_READ 0x01 -#define FD_WRITE 0x02 -#define FD_OOB 0x04 -#define FD_ACCEPT 0x08 -#define FD_CONNECT 0x10 -#define FD_CLOSE 0x20 - -/* - * All Windows Sockets error constants are biased by WSABASEERR from - * the "normal" - */ -#define WSABASEERR 10000 -/* - * Windows Sockets definitions of regular Microsoft C error constants - */ -#define WSAEINTR (WSABASEERR+4) -#define WSAEBADF (WSABASEERR+9) -#define WSAEACCES (WSABASEERR+13) -#define WSAEFAULT (WSABASEERR+14) -#define WSAEINVAL (WSABASEERR+22) -#define WSAEMFILE (WSABASEERR+24) - -/* - * Windows Sockets definitions of regular Berkeley error constants - */ -#define WSAEWOULDBLOCK (WSABASEERR+35) -#define WSAEINPROGRESS (WSABASEERR+36) -#define WSAEALREADY (WSABASEERR+37) -#define WSAENOTSOCK (WSABASEERR+38) -#define WSAEDESTADDRREQ (WSABASEERR+39) -#define WSAEMSGSIZE (WSABASEERR+40) -#define WSAEPROTOTYPE (WSABASEERR+41) -#define WSAENOPROTOOPT (WSABASEERR+42) -#define WSAEPROTONOSUPPORT (WSABASEERR+43) -#define WSAESOCKTNOSUPPORT (WSABASEERR+44) -#define WSAEOPNOTSUPP (WSABASEERR+45) -#define WSAEPFNOSUPPORT (WSABASEERR+46) -#define WSAEAFNOSUPPORT (WSABASEERR+47) -#define WSAEADDRINUSE (WSABASEERR+48) -#define WSAEADDRNOTAVAIL (WSABASEERR+49) -#define WSAENETDOWN (WSABASEERR+50) -#define WSAENETUNREACH (WSABASEERR+51) -#define WSAENETRESET (WSABASEERR+52) -#define WSAECONNABORTED (WSABASEERR+53) -#define WSAECONNRESET (WSABASEERR+54) -#define WSAENOBUFS (WSABASEERR+55) -#define WSAEISCONN (WSABASEERR+56) -#define WSAENOTCONN (WSABASEERR+57) -#define WSAESHUTDOWN (WSABASEERR+58) -#define WSAETOOMANYREFS (WSABASEERR+59) -#define WSAETIMEDOUT (WSABASEERR+60) -#define WSAECONNREFUSED (WSABASEERR+61) -#define WSAELOOP (WSABASEERR+62) -#define WSAENAMETOOLONG (WSABASEERR+63) -#define WSAEHOSTDOWN (WSABASEERR+64) -#define WSAEHOSTUNREACH (WSABASEERR+65) -#define WSAENOTEMPTY (WSABASEERR+66) -#define WSAEPROCLIM (WSABASEERR+67) -#define WSAEUSERS (WSABASEERR+68) -#define WSAEDQUOT (WSABASEERR+69) -#define WSAESTALE (WSABASEERR+70) -#define WSAEREMOTE (WSABASEERR+71) - -#define WSAEDISCON (WSABASEERR+101) - -/* - * Extended Windows Sockets error constant definitions - */ -#define WSASYSNOTREADY (WSABASEERR+91) -#define WSAVERNOTSUPPORTED (WSABASEERR+92) -#define WSANOTINITIALISED (WSABASEERR+93) - -/* - * Error return codes from gethostbyname() and gethostbyaddr() - * (when using the resolver). Note that these errors are - * retrieved via WSAGetLastError() and must therefore follow - * the rules for avoiding clashes with error numbers from - * specific implementations or language run-time systems. - * For this reason the codes are based at WSABASEERR+1001. - * Note also that [WSA]NO_ADDRESS is defined only for - * compatibility purposes. - */ - -#define h_errno WSAGetLastError() - -/* Authoritative Answer: Host not found */ -#define WSAHOST_NOT_FOUND (WSABASEERR+1001) -#define HOST_NOT_FOUND WSAHOST_NOT_FOUND - -/* Non-Authoritative: Host not found, or SERVERFAIL */ -#define WSATRY_AGAIN (WSABASEERR+1002) -#define TRY_AGAIN WSATRY_AGAIN - -/* Non recoverable errors, FORMERR, REFUSED, NOTIMP */ -#define WSANO_RECOVERY (WSABASEERR+1003) -#define NO_RECOVERY WSANO_RECOVERY - -/* Valid name, no data record of requested type */ -#define WSANO_DATA (WSABASEERR+1004) -#define NO_DATA WSANO_DATA - -/* no address, look for MX record */ -#define WSANO_ADDRESS WSANO_DATA -#define NO_ADDRESS WSANO_ADDRESS - -/* - * Windows Sockets errors redefined as regular Berkeley error constants. - * These are commented out in Windows NT to avoid conflicts with errno.h. - * Use the WSA constants instead. - */ -#if 0 -#define EWOULDBLOCK WSAEWOULDBLOCK -#define EINPROGRESS WSAEINPROGRESS -#define EALREADY WSAEALREADY -#define ENOTSOCK WSAENOTSOCK -#define EDESTADDRREQ WSAEDESTADDRREQ -#define EMSGSIZE WSAEMSGSIZE -#define EPROTOTYPE WSAEPROTOTYPE -#define ENOPROTOOPT WSAENOPROTOOPT -#define EPROTONOSUPPORT WSAEPROTONOSUPPORT -#define ESOCKTNOSUPPORT WSAESOCKTNOSUPPORT -#define EOPNOTSUPP WSAEOPNOTSUPP -#define EPFNOSUPPORT WSAEPFNOSUPPORT -#define EAFNOSUPPORT WSAEAFNOSUPPORT -#define EADDRINUSE WSAEADDRINUSE -#define EADDRNOTAVAIL WSAEADDRNOTAVAIL -#define ENETDOWN WSAENETDOWN -#define ENETUNREACH WSAENETUNREACH -#define ENETRESET WSAENETRESET -#define ECONNABORTED WSAECONNABORTED -#define ECONNRESET WSAECONNRESET -#define ENOBUFS WSAENOBUFS -#define EISCONN WSAEISCONN -#define ENOTCONN WSAENOTCONN -#define ESHUTDOWN WSAESHUTDOWN -#define ETOOMANYREFS WSAETOOMANYREFS -#define ETIMEDOUT WSAETIMEDOUT -#define ECONNREFUSED WSAECONNREFUSED -#define ELOOP WSAELOOP -#define ENAMETOOLONG WSAENAMETOOLONG -#define EHOSTDOWN WSAEHOSTDOWN -#define EHOSTUNREACH WSAEHOSTUNREACH -#define ENOTEMPTY WSAENOTEMPTY -#define EPROCLIM WSAEPROCLIM -#define EUSERS WSAEUSERS -#define EDQUOT WSAEDQUOT -#define ESTALE WSAESTALE -#define EREMOTE WSAEREMOTE -#endif - -/* Socket function prototypes */ - -#ifdef __cplusplus -extern "C" { -#endif - -SOCKET PASCAL FAR accept (SOCKET s, struct sockaddr FAR *addr, - int FAR *addrlen); - -int PASCAL FAR bind (SOCKET s, const struct sockaddr FAR *addr, int namelen); - -int PASCAL FAR closesocket (SOCKET s); - -int PASCAL FAR connect (SOCKET s, const struct sockaddr FAR *name, int namelen); - -int PASCAL FAR ioctlsocket (SOCKET s, long cmd, u_long FAR *argp); - -int PASCAL FAR getpeername (SOCKET s, struct sockaddr FAR *name, - int FAR * namelen); - -int PASCAL FAR getsockname (SOCKET s, struct sockaddr FAR *name, - int FAR * namelen); - -int PASCAL FAR getsockopt (SOCKET s, int level, int optname, - char FAR * optval, int FAR *optlen); - -u_long PASCAL FAR htonl (u_long hostlong); - -u_short PASCAL FAR htons (u_short hostshort); - -unsigned long PASCAL FAR inet_addr (const char FAR * cp); - -char FAR * PASCAL FAR inet_ntoa (struct in_addr in); - -int PASCAL FAR listen (SOCKET s, int backlog); - -u_long PASCAL FAR ntohl (u_long netlong); - -u_short PASCAL FAR ntohs (u_short netshort); - -int PASCAL FAR recv (SOCKET s, char FAR * buf, int len, int flags); - -int PASCAL FAR recvfrom (SOCKET s, char FAR * buf, int len, int flags, - struct sockaddr FAR *from, int FAR * fromlen); - -int PASCAL FAR select (int nfds, fd_set FAR *readfds, fd_set FAR *writefds, - fd_set FAR *exceptfds, const struct timeval FAR *timeout); - -int PASCAL FAR send (SOCKET s, const char FAR * buf, int len, int flags); - -int PASCAL FAR sendto (SOCKET s, const char FAR * buf, int len, int flags, - const struct sockaddr FAR *to, int tolen); - -int PASCAL FAR setsockopt (SOCKET s, int level, int optname, - const char FAR * optval, int optlen); - -int PASCAL FAR shutdown (SOCKET s, int how); - -SOCKET PASCAL FAR socket (int af, int type, int protocol); - -/* Database function prototypes */ - -struct hostent FAR * PASCAL FAR gethostbyaddr(const char FAR * addr, - int len, int type); - -struct hostent FAR * PASCAL FAR gethostbyname(const char FAR * name); - -int PASCAL FAR gethostname (char FAR * name, int namelen); - -struct servent FAR * PASCAL FAR getservbyport(int port, const char FAR * proto); - -struct servent FAR * PASCAL FAR getservbyname(const char FAR * name, - const char FAR * proto); - -struct protoent FAR * PASCAL FAR getprotobynumber(int proto); - -struct protoent FAR * PASCAL FAR getprotobyname(const char FAR * name); - -/* Microsoft Windows Extension function prototypes */ - -int PASCAL FAR WSAStartup(WORD wVersionRequired, LPWSADATA lpWSAData); - -int PASCAL FAR WSACleanup(void); - -void PASCAL FAR WSASetLastError(int iError); - -int PASCAL FAR WSAGetLastError(void); - -BOOL PASCAL FAR WSAIsBlocking(void); - -int PASCAL FAR WSAUnhookBlockingHook(void); - -FARPROC PASCAL FAR WSASetBlockingHook(FARPROC lpBlockFunc); - -int PASCAL FAR WSACancelBlockingCall(void); - -HANDLE PASCAL FAR WSAAsyncGetServByName(HWND hWnd, u_int wMsg, - const char FAR * name, - const char FAR * proto, - char FAR * buf, int buflen); - -HANDLE PASCAL FAR WSAAsyncGetServByPort(HWND hWnd, u_int wMsg, int port, - const char FAR * proto, char FAR * buf, - int buflen); - -HANDLE PASCAL FAR WSAAsyncGetProtoByName(HWND hWnd, u_int wMsg, - const char FAR * name, char FAR * buf, - int buflen); - -HANDLE PASCAL FAR WSAAsyncGetProtoByNumber(HWND hWnd, u_int wMsg, - int number, char FAR * buf, - int buflen); - -HANDLE PASCAL FAR WSAAsyncGetHostByName(HWND hWnd, u_int wMsg, - const char FAR * name, char FAR * buf, - int buflen); - -HANDLE PASCAL FAR WSAAsyncGetHostByAddr(HWND hWnd, u_int wMsg, - const char FAR * addr, int len, int type, - char FAR * buf, int buflen); - -int PASCAL FAR WSACancelAsyncRequest(HANDLE hAsyncTaskHandle); - -int PASCAL FAR WSAAsyncSelect(SOCKET s, HWND hWnd, u_int wMsg, - long lEvent); - -int PASCAL FAR WSARecvEx (SOCKET s, char FAR * buf, int len, int FAR *flags); - -#ifdef __cplusplus -} -#endif - -/* Microsoft Windows Extended data types */ -typedef struct sockaddr SOCKADDR; -typedef struct sockaddr *PSOCKADDR; -typedef struct sockaddr FAR *LPSOCKADDR; - -typedef struct sockaddr_in SOCKADDR_IN; -typedef struct sockaddr_in *PSOCKADDR_IN; -typedef struct sockaddr_in FAR *LPSOCKADDR_IN; - -typedef struct linger LINGER; -typedef struct linger *PLINGER; -typedef struct linger FAR *LPLINGER; - -typedef struct in_addr IN_ADDR; -typedef struct in_addr *PIN_ADDR; -typedef struct in_addr FAR *LPIN_ADDR; - -typedef struct fd_set FD_SET; -typedef struct fd_set *PFD_SET; -typedef struct fd_set FAR *LPFD_SET; - -typedef struct hostent HOSTENT; -typedef struct hostent *PHOSTENT; -typedef struct hostent FAR *LPHOSTENT; - -typedef struct servent SERVENT; -typedef struct servent *PSERVENT; -typedef struct servent FAR *LPSERVENT; - -typedef struct protoent PROTOENT; -typedef struct protoent *PPROTOENT; -typedef struct protoent FAR *LPPROTOENT; - -typedef struct timeval TIMEVAL; -typedef struct timeval *PTIMEVAL; -typedef struct timeval FAR *LPTIMEVAL; - -/* - * Windows message parameter composition and decomposition - * macros. - * - * WSAMAKEASYNCREPLY is intended for use by the Windows Sockets implementation - * when constructing the response to a WSAAsyncGetXByY() routine. - */ -#define WSAMAKEASYNCREPLY(buflen,error) MAKELONG(buflen,error) -/* - * WSAMAKESELECTREPLY is intended for use by the Windows Sockets implementation - * when constructing the response to WSAAsyncSelect(). - */ -#define WSAMAKESELECTREPLY(event,error) MAKELONG(event,error) -/* - * WSAGETASYNCBUFLEN is intended for use by the Windows Sockets application - * to extract the buffer length from the lParam in the response - * to a WSAGetXByY(). - */ -#define WSAGETASYNCBUFLEN(lParam) LOWORD(lParam) -/* - * WSAGETASYNCERROR is intended for use by the Windows Sockets application - * to extract the error code from the lParam in the response - * to a WSAGetXByY(). - */ -#define WSAGETASYNCERROR(lParam) HIWORD(lParam) -/* - * WSAGETSELECTEVENT is intended for use by the Windows Sockets application - * to extract the event code from the lParam in the response - * to a WSAAsyncSelect(). - */ -#define WSAGETSELECTEVENT(lParam) LOWORD(lParam) -/* - * WSAGETSELECTERROR is intended for use by the Windows Sockets application - * to extract the error code from the lParam in the response - * to a WSAAsyncSelect(). - */ -#define WSAGETSELECTERROR(lParam) HIWORD(lParam) - -#endif /* _WINSOCKAPI_ */ - - - \ No newline at end of file diff --git a/libraries/msdos/winsock/kerberos.c b/libraries/msdos/winsock/kerberos.c deleted file mode 100644 index 62292049a4..0000000000 --- a/libraries/msdos/winsock/kerberos.c +++ /dev/null @@ -1,119 +0,0 @@ -/* - * Copyright (c) 1992, 1994 Regents of the University of Michigan. - * All rights reserved. - * - * kerberos.c - for the windows environment - */ - -#include -#include "lber.h" -#include "ldap.h" - -#ifdef KERBEROS -#ifdef WINSOCK -#include -#endif -#include - -#ifdef AUTHMAN -#include - -/* - * 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 */ - diff --git a/libraries/msdos/winsock/ldap32.def b/libraries/msdos/winsock/ldap32.def deleted file mode 100644 index 8563777cae..0000000000 --- a/libraries/msdos/winsock/ldap32.def +++ /dev/null @@ -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 diff --git a/libraries/msdos/winsock/ldap32.mak b/libraries/msdos/winsock/ldap32.mak deleted file mode 100644 index a8bcf7eec0..0000000000 --- a/libraries/msdos/winsock/ldap32.mak +++ /dev/null @@ -1,1632 +0,0 @@ -# Microsoft Developer Studio Generated NMAKE File, Format Version 4.10 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102 - -!IF "$(CFG)" == "" -CFG=libldap - Win32 Debug -!MESSAGE No configuration specified. Defaulting to libldap - Win32 Debug. -!ENDIF - -!IF "$(CFG)" != "libldap - Win32 Release" && "$(CFG)" !=\ - "libldap - Win32 Debug" -!MESSAGE Invalid configuration "$(CFG)" specified. -!MESSAGE You can specify a configuration when running NMAKE on this makefile -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "ldap32.mak" CFG="libldap - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "libldap - Win32 Release" (based on\ - "Win32 (x86) Dynamic-Link Library") -!MESSAGE "libldap - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library") -!MESSAGE -!ERROR An invalid configuration is specified. -!ENDIF - -!IF "$(OS)" == "Windows_NT" -NULL= -!ELSE -NULL=nul -!ENDIF -################################################################################ -# Begin Project -# PROP Target_Last_Scanned "libldap - Win32 Debug" -CPP=cl.exe -RSC=rc.exe -MTL=mktyplib.exe - -!IF "$(CFG)" == "libldap - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Target_Dir "" -OUTDIR=.\Release -INTDIR=.\Release - -ALL : "$(OUTDIR)\ldap32.dll" "$(OUTDIR)\ldap32.bsc" - -CLEAN : - -@erase "$(INTDIR)\abandon.obj" - -@erase "$(INTDIR)\abandon.sbr" - -@erase "$(INTDIR)\add.obj" - -@erase "$(INTDIR)\add.sbr" - -@erase "$(INTDIR)\addentry.obj" - -@erase "$(INTDIR)\addentry.sbr" - -@erase "$(INTDIR)\bind.obj" - -@erase "$(INTDIR)\bind.sbr" - -@erase "$(INTDIR)\cache.obj" - -@erase "$(INTDIR)\cache.sbr" - -@erase "$(INTDIR)\charset.obj" - -@erase "$(INTDIR)\charset.sbr" - -@erase "$(INTDIR)\compare.obj" - -@erase "$(INTDIR)\compare.sbr" - -@erase "$(INTDIR)\decode.obj" - -@erase "$(INTDIR)\decode.sbr" - -@erase "$(INTDIR)\delete.obj" - -@erase "$(INTDIR)\delete.sbr" - -@erase "$(INTDIR)\disptmpl.obj" - -@erase "$(INTDIR)\disptmpl.sbr" - -@erase "$(INTDIR)\dsparse.obj" - -@erase "$(INTDIR)\dsparse.sbr" - -@erase "$(INTDIR)\encode.obj" - -@erase "$(INTDIR)\encode.sbr" - -@erase "$(INTDIR)\error.obj" - -@erase "$(INTDIR)\error.sbr" - -@erase "$(INTDIR)\free.obj" - -@erase "$(INTDIR)\free.sbr" - -@erase "$(INTDIR)\friendly.obj" - -@erase "$(INTDIR)\friendly.sbr" - -@erase "$(INTDIR)\getattr.obj" - -@erase "$(INTDIR)\getattr.sbr" - -@erase "$(INTDIR)\getdn.obj" - -@erase "$(INTDIR)\getdn.sbr" - -@erase "$(INTDIR)\getentry.obj" - -@erase "$(INTDIR)\getentry.sbr" - -@erase "$(INTDIR)\getfilte.obj" - -@erase "$(INTDIR)\getfilte.sbr" - -@erase "$(INTDIR)\getvalue.obj" - -@erase "$(INTDIR)\getvalue.sbr" - -@erase "$(INTDIR)\io.obj" - -@erase "$(INTDIR)\io.sbr" - -@erase "$(INTDIR)\kbind.obj" - -@erase "$(INTDIR)\kbind.sbr" - -@erase "$(INTDIR)\kerberos.obj" - -@erase "$(INTDIR)\kerberos.sbr" - -@erase "$(INTDIR)\libldap.res" - -@erase "$(INTDIR)\modify.obj" - -@erase "$(INTDIR)\modify.sbr" - -@erase "$(INTDIR)\modrdn.obj" - -@erase "$(INTDIR)\modrdn.sbr" - -@erase "$(INTDIR)\msdos.obj" - -@erase "$(INTDIR)\msdos.sbr" - -@erase "$(INTDIR)\open.obj" - -@erase "$(INTDIR)\open.sbr" - -@erase "$(INTDIR)\regex.obj" - -@erase "$(INTDIR)\regex.sbr" - -@erase "$(INTDIR)\request.obj" - -@erase "$(INTDIR)\request.sbr" - -@erase "$(INTDIR)\result.obj" - -@erase "$(INTDIR)\result.sbr" - -@erase "$(INTDIR)\sbind.obj" - -@erase "$(INTDIR)\sbind.sbr" - -@erase "$(INTDIR)\search.obj" - -@erase "$(INTDIR)\search.sbr" - -@erase "$(INTDIR)\sort.obj" - -@erase "$(INTDIR)\sort.sbr" - -@erase "$(INTDIR)\srchpref.obj" - -@erase "$(INTDIR)\srchpref.sbr" - -@erase "$(INTDIR)\tmplout.obj" - -@erase "$(INTDIR)\tmplout.sbr" - -@erase "$(INTDIR)\ufn.obj" - -@erase "$(INTDIR)\ufn.sbr" - -@erase "$(INTDIR)\unbind.obj" - -@erase "$(INTDIR)\unbind.sbr" - -@erase "$(INTDIR)\url.obj" - -@erase "$(INTDIR)\url.sbr" - -@erase "$(INTDIR)\wsockip.obj" - -@erase "$(INTDIR)\wsockip.sbr" - -@erase "$(OUTDIR)\ldap32.bsc" - -@erase "$(OUTDIR)\ldap32.dll" - -@erase "$(OUTDIR)\ldap32.exp" - -@erase "$(OUTDIR)\ldap32.lib" - -"$(OUTDIR)" : - if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" - -# ADD BASE CPP /nologo /G3 /MT /W3 /Od /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "WINSOCK" /D "DOS" /D "NEEDPROTOS" /D "NO_USERINTERFACE" /D "KERBEROS" /YX /c -# ADD CPP /nologo /G3 /MT /W3 /Od /I "..\..\include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "WINSOCK" /D "DOS" /D "NEEDPROTOS" /D "NO_USERINTERFACE" /D "_NODLLIMPORT_" /FR /YX /c -CPP_PROJ=/nologo /G3 /MT /W3 /Od /I "..\..\include" /D "NDEBUG" /D "WIN32" /D\ - "_WINDOWS" /D "WINSOCK" /D "DOS" /D "NEEDPROTOS" /D "NO_USERINTERFACE" /D\ - "_NODLLIMPORT_" /FR"$(INTDIR)/" /Fp"$(INTDIR)/ldap32.pch" /YX /Fo"$(INTDIR)/"\ - /c -CPP_OBJS=.\Release/ -CPP_SBRS=.\Release/ -# ADD BASE MTL /nologo /D "NDEBUG" /win32 -# ADD MTL /nologo /D "NDEBUG" /win32 -MTL_PROJ=/nologo /D "NDEBUG" /win32 -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -RSC_PROJ=/l 0x409 /fo"$(INTDIR)/libldap.res" /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -BSC32_FLAGS=/nologo /o"$(OUTDIR)/ldap32.bsc" -BSC32_SBRS= \ - "$(INTDIR)\abandon.sbr" \ - "$(INTDIR)\add.sbr" \ - "$(INTDIR)\addentry.sbr" \ - "$(INTDIR)\bind.sbr" \ - "$(INTDIR)\cache.sbr" \ - "$(INTDIR)\charset.sbr" \ - "$(INTDIR)\compare.sbr" \ - "$(INTDIR)\decode.sbr" \ - "$(INTDIR)\delete.sbr" \ - "$(INTDIR)\disptmpl.sbr" \ - "$(INTDIR)\dsparse.sbr" \ - "$(INTDIR)\encode.sbr" \ - "$(INTDIR)\error.sbr" \ - "$(INTDIR)\free.sbr" \ - "$(INTDIR)\friendly.sbr" \ - "$(INTDIR)\getattr.sbr" \ - "$(INTDIR)\getdn.sbr" \ - "$(INTDIR)\getentry.sbr" \ - "$(INTDIR)\getfilte.sbr" \ - "$(INTDIR)\getvalue.sbr" \ - "$(INTDIR)\io.sbr" \ - "$(INTDIR)\kbind.sbr" \ - "$(INTDIR)\kerberos.sbr" \ - "$(INTDIR)\modify.sbr" \ - "$(INTDIR)\modrdn.sbr" \ - "$(INTDIR)\msdos.sbr" \ - "$(INTDIR)\open.sbr" \ - "$(INTDIR)\regex.sbr" \ - "$(INTDIR)\request.sbr" \ - "$(INTDIR)\result.sbr" \ - "$(INTDIR)\sbind.sbr" \ - "$(INTDIR)\search.sbr" \ - "$(INTDIR)\sort.sbr" \ - "$(INTDIR)\srchpref.sbr" \ - "$(INTDIR)\tmplout.sbr" \ - "$(INTDIR)\ufn.sbr" \ - "$(INTDIR)\unbind.sbr" \ - "$(INTDIR)\url.sbr" \ - "$(INTDIR)\wsockip.sbr" - -"$(OUTDIR)\ldap32.bsc" : "$(OUTDIR)" $(BSC32_SBRS) - $(BSC32) @<< - $(BSC32_FLAGS) $(BSC32_SBRS) -<< - -LINK32=link.exe -# ADD BASE LINK32 oldnames.lib ldllcew.lib krbv4win.lib wshelper.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /map:"FULL" /machine:IX86 -# ADD LINK32 WSOCK32.LIB oldnames.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /machine:IX86 -# SUBTRACT LINK32 /map -LINK32_FLAGS=WSOCK32.LIB oldnames.lib kernel32.lib user32.lib gdi32.lib\ - winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib\ - uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll\ - /incremental:no /pdb:"$(OUTDIR)/ldap32.pdb" /machine:IX86\ - /out:"$(OUTDIR)/ldap32.dll" /implib:"$(OUTDIR)/ldap32.lib" -LINK32_OBJS= \ - "$(INTDIR)\abandon.obj" \ - "$(INTDIR)\add.obj" \ - "$(INTDIR)\addentry.obj" \ - "$(INTDIR)\bind.obj" \ - "$(INTDIR)\cache.obj" \ - "$(INTDIR)\charset.obj" \ - "$(INTDIR)\compare.obj" \ - "$(INTDIR)\decode.obj" \ - "$(INTDIR)\delete.obj" \ - "$(INTDIR)\disptmpl.obj" \ - "$(INTDIR)\dsparse.obj" \ - "$(INTDIR)\encode.obj" \ - "$(INTDIR)\error.obj" \ - "$(INTDIR)\free.obj" \ - "$(INTDIR)\friendly.obj" \ - "$(INTDIR)\getattr.obj" \ - "$(INTDIR)\getdn.obj" \ - "$(INTDIR)\getentry.obj" \ - "$(INTDIR)\getfilte.obj" \ - "$(INTDIR)\getvalue.obj" \ - "$(INTDIR)\io.obj" \ - "$(INTDIR)\kbind.obj" \ - "$(INTDIR)\kerberos.obj" \ - "$(INTDIR)\libldap.res" \ - "$(INTDIR)\modify.obj" \ - "$(INTDIR)\modrdn.obj" \ - "$(INTDIR)\msdos.obj" \ - "$(INTDIR)\open.obj" \ - "$(INTDIR)\regex.obj" \ - "$(INTDIR)\request.obj" \ - "$(INTDIR)\result.obj" \ - "$(INTDIR)\sbind.obj" \ - "$(INTDIR)\search.obj" \ - "$(INTDIR)\sort.obj" \ - "$(INTDIR)\srchpref.obj" \ - "$(INTDIR)\tmplout.obj" \ - "$(INTDIR)\ufn.obj" \ - "$(INTDIR)\unbind.obj" \ - "$(INTDIR)\url.obj" \ - "$(INTDIR)\wsockip.obj" \ - "..\..\..\..\MSDEV\LIB\WSOCK32.LIB" - -"$(OUTDIR)\ldap32.dll" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) - $(LINK32) @<< - $(LINK32_FLAGS) $(LINK32_OBJS) -<< - -!ELSEIF "$(CFG)" == "libldap - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Target_Dir "" -OUTDIR=.\Debug -INTDIR=.\Debug - -ALL : "$(OUTDIR)\ldap32.dll" "$(OUTDIR)\ldap32.bsc" - -CLEAN : - -@erase "$(INTDIR)\abandon.obj" - -@erase "$(INTDIR)\abandon.sbr" - -@erase "$(INTDIR)\add.obj" - -@erase "$(INTDIR)\add.sbr" - -@erase "$(INTDIR)\addentry.obj" - -@erase "$(INTDIR)\addentry.sbr" - -@erase "$(INTDIR)\bind.obj" - -@erase "$(INTDIR)\bind.sbr" - -@erase "$(INTDIR)\cache.obj" - -@erase "$(INTDIR)\cache.sbr" - -@erase "$(INTDIR)\charset.obj" - -@erase "$(INTDIR)\charset.sbr" - -@erase "$(INTDIR)\compare.obj" - -@erase "$(INTDIR)\compare.sbr" - -@erase "$(INTDIR)\decode.obj" - -@erase "$(INTDIR)\decode.sbr" - -@erase "$(INTDIR)\delete.obj" - -@erase "$(INTDIR)\delete.sbr" - -@erase "$(INTDIR)\disptmpl.obj" - -@erase "$(INTDIR)\disptmpl.sbr" - -@erase "$(INTDIR)\dsparse.obj" - -@erase "$(INTDIR)\dsparse.sbr" - -@erase "$(INTDIR)\encode.obj" - -@erase "$(INTDIR)\encode.sbr" - -@erase "$(INTDIR)\error.obj" - -@erase "$(INTDIR)\error.sbr" - -@erase "$(INTDIR)\free.obj" - -@erase "$(INTDIR)\free.sbr" - -@erase "$(INTDIR)\friendly.obj" - -@erase "$(INTDIR)\friendly.sbr" - -@erase "$(INTDIR)\getattr.obj" - -@erase "$(INTDIR)\getattr.sbr" - -@erase "$(INTDIR)\getdn.obj" - -@erase "$(INTDIR)\getdn.sbr" - -@erase "$(INTDIR)\getentry.obj" - -@erase "$(INTDIR)\getentry.sbr" - -@erase "$(INTDIR)\getfilte.obj" - -@erase "$(INTDIR)\getfilte.sbr" - -@erase "$(INTDIR)\getvalue.obj" - -@erase "$(INTDIR)\getvalue.sbr" - -@erase "$(INTDIR)\io.obj" - -@erase "$(INTDIR)\io.sbr" - -@erase "$(INTDIR)\kbind.obj" - -@erase "$(INTDIR)\kbind.sbr" - -@erase "$(INTDIR)\kerberos.obj" - -@erase "$(INTDIR)\kerberos.sbr" - -@erase "$(INTDIR)\libldap.res" - -@erase "$(INTDIR)\modify.obj" - -@erase "$(INTDIR)\modify.sbr" - -@erase "$(INTDIR)\modrdn.obj" - -@erase "$(INTDIR)\modrdn.sbr" - -@erase "$(INTDIR)\msdos.obj" - -@erase "$(INTDIR)\msdos.sbr" - -@erase "$(INTDIR)\open.obj" - -@erase "$(INTDIR)\open.sbr" - -@erase "$(INTDIR)\regex.obj" - -@erase "$(INTDIR)\regex.sbr" - -@erase "$(INTDIR)\request.obj" - -@erase "$(INTDIR)\request.sbr" - -@erase "$(INTDIR)\result.obj" - -@erase "$(INTDIR)\result.sbr" - -@erase "$(INTDIR)\sbind.obj" - -@erase "$(INTDIR)\sbind.sbr" - -@erase "$(INTDIR)\search.obj" - -@erase "$(INTDIR)\search.sbr" - -@erase "$(INTDIR)\sort.obj" - -@erase "$(INTDIR)\sort.sbr" - -@erase "$(INTDIR)\srchpref.obj" - -@erase "$(INTDIR)\srchpref.sbr" - -@erase "$(INTDIR)\tmplout.obj" - -@erase "$(INTDIR)\tmplout.sbr" - -@erase "$(INTDIR)\ufn.obj" - -@erase "$(INTDIR)\ufn.sbr" - -@erase "$(INTDIR)\unbind.obj" - -@erase "$(INTDIR)\unbind.sbr" - -@erase "$(INTDIR)\url.obj" - -@erase "$(INTDIR)\url.sbr" - -@erase "$(INTDIR)\vc40.idb" - -@erase "$(INTDIR)\vc40.pdb" - -@erase "$(INTDIR)\wsockip.obj" - -@erase "$(INTDIR)\wsockip.sbr" - -@erase "$(OUTDIR)\ldap32.bsc" - -@erase "$(OUTDIR)\ldap32.dll" - -@erase "$(OUTDIR)\ldap32.exp" - -@erase "$(OUTDIR)\ldap32.ilk" - -@erase "$(OUTDIR)\ldap32.lib" - -@erase "$(OUTDIR)\ldap32.pdb" - -"$(OUTDIR)" : - if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" - -# ADD BASE CPP /nologo /MTd /W3 /Gm /Zi /Od /Gf /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "WINSOCK" /D "DOS" /D "NEEDPROTOS" /D "NO_USERINTERFACE" /D "KERBEROS" /FR /YX /c -# ADD CPP /nologo /MTd /W3 /Gm /Zi /Od /Gf /I "..\..\include" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "WINSOCK" /D "DOS" /D "NEEDPROTOS" /D "NO_USERINTERFACE" /D "_NODLLIMPORT_" /FR /YX /c -CPP_PROJ=/nologo /MTd /W3 /Gm /Zi /Od /Gf /I "..\..\include" /D "_DEBUG" /D\ - "WIN32" /D "_WINDOWS" /D "WINSOCK" /D "DOS" /D "NEEDPROTOS" /D\ - "NO_USERINTERFACE" /D "_NODLLIMPORT_" /FR"$(INTDIR)/" /Fp"$(INTDIR)/ldap32.pch"\ - /YX /Fo"$(INTDIR)/" /Fd"$(INTDIR)/" /c -CPP_OBJS=.\Debug/ -CPP_SBRS=.\Debug/ -# ADD BASE MTL /nologo /D "_DEBUG" /win32 -# ADD MTL /nologo /D "_DEBUG" /win32 -MTL_PROJ=/nologo /D "_DEBUG" /win32 -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -RSC_PROJ=/l 0x409 /fo"$(INTDIR)/libldap.res" /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -BSC32_FLAGS=/nologo /o"$(OUTDIR)/ldap32.bsc" -BSC32_SBRS= \ - "$(INTDIR)\abandon.sbr" \ - "$(INTDIR)\add.sbr" \ - "$(INTDIR)\addentry.sbr" \ - "$(INTDIR)\bind.sbr" \ - "$(INTDIR)\cache.sbr" \ - "$(INTDIR)\charset.sbr" \ - "$(INTDIR)\compare.sbr" \ - "$(INTDIR)\decode.sbr" \ - "$(INTDIR)\delete.sbr" \ - "$(INTDIR)\disptmpl.sbr" \ - "$(INTDIR)\dsparse.sbr" \ - "$(INTDIR)\encode.sbr" \ - "$(INTDIR)\error.sbr" \ - "$(INTDIR)\free.sbr" \ - "$(INTDIR)\friendly.sbr" \ - "$(INTDIR)\getattr.sbr" \ - "$(INTDIR)\getdn.sbr" \ - "$(INTDIR)\getentry.sbr" \ - "$(INTDIR)\getfilte.sbr" \ - "$(INTDIR)\getvalue.sbr" \ - "$(INTDIR)\io.sbr" \ - "$(INTDIR)\kbind.sbr" \ - "$(INTDIR)\kerberos.sbr" \ - "$(INTDIR)\modify.sbr" \ - "$(INTDIR)\modrdn.sbr" \ - "$(INTDIR)\msdos.sbr" \ - "$(INTDIR)\open.sbr" \ - "$(INTDIR)\regex.sbr" \ - "$(INTDIR)\request.sbr" \ - "$(INTDIR)\result.sbr" \ - "$(INTDIR)\sbind.sbr" \ - "$(INTDIR)\search.sbr" \ - "$(INTDIR)\sort.sbr" \ - "$(INTDIR)\srchpref.sbr" \ - "$(INTDIR)\tmplout.sbr" \ - "$(INTDIR)\ufn.sbr" \ - "$(INTDIR)\unbind.sbr" \ - "$(INTDIR)\url.sbr" \ - "$(INTDIR)\wsockip.sbr" - -"$(OUTDIR)\ldap32.bsc" : "$(OUTDIR)" $(BSC32_SBRS) - $(BSC32) @<< - $(BSC32_FLAGS) $(BSC32_SBRS) -<< - -LINK32=link.exe -# ADD BASE LINK32 oldnames.lib ldllcew.lib krbv4win.lib wshelper.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /map:"FULL" /debug /machine:IX86 -# ADD LINK32 WSOCK32.LIB oldnames.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /debug /machine:IX86 -# SUBTRACT LINK32 /map -LINK32_FLAGS=WSOCK32.LIB oldnames.lib kernel32.lib user32.lib gdi32.lib\ - winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib\ - uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll\ - /incremental:yes /pdb:"$(OUTDIR)/ldap32.pdb" /debug /machine:IX86\ - /def:".\ldap32.def" /out:"$(OUTDIR)/ldap32.dll" /implib:"$(OUTDIR)/ldap32.lib" -DEF_FILE= \ - ".\ldap32.def" -LINK32_OBJS= \ - "$(INTDIR)\abandon.obj" \ - "$(INTDIR)\add.obj" \ - "$(INTDIR)\addentry.obj" \ - "$(INTDIR)\bind.obj" \ - "$(INTDIR)\cache.obj" \ - "$(INTDIR)\charset.obj" \ - "$(INTDIR)\compare.obj" \ - "$(INTDIR)\decode.obj" \ - "$(INTDIR)\delete.obj" \ - "$(INTDIR)\disptmpl.obj" \ - "$(INTDIR)\dsparse.obj" \ - "$(INTDIR)\encode.obj" \ - "$(INTDIR)\error.obj" \ - "$(INTDIR)\free.obj" \ - "$(INTDIR)\friendly.obj" \ - "$(INTDIR)\getattr.obj" \ - "$(INTDIR)\getdn.obj" \ - "$(INTDIR)\getentry.obj" \ - "$(INTDIR)\getfilte.obj" \ - "$(INTDIR)\getvalue.obj" \ - "$(INTDIR)\io.obj" \ - "$(INTDIR)\kbind.obj" \ - "$(INTDIR)\kerberos.obj" \ - "$(INTDIR)\libldap.res" \ - "$(INTDIR)\modify.obj" \ - "$(INTDIR)\modrdn.obj" \ - "$(INTDIR)\msdos.obj" \ - "$(INTDIR)\open.obj" \ - "$(INTDIR)\regex.obj" \ - "$(INTDIR)\request.obj" \ - "$(INTDIR)\result.obj" \ - "$(INTDIR)\sbind.obj" \ - "$(INTDIR)\search.obj" \ - "$(INTDIR)\sort.obj" \ - "$(INTDIR)\srchpref.obj" \ - "$(INTDIR)\tmplout.obj" \ - "$(INTDIR)\ufn.obj" \ - "$(INTDIR)\unbind.obj" \ - "$(INTDIR)\url.obj" \ - "$(INTDIR)\wsockip.obj" \ - "..\..\..\..\MSDEV\LIB\WSOCK32.LIB" - -"$(OUTDIR)\ldap32.dll" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) - $(LINK32) @<< - $(LINK32_FLAGS) $(LINK32_OBJS) -<< - -!ENDIF - -.c{$(CPP_OBJS)}.obj: - $(CPP) $(CPP_PROJ) $< - -.cpp{$(CPP_OBJS)}.obj: - $(CPP) $(CPP_PROJ) $< - -.cxx{$(CPP_OBJS)}.obj: - $(CPP) $(CPP_PROJ) $< - -.c{$(CPP_SBRS)}.sbr: - $(CPP) $(CPP_PROJ) $< - -.cpp{$(CPP_SBRS)}.sbr: - $(CPP) $(CPP_PROJ) $< - -.cxx{$(CPP_SBRS)}.sbr: - $(CPP) $(CPP_PROJ) $< - -################################################################################ -# Begin Target - -# Name "libldap - Win32 Release" -# Name "libldap - Win32 Debug" - -!IF "$(CFG)" == "libldap - Win32 Release" - -!ELSEIF "$(CFG)" == "libldap - Win32 Debug" - -!ENDIF - -################################################################################ -# Begin Source File - -SOURCE=.\abandon.c -DEP_CPP_ABAND=\ - "..\..\include\lber.h"\ - "..\..\include\ldap.h"\ - "..\..\include\msdos.h"\ - "..\..\include\sys/time.h"\ - "..\..\include\sys\socket.h"\ - ".\..\..\include\proto-lb.h"\ - ".\..\..\include\proto-ld.h"\ - ".\ldap-int.h"\ - {$(INCLUDE)}"\sys\TYPES.H"\ - -NODEP_CPP_ABAND=\ - ".\..\..\include\proto-lber.h"\ - ".\..\..\include\proto-ldap.h"\ - ".\macos.h"\ - - -"$(INTDIR)\abandon.obj" : $(SOURCE) $(DEP_CPP_ABAND) "$(INTDIR)" - -"$(INTDIR)\abandon.sbr" : $(SOURCE) $(DEP_CPP_ABAND) "$(INTDIR)" - - -# End Source File -################################################################################ -# Begin Source File - -SOURCE=.\add.c -DEP_CPP_ADD_C=\ - "..\..\include\lber.h"\ - "..\..\include\ldap.h"\ - "..\..\include\msdos.h"\ - "..\..\include\sys/time.h"\ - "..\..\include\sys\socket.h"\ - ".\..\..\include\proto-lb.h"\ - ".\..\..\include\proto-ld.h"\ - ".\ldap-int.h"\ - {$(INCLUDE)}"\sys\TYPES.H"\ - -NODEP_CPP_ADD_C=\ - ".\..\..\include\proto-lber.h"\ - ".\..\..\include\proto-ldap.h"\ - ".\macos.h"\ - - -"$(INTDIR)\add.obj" : $(SOURCE) $(DEP_CPP_ADD_C) "$(INTDIR)" - -"$(INTDIR)\add.sbr" : $(SOURCE) $(DEP_CPP_ADD_C) "$(INTDIR)" - - -# End Source File -################################################################################ -# Begin Source File - -SOURCE=.\bind.c -DEP_CPP_BIND_=\ - "..\..\include\lber.h"\ - "..\..\include\ldap.h"\ - "..\..\include\msdos.h"\ - "..\..\include\sys/time.h"\ - "..\..\include\sys\socket.h"\ - ".\..\..\include\proto-lb.h"\ - ".\..\..\include\proto-ld.h"\ - {$(INCLUDE)}"\sys\TYPES.H"\ - -NODEP_CPP_BIND_=\ - ".\..\..\include\proto-lber.h"\ - ".\..\..\include\proto-ldap.h"\ - ".\externs.h"\ - ".\macos.h"\ - - -"$(INTDIR)\bind.obj" : $(SOURCE) $(DEP_CPP_BIND_) "$(INTDIR)" - -"$(INTDIR)\bind.sbr" : $(SOURCE) $(DEP_CPP_BIND_) "$(INTDIR)" - - -# End Source File -################################################################################ -# Begin Source File - -SOURCE=.\cache.c -DEP_CPP_CACHE=\ - "..\..\include\lber.h"\ - "..\..\include\ldap.h"\ - "..\..\include\msdos.h"\ - "..\..\include\sys/time.h"\ - "..\..\include\sys\socket.h"\ - ".\..\..\include\proto-lb.h"\ - ".\..\..\include\proto-ld.h"\ - ".\ldap-int.h"\ - {$(INCLUDE)}"\sys\TYPES.H"\ - -NODEP_CPP_CACHE=\ - ".\..\..\include\proto-lber.h"\ - ".\..\..\include\proto-ldap.h"\ - ".\externs.h"\ - ".\macos.h"\ - - -"$(INTDIR)\cache.obj" : $(SOURCE) $(DEP_CPP_CACHE) "$(INTDIR)" - -"$(INTDIR)\cache.sbr" : $(SOURCE) $(DEP_CPP_CACHE) "$(INTDIR)" - - -# End Source File -################################################################################ -# Begin Source File - -SOURCE=.\compare.c -DEP_CPP_COMPA=\ - "..\..\include\lber.h"\ - "..\..\include\ldap.h"\ - "..\..\include\msdos.h"\ - "..\..\include\sys/time.h"\ - "..\..\include\sys\socket.h"\ - ".\..\..\include\proto-lb.h"\ - ".\..\..\include\proto-ld.h"\ - ".\ldap-int.h"\ - {$(INCLUDE)}"\sys\TYPES.H"\ - -NODEP_CPP_COMPA=\ - ".\..\..\include\proto-lber.h"\ - ".\..\..\include\proto-ldap.h"\ - ".\macos.h"\ - - -"$(INTDIR)\compare.obj" : $(SOURCE) $(DEP_CPP_COMPA) "$(INTDIR)" - -"$(INTDIR)\compare.sbr" : $(SOURCE) $(DEP_CPP_COMPA) "$(INTDIR)" - - -# End Source File -################################################################################ -# Begin Source File - -SOURCE=.\delete.c -DEP_CPP_DELET=\ - "..\..\include\lber.h"\ - "..\..\include\ldap.h"\ - "..\..\include\msdos.h"\ - "..\..\include\sys/time.h"\ - "..\..\include\sys\socket.h"\ - ".\..\..\include\proto-lb.h"\ - ".\..\..\include\proto-ld.h"\ - ".\ldap-int.h"\ - {$(INCLUDE)}"\sys\TYPES.H"\ - -NODEP_CPP_DELET=\ - ".\..\..\include\proto-lber.h"\ - ".\..\..\include\proto-ldap.h"\ - ".\macos.h"\ - - -"$(INTDIR)\delete.obj" : $(SOURCE) $(DEP_CPP_DELET) "$(INTDIR)" - -"$(INTDIR)\delete.sbr" : $(SOURCE) $(DEP_CPP_DELET) "$(INTDIR)" - - -# End Source File -################################################################################ -# Begin Source File - -SOURCE=.\error.c -DEP_CPP_ERROR=\ - "..\..\include\lber.h"\ - "..\..\include\ldap.h"\ - "..\..\include\msdos.h"\ - "..\..\include\sys/time.h"\ - "..\..\include\sys\socket.h"\ - ".\..\..\include\proto-lb.h"\ - ".\..\..\include\proto-ld.h"\ - {$(INCLUDE)}"\sys\TYPES.H"\ - -NODEP_CPP_ERROR=\ - ".\..\..\include\proto-lber.h"\ - ".\..\..\include\proto-ldap.h"\ - - -"$(INTDIR)\error.obj" : $(SOURCE) $(DEP_CPP_ERROR) "$(INTDIR)" - -"$(INTDIR)\error.sbr" : $(SOURCE) $(DEP_CPP_ERROR) "$(INTDIR)" - - -# End Source File -################################################################################ -# Begin Source File - -SOURCE=.\getfilte.c -DEP_CPP_GETFI=\ - "..\..\include\lber.h"\ - "..\..\include\ldap.h"\ - "..\..\include\msdos.h"\ - "..\..\include\regex.h"\ - "..\..\include\sys/file.h"\ - "..\..\include\sys/time.h"\ - ".\..\..\include\proto-lb.h"\ - ".\..\..\include\proto-ld.h"\ - {$(INCLUDE)}"\sys\TYPES.H"\ - -NODEP_CPP_GETFI=\ - ".\..\..\include\proto-lber.h"\ - ".\..\..\include\proto-ldap.h"\ - ".\macos.h"\ - - -"$(INTDIR)\getfilte.obj" : $(SOURCE) $(DEP_CPP_GETFI) "$(INTDIR)" - -"$(INTDIR)\getfilte.sbr" : $(SOURCE) $(DEP_CPP_GETFI) "$(INTDIR)" - - -# End Source File -################################################################################ -# Begin Source File - -SOURCE=.\regex.c -DEP_CPP_REGEX=\ - "..\..\include\portable.h"\ - "..\..\include\regex.h"\ - - -"$(INTDIR)\regex.obj" : $(SOURCE) $(DEP_CPP_REGEX) "$(INTDIR)" - -"$(INTDIR)\regex.sbr" : $(SOURCE) $(DEP_CPP_REGEX) "$(INTDIR)" - - -# End Source File -################################################################################ -# Begin Source File - -SOURCE=.\modify.c -DEP_CPP_MODIF=\ - "..\..\include\lber.h"\ - "..\..\include\ldap.h"\ - "..\..\include\msdos.h"\ - "..\..\include\sys/time.h"\ - "..\..\include\sys\socket.h"\ - ".\..\..\include\proto-lb.h"\ - ".\..\..\include\proto-ld.h"\ - ".\ldap-int.h"\ - {$(INCLUDE)}"\sys\TYPES.H"\ - -NODEP_CPP_MODIF=\ - ".\..\..\include\proto-lber.h"\ - ".\..\..\include\proto-ldap.h"\ - ".\macos.h"\ - - -"$(INTDIR)\modify.obj" : $(SOURCE) $(DEP_CPP_MODIF) "$(INTDIR)" - -"$(INTDIR)\modify.sbr" : $(SOURCE) $(DEP_CPP_MODIF) "$(INTDIR)" - - -# End Source File -################################################################################ -# Begin Source File - -SOURCE=.\modrdn.c -DEP_CPP_MODRD=\ - "..\..\include\lber.h"\ - "..\..\include\ldap.h"\ - "..\..\include\msdos.h"\ - "..\..\include\sys/time.h"\ - "..\..\include\sys\socket.h"\ - ".\..\..\include\proto-lb.h"\ - ".\..\..\include\proto-ld.h"\ - ".\ldap-int.h"\ - {$(INCLUDE)}"\sys\TYPES.H"\ - -NODEP_CPP_MODRD=\ - ".\..\..\include\proto-lber.h"\ - ".\..\..\include\proto-ldap.h"\ - ".\macos.h"\ - - -"$(INTDIR)\modrdn.obj" : $(SOURCE) $(DEP_CPP_MODRD) "$(INTDIR)" - -"$(INTDIR)\modrdn.sbr" : $(SOURCE) $(DEP_CPP_MODRD) "$(INTDIR)" - - -# End Source File -################################################################################ -# Begin Source File - -SOURCE=.\getdn.c -DEP_CPP_GETDN=\ - "..\..\include\lber.h"\ - "..\..\include\ldap.h"\ - "..\..\include\msdos.h"\ - "..\..\include\sys/time.h"\ - "..\..\include\sys\socket.h"\ - ".\..\..\include\proto-lb.h"\ - ".\..\..\include\proto-ld.h"\ - {$(INCLUDE)}"\sys\TYPES.H"\ - -NODEP_CPP_GETDN=\ - ".\..\..\include\proto-lber.h"\ - ".\..\..\include\proto-ldap.h"\ - ".\macos.h"\ - - -"$(INTDIR)\getdn.obj" : $(SOURCE) $(DEP_CPP_GETDN) "$(INTDIR)" - -"$(INTDIR)\getdn.sbr" : $(SOURCE) $(DEP_CPP_GETDN) "$(INTDIR)" - - -# End Source File -################################################################################ -# Begin Source File - -SOURCE=.\getentry.c -DEP_CPP_GETEN=\ - "..\..\include\lber.h"\ - "..\..\include\ldap.h"\ - "..\..\include\msdos.h"\ - "..\..\include\sys/time.h"\ - "..\..\include\sys\socket.h"\ - ".\..\..\include\proto-lb.h"\ - ".\..\..\include\proto-ld.h"\ - {$(INCLUDE)}"\sys\TYPES.H"\ - -NODEP_CPP_GETEN=\ - ".\..\..\include\proto-lber.h"\ - ".\..\..\include\proto-ldap.h"\ - ".\macos.h"\ - - -"$(INTDIR)\getentry.obj" : $(SOURCE) $(DEP_CPP_GETEN) "$(INTDIR)" - -"$(INTDIR)\getentry.sbr" : $(SOURCE) $(DEP_CPP_GETEN) "$(INTDIR)" - - -# End Source File -################################################################################ -# Begin Source File - -SOURCE=.\getattr.c -DEP_CPP_GETAT=\ - "..\..\include\lber.h"\ - "..\..\include\ldap.h"\ - "..\..\include\msdos.h"\ - "..\..\include\sys/time.h"\ - "..\..\include\sys\socket.h"\ - ".\..\..\include\proto-lb.h"\ - ".\..\..\include\proto-ld.h"\ - ".\ldap-int.h"\ - {$(INCLUDE)}"\sys\TYPES.H"\ - -NODEP_CPP_GETAT=\ - ".\..\..\include\proto-lber.h"\ - ".\..\..\include\proto-ldap.h"\ - ".\macos.h"\ - - -"$(INTDIR)\getattr.obj" : $(SOURCE) $(DEP_CPP_GETAT) "$(INTDIR)" - -"$(INTDIR)\getattr.sbr" : $(SOURCE) $(DEP_CPP_GETAT) "$(INTDIR)" - - -# End Source File -################################################################################ -# Begin Source File - -SOURCE=.\getvalue.c -DEP_CPP_GETVA=\ - "..\..\include\lber.h"\ - "..\..\include\ldap.h"\ - "..\..\include\msdos.h"\ - "..\..\include\sys/time.h"\ - "..\..\include\sys\socket.h"\ - ".\..\..\include\proto-lb.h"\ - ".\..\..\include\proto-ld.h"\ - {$(INCLUDE)}"\sys\TYPES.H"\ - -NODEP_CPP_GETVA=\ - ".\..\..\include\proto-lber.h"\ - ".\..\..\include\proto-ldap.h"\ - ".\macos.h"\ - - -"$(INTDIR)\getvalue.obj" : $(SOURCE) $(DEP_CPP_GETVA) "$(INTDIR)" - -"$(INTDIR)\getvalue.sbr" : $(SOURCE) $(DEP_CPP_GETVA) "$(INTDIR)" - - -# End Source File -################################################################################ -# Begin Source File - -SOURCE=.\addentry.c -DEP_CPP_ADDEN=\ - "..\..\include\lber.h"\ - "..\..\include\ldap.h"\ - "..\..\include\msdos.h"\ - "..\..\include\sys/time.h"\ - "..\..\include\sys\socket.h"\ - ".\..\..\include\proto-lb.h"\ - ".\..\..\include\proto-ld.h"\ - {$(INCLUDE)}"\sys\TYPES.H"\ - -NODEP_CPP_ADDEN=\ - ".\..\..\include\proto-lber.h"\ - ".\..\..\include\proto-ldap.h"\ - ".\macos.h"\ - - -"$(INTDIR)\addentry.obj" : $(SOURCE) $(DEP_CPP_ADDEN) "$(INTDIR)" - -"$(INTDIR)\addentry.sbr" : $(SOURCE) $(DEP_CPP_ADDEN) "$(INTDIR)" - - -# End Source File -################################################################################ -# Begin Source File - -SOURCE=.\result.c -DEP_CPP_RESUL=\ - "..\..\include\lber.h"\ - "..\..\include\ldap.h"\ - "..\..\include\msdos.h"\ - "..\..\include\portable.h"\ - "..\..\include\sys/select.h"\ - "..\..\include\sys/time.h"\ - "..\..\include\sys\socket.h"\ - ".\..\..\include\proto-lb.h"\ - ".\..\..\include\proto-ld.h"\ - ".\ldap-int.h"\ - {$(INCLUDE)}"\sys\TYPES.H"\ - -NODEP_CPP_RESUL=\ - ".\..\..\include\proto-lber.h"\ - ".\..\..\include\proto-ldap.h"\ - ".\externs.h"\ - ".\macos.h"\ - ".\ucx_select.h"\ - - -"$(INTDIR)\result.obj" : $(SOURCE) $(DEP_CPP_RESUL) "$(INTDIR)" - -"$(INTDIR)\result.sbr" : $(SOURCE) $(DEP_CPP_RESUL) "$(INTDIR)" - - -# End Source File -################################################################################ -# Begin Source File - -SOURCE=.\search.c -DEP_CPP_SEARC=\ - "..\..\include\lber.h"\ - "..\..\include\ldap.h"\ - "..\..\include\msdos.h"\ - "..\..\include\sys/time.h"\ - "..\..\include\sys\socket.h"\ - ".\..\..\include\proto-lb.h"\ - ".\..\..\include\proto-ld.h"\ - ".\ldap-int.h"\ - {$(INCLUDE)}"\sys\TYPES.H"\ - -NODEP_CPP_SEARC=\ - ".\..\..\include\proto-lber.h"\ - ".\..\..\include\proto-ldap.h"\ - ".\macos.h"\ - - -"$(INTDIR)\search.obj" : $(SOURCE) $(DEP_CPP_SEARC) "$(INTDIR)" - -"$(INTDIR)\search.sbr" : $(SOURCE) $(DEP_CPP_SEARC) "$(INTDIR)" - - -# End Source File -################################################################################ -# Begin Source File - -SOURCE=.\ufn.c -DEP_CPP_UFN_C=\ - "..\..\include\lber.h"\ - "..\..\include\ldap.h"\ - "..\..\include\msdos.h"\ - "..\..\include\sys/time.h"\ - "..\..\include\sys\socket.h"\ - ".\..\..\include\proto-lb.h"\ - ".\..\..\include\proto-ld.h"\ - {$(INCLUDE)}"\sys\TYPES.H"\ - -NODEP_CPP_UFN_C=\ - ".\..\..\include\proto-lber.h"\ - ".\..\..\include\proto-ldap.h"\ - ".\macos.h"\ - - -"$(INTDIR)\ufn.obj" : $(SOURCE) $(DEP_CPP_UFN_C) "$(INTDIR)" - -"$(INTDIR)\ufn.sbr" : $(SOURCE) $(DEP_CPP_UFN_C) "$(INTDIR)" - - -# End Source File -################################################################################ -# Begin Source File - -SOURCE=.\msdos.c -DEP_CPP_MSDOS=\ - "..\..\include\lber.h"\ - "..\..\include\ldap.h"\ - "..\..\include\msdos.h"\ - "..\..\include\sys/time.h"\ - ".\..\..\include\proto-lb.h"\ - ".\..\..\include\proto-ld.h"\ - -NODEP_CPP_MSDOS=\ - ".\..\..\include\proto-lber.h"\ - ".\..\..\include\proto-ldap.h"\ - - -"$(INTDIR)\msdos.obj" : $(SOURCE) $(DEP_CPP_MSDOS) "$(INTDIR)" - -"$(INTDIR)\msdos.sbr" : $(SOURCE) $(DEP_CPP_MSDOS) "$(INTDIR)" - - -# End Source File -################################################################################ -# Begin Source File - -SOURCE=.\sbind.c -DEP_CPP_SBIND=\ - "..\..\include\lber.h"\ - "..\..\include\ldap.h"\ - "..\..\include\msdos.h"\ - "..\..\include\sys/time.h"\ - "..\..\include\sys\socket.h"\ - ".\..\..\include\proto-lb.h"\ - ".\..\..\include\proto-ld.h"\ - ".\ldap-int.h"\ - {$(INCLUDE)}"\sys\TYPES.H"\ - -NODEP_CPP_SBIND=\ - ".\..\..\include\proto-lber.h"\ - ".\..\..\include\proto-ldap.h"\ - ".\macos.h"\ - - -"$(INTDIR)\sbind.obj" : $(SOURCE) $(DEP_CPP_SBIND) "$(INTDIR)" - -"$(INTDIR)\sbind.sbr" : $(SOURCE) $(DEP_CPP_SBIND) "$(INTDIR)" - - -# End Source File -################################################################################ -# Begin Source File - -SOURCE=.\unbind.c -DEP_CPP_UNBIN=\ - "..\..\include\lber.h"\ - "..\..\include\ldap.h"\ - "..\..\include\msdos.h"\ - "..\..\include\sys/time.h"\ - "..\..\include\sys\socket.h"\ - ".\..\..\include\proto-lb.h"\ - ".\..\..\include\proto-ld.h"\ - ".\ldap-int.h"\ - {$(INCLUDE)}"\sys\TYPES.H"\ - -NODEP_CPP_UNBIN=\ - ".\..\..\include\proto-lber.h"\ - ".\..\..\include\proto-ldap.h"\ - ".\externs.h"\ - ".\macos.h"\ - - -"$(INTDIR)\unbind.obj" : $(SOURCE) $(DEP_CPP_UNBIN) "$(INTDIR)" - -"$(INTDIR)\unbind.sbr" : $(SOURCE) $(DEP_CPP_UNBIN) "$(INTDIR)" - - -# End Source File -################################################################################ -# Begin Source File - -SOURCE=.\kbind.c -DEP_CPP_KBIND=\ - "..\..\include\conf.h"\ - "..\..\include\des.h"\ - "..\..\include\krb.h"\ - "..\..\include\lber.h"\ - "..\..\include\ldap.h"\ - "..\..\include\lsh_pwd.h"\ - "..\..\include\mit_copy.h"\ - "..\..\include\msdos.h"\ - "..\..\include\sys/time.h"\ - "..\..\include\sys\socket.h"\ - ".\..\..\include\conf-pc.h"\ - ".\..\..\include\osconf.h"\ - ".\..\..\include\proto-lb.h"\ - ".\..\..\include\proto-ld.h"\ - ".\ldap-int.h"\ - {$(INCLUDE)}"\sys\TYPES.H"\ - -NODEP_CPP_KBIND=\ - ".\..\..\include\conf-bsd386i.h"\ - ".\..\..\include\conf-bsdapollo.h"\ - ".\..\..\include\conf-bsdibm032.h"\ - ".\..\..\include\conf-bsdm68k.h"\ - ".\..\..\include\conf-bsdsparc.h"\ - ".\..\..\include\conf-bsdtahoe.h"\ - ".\..\..\include\conf-bsdvax.h"\ - ".\..\..\include\conf-pyr.h"\ - ".\..\..\include\conf-ultmips2.h"\ - ".\..\..\include\names.h"\ - ".\..\..\include\proto-lber.h"\ - ".\..\..\include\proto-ldap.h"\ - ".\macos.h"\ - - -"$(INTDIR)\kbind.obj" : $(SOURCE) $(DEP_CPP_KBIND) "$(INTDIR)" - -"$(INTDIR)\kbind.sbr" : $(SOURCE) $(DEP_CPP_KBIND) "$(INTDIR)" - - -# End Source File -################################################################################ -# Begin Source File - -SOURCE=.\friendly.c -DEP_CPP_FRIEN=\ - "..\..\include\lber.h"\ - "..\..\include\ldap.h"\ - "..\..\include\msdos.h"\ - "..\..\include\sys/time.h"\ - "..\..\include\sys\socket.h"\ - ".\..\..\include\proto-lb.h"\ - ".\..\..\include\proto-ld.h"\ - {$(INCLUDE)}"\sys\TYPES.H"\ - -NODEP_CPP_FRIEN=\ - ".\..\..\include\proto-lber.h"\ - ".\..\..\include\proto-ldap.h"\ - ".\macos.h"\ - - -"$(INTDIR)\friendly.obj" : $(SOURCE) $(DEP_CPP_FRIEN) "$(INTDIR)" - -"$(INTDIR)\friendly.sbr" : $(SOURCE) $(DEP_CPP_FRIEN) "$(INTDIR)" - - -# End Source File -################################################################################ -# Begin Source File - -SOURCE=.\disptmpl.c -DEP_CPP_DISPT=\ - "..\..\include\disptmpl.h"\ - "..\..\include\lber.h"\ - "..\..\include\ldap.h"\ - "..\..\include\msdos.h"\ - "..\..\include\sys/file.h"\ - "..\..\include\sys/time.h"\ - ".\..\..\include\proto-lb.h"\ - ".\..\..\include\proto-ld.h"\ - {$(INCLUDE)}"\sys\TYPES.H"\ - -NODEP_CPP_DISPT=\ - ".\..\..\include\proto-lber.h"\ - ".\..\..\include\proto-ldap.h"\ - ".\macos.h"\ - - -"$(INTDIR)\disptmpl.obj" : $(SOURCE) $(DEP_CPP_DISPT) "$(INTDIR)" - -"$(INTDIR)\disptmpl.sbr" : $(SOURCE) $(DEP_CPP_DISPT) "$(INTDIR)" - - -# End Source File -################################################################################ -# Begin Source File - -SOURCE=.\dsparse.c -DEP_CPP_DSPAR=\ - "..\..\include\lber.h"\ - "..\..\include\ldap.h"\ - "..\..\include\msdos.h"\ - "..\..\include\sys/file.h"\ - "..\..\include\sys/time.h"\ - ".\..\..\include\proto-lb.h"\ - ".\..\..\include\proto-ld.h"\ - {$(INCLUDE)}"\sys\TYPES.H"\ - -NODEP_CPP_DSPAR=\ - ".\..\..\include\proto-lber.h"\ - ".\..\..\include\proto-ldap.h"\ - ".\macos.h"\ - - -"$(INTDIR)\dsparse.obj" : $(SOURCE) $(DEP_CPP_DSPAR) "$(INTDIR)" - -"$(INTDIR)\dsparse.sbr" : $(SOURCE) $(DEP_CPP_DSPAR) "$(INTDIR)" - - -# End Source File -################################################################################ -# Begin Source File - -SOURCE=.\free.c -DEP_CPP_FREE_=\ - "..\..\include\lber.h"\ - "..\..\include\ldap.h"\ - "..\..\include\msdos.h"\ - "..\..\include\sys/time.h"\ - ".\..\..\include\proto-lb.h"\ - ".\..\..\include\proto-ld.h"\ - {$(INCLUDE)}"\sys\TYPES.H"\ - -NODEP_CPP_FREE_=\ - ".\..\..\include\proto-lber.h"\ - ".\..\..\include\proto-ldap.h"\ - ".\macos.h"\ - - -"$(INTDIR)\free.obj" : $(SOURCE) $(DEP_CPP_FREE_) "$(INTDIR)" - -"$(INTDIR)\free.sbr" : $(SOURCE) $(DEP_CPP_FREE_) "$(INTDIR)" - - -# End Source File -################################################################################ -# Begin Source File - -SOURCE=.\sort.c -DEP_CPP_SORT_=\ - "..\..\include\lber.h"\ - "..\..\include\ldap.h"\ - "..\..\include\msdos.h"\ - "..\..\include\sys/time.h"\ - ".\..\..\include\proto-lb.h"\ - ".\..\..\include\proto-ld.h"\ - -NODEP_CPP_SORT_=\ - ".\..\..\include\proto-lber.h"\ - ".\..\..\include\proto-ldap.h"\ - ".\macos.h"\ - - -"$(INTDIR)\sort.obj" : $(SOURCE) $(DEP_CPP_SORT_) "$(INTDIR)" - -"$(INTDIR)\sort.sbr" : $(SOURCE) $(DEP_CPP_SORT_) "$(INTDIR)" - - -# End Source File -################################################################################ -# Begin Source File - -SOURCE=.\srchpref.c -DEP_CPP_SRCHP=\ - "..\..\include\lber.h"\ - "..\..\include\ldap.h"\ - "..\..\include\msdos.h"\ - "..\..\include\srchpref.h"\ - "..\..\include\sys/file.h"\ - "..\..\include\sys/time.h"\ - ".\..\..\include\proto-lb.h"\ - ".\..\..\include\proto-ld.h"\ - {$(INCLUDE)}"\sys\TYPES.H"\ - -NODEP_CPP_SRCHP=\ - ".\..\..\include\proto-lber.h"\ - ".\..\..\include\proto-ldap.h"\ - ".\macos.h"\ - - -"$(INTDIR)\srchpref.obj" : $(SOURCE) $(DEP_CPP_SRCHP) "$(INTDIR)" - -"$(INTDIR)\srchpref.sbr" : $(SOURCE) $(DEP_CPP_SRCHP) "$(INTDIR)" - - -# End Source File -################################################################################ -# Begin Source File - -SOURCE=.\tmplout.c -DEP_CPP_TMPLO=\ - "..\..\include\disptmpl.h"\ - "..\..\include\lber.h"\ - "..\..\include\ldap.h"\ - "..\..\include\msdos.h"\ - "..\..\include\sys/file.h"\ - "..\..\include\sys/time.h"\ - "..\..\include\sys\socket.h"\ - ".\..\..\include\proto-lb.h"\ - ".\..\..\include\proto-ld.h"\ - {$(INCLUDE)}"\sys\TYPES.H"\ - -NODEP_CPP_TMPLO=\ - ".\..\..\include\proto-lber.h"\ - ".\..\..\include\proto-ldap.h"\ - ".\macos.h"\ - - -"$(INTDIR)\tmplout.obj" : $(SOURCE) $(DEP_CPP_TMPLO) "$(INTDIR)" - -"$(INTDIR)\tmplout.sbr" : $(SOURCE) $(DEP_CPP_TMPLO) "$(INTDIR)" - - -# End Source File -################################################################################ -# Begin Source File - -SOURCE=.\libldap.rc - -"$(INTDIR)\libldap.res" : $(SOURCE) "$(INTDIR)" - $(RSC) $(RSC_PROJ) $(SOURCE) - - -# End Source File -################################################################################ -# Begin Source File - -SOURCE=.\request.c -DEP_CPP_REQUE=\ - "..\..\include\lber.h"\ - "..\..\include\ldap.h"\ - "..\..\include\msdos.h"\ - "..\..\include\portable.h"\ - "..\..\include\sys/select.h"\ - "..\..\include\sys/time.h"\ - "..\..\include\sys\socket.h"\ - ".\..\..\include\proto-lb.h"\ - ".\..\..\include\proto-ld.h"\ - ".\ldap-int.h"\ - {$(INCLUDE)}"\sys\TYPES.H"\ - -NODEP_CPP_REQUE=\ - ".\..\..\include\proto-lber.h"\ - ".\..\..\include\proto-ldap.h"\ - ".\externs.h"\ - ".\macos.h"\ - ".\ucx_select.h"\ - - -"$(INTDIR)\request.obj" : $(SOURCE) $(DEP_CPP_REQUE) "$(INTDIR)" - -"$(INTDIR)\request.sbr" : $(SOURCE) $(DEP_CPP_REQUE) "$(INTDIR)" - - -# End Source File -################################################################################ -# Begin Source File - -SOURCE=.\wsockip.c -DEP_CPP_WSOCK=\ - "..\..\include\_sys/filio.h"\ - "..\..\include\_sys/ioctl.h"\ - "..\..\include\arpa/nameser.h"\ - "..\..\include\hesiod.h"\ - "..\..\include\lber.h"\ - "..\..\include\ldap.h"\ - "..\..\include\msdos.h"\ - "..\..\include\netdb.h"\ - "..\..\include\netinet/in.h"\ - "..\..\include\portable.h"\ - "..\..\include\resolv.h"\ - "..\..\include\sys/filio.h"\ - "..\..\include\sys/ioctl.h"\ - "..\..\include\sys/select.h"\ - "..\..\include\sys/time.h"\ - "..\..\include\sys\socket.h"\ - "..\..\include\wshelper.h"\ - ".\..\..\include\proto-lb.h"\ - ".\..\..\include\proto-ld.h"\ - {$(INCLUDE)}"\sys\TYPES.H"\ - -NODEP_CPP_WSOCK=\ - ".\..\..\include\proto-lber.h"\ - ".\..\..\include\proto-ldap.h"\ - - -"$(INTDIR)\wsockip.obj" : $(SOURCE) $(DEP_CPP_WSOCK) "$(INTDIR)" - -"$(INTDIR)\wsockip.sbr" : $(SOURCE) $(DEP_CPP_WSOCK) "$(INTDIR)" - - -# End Source File -################################################################################ -# Begin Source File - -SOURCE=.\open.c -DEP_CPP_OPEN_=\ - "..\..\include\lber.h"\ - "..\..\include\ldap.h"\ - "..\..\include\msdos.h"\ - "..\..\include\netinet/in.h"\ - "..\..\include\sys/param.h"\ - "..\..\include\sys/time.h"\ - "..\..\include\sys\socket.h"\ - ".\..\..\include\proto-lb.h"\ - ".\..\..\include\proto-ld.h"\ - ".\ldap-int.h"\ - {$(INCLUDE)}"\sys\TYPES.H"\ - -NODEP_CPP_OPEN_=\ - ".\..\..\include\proto-lber.h"\ - ".\..\..\include\proto-ldap.h"\ - ".\macos.h"\ - - -"$(INTDIR)\open.obj" : $(SOURCE) $(DEP_CPP_OPEN_) "$(INTDIR)" - -"$(INTDIR)\open.sbr" : $(SOURCE) $(DEP_CPP_OPEN_) "$(INTDIR)" - - -# End Source File -################################################################################ -# Begin Source File - -SOURCE=.\ldap32.def - -!IF "$(CFG)" == "libldap - Win32 Release" - -# PROP Exclude_From_Build 1 - -!ELSEIF "$(CFG)" == "libldap - Win32 Debug" - -!ENDIF - -# End Source File -################################################################################ -# Begin Source File - -SOURCE=\MSDEV\LIB\WSOCK32.LIB - -!IF "$(CFG)" == "libldap - Win32 Release" - -!ELSEIF "$(CFG)" == "libldap - Win32 Debug" - -!ENDIF - -# End Source File -################################################################################ -# Begin Source File - -SOURCE=.\kerberos.c -DEP_CPP_KERBE=\ - "..\..\include\authlib.h"\ - "..\..\include\lber.h"\ - "..\..\include\ldap.h"\ - "..\..\include\msdos.h"\ - "..\..\include\sys/time.h"\ - ".\..\..\include\proto-lb.h"\ - ".\..\..\include\proto-ld.h"\ - -NODEP_CPP_KERBE=\ - ".\..\..\include\proto-lber.h"\ - ".\..\..\include\proto-ldap.h"\ - - -"$(INTDIR)\kerberos.obj" : $(SOURCE) $(DEP_CPP_KERBE) "$(INTDIR)" - -"$(INTDIR)\kerberos.sbr" : $(SOURCE) $(DEP_CPP_KERBE) "$(INTDIR)" - - -# End Source File -################################################################################ -# Begin Source File - -SOURCE=.\url.c -DEP_CPP_URL_C=\ - "..\..\include\lber.h"\ - "..\..\include\ldap.h"\ - "..\..\include\msdos.h"\ - "..\..\include\sys/time.h"\ - "..\..\include\sys\socket.h"\ - ".\..\..\include\proto-lb.h"\ - ".\..\..\include\proto-ld.h"\ - ".\ldap-int.h"\ - {$(INCLUDE)}"\sys\TYPES.H"\ - -NODEP_CPP_URL_C=\ - ".\..\..\include\proto-lber.h"\ - ".\..\..\include\proto-ldap.h"\ - ".\macos.h"\ - - -"$(INTDIR)\url.obj" : $(SOURCE) $(DEP_CPP_URL_C) "$(INTDIR)" - -"$(INTDIR)\url.sbr" : $(SOURCE) $(DEP_CPP_URL_C) "$(INTDIR)" - - -# End Source File -################################################################################ -# Begin Source File - -SOURCE=.\charset.c -DEP_CPP_CHARS=\ - "..\..\include\lber.h"\ - "..\..\include\ldap.h"\ - "..\..\include\msdos.h"\ - "..\..\include\sys/param.h"\ - "..\..\include\sys/time.h"\ - "..\..\include\sys\socket.h"\ - ".\..\..\include\proto-lb.h"\ - ".\..\..\include\proto-ld.h"\ - ".\ldap-int.h"\ - {$(INCLUDE)}"\sys\TYPES.H"\ - -NODEP_CPP_CHARS=\ - ".\..\..\include\proto-lber.h"\ - ".\..\..\include\proto-ldap.h"\ - ".\macos.h"\ - - -"$(INTDIR)\charset.obj" : $(SOURCE) $(DEP_CPP_CHARS) "$(INTDIR)" - -"$(INTDIR)\charset.sbr" : $(SOURCE) $(DEP_CPP_CHARS) "$(INTDIR)" - - -# End Source File -################################################################################ -# Begin Source File - -SOURCE="\src\ldap-3.3b1\libraries\liblber\io.c" -DEP_CPP_IO_C48=\ - "..\..\include\lber.h"\ - "..\..\include\msdos.h"\ - "..\..\include\netinet/in.h"\ - "..\..\include\sys\socket.h"\ - ".\..\..\include\proto-lb.h"\ - {$(INCLUDE)}"\sys\TYPES.H"\ - -NODEP_CPP_IO_C48=\ - "..\liblber\macos.h"\ - ".\..\..\include\proto-lber.h"\ - - -BuildCmds= \ - $(CPP) $(CPP_PROJ) $(SOURCE) \ - - -"$(INTDIR)\io.obj" : $(SOURCE) $(DEP_CPP_IO_C48) "$(INTDIR)" - $(BuildCmds) - -"$(INTDIR)\io.sbr" : $(SOURCE) $(DEP_CPP_IO_C48) "$(INTDIR)" - $(BuildCmds) - -# End Source File -################################################################################ -# Begin Source File - -SOURCE="\src\ldap-3.3b1\libraries\liblber\encode.c" -DEP_CPP_ENCOD=\ - "..\..\include\lber.h"\ - "..\..\include\msdos.h"\ - "..\..\include\netinet/in.h"\ - "..\..\include\sys\socket.h"\ - ".\..\..\include\proto-lb.h"\ - {$(INCLUDE)}"\sys\TYPES.H"\ - -NODEP_CPP_ENCOD=\ - "..\liblber\macos.h"\ - ".\..\..\include\proto-lber.h"\ - - -BuildCmds= \ - $(CPP) $(CPP_PROJ) $(SOURCE) \ - - -"$(INTDIR)\encode.obj" : $(SOURCE) $(DEP_CPP_ENCOD) "$(INTDIR)" - $(BuildCmds) - -"$(INTDIR)\encode.sbr" : $(SOURCE) $(DEP_CPP_ENCOD) "$(INTDIR)" - $(BuildCmds) - -# End Source File -################################################################################ -# Begin Source File - -SOURCE="\src\ldap-3.3b1\libraries\liblber\decode.c" -DEP_CPP_DECOD=\ - "..\..\include\lber.h"\ - "..\..\include\msdos.h"\ - "..\..\include\netinet/in.h"\ - "..\..\include\sys\socket.h"\ - ".\..\..\include\proto-lb.h"\ - {$(INCLUDE)}"\sys\TYPES.H"\ - -NODEP_CPP_DECOD=\ - "..\liblber\macos.h"\ - ".\..\..\include\proto-lber.h"\ - - -BuildCmds= \ - $(CPP) $(CPP_PROJ) $(SOURCE) \ - - -"$(INTDIR)\decode.obj" : $(SOURCE) $(DEP_CPP_DECOD) "$(INTDIR)" - $(BuildCmds) - -"$(INTDIR)\decode.sbr" : $(SOURCE) $(DEP_CPP_DECOD) "$(INTDIR)" - $(BuildCmds) - -# End Source File -# End Target -# End Project -################################################################################ diff --git a/libraries/msdos/winsock/ldap32.mdp b/libraries/msdos/winsock/ldap32.mdp deleted file mode 100644 index a3f977e236ab511e92fc23518fe7b2a508c75e28..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 43520 zcmeHQe{dAneSZf!Bw^WxB7P($$p$MIu%#0}WJe~n73gG;Es!k91}lp3>2AecINe_M z?u^uu3Dc6AnYt}a)P{OIQ%y@-x5W)n9h(6ZD>nVX3DgliT~gantCSu!Ng2s z$NhZXzPGnpua0%5X=kEcSiSGt?{`1@zTfxrzWd(W$3}KIlR_*J(Xr?(@LqH* zY74x%sI`xje@rCBsAv=G1Z{DT{2N(i@mQeN;YBUM;>q=zrVXM|wCo*8?dwf#=}PW> zYS*imKP1aU{2B4)AB>4hI7Q<#BDJhX#K1T&I^;>-?f?F)X!yf1@fPR|5QkJ;m2q{b49Ks=-#H}DCkGRJW zl6M=pFCZk3xTg@3N1W3L$s^8Lgya$DGD7l*L%lZo(m`3`@}MknZz8;gllFKA;dOPr z>GYW7@p-MF$>Z}3(B$!X?Fh-^^STj|r}4=ne*T0IYklcx!SjjBH1b%Ev+2jR_&td8 zS>$JdLw{1G={WC^d4=$}!rycMLCK#*ocMEX zPW&q3JgyvY;-njKp8fK(QvSM5-&fNzK8iT?J9);5Q+@@`H(#m6o5}y06L0;aF^PBT z>*{{Q$#43P+Vl7$=GtF7{1o`aJ1d;{am2~r^S2YOes>|B%VuP}g7nay=O>-`X(hid z=fty!Q=jR)6F-MI@4xgpCk|39!^!-n{o251er&Xz_-WwN{x_>md=`AB@7fV3PW*q1 z&#z~EUT((WgA{k;Y?@Q@e>^7Rb1ypj%p&f!$7#g9_Be;Q*B%!YU)$p<;$C}PN8D?V zTS{Krqv22H+oKh6uRYoj_u8Wiaj!j6heRi->#eaaHlPJ+33}wZ|>Qz4mB$*}>EHXhodq)8(TLaj!kP5ck@H`RTRC zDEMFX=*za&YmW-}U-9sdBkr}wEaF~!oK|sdk8_B7?Qs!tuRX3J?zP8t#n<+@g}B!q z4Szb{9<7KIPursnaj!kP5ck?6g?K%CWWld`^!3~0IQXCU@MjVC+T%3hUVEHVacz%_ zi0gKa>AI@oN1-S4`MQdqK}fxBsdxb)pVRPX&i$_;&ih+c9Hi8%O~u>6XFhkS_!;1{ z+^1ChCGctYQP2HPK`$PN7&{OWH-#`R)`$Uw#2rOQ+;N0VZx$hO3kZqJ zgSbZ#Uk5s6Tcs^Nd*lK968LfPaf~m30^Bo*6ZgL7(RSj#*AOS}deAE%c^UEUSckZ> z_C?W(Yi}T)wvC;I0#ki>>Mg{H(|U&axJa;5rZXWfB+hIQ}7T zzV{~5+m1MS35k}rcSw0BeR1(HZE*?{v3y*t#4WomW7IMdDRVMk z%vbVO5!d1ZX?9K9*HK9?PGDH=HmhP1`JHOkp1`$HikVUfTmN9Ax@7 z`0%J(TnxTX?tY&f%V-?GHg)>4uQ>XC!Y9YNw+WIl5r0=K>40YvHpaD~gjF(ntzyNT zt_Y=fo0Mz#!8PO`&lAtU-oWFr)d}Qp+6E~nesB%>@vL}J*2i78l{iv1lS%vpUWt~G z<53>hkuDy`5MEaF&|hGT2b$$)4(B_d9ldc4JeCjIrxmo;+W<{_Q}1@rTJLVqv?KNA zF^7|K)H^Od?8+U79Q9f9B`|P!_3`K5&w<~YC|G6FfLhSX=r2xM#QPN&@2YxkLfJcu zd-z=Dz281;mq%u%CaeO+bGUD%_;qQYCe;0DwgWikaQ!WuJW5}KPKv$&x&bGTrn6|< z6g>oby`twpZ&dWDzZ?@?ioOZDN73uPF(w8SodeBhe50ZEd*SRoyxs- zOYF8#j+&4jr=DfM?v#<6NLQDl&m-(nv_M%HQ1lS!5@@aWQP9+ndY=HT^`2GoaWNw1 zNTXg}R@c0GuR=;XfsxPcT(!H#is}RE`NTp{wIdbawTn71mxqg-N02mrweJM zJ+}IA*jMRvvp-SNlD>s0;%jZAtlk1XlwSH3fYkkG^1Zt}1!NmKbi}#Yk+v~%7 z2zdT}gL#)5+|#+9{>J`el!VOi1o#BpaM(3;T>-i02G^(i_Q ziv^m|E~C^qgKG{4cpkuSos+oAZb2XIi1T34@ykhu`lIF81=N$f1pe>h-F!e~y2; zP5H^RJ-U>iO#91Ih_ge{{&KcIUVms7{K)_3yl-Qq{Vke{&AcHS(LDomL6c-G8V zSu>ew|ALY1+ALpXe_$LUA1Paz!}*c})ZP6PrH44SS*{i;4$QV~3#Mo5JiWGUo7j@v z;?s_36ZvA+!FqVXBs~-kDw9j&RhmlKL))m}cRs7lj8IyQlT4&bR8~Vc^n055y4$u2 z9lc~x2(Qn2?$%e;3m=DryN|6-r7P*mOvyC%;-yC+f2cTR7Aw4uCo=lNik+E^iPw!! z<*h=RlLj;st-^)7`-{d<`jBb#*|ueC4%&nZ&HF54FJ1`QGx{pt9$i?~k2j8o(gnP1 zE?4Yo#*6m}@Yn6LiWz8-FIHs>+&7&uOJ1Rb1Svj;q-G7grzu%wIg>#@CX3?^zkeb1gX{U>>$ZtZVRf*)E%V$kvV#XLV zZA)YPR!yM4Xildy6$7ujP>{61NeHZU5c*YOphL8QinjsrE zBA?7`P(Hm2k$aqE`S0Ep6Bj;|8W_NB$Q9(#FUb;PJemfaYu-$G>dm!#^BLPJTay)| z_rV8cCe6!d6h6Fi!ux~$=}IQIMH5>!fePWU@J_G+hIwA>9e8X2H$?OQYV$)Y@GnO5 z|7!L)4*y^@|1X;V$A(nThm7X`^|ag`F|ZEn*SHg|66SH|C$?i&YS;fB={qcu7X$GaYPH|5^~;QFXj=l-OzqS_N)GR zt(?c`%!?$BF=AEij43$3@ms)a5jQYL{D7L%eGT&%+kwqv&tG8;hNjPB?WdwofgV!y z4bbC??tT?(KNY?CHLU&AG}dJtQ}hAQFDUv7=u@EoYw7&?^ zF;DyLlbCzm^iN~5?H(~J#y+fxFz_qBV$$IwN)Jo9Wv`chA9jN5o+moQBPxAt?|Cr) z)=0S}ujerT)p#W*-<{E`lyIi}mbo~Bdarck-tB?h(3zaP{}j^M@GZ>UR=6ubvp=EU z>p^2&F4wT;&jsr8PF``mJQ8ge&b_wDNW4?vjD z{}@8QUVMJyiE2J`Sb89+7Sgxm^&q`UzoaJ0Dn^O~o8R!)k zSQD()0bN#jtpRu+!g`bYuoCJc;-j#efmKr*#QjWIbSwf3+$A>6X*KyPng>gnLkSW2 z|0DlD_9TFZIP(8T{{P7TAI<;ex<|cVMg#os99QZ6GFlPmD@;8fx()G0#H0DY(fa>r z{eQInpKA-F_5Y1S(fWTOqV@mIJ`{2v0nhq+?4IKOZjaXgN9+H&pFp(!pZ!L({{N@3 z{{Iu$ALNtR5n>a(j1OY(i4OG9(Xm)8&@BCb^!%+J=-)Mv+Bsx&82kJ8ZQE+3`gT3J zTka|GpPfakU>&lI&b^~qqjUc@qjUF^(K(hkItLNoJ!y3I8yk|zas1C0Glgo_++cL3 zj131RhC@qGbs2POaQ}$Q7#Zw++=-+H)zy7{eW{`0!BICpc<{-QzTy6TqkY4V?(FST zNc#pcJF$Q7(BSasL0o!tc!S(crIU0?(VV%wZELcW$>HkL2f(pBQrQ}vF<^-MTxGoq z9LX1960qAl3&!T@uFa1aos$}dbD{B!B<3FD3E7(7kpGAa=Sn-tnJ8yA5b(XnWBaK; zQivQdtU|V!o-)fxfEtHQyJ!}`VWf&ZSrmCFn^zRlg(uve+DP7n;W8!KlJF(rD2iXZ)h#TG*om1&d4jVCT??2G}FfUGS-;k8k%<(|PAZS%9 zJ^(xj*Yi^)q{zp@l?_HmUv0K}$F?NqbqCDqPETNNuvJWEVzEu3PYyHx-5p`<#t3uos58>!2s3zex$pmBbUBPZHC;B<_)^D$Mwpt1;mZ5Rm2T4A zabYcTfwQKcL~`sC)1 zA$`nf6zN&uiPD4xp3x{W_-8~kij=?B7W|nNjUv&Q_-a!$icFUlEHKe1G8#n&77p)5 z0~keOj>&2@GNQLqy5^+Y4{prZT0cj1@Z<&GwOkF~rqWoE-6VR4Z0mDorV=c?5WHNu ze+&n0%M$9ZlQlV*24|Qq05Wohwb}a>PTax2YQoE7@1aP}{ z9R+alY}Zw^Alq>b1+amwJMjRnlQivU2@rr`aJzE#1n?aI?b-m)z`X0N$Q0{AHE z$~6+qRIZQ!Cer3{eFO;L(X~!0fDZuG{3Pv6P)!3s&6N=V0DjGN5x|FT%2g4-6FfI3NDhAyP8+RIDufN~F-dMRlt9s3~Wb^HyC0HWu*;sBShiaqP%E2bN7PqQq4Aw;d%jK?HVD^{nsidr!YemsTc z|GX7*+A`-a*3quT{%%}H%Vokh){HH(4m{U+zAKh5mSB%Vp3qz25Kly`%6(e0ba^(vQb4 zc`3YpnL2}dQ|@UueFJ~**l*N_$9+iscwC#Fz&3c6;h?HSCRYl4Qy|tNE`1yO1pJ+| z?s^??3pjb)L^!SJJ^wH!jw||Q&?gmr8}v(x9{SFhcv;bBL7!9fip%(3v!b5`eOb}x zLBpx@y-dv6KcMO3FA9ERiR-kVRC=94I#|BA=ErQHxB0-6 zm`>JDlu+cO{x00|UzPiXte`XW*dt?tbzr5)L9RvQP_M43y4CcL*h2y*kMjt76#eEu zWB$LQH(tTMA&M@6&MNu>=#rwF{$)%YRrC<(6N;V&J*((B&`js|krJlsWC728-pQx6 zzvk?3qSH(Ld!QNI!aqKbJv4YSpGMO7EFM1sC^t93cjTat-k*Z|a`2oU!FM}>$HTx$ z{aL^K`NaC5k&Kaq{Nko8uDE_4Xr&PuU#Oq(=tp_p=htsFuDkm6 zC!FcQNc(Ow*Rk*Jc6bEtr^@SF3vw+nb_ww-e+ZPqy>JWI`w+3In zb+Qzd1;4Fj-{|dUTT#|npId>)@dVpmZ7=_RG0VVnzN0AcDb_^MTaU*TPD2PB_PGh{ zHCyDkKz`42ziY443MUR6_6^+kM5o7ZFX~4aBe5%AOxrUCHwu>HleCL>OW`dG!1L?J zw!J?wMXw4C^@F(hoQtyq<(77842hHIoA%(aKKa@ag|k8FhXDCJ{XV&Sd~&SEaq)%s z$=&6XcPKgsdXJ*dgC13MH@;Cx`wYwazWhgfmSS%ooV54dzVy1|Kc79< zc;sY4qd$=aA`3(oh%B(^EYK-7!_%==M2BUDGEX6}vI=>0fkK`dL-@K8$-fO3Fv;|AOXey9*fIdD_wXzs_j=U!6IOdQDNN z6-av0Rk-y*wMkfaUZxSv+~&N4g%*J7NnfFtI_gPa;WDZ=DJ=8@^dzxxH+UwEg)0iS z`YKY06+0|B?xeD4{hyxC<(;$^E|c786Jgi5)h4w?>;L@o=4+GY!d1cAB)V|6RFmq$ zs8Lj`58;pb*TSn{uYM)?aZyk*y7aHfe zO9R4r(uZ(2{M1L0kBb4Z a7jp~-#gKRcZNUL @<<$(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) -<< diff --git a/libraries/msdos/winsock/libldap.rc b/libraries/msdos/winsock/libldap.rc deleted file mode 100644 index 2c15d8d80c..0000000000 --- a/libraries/msdos/winsock/libldap.rc +++ /dev/null @@ -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 diff --git a/libraries/msdos/winsock/ltest/console.c b/libraries/msdos/winsock/ltest/console.c deleted file mode 100644 index 2cacc0d325..0000000000 --- a/libraries/msdos/winsock/ltest/console.c +++ /dev/null @@ -1,257 +0,0 @@ -/* - * console.c -- simple windows console emulator for Winsock testing - * 27 June 1993 by Mark C Smith - */ -#include -#include -#include -#include "console.h" - -static char *argv[] = { "console", "rearwindow", 0 }; /* */ -char szAppName[20]; -char szLineBuf[512]; -HWND hInst; -HWND hWndMain, hWndOutputEdit; -HANDLE hAccel; - -int reg_classes( void ); -void unreg_classes( void ); - - - -int PASCAL -WinMain( HANDLE hInstance, HANDLE hPrevInst, LPSTR lpszCmdLine, int nCmdShow) -{ - MSG msg; - int rc; - - strcpy( szAppName, "console"); - - hInst = hInstance; - if ( !hPrevInst ) { - if (( rc = reg_classes()) != 0 ) { - MessageBox(0, "Couldn't register window classes", NULL, MB_ICONEXCLAMATION); - return( rc ); - } - } - - hWndMain = CreateWindow( - szAppName, /* Window class name */ - "Console", /* Window's title */ - WS_CAPTION | /* Title and Min/Max */ - WS_SYSMENU | /* Add system menu box */ - WS_MINIMIZEBOX | /* Add minimize box */ - WS_MAXIMIZEBOX | /* Add maximize box */ - WS_THICKFRAME | /* thick sizeable frame */ - WS_CLIPCHILDREN | /* don't draw in child windows areas */ - WS_OVERLAPPED, - CW_USEDEFAULT, 0, /* Use default X, Y */ - CW_USEDEFAULT, 0, /* Use default X, Y */ - 0, /* Parent window's handle */ - 0, /* Default to Class Menu */ - hInst, /* Instance of window */ - NULL ); /* Create struct for WM_CREATE */ - - if( !hWndMain ) { - MessageBox( 0, "Couldn't create main window", NULL, MB_ICONEXCLAMATION); - return( -1 ); - } - - ShowWindow( hWndMain, nCmdShow ); - - hAccel = LoadAccelerators( hInst, szAppName ); - - if (( hWndOutputEdit = new_editwindow( hWndMain, "console output" )) == NULL ) { - MessageBox( 0, "Couldn't create output window", NULL, MB_ICONEXCLAMATION); - return( -1 ); - } - - while( GetMessage( &msg, 0, 0, 0 )) { - if( TranslateAccelerator( hWndMain, hAccel, &msg )) { - continue; - } - - TranslateMessage(&msg); - DispatchMessage(&msg); - } - - unreg_classes(); - return( msg.wParam ); -} - -LONG FAR PASCAL -WndProc( HWND hWnd, WORD msg, WORD wParam, LONG lParam ) -{ - HDC hDC; - PAINTSTRUCT ps; - - switch( msg ) { - case WM_COMMAND: - switch( wParam ) { - case IDM_F_OPENLDAP: - ldapmain( 2, argv ); - break; - - case IDM_F_EXIT: - PostQuitMessage( 0 ); - break; - - default: - return( DefWindowProc( hWnd, msg, wParam, lParam )); - } - - case WM_CREATE: - break; - - case WM_MOVE: - break; - - case WM_SIZE: - break; - - case WM_PAINT: - memset( &ps, 0x00, sizeof( PAINTSTRUCT )); - hDC = BeginPaint( hWnd, &ps ); - SetBkMode(hDC, TRANSPARENT); - - EndPaint(hWnd, &ps); - break; - - case WM_CLOSE: - DestroyWindow(hWnd); - if ( hWnd == hWndMain ) { - PostQuitMessage( 0 ); - } - break; - - default: - return( DefWindowProc( hWnd, msg, wParam, lParam )); - } - - return( 0L ); -} - -int -reg_classes( void ) -{ - WNDCLASS wndclass; - memset( &wndclass, 0x00, sizeof( WNDCLASS )); - - - wndclass.style = CS_HREDRAW | CS_VREDRAW | CS_BYTEALIGNWINDOW; - wndclass.lpfnWndProc = WndProc; - wndclass.cbClsExtra = 0; - wndclass.cbWndExtra = 0; - wndclass.hInstance = hInst; - wndclass.hIcon = LoadIcon(hInst, "CONSOLE"); - wndclass.hCursor = LoadCursor(NULL, IDC_ARROW); - wndclass.hbrBackground = (HBRUSH)( COLOR_WINDOW+1 ); - wndclass.lpszMenuName = szAppName; /* Menu Name is App Name */ - wndclass.lpszClassName = szAppName; /* Class Name is App Name */ - if( !RegisterClass( &wndclass )) { - return( -1 ); - } - - return( 0 ); -} - -void -unreg_classes( void ) -{ - UnregisterClass( szAppName, hInst ); -} - - -char * -getline( char *line, int len, FILE *s, char *prompt ) -{ - FARPROC lpfnDlgProc; - int nRc; - - printf( prompt ); - - lpfnDlgProc = MakeProcInstance((FARPROC)GetLineDlgProc, hInst); - nRc = DialogBox(hInst, MAKEINTRESOURCE(200), hWndMain, lpfnDlgProc); - FreeProcInstance(lpfnDlgProc); - if ( !nRc ) { - return( NULL ); - } - strncpy( line, szLineBuf, len ); - printf( "%s\n", line ); - return( line ); -} - - - -void -perror( char *msg ) -{ - printf( "%s: error %d\n", msg, WSAGetLastError()); -} - -void -appexit( int rc ) -{ - printf( "exit( %d )\n", rc ); -} - -int -fprintf( FILE *f, char *fmt, void *a1, void *a2, void *a3, void *a4, - void *a5 ) -{ - printf( fmt, a1, a2, a3, a4, a5 ); -} - -int -printf( char *fmt, void *a1, void *a2, void *a3, void *a4, void *a5 ) -{ - char *p, *send, buf[ 1024 ], *crlf = "\r\n"; - - sprintf( buf, fmt, a1, a2, a3, a4, a5 ); - - send = buf; - for ( p = buf; *p != '\0'; ++p ) { - if ( *p == '\n' ) { - *p = '\0'; - SendMessage( hWndOutputEdit, EM_REPLACESEL, 0, (long)send ); - SendMessage( hWndOutputEdit, EM_REPLACESEL, 0, (long)crlf ); - send = p + 1; - } - } - - if ( p > send ) { - SendMessage( hWndOutputEdit, EM_REPLACESEL, 0, (long)send ); - } -} - -BOOL FAR PASCAL -GetLineDlgProc(HWND hWndDlg, WORD Message, WORD wParam, LONG lParam) -{ - switch(Message) { - case WM_INITDIALOG: - /* cwCenter(hWndDlg, 0); */ - break; - - case WM_CLOSE: - /* Closing the Dialog behaves the same as Cancel */ - PostMessage(hWndDlg, WM_COMMAND, IDCANCEL, 0L); - break; - - case WM_COMMAND: - switch(wParam) { - case IDOK: - SendDlgItemMessage( hWndDlg, DLG_GETLINE_TEXT, WM_GETTEXT, sizeof( szLineBuf), - (long)szLineBuf ); - EndDialog(hWndDlg, TRUE); - break; - case IDCANCEL: - EndDialog(hWndDlg, FALSE); - break; - } - break; - - default: - return FALSE; - } - return TRUE; -} diff --git a/libraries/msdos/winsock/ltest/console.h b/libraries/msdos/winsock/ltest/console.h deleted file mode 100644 index 03f48bf082..0000000000 --- a/libraries/msdos/winsock/ltest/console.h +++ /dev/null @@ -1,19 +0,0 @@ -/* - * console.h -- defines for a simple windows console emulator - * 27 June 1993 by Mark C Smith - */ - -#define IDM_FILE 1000 -#define IDM_F_OPENLDAP 1050 -#define IDM_F_EXIT 1100 -#define DLG_GETLINE_TEXT 102 - -#define exit( e ) appexit( e ); return( e ) - -void perror( char *msg ); -int printf( char *fmt, ... ); -int fprintf( FILE *f, char *fmt, ... ); -void appexit( int rc ); -char *getline( char *line, int len, FILE *s, char *prompt ); -LONG FAR PASCAL WndProc( HWND, WORD, WORD, LONG ); -BOOL FAR PASCAL GetLineDlgProc(HWND hWndDlg, WORD Message, WORD wParam, LONG lParam); diff --git a/libraries/msdos/winsock/ltest/inpdlg.dlg b/libraries/msdos/winsock/ltest/inpdlg.dlg deleted file mode 100644 index de0c641d44..0000000000 --- a/libraries/msdos/winsock/ltest/inpdlg.dlg +++ /dev/null @@ -1,14 +0,0 @@ -DLGINCLUDE RCDATA DISCARDABLE -BEGIN - "INPDLG.H\0" -END - -200 DIALOG 14, 28, 313, 34 -STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION "Getline" -FONT 8, "MS Sans Serif" -BEGIN - LTEXT "Input:", 101, 2, 3, 20, 8 - EDITTEXT DLG_GETLINE_TEXT, 25, 2, 245, 26, ES_AUTOHSCROLL - PUSHBUTTON "Enter", IDOK, 275, 6, 33, 14 -END diff --git a/libraries/msdos/winsock/ltest/inpdlg.h b/libraries/msdos/winsock/ltest/inpdlg.h deleted file mode 100644 index 2838cc5bd5..0000000000 --- a/libraries/msdos/winsock/ltest/inpdlg.h +++ /dev/null @@ -1 +0,0 @@ -#define DLG_GETLINE_TEXT 102 diff --git a/libraries/msdos/winsock/ltest/ltest.def b/libraries/msdos/winsock/ltest/ltest.def deleted file mode 100644 index 27416cd32a..0000000000 --- a/libraries/msdos/winsock/ltest/ltest.def +++ /dev/null @@ -1,9 +0,0 @@ -NAME CONSOLE -EXETYPE WINDOWS -STUB 'C:\windows\WINSTUB.EXE' -CODE PRELOAD MOVEABLE -DATA PRELOAD MOVEABLE MULTIPLE -HEAPSIZE 32768 -EXPORTS WndProc @1 - TEditWndProc @2 - GetLineDlgProc @3 diff --git a/libraries/msdos/winsock/ltest/ltest.mak b/libraries/msdos/winsock/ltest/ltest.mak deleted file mode 100644 index df5e9a6d92..0000000000 --- a/libraries/msdos/winsock/ltest/ltest.mak +++ /dev/null @@ -1,140 +0,0 @@ -# Microsoft Visual C++ generated build script - Do not modify - -PROJ = LTEST -DEBUG = 1 -PROGTYPE = 0 -CALLER = -ARGS = -DLLS = -D_RCDEFINES = -d_DEBUG -R_RCDEFINES = -dNDEBUG -ORIGIN = MSVC -ORIGIN_VER = 1.00 -PROJPATH = E:\SRC\LDAP-3.3B1\LIBRAR~1\MSDOS\WINSOCK\LTEST\ -USEMFC = 0 -CC = cl -CPP = cl -CXX = cl -CCREATEPCHFLAG = -CPPCREATEPCHFLAG = -CUSEPCHFLAG = -CPPUSEPCHFLAG = -FIRSTC = CONSOLE.C -FIRSTCPP = -RC = rc -CFLAGS_D_WEXE = /nologo /G2 /W3 /Gf /Zi /AL /Od /D "_DEBUG" /D "DOS" /D "NEEDPROTOS" /D "WINSOCK" /I "..\h" /I "..\winsock" /FR /GA /Fd"LIBLDAP.PDB" -CFLAGS_R_WEXE = /nologo /W3 /AM /O1 /D "NDEBUG" /D "DOS" /D "NEEDPROTOS" /D "WINSOCK" /I "..\winsock" /FR /GA -LFLAGS_D_WEXE = /NOLOGO /NOD /PACKC:61440 /STACK:10240 /ALIGN:16 /ONERROR:NOEXE /CO -LFLAGS_R_WEXE = /NOLOGO /NOD /PACKC:61440 /STACK:10240 /ALIGN:16 /ONERROR:NOEXE -LIBS_D_WEXE = oldnames libw llibcew commdlg.lib olecli.lib olesvr.lib shell.lib -LIBS_R_WEXE = oldnames libw mlibcew commdlg.lib olecli.lib olesvr.lib shell.lib -RCFLAGS = /nologo -RESFLAGS = /nologo -RUNFLAGS = -DEFFILE = LTEST.DEF -OBJS_EXT = -LIBS_EXT = ..\..\..\LIBLDAP\LIBLDAP.LIB ..\..\..\LIBLDAP\WINSOCK.LIB -!if "$(DEBUG)" == "1" -CFLAGS = $(CFLAGS_D_WEXE) -LFLAGS = $(LFLAGS_D_WEXE) -LIBS = $(LIBS_D_WEXE) -MAPFILE = nul -RCDEFINES = $(D_RCDEFINES) -!else -CFLAGS = $(CFLAGS_R_WEXE) -LFLAGS = $(LFLAGS_R_WEXE) -LIBS = $(LIBS_R_WEXE) -MAPFILE = nul -RCDEFINES = $(R_RCDEFINES) -!endif -!if [if exist MSVC.BND del MSVC.BND] -!endif -SBRS = CONSOLE.SBR \ - TEXTWIND.SBR \ - GETOPT.SBR \ - TEST.SBR - - -LIBLDAP_DEP = - -WINSOCK_DEP = - -CONSOLE_DEP = c:\msvc\include\winsock.h \ - e:\src\ldap-3.3b1\librar~1\msdos\winsock\ltest\console.h - - -TEXTWIND_DEP = e:\src\ldap-3.3b1\librar~1\msdos\winsock\ltest\console.h \ - e:\src\ldap-3.3b1\librar~1\msdos\winsock\ltest\textwind.h - - -LTEST_RCDEP = e:\src\ldap-3.3b1\librar~1\msdos\winsock\ltest\console.h \ - e:\src\ldap-3.3b1\librar~1\msdos\winsock\ltest\inpdlg.dlg - - -GETOPT_DEP = e:\src\ldap-3.3b1\include\lber.h \ - e:\src\ldap-3.3b1\include\proto-lb.h - - -TEST_DEP = e:\src\ldap-3.3b1\include\msdos.h \ - c:\msvc\include\winsock.h \ - e:\src\ldap-3.3b1\include\sys/socket.h \ - e:\src\ldap-3.3b1\include\sys/file.h \ - e:\src\ldap-3.3b1\include\lber.h \ - e:\src\ldap-3.3b1\include\proto-lb.h \ - e:\src\ldap-3.3b1\include\ldap.h \ - e:\src\ldap-3.3b1\include\proto-ld.h - - -all: $(PROJ).EXE $(PROJ).BSC - -CONSOLE.OBJ: CONSOLE.C $(CONSOLE_DEP) - $(CC) $(CFLAGS) $(CCREATEPCHFLAG) /c CONSOLE.C - -TEXTWIND.OBJ: TEXTWIND.C $(TEXTWIND_DEP) - $(CC) $(CFLAGS) $(CUSEPCHFLAG) /c TEXTWIND.C - -LTEST.RES: LTEST.RC $(LTEST_RCDEP) - $(RC) $(RCFLAGS) $(RCDEFINES) -r LTEST.RC - -GETOPT.OBJ: ..\..\..\MACINTOS\GETOPT.C $(GETOPT_DEP) - $(CC) $(CFLAGS) $(CUSEPCHFLAG) /c ..\..\..\MACINTOS\GETOPT.C - -TEST.OBJ: ..\..\..\LIBLDAP\TEST.C $(TEST_DEP) - $(CC) $(CFLAGS) $(CUSEPCHFLAG) /c ..\..\..\LIBLDAP\TEST.C - - -$(PROJ).EXE:: LTEST.RES - -$(PROJ).EXE:: CONSOLE.OBJ TEXTWIND.OBJ GETOPT.OBJ TEST.OBJ $(OBJS_EXT) $(DEFFILE) - echo >NUL @<<$(PROJ).CRF -CONSOLE.OBJ + -TEXTWIND.OBJ + -GETOPT.OBJ + -TEST.OBJ + -$(OBJS_EXT) -$(PROJ).EXE -$(MAPFILE) -c:\msvc\lib\+ -c:\msvc\mfc\lib\+ -c:\src\lib\+ -e:.\+ -..\..\..\LIBLDAP\LIBLDAP.LIB+ -..\..\..\LIBLDAP\WINSOCK.LIB+ -$(LIBS) -$(DEFFILE); -<< - link $(LFLAGS) @$(PROJ).CRF - $(RC) $(RESFLAGS) LTEST.RES $@ - @copy $(PROJ).CRF MSVC.BND - -$(PROJ).EXE:: LTEST.RES - if not exist MSVC.BND $(RC) $(RESFLAGS) LTEST.RES $@ - -run: $(PROJ).EXE - $(PROJ) $(RUNFLAGS) - - -$(PROJ).BSC: $(SBRS) - bscmake @<< -/o$@ $(SBRS) -<< diff --git a/libraries/msdos/winsock/ltest/ltest.rc b/libraries/msdos/winsock/ltest/ltest.rc deleted file mode 100644 index 60622a5220..0000000000 --- a/libraries/msdos/winsock/ltest/ltest.rc +++ /dev/null @@ -1,22 +0,0 @@ -#include -#include "console.h" - - -CONSOLE MENU - BEGIN - POPUP "&File" - BEGIN - MENUITEM "&Open LDAP", IDM_F_OPENLDAP - MENUITEM SEPARATOR - MENUITEM "E&xit\tAlt+F4", IDM_F_EXIT - END - END - - -CONSOLE ACCELERATORS - BEGIN - VK_F12, IDM_F_OPENLDAP, VIRTKEY, CONTROL - VK_F4, IDM_F_EXIT, ALT, VIRTKEY - END - -#include "inpdlg.dlg" diff --git a/libraries/msdos/winsock/ltest/ltest32.mak b/libraries/msdos/winsock/ltest/ltest32.mak deleted file mode 100644 index 586018c653..0000000000 --- a/libraries/msdos/winsock/ltest/ltest32.mak +++ /dev/null @@ -1,348 +0,0 @@ -# Microsoft Developer Studio Generated NMAKE File, Format Version 4.10 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Application" 0x0101 - -!IF "$(CFG)" == "" -CFG=LTEST - Win32 Debug -!MESSAGE No configuration specified. Defaulting to LTEST - Win32 Debug. -!ENDIF - -!IF "$(CFG)" != "LTEST - Win32 Release" && "$(CFG)" != "LTEST - Win32 Debug" -!MESSAGE Invalid configuration "$(CFG)" specified. -!MESSAGE You can specify a configuration when running NMAKE on this makefile -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "LTEST32.MAK" CFG="LTEST - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "LTEST - Win32 Release" (based on "Win32 (x86) Application") -!MESSAGE "LTEST - Win32 Debug" (based on "Win32 (x86) Application") -!MESSAGE -!ERROR An invalid configuration is specified. -!ENDIF - -!IF "$(OS)" == "Windows_NT" -NULL= -!ELSE -NULL=nul -!ENDIF -################################################################################ -# Begin Project -# PROP Target_Last_Scanned "LTEST - Win32 Debug" -CPP=cl.exe -RSC=rc.exe -MTL=mktyplib.exe - -!IF "$(CFG)" == "LTEST - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Target_Dir "" -OUTDIR=.\Release -INTDIR=.\Release - -ALL : "$(OUTDIR)\LTEST32.exe" - -CLEAN : - -@erase "$(INTDIR)\console.obj" - -@erase "$(INTDIR)\getopt.obj" - -@erase "$(INTDIR)\ltest.res" - -@erase "$(INTDIR)\test.obj" - -@erase "$(INTDIR)\textwind.obj" - -@erase "$(OUTDIR)\LTEST32.exe" - -"$(OUTDIR)" : - if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" - -# ADD BASE CPP /nologo /W3 /O1 /I "..\winsock" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "DOS" /D "NEEDPROTOS" /D "WINSOCK" /FR /YX /c -# ADD CPP /nologo /W3 /O1 /I "..\..\..\..\include" /I "." /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "DOS" /D "NEEDPROTOS" /D "WINSOCK" /YX /c -# SUBTRACT CPP /Fr -CPP_PROJ=/nologo /ML /W3 /O1 /I "..\..\..\..\include" /I "." /D "WIN32" /D\ - "NDEBUG" /D "_WINDOWS" /D "DOS" /D "NEEDPROTOS" /D "WINSOCK"\ - /Fp"$(INTDIR)/LTEST32.pch" /YX /Fo"$(INTDIR)/" /c -CPP_OBJS=.\Release/ -CPP_SBRS=.\. -# ADD BASE MTL /nologo /D "NDEBUG" /win32 -# ADD MTL /nologo /D "NDEBUG" /win32 -MTL_PROJ=/nologo /D "NDEBUG" /win32 -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -RSC_PROJ=/l 0x409 /fo"$(INTDIR)/ltest.res" /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -BSC32_FLAGS=/nologo /o"$(OUTDIR)/LTEST32.bsc" -BSC32_SBRS= \ - -LINK32=link.exe -# ADD BASE LINK32 oldnames.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /stack:0x2800 /subsystem:windows /machine:IX86 -# ADD LINK32 oldnames.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /stack:0x2800 /subsystem:windows /machine:IX86 -LINK32_FLAGS=oldnames.lib kernel32.lib user32.lib gdi32.lib winspool.lib\ - comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib\ - odbc32.lib odbccp32.lib /nologo /stack:0x2800 /subsystem:windows\ - /incremental:no /pdb:"$(OUTDIR)/LTEST32.pdb" /machine:IX86 /def:".\ltest.def"\ - /out:"$(OUTDIR)/LTEST32.exe" -DEF_FILE= \ - ".\ltest.def" -LINK32_OBJS= \ - "$(INTDIR)\console.obj" \ - "$(INTDIR)\getopt.obj" \ - "$(INTDIR)\ltest.res" \ - "$(INTDIR)\test.obj" \ - "$(INTDIR)\textwind.obj" \ - "..\..\..\..\..\..\MSDEV\LIB\WSOCK32.LIB" \ - "..\..\..\libldap\Debug\ldap32.lib" - -"$(OUTDIR)\LTEST32.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) - $(LINK32) @<< - $(LINK32_FLAGS) $(LINK32_OBJS) -<< - -!ELSEIF "$(CFG)" == "LTEST - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Target_Dir "" -OUTDIR=.\Debug -INTDIR=.\Debug - -ALL : "$(OUTDIR)\LTEST32.exe" - -CLEAN : - -@erase "$(INTDIR)\console.obj" - -@erase "$(INTDIR)\getopt.obj" - -@erase "$(INTDIR)\ltest.res" - -@erase "$(INTDIR)\test.obj" - -@erase "$(INTDIR)\textwind.obj" - -@erase "$(OUTDIR)\LTEST32.exe" - -@erase "$(OUTDIR)\LTEST32.ilk" - -@erase "$(OUTDIR)\LTEST32.pdb" - -@erase ".\LIBLDAP.IDB" - -@erase ".\LIBLDAP.PDB" - -"$(OUTDIR)" : - if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" - -# ADD BASE CPP /nologo /W3 /Gm /Zi /Od /Gf /I "..\h" /I "..\winsock" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "DOS" /D "NEEDPROTOS" /D "WINSOCK" /FR /YX /Fd"LIBLDAP.PDB" /c -# ADD CPP /nologo /W3 /Gm /Zi /Od /Gf /I "..\h" /I "..\..\..\..\include" /I "." /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "DOS" /D "NEEDPROTOS" /D "WINSOCK" /YX /Fd"LIBLDAP.PDB" /c -# SUBTRACT CPP /Fr -CPP_PROJ=/nologo /MLd /W3 /Gm /Zi /Od /Gf /I "..\h" /I "..\..\..\..\include" /I\ - "." /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "DOS" /D "NEEDPROTOS" /D "WINSOCK"\ - /Fp"$(INTDIR)/LTEST32.pch" /YX /Fo"$(INTDIR)/" /Fd"LIBLDAP.PDB" /c -CPP_OBJS=.\Debug/ -CPP_SBRS=.\. -# ADD BASE MTL /nologo /D "_DEBUG" /win32 -# ADD MTL /nologo /D "_DEBUG" /win32 -MTL_PROJ=/nologo /D "_DEBUG" /win32 -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -RSC_PROJ=/l 0x409 /fo"$(INTDIR)/ltest.res" /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -BSC32_FLAGS=/nologo /o"$(OUTDIR)/LTEST32.bsc" -BSC32_SBRS= \ - -LINK32=link.exe -# ADD BASE LINK32 oldnames.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /stack:0x2800 /subsystem:windows /debug /machine:IX86 -# ADD LINK32 oldnames.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /stack:0x2800 /subsystem:windows /debug /machine:IX86 -LINK32_FLAGS=oldnames.lib kernel32.lib user32.lib gdi32.lib winspool.lib\ - comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib\ - odbc32.lib odbccp32.lib /nologo /stack:0x2800 /subsystem:windows\ - /incremental:yes /pdb:"$(OUTDIR)/LTEST32.pdb" /debug /machine:IX86\ - /def:".\ltest.def" /out:"$(OUTDIR)/LTEST32.exe" -DEF_FILE= \ - ".\ltest.def" -LINK32_OBJS= \ - "$(INTDIR)\console.obj" \ - "$(INTDIR)\getopt.obj" \ - "$(INTDIR)\ltest.res" \ - "$(INTDIR)\test.obj" \ - "$(INTDIR)\textwind.obj" \ - "..\..\..\..\..\..\MSDEV\LIB\WSOCK32.LIB" \ - "..\..\..\libldap\Debug\ldap32.lib" - -"$(OUTDIR)\LTEST32.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) - $(LINK32) @<< - $(LINK32_FLAGS) $(LINK32_OBJS) -<< - -!ENDIF - -.c{$(CPP_OBJS)}.obj: - $(CPP) $(CPP_PROJ) $< - -.cpp{$(CPP_OBJS)}.obj: - $(CPP) $(CPP_PROJ) $< - -.cxx{$(CPP_OBJS)}.obj: - $(CPP) $(CPP_PROJ) $< - -.c{$(CPP_SBRS)}.sbr: - $(CPP) $(CPP_PROJ) $< - -.cpp{$(CPP_SBRS)}.sbr: - $(CPP) $(CPP_PROJ) $< - -.cxx{$(CPP_SBRS)}.sbr: - $(CPP) $(CPP_PROJ) $< - -################################################################################ -# Begin Target - -# Name "LTEST - Win32 Release" -# Name "LTEST - Win32 Debug" - -!IF "$(CFG)" == "LTEST - Win32 Release" - -!ELSEIF "$(CFG)" == "LTEST - Win32 Debug" - -!ENDIF - -################################################################################ -# Begin Source File - -SOURCE=.\console.c -DEP_CPP_CONSO=\ - ".\console.h"\ - - -"$(INTDIR)\console.obj" : $(SOURCE) $(DEP_CPP_CONSO) "$(INTDIR)" - - -# End Source File -################################################################################ -# Begin Source File - -SOURCE=.\textwind.c -DEP_CPP_TEXTW=\ - ".\console.h"\ - ".\textwind.h"\ - - -"$(INTDIR)\textwind.obj" : $(SOURCE) $(DEP_CPP_TEXTW) "$(INTDIR)" - - -# End Source File -################################################################################ -# Begin Source File - -SOURCE=.\ltest.rc - -!IF "$(CFG)" == "LTEST - Win32 Release" - - -"$(INTDIR)\ltest.res" : $(SOURCE) "$(INTDIR)" - $(RSC) $(RSC_PROJ) $(SOURCE) - - -!ELSEIF "$(CFG)" == "LTEST - Win32 Debug" - -DEP_RSC_LTEST=\ - ".\console.h"\ - ".\inpdlg.dlg"\ - - -"$(INTDIR)\ltest.res" : $(SOURCE) $(DEP_RSC_LTEST) "$(INTDIR)" - $(RSC) $(RSC_PROJ) $(SOURCE) - - -!ENDIF - -# End Source File -################################################################################ -# Begin Source File - -SOURCE="\src\ldap-3.3b1\libraries\macintos\getopt.c" -DEP_CPP_GETOP=\ - "..\..\..\..\include\lber.h"\ - "..\..\..\..\include\proto-lb.h"\ - "..\..\..\..\include\proto-lber.h"\ - - -"$(INTDIR)\getopt.obj" : $(SOURCE) $(DEP_CPP_GETOP) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -# End Source File -################################################################################ -# Begin Source File - -SOURCE="\src\ldap-3.3b1\libraries\libldap\test.c" -DEP_CPP_TEST_=\ - "..\..\..\..\include\lber.h"\ - "..\..\..\..\include\ldap.h"\ - "..\..\..\..\include\msdos.h"\ - "..\..\..\..\include\proto-lb.h"\ - "..\..\..\..\include\proto-lber.h"\ - "..\..\..\..\include\proto-ld.h"\ - "..\..\..\..\include\proto-ldap.h"\ - ".\console.h"\ - {$(INCLUDE)}"\sys\stat.h"\ - {$(INCLUDE)}"\sys\types.h"\ - -NODEP_CPP_TEST_=\ - "..\..\..\libldap\macos.h"\ - "..\..\..\libldap\msdos.h"\ - - -"$(INTDIR)\test.obj" : $(SOURCE) $(DEP_CPP_TEST_) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -# End Source File -################################################################################ -# Begin Source File - -SOURCE=.\ltest.def - -!IF "$(CFG)" == "LTEST - Win32 Release" - -!ELSEIF "$(CFG)" == "LTEST - Win32 Debug" - -!ENDIF - -# End Source File -################################################################################ -# Begin Source File - -SOURCE="\src\ldap-3.3b1\libraries\libldap\Debug\ldap32.lib" - -!IF "$(CFG)" == "LTEST - Win32 Release" - -!ELSEIF "$(CFG)" == "LTEST - Win32 Debug" - -!ENDIF - -# End Source File -################################################################################ -# Begin Source File - -SOURCE=\MSDEV\LIB\WSOCK32.LIB - -!IF "$(CFG)" == "LTEST - Win32 Release" - -!ELSEIF "$(CFG)" == "LTEST - Win32 Debug" - -!ENDIF - -# End Source File -# End Target -# End Project -################################################################################ diff --git a/libraries/msdos/winsock/ltest/ltest32.mdp b/libraries/msdos/winsock/ltest/ltest32.mdp deleted file mode 100644 index 5cd47fdf5f9982f76a1bcc2128cea3367fd8218a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 37376 zcmeHQZ)_aLb$>_l_)oMXTGSuMO1x(5t0L)+)Sspl)1>@!lthOVuRK{|&R0mw+a-C? z^7gR1Cy_-9tBswgiDEO3<0xs68ii5#Ljvf73%Gy)^Fs;0|*F^@Pj`XMFFWr zfe5Ir^!H|G_m0aGMWKL^nzPby-|f8l?VC4m-ptLu*?T5?qPLNnXq2dd)UoL_@OyP^ zY7MMx>e{Qye}$5Cl0Hv+h;^}5{8d`nJQ@fGynCCc&Z?$W4Kz^;b&O}zr-svqj;6-X z4E@WykNGx{q~-2&v>Gmv@@pT7VT0hl_H8!`}1)+M6p;a(JL*P_rH;& zyTeJEe3@uFrjtKJ*$;Q+FuNp*<6n&Ew=3{B`!1fRM{sR;&MaKe5)&1V;Y9xJIDIL^ zd+G%rFB`#&*TL(k;*ARFP?nE4jf8lf#5*0qYZiQ~<$Dy@63>MhzeTV`C@V z0ntC_XyDPju$Qy4o zc9e~_M^}iKF3!xDj#(<0E@Qe$+Ar?EGsOLw#QjK&PDLqrt9L*=}zLl&7Gu+-(vkGLwrl(=Og%AMLk#B{We@nOqw%} z>CS0cPxmS=t}x!8gm^b3-g6S~$H?b)+k$gc&%1Fg5h}!3W%V&?{y0uUA#N9Jg!PaC z?o^HcU~d(*hiZS9JyYDr)Z;W3;ytzh>N&=1{|2Fl(RQ}G%g1t}FUIN5L%yr>zPrCE z_=J5jAK!NXHIGs2y|)|CkAI#c)=ySPXM>Vl(atU%$F(mBzLwuDfsfNdHc1V@<3mGY zJhtnoe%KBJBrTg*oS(L>zz+HTozN=xTR!&wo!?jAguG3XzJl{Uq&N+V`WywFN8)-9 z;G99ZlSpHr8ShDOPJv#Ip*~0k=)`HWFjp!T%AhOdvh8?$H}>z1x37VRQ=ImO`nmx= zt{>IZkNFutTECsR9@cL(Q7Tv!!|w-4y8OmD;QmpF+x2bupl6fRC~@CmP#la~+x{y* z$rEcNYy$4LK#EZl?5R2)84_>j2Jkw8H<^%43fEi~4u(-*3*~zYc&yhh;IU5G_Xc*- zB<@eQZ=v74{`DN%nP{}+qT3Ta1G^*Fkql`X*>i(sw`~l=PnO!WKaPSHoKW+q8lD@R*yJD4QkJ zuk+iim$pzZ?*fE z*6?kK@bLm%oQ|&H>xl3*3ch1&_#TPy`SY%?tl`@g;o~;zq+#%N&`sD^pR}0)*o=k5 z#~qv(B)#XQ9K9gv0nkg5o&)_8NiTtZQ_?G--;(tC@5A><`sS;!e@SouK~DJ5pVqO@ z?GbsKA&;;tIqwYGXIq5NpC?x52La!s5k8);#o^h5d2GPfDfxnNgKaHNT_N8uP%pOA zMeySQ2DuKPSLaz>OFnKx z1lPCssyod4T;wn!Q+1MU^yqvX-3orEej)1Z9l&uahoEzY;R|T zzS`fJYfKWSJ!|C5dUjd!g+;q&L_4+L>jN(*9{-wOKp~h^?f4g!m%o=CPZTZF)ruv2 zr@$QZ>t@0Cf!v01F>gT6#`iMod+5_SwEv3?OZ2b)>HgztZ4(VA=}GwePSH;OJmd!O z_~^s=s-(}qlA~*qz7F~gNfY|}O{O8of8+c<(wBk9K4%5=n=dEDyzxIk!+yl~rMsZn zzE7D8VkUB7UUx2_n%Y>=jZ-3Q-!$&C{9LtO2UsW^++Us+?a=hw70g{SKb7-^+Ira) zR~xcz&F8!KHuyNPo|-nGC;omooUltX#o3CZd-zH$3>xD`)!%#o`53Qz19)OyS(z@Q z853wn0d}W759zA@<|uT@cn9m?)%~7;ukC4bMz2^NJBUP8Rvs#6=RA0zoei-D?zeAa zT<668>@&bWiEED|^=^Ak=yRXYQ~cgt=!lb;f7R+UMVa>@-{*aO{_Z{SaAJGjE#z{-*_ZX@lKvL94RwP{(G`KpQo(*X6;5$dG9Y^Ux(+WfvD5 z2iZs9Xhw?ii46HC;A?sS-%aGdhQverdUydJ-~K^-U=h!-H^RrfqDs7O!IcX7ZLmJ6 z*8hB8sn-8mGHU&g`-fWpQ|o`2jbI+H*8kM{U+w%{t^fJ`B3L(4>wlO)s`WpfV201T z)%u@YPgLuFYW+{G|E+nRsn-9nZl~7&KJoRxZCIh?HPRheXWofbLXOu^$7az$8`i#f z3676{`wRap{))9Ru^~icvsK{v+d!L)SxXKx7c;fu>LbC`A;;7&1UV>uc_%;J_ZG{h zHePgft2kSlH%lIu0(Mj$5|Qk6uc)GY@GH z@8IaAkmV(?bV-)t#Uf&&rWduG>DU1V!k+?$(UQ5K7d#CiG=Ff4&#w~sI?g%$Ux z74>`I+3NF5Tr`~-%f1v8e+5~ceikCU5P~VDW$Mf~IHlCL6f*J#NzXH5tC zsVDpoz_LAHiQXAYzRSBZ4ho{3Oru^qeGHbZzF5)HLor%@EIl@cVrUh#(O(LS(T?kY z3)Ne2=T~-*7YmN<+B10Yb>P6-c4iypCFuMx6cC340#C^OtfSzAV&0A`Nz;;{OV!rsDrp{2%&)ivRQDl2!blivLsbe=7bD z`>0g>pNjvZ>>ohA__&jm!RKkyD7V(a8x*NtPejwu$_X6i+4Nko{M-D&>BDis% z+t{Uoql4zKKj4YC-mcGLAHox)(Ua5-Zgp%94Ybo2UJq)j)_>v2u=uzmSW;E%ziRzgt^cb1 z-xz1r{%^JayCtLcf2;l9i1ZXQWPYB*NA12)75}OBf2;l9;(KoR{8#P&UbFvQ#eb^! z&${b7YW-L3|E^tM{Ur8(KZW<)B=8QVee?yq$>snZ6tf!jXLD$vO|1W69hr8HogT@a z){@%U(NjkbYm*~mBZJuyF_!N=D6zqA!nw2@aaZxV^Z0?+C1vs{4N)}Lh#giW@m7*a~Y-73*Fn}zS<%dvy zm!m!VdlwG(_4aB#Ze`kCbUkyvAF>$sC0FY~D>^2J=;~H~2@PI0ru#$n26e_o=xAOq z%oR&!|L9cT7ojn8roTIt_mzkbV6ZFR+OpCd}PA#WLaIe8>?WcpAZN^o=s zZ%E9~yN2!NSvz*&f)AKS%&v*uv5%P&B!2QN6$~;c@e` zCMI_t-)jGQ{HQJ0JugfS%nz-QP|rsyd_!W0OHmen$%KI~-c-Fti85p;L&}$v&{o5V&SIsZ)O6{mVzprcPm0E*wJY z33vFx;G)5629u9V_xK4MLMP!j%<;(U>YzNLpVeY zBe#s?X%E|E9j0b$+H_LuFtnE)+q09_^mv074G1g;h#;na-kD-M( zSh?$QbOiNTzuE!Y1L_rT?Mgp$_LFR|_F}1w`Ed&A{!Oo1wSJd)s8;pc*8l6jq7(0z zQ}2IV8;`~B2m3U<|51*G>ZCNFG@vw~G@vw~G@vw~G@vw~G@vw~G@vw~H1H|bKnlN0 z)QjKDI*eb1IZA&_U&MQ!`{)?;;}^~Tl)n5auDPljzs*QI-No;3RUfXX_zxBTq2fQp z<1zV=3=i;B{6{qgOvQhMQDQ3oL&bj}Y;e>02^Ie_sp3CY2Nl)}>QM0?_PTKyD*j_~ zLjgM~{v!;Es)=<90y`cM%oMO~D5^)re{8bf|5U3Wn_B~aMgufRL-_UYG>zbwOiyfX Lb!@WQx6%IsYXDqY diff --git a/libraries/msdos/winsock/ltest/textwind.c b/libraries/msdos/winsock/ltest/textwind.c deleted file mode 100644 index 80f522f73c..0000000000 --- a/libraries/msdos/winsock/ltest/textwind.c +++ /dev/null @@ -1,130 +0,0 @@ -/* - * textwind.c - */ -#include -#include -#include "console.h" -#include "textwind.h" - -static BOOL windclassreg = FALSE; -extern HWND hInst; - -/* - * local prototypes - */ -BOOL register_editclass( void ); - - -HWND -new_editwindow( HWND hParent, char *lpszTitle ) -{ - HWND hWnd, hEditWnd; - RECT r; - - /* - * register text edit window class if we have not already done so - */ - if ( !windclassreg && !register_editclass()) { - return( NULL ); - } - - /* - * create an instance of text edit window - */ - hWnd = CreateWindow( WINDCLASS_TEDIT, lpszTitle != NULL ? lpszTitle : "Untitled", - WS_OVERLAPPEDWINDOW, - CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, - hParent, NULL, hInst, NULL ); - - if ( !hWnd ) { - return( NULL ); - } - - /* - * create a child Edit controls that fills the text edit window - */ - GetClientRect( hWnd, (LPRECT)&r ); - hEditWnd = CreateWindow( "Edit", NULL, - WS_CHILD | WS_VISIBLE | WS_VSCROLL | WS_HSCROLL | ES_MULTILINE | ES_AUTOVSCROLL | ES_AUTOHSCROLL | ES_MULTILINE, - 0, 0, r.right - r.left, r.bottom - r.top, hWnd, IDC_EDIT, hInst, NULL ); - - if ( !hEditWnd ) { - DestroyWindow( hWnd ); - return( NULL ); - } - - /* - * add edit control to property list of window - */ - if( !SetProp( hWnd, "hEditWnd", hEditWnd )) { - DestroyWindow( hWnd ); - return( NULL ); - } - - if ( lpszTitle != NULL ) { - SetWindowText( hWnd, lpszTitle ); - } - - /* - * show and draw the new window - */ - ShowWindow( hWnd, SW_SHOWNORMAL ); - UpdateWindow( hWnd ); - return( hEditWnd ); -} - - -BOOL -register_editclass() -{ - WNDCLASS wc; - - memset( &wc, 0x00, sizeof(WNDCLASS) ); - - wc.style = CS_HREDRAW | CS_VREDRAW | CS_BYTEALIGNWINDOW; - wc.lpfnWndProc = TEditWndProc; - wc.hInstance = hInst; - wc.hbrBackground = (HBRUSH) (COLOR_WINDOW + 1 ); - wc.lpszClassName = WINDCLASS_TEDIT; - return( windclassreg = RegisterClass( &wc )); -} - - -void -memory_error( void ) -{ - MessageBox( GetFocus(), "Out of memory", "Sample", MB_ICONHAND | MB_OK ); -} - - -long FAR PASCAL TEditWndProc( HWND hWnd, unsigned message, WORD wParam, LONG lParam ) -{ - HWND hEditWnd; - - hEditWnd = GetProp( hWnd, "hEditWnd" ); - - switch( message ) { - case WM_COMMAND: - switch( wParam ) { - case IDC_EDIT: - if ( HIWORD( lParam ) == EN_ERRSPACE ) { - memory_error(); - } - break; - } - break; - - case WM_SETFOCUS: - SetFocus( hEditWnd ); - break; - - case WM_SIZE: - MoveWindow( hEditWnd, 0, 0, LOWORD(lParam), HIWORD(lParam), TRUE ); - break; - - default: - return( DefWindowProc( hWnd, message, wParam, lParam )); - } - - return( NULL ); -} diff --git a/libraries/msdos/winsock/ltest/textwind.h b/libraries/msdos/winsock/ltest/textwind.h deleted file mode 100644 index b61cb8a4a2..0000000000 --- a/libraries/msdos/winsock/ltest/textwind.h +++ /dev/null @@ -1,13 +0,0 @@ -/* - * textwind.h - */ - -#define WINDCLASS_TEDIT "TextClass" -#define IDC_EDIT 100 - -/* - * prototypes - */ -HWND new_editwindow( HWND hParent, char *lpszTtitle ); -void memory_error( void ); -long FAR PASCAL TEditWndProc( HWND hWnd, unsigned message, WORD wParam, LONG lParam ); diff --git a/libraries/msdos/winsock/makefile b/libraries/msdos/winsock/makefile deleted file mode 100644 index 9bdb965d16..0000000000 --- a/libraries/msdos/winsock/makefile +++ /dev/null @@ -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) -<< - diff --git a/libraries/msdos/winsock/openwsa.c b/libraries/msdos/winsock/openwsa.c deleted file mode 100644 index 01371219fd..0000000000 --- a/libraries/msdos/winsock/openwsa.c +++ /dev/null @@ -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 -#include -#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 ); -} diff --git a/libraries/msdos/winsock/setupwsa.bat b/libraries/msdos/winsock/setupwsa.bat deleted file mode 100644 index af86c644ac..0000000000 --- a/libraries/msdos/winsock/setupwsa.bat +++ /dev/null @@ -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 diff --git a/libraries/msdos/winsock/unsetupwsa.bat b/libraries/msdos/winsock/unsetupwsa.bat deleted file mode 100644 index ddef7253a1..0000000000 --- a/libraries/msdos/winsock/unsetupwsa.bat +++ /dev/null @@ -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 - diff --git a/libraries/msdos/winsock/winkit/readme.txt b/libraries/msdos/winsock/winkit/readme.txt deleted file mode 100644 index 5dffc1cf87..0000000000 --- a/libraries/msdos/winsock/winkit/readme.txt +++ /dev/null @@ -1,182 +0,0 @@ - -LDAP (Lightweight Directory Access Protocol) API for Windows/Winsock - -The lber and ldap client libraries have been ported to Microsoft Windows -in the form of Windows Dynamic Link libraries called LIBLDAP.DLL (16Bit) -and Ldap32.dll (32Bit). The LTest program is also provided in both -formats. - -A Windows Sockets API (version 1.1 conformant) TCP/IP WINSOCK.DLL or -WSOCK32.DLL is required for the DLL to run. - -Our intent is that this "kit" include everything you'll need to make use -of the ldap client API from your 16Bit or 32Bit application. If you -find something missing or have a suggestion for improvement, send email -to the "bug reporting" address at the bottom of this file. - -To use this "kit" - - 1) Get to a DOS prompt - - 2) Create the directory you want this to live in (e.g. \ldap) - and cd into it. We will refer to that directory simply as - "\ldap" from now on, but it could be anywhere and have any name - you desire. - - 3) Use "pkunzip -d" to extract the files. The "-d" is NECESSARY to - preserve the subdirectories and avoid file name collisions. - - 4) We have included only the files you need to use and test - libldap.dll and ldap32.dll. If you want the entire distribution, - with source, you can get it from: - - ftp://terminator.rs.itd.umich.edu/ldap/ldap-3.3.tar.Z - -The following files are included in this distribution: - - 16Bit binaries and libs - BINARIES/DEBUG/LIBLDAP.DLL - BINARIES/DEBUG/LIBLDAP.LIB - BINARIES/RELEASE/LIBLDAP.DLL - BINARIES/RELEASE/LIBLDAP.LIB - - BINARIES/DEBUG/LTEST.EXE - - 32Bit binaries and libs - BINARIES/DEBUG/LDAP32.DLL - BINARIES/DEBUG/LDAP32.LIB - BINARIES/RELEASE/LDAP32.DLL - BINARIES/RELEASE/LDAP32.LIB - - BINARIES/DEBUG/LTEST32.EXE - - Include files - INCKIT/MSDOS.H - INCKIT/LBER.H - INCKIT/LDAP.H - INCKIT/PROTO-LD.H - INCKIT/PROTO-LB.H - INCKIT/SRCHPREF.H - INCKIT/DISPTMPL.H - - Sample Configuration files - SRCHPREF.CFG - DISPTMPL.CFG - LDFRIEND.CFG - LDFILTER.CFG - - Man pages in the form of Windows HLP files - LIBLDAP.HLP - old format hlp file - LDAP32.HLP - new format hlp file, both have same content - -16Bit versions - - Libldap.dll was compiled with KERBEROS, AUTHMAN, WSHELPER, WIN32, - _WINDOWS,& LDAP_REFERRALS defined. Even if you do not need kerberos - authentication, (see below for more information on kerberos) this - dll should work correctly for you. - - LDAP_REFERRALS makes libldap.dll capable of handling referrals - returned by a slapd server. - -32Bit versions - - The 32Bit version is NOT SAFE for MULTIPLE THREADS at this time. - Not more than one thread per application may make use of the - ldap routines. - - Ldap32.dll was compiled with LDAP_REFERRALS defined and is capable - of handling referrals returned by a slapd server. - - -WRITING APPLICATIONS THAT USE LIBLDAP.DLL or LDAP32.DLL - - All of the normal LDAP and LBER calls documented in the help file - 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 man pages are included in this kit in the form of windows HLP files. - The official source man pages are available via the web at: - - http://www.umich.edu/ldap/doc/man/ - - 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 or - the appropriate ldap ...free routine. 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. Microsoft's VC++ 4.0 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 ldap 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. - - -LTest and LTtest32 - - The LTest.exe and LTest32.exe programs are test interfaces to libldap - and ldap32 respectively. By default they connect to the host - "truelies". This host name is contained in a string resource in the - exe file. You may easily "customize" this to be the name of whatever - server you're using with AppStudio or any Windows resource editor. - -Kerberos Information - - Libldap.dll was compiled with KERBEROS, AUTHMAN, WSHELPER, & - LDAP_REFERRALS defined. If you do not need kerberos authentication, - this dll should still work correctly for you. Libldap.dll - dynamically loads and uses the dlls needed for kerberos - authentication (Authlib.dll, Krbv4win.dll, & WSHelper.dll). If - Libldap.dll is unable to load the needed dlls, execution continues - without error, but without kerberos authentication capability. - - AUTHMAN allows libldap.dll to make use of Authlib.dll (which - requires KrbV4Win.dll & WSHelper.dll) if they are ALL in the "PATH". - If these are not available, kerberos authentication can not succede, - but libldap.dll will execute without error. - - WSHELPER means that if WSHelper.dll is in the "PATH", it will be - dynamically loaded and used to do the gethostbyaddr() call required - for kerberos authentication to work. (This is used because so many - vendor implementations of gethostbyaddr return WRONG results. We - are working with all vendors we can get to listen to get these - implementations fixed.) If WSHelper.dll is not in the "PATH" - libldap.dll does not fail to execute correctly. - - Ldap32.dll does NOT have the ability to do kerberos authentication - because none of Authlib.dll, krbv4win.dll or wshelper.dll have been - ported to 32Bits at this time. - - For further information on using kerberos with the ldap DLLs send - email to ldap-support@umich.edu. - -BUG REPORTING - - Bug reports should be sent to bug-ldap@umich.edu. - - -Miscellaneous - - Build testing was done on Windows NT workstation 3.51 (build 1057 - service pack 2) on an NTFS file system (which supports long - filenames) using Microsoft Visual C++ 1.52c (16 bit) and Visual C++ - 4.0 (32 bit). - -README Last updated 11 January 1996 by Steve Rothwell diff --git a/libraries/msdos/winsock/winkit/windowskit.cmd b/libraries/msdos/winsock/winkit/windowskit.cmd deleted file mode 100644 index bcaa22776a..0000000000 --- a/libraries/msdos/winsock/winkit/windowskit.cmd +++ /dev/null @@ -1 +0,0 @@ -nmake /f WindowsKit.Mak all diff --git a/libraries/msdos/winsock/winkit/windowskit.mak b/libraries/msdos/winsock/winkit/windowskit.mak deleted file mode 100644 index 7ba81542e9..0000000000 --- a/libraries/msdos/winsock/winkit/windowskit.mak +++ /dev/null @@ -1,172 +0,0 @@ -# -# makefile.nmake stub makefile for nmake -# 15 Dec 1995 : sgr -# -# :[:] [... ] -# -# [] -# -# $@ Current target's full name (path, base, extension) -# $$@ Current target's full name (path, base, extension) -# (Valid only as a dependent in a dependency.) -# $* Current target's path & base name minus extension -# $** All dependents of the current target. -# $? All dependents with a later timestamp than the current target. -# $< Dependent file with a later timestamp that the current target. -# (Valid only in commands in inference rules.) -# -# Modifiers $(@F) -# B Base name -# F Base name + extension (Full name) -# D Drive + directory -# R Drive + directory + base name (Reusable name) - -ROOT = ..\..\..\.. -HELP = $(ROOT)\windows\help -LDAP = $(ROOT)\librar~1\libldap -LTEST = $(ROOT)\librar~1\msdos\winsock\ltest -WINSOCK = $(ROOT)\librar~1\msdos\winsock -MAININC = $(ROOT)\include -LINCL = incKit -BIN = binaries -BINARIES = \ - $(BIN)\debug\libldap.dll \ - $(BIN)\debug\libldap.lib \ - $(BIN)\release\libldap.dll \ - $(BIN)\release\libldap.lib \ - $(BIN)\debug\ltest.exe \ - $(BIN)\debug\ldap32.dll \ - $(BIN)\debug\ldap32.lib \ - $(BIN)\release\ldap32.dll \ - $(BIN)\release\ldap32.lib \ - $(BIN)\debug\ltest32.exe \ - libldap.hlp \ - ldap32.hlp - -all: WinLdap.zip - -WinLdap.zip : \ - $(BINARIES) \ -# Using Wax500 as a test case, only the -# following include files are needed to make -# a non-kerberized ldap32.dll -# or a kerberized libldap.dll - $(LINCL)\disptmpl.h \ - $(LINCL)\lber.h \ - $(LINCL)\ldap.h \ - $(LINCL)\msdos.h \ - $(LINCL)\proto-ld.h \ - $(LINCL)\proto-lb.h \ - $(LINCL)\srchpref.h \ - srchpref.cfg \ - disptmpl.cfg \ - ldfriend.cfg \ - ldfilter.cfg \ - readme.txt - -!pkzip -P -u $@ $? - del *.cfg - -$(BIN)\debug\libldap.dll : $(LDAP)\debug\libldap.dll - -@md $(@D) - -copy $? $@ - -$(BIN)\debug\libldap.lib : $(LDAP)\debug\libldap.lib - -@md $(@D) - -copy $? $@ - -$(BIN)\debug\ltest.exe : $(LTEST)\ltest.exe - -@md $(@D) - -copy $? $@ - -$(BIN)\debug\ldap32.dll : $(LDAP)\debug\ldap32.dll - -@md $(@D) - -copy $? $@ - -$(BIN)\debug\ldap32.lib : $(LDAP)\debug\ldap32.lib - -@md $(@D) - -copy $? $@ - -$(BIN)\debug\ltest32.exe : $(LTEST)\debug\ltest32.exe - -@md $(@D) - -copy $? $@ - -$(BIN)\release\libldap.dll : $(LDAP)\release\libldap.dll - -@md $(@D) - -copy $? $@ - -$(BIN)\release\libldap.lib : $(LDAP)\release\libldap.lib - -@md $(@D) - -copy $? $@ - -$(BIN)\release\ldap32.dll : $(LDAP)\release\ldap32.dll - -@md $(@D) - -copy $? $@ - -$(BIN)\release\ldap32.lib : $(LDAP)\release\ldap32.lib - -@md $(@D) - -copy $? $@ - -$(LINCL)\disptmpl.h : $(MAININC)\disptmpl.h - -@md $(@D) - -copy $? $@ - -$(LINCL)\lber.h : $(MAININC)\lber.h - -@md $(@D) - -copy $? $@ - -$(LINCL)\ldap.h : $(MAININC)\ldap.h - -@md $(@D) - -copy $? $@ - -$(LINCL)\msdos.h : $(MAININC)\msdos.h - -@md $(@D) - -copy $? $@ - -$(LINCL)\proto-ld.h : $(MAININC)\proto-ld.h - -@md $(@D) - -copy $? $@ - -$(LINCL)\proto-lb.h : $(MAININC)\proto-lb.h - -@md $(@D) - -copy $? $@ - -$(LINCL)\srchpref.h : $(MAININC)\srchpref.h - -@md $(@D) - -copy $? $@ - -libldap.hlp : $(HELP)\build\libldap.hlp - -copy $? $@ - -ldap32.hlp : $(HELP)\ldap32.hlp - -copy $? $@ - -srchpref.cfg : $(LDAP)\ldapsearchprefs.conf - -copy $** $@ - -ldfilter.cfg : $(LDAP)\ldapfilter.conf - -copy $** $@ - -disptmpl.cfg : $(LDAP)\ldaptemplates.conf - -copy $** $@ - -ldfriend.cfg : $(LDAP)\ldapfriendly - -copy $** $@ - - -$(LDAP)\debug\libldap.dll : -$(LDAP)\debug\libldap.lib : -$(LDAP)\release\libldap.dll : -$(LDAP)\release\libldap.lib : -$(LTEST)\ltest.exe : -$(LDAP)\debug\ldap32.dll : -$(LDAP)\debug\ldap32.lib : -$(LDAP)\release\ldap32.dll : -$(LDAP)\release\ldap32.lib : -$(LTEST)\debug\ltest32.exe : -$(HELP)\build\libldap.hlp : -$(HELP)\ldap32.hlp : -$(LDAP)\ldapsearchprefs.conf : -$(LDAP)\ldapfilter.conf : -$(LDAP)\ldaptemplates.conf : -$(LDAP)\ldapfriendly : -readme.txt : diff --git a/libraries/msdos/winsock/wsa.c b/libraries/msdos/winsock/wsa.c deleted file mode 100644 index 5ae59f9dc6..0000000000 --- a/libraries/msdos/winsock/wsa.c +++ /dev/null @@ -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 ); -} diff --git a/libraries/msdos/winsock/wsa/errno.c b/libraries/msdos/winsock/wsa/errno.c deleted file mode 100644 index cb49c5fe62..0000000000 --- a/libraries/msdos/winsock/wsa/errno.c +++ /dev/null @@ -1,21 +0,0 @@ -#include - -/* Copies string corresponding to the error code provided */ -/* into buf, maximum length len. Returns length actually */ -/* copied to buffer, or zero if error code is unknown. */ -/* String resources should be present for each error code */ -/* using the value of the code as the string ID (except for */ -/* error = 0, which is mapped to WSABASEERR to keep it with */ -/* the others). The DLL is free to use any string IDs that */ -/* are less than WSABASEERR for its own use. The LibMain */ -/* procedure of the DLL is presumed to have saved its */ -/* HINSTANCE in the global variable hInst. */ - -int PASCAL FAR WSAsperror (int errorcode, char far * buf, int len) -{ - if (errorcode == 0) - errorcode = WSABASEERR; - if (errorcode < WSABASEERR) - return 0; - return LoadString(hInst,errorcode,buf,len); -} diff --git a/libraries/msdos/winsock/wsa/errno.rc b/libraries/msdos/winsock/wsa/errno.rc deleted file mode 100644 index 1252957877..0000000000 --- a/libraries/msdos/winsock/wsa/errno.rc +++ /dev/null @@ -1,57 +0,0 @@ -#include - -STRINGTABLE -BEGIN - WSABASEERR, "[0] No Error" - WSAEINTR, "[10004] Interrupted system call" - WSAEBADF, "[10009] Bad file number" - WSAEACCES, "[10013] Permission denied" - WSAEFAULT, "[10014] Bad address" - WSAEINVAL, "[10022] Invalid argument" - WSAEMFILE, "[10024] Too many open files" - WSAEWOULDBLOCK, "[10035] Operation would block" - WSAEINPROGRESS, "[10036] Operation now in progress" - WSAEALREADY, "[10037] Operation already in progress" - WSAENOTSOCK, "[10038] Socket operation on non-socket" - WSAEDESTADDRREQ, "[10039] Destination address required" - WSAEMSGSIZE, "[10040] Message too long" - WSAEPROTOTYPE, "[10041] Protocol wrong type for socket" - WSAENOPROTOOPT, "[10042] Bad protocol option" - WSAEPROTONOSUPPORT, "[10043] Protocol not supported" - WSAESOCKTNOSUPPORT, "[10044] Socket type not supported" - WSAEOPNOTSUPP, "[10045] Operation not supported on socket" - WSAEPFNOSUPPORT, "[10046] Protocol family not supported" - WSAEAFNOSUPPORT, "[10047] Address family not supported by protocol family" - WSAEADDRINUSE, "[10048] Address already in use" - WSAEADDRNOTAVAIL, "[10049] Can't assign requested address" - WSAENETDOWN, "[10050] Network is down" - WSAENETUNREACH, "[10051] Network is unreachable" - WSAENETRESET, "[10052] Net dropped connection or reset" - WSAECONNABORTED, "[10053] Software caused connection abort" - WSAECONNRESET, "[10054] Connection reset by peer" - WSAENOBUFS, "[10055] No buffer space available" - WSAEISCONN, "[10056] Socket is already connected" - WSAENOTCONN, "[10057] Socket is not connected" - WSAESHUTDOWN, "[10058] Can't send after socket shutdown" - WSAETOOMANYREFS, "[10059] Too many references, can't splice" - WSAETIMEDOUT, "[10060] Connection timed out" - WSAECONNREFUSED, "[10061] Connection refused" - WSAELOOP, "[10062] Too many levels of symbolic links" - WSAENAMETOOLONG, "[10063] File name too long" - WSAEHOSTDOWN, "[10064] Host is down" - WSAEHOSTUNREACH, "[10065] No Route to Host" - WSAENOTEMPTY, "[10066] Directory not empty" - WSAEPROCLIM, "[10067] Too many processes" - WSAEUSERS, "[10068] Too many users" - WSAEDQUOT, "[10069] Disc Quota Exceeded" - WSAESTALE, "[10070] Stale NFS file handle" - WSAEREMOTE, "[10071] Too many levels of remote in path" - WSASYSNOTREADY, "[10091] Network SubSystem is unavailable" - WSAVERNOTSUPPORTED, "[10092] WINSOCK DLL Version out of range" - WSANOTINITIALIZED, "[10093] Successful WSASTARTUP not yet performed" - WSAHOST_NOT_FOUND, "[11001] Host not found" - WSATRY_AGAIN, "[11002] Non-Authoritative Host not found" - WSANO_RECOVERY, "[11003] Non-Recoverable errors: FORMERR, REFUSED, NOTIMP" - WSANO_DATA, "[11004] Valid name, no data record of requested -type" -END diff --git a/libraries/msdos/winsock/wsa/winsock.def b/libraries/msdos/winsock/wsa/winsock.def deleted file mode 100644 index 0aa0953284..0000000000 --- a/libraries/msdos/winsock/wsa/winsock.def +++ /dev/null @@ -1,84 +0,0 @@ -; -; File: winsock.def -; System: MS-Windows 3.x -; Summary: Module definition file for Windows Sockets DLL. -; - -LIBRARY WINSOCK ; Application's module name - -DESCRIPTION 'BSD Socket API for Windows' - -EXETYPE WINDOWS ; required for all windows applications - -STUB 'WINSTUB.EXE' ; generates error message if application - ; is run without Windows - -;CODE can be FIXED in memory because of potential upcalls -CODE PRELOAD FIXED - -;DATA must be SINGLE and at a FIXED location since this is a DLL -DATA PRELOAD FIXED SINGLE - -HEAPSIZE 1024 -STACKSIZE 16384 - -; All functions that will be called by any Windows routine -; must be exported. Any additional exports beyond those defined -; here must have ordinal numbers 1000 or above. - -EXPORTS - accept @1 - bind @2 - closesocket @3 - connect @4 - getpeername @5 - getsockname @6 - getsockopt @7 - htonl @8 - htons @9 - inet_addr @10 - inet_ntoa @11 - ioctlsocket @12 - listen @13 - ntohl @14 - ntohs @15 - recv @16 - recvfrom @17 - select @18 - send @19 - sendto @20 - setsockopt @21 - shutdown @22 - socket @23 - - gethostbyaddr @51 - gethostbyname @52 - getprotobyname @53 - getprotobynumber @54 - getservbyname @55 - getservbyport @56 - gethostname @57 - - WSAAsyncSelect @101 - WSAAsyncGetHostByAddr @102 - WSAAsyncGetHostByName @103 - WSAAsyncGetProtoByNumber @104 - WSAAsyncGetProtoByName @105 - WSAAsyncGetServByPort @106 - WSAAsyncGetServByName @107 - WSACancelAsyncRequest @108 - WSASetBlockingHook @109 - WSAUnhookBlockingHook @110 - WSAGetLastError @111 - WSASetLastError @112 - WSACancelBlockingCall @113 - WSAIsBlocking @114 - WSAStartup @115 - WSACleanup @116 - - __WSAFDIsSet @151 - - WEP @500 RESIDENTNAME - -;eof - diff --git a/libraries/msdos/winsock/wsa/winsock.h b/libraries/msdos/winsock/wsa/winsock.h deleted file mode 100644 index 13eb70a501..0000000000 --- a/libraries/msdos/winsock/wsa/winsock.h +++ /dev/null @@ -1,826 +0,0 @@ -/* WINSOCK.H--definitions to be used with the WINSOCK.DLL - * - * This header file corresponds to version 1.1 of the Windows Sockets specification. - * - * This file includes parts which are Copyright (c) 1982-1986 Regents - * of the University of California. All rights reserved. The - * Berkeley Software License Agreement specifies the terms and - * conditions for redistribution. - */ - -#ifndef _WINSOCKAPI_ -#define _WINSOCKAPI_ - -/* - * Pull in WINDOWS.H if necessary - */ -#ifndef _INC_WINDOWS -#include -#endif /* _INC_WINDOWS */ - -/* - * Basic system type definitions, taken from the BSD file sys/types.h. - */ -typedef unsigned char u_char; -typedef unsigned short u_short; -typedef unsigned int u_int; -typedef unsigned long u_long; - -/* - * The new type to be used in all - * instances which refer to sockets. - */ -typedef u_int SOCKET; - -/* - * Select uses arrays of SOCKETs. These macros manipulate such - * arrays. FD_SETSIZE may be defined by the user before including - * this file, but the default here should be >= 64. - * - * CAVEAT IMPLEMENTOR and USER: THESE MACROS AND TYPES MUST BE - * INCLUDED IN WINSOCK.H EXACTLY AS SHOWN HERE. - */ -#ifndef FD_SETSIZE -#define FD_SETSIZE 64 -#endif /* FD_SETSIZE */ - -typedef struct fd_set { - u_short fd_count; /* how many are SET? */ - SOCKET fd_array[FD_SETSIZE]; /* an array of SOCKETs */ -} fd_set; - -extern int PASCAL FAR __WSAFDIsSet(SOCKET, fd_set FAR *); - -#define FD_CLR(fd, set) do { \ - u_int __i; \ - for (__i = 0; __i < ((fd_set FAR *)(set))->fd_count ; __i++) { \ - if (((fd_set FAR *)(set))->fd_array[__i] == fd) { \ - while (__i < ((fd_set FAR *)(set))->fd_count-1) { \ - ((fd_set FAR *)(set))->fd_array[__i] = \ - ((fd_set FAR *)(set))->fd_array[__i+1]; \ - __i++; \ - } \ - ((fd_set FAR *)(set))->fd_count--; \ - break; \ - } \ - } \ -} while(0) - -#define FD_SET(fd, set) do { \ - if (((fd_set FAR *)(set))->fd_count < FD_SETSIZE) \ - ((fd_set FAR *)(set))->fd_array[((fd_set FAR *)(set))->fd_count++]=fd;\ -} while(0) - -#define FD_ZERO(set) (((fd_set FAR *)(set))->fd_count=0) - -#define FD_ISSET(fd, set) __WSAFDIsSet((SOCKET)fd, (fd_set FAR *)set) - -/* - * Structure used in select() call, taken from the BSD file sys/time.h. - */ -struct timeval { - long tv_sec; /* seconds */ - long tv_usec; /* and microseconds */ -}; - -/* - * Operations on timevals. - * - * NB: timercmp does not work for >= or <=. - */ -#define timerisset(tvp) ((tvp)->tv_sec || (tvp)->tv_usec) -#define timercmp(tvp, uvp, cmp) \ - ((tvp)->tv_sec cmp (uvp)->tv_sec || \ - (tvp)->tv_sec == (uvp)->tv_sec && (tvp)->tv_usec cmp (uvp)->tv_usec) -#define timerclear(tvp) (tvp)->tv_sec = (tvp)->tv_usec = 0 - -/* - * Commands for ioctlsocket(), taken from the BSD file fcntl.h. - * - * - * Ioctl's have the command encoded in the lower word, - * and the size of any in or out parameters in the upper - * word. The high 2 bits of the upper word are used - * to encode the in/out status of the parameter; for now - * we restrict parameters to at most 128 bytes. - */ -#define IOCPARM_MASK 0x7f /* parameters must be < 128 bytes */ -#define IOC_VOID 0x20000000 /* no parameters */ -#define IOC_OUT 0x40000000 /* copy out parameters */ -#define IOC_IN 0x80000000 /* copy in parameters */ -#define IOC_INOUT (IOC_IN|IOC_OUT) - /* 0x20000000 distinguishes new & - old ioctl's */ -#define _IO(x,y) (IOC_VOID|(x<<8)|y) - -#define _IOR(x,y,t) (IOC_OUT|(((long)sizeof(t)&IOCPARM_MASK)<<16)|(x<<8)|y) - -#define _IOW(x,y,t) (IOC_IN|(((long)sizeof(t)&IOCPARM_MASK)<<16)|(x<<8)|y) - -#define FIONREAD _IOR('f', 127, u_long) /* get # bytes to read */ -#define FIONBIO _IOW('f', 126, u_long) /* set/clear non-blocking i/o */ -#define FIOASYNC _IOW('f', 125, u_long) /* set/clear async i/o */ - -/* Socket I/O Controls */ -#define SIOCSHIWAT _IOW('s', 0, u_long) /* set high watermark */ -#define SIOCGHIWAT _IOR('s', 1, u_long) /* get high watermark */ -#define SIOCSLOWAT _IOW('s', 2, u_long) /* set low watermark */ -#define SIOCGLOWAT _IOR('s', 3, u_long) /* get low watermark */ -#define SIOCATMARK _IOR('s', 7, u_long) /* at oob mark? */ - -/* - * Structures returned by network data base library, taken from the - * BSD file netdb.h. All addresses are supplied in host order, and - * returned in network order (suitable for use in system calls). - */ - -struct hostent { - char FAR * h_name; /* official name of host */ - char FAR * FAR * h_aliases; /* alias list */ - short h_addrtype; /* host address type */ - short h_length; /* length of address */ - char FAR * FAR * h_addr_list; /* list of addresses */ -#define h_addr h_addr_list[0] /* address, for backward compat */ -}; - -/* - * It is assumed here that a network number - * fits in 32 bits. - */ -struct netent { - char FAR * n_name; /* official name of net */ - char FAR * FAR * n_aliases; /* alias list */ - short n_addrtype; /* net address type */ - u_long n_net; /* network # */ -}; - -struct servent { - char FAR * s_name; /* official service name */ - char FAR * FAR * s_aliases; /* alias list */ - short s_port; /* port # */ - char FAR * s_proto; /* protocol to use */ -}; - -struct protoent { - char FAR * p_name; /* official protocol name */ - char FAR * FAR * p_aliases; /* alias list */ - short p_proto; /* protocol # */ -}; - -/* - * Constants and structures defined by the internet system, - * Per RFC 790, September 1981, taken from the BSD file netinet/in.h. - */ - -/* - * Protocols - */ -#define IPPROTO_IP 0 /* dummy for IP */ -#define IPPROTO_ICMP 1 /* control message protocol */ -#define IPPROTO_GGP 2 /* gateway^2 (deprecated) */ -#define IPPROTO_TCP 6 /* tcp */ -#define IPPROTO_PUP 12 /* pup */ -#define IPPROTO_UDP 17 /* user datagram protocol */ -#define IPPROTO_IDP 22 /* xns idp */ -#define IPPROTO_ND 77 /* UNOFFICIAL net disk proto */ - -#define IPPROTO_RAW 255 /* raw IP packet */ -#define IPPROTO_MAX 256 - -/* - * Port/socket numbers: network standard functions - */ -#define IPPORT_ECHO 7 -#define IPPORT_DISCARD 9 -#define IPPORT_SYSTAT 11 -#define IPPORT_DAYTIME 13 -#define IPPORT_NETSTAT 15 -#define IPPORT_FTP 21 -#define IPPORT_TELNET 23 -#define IPPORT_SMTP 25 -#define IPPORT_TIMESERVER 37 -#define IPPORT_NAMESERVER 42 -#define IPPORT_WHOIS 43 -#define IPPORT_MTP 57 - -/* - * Port/socket numbers: host specific functions - */ -#define IPPORT_TFTP 69 -#define IPPORT_RJE 77 -#define IPPORT_FINGER 79 -#define IPPORT_TTYLINK 87 -#define IPPORT_SUPDUP 95 - -/* - * UNIX TCP sockets - */ -#define IPPORT_EXECSERVER 512 -#define IPPORT_LOGINSERVER 513 -#define IPPORT_CMDSERVER 514 -#define IPPORT_EFSSERVER 520 - -/* - * UNIX UDP sockets - */ -#define IPPORT_BIFFUDP 512 -#define IPPORT_WHOSERVER 513 -#define IPPORT_ROUTESERVER 520 - /* 520+1 also used */ - -/* - * Ports < IPPORT_RESERVED are reserved for - * privileged processes (e.g. root). - */ -#define IPPORT_RESERVED 1024 - -/* - * Link numbers - */ -#define IMPLINK_IP 155 -#define IMPLINK_LOWEXPER 156 -#define IMPLINK_HIGHEXPER 158 - -/* - * Internet address (old style... should be updated) - */ -struct in_addr { - union { - struct { u_char s_b1,s_b2,s_b3,s_b4; } S_un_b; - struct { u_short s_w1,s_w2; } S_un_w; - u_long S_addr; - } S_un; -#define s_addr S_un.S_addr - /* can be used for most tcp & ip code */ -#define s_host S_un.S_un_b.s_b2 - /* host on imp */ -#define s_net S_un.S_un_b.s_b1 - /* network */ -#define s_imp S_un.S_un_w.s_w2 - /* imp */ -#define s_impno S_un.S_un_b.s_b4 - /* imp # */ -#define s_lh S_un.S_un_b.s_b3 - /* logical host */ -}; - -/* - * Definitions of bits in internet address integers. - * On subnets, the decomposition of addresses to host and net parts - * is done according to subnet mask, not the masks here. - */ -#define IN_CLASSA(i) (((long)(i) & 0x80000000) == 0) -#define IN_CLASSA_NET 0xff000000 -#define IN_CLASSA_NSHIFT 24 -#define IN_CLASSA_HOST 0x00ffffff -#define IN_CLASSA_MAX 128 - -#define IN_CLASSB(i) (((long)(i) & 0xc0000000) == 0x80000000) -#define IN_CLASSB_NET 0xffff0000 -#define IN_CLASSB_NSHIFT 16 -#define IN_CLASSB_HOST 0x0000ffff -#define IN_CLASSB_MAX 65536 - -#define IN_CLASSC(i) (((long)(i) & 0xc0000000) == 0xc0000000) -#define IN_CLASSC_NET 0xffffff00 -#define IN_CLASSC_NSHIFT 8 -#define IN_CLASSC_HOST 0x000000ff - -#define INADDR_ANY (u_long)0x00000000 -#define INADDR_LOOPBACK 0x7f000001 -#define INADDR_BROADCAST (u_long)0xffffffff -#define INADDR_NONE 0xffffffff - -/* - * Socket address, internet style. - */ -struct sockaddr_in { - short sin_family; - u_short sin_port; - struct in_addr sin_addr; - char sin_zero[8]; -}; - -#define WSADESCRIPTION_LEN 256 -#define WSASYS_STATUS_LEN 128 - -typedef struct WSAData { - WORD wVersion; - WORD wHighVersion; - char szDescription[WSADESCRIPTION_LEN+1]; - char szSystemStatus[WSASYS_STATUS_LEN+1]; - unsigned short iMaxSockets; - unsigned short iMaxUdpDg; - char FAR * lpVendorInfo; -} WSADATA; - -typedef WSADATA FAR *LPWSADATA; - -/* - * Options for use with [gs]etsockopt at the IP level. - */ -#define IP_OPTIONS 1 /* set/get IP per-packet options */ - -/* - * Definitions related to sockets: types, address families, options, - * taken from the BSD file sys/socket.h. - */ - -/* - * This is used instead of -1, since the - * SOCKET type is unsigned. - */ -#define INVALID_SOCKET (SOCKET)(~0) -#define SOCKET_ERROR (-1) - -/* - * Types - */ -#define SOCK_STREAM 1 /* stream socket */ -#define SOCK_DGRAM 2 /* datagram socket */ -#define SOCK_RAW 3 /* raw-protocol interface */ -#define SOCK_RDM 4 /* reliably-delivered message */ -#define SOCK_SEQPACKET 5 /* sequenced packet stream */ - -/* - * Option flags per-socket. - */ -#define SO_DEBUG 0x0001 /* turn on debugging info recording */ -#define SO_ACCEPTCONN 0x0002 /* socket has had listen() */ -#define SO_REUSEADDR 0x0004 /* allow local address reuse */ -#define SO_KEEPALIVE 0x0008 /* keep connections alive */ -#define SO_DONTROUTE 0x0010 /* just use interface addresses */ -#define SO_BROADCAST 0x0020 /* permit sending of broadcast msgs */ -#define SO_USELOOPBACK 0x0040 /* bypass hardware when possible */ -#define SO_LINGER 0x0080 /* linger on close if data present */ -#define SO_OOBINLINE 0x0100 /* leave received OOB data in line */ - -#define SO_DONTLINGER (u_int)(~SO_LINGER) - -/* - * Additional options. - */ -#define SO_SNDBUF 0x1001 /* send buffer size */ -#define SO_RCVBUF 0x1002 /* receive buffer size */ -#define SO_SNDLOWAT 0x1003 /* send low-water mark */ -#define SO_RCVLOWAT 0x1004 /* receive low-water mark */ -#define SO_SNDTIMEO 0x1005 /* send timeout */ -#define SO_RCVTIMEO 0x1006 /* receive timeout */ -#define SO_ERROR 0x1007 /* get error status and clear */ -#define SO_TYPE 0x1008 /* get socket type */ - -/* - * TCP options. - */ -#define TCP_NODELAY 0x0001 - -/* - * Address families. - */ -#define AF_UNSPEC 0 /* unspecified */ -#define AF_UNIX 1 /* local to host (pipes, portals) */ -#define AF_INET 2 /* internetwork: UDP, TCP, etc. */ -#define AF_IMPLINK 3 /* arpanet imp addresses */ -#define AF_PUP 4 /* pup protocols: e.g. BSP */ -#define AF_CHAOS 5 /* mit CHAOS protocols */ -#define AF_NS 6 /* XEROX NS protocols */ -#define AF_ISO 7 /* ISO protocols */ -#define AF_OSI AF_ISO /* OSI is ISO */ -#define AF_ECMA 8 /* european computer manufacturers */ -#define AF_DATAKIT 9 /* datakit protocols */ -#define AF_CCITT 10 /* CCITT protocols, X.25 etc */ -#define AF_SNA 11 /* IBM SNA */ -#define AF_DECnet 12 /* DECnet */ -#define AF_DLI 13 /* Direct data link interface */ -#define AF_LAT 14 /* LAT */ -#define AF_HYLINK 15 /* NSC Hyperchannel */ -#define AF_APPLETALK 16 /* AppleTalk */ -#define AF_NETBIOS 17 /* NetBios-style addresses */ - -#define AF_MAX 18 - -/* - * Structure used by kernel to store most - * addresses. - */ -struct sockaddr { - u_short sa_family; /* address family */ - char sa_data[14]; /* up to 14 bytes of direct address */ -}; - -/* - * Structure used by kernel to pass protocol - * information in raw sockets. - */ -struct sockproto { - u_short sp_family; /* address family */ - u_short sp_protocol; /* protocol */ -}; - -/* - * Protocol families, same as address families for now. - */ -#define PF_UNSPEC AF_UNSPEC -#define PF_UNIX AF_UNIX -#define PF_INET AF_INET -#define PF_IMPLINK AF_IMPLINK -#define PF_PUP AF_PUP -#define PF_CHAOS AF_CHAOS -#define PF_NS AF_NS -#define PF_ISO AF_ISO -#define PF_OSI AF_OSI -#define PF_ECMA AF_ECMA -#define PF_DATAKIT AF_DATAKIT -#define PF_CCITT AF_CCITT -#define PF_SNA AF_SNA -#define PF_DECnet AF_DECnet -#define PF_DLI AF_DLI -#define PF_LAT AF_LAT -#define PF_HYLINK AF_HYLINK -#define PF_APPLETALK AF_APPLETALK - -#define PF_MAX AF_MAX - -/* - * Structure used for manipulating linger option. - */ -struct linger { - u_short l_onoff; /* option on/off */ - u_short l_linger; /* linger time */ -}; - -/* - * Level number for (get/set)sockopt() to apply to socket itself. - */ -#define SOL_SOCKET 0xffff /* options for socket level */ - -/* - * Maximum queue length specifiable by listen. - */ -#define SOMAXCONN 5 - -#define MSG_OOB 0x1 /* process out-of-band data */ -#define MSG_PEEK 0x2 /* peek at incoming message */ -#define MSG_DONTROUTE 0x4 /* send without using routing tables */ - -#define MSG_MAXIOVLEN 16 - -/* - * Define constant based on rfc883, used by gethostbyxxxx() calls. - */ -#define MAXGETHOSTSTRUCT 1024 - -/* - * Define flags to be used with the WSAAsyncSelect() call. - */ -#define FD_READ 0x01 -#define FD_WRITE 0x02 -#define FD_OOB 0x04 -#define FD_ACCEPT 0x08 -#define FD_CONNECT 0x10 -#define FD_CLOSE 0x20 - -/* - * All Windows Sockets error constants are biased by WSABASEERR from - * the "normal" - */ -#define WSABASEERR 10000 -/* - * Windows Sockets definitions of regular Microsoft C error constants - */ -#define WSAEINTR (WSABASEERR+4) -#define WSAEBADF (WSABASEERR+9) -#define WSAEACCES (WSABASEERR+13) -#define WSAEFAULT (WSABASEERR+14) -#define WSAEINVAL (WSABASEERR+22) -#define WSAEMFILE (WSABASEERR+24) - -/* - * Windows Sockets definitions of regular Berkeley error constants - */ -#define WSAEWOULDBLOCK (WSABASEERR+35) -#define WSAEINPROGRESS (WSABASEERR+36) -#define WSAEALREADY (WSABASEERR+37) -#define WSAENOTSOCK (WSABASEERR+38) -#define WSAEDESTADDRREQ (WSABASEERR+39) -#define WSAEMSGSIZE (WSABASEERR+40) -#define WSAEPROTOTYPE (WSABASEERR+41) -#define WSAENOPROTOOPT (WSABASEERR+42) -#define WSAEPROTONOSUPPORT (WSABASEERR+43) -#define WSAESOCKTNOSUPPORT (WSABASEERR+44) -#define WSAEOPNOTSUPP (WSABASEERR+45) -#define WSAEPFNOSUPPORT (WSABASEERR+46) -#define WSAEAFNOSUPPORT (WSABASEERR+47) -#define WSAEADDRINUSE (WSABASEERR+48) -#define WSAEADDRNOTAVAIL (WSABASEERR+49) -#define WSAENETDOWN (WSABASEERR+50) -#define WSAENETUNREACH (WSABASEERR+51) -#define WSAENETRESET (WSABASEERR+52) -#define WSAECONNABORTED (WSABASEERR+53) -#define WSAECONNRESET (WSABASEERR+54) -#define WSAENOBUFS (WSABASEERR+55) -#define WSAEISCONN (WSABASEERR+56) -#define WSAENOTCONN (WSABASEERR+57) -#define WSAESHUTDOWN (WSABASEERR+58) -#define WSAETOOMANYREFS (WSABASEERR+59) -#define WSAETIMEDOUT (WSABASEERR+60) -#define WSAECONNREFUSED (WSABASEERR+61) -#define WSAELOOP (WSABASEERR+62) -#define WSAENAMETOOLONG (WSABASEERR+63) -#define WSAEHOSTDOWN (WSABASEERR+64) -#define WSAEHOSTUNREACH (WSABASEERR+65) -#define WSAENOTEMPTY (WSABASEERR+66) -#define WSAEPROCLIM (WSABASEERR+67) -#define WSAEUSERS (WSABASEERR+68) -#define WSAEDQUOT (WSABASEERR+69) -#define WSAESTALE (WSABASEERR+70) -#define WSAEREMOTE (WSABASEERR+71) - -/* - * Extended Windows Sockets error constant definitions - */ -#define WSASYSNOTREADY (WSABASEERR+91) -#define WSAVERNOTSUPPORTED (WSABASEERR+92) -#define WSANOTINITIALISED (WSABASEERR+93) - -/* - * Error return codes from gethostbyname() and gethostbyaddr() - * (when using the resolver). Note that these errors are - * retrieved via WSAGetLastError() and must therefore follow - * the rules for avoiding clashes with error numbers from - * specific implementations or language run-time systems. - * For this reason the codes are based at WSABASEERR+1001. - * Note also that [WSA]NO_ADDRESS is defined only for - * compatibility purposes. - */ - -#define h_errno WSAGetLastError() - -/* Authoritative Answer: Host not found */ -#define WSAHOST_NOT_FOUND (WSABASEERR+1001) -#define HOST_NOT_FOUND WSAHOST_NOT_FOUND - -/* Non-Authoritative: Host not found, or SERVERFAIL */ -#define WSATRY_AGAIN (WSABASEERR+1002) -#define TRY_AGAIN WSATRY_AGAIN - -/* Non recoverable errors, FORMERR, REFUSED, NOTIMP */ -#define WSANO_RECOVERY (WSABASEERR+1003) -#define NO_RECOVERY WSANO_RECOVERY - -/* Valid name, no data record of requested type */ -#define WSANO_DATA (WSABASEERR+1004) -#define NO_DATA WSANO_DATA - -/* no address, look for MX record */ -#define WSANO_ADDRESS WSANO_DATA -#define NO_ADDRESS WSANO_ADDRESS - -/* - * Windows Sockets errors redefined as regular Berkeley error constants - */ -#define EWOULDBLOCK WSAEWOULDBLOCK -#define EINPROGRESS WSAEINPROGRESS -#define EALREADY WSAEALREADY -#define ENOTSOCK WSAENOTSOCK -#define EDESTADDRREQ WSAEDESTADDRREQ -#define EMSGSIZE WSAEMSGSIZE -#define EPROTOTYPE WSAEPROTOTYPE -#define ENOPROTOOPT WSAENOPROTOOPT -#define EPROTONOSUPPORT WSAEPROTONOSUPPORT -#define ESOCKTNOSUPPORT WSAESOCKTNOSUPPORT -#define EOPNOTSUPP WSAEOPNOTSUPP -#define EPFNOSUPPORT WSAEPFNOSUPPORT -#define EAFNOSUPPORT WSAEAFNOSUPPORT -#define EADDRINUSE WSAEADDRINUSE -#define EADDRNOTAVAIL WSAEADDRNOTAVAIL -#define ENETDOWN WSAENETDOWN -#define ENETUNREACH WSAENETUNREACH -#define ENETRESET WSAENETRESET -#define ECONNABORTED WSAECONNABORTED -#define ECONNRESET WSAECONNRESET -#define ENOBUFS WSAENOBUFS -#define EISCONN WSAEISCONN -#define ENOTCONN WSAENOTCONN -#define ESHUTDOWN WSAESHUTDOWN -#define ETOOMANYREFS WSAETOOMANYREFS -#define ETIMEDOUT WSAETIMEDOUT -#define ECONNREFUSED WSAECONNREFUSED -#define ELOOP WSAELOOP -#define ENAMETOOLONG WSAENAMETOOLONG -#define EHOSTDOWN WSAEHOSTDOWN -#define EHOSTUNREACH WSAEHOSTUNREACH -#define ENOTEMPTY WSAENOTEMPTY -#define EPROCLIM WSAEPROCLIM -#define EUSERS WSAEUSERS -#define EDQUOT WSAEDQUOT -#define ESTALE WSAESTALE -#define EREMOTE WSAEREMOTE - -/* Socket function prototypes */ - -#ifdef __cplusplus -extern "C" { -#endif - -SOCKET PASCAL FAR accept (SOCKET s, struct sockaddr FAR *addr, - int FAR *addrlen); - -int PASCAL FAR bind (SOCKET s, const struct sockaddr FAR *addr, int namelen); - -int PASCAL FAR closesocket (SOCKET s); - -int PASCAL FAR connect (SOCKET s, const struct sockaddr FAR *name, int namelen); - -int PASCAL FAR ioctlsocket (SOCKET s, long cmd, u_long FAR *argp); - -int PASCAL FAR getpeername (SOCKET s, struct sockaddr FAR *name, - int FAR * namelen); - -int PASCAL FAR getsockname (SOCKET s, struct sockaddr FAR *name, - int FAR * namelen); - -int PASCAL FAR getsockopt (SOCKET s, int level, int optname, - char FAR * optval, int FAR *optlen); - -u_long PASCAL FAR htonl (u_long hostlong); - -u_short PASCAL FAR htons (u_short hostshort); - -unsigned long PASCAL FAR inet_addr (const char FAR * cp); - -char FAR * PASCAL FAR inet_ntoa (struct in_addr in); - -int PASCAL FAR listen (SOCKET s, int backlog); - -u_long PASCAL FAR ntohl (u_long netlong); - -u_short PASCAL FAR ntohs (u_short netshort); - -int PASCAL FAR recv (SOCKET s, char FAR * buf, int len, int flags); - -int PASCAL FAR recvfrom (SOCKET s, char FAR * buf, int len, int flags, - struct sockaddr FAR *from, int FAR * fromlen); - -int PASCAL FAR select (int nfds, fd_set FAR *readfds, fd_set FAR *writefds, - fd_set FAR *exceptfds, const struct timeval FAR *timeout); - -int PASCAL FAR send (SOCKET s, const char FAR * buf, int len, int flags); - -int PASCAL FAR sendto (SOCKET s, const char FAR * buf, int len, int flags, - const struct sockaddr FAR *to, int tolen); - -int PASCAL FAR setsockopt (SOCKET s, int level, int optname, - const char FAR * optval, int optlen); - -int PASCAL FAR shutdown (SOCKET s, int how); - -SOCKET PASCAL FAR socket (int af, int type, int protocol); - -/* Database function prototypes */ - -struct hostent FAR * PASCAL FAR gethostbyaddr(const char FAR * addr, - int len, int type); - -struct hostent FAR * PASCAL FAR gethostbyname(const char FAR * name); - -int PASCAL FAR gethostname (char FAR * name, int namelen); - -struct servent FAR * PASCAL FAR getservbyport(int port, const char FAR * proto); - -struct servent FAR * PASCAL FAR getservbyname(const char FAR * name, - const char FAR * proto); - -struct protoent FAR * PASCAL FAR getprotobynumber(int proto); - -struct protoent FAR * PASCAL FAR getprotobyname(const char FAR * name); - -/* Microsoft Windows Extension function prototypes */ - -int PASCAL FAR WSAStartup(WORD wVersionRequired, LPWSADATA lpWSAData); - -int PASCAL FAR WSACleanup(void); - -void PASCAL FAR WSASetLastError(int iError); - -int PASCAL FAR WSAGetLastError(void); - -BOOL PASCAL FAR WSAIsBlocking(void); - -int PASCAL FAR WSAUnhookBlockingHook(void); - -FARPROC PASCAL FAR WSASetBlockingHook(FARPROC lpBlockFunc); - -int PASCAL FAR WSACancelBlockingCall(void); - -HANDLE PASCAL FAR WSAAsyncGetServByName(HWND hWnd, u_int wMsg, - const char FAR * name, - const char FAR * proto, - char FAR * buf, int buflen); - -HANDLE PASCAL FAR WSAAsyncGetServByPort(HWND hWnd, u_int wMsg, int port, - const char FAR * proto, char FAR * buf, - int buflen); - -HANDLE PASCAL FAR WSAAsyncGetProtoByName(HWND hWnd, u_int wMsg, - const char FAR * name, char FAR * buf, - int buflen); - -HANDLE PASCAL FAR WSAAsyncGetProtoByNumber(HWND hWnd, u_int wMsg, - int number, char FAR * buf, - int buflen); - -HANDLE PASCAL FAR WSAAsyncGetHostByName(HWND hWnd, u_int wMsg, - const char FAR * name, char FAR * buf, - int buflen); - -HANDLE PASCAL FAR WSAAsyncGetHostByAddr(HWND hWnd, u_int wMsg, - const char FAR * addr, int len, int type, - const char FAR * buf, int buflen); - -int PASCAL FAR WSACancelAsyncRequest(HANDLE hAsyncTaskHandle); - -int PASCAL FAR WSAAsyncSelect(SOCKET s, HWND hWnd, u_int wMsg, - long lEvent); - -#ifdef __cplusplus -} -#endif - -/* Microsoft Windows Extended data types */ -typedef struct sockaddr SOCKADDR; -typedef struct sockaddr *PSOCKADDR; -typedef struct sockaddr FAR *LPSOCKADDR; - -typedef struct sockaddr_in SOCKADDR_IN; -typedef struct sockaddr_in *PSOCKADDR_IN; -typedef struct sockaddr_in FAR *LPSOCKADDR_IN; - -typedef struct linger LINGER; -typedef struct linger *PLINGER; -typedef struct linger FAR *LPLINGER; - -typedef struct in_addr IN_ADDR; -typedef struct in_addr *PIN_ADDR; -typedef struct in_addr FAR *LPIN_ADDR; - -typedef struct fd_set FD_SET; -typedef struct fd_set *PFD_SET; -typedef struct fd_set FAR *LPFD_SET; - -typedef struct hostent HOSTENT; -typedef struct hostent *PHOSTENT; -typedef struct hostent FAR *LPHOSTENT; - -typedef struct servent SERVENT; -typedef struct servent *PSERVENT; -typedef struct servent FAR *LPSERVENT; - -typedef struct protoent PROTOENT; -typedef struct protoent *PPROTOENT; -typedef struct protoent FAR *LPPROTOENT; - -typedef struct timeval TIMEVAL; -typedef struct timeval *PTIMEVAL; -typedef struct timeval FAR *LPTIMEVAL; - -/* - * Windows message parameter composition and decomposition - * macros. - * - * WSAMAKEASYNCREPLY is intended for use by the Windows Sockets implementation - * when constructing the response to a WSAAsyncGetXByY() routine. - */ -#define WSAMAKEASYNCREPLY(buflen,error) MAKELONG(buflen,error) -/* - * WSAMAKESELECTREPLY is intended for use by the Windows Sockets implementation - * when constructing the response to WSAAsyncSelect(). - */ -#define WSAMAKESELECTREPLY(event,error) MAKELONG(event,error) -/* - * WSAGETASYNCBUFLEN is intended for use by the Windows Sockets application - * to extract the buffer length from the lParam in the response - * to a WSAGetXByY(). - */ -#define WSAGETASYNCBUFLEN(lParam) LOWORD(lParam) -/* - * WSAGETASYNCERROR is intended for use by the Windows Sockets application - * to extract the error code from the lParam in the response - * to a WSAGetXByY(). - */ -#define WSAGETASYNCERROR(lParam) HIWORD(lParam) -/* - * WSAGETSELECTEVENT is intended for use by the Windows Sockets application - * to extract the event code from the lParam in the response - * to a WSAAsyncSelect(). - */ -#define WSAGETSELECTEVENT(lParam) LOWORD(lParam) -/* - * WSAGETSELECTERROR is intended for use by the Windows Sockets application - * to extract the error code from the lParam in the response - * to a WSAAsyncSelect(). - */ -#define WSAGETSELECTERROR(lParam) HIWORD(lParam) - -#endif /* _WINSOCKAPI_ */ - diff --git a/libraries/msdos/winsock/wsockip.c b/libraries/msdos/winsock/wsockip.c deleted file mode 100644 index 307541cfc2..0000000000 --- a/libraries/msdos/winsock/wsockip.c +++ /dev/null @@ -1,467 +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 -#include -#if defined(WINSOCK) || defined(_WIN32) -#include -#include "msdos.h" -#include "stdarg.h" -#ifdef KERBEROS -#include "wshelper.h" -#endif /* KERBEROS */ -#endif /* WINSOCK */ -#include - -#ifdef _WIN32 -#include -#else /* _WIN32 */ -#include -#include -#include -#include -#endif /* _WIN32 */ -#ifdef _AIX -#include -#endif /* _AIX */ -#include "portable.h" -#include "lber.h" -#include "ldap.h" - -#ifdef NEED_FILIO -#ifdef WINSOCK -#include <_sys/filio.h> -#else /* WINSOCK */ -#include -#endif /* WINSOCK */ -#else /* NEED_FILIO */ -#ifdef WINSOCK -#include <_sys/ioctl.h> -#else /* WINSOCK */ -#include -#endif /* WINSOCK */ -#endif /* NEED_FILIO */ -#ifdef USE_SYSCONF -#include -#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 - -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 */ - } - - 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 */ diff --git a/libraries/vms/README.VMS b/libraries/vms/README.VMS deleted file mode 100644 index 4cb3b6aeb4..0000000000 --- a/libraries/vms/README.VMS +++ /dev/null @@ -1,16 +0,0 @@ -LDAP VMS README - -The lber and ldap client libraries and the ldap server ldapd have been -ported to VMS. While we at the University of Michigan have no way to -test under VMS, the necessary code changes have been incorporated. - -Please see the file ldap/build/platforms/vms/make.com for some very basic -build instructions. - - -BUG REPORTING - - Bug reports should be sent to bug-ldap@umich.edu. They will be - passed on to those who did the LDAP VMS port. - -README Last updated 15 December 1994 Mark Smith diff --git a/libraries/vms/getopt.c b/libraries/vms/getopt.c deleted file mode 100644 index 814ab18c80..0000000000 --- a/libraries/vms/getopt.c +++ /dev/null @@ -1,106 +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 -#include -#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(nargc, nargv, ostr) - int nargc; - char **nargv, *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 */ -} diff --git a/libraries/vms/strings.c b/libraries/vms/strings.c deleted file mode 100644 index e96ceb3b02..0000000000 --- a/libraries/vms/strings.c +++ /dev/null @@ -1,97 +0,0 @@ -/* - * strings.c - */ -#include -#include - - -#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(s1, s2) - register char *s1, *s2; -{ - register char *cm = charmap; - - while (cm[*s1] == cm[*s2++]) - if (*s1++ == '\0') - return(0); - return(cm[*s1] - cm[*--s2]); -} - -int -strncasecmp(s1, s2, n) - register char *s1, *s2; - register 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( p ) - char *p; -{ - char *r; - - r = (char *) malloc( strlen( p ) + 1 ); - if ( r != NULL ) { - strcpy( r, p ); - } - - return( r ); -} - -void bcopy (void * src, void *dest, int n) { - memmove(dest, src, n); -} diff --git a/libraries/vms/ucx_select.h b/libraries/vms/ucx_select.h deleted file mode 100644 index a45e3ab382..0000000000 --- a/libraries/vms/ucx_select.h +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Select uses bit masks of file descriptors in longs. These macros - * manipulate such bit fields. - * - * FD_SETSIZE is the number file descriptors select() is able to - * deal with. For DEC TCP/IP on VMS this is currently 32. - */ -#define FD_SETSIZE 32 -#define NBBY 8 /* number of bits in a byte */ - -typedef long fd_mask; -#define NFDBITS (sizeof(fd_mask) * NBBY) /* bits per mask */ - -#ifndef howmany -#define howmany(x, y) (((x)+((y)-1))/(y)) -#endif - -typedef struct fd_set { - fd_mask fds_bits[howmany(FD_SETSIZE, NFDBITS)]; -} fd_set; - -#define FD_SET(n, p) ((p)->fds_bits[(n)/NFDBITS] |= (1 << ((n) % NFDBITS))) -#define FD_CLR(n, p) ((p)->fds_bits[(n)/NFDBITS] &= ~(1 << ((n) % NFDBITS))) -#define FD_ISSET(n, p) ((p)->fds_bits[(n)/NFDBITS] & (1 << ((n) % NFDBITS))) -#define FD_ZERO(p) memset((char *)(p), 0, sizeof(*(p))) - -#define getdtablesize() FD_SETSIZE - -- 2.39.5