Lines Matching refs:cursor
70 uint8_t *cursor; member
75 const uint8_t *cursor; member
81 void pldm__msgbuf_cleanup(const void *cursor LIBPLDM_CC_UNUSED, in pldm__msgbuf_cleanup()
84 assert(cursor == NULL && remaining == INTMAX_MIN); in pldm__msgbuf_cleanup()
92 pldm__msgbuf_cleanup((const void *)ctx->cursor, ctx->remaining); in pldm__msgbuf_rw_cleanup()
100 pldm__msgbuf_cleanup((const void *)ctx->cursor, ctx->remaining); in pldm__msgbuf_ro_cleanup()
133 pldm__msgbuf_init_errno(const uint8_t **cursor, intmax_t *remaining, in pldm__msgbuf_init_errno() argument
136 *cursor = NULL; in pldm__msgbuf_init_errno()
152 *cursor = (const uint8_t *)buf; in pldm__msgbuf_init_errno()
177 return pldm__msgbuf_init_errno((const uint8_t **)&ctx->cursor, in pldm_msgbuf_rw_init_errno()
200 return pldm__msgbuf_init_errno(&ctx->cursor, &ctx->remaining, minsize, in pldm_msgbuf_ro_init_errno()
304 int pldm__msgbuf_discard(const uint8_t **cursor, intmax_t *remaining, int error) in pldm__msgbuf_discard() argument
306 *cursor = NULL; in pldm__msgbuf_discard()
316 return pldm__msgbuf_discard((const uint8_t **)&ctx->cursor, in pldm_msgbuf_rw_discard()
325 return pldm__msgbuf_discard(&ctx->cursor, &ctx->remaining, error); in pldm_msgbuf_ro_discard()
492 assert(ctx->cursor); in pldm__msgbuf_extract_uint8()
493 memcpy(dst, ctx->cursor, sizeof(uint8_t)); in pldm__msgbuf_extract_uint8()
494 ctx->cursor++; in pldm__msgbuf_extract_uint8()
513 assert(ctx->cursor); in pldm__msgbuf_extract_int8()
514 memcpy(dst, ctx->cursor, sizeof(int8_t)); in pldm__msgbuf_extract_int8()
515 ctx->cursor++; in pldm__msgbuf_extract_int8()
542 assert(ctx->cursor); in pldm__msgbuf_extract_uint16()
546 memcpy(&ldst, ctx->cursor, sizeof(ldst)); in pldm__msgbuf_extract_uint16()
554 ctx->cursor += sizeof(ldst); in pldm__msgbuf_extract_uint16()
580 assert(ctx->cursor); in pldm__msgbuf_extract_int16()
581 memcpy(&ldst, ctx->cursor, sizeof(ldst)); in pldm__msgbuf_extract_int16()
584 ctx->cursor += sizeof(ldst); in pldm__msgbuf_extract_int16()
610 assert(ctx->cursor); in pldm__msgbuf_extract_uint32()
611 memcpy(&ldst, ctx->cursor, sizeof(ldst)); in pldm__msgbuf_extract_uint32()
614 ctx->cursor += sizeof(ldst); in pldm__msgbuf_extract_uint32()
640 assert(ctx->cursor); in pldm__msgbuf_extract_int32()
641 memcpy(&ldst, ctx->cursor, sizeof(ldst)); in pldm__msgbuf_extract_int32()
644 ctx->cursor += sizeof(ldst); in pldm__msgbuf_extract_int32()
673 assert(ctx->cursor); in pldm__msgbuf_extract_real32()
674 memcpy(&ldst, ctx->cursor, sizeof(ldst)); in pldm__msgbuf_extract_real32()
677 ctx->cursor += sizeof(ldst); in pldm__msgbuf_extract_real32()
712 assert(ctx->cursor); in pldm__msgbuf_extract_array_void()
713 memcpy(dst, ctx->cursor, count); in pldm__msgbuf_extract_array_void()
714 ctx->cursor += count; in pldm__msgbuf_extract_array_void()
782 assert(ctx->cursor); in pldm_msgbuf_insert_uint64()
783 memcpy(ctx->cursor, &val, sizeof(val)); in pldm_msgbuf_insert_uint64()
784 ctx->cursor += sizeof(src); in pldm_msgbuf_insert_uint64()
811 assert(ctx->cursor); in pldm_msgbuf_insert_real32()
812 memcpy(ctx->cursor, &val, sizeof(val)); in pldm_msgbuf_insert_real32()
813 ctx->cursor += sizeof(src); in pldm_msgbuf_insert_real32()
838 assert(ctx->cursor); in pldm_msgbuf_insert_uint32()
839 memcpy(ctx->cursor, &val, sizeof(val)); in pldm_msgbuf_insert_uint32()
840 ctx->cursor += sizeof(src); in pldm_msgbuf_insert_uint32()
865 assert(ctx->cursor); in pldm_msgbuf_insert_uint16()
866 memcpy(ctx->cursor, &val, sizeof(val)); in pldm_msgbuf_insert_uint16()
867 ctx->cursor += sizeof(src); in pldm_msgbuf_insert_uint16()
890 assert(ctx->cursor); in pldm_msgbuf_insert_uint8()
891 memcpy(ctx->cursor, &src, sizeof(src)); in pldm_msgbuf_insert_uint8()
892 ctx->cursor += sizeof(src); in pldm_msgbuf_insert_uint8()
917 assert(ctx->cursor); in pldm_msgbuf_insert_int32()
918 memcpy(ctx->cursor, &val, sizeof(val)); in pldm_msgbuf_insert_int32()
919 ctx->cursor += sizeof(src); in pldm_msgbuf_insert_int32()
944 assert(ctx->cursor); in pldm_msgbuf_insert_int16()
945 memcpy(ctx->cursor, &val, sizeof(val)); in pldm_msgbuf_insert_int16()
946 ctx->cursor += sizeof(src); in pldm_msgbuf_insert_int16()
969 assert(ctx->cursor); in pldm_msgbuf_insert_int8()
970 memcpy(ctx->cursor, &src, sizeof(src)); in pldm_msgbuf_insert_int8()
971 ctx->cursor += sizeof(src); in pldm_msgbuf_insert_int8()
1006 assert(ctx->cursor); in pldm__msgbuf_insert_array_void()
1007 memcpy(ctx->cursor, src, count); in pldm__msgbuf_insert_array_void()
1008 ctx->cursor += count; in pldm__msgbuf_insert_array_void()
1043 size_t required, const void **cursor) in pldm__msgbuf_span_required() argument
1053 if (cursor) { in pldm__msgbuf_span_required()
1054 *cursor = *buf; in pldm__msgbuf_span_required()
1072 const void **cursor) in pldm_msgbuf_ro_span_required() argument
1074 return pldm__msgbuf_span_required(&ctx->cursor, &ctx->remaining, in pldm_msgbuf_ro_span_required()
1075 required, cursor); in pldm_msgbuf_ro_span_required()
1081 void **cursor) in pldm_msgbuf_rw_span_required() argument
1083 return pldm__msgbuf_span_required((const uint8_t **)&ctx->cursor, in pldm_msgbuf_rw_span_required()
1085 (const void **)cursor); in pldm_msgbuf_rw_span_required()
1092 const void **cursor, size_t *length) in pldm__msgbuf_span_string_ascii() argument
1111 if (cursor) { in pldm__msgbuf_span_string_ascii()
1112 *cursor = *buf; in pldm__msgbuf_span_string_ascii()
1135 pldm_msgbuf_rw_span_string_ascii(struct pldm_msgbuf_rw *ctx, void **cursor, in pldm_msgbuf_rw_span_string_ascii() argument
1138 return pldm__msgbuf_span_string_ascii((const uint8_t **)&ctx->cursor, in pldm_msgbuf_rw_span_string_ascii()
1140 (const void **)cursor, length); in pldm_msgbuf_rw_span_string_ascii()
1146 const void **cursor, size_t *length) in pldm_msgbuf_ro_span_string_ascii() argument
1148 return pldm__msgbuf_span_string_ascii(&ctx->cursor, &ctx->remaining, in pldm_msgbuf_ro_span_string_ascii()
1149 cursor, length); in pldm_msgbuf_ro_span_string_ascii()
1156 const void **cursor, size_t *length) in pldm__msgbuf_span_string_utf16() argument
1205 if (cursor) { in pldm__msgbuf_span_string_utf16()
1206 *cursor = *buf; in pldm__msgbuf_span_string_utf16()
1230 const void **cursor, size_t *length) in pldm_msgbuf_ro_span_string_utf16() argument
1232 return pldm__msgbuf_span_string_utf16(&ctx->cursor, &ctx->remaining, in pldm_msgbuf_ro_span_string_utf16()
1233 cursor, length); in pldm_msgbuf_ro_span_string_utf16()
1238 pldm_msgbuf_rw_span_string_utf16(struct pldm_msgbuf_rw *ctx, void **cursor, in pldm_msgbuf_rw_span_string_utf16() argument
1241 return pldm__msgbuf_span_string_utf16((const uint8_t **)&ctx->cursor, in pldm_msgbuf_rw_span_string_utf16()
1243 (const void **)cursor, length); in pldm_msgbuf_rw_span_string_utf16()
1250 const void **cursor, size_t *len) in pldm__msgbuf_span_remaining() argument
1257 *cursor = *buf; in pldm__msgbuf_span_remaining()
1267 pldm_msgbuf_rw_span_remaining(struct pldm_msgbuf_rw *ctx, void **cursor, in pldm_msgbuf_rw_span_remaining() argument
1270 return pldm__msgbuf_span_remaining((const uint8_t **)&ctx->cursor, in pldm_msgbuf_rw_span_remaining()
1272 (const void **)cursor, len); in pldm_msgbuf_rw_span_remaining()
1277 pldm_msgbuf_ro_span_remaining(struct pldm_msgbuf_ro *ctx, const void **cursor, in pldm_msgbuf_ro_span_remaining() argument
1280 return pldm__msgbuf_span_remaining(&ctx->cursor, &ctx->remaining, in pldm_msgbuf_ro_span_remaining()
1281 cursor, len); in pldm_msgbuf_ro_span_remaining()
1288 size_t trailer, const void **cursor, size_t *length) in pldm__msgbuf_span_until() argument
1302 if (cursor) { in pldm__msgbuf_span_until()
1303 *cursor = *buf; in pldm__msgbuf_span_until()
1324 const void **cursor, size_t *length) in pldm_msgbuf_ro_span_until() argument
1326 return pldm__msgbuf_span_until(&ctx->cursor, &ctx->remaining, trailer, in pldm_msgbuf_ro_span_until()
1327 cursor, length); in pldm_msgbuf_ro_span_until()
1333 void **cursor, size_t *length) in pldm_msgbuf_rw_span_until() argument
1335 return pldm__msgbuf_span_until((const uint8_t **)&ctx->cursor, in pldm_msgbuf_rw_span_until()
1337 (const void **)cursor, length); in pldm_msgbuf_rw_span_until()
1342 pldm_msgbuf_peek_remaining(struct pldm_msgbuf_rw *ctx, void **cursor, in pldm_msgbuf_peek_remaining() argument
1349 assert(ctx->cursor); in pldm_msgbuf_peek_remaining()
1350 *cursor = ctx->cursor; in pldm_msgbuf_peek_remaining()
1367 assert(ctx->cursor); in pldm_msgbuf_skip()
1368 ctx->cursor += count; in pldm_msgbuf_skip()
1404 ctx->cursor = NULL; in pldm_msgbuf_complete_used()
1451 assert(src->cursor && dst->cursor); in pldm__msgbuf_copy()
1452 memcpy(dst->cursor, src->cursor, size); in pldm__msgbuf_copy()
1453 src->cursor += size; in pldm__msgbuf_copy()
1455 dst->cursor += size; in pldm__msgbuf_copy()