Deleted Added
full compact
ypxfr_getmap.c (90297) ypxfr_getmap.c (90298)
1/*
2 * Copyright (c) 1995
3 * Bill Paul <wpaul@ctr.columbia.edu>. All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 18 unchanged lines hidden (view full) ---

27 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30 * SUCH DAMAGE.
31 */
32
33#ifndef lint
34static const char rcsid[] =
1/*
2 * Copyright (c) 1995
3 * Bill Paul <wpaul@ctr.columbia.edu>. All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 18 unchanged lines hidden (view full) ---

27 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30 * SUCH DAMAGE.
31 */
32
33#ifndef lint
34static const char rcsid[] =
35 "$FreeBSD: head/libexec/ypxfr/ypxfr_getmap.c 90297 2002-02-06 13:30:31Z des $";
35 "$FreeBSD: head/libexec/ypxfr/ypxfr_getmap.c 90298 2002-02-06 15:26:07Z des $";
36#endif /* not lint */
37
38#include <stdio.h>
39#include <time.h>
40#include <sys/types.h>
41#include <rpc/rpc.h>
42#include <rpc/xdr.h>
43#include <rpcsvc/yp.h>

--- 10 unchanged lines hidden (view full) ---

54 * This is largely the same as yp_all() except we do the transfer
55 * from a specific server without the aid of ypbind(8). We need to
56 * be able to specify the source host explicitly since ypxfr may
57 * only transfer maps from the NIS master server for any given domain.
58 * However, if we use the libc version of yp_all(), we could end up
59 * talking to one of the slaves instead. We do need to dig into libc
60 * a little though, since it contains the magic XDR function we need.
61 */
36#endif /* not lint */
37
38#include <stdio.h>
39#include <time.h>
40#include <sys/types.h>
41#include <rpc/rpc.h>
42#include <rpc/xdr.h>
43#include <rpcsvc/yp.h>

--- 10 unchanged lines hidden (view full) ---

54 * This is largely the same as yp_all() except we do the transfer
55 * from a specific server without the aid of ypbind(8). We need to
56 * be able to specify the source host explicitly since ypxfr may
57 * only transfer maps from the NIS master server for any given domain.
58 * However, if we use the libc version of yp_all(), we could end up
59 * talking to one of the slaves instead. We do need to dig into libc
60 * a little though, since it contains the magic XDR function we need.
61 */
62int ypxfr_get_map(map, domain, host, callback)
63 char *map;
64 char *domain;
65 char *host;
66 int (*callback)();
62int
63ypxfr_get_map(char *map, char *domain, char *host,
64 int (*callback)(int, char *, int, char *, int, char*))
67{
68 CLIENT *clnt;
69 ypreq_nokey req;
70 unsigned long status;
71 struct timeval timeout;
72
73 timeout.tv_usec = 0;
74 timeout.tv_sec = 10;

--- 29 unchanged lines hidden ---
65{
66 CLIENT *clnt;
67 ypreq_nokey req;
68 unsigned long status;
69 struct timeval timeout;
70
71 timeout.tv_usec = 0;
72 timeout.tv_sec = 10;

--- 29 unchanged lines hidden ---