Package org.onlab.packet
Class RADIUSAttribute
- java.lang.Object
-
- org.onlab.packet.RADIUSAttribute
-
public class RADIUSAttribute extends java.lang.Object
An attribute in a RADIUS packet.
-
-
Field Summary
Fields Modifier and Type Field Description protected byte
length
static byte
RADIUS_ATTR_ACCT_SESSION_ID
static byte
RADIUS_ATTR_CALLING_STATION_ID
static byte
RADIUS_ATTR_EAP_MESSAGE
static byte
RADIUS_ATTR_FRAMED_MTU
static byte
RADIUS_ATTR_MESSAGE_AUTH
static byte
RADIUS_ATTR_NAS_ID
static byte
RADIUS_ATTR_NAS_IP
static byte
RADIUS_ATTR_NAS_PORT
static byte
RADIUS_ATTR_NAS_PORT_ID
static byte
RADIUS_ATTR_NAS_PORT_TYPE
static byte
RADIUS_ATTR_STATE
static byte
RADIUS_ATTR_USERNAME
static byte
RADIUS_ATTR_VENDOR_SPECIFIC
protected byte
type
protected byte[]
value
-
Constructor Summary
Constructors Constructor Description RADIUSAttribute()
Default constructor.RADIUSAttribute(byte type, byte length, byte[] value)
Constructs a RADIUS attribute with the give type, length and value.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description byte
getLength()
Gets the attribute length.byte
getType()
Gets the attribute type.byte[]
getValue()
Gets the attribute value.boolean
isValidType()
Checks if the attribute type is valid.RADIUSAttribute
setLength(byte length)
Sets the attribute length.RADIUSAttribute
setType(byte type)
Sets the attribute type.RADIUSAttribute
setValue(byte[] value)
Sets the attribute value.java.lang.String
toString()
-
-
-
Field Detail
-
type
protected byte type
-
length
protected byte length
-
value
protected byte[] value
-
RADIUS_ATTR_USERNAME
public static final byte RADIUS_ATTR_USERNAME
- See Also:
- Constant Field Values
-
RADIUS_ATTR_NAS_IP
public static final byte RADIUS_ATTR_NAS_IP
- See Also:
- Constant Field Values
-
RADIUS_ATTR_NAS_PORT
public static final byte RADIUS_ATTR_NAS_PORT
- See Also:
- Constant Field Values
-
RADIUS_ATTR_FRAMED_MTU
public static final byte RADIUS_ATTR_FRAMED_MTU
- See Also:
- Constant Field Values
-
RADIUS_ATTR_STATE
public static final byte RADIUS_ATTR_STATE
- See Also:
- Constant Field Values
-
RADIUS_ATTR_VENDOR_SPECIFIC
public static final byte RADIUS_ATTR_VENDOR_SPECIFIC
- See Also:
- Constant Field Values
-
RADIUS_ATTR_CALLING_STATION_ID
public static final byte RADIUS_ATTR_CALLING_STATION_ID
- See Also:
- Constant Field Values
-
RADIUS_ATTR_NAS_ID
public static final byte RADIUS_ATTR_NAS_ID
- See Also:
- Constant Field Values
-
RADIUS_ATTR_ACCT_SESSION_ID
public static final byte RADIUS_ATTR_ACCT_SESSION_ID
- See Also:
- Constant Field Values
-
RADIUS_ATTR_NAS_PORT_TYPE
public static final byte RADIUS_ATTR_NAS_PORT_TYPE
- See Also:
- Constant Field Values
-
RADIUS_ATTR_EAP_MESSAGE
public static final byte RADIUS_ATTR_EAP_MESSAGE
- See Also:
- Constant Field Values
-
RADIUS_ATTR_MESSAGE_AUTH
public static final byte RADIUS_ATTR_MESSAGE_AUTH
- See Also:
- Constant Field Values
-
RADIUS_ATTR_NAS_PORT_ID
public static final byte RADIUS_ATTR_NAS_PORT_ID
- See Also:
- Constant Field Values
-
-
Method Detail
-
isValidType
public boolean isValidType()
Checks if the attribute type is valid.- Returns:
- whether the type is valid or not
-
getType
public byte getType()
Gets the attribute type.- Returns:
- the type
-
setType
public RADIUSAttribute setType(byte type)
Sets the attribute type.- Parameters:
type
- the code to set- Returns:
- this
-
getLength
public byte getLength()
Gets the attribute length.- Returns:
- the length
-
setLength
public RADIUSAttribute setLength(byte length)
Sets the attribute length.- Parameters:
length
- the length to set- Returns:
- this
-
getValue
public byte[] getValue()
Gets the attribute value.- Returns:
- the value
-
setValue
public RADIUSAttribute setValue(byte[] value)
Sets the attribute value.- Parameters:
value
- the data to set- Returns:
- this
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-