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
tango-tfe/plugin/business/tsg-http/include/tsg_proxy_logger.h

41 lines
890 B
C
Raw Normal View History

2018-09-09 15:21:26 +08:00
#pragma once
#include <tfe_stream.h>
#include <tfe_http.h>
2023-03-30 19:39:18 +08:00
struct log_rule_t
{
long long config_id;
int service_id;
unsigned char do_log;
unsigned char do_blacklist;
unsigned char action;
char *srv_def_large;
int vsys_id;
2023-03-30 19:39:18 +08:00
};
2018-09-09 15:21:26 +08:00
struct proxy_log
2018-09-09 15:21:26 +08:00
{
const struct tfe_stream *stream;
const struct tfe_http_session* http;
2023-03-30 19:39:18 +08:00
const struct log_rule_t *result;
size_t result_num;
2018-12-24 22:47:26 +06:00
struct evbuffer* req_body, *resp_body;
unsigned char action;
size_t inject_sz;
char *asn_client;
char *asn_server;
char *location_client;
char *location_server;
size_t c2s_byte_num;
size_t s2c_byte_num;
2018-09-09 15:21:26 +08:00
};
struct proxy_logger;
struct proxy_logger* proxy_log_handle_create(const char* profile, const char* section, void* local_logger);
2018-09-14 16:33:36 +08:00
2018-09-09 15:21:26 +08:00
//return 0 if SUCCESS, otherwise return -1
int proxy_send_log(struct proxy_logger* handle, const struct proxy_log* log_msg);
2018-09-14 11:42:22 +08:00
2018-09-09 15:21:26 +08:00