1TXTRecordCreate(3DNS_DSNDS)Service Discovery Library FunctTiXoTnRsecordCreate(3DNS_SD)
2
3
4
6 TXTRecordCreate, TXTRecordDeallocate, TXTRecordSetValue, TXTRecor‐
7 dRemoveValue, TXTRecordGetLength, TXTRecordGetBytesPtr, TXTRecordCon‐
8 tainsKey, TXTRecordGetValuePtr, TXTRecordGetCount, TXTRecordGetItem‐
9 AtIndex - DNS TXT record manipulation functions
10
12 cc [ flag ... ] file ... -ldns_sd [ library ... ]
13 #include <dns_sd.h>
14
15 void TXTRecordCreate(TXTRecordRef *txtRecord, uint16_t bufferLen,
16 void *buffer);
17
18
19 void TXTRecordDeallocate(TXTRecordRef*txtRecord);
20
21
22 DNSServiceErrorType txtRecord(TXTRecordRef *txtRecord,
23 const char *key, uint8_t valueSize, const void *value);
24
25
26 DNSServiceErrorType TXTRecordRemoveValue(TXTRecordRef *txtRecord,
27 const char *key);
28
29
30 uint16_t TXTRecordGetLength(const TXTRecordRef *txtRecord);
31
32
33 const void *TXTRecordGetBytesPtr(const TXTRecordRef *txtRecord);
34
35
36 int *TXTRecordContainsKey(uint16_t *txtLen,
37 const void *txtRecord, const char *key);
38
39
40 const void *TXTRecordGetValuePtr(uint16_t *txtLen,
41 const void *txtRecord, const char *key,
42 uint8_t *valueLen);
43
44
45 uint16_t *TXTRecordGetCount(uint16_t *txtLen,
46 const void *txtRecord);
47
48
49 DNSServiceErrorType TXTRecordGetItemAtIndex(uint16_t *txtLen,
50 const void *txtRecord, uint16_t *index,
51 uint16_t *keyBufLen, char *key,
52 uint8_t *valueLen, const void **value);
53
54
56 These functions in the libdns_sd library allow applications to create
57 and to manipulate TXT resource records. TXT resource records enable
58 applications to include service specific information, other than a host
59 name and port number, as part of the service registration.
60
62 See attributes(5) for description of the following attributes:
63
64
65
66
67 ┌─────────────────────────────┬─────────────────────────────┐
68 │ ATTRIBUTE TYPE │ ATTRIBUTE VALUE │
69 ├─────────────────────────────┼─────────────────────────────┤
70 │Interface Stability │Committed │
71 ├─────────────────────────────┼─────────────────────────────┤
72 │MT-Level │Safe │
73 └─────────────────────────────┴─────────────────────────────┘
74
76 attributes(5)
77
78
79
80SunOS 5.11 20 Aug 2007 TXTRecordCreate(3DNS_SD)