Lines Matching full:cs

57 nd_cpack_align_and_reserve(struct cpack_state *cs, size_t wordsize)  in nd_cpack_align_and_reserve()  argument
62 next = nd_cpack_next_boundary(cs->c_buf, cs->c_next, wordsize); in nd_cpack_align_and_reserve()
65 if (next - cs->c_buf + wordsize > cs->c_len) in nd_cpack_align_and_reserve()
73 nd_cpack_advance(struct cpack_state *cs, const size_t toskip) in nd_cpack_advance() argument
76 if (cs->c_next - cs->c_buf + toskip > cs->c_len) in nd_cpack_advance()
78 cs->c_next += toskip; in nd_cpack_advance()
83 nd_cpack_init(struct cpack_state *cs, const uint8_t *buf, size_t buflen) in nd_cpack_init() argument
85 memset(cs, 0, sizeof(*cs)); in nd_cpack_init()
87 cs->c_buf = buf; in nd_cpack_init()
88 cs->c_len = buflen; in nd_cpack_init()
89 cs->c_next = cs->c_buf; in nd_cpack_init()
96 nd_cpack_uint64(netdissect_options *ndo, struct cpack_state *cs, uint64_t *u) in nd_cpack_uint64() argument
100 if ((next = nd_cpack_align_and_reserve(cs, sizeof(*u))) == NULL) in nd_cpack_uint64()
106 cs->c_next = next + sizeof(*u); in nd_cpack_uint64()
112 nd_cpack_int64(netdissect_options *ndo, struct cpack_state *cs, int64_t *u) in nd_cpack_int64() argument
116 if ((next = nd_cpack_align_and_reserve(cs, sizeof(*u))) == NULL) in nd_cpack_int64()
122 cs->c_next = next + sizeof(*u); in nd_cpack_int64()
128 nd_cpack_uint32(netdissect_options *ndo, struct cpack_state *cs, uint32_t *u) in nd_cpack_uint32() argument
132 if ((next = nd_cpack_align_and_reserve(cs, sizeof(*u))) == NULL) in nd_cpack_uint32()
138 cs->c_next = next + sizeof(*u); in nd_cpack_uint32()
144 nd_cpack_int32(netdissect_options *ndo, struct cpack_state *cs, int32_t *u) in nd_cpack_int32() argument
148 if ((next = nd_cpack_align_and_reserve(cs, sizeof(*u))) == NULL) in nd_cpack_int32()
154 cs->c_next = next + sizeof(*u); in nd_cpack_int32()
160 nd_cpack_uint16(netdissect_options *ndo, struct cpack_state *cs, uint16_t *u) in nd_cpack_uint16() argument
164 if ((next = nd_cpack_align_and_reserve(cs, sizeof(*u))) == NULL) in nd_cpack_uint16()
170 cs->c_next = next + sizeof(*u); in nd_cpack_uint16()
176 nd_cpack_int16(netdissect_options *ndo, struct cpack_state *cs, int16_t *u) in nd_cpack_int16() argument
180 if ((next = nd_cpack_align_and_reserve(cs, sizeof(*u))) == NULL) in nd_cpack_int16()
186 cs->c_next = next + sizeof(*u); in nd_cpack_int16()
192 nd_cpack_uint8(netdissect_options *ndo, struct cpack_state *cs, uint8_t *u) in nd_cpack_uint8() argument
195 if ((size_t)(cs->c_next - cs->c_buf) >= cs->c_len) in nd_cpack_uint8()
198 *u = GET_U_1(cs->c_next); in nd_cpack_uint8()
201 cs->c_next++; in nd_cpack_uint8()
207 nd_cpack_int8(netdissect_options *ndo, struct cpack_state *cs, int8_t *u) in nd_cpack_int8() argument
210 if ((size_t)(cs->c_next - cs->c_buf) >= cs->c_len) in nd_cpack_int8()
213 *u = GET_S_1(cs->c_next); in nd_cpack_int8()
216 cs->c_next++; in nd_cpack_int8()