REORG: quic: Move qc_pkt_long() to quic_rx.h

This inlined function takes a quic_rx_packet struct as argument unique argument.
Let's move it to QUIC RX part.
This commit is contained in:
Frédéric Lécaille 2023-11-27 18:00:25 +01:00
parent 0b872e24cd
commit d7a5fa24dc
2 changed files with 6 additions and 6 deletions

View File

@ -147,12 +147,6 @@ static inline void quic_connection_id_to_frm_cpy(struct quic_frame *dst,
ncid_frm->stateless_reset_token = src->stateless_reset_token;
}
/* Return 1 if <pkt> header form is long, 0 if not. */
static inline int qc_pkt_long(const struct quic_rx_packet *pkt)
{
return pkt->type != QUIC_PACKET_TYPE_SHORT;
}
void chunk_frm_appendf(struct buffer *buf, const struct quic_frame *frm);
void quic_set_connection_close(struct quic_conn *qc, const struct quic_err err);

View File

@ -50,4 +50,10 @@ static inline void quic_rx_packet_refdec(struct quic_rx_packet *pkt)
pkt->refcnt--;
}
/* Return 1 if <pkt> header form is long, 0 if not. */
static inline int qc_pkt_long(const struct quic_rx_packet *pkt)
{
return pkt->type != QUIC_PACKET_TYPE_SHORT;
}
#endif /* _HAPROXY_QUIC_RX_H */