Package org.opencord.bng.packets
Enum PppProtocolType
- java.lang.Object
-
- java.lang.Enum<PppProtocolType>
-
- org.opencord.bng.packets.PppProtocolType
-
- All Implemented Interfaces:
Serializable,Comparable<PppProtocolType>
public enum PppProtocolType extends Enum<PppProtocolType>
PPP Protocol type enumerator.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description shortcode()Returns code associated to the PPP protocol.booleancontrol()Checks if the PPP protocol is carrying control plane packets.static PppProtocolTypelookup(short code)Lookups for a PPP Protocol type.Stringtype()Returns the string representation of the PPP protocol.static PppProtocolTypevalueOf(String name)Returns the enum constant of this type with the specified name.static PppProtocolType[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
LCP
public static final PppProtocolType LCP
-
IPCP
public static final PppProtocolType IPCP
-
PAP
public static final PppProtocolType PAP
-
CHAP
public static final PppProtocolType CHAP
-
IPv4
public static final PppProtocolType IPv4
-
IPv6
public static final PppProtocolType IPv6
-
NO_PROTOCOL
public static final PppProtocolType NO_PROTOCOL
-
-
Method Detail
-
values
public static PppProtocolType[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (PppProtocolType c : PppProtocolType.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static PppProtocolType valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
lookup
public static PppProtocolType lookup(short code)
Lookups for a PPP Protocol type.- Parameters:
code- The code for PPP protocol.- Returns:
- The PPPProtocol type
-
code
public short code()
Returns code associated to the PPP protocol.- Returns:
- The code for PPP protocol
-
type
public String type()
Returns the string representation of the PPP protocol.- Returns:
- The PPP protocol string representation
-
control
public boolean control()
Checks if the PPP protocol is carrying control plane packets.- Returns:
- True if the PPP protocol is for control plane packets, false otherwise
-
-