OpenVAS Scanner  7.0.1~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 {
39  CH_UTF16 = 0,
40  CH_UNIX = 1,
42  CH_DOS = 3,
43  CH_UTF8 = 4,
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 
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);
61 };
62 #endif
struct charset_functions_ntlmssp * next
Definition: charset.h:60
charset_t
Definition: charset.h:36
size_t(* push)(void *, const char **inbuf, size_t *inbytesleft, char **outbuf, size_t *outbytesleft)
Definition: charset.h:58
Definition: charset.h:42
size_t(* pull)(void *, const char **inbuf, size_t *inbytesleft, char **outbuf, size_t *outbytesleft)
Definition: charset.h:56
const char * name
Definition: charset.h:55
Unix SMB/CIFS implementation.
struct charset_functions_ntlmssp * prev
Definition: charset.h:60