xref: /illumos-gate/usr/src/man/man3dns_sd/TXTRecordCreate.3dns_sd (revision a28480febf31f0e61debac062a55216a98a05a92)
te
Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved.
The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
TXTRECORDCREATE 3DNS_SD "Aug 20, 2007"
NAME
TXTRecordCreate, TXTRecordDeallocate, TXTRecordSetValue, TXTRecordRemoveValue, TXTRecordGetLength, TXTRecordGetBytesPtr, TXTRecordContainsKey, TXTRecordGetValuePtr, TXTRecordGetCount, TXTRecordGetItemAtIndex - DNS TXT record manipulation functions
SYNOPSIS

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

void TXTRecordCreate(TXTRecordRef *txtRecord, uint16_t bufferLen,
 void *buffer);

void TXTRecordDeallocate(TXTRecordRef*txtRecord);

DNSServiceErrorType txtRecord(TXTRecordRef *txtRecord,
 const char *key, uint8_t valueSize, const void *value);

DNSServiceErrorType TXTRecordRemoveValue(TXTRecordRef *txtRecord,
 const char *key);

uint16_t TXTRecordGetLength(const TXTRecordRef *txtRecord);

const void *TXTRecordGetBytesPtr(const TXTRecordRef *txtRecord);

int *TXTRecordContainsKey(uint16_t *txtLen,
 const void *txtRecord, const char *key);

const void *TXTRecordGetValuePtr(uint16_t *txtLen,
 const void *txtRecord, const char *key,
 uint8_t *valueLen);

uint16_t *TXTRecordGetCount(uint16_t *txtLen,
 const void *txtRecord);

DNSServiceErrorType TXTRecordGetItemAtIndex(uint16_t *txtLen,
 const void *txtRecord, uint16_t *index,
 uint16_t *keyBufLen, char *key,
 uint8_t *valueLen, const void **value);
DESCRIPTION

These functions in the libdns_sd library allow applications to create and to manipulate TXT resource records. TXT resource records enable applications to include service specific information, other than a host name and port number, as part of the service registration.

ATTRIBUTES

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

ATTRIBUTE TYPE ATTRIBUTE VALUE
Interface Stability Committed
MT-Level Safe
SEE ALSO

attributes(5)