Lines Matching refs:buf
42 : ((p)->buf != NULL \
43 ? (unsigned char *)(p)->buf->data \
55 if (pkt->buf != NULL && (pkt->buf->length - pkt->written < len)) { in WPACKET_reserve_bytes()
59 reflen = (len > pkt->buf->length) ? len : pkt->buf->length; in WPACKET_reserve_bytes()
68 if (BUF_MEM_grow(pkt->buf, newlen) == 0) in WPACKET_reserve_bytes()
129 int WPACKET_init_static_len(WPACKET *pkt, unsigned char *buf, size_t len, in WPACKET_init_static_len() argument
135 if (!ossl_assert(buf != NULL && len > 0)) in WPACKET_init_static_len()
138 pkt->staticbuf = buf; in WPACKET_init_static_len()
139 pkt->buf = NULL; in WPACKET_init_static_len()
146 int WPACKET_init_der(WPACKET *pkt, unsigned char *buf, size_t len) in WPACKET_init_der() argument
149 if (!ossl_assert(buf != NULL && len > 0)) in WPACKET_init_der()
152 pkt->staticbuf = buf; in WPACKET_init_der()
153 pkt->buf = NULL; in WPACKET_init_der()
160 int WPACKET_init_len(WPACKET *pkt, BUF_MEM *buf, size_t lenbytes) in WPACKET_init_len() argument
163 if (!ossl_assert(buf != NULL)) in WPACKET_init_len()
167 pkt->buf = buf; in WPACKET_init_len()
174 int WPACKET_init(WPACKET *pkt, BUF_MEM *buf) in WPACKET_init() argument
176 return WPACKET_init_len(pkt, buf, 0); in WPACKET_init()
182 pkt->buf = NULL; in WPACKET_init_null()
192 pkt->buf = NULL; in WPACKET_init_null_der()
277 unsigned char *buf = GETBUF(pkt); in wpacket_intern_close() local
279 if (buf != NULL) { in wpacket_intern_close()
282 if (!put_value(&buf[sub->packet_len], packlen, sub->lenbytes)) in wpacket_intern_close()
285 if (!put_quic_value(&buf[sub->packet_len], packlen, sub->lenbytes)) in wpacket_intern_close()
289 if (!put_value(&buf[sub->packet_len], packlen, sub->lenbytes)) in wpacket_intern_close()
510 unsigned char *buf = GETBUF(pkt); in WPACKET_get_curr() local
512 if (buf == NULL) in WPACKET_get_curr()
516 return buf + pkt->maxsize - pkt->curr; in WPACKET_get_curr()
518 return buf + pkt->curr; in WPACKET_get_curr()
523 return pkt->buf == NULL && pkt->staticbuf == NULL; in WPACKET_is_null_buf()