DNSServiceCreateConnection man page on SmartOS

Man page or keyword search:  
man Server   16655 pages
apropos Keyword Search (all sections)
Output format
SmartOS logo
[printable version]


       DNSServiceCreateConnection,   DNSServiceRegisterRecord,	 DNSServiceAd‐
       dRecord, DNSServiceUpdateRecord, DNSServiceRemoveRecord	-  registering
       multiple records

       cc [ flag ... ] file ... -ldns_sd [ library ... ]
       #include <dns_sd.h>

       DNSServiceErrorType DNSServiceCreateConnection(DNSServiceRef *sdRef);

       DNSServiceErrorType DNSServiceRegisterRecord(DNSServiceRef sdRef,
	    DNSRecordRef *RecordRef, DNSServiceFlags flags,
	    uint32_t interfaceIndex, const char *fullname,
	    uint16_t rrtype, uint16_t rrclass, uint16_t rdlen,
	    const void *rdata, uint32_t ttl,
	    DNSServiceServiceRegisterRecordReply callBack,
	    void *context);

       typedef void(*DNSServiceRegisterRecordReply)(DNSServiceRef sdRef,
	    DNSServiceRecordRef RecordRef, DNSServiceFlags flags,
	    DNSServiceErrorType errorCode, void *context);

       DNSServiceErrorType DNSServiceAddRecord(DNSServiceRef sdRef,
	    DNSRecordRef *RecordRef, DNSServiceFlags flags,
	    uint16_t rrtype, uint16_t rdlen, const void *rdata,
	    uint32_t ttl);

       DNSServiceErrorType DNSServiceUpdateRecord(DNSServiceRef sdRef,
	    DNSRecordRef RecordRef, DNSServiceFlags flags,
	    uint16_t rdlen, const void *rdata,
	    uint32_t ttl);

       DNSServiceErrorType DNSServiceRemoveRecord(DNSServiceRef sdRef,
	    DNSRecordRef RecordRef, DNSServiceFlags flags);

       The DNSServiceCreateConnection() function allows the creation of a con‐
       nection to the mDNS daemon in order  to	register  multiple  individual

       The  DNSServiceRegisterRecord() function uses the connection created by
       DNSServiceCreateConnection() to register a record. Name conflicts  that
       occur  from  this function should be handled by the client in the call‐

       The DNSServiceAddRecord() call adds a DNS record to a  registered  ser‐
       vice.  The  name	 of the record is the same as registered service name.
       The RecordRef argument to DNSServiceAddRecord() points to an uninitial‐
       ized   DNSRecordRef.   After  successful	 completion  of	 DNSServiceAd‐
       dRecord(), the DNS record can be updated or deregistered by passing the
       DNSRecordRef  initialized  by  DNSServiceAddRecord()  to	 DNSServiceUp‐
       dateRecord() or to DNSServiceRemoveRecord().

       The DNSServiceUpdateRecords() call updates the DNS record of the regis‐
       tered  service. The DNS record must be the primary resource record reg‐
       istered using DNSServiceRegister() or a record added  to	 a  registered
       service	using  DNSServiceAddRecord() or an individual record added via

       The DNSServiceRemoveRecord() call removes a record that was added using
       DNSServiceAddRecord() or DNSServiceRegisterRecord().

       The  sdRef  argument points to DNSServiceRef initialized from a call to
       DNSServiceRegister(). If	 the  sdRef  argument  is  passed  to  DNSSer‐
       viceRefDeallocate()  and	 the service is deregistered DNS records added
       via DNSServiceAddRecord() are invalidated and cannot be	further	 used.
       The  flags  argument  is currently ignored and reserved for future use.
       The rrtype parameter value indicates the type of the DNS record.	 Suit‐
       able  values  for  the  rrtype  parameter  are  defined	in <dns_sd.h>:
       kDNSServiceType_TXT, for example. The rdata argument points to the  raw
       rdata  to  be contained in the resource record. The ttl value indicates
       the time to live of the resource record in seconds. A ttl  value	 of  0
       should be passed to use a default value.

       The  DNSServiceCreateConnection function returns kDNSServiceErr_NoError
       on success. Otherwise, an error code defined in <dns_sd.h> is  returned
       to indicate the specific failure that occurred.

       See attributes(5) for description of the following attributes:

       │Interface Stability │ Committed	      │
       │MT-Level	    │ Safe	      │

       DNSServiceRefDeallocate(3DNS_SD),	  DNSServiceRegister(3DNS_SD),


List of man pages available for SmartOS

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
Vote for polarhome
Free Shell Accounts :: the biggest list on the net