public enum InetProtocols extends Enum<InetProtocols>
InetProtocols
contains the common IP protocol numbers.Enum Constant and Description |
---|
ICMP
Indicates the Internet Control Message Protocol (IPv4).
|
TCP
Indicates the Transmission Control Protocol.
|
UDP
Indicates the User Datagram Protocol.
|
Modifier and Type | Method and Description |
---|---|
byte |
byteValue()
Return the IP protocol number as a byte value.
|
static InetProtocols |
forValue(byte proto)
Convert the given IP protocol number into a
InetProtocols
instance. |
int |
intValue()
Return the IP protocol number as an integer value.
|
short |
shortValue()
Return the IP protocol number as a short integer value.
|
static InetProtocols |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static InetProtocols[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final InetProtocols ICMP
public static final InetProtocols TCP
public static final InetProtocols UDP
public static InetProtocols[] values()
for (InetProtocols c : InetProtocols.values()) System.out.println(c);
public static InetProtocols valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic static InetProtocols forValue(byte proto)
InetProtocols
instance.proto
- An IP protocol number.InetProtocols
instance if found.
null
if not found.public int intValue()
public short shortValue()
public byte byteValue()
Copyright © 2018 OpenDaylight. All rights reserved.