예제 #1
0
 void rrFromWire(DNSInput in) throws IOException {
   order = in.readU16();
   preference = in.readU16();
   flags = in.readCountedString();
   service = in.readCountedString();
   regexp = in.readCountedString();
   replacement = new Name(in);
 }
예제 #2
0
 void rrFromWire(DNSInput in) throws IOException {
   if (in.remaining() > 0) options = new ArrayList();
   while (in.remaining() > 0) {
     int code = in.readU16();
     int len = in.readU16();
     byte[] data = in.readByteArray(len);
     options.add(new Option(code, data));
   }
 }
예제 #3
0
  static Record fromWire(DNSInput in, int section, boolean isUpdate) throws IOException {
    int type, dclass;
    long ttl;
    int length;
    Name name;
    Record rec;

    name = new Name(in);
    type = in.readU16();
    dclass = in.readU16();

    if (section == Section.QUESTION) return newRecord(name, type, dclass);

    ttl = in.readU32();
    length = in.readU16();
    if (length == 0 && isUpdate) return newRecord(name, type, dclass, ttl);
    rec = newRecord(name, type, dclass, ttl, length, in);
    return rec;
  }
예제 #4
0
  void rrFromWire(DNSInput in) throws IOException {
    hashAlg = in.readU8();
    flags = in.readU8();
    iterations = in.readU16();

    int salt_length = in.readU8();
    if (salt_length > 0) salt = in.readByteArray(salt_length);
    else salt = null;

    int next_length = in.readU8();
    next = in.readByteArray(next_length);
    types = new TypeBitmap(in);
  }
 void rrFromWire(DNSInput in) throws IOException {
   u16Field = in.readU16();
   nameField = new Name(in);
 }
예제 #6
0
 void rrFromWire(DNSInput in) throws IOException {
   certType = in.readU16();
   keyTag = in.readU16();
   alg = in.readU8();
   cert = in.readByteArray();
 }