User's Manual

488 | Reference Dell Networking W-ClearPass Guest 6.4 | User Guide
l return GetUserTraffic($now - 86400*30, $now, 'out') > 100*1024*1024 && AccessReject()
l Limit by MAC address, 50 MB download in past 24 hours:
return GetCallingStationTraffic(86400, 'out') > 50000000 && AccessReject()
GetCurrentSession()
GetCurrentSession($criteria)
Looks up the details for an active session, based on the specified criteria.
This is a multi-purpose function that has a very flexible query interface. For ease of use, consider using one of the
related functions "GetCallingStationCurrentSession()" on page 486, "GetIpAddressCurrentSession()" on page 488, or
"GetUserCurrentSession()" on page 491.
Returns null if there is no matching session, otherwise returns a single session array – a typical result follows:
array (
'id' => '2073',
'acctsessionid' => '4a762dbf00000002',
'acctuniqueid' => 'c199b5a94ebf5184',
'username' => 'demo@example.com',
'realm' => '',
'role_name' => 'Guest',
'nasipaddress' => '192.168.2.20',
'nasportid' => '',
'nasporttype' => '',
'calledstationid' => '',
'callingstationid' => '',
'acctstarttime' => '1249258943',
'connectinfo_start' => '',
'acctstoptime' => NULL,
'connectinfo_stop' => NULL,
'acctsessiontime' => 0,
'acctinputoctets' => 0,
'acctoutputoctets' => 0,
'acctterminatecause' => NULL,
'servicetype' => '',
'framedipaddress' => '192.168.2.3',
'framedprotocol' => '',
'acctauthentic' => '',
'nastype' => 'cisco_3576',
'nas_name' => 'centos',
'total_traffic' => 0,
'state' => 'stale',
'traffic_input' => 0,
'traffic_output' => 0,
'traffic_usage' => 0,
'session_time' => 29641260,
)
GetIpAddressCurrentSession()
GetIpAddressCurrentSession($ip_addr = null)
Looks up the current (most recent) active session for the specified client IP address. If ip_addr is not specified,
it defaults to the current value of $smarty.server.REMOTE_ADDR, which may not be the same value as the IP
address of the session if there is a NAT.
See "GetCurrentSession()" on page 488 for details of the return value.
GetIpAddressSessions()
GetIpAddressSessions($ip_addr, $from_time = null, $to_time = null)