2021-03-04 16:30:38 +05:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <stdbool.h>
|
2023-10-12 14:35:06 +05:00
|
|
|
#include <stdint.h>
|
2021-03-04 16:30:38 +05:00
|
|
|
#include <sys/types.h>
|
|
|
|
|
2023-10-26 17:12:32 +05:00
|
|
|
typedef enum {UNKNOWN=0, HTTP, TLS} t_l7proto;
|
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
// common state
|
|
|
|
t_l7proto l7proto;
|
|
|
|
bool bFirstReplyChecked;
|
|
|
|
bool bTamperInCutoff;
|
|
|
|
char *hostname;
|
|
|
|
} t_ctrack;
|
|
|
|
|
|
|
|
void tamper_out(t_ctrack *ctrack, uint8_t *segment,size_t segment_buffer_size,size_t *size, size_t *split_pos);
|
|
|
|
void tamper_in(t_ctrack *ctrack, uint8_t *segment,size_t segment_buffer_size,size_t *size);
|
|
|
|
// connection reset by remote leg
|
|
|
|
void rst_in(t_ctrack *ctrack);
|
|
|
|
// local leg closed connection (timeout waiting response ?)
|
|
|
|
void hup_out(t_ctrack *ctrack);
|