OpenVAS Scanner 21.4.1
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 */
36typedef enum
37{
42 CH_DOS = 3,
44 CH_UTF16BE = 5
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
charset_t
Definition: charset.h:37
@ CH_UTF16
Definition: charset.h:39
@ CH_DISPLAY
Definition: charset.h:41
@ CH_UTF16BE
Definition: charset.h:44
@ CH_UNIX
Definition: charset.h:40
@ CH_DOS
Definition: charset.h:42
@ CH_UTF16LE
Definition: charset.h:38
@ CH_UTF8
Definition: charset.h:43
Unix SMB/CIFS implementation.
Definition: charset.h:54
struct charset_functions_ntlmssp * prev
Definition: charset.h:60
struct charset_functions_ntlmssp * next
Definition: charset.h:60
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
size_t(* push)(void *, const char **inbuf, size_t *inbytesleft, char **outbuf, size_t *outbytesleft)
Definition: charset.h:58