-/* $OpenBSD: yplib_host.c,v 1.5 1996/05/30 09:53:02 deraadt Exp $ */
+/* $OpenBSD: yplib_host.c,v 1.6 1997/05/01 22:14:44 niklas Exp $ */
/*
* Copyright (c) 1992, 1993 Theo de Raadt <deraadt@theos.com>
*/
#ifndef LINT
-static char *rcsid = "$OpenBSD: yplib_host.c,v 1.5 1996/05/30 09:53:02 deraadt Exp $";
+static char *rcsid = "$OpenBSD: yplib_host.c,v 1.6 1997/05/01 22:14:44 niklas Exp $";
#endif
#include <sys/param.h>
CLIENT *client;
char *indomain;
char *inmap;
-int *outorder;
+u_int32_t *outorder;
{
struct ypresp_order ypro;
struct ypreq_nokey yprnk;
-/* $OpenBSD: yplib_host.h,v 1.3 1996/05/30 09:53:03 deraadt Exp $ */
+/* $OpenBSD: yplib_host.h,v 1.4 1997/05/01 22:14:45 niklas Exp $ */
/*
* Copyright (c) 1992, 1993 Theo de Raadt <deraadt@theos.com>
int yp_master_host __P((CLIENT *client,
char *indomain, char *inmap, char **outname));
int yp_order_host __P((CLIENT *client,
- char *indomain, char *inmap, int *outorder));
+ char *indomain, char *inmap, u_int32_t *outorder));
int yp_all_host __P((CLIENT *client, char *indomain, char *inmap,
struct ypall_callback *incallback));
int yp_maplist_host __P((CLIENT *client, char *indomain,
-/* $OpenBSD: yppush.c,v 1.6 1997/03/15 00:08:58 gene Exp $ */
+/* $OpenBSD: yppush.c,v 1.7 1997/05/01 22:14:46 niklas Exp $ */
/*
* Copyright (c) 1995 Mats O Jansson <moj@stacken.kth.se>
*/
#ifndef lint
-static char rcsid[] = "$OpenBSD: yppush.c,v 1.6 1997/03/15 00:08:58 gene Exp $";
+static char rcsid[] = "$OpenBSD: yppush.c,v 1.7 1997/05/01 22:14:46 niklas Exp $";
#endif /* not lint */
#include <sys/types.h>
int Verbose = 0;
char Domain[MAXHOSTNAMELEN], Map[255];
-u_long OrderNum;
+u_int32_t OrderNum;
char *master;
extern void yppush_xfrrespprog_1(struct svc_req *request, SVCXPRT *xprt);
request.port=transp->xp_port;
if (Verbose)
- printf("%d: %s(%d@%s) -> %s@%s\n",
+ printf("%d: %s(%u@%s) -> %s@%s\n",
request.transid,
request.map_parms.map,
request.map_parms.ordernum,
-/* $OpenBSD: yp.h,v 1.3 1997/03/30 20:51:19 maja Exp $ */
+/* $OpenBSD: yp.h,v 1.4 1997/05/01 22:14:47 niklas Exp $ */
/*
* Please do not edit this file.
struct ypmap_parms {
domainname domain;
mapname map;
- u_int ordernum;
+ u_int32_t ordernum;
peername peer;
};
typedef struct ypmap_parms ypmap_parms;
struct ypresp_order {
ypstat stat;
- u_int ordernum;
+ u_int32_t ordernum;
};
typedef struct ypresp_order ypresp_order;
#ifdef __cplusplus
-/* $OpenBSD: ypserv_db.c,v 1.11 1997/04/12 16:53:06 deraadt Exp $ */
+/* $OpenBSD: ypserv_db.c,v 1.12 1997/05/01 22:14:48 niklas Exp $ */
/*
* Copyright (c) 1994 Mats O Jansson <moj@stacken.kth.se>
*/
#ifndef LINT
-static char rcsid[] = "$OpenBSD: ypserv_db.c,v 1.11 1997/04/12 16:53:06 deraadt Exp $";
+static char rcsid[] = "$OpenBSD: ypserv_db.c,v 1.12 1997/05/01 22:14:48 niklas Exp $";
#endif
/*
} else {
strncpy(order, v.dptr, v.dsize);
order[v.dsize] = '\0';
- res.ordernum = (u_int) atol(order);
+ res.ordernum = (u_int32_t)atol(order);
}
}
-/* $OpenBSD: ypxfr.c,v 1.18 1997/05/01 17:49:45 niklas Exp $ */
+/* $OpenBSD: ypxfr.c,v 1.19 1997/05/01 22:14:48 niklas Exp $ */
/*
* Copyright (c) 1994 Mats O Jansson <moj@stacken.kth.se>
*/
#ifndef LINT
-static char rcsid[] = "$OpenBSD: ypxfr.c,v 1.18 1997/05/01 17:49:45 niklas Exp $";
+static char rcsid[] = "$OpenBSD: ypxfr.c,v 1.19 1997/05/01 22:14:48 niklas Exp $";
#endif
#include <sys/types.h>
get_local_ordernum(domain, map, lordernum)
char *domain;
char *map;
-int *lordernum;
+u_int32_t *lordernum;
{
char map_path[MAXPATHLEN];
char order_key[] = YP_LAST_KEY;
} else {
strncpy(order, v.dptr, sizeof order-1);
order[sizeof order-1] = '\0';
- *lordernum = atoi((char *)&order);
+ *lordernum = (u_int32_t)atol(order);
}
}
CLIENT *client;
char *domain;
char *map;
-int lordernum;
-int *rordernum;
+u_int32_t lordernum;
+u_int32_t *rordernum;
{
int status;
int
add_order(db, ordernum)
DBM *db;
-int ordernum;
+u_int32_t ordernum;
{
char datestr[11];
datum key,val;
char keystr[] = YP_LAST_KEY;
int status;
- sprintf(datestr, "%010d", ordernum);
+ sprintf(datestr, "%010u", ordernum);
key.dptr = keystr;
key.dsize = strlen(keystr);
char *ipadd = NULL;
char *port = NULL;
char *map = NULL;
- int ordernum, new_ordernum;
+ u_int32_t ordernum, new_ordernum;
struct ypall_callback callback;
CLIENT *client;
int status,xfr_status;