Lines Matching full:packet
27 } PACKET; typedef
30 static ossl_inline void packet_forward(PACKET *pkt, size_t len) in packet_forward()
37 * Returns the number of bytes remaining to be read in the PACKET
39 static ossl_inline size_t PACKET_remaining(const PACKET *pkt) in PACKET_remaining()
45 * Returns a pointer to the first byte after the packet data.
46 * Useful for integrating with non-PACKET parsing code.
48 * has consumed the entire packet contents.
50 static ossl_inline const unsigned char *PACKET_end(const PACKET *pkt) in PACKET_end()
56 * Returns a pointer to the PACKET's current position.
59 static ossl_inline const unsigned char *PACKET_data(const PACKET *pkt) in PACKET_data()
65 * Initialise a PACKET with |len| bytes held in |buf|. This does not make a
66 * copy of the data so |buf| must be present for the whole time that the PACKET
69 __owur static ossl_inline int PACKET_buf_init(PACKET *pkt, in PACKET_buf_init()
82 /* Initialize a PACKET to hold zero bytes. */
83 static ossl_inline void PACKET_null_init(PACKET *pkt) in PACKET_null_init()
90 * Returns 1 if the packet has length |num| and its contents equal the |num|
94 __owur static ossl_inline int PACKET_equal(const PACKET *pkt, const void *ptr, in PACKET_equal()
104 * Data is not copied: the |subpkt| packet will share its underlying buffer with
107 __owur static ossl_inline int PACKET_peek_sub_packet(const PACKET *pkt, in PACKET_peek_sub_packet()
108 PACKET *subpkt, size_t len) in PACKET_peek_sub_packet()
118 * copied: the |subpkt| packet will share its underlying buffer with the
121 __owur static ossl_inline int PACKET_get_sub_packet(PACKET *pkt, in PACKET_get_sub_packet()
122 PACKET *subpkt, size_t len) in PACKET_get_sub_packet()
136 __owur static ossl_inline int PACKET_peek_net_2(const PACKET *pkt, in PACKET_peek_net_2()
150 __owur static ossl_inline int PACKET_get_net_2(PACKET *pkt, unsigned int *data) in PACKET_get_net_2()
161 __owur static ossl_inline int PACKET_get_net_2_len(PACKET *pkt, size_t *data) in PACKET_get_net_2_len()
176 __owur static ossl_inline int PACKET_peek_net_3(const PACKET *pkt, in PACKET_peek_net_3()
191 __owur static ossl_inline int PACKET_get_net_3(PACKET *pkt, unsigned long *data) in PACKET_get_net_3()
202 __owur static ossl_inline int PACKET_get_net_3_len(PACKET *pkt, size_t *data) in PACKET_get_net_3_len()
217 __owur static ossl_inline int PACKET_peek_net_4(const PACKET *pkt, in PACKET_peek_net_4()
235 __owur static ossl_inline int PACKET_peek_net_8(const PACKET *pkt, in PACKET_peek_net_8()
255 __owur static ossl_inline int PACKET_get_net_4(PACKET *pkt, unsigned long *data) in PACKET_get_net_4()
266 __owur static ossl_inline int PACKET_get_net_4_len(PACKET *pkt, size_t *data) in PACKET_get_net_4_len()
278 __owur static ossl_inline int PACKET_get_net_8(PACKET *pkt, uint64_t *data) in PACKET_get_net_8()
289 __owur static ossl_inline int PACKET_peek_1(const PACKET *pkt, in PACKET_peek_1()
301 __owur static ossl_inline int PACKET_get_1(PACKET *pkt, unsigned int *data) in PACKET_get_1()
312 __owur static ossl_inline int PACKET_get_1_len(PACKET *pkt, size_t *data) in PACKET_get_1_len()
327 __owur static ossl_inline int PACKET_peek_4(const PACKET *pkt, in PACKET_peek_4()
346 __owur static ossl_inline int PACKET_get_4(PACKET *pkt, unsigned long *data) in PACKET_get_4()
362 __owur static ossl_inline int PACKET_peek_bytes(const PACKET *pkt, in PACKET_peek_bytes()
380 __owur static ossl_inline int PACKET_get_bytes(PACKET *pkt, in PACKET_get_bytes()
393 __owur static ossl_inline int PACKET_peek_copy_bytes(const PACKET *pkt, in PACKET_peek_copy_bytes()
409 __owur static ossl_inline int PACKET_copy_bytes(PACKET *pkt, in PACKET_copy_bytes()
421 * Copy packet data to |dest|, and set |len| to the number of copied bytes.
422 * If the packet has more than |dest_len| bytes, nothing is copied.
423 * Returns 1 if the packet data fits in |dest_len| bytes, 0 otherwise.
424 * Does not forward PACKET position (because it is typically the last thing
425 * done with a given PACKET).
427 __owur static ossl_inline int PACKET_copy_all(const PACKET *pkt, in PACKET_copy_all()
444 * If the packet is empty, or malloc fails, |*data| will be set to NULL.
446 * Does not forward PACKET position (because it is typically the last thing
447 * done with a given PACKET).
449 __owur static ossl_inline int PACKET_memdup(const PACKET *pkt, in PACKET_memdup()
478 * Does not forward PACKET position (because it is typically the last thing done
479 * with a given PACKET).
481 __owur static ossl_inline int PACKET_strndup(const PACKET *pkt, char **data) in PACKET_strndup()
485 /* This will succeed on an empty packet, unless pkt->curr == NULL. */ in PACKET_strndup()
491 static ossl_inline int PACKET_contains_zero_byte(const PACKET *pkt) in PACKET_contains_zero_byte()
497 __owur static ossl_inline int PACKET_forward(PACKET *pkt, size_t len) in PACKET_forward()
510 * Data is not copied: the |subpkt| packet will share its underlying buffer with
514 __owur static ossl_inline int PACKET_get_length_prefixed_1(PACKET *pkt, in PACKET_get_length_prefixed_1()
515 PACKET *subpkt) in PACKET_get_length_prefixed_1()
519 PACKET tmp = *pkt; in PACKET_get_length_prefixed_1()
536 __owur static ossl_inline int PACKET_as_length_prefixed_1(PACKET *pkt, in PACKET_as_length_prefixed_1()
537 PACKET *subpkt) in PACKET_as_length_prefixed_1()
541 PACKET tmp = *pkt; in PACKET_as_length_prefixed_1()
558 * Data is not copied: the |subpkt| packet will share its underlying buffer with
562 __owur static ossl_inline int PACKET_get_length_prefixed_2(PACKET *pkt, in PACKET_get_length_prefixed_2()
563 PACKET *subpkt) in PACKET_get_length_prefixed_2()
567 PACKET tmp = *pkt; in PACKET_get_length_prefixed_2()
585 __owur static ossl_inline int PACKET_as_length_prefixed_2(PACKET *pkt, in PACKET_as_length_prefixed_2()
586 PACKET *subpkt) in PACKET_as_length_prefixed_2()
590 PACKET tmp = *pkt; in PACKET_as_length_prefixed_2()
608 * Data is not copied: the |subpkt| packet will share its underlying buffer with
612 __owur static ossl_inline int PACKET_get_length_prefixed_3(PACKET *pkt, in PACKET_get_length_prefixed_3()
613 PACKET *subpkt) in PACKET_get_length_prefixed_3()
617 PACKET tmp = *pkt; in PACKET_get_length_prefixed_3()
646 /* Number of bytes written to the buf prior to this packet starting */
649 /* Flags for this sub-packet */
690 * i.e. this does not write out a zero packet length
738 * Set the flags to be applied to the current sub-packet
743 * Closes the most recent sub-packet. It also writes out the length of the
744 * packet to the required location (normally the start of the WPACKET) if
760 * data is added to the WPACKET). This function fails if a sub-packet is of 0
766 * Initialise a new sub-packet. Additionally |lenbytes| of data is preallocated
767 * at the start of the sub-packet to store its length once we know it. Don't
787 * for the sub-packet length.
803 * The same as WPACKET_allocate_bytes() except additionally a new sub-packet is
805 * number of length bytes for the sub-packet is in |lenbytes|. Don't call this
920 * Returns the length of the current sub-packet. This excludes any bytes