Home | History | Annotate | Download | only in DNS

Lines Matching refs:Code

16 public static class Code {
17 private Code() {}
30 codes.setPrefix("CODE");
38 * Converts an EDNS Option Code into its textual representation
41 string(int code) {
42 return codes.getText(code);
46 * Converts a textual representation of an EDNS Option Code into its
48 * @param s The textual representation of the option code
49 * @return The option code, or -1 on error.
57 private final int code;
61 * Creates an option with the given option code and data.
64 EDNSOption(int code) {
65 this.code = Record.checkU16("code", code);
73 sb.append(EDNSOption.Code.string(code));
82 * Returns the EDNS Option's code.
84 * @return the option code
88 return code;
112 * Converts the wire format of an EDNS Option (including code and length) into
118 int code, length;
120 code = in.readU16();
127 switch (code) {
128 case Code.NSID:
131 case Code.CLIENT_SUBNET:
135 option = new GenericEDNSOption(code);
145 * Converts the wire format of an EDNS Option (including code and length) into
162 * Converts an EDNS Option (including code and length) into wire format.
167 out.writeU16(code);
176 * Converts an EDNS Option (including code and length) into wire format.
196 if (code != opt.code)
202 * Generates a hash code based on the EDNS Option's data.