/*
* Copyright 2001-2003 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (the "NPL"); you may not use this file except in
* compliance with the NPL. You may obtain a copy of the NPL at
*
* Software distributed under the NPL is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
* for the specific language governing rights and limitations under the
* NPL.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998-1999 Netscape Communications Corporation. All
* Rights Reserved.
*/
/*
* Copyright (c) 1990 Regents of the University of Michigan.
* All rights reserved.
*
* Redistribution and use in source and binary forms are permitted
* provided that this notice is preserved and that due credit is given
* to the University of Michigan at Ann Arbor. The name of the University
* may not be used to endorse or promote products derived from this
* software without specific prior written permission. This software
* is provided ``as is'' without express or implied warranty.
*/
/* lbet-int.h - internal header file for liblber */
#ifndef _LBERINT_H
#define _LBERINT_H
#ifdef __cplusplus
extern "C" {
#endif
#include <stdio.h>
#include <ctype.h>
#include <stdarg.h>
#include <stdlib.h>
#ifdef LDAP_SASLIO_HOOKS
#endif
#ifdef macintosh
# include "ldap-macos.h"
#else /* macintosh */
#if !defined(BSDI)
# include <malloc.h>
#endif
# include <errno.h>
#endif
#if defined( _WINDOWS )
# define WIN32_LEAN_AND_MEAN
# include <windows.h>
# include <time.h>
/* No stderr in a 16-bit Windows DLL */
# define USE_DBG_WIN
# endif
# else
#if !defined(XP_OS2)
# include <unistd.h>
#endif
# endif /* defined( _WINDOWS ) */
#endif /* macintosh */
#include <memory.h>
#include <string.h>
#include "portable.h"
#ifdef _WINDOWS
#include <winsock.h>
#include <io.h>
#endif /* _WINDOWS */
#ifdef XP_OS2
#include <os2sock.h>
#include <io.h>
#endif /* XP_OS2 */
/* No stderr in a 16-bit Windows DLL */
#endif
#include "lber.h"
#ifdef _SOLARIS_SDK
#include <libintl.h>
#include "solaris-int.h"
#endif
#ifdef macintosh
#define NSLDAPI_LBER_SOCKET_IS_PTR
#endif
#ifndef _IFP
#define _IFP
#endif
typedef struct seqorset {
char *sos_first;
char *sos_ptr;
} Seqorset;
struct berelement {
char *ber_buf;
char *ber_ptr;
char *ber_end;
int ber_usertag;
char ber_options;
char *ber_rwptr;
int ber_flags;
int ber_sos_stack_posn;
};
#ifndef _SOLARIS_SDK
#endif
#ifdef LDAP_DEBUG
#endif
/*
*/
struct nslberi_io_fns {
};
struct sockbuf {
sockaddrs */
struct nslberi_io_fns
struct lber_x_ext_io_fns
#ifdef LDAP_SASLIO_HOOKS
struct lber_x_ext_io_fns
#endif
};
#ifndef NSLBERI_LBER_INT_FRIEND
/*
* Everything from this point on is excluded if NSLBERI_LBER_INT_FRIEND is
*/
/*
* macros used to check validity of data structures and parameters
*/
( (sb) != NULLSOCKBUF )
#else /* __alpha */
/*
* htonl and ntohl on the DEC Alpha under OSF 1 seem to only swap the
* lower-order 32-bits of a (64-bit) long, so we define correct versions
* here.
*/
#endif /* __alpha */
/* function prototypes */
#ifdef LDAP_DEBUG
#endif
void ber_err_print( char *data );
void nslberi_free( void *ptr );
/* blame: dboreham
* slapd spends much of its time doing memcpy's for the ber code.
* Most of these are single-byte, so we special-case those and speed
* things up considerably.
*/
#ifdef sunos4
#else /* sunos4 */
#endif /* sunos4 */
#ifdef SAFEMEMCPY
#endif
/*
* Memory allocation done in liblber should all go through one of the
* following macros. This is so we can plug-in alternative memory
* allocators, etc. as the need arises.
*/
/* allow the library to access the debug variable */
extern int lber_debug;
#endif /* !NSLBERI_LBER_INT_FRIEND */
#ifdef __cplusplus
}
#endif
#endif /* _LBERINT_H */