Lines Matching +full:two +full:- +full:wire

1 // SPDX-License-Identifier: GPL-2.0-or-later
17 * smb_utf16_bytes() - how long will a string be after conversion?
42 charlen = codepage->uni2char(ftmp, tmp, NLS_MAX_CHARSET_SIZE); in smb_utf16_bytes()
53 * cifs_mapchar() - convert a host-endian char to proper char in codepage
55 * @src_char: 2 byte host-endian source character
106 len = cp->uni2char(src_char, target, NLS_MAX_CHARSET_SIZE); in cifs_mapchar()
116 * smb_from_utf16() - convert utf16le string to local charset
124 * Convert a little-endian utf16le string (as sent by the server) to a string
132 * Note that some windows versions actually send multiword UTF-16 characters
133 * instead of straight UTF16-2. The linux nls routines however aren't able to
155 safelen = tolen - (NLS_MAX_CHARSET_SIZE + nullsize); in smb_from_utf16()
168 if ((outlen + charlen) > (tolen - nullsize)) in smb_from_utf16()
177 /* properly null-terminate string */ in smb_from_utf16()
185 * smb_strtoUTF16() - Convert character string to unicode string
201 if (!strcmp(codepage->charset, "utf8")) { in smb_strtoUTF16()
203 * convert utf8 -> utf16, we assume we have enough space in smb_strtoUTF16()
221 for (i = 0; len > 0 && *from; i++, from += charlen, len -= charlen) { in smb_strtoUTF16()
222 charlen = codepage->char2uni(from, len, &wchar_to); in smb_strtoUTF16()
237 * smb_strndup_from_utf16() - copy a string from wire format to the local
262 return ERR_PTR(-ENOMEM); in smb_strndup_from_utf16()
267 return ERR_PTR(-EINVAL); in smb_strndup_from_utf16()
274 return ERR_PTR(-ENOMEM); in smb_strndup_from_utf16()
282 * Convert 16 bit Unicode pathname to wire format from string in current code
284 * only legal in POSIX-like OS (if they are present in the string). Path
285 * names are little endian 16 bit Unicode on the wire
288 * smbConvertToUTF16() - convert string from local charset to utf16
295 * Convert 16 bit Unicode pathname to wire format from string in current code
297 * only legal in POSIX-like OS (if they are present in the string). Path
298 * names are little endian 16 bit Unicode on the wire
344 charlen = cp->char2uni(source + i, srclen - i, &tmp); in smbConvertToUTF16()
358 * but will take exactly two bytes in the target string in smbConvertToUTF16()