Terry J Fike Jr <[EMAIL PROTECTED]> wrote:
/ Okay, i'm not sure if this is the right place, to ask, but since it is /
/ more or less radius accounting i thought i'd try here.  Does anyone know /
/ the difference in the data in the columns inputoctets/outputoctets and /
/ inputoctets64/outputoctets64 and why there would always be data in the /
/ i/o columns, but not always in the i/o64 columns?/

Are those columns in the standard FreeRADIUS SQL schema?

 Alan DeKok


<>Umm...not sure, much of this was originally set up by someone else and i just copied
the sql queries into the sql.conf file from our original version (0.8.3). Here is an example of one of the queries


accounting_update_query = "INSERT into interim_updates (AcctSessionId, AcctUniqueId, UserName, NASIPAddress, NASPortId, AcctUpdateTime, AcctSessionTime, AcctAuthentic, ConnectInfo_Update, AcctInputOctets, AcctInputOctets64, AcctOutputOctets, AcctOutputOctets64, AcctTerminateCause, ServiceType, FramedProtocol, FramedIPAddress) values ('%{Acct-Session-Id}','%{Acct-Unique-Session_Id}','%{SQL-User-Name}','%{NAS-IP-Address}','%{NAS-Port-Id}',TO_DATE('%S','yyyy-mm-dd hh24:mi:ss'),'%{Acct-Session-Time}','%{Acct-Authentic}','%{Connect-Info}','%{Acct-Input-Octets}',radius.hex2dec('%{Acct_Input_Octets_64}'),'%{Acct-Output-Octets}',radius.hex2dec('%{Acct_Output_Octets_64}'),'%{Acct-Terminate-Cause}','%{Service-Type}','%{Framed-Protocol}','%{Framed-IP-Address}')"


and just in case this was an inhouse written java function, here is hex2dec from in oracle


function hex2dec (
hex_in varchar2) return NUMBER as
language java name 'Hex2Dec.getInt(java.lang.String) return int';
public class Hex2Dec {
       public static long getInt(String hex) {
               if(hex!=null && hex.startsWith("0x")) {

                       String cleanHex = hex.substring(2, hex.length());
                       return Long.parseLong(cleanHex, 16);
               } else if(hex!=null) {
                       return Long.parseLong(hex, 16);
               } else {
                       return 0;
               }
       }
}


-- Terry J Fike Jr System Administrator MTA Solutions 907-793-4100 [EMAIL PROTECTED]



- List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html

Reply via email to