summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys/arch/alpha/stand/netboot/dev_net.c5
-rw-r--r--sys/arch/amd64/stand/pxeboot/net.c11
-rw-r--r--sys/arch/i386/stand/pxeboot/net.c11
-rw-r--r--sys/arch/luna88k/stand/boot/dev_net.c5
-rw-r--r--sys/lib/libsa/arp.c3
-rw-r--r--sys/lib/libsa/bootp.c5
-rw-r--r--sys/lib/libsa/bootparam.c23
-rw-r--r--sys/lib/libsa/ether.c3
-rw-r--r--sys/lib/libsa/globals.c5
-rw-r--r--sys/lib/libsa/in_cksum.c3
-rw-r--r--sys/lib/libsa/net.c11
-rw-r--r--sys/lib/libsa/net.h12
-rw-r--r--sys/lib/libsa/netif.c3
-rw-r--r--sys/lib/libsa/nfs.c73
-rw-r--r--sys/lib/libsa/nfsv2.h46
-rw-r--r--sys/lib/libsa/rarp.c3
-rw-r--r--sys/lib/libsa/rpc.c31
-rw-r--r--sys/lib/libsa/rpc.h4
-rw-r--r--sys/lib/libsa/tftp.c3
19 files changed, 122 insertions, 138 deletions
diff --git a/sys/arch/alpha/stand/netboot/dev_net.c b/sys/arch/alpha/stand/netboot/dev_net.c
index eee6ab71730..46e88fd3281 100644
--- a/sys/arch/alpha/stand/netboot/dev_net.c
+++ b/sys/arch/alpha/stand/netboot/dev_net.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dev_net.c,v 1.3 2002/03/14 03:15:51 millert Exp $ */
+/* $OpenBSD: dev_net.c,v 1.4 2014/07/13 15:31:20 mpi Exp $ */
/* $NetBSD: dev_net.c,v 1.4 1997/04/06 08:41:24 cgd Exp $ */
/*
@@ -55,7 +55,6 @@
#include <net/if.h>
#include <netinet/in.h>
#include <netinet/if_ether.h>
-#include <netinet/in_systm.h>
#include <lib/libsa/stand.h>
#include <lib/libsa/net.h>
@@ -78,7 +77,7 @@ u_char bcea[6] = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff };
struct in_addr myip; /* my ip address */
struct in_addr rootip; /* root ip address */
struct in_addr gateip; /* swap ip address */
-n_long netmask; /* subnet or net mask */
+u_int32_t netmask; /* subnet or net mask */
char rootpath[FNAME_SIZE];
diff --git a/sys/arch/amd64/stand/pxeboot/net.c b/sys/arch/amd64/stand/pxeboot/net.c
index ef2ecb3a9e8..e8d335e95f6 100644
--- a/sys/arch/amd64/stand/pxeboot/net.c
+++ b/sys/arch/amd64/stand/pxeboot/net.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: net.c,v 1.1 2004/03/21 21:37:41 tom Exp $ */
+/* $OpenBSD: net.c,v 1.2 2014/07/13 15:31:20 mpi Exp $ */
/* $NetBSD: net.c,v 1.14 1996/10/13 02:29:02 christos Exp $ */
/*
@@ -48,7 +48,6 @@
#include <netinet/in.h>
#include <netinet/if_ether.h>
-#include <netinet/in_systm.h>
#include <netinet/ip.h>
#include <netinet/ip_var.h>
#include <netinet/udp.h>
@@ -139,7 +138,7 @@ sendrecv(struct iodesc *d, ssize_t (*sproc)(struct iodesc *, void *, size_t),
* Like inet_addr() in the C library, but we only accept base-10.
* Return values are in network order.
*/
-n_long
+u_int32_t
inet_addr(char *cp)
{
u_long val;
@@ -224,7 +223,7 @@ inet_ntoa(struct in_addr ia)
/* Similar to inet_ntoa() */
char *
-intoa(n_long addr)
+intoa(u_int32_t addr)
{
char *cp;
u_int byte;
@@ -261,11 +260,11 @@ number(char *s, int *n)
return s;
}
-n_long
+u_int32_t
ip_convertaddr(char *p)
{
#define IP_ANYADDR 0
- n_long addr = 0, n;
+ u_int32_t addr = 0, n;
if (p == (char *)0 || *p == '\0')
return IP_ANYADDR;
diff --git a/sys/arch/i386/stand/pxeboot/net.c b/sys/arch/i386/stand/pxeboot/net.c
index f6ff146a68f..e8d335e95f6 100644
--- a/sys/arch/i386/stand/pxeboot/net.c
+++ b/sys/arch/i386/stand/pxeboot/net.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: net.c,v 1.1 2004/03/19 13:48:19 tom Exp $ */
+/* $OpenBSD: net.c,v 1.2 2014/07/13 15:31:20 mpi Exp $ */
/* $NetBSD: net.c,v 1.14 1996/10/13 02:29:02 christos Exp $ */
/*
@@ -48,7 +48,6 @@
#include <netinet/in.h>
#include <netinet/if_ether.h>
-#include <netinet/in_systm.h>
#include <netinet/ip.h>
#include <netinet/ip_var.h>
#include <netinet/udp.h>
@@ -139,7 +138,7 @@ sendrecv(struct iodesc *d, ssize_t (*sproc)(struct iodesc *, void *, size_t),
* Like inet_addr() in the C library, but we only accept base-10.
* Return values are in network order.
*/
-n_long
+u_int32_t
inet_addr(char *cp)
{
u_long val;
@@ -224,7 +223,7 @@ inet_ntoa(struct in_addr ia)
/* Similar to inet_ntoa() */
char *
-intoa(n_long addr)
+intoa(u_int32_t addr)
{
char *cp;
u_int byte;
@@ -261,11 +260,11 @@ number(char *s, int *n)
return s;
}
-n_long
+u_int32_t
ip_convertaddr(char *p)
{
#define IP_ANYADDR 0
- n_long addr = 0, n;
+ u_int32_t addr = 0, n;
if (p == (char *)0 || *p == '\0')
return IP_ANYADDR;
diff --git a/sys/arch/luna88k/stand/boot/dev_net.c b/sys/arch/luna88k/stand/boot/dev_net.c
index f6ea191b1e0..da29cccb002 100644
--- a/sys/arch/luna88k/stand/boot/dev_net.c
+++ b/sys/arch/luna88k/stand/boot/dev_net.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dev_net.c,v 1.2 2013/10/29 21:49:07 miod Exp $ */
+/* $OpenBSD: dev_net.c,v 1.3 2014/07/13 15:31:20 mpi Exp $ */
/* $NetBSD: dev_net.c,v 1.26 2011/07/17 20:54:52 joerg Exp $ */
/*-
@@ -51,7 +51,6 @@
#include <sys/param.h>
#include <sys/socket.h>
#include <netinet/in.h>
-#include <netinet/in_systm.h>
#include <lib/libkern/libkern.h>
@@ -204,7 +203,7 @@ static int
net_getparams(int sock)
{
char buf[MAXHOSTNAMELEN];
- n_long smask;
+ u_int32_t smask;
#ifdef SUPPORT_BOOTP
/*
diff --git a/sys/lib/libsa/arp.c b/sys/lib/libsa/arp.c
index ff4623737c4..8bef3942a9d 100644
--- a/sys/lib/libsa/arp.c
+++ b/sys/lib/libsa/arp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: arp.c,v 1.11 2003/08/11 06:23:09 deraadt Exp $ */
+/* $OpenBSD: arp.c,v 1.12 2014/07/13 15:31:20 mpi Exp $ */
/* $NetBSD: arp.c,v 1.15 1996/10/13 02:28:58 christos Exp $ */
/*
@@ -46,7 +46,6 @@
#include <netinet/in.h>
#include <netinet/if_ether.h>
-#include <netinet/in_systm.h>
#include "stand.h"
#include "net.h"
diff --git a/sys/lib/libsa/bootp.c b/sys/lib/libsa/bootp.c
index 0637327db04..692dc4fd119 100644
--- a/sys/lib/libsa/bootp.c
+++ b/sys/lib/libsa/bootp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: bootp.c,v 1.13 2014/03/28 01:12:58 guenther Exp $ */
+/* $OpenBSD: bootp.c,v 1.14 2014/07/13 15:31:20 mpi Exp $ */
/* $NetBSD: bootp.c,v 1.10 1996/10/13 02:28:59 christos Exp $ */
/*
@@ -43,14 +43,13 @@
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
-#include <netinet/in_systm.h>
#include "stand.h"
#include "net.h"
#include "netif.h"
#include "bootp.h"
-static n_long nmask, smask;
+static u_int32_t nmask, smask;
static time_t bot;
diff --git a/sys/lib/libsa/bootparam.c b/sys/lib/libsa/bootparam.c
index 0ca999fe417..8bf8be46c87 100644
--- a/sys/lib/libsa/bootparam.c
+++ b/sys/lib/libsa/bootparam.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: bootparam.c,v 1.11 2003/08/11 06:23:09 deraadt Exp $ */
+/* $OpenBSD: bootparam.c,v 1.12 2014/07/13 15:31:20 mpi Exp $ */
/* $NetBSD: bootparam.c,v 1.10 1996/10/14 21:16:55 thorpej Exp $ */
/*
@@ -41,7 +41,6 @@
#include <net/if.h>
#include <netinet/in.h>
-#include <netinet/in_systm.h>
#include <nfs/rpcv2.h>
@@ -58,7 +57,7 @@
#endif
struct in_addr bp_server_addr; /* net order */
-n_short bp_server_port; /* net order */
+u_int16_t bp_server_port; /* net order */
/*
* RPC definitions for bootparamd
@@ -115,14 +114,14 @@ bp_whoami(int sockfd)
u_int16_t port;
u_int32_t encap_len;
/* encapsulated data here */
- n_long capsule[64];
+ u_int32_t capsule[64];
} *repl;
struct {
- n_long h[RPC_HEADER_WORDS];
+ u_int32_t h[RPC_HEADER_WORDS];
struct args d;
} sdata;
struct {
- n_long h[RPC_HEADER_WORDS];
+ u_int32_t h[RPC_HEADER_WORDS];
struct repl d;
} rdata;
char *send_tail, *recv_head;
@@ -229,12 +228,12 @@ int
bp_getfile(int sockfd, char *key, struct in_addr *serv_addr, char *pathname)
{
struct {
- n_long h[RPC_HEADER_WORDS];
- n_long d[64];
+ u_int32_t h[RPC_HEADER_WORDS];
+ u_int32_t d[64];
} sdata;
struct {
- n_long h[RPC_HEADER_WORDS];
- n_long d[128];
+ u_int32_t h[RPC_HEADER_WORDS];
+ u_int32_t d[128];
} rdata;
char serv_name[FNAME_SIZE];
char *send_tail, *recv_head;
@@ -368,7 +367,7 @@ xdr_inaddr_encode(char **pkt, struct in_addr ia)
u_char *cp;
int32_t *ip;
union {
- n_long l; /* network order */
+ u_int32_t l; /* network order */
u_char c[4];
} uia;
@@ -399,7 +398,7 @@ xdr_inaddr_decode(char **pkt, struct in_addr *ia)
u_char *cp;
int32_t *ip;
union {
- n_long l; /* network order */
+ u_int32_t l; /* network order */
u_char c[4];
} uia;
diff --git a/sys/lib/libsa/ether.c b/sys/lib/libsa/ether.c
index 38d9d320301..19e13a10a37 100644
--- a/sys/lib/libsa/ether.c
+++ b/sys/lib/libsa/ether.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ether.c,v 1.7 2003/08/11 06:23:09 deraadt Exp $ */
+/* $OpenBSD: ether.c,v 1.8 2014/07/13 15:31:20 mpi Exp $ */
/* $NetBSD: ether.c,v 1.8 1996/10/13 02:29:00 christos Exp $ */
/*
@@ -47,7 +47,6 @@
#include <netinet/in.h>
#include <netinet/if_ether.h>
-#include <netinet/in_systm.h>
#include <netinet/ip.h>
#include "stand.h"
diff --git a/sys/lib/libsa/globals.c b/sys/lib/libsa/globals.c
index 5150d89fd15..5b67ee9a983 100644
--- a/sys/lib/libsa/globals.c
+++ b/sys/lib/libsa/globals.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: globals.c,v 1.3 1996/09/23 14:18:54 mickey Exp $ */
+/* $OpenBSD: globals.c,v 1.4 2014/07/13 15:31:20 mpi Exp $ */
/* $NetBSD: globals.c,v 1.3 1995/09/18 21:19:27 pk Exp $ */
/*
@@ -12,7 +12,6 @@
#include <sys/socket.h>
#include <net/if.h>
#include <netinet/in.h>
-#include <netinet/in_systm.h>
#include "stand.h"
#include "net.h"
@@ -31,4 +30,4 @@ struct in_addr nameip; /* DNS server ip address */
struct in_addr rootip; /* root ip address */
struct in_addr swapip; /* swap ip address */
struct in_addr gateip; /* swap ip address */
-n_long netmask = 0xffffff00; /* subnet or net mask */
+u_int32_t netmask = 0xffffff00; /* subnet or net mask */
diff --git a/sys/lib/libsa/in_cksum.c b/sys/lib/libsa/in_cksum.c
index f9a12cd8791..e33781ff965 100644
--- a/sys/lib/libsa/in_cksum.c
+++ b/sys/lib/libsa/in_cksum.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: in_cksum.c,v 1.3 2003/08/11 06:23:09 deraadt Exp $ */
+/* $OpenBSD: in_cksum.c,v 1.4 2014/07/13 15:31:20 mpi Exp $ */
/* $NetBSD: in_cksum.c,v 1.3 1995/04/22 13:53:48 cgd Exp $ */
/*
@@ -46,7 +46,6 @@
#include <netinet/in.h>
#include <netinet/if_ether.h>
-#include <netinet/in_systm.h>
#include "stand.h"
#include "net.h"
diff --git a/sys/lib/libsa/net.c b/sys/lib/libsa/net.c
index eeea424abca..1073dad6e01 100644
--- a/sys/lib/libsa/net.c
+++ b/sys/lib/libsa/net.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: net.c,v 1.13 2003/08/11 06:23:09 deraadt Exp $ */
+/* $OpenBSD: net.c,v 1.14 2014/07/13 15:31:20 mpi Exp $ */
/* $NetBSD: net.c,v 1.14 1996/10/13 02:29:02 christos Exp $ */
/*
@@ -48,7 +48,6 @@
#include <netinet/in.h>
#include <netinet/if_ether.h>
-#include <netinet/in_systm.h>
#include <netinet/ip.h>
#include <netinet/ip_var.h>
#include <netinet/udp.h>
@@ -321,7 +320,7 @@ sendrecv(struct iodesc *d, ssize_t (*sproc)(struct iodesc *, void *, size_t),
* Like inet_addr() in the C library, but we only accept base-10.
* Return values are in network order.
*/
-n_long
+u_int32_t
inet_addr(char *cp)
{
u_long val;
@@ -406,7 +405,7 @@ inet_ntoa(struct in_addr ia)
/* Similar to inet_ntoa() */
char *
-intoa(n_long addr)
+intoa(u_int32_t addr)
{
char *cp;
u_int byte;
@@ -443,11 +442,11 @@ number(char *s, int *n)
return s;
}
-n_long
+u_int32_t
ip_convertaddr(char *p)
{
#define IP_ANYADDR 0
- n_long addr = 0, n;
+ u_int32_t addr = 0, n;
if (p == (char *)0 || *p == '\0')
return IP_ANYADDR;
diff --git a/sys/lib/libsa/net.h b/sys/lib/libsa/net.h
index 478ab34eb62..c93d7ecb1a9 100644
--- a/sys/lib/libsa/net.h
+++ b/sys/lib/libsa/net.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: net.h,v 1.8 2014/03/28 01:12:58 guenther Exp $ */
+/* $OpenBSD: net.h,v 1.9 2014/07/13 15:31:20 mpi Exp $ */
/* $NetBSD: net.h,v 1.10 1995/10/20 00:46:30 cgd Exp $ */
/*
@@ -48,7 +48,7 @@
#define BA { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff }
-/* Returns true if n_long's on the same net */
+/* Returns true if u_int32_t's on the same net */
#define SAMENET(a1, a2, m) ((a1.s_addr & m) == (a2.s_addr & m))
#define MACPY(s, d) bcopy((char *)s, (char *)d, 6)
@@ -88,7 +88,7 @@ extern struct in_addr rootip;
extern struct in_addr swapip;
extern struct in_addr gateip;
extern struct in_addr nameip;
-extern n_long netmask;
+extern u_int32_t netmask;
extern int debug; /* defined in the machdep sources */
@@ -98,7 +98,7 @@ extern struct iodesc sockets[SOPEN_MAX];
u_char *arpwhohas(struct iodesc *, struct in_addr);
void arp_reply(struct iodesc *, void *);
int rarp_getipaddress(int);
-n_long ip_convertaddr(char *);
+u_int32_t ip_convertaddr(char *);
/* Link functions: */
ssize_t sendether(struct iodesc *d, void *pkt, size_t len,
@@ -117,8 +117,8 @@ ssize_t sendrecv(struct iodesc *,
char *ether_sprintf(u_char *);
int in_cksum(void *, int);
char *inet_ntoa(struct in_addr);
-char *intoa(n_long); /* similar to inet_ntoa */
-n_long inet_addr(char *);
+char *intoa(u_int32_t); /* similar to inet_ntoa */
+u_int32_t inet_addr(char *);
/* Machine-dependent functions: */
time_t getsecs(void);
diff --git a/sys/lib/libsa/netif.c b/sys/lib/libsa/netif.c
index 15c0785c20f..083d962224b 100644
--- a/sys/lib/libsa/netif.c
+++ b/sys/lib/libsa/netif.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: netif.c,v 1.9 2012/12/05 23:20:23 deraadt Exp $ */
+/* $OpenBSD: netif.c,v 1.10 2014/07/13 15:31:20 mpi Exp $ */
/* $NetBSD: netif.c,v 1.7 1996/10/13 02:29:03 christos Exp $ */
/*
@@ -37,7 +37,6 @@
#include <sys/mount.h>
#include <netinet/in.h>
-#include <netinet/in_systm.h>
#include "stand.h"
#include "net.h"
diff --git a/sys/lib/libsa/nfs.c b/sys/lib/libsa/nfs.c
index 86e0b65d1dd..08b059d34ab 100644
--- a/sys/lib/libsa/nfs.c
+++ b/sys/lib/libsa/nfs.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: nfs.c,v 1.10 2003/08/11 06:23:09 deraadt Exp $ */
+/* $OpenBSD: nfs.c,v 1.11 2014/07/13 15:31:20 mpi Exp $ */
/* $NetBSD: nfs.c,v 1.19 1996/10/13 02:29:04 christos Exp $ */
/*-
@@ -35,7 +35,6 @@
#include <sys/stat.h>
#include <netinet/in.h>
-#include <netinet/in_systm.h>
#include "rpcv2.h"
#include "nfsv2.h"
@@ -49,17 +48,17 @@
/* Define our own NFS attributes without NQNFS stuff. */
struct nfsv2_fattrs {
- n_long fa_type;
- n_long fa_mode;
- n_long fa_nlink;
- n_long fa_uid;
- n_long fa_gid;
- n_long fa_size;
- n_long fa_blocksize;
- n_long fa_rdev;
- n_long fa_blocks;
- n_long fa_fsid;
- n_long fa_fileid;
+ u_int32_t fa_type;
+ u_int32_t fa_mode;
+ u_int32_t fa_nlink;
+ u_int32_t fa_uid;
+ u_int32_t fa_gid;
+ u_int32_t fa_size;
+ u_int32_t fa_blocksize;
+ u_int32_t fa_rdev;
+ u_int32_t fa_blocks;
+ u_int32_t fa_fsid;
+ u_int32_t fa_fileid;
struct nfsv2_time fa_atime;
struct nfsv2_time fa_mtime;
struct nfsv2_time fa_ctime;
@@ -68,23 +67,23 @@ struct nfsv2_fattrs {
struct nfs_read_args {
u_char fh[NFS_FHSIZE];
- n_long off;
- n_long len;
- n_long xxx; /* XXX what's this for? */
+ u_int32_t off;
+ u_int32_t len;
+ u_int32_t xxx; /* XXX what's this for? */
};
/* Data part of nfs rpc reply (also the largest thing we receive) */
#define NFSREAD_SIZE 1024
struct nfs_read_repl {
- n_long errno;
+ u_int32_t errno;
struct nfsv2_fattrs fa;
- n_long count;
+ u_int32_t count;
u_char data[NFSREAD_SIZE];
};
struct nfs_readlnk_repl {
- n_long errno;
- n_long len;
+ u_int32_t errno;
+ u_int32_t len;
char path[NFS_MAXPATHLEN];
};
@@ -107,19 +106,19 @@ nfs_getrootfh(struct iodesc *d, char *path, u_char *fhp)
{
int len;
struct args {
- n_long len;
+ u_int32_t len;
char path[FNAME_SIZE];
} *args;
struct repl {
- n_long errno;
+ u_int32_t errno;
u_char fh[NFS_FHSIZE];
} *repl;
struct {
- n_long h[RPC_HEADER_WORDS];
+ u_int32_t h[RPC_HEADER_WORDS];
struct args d;
} sdata;
struct {
- n_long h[RPC_HEADER_WORDS];
+ u_int32_t h[RPC_HEADER_WORDS];
struct repl d;
} rdata;
size_t cc;
@@ -168,20 +167,20 @@ nfs_lookupfh(struct nfs_iodesc *d, char *name, struct nfs_iodesc *newfd)
int len, rlen;
struct args {
u_char fh[NFS_FHSIZE];
- n_long len;
+ u_int32_t len;
char name[FNAME_SIZE];
} *args;
struct repl {
- n_long errno;
+ u_int32_t errno;
u_char fh[NFS_FHSIZE];
struct nfsv2_fattrs fa;
} *repl;
struct {
- n_long h[RPC_HEADER_WORDS];
+ u_int32_t h[RPC_HEADER_WORDS];
struct args d;
} sdata;
struct {
- n_long h[RPC_HEADER_WORDS];
+ u_int32_t h[RPC_HEADER_WORDS];
struct repl d;
} rdata;
ssize_t cc;
@@ -228,11 +227,11 @@ static int
nfs_readlink(struct nfs_iodesc *d, char *buf)
{
struct {
- n_long h[RPC_HEADER_WORDS];
+ u_int32_t h[RPC_HEADER_WORDS];
u_char fh[NFS_FHSIZE];
} sdata;
struct {
- n_long h[RPC_HEADER_WORDS];
+ u_int32_t h[RPC_HEADER_WORDS];
struct nfs_readlnk_repl d;
} rdata;
ssize_t cc;
@@ -274,11 +273,11 @@ nfs_readdata(struct nfs_iodesc *d, off_t off, void *addr, size_t len)
struct nfs_read_args *args;
struct nfs_read_repl *repl;
struct {
- n_long h[RPC_HEADER_WORDS];
+ u_int32_t h[RPC_HEADER_WORDS];
struct nfs_read_args d;
} sdata;
struct {
- n_long h[RPC_HEADER_WORDS];
+ u_int32_t h[RPC_HEADER_WORDS];
struct nfs_read_repl d;
} rdata;
size_t cc;
@@ -289,11 +288,11 @@ nfs_readdata(struct nfs_iodesc *d, off_t off, void *addr, size_t len)
repl = &rdata.d;
bcopy(d->fh, args->fh, NFS_FHSIZE);
- args->off = htonl((n_long)off);
+ args->off = htonl((u_int32_t)off);
if (len > NFSREAD_SIZE)
len = NFSREAD_SIZE;
- args->len = htonl((n_long)len);
- args->xxx = htonl((n_long)0);
+ args->len = htonl((u_int32_t)len);
+ args->xxx = htonl((u_int32_t)0);
hlen = sizeof(*repl) - NFSREAD_SIZE;
cc = rpc_call(d->iodesc, NFS_PROG, NFS_VER2, NFSPROC_READ,
@@ -564,7 +563,7 @@ off_t
nfs_seek(struct open_file *f, off_t offset, int where)
{
struct nfs_iodesc *d = (struct nfs_iodesc *)f->f_fsdata;
- n_long size = ntohl(d->fa.fa_size);
+ u_int32_t size = ntohl(d->fa.fa_size);
switch (where) {
case SEEK_SET:
@@ -591,7 +590,7 @@ int
nfs_stat(struct open_file *f, struct stat *sb)
{
struct nfs_iodesc *fp = (struct nfs_iodesc *)f->f_fsdata;
- n_long ftype, mode;
+ u_int32_t ftype, mode;
ftype = ntohl(fp->fa.fa_type);
mode = ntohl(fp->fa.fa_mode);
diff --git a/sys/lib/libsa/nfsv2.h b/sys/lib/libsa/nfsv2.h
index 6f516745450..4c4e68512fe 100644
--- a/sys/lib/libsa/nfsv2.h
+++ b/sys/lib/libsa/nfsv2.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: nfsv2.h,v 1.5 2003/06/02 23:28:09 millert Exp $ */
+/* $OpenBSD: nfsv2.h,v 1.6 2014/07/13 15:31:20 mpi Exp $ */
/* $NetBSD: nfsv2.h,v 1.2 1996/02/26 23:05:23 gwr Exp $ */
/*
@@ -121,43 +121,43 @@ typedef enum {
/* Structs for common parts of the rpc's */
struct nfsv2_time {
- n_long nfs_sec;
- n_long nfs_usec;
+ u_int32_t nfs_sec;
+ u_int32_t nfs_usec;
};
/*
* File attributes and setable attributes.
*/
struct nfsv2_fattr {
- n_long fa_type;
- n_long fa_mode;
- n_long fa_nlink;
- n_long fa_uid;
- n_long fa_gid;
- n_long fa_size;
- n_long fa_blocksize;
- n_long fa_rdev;
- n_long fa_blocks;
- n_long fa_fsid;
- n_long fa_fileid;
+ u_int32_t fa_type;
+ u_int32_t fa_mode;
+ u_int32_t fa_nlink;
+ u_int32_t fa_uid;
+ u_int32_t fa_gid;
+ u_int32_t fa_size;
+ u_int32_t fa_blocksize;
+ u_int32_t fa_rdev;
+ u_int32_t fa_blocks;
+ u_int32_t fa_fsid;
+ u_int32_t fa_fileid;
struct nfsv2_time fa_atime;
struct nfsv2_time fa_mtime;
struct nfsv2_time fa_ctime;
};
struct nfsv2_sattr {
- n_long sa_mode;
- n_long sa_uid;
- n_long sa_gid;
- n_long sa_size;
+ u_int32_t sa_mode;
+ u_int32_t sa_uid;
+ u_int32_t sa_gid;
+ u_int32_t sa_size;
struct nfsv2_time sa_atime;
struct nfsv2_time sa_mtime;
};
struct nfsv2_statfs {
- n_long sf_tsize;
- n_long sf_bsize;
- n_long sf_blocks;
- n_long sf_bfree;
- n_long sf_bavail;
+ u_int32_t sf_tsize;
+ u_int32_t sf_bsize;
+ u_int32_t sf_blocks;
+ u_int32_t sf_bfree;
+ u_int32_t sf_bavail;
};
diff --git a/sys/lib/libsa/rarp.c b/sys/lib/libsa/rarp.c
index b21152bc0a1..f8f6f713140 100644
--- a/sys/lib/libsa/rarp.c
+++ b/sys/lib/libsa/rarp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rarp.c,v 1.10 2003/08/11 06:23:09 deraadt Exp $ */
+/* $OpenBSD: rarp.c,v 1.11 2014/07/13 15:31:20 mpi Exp $ */
/* $NetBSD: rarp.c,v 1.13 1996/10/13 02:29:05 christos Exp $ */
/*
@@ -45,7 +45,6 @@
#include <netinet/in.h>
#include <netinet/if_ether.h>
-#include <netinet/in_systm.h>
#include "stand.h"
#include "net.h"
diff --git a/sys/lib/libsa/rpc.c b/sys/lib/libsa/rpc.c
index 2e51b4f835c..a15a02304ff 100644
--- a/sys/lib/libsa/rpc.c
+++ b/sys/lib/libsa/rpc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rpc.c,v 1.13 2003/08/11 06:23:09 deraadt Exp $ */
+/* $OpenBSD: rpc.c,v 1.14 2014/07/13 15:31:20 mpi Exp $ */
/* $NetBSD: rpc.c,v 1.16 1996/10/13 02:29:06 christos Exp $ */
/*
@@ -52,7 +52,6 @@
#include <sys/socket.h>
#include <netinet/in.h>
-#include <netinet/in_systm.h>
#include <nfs/rpcv2.h>
@@ -98,7 +97,7 @@ struct rpc_reply {
/* Local forwards */
static ssize_t recvrpc(struct iodesc *, void *, size_t, time_t);
-static int rpc_getport(struct iodesc *, n_long, n_long);
+static int rpc_getport(struct iodesc *, u_int32_t, u_int32_t);
int rpc_xid;
int rpc_port = 0x400; /* predecrement */
@@ -108,7 +107,7 @@ int rpc_port = 0x400; /* predecrement */
* Note: Caller must leave room for headers.
*/
ssize_t
-rpc_call(struct iodesc *d, n_long prog, n_long vers, n_long proc, void *sdata,
+rpc_call(struct iodesc *d, u_int32_t prog, u_int32_t vers, u_int32_t proc, void *sdata,
size_t slen, void *rdata, size_t rlen)
{
ssize_t cc;
@@ -117,7 +116,7 @@ rpc_call(struct iodesc *d, n_long prog, n_long vers, n_long proc, void *sdata,
struct rpc_reply *reply;
char *send_head, *send_tail;
char *recv_head, *recv_tail;
- n_long x;
+ u_int32_t x;
int port; /* host order */
#ifdef RPC_DEBUG
@@ -283,8 +282,8 @@ rpc_fromaddr(void *pkt, struct in_addr *addr, u_short *port)
{
struct hackhdr {
/* Tail of IP header: just IP addresses */
- n_long ip_src;
- n_long ip_dst;
+ u_int32_t ip_src;
+ u_int32_t ip_dst;
/* UDP header: */
u_int16_t uh_sport; /* source port */
u_int16_t uh_dport; /* destination port */
@@ -356,25 +355,25 @@ rpc_pmap_putcache(struct in_addr addr, u_int prog, u_int vers, int port)
* Returns the port in host order.
*/
int
-rpc_getport(struct iodesc *d, n_long prog, n_long vers)
+rpc_getport(struct iodesc *d, u_int32_t prog, u_int32_t vers)
{
struct args {
- n_long prog; /* call program */
- n_long vers; /* call version */
- n_long proto; /* call protocol */
- n_long port; /* call port (unused) */
+ u_int32_t prog; /* call program */
+ u_int32_t vers; /* call version */
+ u_int32_t proto; /* call protocol */
+ u_int32_t port; /* call port (unused) */
} *args;
struct res {
- n_long port;
+ u_int32_t port;
} *res;
struct {
- n_long h[RPC_HEADER_WORDS];
+ u_int32_t h[RPC_HEADER_WORDS];
struct args d;
} sdata;
struct {
- n_long h[RPC_HEADER_WORDS];
+ u_int32_t h[RPC_HEADER_WORDS];
struct res d;
- n_long pad;
+ u_int32_t pad;
} rdata;
ssize_t cc;
int port;
diff --git a/sys/lib/libsa/rpc.h b/sys/lib/libsa/rpc.h
index 724c3f801ef..1404bc378ac 100644
--- a/sys/lib/libsa/rpc.h
+++ b/sys/lib/libsa/rpc.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: rpc.h,v 1.5 2003/08/11 06:23:09 deraadt Exp $ */
+/* $OpenBSD: rpc.h,v 1.6 2014/07/13 15:31:20 mpi Exp $ */
/* $NetBSD: rpc.h,v 1.8 1996/09/26 23:22:03 cgd Exp $ */
/*
@@ -50,7 +50,7 @@
#define PMAPPROC_CALLIT 5
/* RPC functions: */
-ssize_t rpc_call(struct iodesc *, n_long, n_long, n_long,
+ssize_t rpc_call(struct iodesc *, u_int32_t, u_int32_t, u_int32_t,
void *, size_t, void *, size_t);
void rpc_fromaddr(void *, struct in_addr *, u_short *);
int rpc_pmap_getcache(struct in_addr, u_int, u_int);
diff --git a/sys/lib/libsa/tftp.c b/sys/lib/libsa/tftp.c
index 3402326f381..3eea8bbe66e 100644
--- a/sys/lib/libsa/tftp.c
+++ b/sys/lib/libsa/tftp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tftp.c,v 1.5 2014/06/10 09:36:42 brad Exp $ */
+/* $OpenBSD: tftp.c,v 1.6 2014/07/13 15:31:20 mpi Exp $ */
/* $NetBSD: tftp.c,v 1.15 2003/08/18 15:45:29 dsl Exp $ */
/*
@@ -51,7 +51,6 @@
#include <sys/stat.h>
#include <netinet/in.h>
#include <netinet/udp.h>
-#include <netinet/in_systm.h>
#include <lib/libkern/libkern.h>
#include "stand.h"