pcap.codec.icmp.icmp6.Icmp6EchoRequest Maven / Gradle / Ivy
/** This code is licenced under the GPL version 2. */
package pcap.codec.icmp.icmp6;
import pcap.codec.icmp.Icmp;
import pcap.common.annotation.Inclubating;
/** @author Ardika Rommy Sanjaya */
@Inclubating
public class Icmp6EchoRequest extends Icmp.IcmpTypeAndCode {
public static final Icmp6EchoRequest ECHO_REQUEST =
new Icmp6EchoRequest((byte) 0, "Echo request");
public Icmp6EchoRequest(Byte code, String name) {
super((byte) 128, code, name);
}
/**
* Add new {@link Icmp6EchoRequest} to registry.
*
* @param code icmp type code.
* @param name icmp type name.
* @return returns {@link Icmp6EchoRequest}.
*/
public static Icmp6EchoRequest register(Byte code, String name) {
return new Icmp6EchoRequest(code, name);
}
@Override
public String toString() {
return super.toString();
}
static {
Icmp.IcmpTypeAndCode.ICMP6_REGISTRY.add(ECHO_REQUEST);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy