DNSServiceUpdateRecord(_:_:_:_:_:_:)
Updates a registered resource record.
Declaration
func DNSServiceUpdateRecord(_ sdRef: DNSServiceRef!, _ recordRef: DNSRecordRef!, _ flags: DNSServiceFlags, _ rdlen: UInt16, _ rdata: UnsafeRawPointer!, _ ttl: UInt32) -> DNSServiceErrorTypeParameters
- sdRef:
A DNSServiceRef that was initialized by Dnsserviceregister(_:_:_:_:_:_:_:_:_:_:_:_:) or Dnsservicecreateconnection(_:).
- recordRef:
A DNSRecordRef initialized by Dnsserviceaddrecord(_:_:_:_:_:_:_:), or NULL to update the service’s primary txt record.
- flags:
Currently ignored, reserved for future use.
- rdlen:
The length, in bytes, of the new rdata.
- rdata:
The new rdata to be contained in the updated resource record.
- ttl:
The time to live of the updated resource record, in seconds. Most clients should pass 0 to indicate that the system should select a sensible default value.
Return Value
Returns kDNSServiceErr_NoError on success, otherwise returns an error code indicating the error that occurred.
Discussion
The record must either be:
The primary txt record of a service registered via DNSServiceRegister(_:_:_:_:_:_:_:_:_:_:_:_:)
A record added to a registered service via DNSServiceAddRecord(_:_:_:_:_:_:_:)
An individual record registered by DNSServiceRegisterRecord(_:_:_:_:_:_:_:_:_:_:_:_:)