setup a SMB packet at transport level
*/
struct smbcli_request *smbcli_request_setup_transport(struct smbcli_transport *transport,
- uint8_t command, uint_t wct, uint_t buflen)
+ uint8_t command, unsigned int wct, unsigned int buflen)
{
struct smbcli_request *req;
way. This interface is used before a session is setup.
*/
struct smbcli_request *smbcli_request_setup_session(struct smbcli_session *session,
- uint8_t command, uint_t wct, size_t buflen)
+ uint8_t command, unsigned int wct, size_t buflen)
{
struct smbcli_request *req;
*/
struct smbcli_request *smbcli_request_setup(struct smbcli_tree *tree,
uint8_t command,
- uint_t wct, uint_t buflen)
+ unsigned int wct, unsigned int buflen)
{
struct smbcli_request *req;
To cope with this req->out.ptr is supplied. This will be updated to
point at the same offset into the packet as before this call
*/
-static void smbcli_req_grow_allocation(struct smbcli_request *req, uint_t new_size)
+static void smbcli_req_grow_allocation(struct smbcli_request *req, unsigned int new_size)
{
int delta;
uint8_t *buf2;
To cope with this req->out.ptr is supplied. This will be updated to
point at the same offset into the packet as before this call
*/
-static void smbcli_req_grow_data(struct smbcli_request *req, uint_t new_size)
+static void smbcli_req_grow_data(struct smbcli_request *req, unsigned int new_size)
{
int delta;
*/
NTSTATUS smbcli_chained_request_setup(struct smbcli_request *req,
uint8_t command,
- uint_t wct, size_t buflen)
+ unsigned int wct, size_t buflen)
{
- uint_t new_size = 1 + (wct*2) + 2 + buflen;
+ unsigned int new_size = 1 + (wct*2) + 2 + buflen;
SSVAL(req->out.vwv, VWV(0), command);
SSVAL(req->out.vwv, VWV(1), req->out.size - NBT_HDR_SIZE);
handle oplock break requests from the server - return true if the request was
an oplock break
*/
-bool smbcli_handle_oplock_break(struct smbcli_transport *transport, uint_t len, const uint8_t *hdr, const uint8_t *vwv)
+bool smbcli_handle_oplock_break(struct smbcli_transport *transport, unsigned int len, const uint8_t *hdr, const uint8_t *vwv)
{
/* we must be very fussy about what we consider an oplock break to avoid
matching readbraw replies */
return the number of bytes added to the packet
*/
-size_t smbcli_req_append_string(struct smbcli_request *req, const char *str, uint_t flags)
+size_t smbcli_req_append_string(struct smbcli_request *req, const char *str, unsigned int flags)
{
size_t len;
this is used in places where the non-terminated string byte length is
placed in the packet as a separate field
*/
-size_t smbcli_req_append_string_len(struct smbcli_request *req, const char *str, uint_t flags, int *len)
+size_t smbcli_req_append_string_len(struct smbcli_request *req, const char *str, unsigned int flags, int *len)
{
int diff = 0;
size_t ret;
if dest_len is -1 then no limit applies
*/
-size_t smbcli_req_append_ascii4(struct smbcli_request *req, const char *str, uint_t flags)
+size_t smbcli_req_append_ascii4(struct smbcli_request *req, const char *str, unsigned int flags)
{
size_t size;
smbcli_req_append_bytes(req, (const uint8_t *)"\4", 1);
of bytes consumed in the packet is returned
*/
static size_t smbcli_req_pull_ucs2(struct request_bufinfo *bufinfo, TALLOC_CTX *mem_ctx,
- char **dest, const uint8_t *src, int byte_len, uint_t flags)
+ char **dest, const uint8_t *src, int byte_len, unsigned int flags)
{
int src_len, src_len2, alignment=0;
bool ret;
of bytes consumed in the packet is returned
*/
size_t smbcli_req_pull_ascii(struct request_bufinfo *bufinfo, TALLOC_CTX *mem_ctx,
- char **dest, const uint8_t *src, int byte_len, uint_t flags)
+ char **dest, const uint8_t *src, int byte_len, unsigned int flags)
{
int src_len, src_len2;
bool ret;
of bytes consumed in the packet is returned
*/
size_t smbcli_req_pull_string(struct request_bufinfo *bufinfo, TALLOC_CTX *mem_ctx,
- char **dest, const uint8_t *src, int byte_len, uint_t flags)
+ char **dest, const uint8_t *src, int byte_len, unsigned int flags)
{
if (!(flags & STR_ASCII) &&
(((flags & STR_UNICODE) || (bufinfo->flags & BUFINFO_FLAG_UNICODE)))) {
*/
size_t smbcli_blob_pull_ucs2(TALLOC_CTX* mem_ctx,
const DATA_BLOB *blob, const char **dest,
- const uint8_t *src, int byte_len, uint_t flags)
+ const uint8_t *src, int byte_len, unsigned int flags)
{
int src_len, src_len2, alignment=0;
size_t ret_size;
*/
static size_t smbcli_blob_pull_ascii(TALLOC_CTX *mem_ctx,
const DATA_BLOB *blob, const char **dest,
- const uint8_t *src, int byte_len, uint_t flags)
+ const uint8_t *src, int byte_len, unsigned int flags)
{
int src_len, src_len2;
size_t ret_size;
const DATA_BLOB *blob,
struct smb_wire_string *dest,
uint16_t len_offset, uint16_t str_offset,
- uint_t flags)
+ unsigned int flags)
{
int extra;
dest->s = NULL;
DATA_BLOB *blob,
const char **dest,
uint16_t str_offset,
- uint_t flags)
+ unsigned int flags)
{
int extra = 0;
*dest = NULL;
*/
size_t smbcli_blob_append_string(struct smbcli_session *session,
TALLOC_CTX *mem_ctx, DATA_BLOB *blob,
- const char *str, uint_t flags)
+ const char *str, unsigned int flags)
{
size_t max_len;
int len;