400
401
402
403
404
405
406
407
408
409
410
411
412
413
|
return [[[OFSRVDNSResourceRecord alloc]
initWithName: name
priority: priority
weight: weight
target: target
port: port
TTL: TTL] autorelease];
} else
return [[[OFDNSResourceRecord alloc]
initWithName: name
DNSClass: DNSClass
recordType: recordType
TTL: TTL] autorelease];
|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
|
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
|
return [[[OFSRVDNSResourceRecord alloc]
initWithName: name
priority: priority
weight: weight
target: target
port: port
TTL: TTL] autorelease];
} else if (recordType == OFDNSRecordTypeURI) {
uint16_t priority, weight;
OFString *target;
if (dataLength < 4)
@throw [OFInvalidServerResponseException exception];
priority = (buffer[i] << 8) | buffer[i + 1];
weight = (buffer[i + 2] << 8) | buffer[i + 3];
target = [OFString stringWithUTF8String: (char *)buffer + i + 4
length: dataLength - 4];
return [[[OFURIDNSResourceRecord alloc]
initWithName: name
DNSClass: DNSClass
priority: priority
weight: weight
target: target
TTL: TTL] autorelease];
} else
return [[[OFDNSResourceRecord alloc]
initWithName: name
DNSClass: DNSClass
recordType: recordType
TTL: TTL] autorelease];
|