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

Method toWire

src/main/java/core/org/xbill/DNS/Record.java:212–225  ·  view source on GitHub ↗
(DNSOutput out, int section, Compression c)

Source from the content-addressed store, hash-verified

210}
211
212void
213toWire(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.

Callers 2

toWireMethod · 0.95
sectionToWireMethod · 0.95

Calls 6

rrToWireMethod · 0.95
toByteArrayMethod · 0.95
writeU16Method · 0.80
writeU32Method · 0.80
writeU16AtMethod · 0.80
currentMethod · 0.45

Tested by

no test coverage detected