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

Method addRRset

src/main/java/core/org/xbill/DNS/jnamed.java:136–159  ·  view source on GitHub ↗
(Name name, Message response, RRset rrset, int section, int flags)

Source from the content-addressed store, hash-verified

134}
135
136void
137addRRset(Name name, Message response, RRset rrset, int section, int flags) {
138 for (int s = 1; s <= section; s++)
139 if (response.findRRset(name, rrset.getType(), s))
140 return;
141 if ((flags & FLAG_SIGONLY) == 0) {
142 Iterator it = rrset.rrs();
143 while (it.hasNext()) {
144 Record r = (Record) it.next();
145 if (r.getName().isWild() && !name.isWild())
146 r = r.withName(name);
147 response.addRecord(r, section);
148 }
149 }
150 if ((flags & (FLAG_SIGONLY | FLAG_DNSSECOK)) != 0) {
151 Iterator it = rrset.sigs();
152 while (it.hasNext()) {
153 Record r = (Record) it.next();
154 if (r.getName().isWild() && !name.isWild())
155 r = r.withName(name);
156 response.addRecord(r, section);
157 }
158 }
159}
160
161private final void
162addSOA(Message response, Zone zone) {

Callers 4

addNSMethod · 0.95
addGlueMethod · 0.95
addAnswerMethod · 0.95
doAXFRMethod · 0.95

Calls 10

getNameMethod · 0.95
withNameMethod · 0.95
rrsMethod · 0.80
hasNextMethod · 0.80
nextMethod · 0.80
isWildMethod · 0.80
sigsMethod · 0.80
getTypeMethod · 0.65
findRRsetMethod · 0.45
addRecordMethod · 0.45

Tested by

no test coverage detected