Annotation of embedaddon/libpdel/structs/type/structs_type_dnsname.3, revision 1.1.1.1

1.1       misho       1: .\" Copyright (c) 2001-2002 Packet Design, LLC.
                      2: .\" All rights reserved.
                      3: .\" 
                      4: .\" Subject to the following obligations and disclaimer of warranty,
                      5: .\" use and redistribution of this software, in source or object code
                      6: .\" forms, with or without modifications are expressly permitted by
                      7: .\" Packet Design; provided, however, that:
                      8: .\" 
                      9: .\"    (i)  Any and all reproductions of the source or object code
                     10: .\"         must include the copyright notice above and the following
                     11: .\"         disclaimer of warranties; and
                     12: .\"    (ii) No rights are granted, in any manner or form, to use
                     13: .\"         Packet Design trademarks, including the mark "PACKET DESIGN"
                     14: .\"         on advertising, endorsements, or otherwise except as such
                     15: .\"         appears in the above copyright notice or in the software.
                     16: .\" 
                     17: .\" THIS SOFTWARE IS BEING PROVIDED BY PACKET DESIGN "AS IS", AND
                     18: .\" TO THE MAXIMUM EXTENT PERMITTED BY LAW, PACKET DESIGN MAKES NO
                     19: .\" REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, REGARDING
                     20: .\" THIS SOFTWARE, INCLUDING WITHOUT LIMITATION, ANY AND ALL IMPLIED
                     21: .\" WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE,
                     22: .\" OR NON-INFRINGEMENT.  PACKET DESIGN DOES NOT WARRANT, GUARANTEE,
                     23: .\" OR MAKE ANY REPRESENTATIONS REGARDING THE USE OF, OR THE RESULTS
                     24: .\" OF THE USE OF THIS SOFTWARE IN TERMS OF ITS CORRECTNESS, ACCURACY,
                     25: .\" RELIABILITY OR OTHERWISE.  IN NO EVENT SHALL PACKET DESIGN BE
                     26: .\" LIABLE FOR ANY DAMAGES RESULTING FROM OR ARISING OUT OF ANY USE
                     27: .\" OF THIS SOFTWARE, INCLUDING WITHOUT LIMITATION, ANY DIRECT,
                     28: .\" INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, PUNITIVE, OR CONSEQUENTIAL
                     29: .\" DAMAGES, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, LOSS OF
                     30: .\" USE, DATA OR PROFITS, HOWEVER CAUSED AND UNDER ANY THEORY OF
                     31: .\" LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
                     32: .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
                     33: .\" THE USE OF THIS SOFTWARE, EVEN IF PACKET DESIGN IS ADVISED OF
                     34: .\" THE POSSIBILITY OF SUCH DAMAGE.
                     35: .\"
                     36: .\" Author: Archie Cobbs <archie@freebsd.org>
                     37: .\"
                     38: .\" $Id: structs_type_dnsname.3,v 1.6 2004/06/02 17:24:38 archie Exp $
                     39: .\"
                     40: .Dd April 22, 2002
                     41: .Dt STRUCTS_TYPE_ETHER 3
                     42: .Os
                     43: .Sh NAME
                     44: .Nm structs_type_dnsname
                     45: .Nd structs type for DNS resolvable hostnames
                     46: .Sh LIBRARY
                     47: PDEL Library (libpdel, \-lpdel)
                     48: .Sh SYNOPSIS
                     49: .In sys/types.h
                     50: .In pdel/structs/structs.h
                     51: .In pdel/structs/type/array.h
                     52: .In pdel/structs/type/dnsname.h
                     53: .Vt extern const struct structs_type structs_type_dnsname ;
                     54: .Sh DESCRIPTION
                     55: .Va structs_type_dnsname
                     56: is a
                     57: .Xr structs 3
                     58: types for DNS resolvable hostnames.
                     59: The represented data structure is a
                     60: .Li "struct structs_dnsname" ,
                     61: which contains both the ASCII hostname and an array of one or
                     62: more IP addresses that resulted from a DNS lookup:
                     63: .Pp
                     64: .Bd -literal -compact -offset 3n
                     65: DEFINE_STRUCTS_ARRAY(structs_dnsname_ips, struct in_addr);
                     66: 
                     67: struct structs_dnsname {
                     68:     const char                 *name;  /* dns name to look up */
                     69:     struct structs_dnsname_ips ips;    /* array of >= 1 ip addrs */
                     70: };
                     71: .Ed
                     72: .Pp
                     73: The ASCII representation of this type is just the hostname.
                     74: When this ASCII form is converted to native binary form, a
                     75: DNS lookup is performed and the
                     76: .Va ips
                     77: array is filled in with the result.
                     78: If the DNS lookup fails, so too does the ASCII conversion.
                     79: .Sh SEE ALSO
                     80: .Xr libpdel 3 ,
                     81: .Xr structs 3 ,
                     82: .Xr structs_type 3 ,
                     83: .Xr structs_type_array 3
                     84: .Sh HISTORY
                     85: The PDEL library was developed at Packet Design, LLC.
                     86: .Dv "http://www.packetdesign.com/"
                     87: .Sh AUTHORS
                     88: .An Archie Cobbs Aq archie@freebsd.org
                     89: .Sh BUGS
                     90: This type could be made more general, for example supporting MX records
                     91: or IPv6 addresses.

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>