KRB5_TIMEOFDAY(3) BSD Library Functions Manual KRB5_TIMEOFDAY(3) NNAAMMEE kkrrbb55__ttiimmeeooffddaayy, kkrrbb55__sseett__rreeaall__ttiimmee, kkrrbb55__uuss__ttiimmeeooffddaayy, kkrrbb55__ffoorrmmaatt__ttiimmee, kkrrbb55__ssttrriinngg__ttoo__ddeellttaatt -- Kerberos 5 time handling functions LLIIBBRRAARRYY Kerberos 5 Library (libkrb5, -lkrb5) SSYYNNOOPPSSIISS ##iinncclluuddee <> krb5_timestamp; krb5_deltat; _k_r_b_5___e_r_r_o_r___c_o_d_e kkrrbb55__sseett__rreeaall__ttiimmee(_k_r_b_5___c_o_n_t_e_x_t _c_o_n_t_e_x_t, _k_r_b_5___t_i_m_e_s_t_a_m_p _s_e_c, _i_n_t_3_2___t _u_s_e_c); _k_r_b_5___e_r_r_o_r___c_o_d_e kkrrbb55__ttiimmeeooffddaayy(_k_r_b_5___c_o_n_t_e_x_t _c_o_n_t_e_x_t, _k_r_b_5___t_i_m_e_s_t_a_m_p _*_t_i_m_e_r_e_t); _k_r_b_5___e_r_r_o_r___c_o_d_e kkrrbb55__uuss__ttiimmeeooffddaayy(_k_r_b_5___c_o_n_t_e_x_t _c_o_n_t_e_x_t, _k_r_b_5___t_i_m_e_s_t_a_m_p _*_s_e_c, _i_n_t_3_2___t _*_u_s_e_c); _k_r_b_5___e_r_r_o_r___c_o_d_e kkrrbb55__ffoorrmmaatt__ttiimmee(_k_r_b_5___c_o_n_t_e_x_t _c_o_n_t_e_x_t, _t_i_m_e___t _t, _c_h_a_r _*_s, _s_i_z_e___t _l_e_n, _k_r_b_5___b_o_o_l_e_a_n _i_n_c_l_u_d_e___t_i_m_e); _k_r_b_5___e_r_r_o_r___c_o_d_e kkrrbb55__ssttrriinngg__ttoo__ddeellttaatt(_c_o_n_s_t _c_h_a_r _*_s_t_r_i_n_g, _k_r_b_5___d_e_l_t_a_t _*_d_e_l_t_a_t); DDEESSCCRRIIPPTTIIOONN kkrrbb55__sseett__rreeaall__ttiimmee sets the absolute time that the caller knows the KDC has. With this the Kerberos library can calculate the relative differ- ence between the KDC time and the local system time and store it in the _c_o_n_t_e_x_t. With this information the Kerberos library can adjust all time stamps in Kerberos packages. kkrrbb55__ttiimmeeooffddaayy() returns the current time, but adjusted with the time difference between the local host and the KDC. kkrrbb55__uuss__ttiimmeeooffddaayy() also returns microseconds. kkrrbb55__ffoorrmmaatt__ttiimmee formats the time _t into the string _s of length _l_e_n. If _i_n_c_l_u_d_e___t_i_m_e is set, the time is set include_time. kkrrbb55__ssttrriinngg__ttoo__ddeellttaatt parses delta time _s_t_r_i_n_g into _d_e_l_t_a_t. SSEEEE AALLSSOO gettimeofday(2), krb5(3) HEIMDAL September 16, 2006 HEIMDAL