AXL RADIUS Server API V3

com.theorem.radserver3.dictionary
Class RADIUSDictionary

Object
  extended byRADIUSDictionary
Direct Known Subclasses:
DefaultDictionary, FreeRadius, LocalDictionary, ParseAttribute

public class RADIUSDictionary
extends Object

Class to read RADIUS dictionary files.

This is not to be used directly. It does not know how to parse the various RADIUS dictionary files. Please use one of the subclasses or subclass it yourself if you need to build your own dictionary.

Note that the setVendorId(int vendorId) can change how the default attributes and value are displayed.

Some examples are found in DictionaryExamples.java.

Since:
3.32

Field Summary
static int DATE
          The attribute is probably time - 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 proprietary encoding (can be OR'd with other values) - 256.
static int INTEGER
          The attribute is probably an integer - 1.
static int IPADDRESS
          The attribute is probably an IP Address (v4 or V6) - 16.
static boolean LONG_TAGS
          Vendor tag size format is long tags (16 bit) - true.
static int OCTETS
          The attribute is probably binary octets - 2.
static boolean SHORT_TAGS
          Vendor tag size format is short tags (8 bit) - false.
static int STRING
          The attribute is probably a printable string - 4.
static int TUNNEL
          The attribute is a tunnel attribute (can be OR'd with other values) - 32.
static int UNKNOWN
          The attribute type is unknown - 0.
static int UNKNOWN_DATA_TYPE
          No data type can be found - -1.
static int UNKNOWN_VENDOR
          No vendor name can be found - -1.
 
Constructor Summary
RADIUSDictionary()
          Dictionary constructor.
RADIUSDictionary(String sourceName)
          Dictionary constructor.
 
Method Summary
 void addAttribute(String name, int tag, int type)
          Add an attribute to the dictionary.
 void addAttribute(String name, int tag, int type, int vendorId)
          Add an attribute to the dictionary.
 void addAttribute(String name, int tag, int type, int vendorId, boolean isTunnel)
          Add an attribute to the dictionary.
 void addAttribute(String name, String tag, String type, String vendorId)
          Add an attribute to the dictionary.
 void addAttribute(String name, String tag, String type, String vendorId, boolean isTunnel)
          Add an attribute to the dictionary.
 void addVendor(String name, int vendorNumber)
          Add a vendor name number.
 Iterator attributeIterator()
          Get a list of Vendor-Specific sub-attributes.
 Iterator attributeIterator(int vendorId)
          Get a list of Vendor-Specific sub-attributes.
 Attribute createAttribute(int vendorId, String name, byte[] value)
          Create an attribute for a vendor with the given byte array value.
 Attribute createAttribute(int vendorId, String attrName, String stringValue)
          Create an attribute for a vendor with the given integer value.
 Attribute createAttribute(String name, byte[] value)
          Create an attribute for a vendor with the given byte array value.
 Attribute createAttribute(String attrName, String stringValue)
          Create an attribute with the given integer value.
 String[] getAllValueNames(int vendorId, String vendorAttributeName)
          Get a list of all named values for an attribute.
 String[] getAllValueNames(String attributeName)
          Get a list of all named values for an attribute.
 int getDataType(int attribute)
          Get the data type for this attribute.
 int getDataType(int vendorId, int attribute)
          Get the data type for this attribute.
 int getDataTypeFlags(int attributeTag)
          Get the flags associated with the attribute, if any.
 int getDataTypeFlags(int vendorId, int attributeTag)
          Get the flags associated with the attribute, if any.
 String getDataTypeName(int dataType)
          Get the data type's name.
 int getEncryptionType(int attributeTag)
          Get the encryption type for this attribute.
 int getEncryptionType(int vendorId, int attributeTag)
          Get the encryption type for this attribute.
 int getIntValue(int vendorId, int tag, String valueName)
          Given the vendor number, attribute tag and value name return the value's integer equivalent.
 int getIntValue(int attribute, String valueName)
          Given the value number from the dictionary VALUE name.
 String getName(int attributeTag)
          Given the tag number of an attribute return it's name.
 String getName(int vendorId, int attributeTag)
          Given the tag number of an attribute return it's name.
 int getTag(int vendorId, String name)
          Given the name of the attribute return it's tag value.
 int getTag(String name)
          Given the name of the attribute return it's tag value.
 String getValueName(int attribute, int value)
          Given the attribute number get the name of the particular attribute's integer value field return the name of that integer value.
 String getValueName(int vendorId, int attribute, int value)
          Given the attribute number get the name of the particular attribute's integer value field return the name of that integer value.
 int getVendorId()
          Get the default vendorId.
 int getVendorId(String vendorName)
          Get the vendor number from the name.
 String getVendorName(int vendorId)
          Get a vendor name from a vendor id number.
 String[] getVendorNames()
          Return an array of Vendor names
 boolean getVendorTagLength()
          Get the vendor tag size format - either long or short tags.
 boolean getVendorTagLength(int vendorId)
          Get the vendor tag size format - either long or short tags.
 boolean hasValue(int attributeTag)
          Determine if there are known constants (symbolic names) for this attribute.
 boolean hasValue(int vendorId, int attributeTag)
          Determine if there are known constants (symbolic names) for this VSA sub-attribute.
 boolean hasValue(String attrName)
          Determine if there are known constants (symbolic names) for this attribute.
 boolean isTunnel(int attribute)
          Determine if this attribute is a tunnel attribute.
 boolean isTunnel(int vendorId, int attribute)
          Determine if this attribute is a tunnel attribute.
 boolean isVSA(int attribute)
          Determine if this attribute is a Vendor-Specific attribute (VSA).
 boolean isVSA(String attributeName)
          Determine if this attribute is a Vendor-Specific attribute (VSA).
 void merge(RADIUSDictionary dict)
          Merge another dictionary with this one.
 void read()
          Read the dictionary file.
 void setEncryptionType(int attributeTag, int encType)
          Set the encryption type for this attribute.
 void setEncryptionType(int vendorId, int attributeTag, int encType)
          Set the encryption type for this attribute.
 void setSymbolicIntValue(int vendorId, String attributeName, String symbolicName, int value)
          Set a symbolic attribute value for and attribute.
 void setSymbolicIntValue(String attributeName, String symbolicName, int value)
          Set a symbolic attribute value for and attribute.
 void setTunnel(int attribute)
          Set the tunnel flag for this attribute.
 void setTunnel(int vendorId, int attribute)
          Set the tunnel flag for this attribute.
 void setVendorId(int vendorId)
          Override the Vendor Id for all non-vendor Id lookups.
 void setVendorTagLength(boolean longOrShort)
          Set the vendor tag size format - either long or short tags.
 void setVendorTagLength(int vendorId, boolean longOrShort)
          Set the vendor tag size format - either long or short tags.
 String toString()
          String version of this class.
 String toVerboseString()
          Produce a vebose string of vendors and all attributes and values.
 
Methods inherited from class Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

DATE

public static final int DATE
The attribute is probably time - 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 proprietary encoding (can be OR'd with other values) - 256.

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 or V6) - 16.

See Also:
Constant Field Values

LONG_TAGS

public static final boolean LONG_TAGS
Vendor tag size format is long tags (16 bit) - true.

See Also:
Constant Field Values

OCTETS

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

See Also:
Constant Field Values

SHORT_TAGS

public static final boolean SHORT_TAGS
Vendor tag size format is short tags (8 bit) - false.

See Also:
Constant Field Values

STRING

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

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 type is unknown - 0.

See Also:
Constant Field Values

UNKNOWN_DATA_TYPE

public static final int UNKNOWN_DATA_TYPE
No data type can be found - -1.

See Also:
Constant Field Values

UNKNOWN_VENDOR

public static final int UNKNOWN_VENDOR
No vendor name can be found - -1.

See Also:
Constant Field Values
Constructor Detail

RADIUSDictionary

public RADIUSDictionary()
Dictionary constructor.

Since:
Server 3.43

RADIUSDictionary

public RADIUSDictionary(String sourceName)
Dictionary constructor.

Parameters:
sourceName - Source of the dictionary (usually a file).
Method Detail

addAttribute

public void addAttribute(String name,
                         int tag,
                         int type)
Add an attribute to the dictionary.

Parameters:
name - Attribute tag name like "Message_Authenticator".
tag - Attributes value like 80. Tags larger than 255 may be used for internal purposes. No packet attribute will have a value larger than 255.
type - Attribute type, like RADIUSDictionary.OCTETS.
Since:
Server 3.43

addAttribute

public void addAttribute(String name,
                         int tag,
                         int type,
                         int vendorId)
Add an attribute to the dictionary.

Parameters:
name - Attribute tag name like "Message_Authenticator".
tag - Attributes value like 80. Tags larger than 255 may be used for internal purposes. No packet attribute will have a value larger than 255.
type - Attribute type, like RADIUSDictionary.OCTETS.
vendorId - Vendor identifier number or 0 for standard attributes that do not have a vendor.
Since:
Server 3.43

addAttribute

public void addAttribute(String name,
                         int tag,
                         int type,
                         int vendorId,
                         boolean isTunnel)
Add an attribute to the dictionary.

Parameters:
name - Attribute tag name like "Message_Authenticator".
tag - Attributes value like 80. Tags larger than 255 may be used for internal purposes. No packet attribute will have a value larger than 255.
type - Attribute type, like RADIUSDictionary.OCTETS.
vendorId - Vendor identifier number or 0 for standard attributes that do not have a vendor.
isTunnel - Set to true if this is a tunnel attribute.
Since:
Server 3.43

addAttribute

public void addAttribute(String name,
                         String tag,
                         String type,
                         String vendorId)
                  throws IOException
Add an attribute to the dictionary.

Parameters:
name - Attribute tag name like "Message_Authenticator".
tag - Attributes value like "80". Tags larger than 255 may be used for internal purposes. No packet attribute will have a value larger than 255.
type - Attribute type, like "OCTETS".
vendorId - Vendor identifier number or "0" for standard attributes that do not have a vendor.
Throws:
IOException - if there's a problem decoding the string values.
Since:
Server 3.43

addAttribute

public void addAttribute(String name,
                         String tag,
                         String type,
                         String vendorId,
                         boolean isTunnel)
                  throws IOException
Add an attribute to the dictionary.

Parameters:
name - Attribute tag name like "Message_Authenticator".
tag - Attributes value like "80". Tags larger than 255 may be used for internal purposes. No packet attribute will have a value larger than 255.
type - Attribute type, like "OCTETS".
vendorId - Vendor identifier number or "0" for standard attributes that do not have a vendor.
isTunnel - Set to true if this is a tunnel attribute.
Throws:
IOException - if there's a problem decoding the string values.
Since:
Server 3.43

addVendor

public void addVendor(String name,
                      int vendorNumber)
Add a vendor name number.

Parameters:
name - Vendor name.
vendorNumber - Vendor number.

attributeIterator

public Iterator attributeIterator()
Get a list of Vendor-Specific sub-attributes. Each iterator's next() method returns the name of an attribute as a string.

Returns:
the Iterator.

attributeIterator

public Iterator attributeIterator(int vendorId)
Get a list of Vendor-Specific sub-attributes. Each iterator's next() method returns the name of an attribute as a string.

Parameters:
vendorId - Vendor Id.
Returns:
the Iterator.

createAttribute

public Attribute createAttribute(int vendorId,
                                 String name,
                                 byte[] value)
Create an attribute for a vendor with the given byte array value.

Parameters:
vendorId - Vendor Id number
name - Attribute name.
value - Attribute value
Returns:
Attribute or null if the name / value do not exist for that particular vendor. The resulting attribute is suitable for adding to a VendorSpecific object and may be either an Attribute or LTAttribute (long tag attribute).

createAttribute

public Attribute createAttribute(int vendorId,
                                 String attrName,
                                 String stringValue)
Create an attribute for a vendor with the given integer value. E.g.createAttribute(456, "Framed-Compression", "IPX-Header-Compression") creates the same result as new Attribute(Attribute.Framed_Compression, 2);

Parameters:
vendorId - Vendor Id number.
attrName - Attribute name.
stringValue - Attribute value
Returns:
Attribute or null if the name / value do not exist for that particular vendor. The resulting attribute is suitable for adding to a VendorSpecific object.

createAttribute

public Attribute createAttribute(String name,
                                 byte[] value)
Create an attribute for a vendor with the given byte array value.

Parameters:
name - Attribute name.
value - Attribute value
Returns:
Attribute or null if the name / value does not exist.
See Also:
setVendorId(int vendorId)

createAttribute

public Attribute createAttribute(String attrName,
                                 String stringValue)
Create an attribute with the given integer value. E.g.createAttribute("Framed-Compression", "IPX-Header-Compression") creates the same result as new Attribute(Attribute.Framed_Compression, 2);

Parameters:
attrName - Attribute name. This cannot be a vendor specific attribute.
stringValue - Attribute value
Returns:
Attribute or null if the name / value do not exist.
See Also:
setVendorId(int vendorId)

getAllValueNames

public String[] getAllValueNames(int vendorId,
                                 String vendorAttributeName)
Get a list of all named values for an attribute. For example this would list value names as in this example: For the vendor Alcatel the attribute AAT-Source-IP-Check has two values:
Source-IP-Check-No 0
Source-IP-Check-Yes 1
For the Alcatel vendor for the names associated with the vendor attribute 'AAT-Source-IP-Check' would return the array of strings "Source-IP-Check-No", "Source-IP-Check-Yes".

Parameters:
vendorId - The vendorId.
vendorAttributeName - Vendor attribute name.
Returns:
String array of attribute value names. If there are no value names an empty array is returned.
Since:
3.42

getAllValueNames

public String[] getAllValueNames(String attributeName)
Get a list of all named values for an attribute. For example this would list value names as in this example: For the standard RADIUS attribute 'Termination-Action' has two values:
Default 0
RADIUS-Request 1
The names associated with 'Termination-Action' would return the array of strings "Default", "RADIUS-Request".

Parameters:
attributeName - Attribute name, for example 'Acct-Status-Type'.
Returns:
String array of attribute value names. If there are no value names an empty array is returned.
Since:
3.42

getDataType

public int getDataType(int attribute)
Get the data type for this attribute.

Parameters:
attribute - Attribute tag
Returns:
The data type. One of UNKNOWN, INTEGER, OCTETS, STRING, DATE, IPADDRESS, TUNNEL, ENCRYPT1, ENCRYPT2.

Note that TUNNEL may be OR'd with any other type. Tunnel attributes are relatively rare.

See Also:
setVendorId(int vendorId)

getDataType

public int getDataType(int vendorId,
                       int attribute)
Get the data type for this attribute.

Parameters:
vendorId - Vendor Id.
attribute - Attribute tag
Returns:
The data type. One of UNKNOWN, INTEGER, OCTETS, STRING, DATE, IPADDRESS, TUNNEL.

Note that TUNNEL may be OR'd with any other type. Tunnel attributes are relatively rare.


getDataTypeFlags

public int getDataTypeFlags(int attributeTag)
Get the flags associated with the attribute, if any.

Parameters:
attributeTag - Attribute tag value.
Returns:
The data type flags or 0 if there are no flags o the attribute cannot be found.

getDataTypeFlags

public int getDataTypeFlags(int vendorId,
                            int attributeTag)
Get the flags associated with the attribute, if any.

Parameters:
vendorId - Vendor Id.
attributeTag - Attribute tag value.
Returns:
The data type flags or 0 if there are no flags o the attribute cannot be found.

getDataTypeName

public String getDataTypeName(int dataType)
Get the data type's name. See getDataType(int, int) for the meaning of the data type.

Parameters:
dataType - Data type.
Returns:
Data type name, e.g. INTEGER, STRING, etc.

getEncryptionType

public int getEncryptionType(int attributeTag)
Get the encryption type for this attribute.

Parameters:
attributeTag - Attribute tag value.
Returns:
ENCRYPT1, ENCRYPT2, or 0 for no encryption.
Since:
3.43

getEncryptionType

public int getEncryptionType(int vendorId,
                             int attributeTag)
Get the encryption type for this attribute.

Parameters:
vendorId - Vendor Id.
attributeTag - Attribute tag value.
Returns:
ENCRYPT1, ENCRYPT2, or 0 for no encryption.
Since:
3.43

getIntValue

public int getIntValue(int vendorId,
                       int tag,
                       String valueName)
Given the vendor number, attribute tag and value name return the value's integer equivalent.

For example return the value for (Bay-Networks, Annex-User-Server-Location, "local") should be 1.

Parameters:
vendorId - Vendor Identifier number.
tag - Attribute tag value
valueName - Name of value to set.
Returns:
The integer value or -1 if the vendor Id is unknown, the attribute doesn't exist, or the value name is incorrect.

getIntValue

public int getIntValue(int attribute,
                       String valueName)
Given the value number from the dictionary VALUE name.

Parameters:
attribute - Attribute tag number.
valueName - Name of value (E.g."PPP");
Returns:
Attribute value for this symbolic name or -1 if the attribute doesn't exist or the value name doesn't exist.

getName

public String getName(int attributeTag)
Given the tag number of an attribute return it's name.

Parameters:
attributeTag - Attribute tag value.
Returns:
The attribute name or null if the name can't be found.
See Also:
setVendorId(int vendorId)

getName

public String getName(int vendorId,
                      int attributeTag)
Given the tag number of an attribute return it's name.

Parameters:
vendorId - Vendor Id.
attributeTag - Attribute tag value.
Returns:
The attribute name or null if the name can't be found.

getTag

public int getTag(int vendorId,
                  String name)
Given the name of the attribute return it's tag value.

Parameters:
vendorId - Vendor Id.
name - Attribute name.
Returns:
tag value or 0 if the vendor or attribute name cannot be found.

getTag

public int getTag(String name)
Given the name of the attribute return it's tag value.

Parameters:
name - Attribute name.
Returns:
tag value or 0 if the attribute name cannot be found.
See Also:
setVendorId(int vendorId)

getValueName

public String getValueName(int attribute,
                           int value)
Given the attribute number get the name of the particular attribute's integer value field return the name of that integer value.

Parameters:
attribute - Attribute number.
value - number of the attribute value.
Returns:
attribute name.

getValueName

public String getValueName(int vendorId,
                           int attribute,
                           int value)
Given the attribute number get the name of the particular attribute's integer value field return the name of that integer value.

Parameters:
attribute - Attribute number.
value - number of the attribute value.
Returns:
attribute name.
Since:
3.34

getVendorId

public int getVendorId()
Get the default vendorId. This is either 0 (base attribute set) or the vendor set by setVendorId(int vendorId).

Returns:
default vendor Id number or 0 if there is no overriding vendor Id.

getVendorId

public int getVendorId(String vendorName)
Get the vendor number from the name.

Parameters:
vendorName - Vendor name.
Returns:
Vendor Id number or UNKNOWN_VENDOR if the vendor name can't be found.

getVendorName

public String getVendorName(int vendorId)
Get a vendor name from a vendor id number.

Parameters:
vendorId - Vendor Identifier.
Returns:
vendor name or null if the vendor id is unknown.
Since:
3.34

getVendorNames

public String[] getVendorNames()
Return an array of Vendor names

Returns:
Array of vendor names.

getVendorTagLength

public boolean getVendorTagLength()
Get the vendor tag size format - either long or short tags.

Returns:
one of SHORT_TAGS or LONG_TAGS.

getVendorTagLength

public boolean getVendorTagLength(int vendorId)
Get the vendor tag size format - either long or short tags.

Parameters:
vendorId - Vendor Id.
Returns:
one of SHORT_TAGS or LONG_TAGS.

hasValue

public boolean hasValue(int attributeTag)
Determine if there are known constants (symbolic names) for this attribute. Constants are known values for attributes. For example Acct-Status-Type has known constants 'Start' and 'Stop'.

Parameters:
attributeTag - Attribute tag.
Returns:
true if this attribute has any known constants.
See Also:
setVendorId(int vendorId)

hasValue

public boolean hasValue(int vendorId,
                        int attributeTag)
Determine if there are known constants (symbolic names) for this VSA sub-attribute. Constants are known values for attributes. For example Acct-Status-Type has known constants 'Start' and 'Stop'.

Parameters:
vendorId - Vendor Id.
attributeTag - Attribute tag.
Returns:
true if this attribute has any known constants

hasValue

public boolean hasValue(String attrName)
Determine if there are known constants (symbolic names) for this attribute. Constants are known values for attributes. For example Acct-Status-Type has known constants 'Start' and 'Stop'.

Parameters:
attrName - Attribute name.
Returns:
true if this attribute has any known constants.
See Also:
setVendorId(int vendorId)

isTunnel

public boolean isTunnel(int attribute)
Determine if this attribute is a tunnel attribute.

Parameters:
attribute - Attribute tag number.
Returns:
Attribute value for this symbolic name or -1 if the attribute doesn't exist or the value name doesn't exist.
Since:
Server 3.42

isTunnel

public boolean isTunnel(int vendorId,
                        int attribute)
Determine if this attribute is a tunnel attribute.

Parameters:
vendorId - Vendor Identifier number.
attribute - Attribute tag number.
Returns:
Attribute value for this symbolic name or -1 if the attribute doesn't exist or the value name doesn't exist.
Since:
Server 3.42

isVSA

public boolean isVSA(int attribute)
Determine if this attribute is a Vendor-Specific attribute (VSA).

Parameters:
attribute - Attribute.
Returns:
true if this is a VSA.

isVSA

public boolean isVSA(String attributeName)
Determine if this attribute is a Vendor-Specific attribute (VSA).

Parameters:
attributeName - Attribute name.
Returns:
true if this is a VSA.

merge

public void merge(RADIUSDictionary dict)
Merge another dictionary with this one. Any common attributes or values will be overwritten by the given dictionary.

Parameters:
dict - Dictionary to merge.
Since:
Server 3.43

read

public void read()
          throws IOException
Read the dictionary file.

Throws:
IOException - if there's a problem reading or parsing the file.

setEncryptionType

public void setEncryptionType(int attributeTag,
                              int encType)
Set the encryption type for this attribute.

Parameters:
attributeTag - Attribute tag value.
encType - One of ENCRYPT1, ENCRYPT2, or 0 for no encoding. The default is no encoding.
Since:
3.43

setEncryptionType

public void setEncryptionType(int vendorId,
                              int attributeTag,
                              int encType)
Set the encryption type for this attribute.

Parameters:
vendorId - Vendor Id.
attributeTag - Attribute tag value.
encType - One of ENCRYPT1, ENCRYPT2, or 0 for no encryption. The default is no encoding.
Since:
3.43

setSymbolicIntValue

public void setSymbolicIntValue(int vendorId,
                                String attributeName,
                                String symbolicName,
                                int value)
Set a symbolic attribute value for and attribute. For example this could set a symbolic value of ' Login' to #1 for the attribute Service-Type. To add this example: setSymbolicIntValue(" Service-Type", "Login", 1).

Parameters:
vendorId - Vendor ID.
attributeName - The attribute's symbolic name.
symbolicName - The name of the value.
value - The integer value for the symbolic name.
Since:
Server 3.43

setSymbolicIntValue

public void setSymbolicIntValue(String attributeName,
                                String symbolicName,
                                int value)
Set a symbolic attribute value for and attribute. For example this could set a symbolic value of ' Login' to #1 for the attribute Service-Type. To add this example: setSymbolicIntValue(" Service-Type", "Login", 1).

Parameters:
attributeName - The attribute's symbolic name.
symbolicName - The name of the value.
value - The integer value for the symbolic name.
Since:
Server 3.43

setTunnel

public void setTunnel(int attribute)
Set the tunnel flag for this attribute.

Parameters:
attribute - Attribute tag number.
Since:
Server 3.42

setTunnel

public void setTunnel(int vendorId,
                      int attribute)
Set the tunnel flag for this attribute.

Parameters:
vendorId - Vendor Identifier number.
attribute - Attribute tag number.
Since:
Server 3.42

setVendorId

public void setVendorId(int vendorId)
Override the Vendor Id for all non-vendor Id lookups.

This causes all methods that don't specifiy a particular vendorId to use this vendorId. In normal operation such methods will return information about standard RADIUS attributes.

Parameters:
vendorId - The Vendor Id to use in default lookups. Setting this to zero (0) will restore the default behavior of looking up standard RADIUS attributes.

setVendorTagLength

public void setVendorTagLength(boolean longOrShort)
Set the vendor tag size format - either long or short tags.

Parameters:
longOrShort - - one of SHORT_TAGS or LONG_TAGS.

setVendorTagLength

public void setVendorTagLength(int vendorId,
                               boolean longOrShort)
Set the vendor tag size format - either long or short tags.

Parameters:
vendorId - Vendor Id.
longOrShort - - one of SHORT_TAGS or LONG_TAGS.

toString

public String toString()
String version of this class. Produces a list of all vendors.

Returns:
a string list all vendors.

toVerboseString

public String toVerboseString()
Produce a vebose string of vendors and all attributes and values.

Returns:
very long string of all attributes and values.

AXL RADIUS Server API V3

Submit a bug report or feature request

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