The function ba_get_flow_stats() is passed the following arguments:
|
interface |
Pointer to a character string that contains the name of the managed interface. For example, le0, hme0. To specify the direction for which you want class information, append _in or _out to the interface name. If you do not specify the direction, it is assumed to be _out. |
|
classname |
Pointer to a character string that contains the class name. |
|
flow_stats |
Pointer to a structure of type ba_flow_stats_t. This is the buffer into which statistics for the flows are written. |
Structures of type ba_flow_stats_t are defined as follows:
typedef struct {
ba_name_t interface; /* name and direction of the interface */
ba_name_t classname; /* name of the class */
struct in_addrip_local; /* local IP address */
struct in_addrip_remote; /* remote IP address */
uchar_t protocol; /* protocol */
ushort_t port_local; /* localport number */
ushort_t port_remote; /* remoteport number */
uchar_t tos_sent; /* TOS value */
uint_t npackets; /* number of incoming packets */
uint_t nbytes /* number of incoming bytes */
union {
uchar_t *url;
u_longlong_t url_pad;
} url_union;
hrtime_t firstseen /* timestamp of first packet sent */
hrtime_t lastseen /* timestamp of last packet sent */
} ba_flow_stats_t;
#define ba_flow_url url_union.url