[BACK]Return to time.h CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / external / mpl / bind / dist / lib / dns / include / dns

Annotation of src/external/mpl/bind/dist/lib/dns/include/dns/time.h, Revision 1.1.1.1

1.1       christos    1: /*     $NetBSD$        */
                      2:
                      3: /*
                      4:  * Copyright (C) Internet Systems Consortium, Inc. ("ISC")
                      5:  *
                      6:  * This Source Code Form is subject to the terms of the Mozilla Public
                      7:  * License, v. 2.0. If a copy of the MPL was not distributed with this
                      8:  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
                      9:  *
                     10:  * See the COPYRIGHT file distributed with this work for additional
                     11:  * information regarding copyright ownership.
                     12:  */
                     13:
                     14:
                     15: #ifndef DNS_TIME_H
                     16: #define DNS_TIME_H 1
                     17:
                     18: /*! \file dns/time.h */
                     19:
                     20: /***
                     21:  ***   Imports
                     22:  ***/
                     23:
                     24: #include <isc/buffer.h>
                     25: #include <isc/lang.h>
                     26:
                     27: ISC_LANG_BEGINDECLS
                     28:
                     29: /***
                     30:  ***   Functions
                     31:  ***/
                     32:
                     33: isc_result_t
                     34: dns_time64_fromtext(const char *source, isc_int64_t *target);
                     35: /*%<
                     36:  * Convert a date and time in YYYYMMDDHHMMSS text format at 'source'
                     37:  * into to a 64-bit count of seconds since Jan 1 1970 0:00 GMT.
                     38:  * Store the count at 'target'.
                     39:  */
                     40:
                     41: isc_result_t
                     42: dns_time32_fromtext(const char *source, isc_uint32_t *target);
                     43: /*%<
                     44:  * Like dns_time64_fromtext, but returns the second count modulo 2^32
                     45:  * as per RFC2535.
                     46:  */
                     47:
                     48:
                     49: isc_result_t
                     50: dns_time64_totext(isc_int64_t value, isc_buffer_t *target);
                     51: /*%<
                     52:  * Convert a 64-bit count of seconds since Jan 1 1970 0:00 GMT into
                     53:  * a YYYYMMDDHHMMSS text representation and append it to 'target'.
                     54:  */
                     55:
                     56: isc_result_t
                     57: dns_time32_totext(isc_uint32_t value, isc_buffer_t *target);
                     58: /*%<
                     59:  * Like dns_time64_totext, but for a 32-bit cyclic time value.
                     60:  * Of those dates whose counts of seconds since Jan 1 1970 0:00 GMT
                     61:  * are congruent with 'value' modulo 2^32, the one closest to the
                     62:  * current date is chosen.
                     63:  */
                     64:
                     65: isc_int64_t
                     66: dns_time64_from32(isc_uint32_t value);
                     67: /*%<
                     68:  * Covert a 32-bit cyclic time value into a 64 bit time stamp.
                     69:  */
                     70:
                     71: ISC_LANG_ENDDECLS
                     72:
                     73: #endif /* DNS_TIME_H */

CVSweb <webmaster@jp.NetBSD.org>