summaryrefslogtreecommitdiffstats
path: root/gnu/libexec/ypxfr
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/libexec/ypxfr')
-rw-r--r--gnu/libexec/ypxfr/yp_xdr.c20
-rw-r--r--gnu/libexec/ypxfr/ypclnt.c28
-rw-r--r--gnu/libexec/ypxfr/ypxfr.c8
3 files changed, 28 insertions, 28 deletions
diff --git a/gnu/libexec/ypxfr/yp_xdr.c b/gnu/libexec/ypxfr/yp_xdr.c
index 91a3ad8..850d62e 100644
--- a/gnu/libexec/ypxfr/yp_xdr.c
+++ b/gnu/libexec/ypxfr/yp_xdr.c
@@ -15,40 +15,40 @@ struct {
char *data;
} *xdr_ypall_callback;
-bool_t
+bool_t
__xdr_ypstat(XDR *xdrs, ypstat *objp)
{
-
+
if (!xdr_enum(xdrs, (enum_t *)objp)) {
return (FALSE);
}
return (TRUE);
}
-bool_t
+bool_t
__xdr_valdat(XDR *xdrs, valdat *objp)
{
-
+
if (!xdr_bytes(xdrs, (char **)&objp->valdat_val, (u_int *)&objp->valdat_len, YPMAXRECORD)) {
return (FALSE);
}
return (TRUE);
-}
+}
-bool_t
+bool_t
__xdr_keydat(XDR *xdrs, keydat *objp)
{
-
+
if (!xdr_bytes(xdrs, (char **)&objp->keydat_val, (u_int *)&objp->keydat_len, YPMAXRECORD)) {
return (FALSE);
}
return (TRUE);
-}
+}
bool_t
__xdr_ypresp_key_val(XDR *xdrs, ypresp_key_val *objp)
{
-
+
if (!__xdr_ypstat(xdrs, &objp->stat)) {
return (FALSE);
}
@@ -139,7 +139,7 @@ __xdr_ypresp_all(XDR *xdrs, ypresp_all *objp)
}
}
#endif
-
+
return(TRUE);
}
}
diff --git a/gnu/libexec/ypxfr/ypclnt.c b/gnu/libexec/ypxfr/ypclnt.c
index 9f8a316..04e58b9 100644
--- a/gnu/libexec/ypxfr/ypclnt.c
+++ b/gnu/libexec/ypxfr/ypclnt.c
@@ -18,7 +18,7 @@
Modified for use with FreeBSD 2.x by Bill Paul (wpaul@ctr.columbia.edu)
- $Id: ypclnt.c,v 1.2 1995/02/06 23:35:48 wpaul Exp $
+ $Id: ypclnt.c,v 1.3 1995/03/31 05:45:21 wpaul Exp $
*/
#include <stdio.h>
@@ -40,7 +40,7 @@ struct dom_binding {
void * m;
};
#include <rpcsvc/ypclnt.h>
-
+
static struct sockaddr_in ServerAddress;
static CLIENT *UdpClient=NULL, *TcpClient=NULL;
extern void Perror __P((const char *, ...));
@@ -53,7 +53,7 @@ eachresult( caddr_t resultsp, struct sockaddr_in *raddr)
return((bool_t) TRUE);
}
#endif
-
+
static struct sockaddr_in *
__do_ypbind(domainname d)
{
@@ -73,8 +73,8 @@ __do_ypbind(domainname d)
clnt_pcreateerror("");
return NULL;
}
-
- rc=clnt_call(localBindClient, YPBINDPROC_DOMAIN,
+
+ rc=clnt_call(localBindClient, YPBINDPROC_DOMAIN,
xdr_domainname, (char *)&d, xdr_ypbind_resp, (char *)&r, t);
if (rc) {
clnt_perrno(rc);
@@ -118,16 +118,16 @@ __yp_unbind(char *DomainName)
if (TcpClient) clnt_destroy(TcpClient);
TcpClient=NULL;
}
-
+
int
_yp_bind(struct sockaddr_in *ServerAddress, char *DomainName)
{
struct sockaddr_in UdpServerAddress, TcpServerAddress;
int UdpSockp, TcpSockp;
static struct timeval Wait = { 5, 0 };
-
+
if (UdpClient || TcpClient) __yp_unbind(DomainName);
-
+
bcopy(ServerAddress, &UdpServerAddress, sizeof(*ServerAddress));
UdpServerAddress.sin_port=0;
UdpSockp=(RPC_ANYSOCK);
@@ -145,9 +145,9 @@ _yp_bind(struct sockaddr_in *ServerAddress, char *DomainName)
return(YPERR_RPC);
}
return(0);
-
+
}
-
+
int
__yp_bind(char *DomainName)
{
@@ -156,7 +156,7 @@ __yp_bind(char *DomainName)
static bool_t res;
# endif
static domainname domain;
-
+
domain=DomainName;
# ifndef SOCKSERVER
# ifdef YPBROADCAST
@@ -189,11 +189,11 @@ __yp_all( char *DomainName, char *MapName, struct ypall_callback *CallBack)
ypresp_all *resp;
extern struct ypall_callback *xdr_ypall_callback;
int Status;
-
+
do {
if (TcpClient==NULL)
if ((Status=__yp_bind(DomainName))) return(Status);
-
+
req.domain=DomainName;
req.map=MapName;
xdr_ypall_callback=CallBack;
@@ -219,7 +219,7 @@ _yp_clear(char *DomainName)
{
void *resp;
int Status;
-
+
do {
if (UdpClient==NULL)
if ((Status=yp_bind(DomainName))) return(Status);
diff --git a/gnu/libexec/ypxfr/ypxfr.c b/gnu/libexec/ypxfr/ypxfr.c
index 2c24550..e3a4734 100644
--- a/gnu/libexec/ypxfr/ypxfr.c
+++ b/gnu/libexec/ypxfr/ypxfr.c
@@ -18,7 +18,7 @@
Modified for use with FreeBSD 2.x by Bill Paul (wpaul@ctr.columbia.edu)
- $Id: ypxfr.c,v 1.2 1995/02/06 23:35:49 wpaul Exp $
+ $Id: ypxfr.c,v 1.5 1995/03/31 05:45:23 wpaul Exp $
*/
#include <stdio.h>
@@ -61,7 +61,7 @@ struct dom_binding {
CLIENT *dom_client;
u_short dom_local_port;
long dom_vers;
-};
+};
#define DATUM /* Otherwise ypclnt.h redefines datum */
#include <rpcsvc/ypclnt.h>
@@ -133,7 +133,7 @@ ypxfr_foreach(int status, char *key, int keylen, char *val, int vallen,
static enum ypxfrstat
ypxfr(char *mapName) {
-
+
int localOrderNum=0;
int masterOrderNum=0;
char *masterName;
@@ -264,7 +264,7 @@ ypxfr(char *mapName) {
localHost.sin_addr.s_addr=htonl(INADDR_LOOPBACK);
if (_yp_bind(&localHost, TargetDomain) ||
_yp_clear(TargetDomain)) return YPXFR_CLEAR;
- }
+ }
return y==0?YPXFR_SUCC:YPXFR_YPERR;
}
OpenPOWER on IntegriCloud