rename flow_direction to flow_type
This commit is contained in:
@@ -110,8 +110,8 @@ int http_message_type_is_req(struct session *sess, enum http_message_type msg_ty
|
||||
case HTTP_TRANSACTION_START:
|
||||
case HTTP_TRANSACTION_END:
|
||||
{
|
||||
enum flow_direction cur_dir = session_get_current_flow_direction(sess);
|
||||
if (FLOW_DIRECTION_C2S == cur_dir)
|
||||
enum flow_type cur_dir = session_get_flow_type(sess);
|
||||
if (FLOW_TYPE_C2S == cur_dir)
|
||||
{
|
||||
is_req_msg = 1;
|
||||
}
|
||||
@@ -233,9 +233,9 @@ int httpd_url_is_encoded(const char *url, size_t len)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void httpd_set_tcp_addr(const struct tcphdr *tcph, struct httpd_session_addr *addr, enum flow_direction fdir)
|
||||
static void httpd_set_tcp_addr(const struct tcphdr *tcph, struct httpd_session_addr *addr, enum flow_type fdir)
|
||||
{
|
||||
if (FLOW_DIRECTION_C2S == fdir)
|
||||
if (FLOW_TYPE_C2S == fdir)
|
||||
{
|
||||
addr->sport = tcph->th_sport;
|
||||
addr->dport = tcph->th_dport;
|
||||
@@ -246,10 +246,10 @@ static void httpd_set_tcp_addr(const struct tcphdr *tcph, struct httpd_session_a
|
||||
addr->dport = tcph->th_sport;
|
||||
}
|
||||
}
|
||||
static void httpd_set_ipv4_addr(const struct ip *ip4h, struct httpd_session_addr *addr, enum flow_direction fdir)
|
||||
static void httpd_set_ipv4_addr(const struct ip *ip4h, struct httpd_session_addr *addr, enum flow_type fdir)
|
||||
{
|
||||
addr->ipver = 4;
|
||||
if (FLOW_DIRECTION_C2S == fdir)
|
||||
if (FLOW_TYPE_C2S == fdir)
|
||||
{
|
||||
addr->saddr4 = ip4h->ip_src.s_addr;
|
||||
addr->daddr4 = ip4h->ip_dst.s_addr;
|
||||
@@ -260,10 +260,10 @@ static void httpd_set_ipv4_addr(const struct ip *ip4h, struct httpd_session_addr
|
||||
addr->daddr4 = ip4h->ip_src.s_addr;
|
||||
}
|
||||
}
|
||||
static void httpd_set_ipv6_addr(const struct ip6_hdr *ip6h, struct httpd_session_addr *addr, enum flow_direction fdir)
|
||||
static void httpd_set_ipv6_addr(const struct ip6_hdr *ip6h, struct httpd_session_addr *addr, enum flow_type fdir)
|
||||
{
|
||||
addr->ipver = 6;
|
||||
if (FLOW_DIRECTION_C2S == fdir)
|
||||
if (FLOW_TYPE_C2S == fdir)
|
||||
{
|
||||
memcpy(&addr->saddr6, &ip6h->ip6_src, sizeof(struct in6_addr));
|
||||
memcpy(&addr->daddr6, &ip6h->ip6_dst, sizeof(struct in6_addr));
|
||||
@@ -281,7 +281,7 @@ void httpd_session_get_addr(const struct session *sess, struct httpd_session_add
|
||||
{
|
||||
return;
|
||||
}
|
||||
enum flow_direction fdir = session_get_current_flow_direction(sess);
|
||||
enum flow_type fdir = session_get_flow_type(sess);
|
||||
const struct packet *raw_pkt = session_get_first_packet(sess, fdir);
|
||||
if (NULL == raw_pkt)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user