1.\" @(#)rtime.3n 2.1 88/08/08 4.0 RPCSRC; from 1.5 88/02/08 SMI 2.\" $FreeBSD: src/lib/libc/rpc/rtime.3,v 1.4.2.2 2001/12/14 18:33:57 ru Exp $ 3.\" $DragonFly: src/lib/libc/rpc/rtime.3,v 1.2 2003/06/17 04:26:45 dillon Exp $ 4.\" 5.Dd November 22, 1987 6.Dt RTIME 3 7.Os 8.Sh NAME 9.Nm rtime 10.Nd "get remote time" 11.Sh LIBRARY 12.Lb libc 13.Sh SYNOPSIS 14.In sys/types.h 15.In sys/time.h 16.In netinet/in.h 17.In rpc/rpc.h 18.Ft int 19.Fo rtime 20.Fa "struct sockaddr_in *addrp" 21.Fa "struct timeval *timep" 22.Fa "struct timeval *timeout" 23.Fc 24.Sh DESCRIPTION 25.Fn rtime 26consults the Internet Time Server at the address pointed to by 27.Fa addrp 28and returns the remote time in the 29.Vt timeval 30struct pointed to by 31.Fa timep . 32Normally, the 33.Tn UDP 34protocol is used when consulting the Time Server. 35The 36.Fa timeout 37parameter specifies how long the 38routine should wait before giving 39up when waiting for a reply. 40If 41.Fa timeout 42is specified as 43.Dv NULL , 44however, the routine will instead use 45.Tn TCP 46and block until a reply is received from the time server. 47.Sh RETURN VALUES 48.Rv -std rtime 49.Sh SEE ALSO 50.Xr timed 8 51