Maximum size Input-Octets/Output-Octets 
    Jonathan De Graeve 
    Jonathan.De.Graeve at imelda.be
       
    Fri Sep 23 17:01:42 CEST 2005
    
    
  
Ok,
I also have another question:
Freeradius seems to use signed integers for the Acc-Input/Output-Octets
Fri Sep 23 16:59:03 2005
        Service-Type = Login-User
        User-Name = "jonathan"
        NAS-Identifier = "hotspot-2.wlan.imz.be"
        NAS-Port = 0
        NAS-Port-Type = Ethernet
        Acct-Status-Type = Alive
        Acct-Authentic = RADIUS
        Acct-Session-Id = "4bd8b325bdeafd2d"
        Acct-Terminate-Cause = User-Request
        Acct-Session-Time = 1353
        Acct-Input-Octets = 46596288
        Acct-Input-Packets = 1163323
        Acct-Input-Gigawords = 0
        Acct-Output-Octets = 2147483647
        Acct-Output-Packets = 1787355
        Acct-Output-Gigawords = 0
        Called-Station-Id = "194.8.52.38"
        Calling-Station-Id = "192.168.2.255"
        Framed-IP-Address = 192.168.2.255
        NAS-IP-Address = 194.8.52.38
        Proxy-State = 0x3836
        Client-IP-Address = 194.8.52.85
        Acct-Unique-Session-Id = "925f85fa82a0afb0"
        Timestamp = 1127487543
The source really sends unsigned 32bit. Any idea why radacct just stops
@ 2GB
I've implemented Gigawords as follows:
function gigawords($bytes) {
        /* We use BCMath functions since normal integers don't work */
        $gigawords = bcdiv( bcsub( $bytes, remainder($bytes) ) ,
4294967295);
        return $gigawords;
}
function remainder($bytes) {
        /* Calculate the remainder */
        $bytes = bcmod($bytes, 4294967295);
        return $bytes;
-- 
Jonathan De Graeve
Network/System Administrator
Imelda vzw
Informatica Dienst
015/50.52.98
jonathan.de.graeve at imelda.be
---------
Always read the manual for the correct way to do things because the
number of incorrect ways to do things is almost infinite
---------
-----Oorspronkelijk bericht-----
Van: freeradius-users-bounces at lists.freeradius.org
[mailto:freeradius-users-bounces at lists.freeradius.org] Namens Alan DeKok
Verzonden: vrijdag 23 september 2005 16:39
Aan: FreeRadius users mailing list
Onderwerp: Re: Maximum size Input-Octets/Output-Octets 
"Jonathan De Graeve" <Jonathan.De.Graeve at imelda.be> wrote:
> Is it 2^32 or (2^32 - 1)
  2^32 can't be represented in a 32-bit number.  It has 33 bits of
data...
  Alan DeKok.
- 
List info/subscribe/unsubscribe? See
http://www.freeradius.org/list/users.html
    
    
More information about the Freeradius-Users
mailing list