~ubuntu-branches/ubuntu/oneiric/nis/oneiric-proposed

« back to all changes in this revision

Viewing changes to ypserv-2.18/ypxfr/ypxfr_clnt.c

  • Committer: Bazaar Package Importer
  • Author(s): Scott James Remnant
  • Date: 2005-11-16 23:42:06 UTC
  • mfrom: (1.1.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20051116234206-p00omaw5ji5q0qhr
Tags: 3.15-3ubuntu1
Resynchronise with Debian.  (me)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* Copyright (c) 2000, 2003  Thorsten Kukuk
 
2
   Author: Thorsten Kukuk <kukuk@suse.de>
 
3
 
 
4
   The YP Server is free software; you can redistribute it and/or
 
5
   modify it under the terms of the GNU General Public License
 
6
   version 2 as published by the Free Software Foundation.
 
7
 
 
8
   The YP Server is distributed in the hope that it will be useful,
 
9
   but WITHOUT ANY WARRANTY; without even the implied warranty of
 
10
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 
11
   General Public License for more details.
 
12
 
 
13
   You should have received a copy of the GNU General Public
 
14
   License along with the YP Server; see the file COPYING. If
 
15
   not, write to the Free Software Foundation, Inc., 675 Mass Ave,
 
16
   Cambridge, MA 02139, USA. */
 
17
 
 
18
#ifdef HAVE_CONFIG_H
 
19
#include "config.h"
 
20
#endif
 
21
 
 
22
#define _GNU_SOURCE
 
23
 
 
24
#include <time.h>
 
25
#include <string.h>
 
26
#include <memory.h>
 
27
 
 
28
#include "yp.h"
 
29
#include "ypxfr.h"
 
30
 
 
31
static struct timeval TIMEOUT = { 25, 0 };
 
32
 
 
33
enum clnt_stat
 
34
ypproc_order_2 (ypreq_nokey *argp, ypresp_order *clnt_res, CLIENT *clnt)
 
35
{
 
36
  memset(clnt_res, 0, sizeof(ypresp_order));
 
37
  return (clnt_call(clnt, YPPROC_ORDER,
 
38
                    (xdrproc_t) xdr_ypreq_nokey, (caddr_t) argp,
 
39
                    (xdrproc_t) xdr_ypresp_order, (caddr_t) clnt_res,
 
40
                    TIMEOUT));
 
41
}
 
42
 
 
43
enum clnt_stat
 
44
ypproc_master_2 (ypreq_nokey *argp, ypresp_master *clnt_res, CLIENT *clnt)
 
45
{
 
46
  memset(clnt_res, 0, sizeof(ypresp_master));
 
47
  return (clnt_call(clnt, YPPROC_MASTER,
 
48
                    (xdrproc_t) xdr_ypreq_nokey, (caddr_t) argp,
 
49
                    (xdrproc_t) xdr_ypresp_master, (caddr_t) clnt_res,
 
50
                    TIMEOUT));
 
51
}