[NETAPI32]
[reactos.git] / reactos / dll / 3rdparty / libtirpc / man / rtime.3t
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.8 2002/12/19 09:40:23 ru Exp $
3 .\"
4 .Dd November 22, 1987
5 .Dt RTIME 3
6 .Os
7 .Sh NAME
8 .Nm rtime
9 .Nd "get remote time"
10 .Sh LIBRARY
11 .Lb libc
12 .Sh SYNOPSIS
13 .In sys/types.h
14 .In sys/time.h
15 .In netinet/in.h
16 .Ft int
17 .Fo rtime
18 .Fa "struct sockaddr_in *addrp"
19 .Fa "struct timeval *timep"
20 .Fa "struct timeval *timeout"
21 .Fc
22 .Sh DESCRIPTION
23 The
24 .Fn rtime
25 function
26 consults the Internet Time Server at the address pointed to by
27 .Fa addrp
28 and returns the remote time in the
29 .Vt timeval
30 struct pointed to by
31 .Fa timep .
32 Normally, the
33 .Tn UDP
34 protocol is used when consulting the Time Server.
35 The
36 .Fa timeout
37 argument specifies how long the
38 routine should wait before giving
39 up when waiting for a reply.
40 If
41 .Fa timeout
42 is specified as
43 .Dv NULL ,
44 however, the routine will instead use
45 .Tn TCP
46 and 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