~ubuntu-branches/ubuntu/oneiric/likewise-open/oneiric

« back to all changes in this revision

Viewing changes to libkeytab/include/ktmem.h

  • Committer: Bazaar Package Importer
  • Author(s): Scott Salley
  • Date: 2010-11-22 12:06:00 UTC
  • mfrom: (1.1.6 upstream)
  • Revision ID: james.westby@ubuntu.com-20101122120600-8lba1fpceot71wlb
Tags: 6.0.0.53010-1
Likewise Open 6.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* Editor Settings: expandtabs and use 4 spaces for indentation
2
 
 * ex: set softtabstop=4 tabstop=8 expandtab shiftwidth=4: *
3
 
 * -*- mode: c, c-basic-offset: 4 -*- */
4
 
 
5
 
/*
6
 
 * Copyright Likewise Software    2004-2008
7
 
 * All rights reserved.
8
 
 *
9
 
 * This library is free software; you can redistribute it and/or modify it
10
 
 * under the terms of the GNU Lesser General Public License as published by
11
 
 * the Free Software Foundation; either version 2.1 of the license, or (at
12
 
 * your option) any later version.
13
 
 *
14
 
 * This library is distributed in the hope that it will be useful,
15
 
 * but WITHOUT ANY WARRANTY; without even the implied warranty of 
16
 
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser
17
 
 * General Public License for more details.  You should have received a copy
18
 
 * of the GNU Lesser General Public License along with this program.  If
19
 
 * not, see <http://www.gnu.org/licenses/>.
20
 
 *
21
 
 * LIKEWISE SOFTWARE MAKES THIS SOFTWARE AVAILABLE UNDER OTHER LICENSING
22
 
 * TERMS AS WELL.  IF YOU HAVE ENTERED INTO A SEPARATE LICENSE AGREEMENT
23
 
 * WITH LIKEWISE SOFTWARE, THEN YOU MAY ELECT TO USE THE SOFTWARE UNDER THE
24
 
 * TERMS OF THAT SOFTWARE LICENSE AGREEMENT INSTEAD OF THE TERMS OF THE GNU
25
 
 * LESSER GENERAL PUBLIC LICENSE, NOTWITHSTANDING THE ABOVE NOTICE.  IF YOU
26
 
 * HAVE QUESTIONS, OR WISH TO REQUEST A COPY OF THE ALTERNATE LICENSING
27
 
 * TERMS OFFERED BY LIKEWISE SOFTWARE, PLEASE CONTACT LIKEWISE SOFTWARE AT
28
 
 * license@likewisesoftware.com
29
 
 */
30
 
 
31
 
/*
32
 
 * Copyright (C) Likewise Software. All rights reserved.
33
 
 *
34
 
 * Module Name:
35
 
 *
36
 
 *        ktmem.h
37
 
 *
38
 
 * Abstract:
39
 
 *
40
 
 *        Kerberos 5 keytab management library
41
 
 *
42
 
 * Authors: Krishna Ganugapati (krishnag@likewisesoftware.com)
43
 
 *          Sriram Nambakam (snambakam@likewisesoftware.com)
44
 
 *          Rafal Szczesniak (rafal@likewisesoftware.com)
45
 
 */
46
 
 
47
 
#ifndef __KTMEM_H__
48
 
#define __KTMEM_H__
49
 
 
50
 
 
51
 
typedef struct _KT_STRING_BUFFER
52
 
{
53
 
    PSTR pszBuffer;
54
 
    // length of the string excluding terminating null
55
 
    size_t sLen;
56
 
    // capacity of the buffer excluding terminating null
57
 
    size_t sCapacity;
58
 
} KT_STRING_BUFFER;
59
 
 
60
 
DWORD
61
 
KtInitializeStringBuffer(
62
 
        KT_STRING_BUFFER *pBuffer,
63
 
        size_t sCapacity);
64
 
 
65
 
DWORD
66
 
KtAppendStringBuffer(
67
 
        KT_STRING_BUFFER *pBuffer,
68
 
        PCSTR pszAppend);
69
 
 
70
 
void
71
 
KtFreeStringBufferContents(
72
 
        KT_STRING_BUFFER *pBuffer);
73
 
 
74
 
DWORD
75
 
KtAllocateMemory(
76
 
    DWORD dwSize,
77
 
    PVOID * ppMemory
78
 
    );
79
 
 
80
 
DWORD
81
 
KtDuplicateMemory(
82
 
    PVOID pMemory,
83
 
    DWORD dwSize,
84
 
    PVOID *ppNewMemory
85
 
    );
86
 
 
87
 
DWORD
88
 
KtReallocMemory(
89
 
    PVOID  pMemory,
90
 
    PVOID * ppNewMemory,
91
 
    DWORD dwSize
92
 
    );
93
 
 
94
 
 
95
 
void
96
 
KtFreeMemory(
97
 
    PVOID pMemory
98
 
    );
99
 
 
100
 
 
101
 
DWORD
102
 
KtAllocateString(
103
 
    PCSTR pszInputString, 
104
 
    PSTR *ppszOutputString
105
 
    );
106
 
 
107
 
 
108
 
void
109
 
KtFreeString(
110
 
    PSTR pszString
111
 
    );
112
 
 
113
 
void
114
 
KtFreeStringArray(
115
 
    PSTR * ppStringArray,
116
 
    DWORD dwCount
117
 
    );
118
 
 
119
 
void
120
 
KtFreeNullTerminatedStringArray(
121
 
    PSTR * ppStringArray
122
 
    );
123
 
 
124
 
#if defined(__LWI_AIX__) || defined(__LWI_HP_UX__)
125
 
 
126
 
#if !defined(HAVE_RPL_MALLOC)
127
 
 
128
 
void*
129
 
rpl_malloc(
130
 
    size_t n
131
 
    );
132
 
 
133
 
#endif /* ! HAVE_RPL_MALLOC */
134
 
 
135
 
#if !defined(HAVE_RPL_REALLOC)
136
 
 
137
 
void*
138
 
rpl_realloc(
139
 
    void* buf,
140
 
    size_t n
141
 
    );
142
 
 
143
 
#endif /* ! HAVE_RPL_REALLOC */
144
 
 
145
 
#endif /* defined(__LWI_AIX__) || defined(__LWI_HP_UX__) */
146
 
 
147
 
#endif /* __KTMEM_H__ */
148
 
 
149
 
 
150
 
/*
151
 
local variables:
152
 
mode: c
153
 
c-basic-offset: 4
154
 
indent-tabs-mode: nil
155
 
tab-width: 4
156
 
end:
157
 
*/