[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.2.2.3

1.2.2.3 ! pgoyette    1: /*     $NetBSD: time.h,v 1.2.2.2 2018/09/06 06:55:01 pgoyette Exp $    */
1.2.2.2   pgoyette    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:
1.2.2.3 ! pgoyette   24: #include <inttypes.h>
        !            25:
1.2.2.2   pgoyette   26: #include <isc/buffer.h>
                     27: #include <isc/lang.h>
                     28:
                     29: ISC_LANG_BEGINDECLS
                     30:
                     31: /***
                     32:  ***   Functions
                     33:  ***/
                     34:
                     35: isc_result_t
1.2.2.3 ! pgoyette   36: dns_time64_fromtext(const char *source, int64_t *target);
1.2.2.2   pgoyette   37: /*%<
                     38:  * Convert a date and time in YYYYMMDDHHMMSS text format at 'source'
                     39:  * into to a 64-bit count of seconds since Jan 1 1970 0:00 GMT.
                     40:  * Store the count at 'target'.
                     41:  */
                     42:
                     43: isc_result_t
1.2.2.3 ! pgoyette   44: dns_time32_fromtext(const char *source, uint32_t *target);
1.2.2.2   pgoyette   45: /*%<
                     46:  * Like dns_time64_fromtext, but returns the second count modulo 2^32
                     47:  * as per RFC2535.
                     48:  */
                     49:
                     50:
                     51: isc_result_t
1.2.2.3 ! pgoyette   52: dns_time64_totext(int64_t value, isc_buffer_t *target);
1.2.2.2   pgoyette   53: /*%<
                     54:  * Convert a 64-bit count of seconds since Jan 1 1970 0:00 GMT into
                     55:  * a YYYYMMDDHHMMSS text representation and append it to 'target'.
                     56:  */
                     57:
                     58: isc_result_t
1.2.2.3 ! pgoyette   59: dns_time32_totext(uint32_t value, isc_buffer_t *target);
1.2.2.2   pgoyette   60: /*%<
                     61:  * Like dns_time64_totext, but for a 32-bit cyclic time value.
                     62:  * Of those dates whose counts of seconds since Jan 1 1970 0:00 GMT
                     63:  * are congruent with 'value' modulo 2^32, the one closest to the
                     64:  * current date is chosen.
                     65:  */
                     66:
1.2.2.3 ! pgoyette   67: int64_t
        !            68: dns_time64_from32(uint32_t value);
1.2.2.2   pgoyette   69: /*%<
                     70:  * Covert a 32-bit cyclic time value into a 64 bit time stamp.
                     71:  */
                     72:
                     73: ISC_LANG_ENDDECLS
                     74:
                     75: #endif /* DNS_TIME_H */

CVSweb <webmaster@jp.NetBSD.org>