39 lines
872 B
C
39 lines
872 B
C
#pragma once
|
|
|
|
#ifdef __cplusplus
|
|
extern "C"
|
|
{
|
|
#endif
|
|
#include <bits/types/struct_iovec.h>
|
|
|
|
typedef struct iovec qstring;
|
|
|
|
enum quic_message_type
|
|
{
|
|
QUIC_NEW = 0,
|
|
|
|
QUIC_VERSION,
|
|
QUIC_SNI,
|
|
QUIC_USER_AGENT,
|
|
QUIC_PAYLOAD,
|
|
|
|
QUIC_FREE,
|
|
|
|
QUIC_MSG_MAX,
|
|
};
|
|
|
|
#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);
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|