Commit d9c9c623 authored by Brian's avatar Brian Committed by Sevan Janiyan
Browse files

export input_packets and output_packets for scripts to use (#285)

parent 6e7d4939
......@@ -820,6 +820,8 @@ int runscript(struct app_conn_t *appconn, char* script,
set_env("COOVACHILLI_MAX_TOTAL_OCTETS", VAL_ULONG64, &appconn->s_params.maxtotaloctets, 0);
set_env("INPUT_OCTETS", VAL_ULONG64, &appconn->s_state.input_octets, 0);
set_env("OUTPUT_OCTETS", VAL_ULONG64, &appconn->s_state.output_octets, 0);
set_env("INPUT_PACKETS", VAL_ULONG64, &appconn->s_state.input_packets, 0);
set_env("OUTPUT_PACKETS", VAL_ULONG64, &appconn->s_state.output_packets, 0);
sessiontime = mainclock_diffu(appconn->s_state.start_time);
set_env("SESSION_TIME", VAL_ULONG, &sessiontime, 0);
sessiontime = mainclock_diffu(appconn->s_state.last_up_time);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment