Add prototype QUIC Record Layer API design#18870
Add prototype QUIC Record Layer API design#18870hlandau wants to merge 2 commits intoopenssl:masterfrom
Conversation
|
|
||
| typedef struct ossl_quic_pkt_hdr_st { | ||
| /* [ALL] 1 if this was a long packet, 0 otherwise. Always valid. */ | ||
| unsigned int is_long :1; |
There was a problem hiding this comment.
Does any part other than the record layer care? I suspect that all other fields that are currently depending on this bit would simply have a value that fits both long and short packet headers:
- the type field could have one of the values
initial,handshake,0rtt,1rttandretry, wherertt1is the value it gets automatically for short packets - the spin bit, key phase och other similar fields could simply be zero or false when they're not valid, or could be claimed valid only when the type is or isn't
1rtt, as the case may be.
There was a problem hiding this comment.
Yeah, merging this and long_type is a good idea.
There was a problem hiding this comment.
With that change, long_type could probably just be called type
|
Somewhere in this, I would like to be able to pass a pointer to an |
| * Instantiates a new QRL. A pointer to the QRL is written | ||
| * to *qrl. Returns 1 on success or 0 on failure. | ||
| */ | ||
| int ossl_qrl_new(const OSSL_QRL_ARGS *args, OSSL_QRL **qrl); |
There was a problem hiding this comment.
This deviates quite a lot from how we usually write constructors... usually, we have them return the constructed object, or NULL on failure.
I can include this in the information provided, will do. |
| int ossl_qrl_processed_read_pending(OSSL_QRL *qrl); | ||
|
|
||
| /* | ||
| * Returns 1 if there arre any unprocessed (i.e. not yet decrypted) packets |
| /* [ALL] Number of bytes in the connection ID. Always valid. */ | ||
| uint8_t dst_conn_id_len; | ||
| uint8_t dst_conn_id[QUIC_MAX_CONN_ID_LEN]; |
| uint8_t src_conn_id_len; | ||
| uint8_t src_conn_id[QUIC_MAX_CONN_ID_LEN]; |
|
I'm starting to think that this sort of design should include the actual header file (if it's new) or changes to a header file (if it already exists). It seems a bit silly to have a lot och header file stuff in the design document when those lines are going to be duplicated into a header file anyway. (and yes, I know, I should eat my own dog food in the RX depacketizer design... coming up!) |
| * is held until the next call to ossl_qrl_write_pkt. This can be used to | ||
| * concatenate several packets into a single transmitted datagram. Every packet | ||
| * but the final packet to be written into a datagram should have the flag | ||
| * unset. packet to be written into a datagram should have the flag unset. |
There was a problem hiding this comment.
the final packet to be written
|
Superceded by #18949. |
Note: My work on the QUIC record layer RX side ended up implementing 90% of the moving parts needed for a DEMUX out of necessity, and at that point it made no sense not to factor it out into a separate piece, as it actually improves and simplifies the design. A basic DEMUX is done and will be part of the QRL RX implementation PR. Since both ultimately depend on BIO_recvmmsg, it would be helpful if people could review that PR...
This document will change as the understanding evolves during implementation but hopefully gives @levitte something to work with.