Home | History | Annotate | Download | only in DNS

Lines Matching refs:Section

14  * @see Section
84 m.addRecord(r, Section.QUESTION);
111 if (i == Section.ADDITIONAL) {
157 * Adds a record to a section of the Message, and adjusts the header.
159 * @see Section
162 addRecord(Record r, int section) {
163 if (sections[section] == null)
164 sections[section] = new LinkedList();
165 header.incCount(section);
166 sections[section].add(r);
170 * Removes a record from a section of the Message, and adjusts the header.
172 * @see Section
175 removeRecord(Record r, int section) {
176 if (sections[section] != null && sections[section].remove(r)) {
177 header.decCount(section);
185 * Removes all records from a section of the Message, and adjusts the header.
187 * @see Section
190 removeAllRecords(int section) {
191 sections[section] = null;
192 header.setCount(section, 0);
196 * Determines if the given record is already present in the given section.
198 * @see Section
201 findRecord(Record r, int section) {
202 return (sections[section] != null && sections[section].contains(r));
206 * Determines if the given record is already present in any section.
208 * @see Section
212 for (int i = Section.ANSWER; i <= Section.ADDITIONAL; i++)
220 * present in the given section.
222 * @see Section
225 findRRset(Name name, int type, int section) {
226 if (sections[section] == null)
228 for (int i = 0; i < sections[section].size(); i++) {
229 Record r = (Record) sections[section].get(i);
238 * present in any section.
240 * @see Section
244 return (findRRset(name, type, Section.ANSWER) ||
245 findRRset(name, type, Section.AUTHORITY) ||
246 findRRset(name, type, Section.ADDITIONAL));
250 * Returns the first record in the QUESTION section.
252 * @see Section
256 List l = sections[Section.QUESTION];
263 * Returns the TSIG record from the ADDITIONAL section, if one is present.
266 * @see Section
270 int count = header.getCount(Section.ADDITIONAL);
273 List l = sections[Section.ADDITIONAL];
301 * Returns the OPT record from the ADDITIONAL section, if one is present.
303 * @see Section
307 Record [] additional = getSectionArray(Section.ADDITIONAL);
328 * Returns an array containing all records in the given section, or an
329 * empty array if the section is empty.
331 * @see Section
334 getSectionArray(int section) {
335 if (sections[section] == null)
337 List l = sections[section];
349 * Returns an array containing all records in the given section grouped into
352 * @see Section
355 getSectionRRsets(int section) {
356 if (sections[section] == null)
359 Record [] recs = getSectionArray(section);
402 sectionToWire(DNSOutput out, int section, Compression c,
405 int n = sections[section].size();
411 Record rec = (Record)sections[section].get(i);
417 rec.toWire(out, section, c);
449 if (i != Section.ADDITIONAL)
470 tsigrec.toWire(out, Section.ADDITIONAL, c);
471 newheader.incCount(Section.ADDITIONAL);
537 * Converts the given section of the Message to a String.
538 * @see Section
550 if (i == Section.QUESTION) {
583 sb.append(";; " + Section.longString(i) + ":\n");
585 sb.append(";; " + Section.updString(i) + ":\n");