OpenVAS Scanner
7.0.0~git
charset.h
Go to the documentation of this file.
1
/* Copyright (C) Andrew Tridgell 2001
2
* Copyright (C) Jelmer Vernooij 2002
3
*
4
* SPDX-License-Identifier: GPL-2.0-or-later
5
*
6
* This program is free software; you can redistribute it and/or
7
* modify it under the terms of the GNU General Public License
8
* as published by the Free Software Foundation; either version 2
9
* of the License, or (at your option) any later version.
10
*
11
* This program is distributed in the hope that it will be useful,
12
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
* GNU General Public License for more details.
15
*
16
* You should have received a copy of the GNU General Public License
17
* along with this program; if not, write to the Free Software
18
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
19
*/
20
26
/* MODIFICATION: This has only those functions that cater to the requirements of
27
* OpenVAS, remaining functions are removed*/
28
#ifndef __CHARSET_H__
29
#define __CHARSET_H__
30
31
#include "
smb.h
"
32
33
#include <string.h>
34
35
/* this defines the charset types used in samba */
36
typedef
enum
37
{
38
CH_UTF16LE
= 0,
39
CH_UTF16
= 0,
40
CH_UNIX
= 1,
41
CH_DISPLAY
= 2,
42
CH_DOS
= 3,
43
CH_UTF8
= 4,
44
CH_UTF16BE
= 5
45
}
charset_t
;
46
47
#define NUM_CHARSETS 6
48
/*
49
* for each charset we have a function that pushes from that charset to a ucs2
50
* buffer, and a function that pulls from ucs2 buffer to that charset.
51
*/
52
53
struct
charset_functions_ntlmssp
54
{
55
const
char
*
name
;
56
size_t (*
pull
) (
void
*,
const
char
**inbuf,
size_t
*inbytesleft,
57
char
**outbuf,
size_t
*outbytesleft);
58
size_t (*
push
) (
void
*,
const
char
**inbuf,
size_t
*inbytesleft,
59
char
**outbuf,
size_t
*outbytesleft);
60
struct
charset_functions_ntlmssp
*
prev
, *
next
;
61
};
62
#endif
charset_functions_ntlmssp::name
const char * name
Definition:
charset.h:55
charset_functions_ntlmssp
Definition:
charset.h:53
CH_DISPLAY
@ CH_DISPLAY
Definition:
charset.h:41
CH_UNIX
@ CH_UNIX
Definition:
charset.h:40
CH_DOS
@ CH_DOS
Definition:
charset.h:42
charset_t
charset_t
Definition:
charset.h:36
charset_functions_ntlmssp::push
size_t(* push)(void *, const char **inbuf, size_t *inbytesleft, char **outbuf, size_t *outbytesleft)
Definition:
charset.h:58
CH_UTF8
@ CH_UTF8
Definition:
charset.h:43
CH_UTF16LE
@ CH_UTF16LE
Definition:
charset.h:38
CH_UTF16BE
@ CH_UTF16BE
Definition:
charset.h:44
charset_functions_ntlmssp::next
struct charset_functions_ntlmssp * next
Definition:
charset.h:60
smb.h
Unix SMB/CIFS implementation.
charset_functions_ntlmssp::pull
size_t(* pull)(void *, const char **inbuf, size_t *inbytesleft, char **outbuf, size_t *outbytesleft)
Definition:
charset.h:56
CH_UTF16
@ CH_UTF16
Definition:
charset.h:39
charset_functions_ntlmssp::prev
struct charset_functions_ntlmssp * prev
Definition:
charset.h:60
nasl
charset.h
Generated on Wed Jan 29 2020 00:00:00 for OpenVAS Scanner by
1.8.17