コード例 #1
0
ファイル: NAPTRRecord.java プロジェクト: z33ky/xabber-android
 void rrToWire(DNSOutput out, Compression c, boolean canonical) {
   out.writeU16(order);
   out.writeU16(preference);
   out.writeCountedString(flags);
   out.writeCountedString(service);
   out.writeCountedString(regexp);
   replacement.toWire(out, null, canonical);
 }
コード例 #2
0
ファイル: OPTRecord.java プロジェクト: duanlang1006/appstore
 void rrToWire(DNSOutput out, Compression c, boolean canonical) {
   if (options == null) return;
   Iterator it = options.iterator();
   while (it.hasNext()) {
     Option opt = (Option) it.next();
     out.writeU16(opt.code);
     out.writeU16(opt.data.length);
     out.writeByteArray(opt.data);
   }
 }
コード例 #3
0
 void toWire(DNSOutput out, int section, Compression c) {
   name.toWire(out, c);
   out.writeU16(type);
   out.writeU16(dclass);
   if (section == Section.QUESTION) return;
   out.writeU32(ttl);
   int lengthPosition = out.current();
   out.writeU16(0); /* until we know better */
   rrToWire(out, c, false);
   int rrlength = out.current() - lengthPosition - 2;
   out.save();
   out.jump(lengthPosition);
   out.writeU16(rrlength);
   out.restore();
 }
コード例 #4
0
 private void toWireCanonical(DNSOutput out, boolean noTTL) {
   name.toWireCanonical(out);
   out.writeU16(type);
   out.writeU16(dclass);
   if (noTTL) {
     out.writeU32(0);
   } else {
     out.writeU32(ttl);
   }
   int lengthPosition = out.current();
   out.writeU16(0); /* until we know better */
   rrToWire(out, null, true);
   int rrlength = out.current() - lengthPosition - 2;
   out.save();
   out.jump(lengthPosition);
   out.writeU16(rrlength);
   out.restore();
 }
コード例 #5
0
ファイル: NSEC3Record.java プロジェクト: hemantdhivar/milton2
  void rrToWire(DNSOutput out, Compression c, boolean canonical) {
    out.writeU8(hashAlg);
    out.writeU8(flags);
    out.writeU16(iterations);

    if (salt != null) {
      out.writeU8(salt.length);
      out.writeByteArray(salt);
    } else out.writeU8(0);

    out.writeU8(next.length);
    out.writeByteArray(next);
    types.toWire(out);
  }
コード例 #6
0
 void rrToWire(DNSOutput out, Compression c, boolean canonical) {
   out.writeU16(u16Field);
   nameField.toWire(out, null, canonical);
 }
コード例 #7
0
ファイル: CERTRecord.java プロジェクト: emacadie/dnsgroovy
 void rrToWire(DNSOutput out, Compression c, boolean canonical) {
   out.writeU16(certType);
   out.writeU16(keyTag);
   out.writeU8(alg);
   out.writeByteArray(cert);
 }