mirror of https://github.com/F-Stack/f-stack.git
Add an API ff_get_traffic to get traffic for QoS or other.
This commit is contained in:
parent
19b67af558
commit
81b0219b09
|
@ -153,6 +153,12 @@ extern int ff_fdisused(int fd);
|
|||
|
||||
extern int ff_getmaxfd(void);
|
||||
|
||||
/*
|
||||
* Get traffic for QoS or other via API.
|
||||
* The size of buffer must >= siezof(struct ff_traffic_args), now is 32 bytes.
|
||||
*/
|
||||
void ff_get_traffic(void *buffer);
|
||||
|
||||
/* route api begin */
|
||||
enum FF_ROUTE_CTL {
|
||||
FF_ROUTE_ADD,
|
||||
|
|
|
@ -57,3 +57,4 @@ ff_mbuf_set_vlan_info
|
|||
ff_zc_mbuf_get
|
||||
ff_zc_mbuf_write
|
||||
ff_zc_mbuf_read
|
||||
ff_get_traffic
|
||||
|
|
|
@ -1687,6 +1687,11 @@ handle_traffic_msg(struct ff_msg *msg)
|
|||
msg->result = 0;
|
||||
}
|
||||
|
||||
void ff_get_traffic(void *buffer)
|
||||
{
|
||||
*(struct ff_traffic_args *)buffer = ff_traffic;
|
||||
}
|
||||
|
||||
#ifdef FF_KNI
|
||||
static inline void
|
||||
handle_knictl_msg(struct ff_msg *msg)
|
||||
|
|
Loading…
Reference in New Issue