|
RADIUS Client API (V3) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
ObjectRADIUSDictionary
FreeRadius
Class to read and parse FreeRadius style dictionary files.
It understands the current dictionary files and handles $INCLUDE statements.
Included processing may be altered using the
enableIncludes() method.
Note that the RADIUSDictionary.setVendorId(int vendorId) can change
how the default attributes and value are displayed.
Some examples are found in DictionaryExamples.java.
| Field Summary | |
static int |
ONE
Value indicating this attribute MUST occur once in the packet. |
static int |
UNKNOWN
Value indicating it is unknown how often this attribute may appear. |
static int |
ZERO
Value indicating this attribute may never occur. |
static int |
ZEROONE
Value indicating this attribute may occur zero or once. |
static int |
ZEROPLUS
Value indicating this attribute may occur zero of more times. |
| Fields inherited from class RADIUSDictionary |
DATE, ENCRYPT1, ENCRYPT2, ENCRYPT3, INTEGER, IPADDRESS, LONG_TAGS, OCTETS, SHORT_TAGS, STRING, TUNNEL, UNKNOWN_DATA_TYPE, UNKNOWN_VENDOR |
| Constructor Summary | |
FreeRadius(String fileName)
Dictionary constructor. |
|
| Method Summary | |
void |
enableIncludes(boolean enable)
Disable or enable the reading of $INCLUDE files. |
String[] |
getFileList()
Get the list of files read. |
int |
getOccurrence(int packetType,
int attributeTag)
Get the number of occurrences permitted for RFC standard attributes. |
String |
getOccurrenceName(int occurrenceType)
Get the name of the occurrence given the numerical value. |
void |
read()
Read the dictionary file. |
String |
toString()
Returns the representation of this class as a string. |
| Methods inherited from class Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static final int ZERO
getOccurrence(),
Constant Field Valuespublic static final int ZEROPLUS
getOccurrence(),
Constant Field Valuespublic static final int ZEROONE
get)ccurrence(),
Constant Field Valuespublic static final int ONE
getOccurrence(),
Constant Field Valuespublic static final int UNKNOWN
getOccurrence(),
Constant Field Values| Constructor Detail |
public FreeRadius(String fileName)
fileName - Path to dictionary file.| Method Detail |
public int getOccurrence(int packetType,
int attributeTag)
In the RFC's this is shown in tables as:
0 This attribute MUST NOT be present in packet. 0+ Zero or more instances of this attribute MAY be present in packet. 0-1 Zero or one instance of this attribute MAY be present in packet. 1 Exactly one instance of this attribute MUST be present in packet.These are represented in coresponding order as
ZERO, ZEROPLUS, ZEROONE, ONE,
and UNKNOWN when there is no correspondence with the RFC's.
UNKNOWN is returned when the packet type is not in the list, the attribute
is not in the list, or the attribute's behavior hasn't been defined.
For example a packet type of Accounting-Reponse has no defined attribute occurrences so will return UNKNOWN for all queries.
Known RFC attribute types are from tables in: rfc2865, rfc2866, rfc2868, rfc2867, and rfc2869.
packetType - Packet type - see PacketType.
ZERO,
ZEROPLUS,
ZEROONE,
ONE,
UNKNOWNpublic String getOccurrenceName(int occurrenceType)
occurrenceType - Occurence type from
getOccurrence().
public void enableIncludes(boolean enable)
This must be set before using the read() method.
enable - Set to true to enable including files, false to ignore included files.
public void read()
throws IOException
read in class RADIUSDictionaryIOException - if there's a problem reading or parsing the file.public String[] getFileList()
public String toString()
toString in class RADIUSDictionary
|
RADIUS Client API (V3) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||