AXL Software

com.theorem.radserver3
Class AttributeDataType

Object
  extended byAttributeDataType

public final class AttributeDataType
extends Object

Class to guess at the data type in a given attribute. The choices will be INTEGER, OCTETS, STRING, DATE, and IPADDRESS Some attributes will have OR'd values: TUNNEL can be OR'd with any value.


Field Summary
static int ABINARY
          The attribute is probably an 'abinary', Ascend's binary filter format - 8192.
static int BYTE
          The attribute is probably a 'byte', a one byte value - 16384.
static int COMBO_IP
          The attribute is probably either an ipaddr or a v6ipaddr value - 131072.
static int DATE
          The attribute is probably a date - 8.
static int ENCRYPT1
          The attribute uses encryption type 1 -PAP encoding (can be OR'd with other values) - 64.
static int ENCRYPT2
          The attribute uses encryption type 2 - SALT encoding (can be OR'd with other values) - 128.
static int ENCRYPT3
          The attribute uses encryption type 3 - Ascend encoding (can be OR'd with other values) - 256.
static int ETHER
          The attribute is probably an 'ether' with the format of 16 octets: 'hh:hh:hh:hh:hh:hh' - 2048.
static int IFID
          The attribute is probably an 'ifid' - 8 octets in network byte order - 4096.
static int INTEGER
          The attribute is probably an integer - 1.
static int IPADDRESS
          The attribute is probably an IP Address (v4 - 16.
static int IPV6ADDRESS
          The attribute is probably an IPV6 Address - 512.
static int IPV6PREFIX
          The attribute is probably an IPV6 Prefix - 1024.
static int OCTETS
          The attribute is probably binary octets - 2.
static int SHORT
          The attribute is probably a 'short', a two byte integer value - 32768.
static int STRING
          The attribute is probably a string - 4.
static int TLV
          The attribute is probably a 'tlv' a tag/length/value value - 65536.
static int TUNNEL
          The attribute is a tunnel attribute (can be OR'd with other values) - 32.
static int UNKNOWN
          The attribute is unknown - 0.
 
Constructor Summary
AttributeDataType()
           
 
Method Summary
static void addDictionary(RADIUSDictionary dict)
          Add a dictionary to the Attribute Value class.
static int getDataType(int tag)
          Get an attribute data type based on the attribute tag.
static int getDataType(int vendorId, int tag)
          Get an attribute data type based on the attribute tag.
static String getDataTypeName(int dataType)
          Get an attribute data type based on the attribute tag.
static void main(String[] a)
           
static void setDataType(int attributeTag, int dataType)
          Set an attribute to a specific data type.
 
Methods inherited from class Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ABINARY

public static final int ABINARY
The attribute is probably an 'abinary', Ascend's binary filter format - 8192.

See Also:
Constant Field Values

BYTE

public static final int BYTE
The attribute is probably a 'byte', a one byte value - 16384.

See Also:
Constant Field Values

COMBO_IP

public static final int COMBO_IP
The attribute is probably either an ipaddr or a v6ipaddr value - 131072.

See Also:
Constant Field Values

DATE

public static final int DATE
The attribute is probably a date - 8.

See Also:
Constant Field Values

ENCRYPT1

public static final int ENCRYPT1
The attribute uses encryption type 1 -PAP encoding (can be OR'd with other values) - 64.

See Also:
Constant Field Values

ENCRYPT2

public static final int ENCRYPT2
The attribute uses encryption type 2 - SALT encoding (can be OR'd with other values) - 128.

See Also:
Constant Field Values

ENCRYPT3

public static final int ENCRYPT3
The attribute uses encryption type 3 - Ascend encoding (can be OR'd with other values) - 256.

See Also:
Constant Field Values

ETHER

public static final int ETHER
The attribute is probably an 'ether' with the format of 16 octets: 'hh:hh:hh:hh:hh:hh' - 2048.

See Also:
Constant Field Values

IFID

public static final int IFID
The attribute is probably an 'ifid' - 8 octets in network byte order - 4096.

See Also:
Constant Field Values

INTEGER

public static final int INTEGER
The attribute is probably an integer - 1.

See Also:
Constant Field Values

IPADDRESS

public static final int IPADDRESS
The attribute is probably an IP Address (v4 - 16.

See Also:
Constant Field Values

IPV6ADDRESS

public static final int IPV6ADDRESS
The attribute is probably an IPV6 Address - 512.

See Also:
Constant Field Values

IPV6PREFIX

public static final int IPV6PREFIX
The attribute is probably an IPV6 Prefix - 1024.

See Also:
Constant Field Values

OCTETS

public static final int OCTETS
The attribute is probably binary octets - 2.

See Also:
Constant Field Values

SHORT

public static final int SHORT
The attribute is probably a 'short', a two byte integer value - 32768.

See Also:
Constant Field Values

STRING

public static final int STRING
The attribute is probably a string - 4.

See Also:
Constant Field Values

TLV

public static final int TLV
The attribute is probably a 'tlv' a tag/length/value value - 65536. This make no sense in a VSA which is already a set of TLV's. Not even in Diameter.

See Also:
Constant Field Values

TUNNEL

public static final int TUNNEL
The attribute is a tunnel attribute (can be OR'd with other values) - 32.

See Also:
Constant Field Values

UNKNOWN

public static final int UNKNOWN
The attribute is unknown - 0.

See Also:
Constant Field Values
Constructor Detail

AttributeDataType

public AttributeDataType()
Method Detail

addDictionary

public static void addDictionary(RADIUSDictionary dict)
Add a dictionary to the Attribute Value class. Adding a dictionary to AV also adds it to the AttributeName class.

Parameters:
dict - Dictionary.

getDataType

public static int getDataType(int tag)
Get an attribute data type based on the attribute tag.

Parameters:
tag - Attribute type, E.g. Attribute.User_Name
Returns:
probable data type.

getDataType

public static int getDataType(int vendorId,
                              int tag)
Get an attribute data type based on the attribute tag.

Parameters:
tag - Attribute type, E.g. Attribute.User_Name
Returns:
probable data type.

getDataTypeName

public static String getDataTypeName(int dataType)
Get an attribute data type based on the attribute tag.

Parameters:
dataType - Attribute data type, e.g. the value INTEGER.
Returns:
data type.
Since:
Server 3.43a

main

public static void main(String[] a)

setDataType

public static void setDataType(int attributeTag,
                               int dataType)
Set an attribute to a specific data type. This is used to alter the table contents.

Parameters:
attributeTag - Attribute type, E.g. Attribute.User_Name.
dataType - Set to one of the data types, E.g. STRING.

AXL Software

Submit a bug report or feature request

Copyright 1998-2010 AXL Software PO Box 97, Viola, Delaware 19979, U.S.A. All Rights Reserved.