qcacmn: Add APIs to get data packets info

Add APIs to get TCP fin/fin-ack/rst packets information.

Change-Id: Ia1150c81076fa47ae7f34d14bc73efc82003258a
CRs-Fixed: 3046235
This commit is contained in:
Vulupala Shashank Reddy
2021-09-13 11:01:44 +05:30
committed by Madan Koyyalamudi
parent ef5ccaa3e1
commit 2da40899eb
3 changed files with 113 additions and 0 deletions

View File

@@ -3011,6 +3011,32 @@ bool qdf_nbuf_data_is_dns_response(qdf_nbuf_t buf)
return __qdf_nbuf_data_is_dns_response(qdf_nbuf_data(buf));
}
/**
* qdf_nbuf_data_is_tcp_fin() - check if skb data is a tcp fin
* @buf: buffer
*
* Return: true if packet is tcp fin packet.
* false otherwise.
*/
static inline
bool qdf_nbuf_data_is_tcp_fin(qdf_nbuf_t buf)
{
return __qdf_nbuf_data_is_tcp_fin(qdf_nbuf_data(buf));
}
/**
* qdf_nbuf_data_is_tcp_fin_ack() - check if skb data is a tcp fin ack
* @buf: buffer
*
* Return: true if packet is tcp fin ack packet.
* false otherwise.
*/
static inline
bool qdf_nbuf_data_is_tcp_fin_ack(qdf_nbuf_t buf)
{
return __qdf_nbuf_data_is_tcp_fin_ack(qdf_nbuf_data(buf));
}
/**
* qdf_nbuf_data_is_tcp_syn() - check if skb data is a tcp syn
* @buf: buffer
@@ -3037,6 +3063,19 @@ bool qdf_nbuf_data_is_tcp_syn_ack(qdf_nbuf_t buf)
return __qdf_nbuf_data_is_tcp_syn_ack(qdf_nbuf_data(buf));
}
/**
* qdf_nbuf_data_is_tcp_rst() - check if skb data is a tcp rst
* @buf: buffer
*
* Return: true if packet is tcp rst packet.
* false otherwise.
*/
static inline
bool qdf_nbuf_data_is_tcp_rst(qdf_nbuf_t buf)
{
return __qdf_nbuf_data_is_tcp_rst(qdf_nbuf_data(buf));
}
/**
* qdf_nbuf_data_is_tcp_ack() - check if skb data is a tcp ack
* @buf: buffer