(DNSOutput out, int section, Compression c)
| 210 | } |
| 211 | |
| 212 | void |
| 213 | toWire(DNSOutput out, int section, Compression c) { |
| 214 | name.toWire(out, c); |
| 215 | out.writeU16(type); |
| 216 | out.writeU16(dclass); |
| 217 | if (section == Section.QUESTION) |
| 218 | return; |
| 219 | out.writeU32(ttl); |
| 220 | int lengthPosition = out.current(); |
| 221 | out.writeU16(0); /* until we know better */ |
| 222 | rrToWire(out, c, false); |
| 223 | int rrlength = out.current() - lengthPosition - 2; |
| 224 | out.writeU16At(rrlength, lengthPosition); |
| 225 | } |
| 226 | |
| 227 | /** |
| 228 | * Converts a Record into DNS uncompressed wire format. |
no test coverage detected