This repository has been archived on 2025-09-14. You can view files and clone it, but cannot push or open issues or pull requests.
Files
mesa-platform-quic/include/quic.h

39 lines
872 B
C
Raw Normal View History

2024-06-07 19:03:56 +08:00
#pragma once
#ifdef __cplusplus
extern "C"
{
2024-06-07 19:03:56 +08:00
#endif
#include <bits/types/struct_iovec.h>
typedef struct iovec qstring;
2024-06-07 19:03:56 +08:00
enum quic_message_type
{
2024-06-07 19:03:56 +08:00
QUIC_NEW = 0,
QUIC_VERSION,
QUIC_SNI,
QUIC_USER_AGENT,
QUIC_PAYLOAD,
QUIC_FREE,
QUIC_MSG_MAX,
};
2024-06-07 19:03:56 +08:00
#define QUIC_DECODER_TOPIC "QUIC_DECODER_MESSAGE"
struct quic_message;
enum quic_message_type quic_message_type_get(const struct quic_message *msg);
void quic_message_get_version(const struct quic_message *msg, unsigned int *result);
void quic_message_get_sni(const struct quic_message *msg, struct iovec *result);
void quic_message_get_user_agent(const struct quic_message *msg, struct iovec *result);
void quic_message_get_payload(const struct quic_message *msg, struct iovec *result);
int quic_version_int2string(unsigned int version, char *buff, int buff_len);
2024-06-07 19:03:56 +08:00
#ifdef __cplusplus
}
#endif