| 85 | */ |
| 86 | |
| 87 | const uint8_t *queue_hdr_get(struct bdb_queue_header *p_queue_hdr, |
| 88 | const uint8_t *p_buf, const uint8_t *p_buf_end) |
| 89 | { |
| 90 | if (p_buf_end < p_buf || QUEUE_HDR_LEN > (p_buf_end - p_buf)) |
| 91 | return NULL; |
| 92 | |
| 93 | p_buf = buf_get(&(p_queue_hdr->fragment_no), |
| 94 | sizeof(p_queue_hdr->fragment_no), p_buf, p_buf_end); |
| 95 | p_buf = buf_get(&(p_queue_hdr->num_fragments), |
| 96 | sizeof(p_queue_hdr->num_fragments), p_buf, p_buf_end); |
| 97 | p_buf = buf_get(&(p_queue_hdr->genid[0]), sizeof(p_queue_hdr->genid[0]), |
| 98 | p_buf, p_buf_end); |
| 99 | p_buf = buf_get(&(p_queue_hdr->genid[1]), sizeof(p_queue_hdr->genid[1]), |
| 100 | p_buf, p_buf_end); |
| 101 | p_buf = buf_get(&(p_queue_hdr->total_sz), sizeof(p_queue_hdr->total_sz), |
| 102 | p_buf, p_buf_end); |
| 103 | p_buf = buf_get(&(p_queue_hdr->fragment_sz), |
| 104 | sizeof(p_queue_hdr->fragment_sz), p_buf, p_buf_end); |
| 105 | p_buf = |
| 106 | buf_no_net_get(&(p_queue_hdr->consumer_mask), |
| 107 | sizeof(p_queue_hdr->consumer_mask), p_buf, p_buf_end); |
| 108 | p_buf = buf_get(&(p_queue_hdr->crc32), sizeof(p_queue_hdr->crc32), p_buf, |
| 109 | p_buf_end); |
| 110 | p_buf = buf_get(&(p_queue_hdr->reserved), sizeof(p_queue_hdr->reserved), |
| 111 | p_buf, p_buf_end); |
| 112 | |
| 113 | return p_buf; |
| 114 | } |
| 115 | |
| 116 | uint8_t *queue_hdr_put(const struct bdb_queue_header *p_queue_hdr, |
| 117 | uint8_t *p_buf, const uint8_t *p_buf_end) |
no test coverage detected