rdataclass.h revision 79a55d4f4dcf3d6f617523228503d8584b72a3a3
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews * Copyright (C) 2004-2007 Internet Systems Consortium, Inc. ("ISC")
40f53fa8d9c6a4fc38c0014495e7a42b08f52481David Lawrence * Copyright (C) 1998-2001 Internet Software Consortium.
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews * Permission to use, copy, modify, and/or distribute this software for any
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews * purpose with or without fee is hereby granted, provided that the above
66bd3b3c6b171271c705b897823dcdcf29464698Michael Graff * copyright notice and this permission notice appear in all copies.
b239c8294a5653d21876d084e0c5b029f6b9fc5dMichael Graff * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
ad3a5c4b7e21af04d1b872f933c2e19e5c0a135bMichael Graff * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
c803787146cadcb2d7e10cbf4491f3be513dfa1aMichael Graff * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
ad3a5c4b7e21af04d1b872f933c2e19e5c0a135bMichael Graff * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
8cdfd17426179ae6f629a9b7475d46a22f535047Bob Halley * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
ad3a5c4b7e21af04d1b872f933c2e19e5c0a135bMichael Graff * PERFORMANCE OF THIS SOFTWARE.
66bd3b3c6b171271c705b897823dcdcf29464698Michael Graff/* $Id: rdataclass.h,v 1.24 2007/06/19 23:47:17 tbox Exp $ */
29f28fe573d4b3b318b3b026d567c1eb86738015Michael Graffdns_rdataclass_fromtext(dns_rdataclass_t *classp, isc_textregion_t *source);
21e7034ec046105c00a0dab86c83732e2e77ad99Michael Graff * Convert the text 'source' refers to into a DNS class.
d1cbf714097e900ed1703529584d3e1a50e8a4a8Brian Wellington *\li 'classp' is a valid pointer.
11efdeb076d65fa9f0c5fc067dc040e7c99dfba6Michael Graff *\li 'source' is a valid text region.
ad3a5c4b7e21af04d1b872f933c2e19e5c0a135bMichael Graff *\li #ISC_R_SUCCESS on success
b239c8294a5653d21876d084e0c5b029f6b9fc5dMichael Graff *\li #DNS_R_UNKNOWN class is unknown
b239c8294a5653d21876d084e0c5b029f6b9fc5dMichael Graffdns_rdataclass_totext(dns_rdataclass_t rdclass, isc_buffer_t *target);
b239c8294a5653d21876d084e0c5b029f6b9fc5dMichael Graff * Put a textual representation of class 'rdclass' into 'target'.
b239c8294a5653d21876d084e0c5b029f6b9fc5dMichael Graff *\li 'rdclass' is a valid class.
b239c8294a5653d21876d084e0c5b029f6b9fc5dMichael Graff *\li 'target' is a valid text buffer.
b239c8294a5653d21876d084e0c5b029f6b9fc5dMichael Graff * if the result is success:
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein *\li The used space in 'target' is updated.
49a940dc68b30d9e4f9e1bd3c0503d8b90bb1726Mark Andrews *\li #ISC_R_SUCCESS on success
d947011dc393d9f9988d1349d585b246d19cc3c7Michael Graff *\li #ISC_R_NOSPACE target buffer is too small
b239c8294a5653d21876d084e0c5b029f6b9fc5dMichael Graffdns_rdataclass_tounknowntext(dns_rdataclass_t rdclass, isc_buffer_t *target);
b239c8294a5653d21876d084e0c5b029f6b9fc5dMichael Graff * Put textual RFC3597 CLASSXXXX representation of class 'rdclass' into
b239c8294a5653d21876d084e0c5b029f6b9fc5dMichael Graff *\li 'rdclass' is a valid class.
b239c8294a5653d21876d084e0c5b029f6b9fc5dMichael Graff *\li 'target' is a valid text buffer.
b239c8294a5653d21876d084e0c5b029f6b9fc5dMichael Graff * if the result is success:
b239c8294a5653d21876d084e0c5b029f6b9fc5dMichael Graff *\li The used space in 'target' is updated.
64828244e04e86dfa40f0a4f0c05f27923da499dMichael Graff *\li #ISC_R_SUCCESS on success
f3350b671881f175d03e16fa5d0f685a1691bcabMark Andrews *\li #ISC_R_NOSPACE target buffer is too small
ff9bb3fc5453bbf310b67c560fbf04a5c0fb60daMichael Graffdns_rdataclass_format(dns_rdataclass_t rdclass,
bb143613cf26e0f27dfd9caf1a7336065d064b26Michael Graff * Format a human-readable representation of the class 'rdclass'
fe14eafefa91fada7cea0a55b09196c01477406cBob Halley * into the character array 'array', which is of size 'size'.
66bd3b3c6b171271c705b897823dcdcf29464698Michael Graff * The resulting string is guaranteed to be null-terminated.
f172f06ff2e7609dd7d91914a44b4e24cff8bb7aAutomatic Updater#define DNS_RDATACLASS_FORMATSIZE sizeof("CLASS65535")
f172f06ff2e7609dd7d91914a44b4e24cff8bb7aAutomatic Updater * Minimum size of array to pass to dns_rdataclass_format().
b239c8294a5653d21876d084e0c5b029f6b9fc5dMichael Graff#endif /* DNS_RDATACLASS_H */