Lines Matching refs:ptr
49 smb_dr_decode_start(char *ptr, int size) in smb_dr_decode_start() argument
53 ctx->start_ptr = ctx->ptr = ptr; in smb_dr_decode_start()
54 ctx->end_ptr = ptr + size; in smb_dr_decode_start()
64 if (status == 0 && ctx->ptr != ctx->end_ptr) in smb_dr_decode_finish()
72 smb_dr_encode_start(char *ptr, int size) in smb_dr_encode_start() argument
76 ctx->start_ptr = ctx->ptr = ptr; in smb_dr_encode_start()
77 ctx->end_ptr = ptr + size; in smb_dr_encode_start()
88 if (ctx->ptr < ctx->end_ptr) { in smb_dr_encode_finish()
90 *used = ctx->ptr - ctx->start_ptr; in smb_dr_encode_finish()
105 if (ctx->ptr + sizeof (DWORD) <= ctx->end_ptr) { in smb_dr_get_dword()
106 (void) memcpy(&num, ctx->ptr, sizeof (DWORD)); in smb_dr_get_dword()
107 ctx->ptr += sizeof (DWORD); in smb_dr_get_dword()
120 if (ctx->ptr + sizeof (int32_t) <= ctx->end_ptr) { in smb_dr_get_int32()
121 (void) memcpy(&num, ctx->ptr, sizeof (int32_t)); in smb_dr_get_int32()
122 ctx->ptr += sizeof (int32_t); in smb_dr_get_int32()
146 if (ctx->ptr + len <= ctx->end_ptr) { in smb_dr_get_string()
152 (void) memcpy(buf, ctx->ptr, len); in smb_dr_get_string()
153 ctx->ptr += len; in smb_dr_get_string()
174 if (ctx->ptr + sizeof (DWORD) <= ctx->end_ptr) { in smb_dr_put_dword()
175 (void) memcpy(ctx->ptr, &num, sizeof (DWORD)); in smb_dr_put_dword()
176 ctx->ptr += sizeof (DWORD); in smb_dr_put_dword()
187 if (ctx->ptr + sizeof (int32_t) <= ctx->end_ptr) { in smb_dr_put_int32()
188 (void) memcpy(ctx->ptr, &num, sizeof (int32_t)); in smb_dr_put_int32()
189 ctx->ptr += sizeof (int32_t); in smb_dr_put_int32()
217 if (ctx->ptr + len <= ctx->end_ptr) { in smb_dr_put_string()
218 (void) memcpy(ctx->ptr, buf, len); in smb_dr_put_string()
219 ctx->ptr += len; in smb_dr_put_string()
238 if (ctx->ptr + sizeof (int64_t) <= ctx->end_ptr) { in smb_dr_get_int64()
239 (void) memcpy(&num, ctx->ptr, sizeof (int64_t)); in smb_dr_get_int64()
240 ctx->ptr += sizeof (int64_t); in smb_dr_get_int64()
259 if (ctx->ptr + sizeof (int64_t) <= ctx->end_ptr) { in smb_dr_put_int64()
260 (void) memcpy(ctx->ptr, &num, sizeof (int64_t)); in smb_dr_put_int64()
261 ctx->ptr += sizeof (int64_t); in smb_dr_put_int64()
278 if (ctx->ptr + sizeof (short) <= ctx->end_ptr) { in smb_dr_put_short()
279 (void) memcpy(ctx->ptr, &num, sizeof (short)); in smb_dr_put_short()
280 ctx->ptr += sizeof (short); in smb_dr_put_short()
292 if (ctx->ptr + sizeof (short) <= ctx->end_ptr) { in smb_dr_get_short()
293 (void) memcpy(&num, ctx->ptr, sizeof (short)); in smb_dr_get_short()
294 ctx->ptr += sizeof (short); in smb_dr_get_short()
330 if (ctx->ptr + sizeof (BYTE) <= ctx->end_ptr) { in smb_dr_put_BYTE()
331 (void) memcpy(ctx->ptr, &byte, sizeof (BYTE)); in smb_dr_put_BYTE()
332 ctx->ptr += sizeof (BYTE); in smb_dr_put_BYTE()
344 if (ctx->ptr + sizeof (BYTE) <= ctx->end_ptr) { in smb_dr_get_BYTE()
345 (void) memcpy(&byte, ctx->ptr, sizeof (BYTE)); in smb_dr_get_BYTE()
346 ctx->ptr += sizeof (BYTE); in smb_dr_get_BYTE()
359 if (ctx->ptr + len <= ctx->end_ptr) { in smb_dr_put_buf()
360 (void) memcpy(ctx->ptr, start, len); in smb_dr_put_buf()
361 ctx->ptr += len; in smb_dr_put_buf()
383 if (ctx->ptr + len <= ctx->end_ptr) { in smb_dr_get_buf()
384 (void) memcpy(buf, ctx->ptr, len); in smb_dr_get_buf()
385 ctx->ptr += len; in smb_dr_get_buf()
400 (void) memcpy(si, ctx->ptr, sizeof (smb_share_t)); in smb_dr_get_share()
401 ctx->ptr += sizeof (smb_share_t); in smb_dr_get_share()
415 if (ctx->ptr + sizeof (smb_share_t) <= ctx->end_ptr) { in smb_dr_put_share()
416 (void) memcpy(ctx->ptr, si, sizeof (smb_share_t)); in smb_dr_put_share()
417 ctx->ptr += sizeof (smb_share_t); in smb_dr_put_share()