MCPcopy Create free account
hub / github.com/DeNA/PacketProxy / ExtendedFlags

Class ExtendedFlags

src/main/java/core/org/xbill/DNS/ExtendedFlags.java:11–45  ·  view source on GitHub ↗

Constants and functions relating to EDNS flags. @author Brian Wellington

Source from the content-addressed store, hash-verified

9 */
10
11public final class ExtendedFlags {
12
13private static Mnemonic extflags = new Mnemonic("EDNS Flag",
14 Mnemonic.CASE_LOWER);
15
16/** dnssec ok */
17public static final int DO = 0x8000;
18
19static {
20 extflags.setMaximum(0xFFFF);
21 extflags.setPrefix("FLAG");
22 extflags.setNumericAllowed(true);
23
24 extflags.add(DO, "do");
25}
26
27private
28ExtendedFlags() {}
29
30/** Converts a numeric extended flag into a String */
31public static String
32string(int i) {
33 return extflags.getText(i);
34}
35
36/**
37 * Converts a textual representation of an extended flag into its numeric
38 * value
39 */
40public static int
41value(String s) {
42 return extflags.getValue(s);
43}
44
45}

Callers

nothing calls this directly

Calls 4

setMaximumMethod · 0.80
setPrefixMethod · 0.80
setNumericAllowedMethod · 0.80
addMethod · 0.45

Tested by

no test coverage detected