Package org.onlab.packet
Class RADIUSAttribute
- java.lang.Object
-
- org.onlab.packet.RADIUSAttribute
-
public class RADIUSAttribute extends java.lang.ObjectAn attribute in a RADIUS packet.
-
-
Field Summary
Fields Modifier and Type Field Description protected bytelengthstatic byteRADIUS_ATTR_ACCT_SESSION_IDstatic byteRADIUS_ATTR_CALLING_STATION_IDstatic byteRADIUS_ATTR_EAP_MESSAGEstatic byteRADIUS_ATTR_FRAMED_MTUstatic byteRADIUS_ATTR_MESSAGE_AUTHstatic byteRADIUS_ATTR_NAS_IDstatic byteRADIUS_ATTR_NAS_IPstatic byteRADIUS_ATTR_NAS_PORTstatic byteRADIUS_ATTR_NAS_PORT_IDstatic byteRADIUS_ATTR_NAS_PORT_TYPEstatic byteRADIUS_ATTR_STATEstatic byteRADIUS_ATTR_USERNAMEstatic byteRADIUS_ATTR_VENDOR_SPECIFICprotected bytetypeprotected 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 bytegetLength()Gets the attribute length.bytegetType()Gets the attribute type.byte[]getValue()Gets the attribute value.booleanisValidType()Checks if the attribute type is valid.RADIUSAttributesetLength(byte length)Sets the attribute length.RADIUSAttributesetType(byte type)Sets the attribute type.RADIUSAttributesetValue(byte[] value)Sets the attribute value.java.lang.StringtoString()
-
-
-
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:
toStringin classjava.lang.Object
-
-