Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

OpenBSD 3.5

  • Loading branch information...
commit e5d3946da323848c479c3307d8abd32db6e394f4 1 parent b04daae
itojun authored
Showing with 6,636 additions and 775 deletions.
  1. +6 −3 openbsd/bin/ls/ls.1
  2. +10 −6 openbsd/bin/ls/print.c
  3. +25 −9 openbsd/include/Makefile
  4. +3 −3 openbsd/include/arpa/inet.h
  5. +22 −9 openbsd/include/arpa/nameser.h
  6. +3 −1 openbsd/include/arpa/tftp.h
  7. +11 −11 openbsd/include/bm.h
  8. +33 −21 openbsd/include/ctype.h
  9. +35 −33 openbsd/include/db.h
  10. +4 −4 openbsd/include/fts.h
  11. +2 −2 openbsd/include/ifaddrs.h
  12. +8 −3 openbsd/include/kvm.h
  13. +8 −8 openbsd/include/link.h
  14. +2 −2 openbsd/include/link_aout.h
  15. +4 −4 openbsd/include/login_cap.h
  16. +14 −7 openbsd/include/md4.h
  17. +14 −7 openbsd/include/md5.h
  18. +14 −14 openbsd/include/mpool.h
  19. +3 −1 openbsd/include/poll.h
  20. +20 −18 openbsd/include/protocols/talkd.h
  21. +67 −59 openbsd/include/resolv.h
  22. +18 −11 openbsd/include/rmd160.h
  23. +6 −5 openbsd/include/rpc/auth.h
  24. +7 −7 openbsd/include/rpc/auth_unix.h
  25. +36 −36 openbsd/include/rpc/clnt.h
  26. +12 −10 openbsd/include/rpc/pmap_clnt.h
  27. +12 −12 openbsd/include/rpc/pmap_prot.h
  28. +4 −4 openbsd/include/rpc/pmap_rmt.h
  29. +3 −3 openbsd/include/rpc/rpc_msg.h
  30. +18 −17 openbsd/include/rpc/svc.h
  31. +35 −30 openbsd/include/rpc/xdr.h
  32. +82 −82 openbsd/include/rpcsvc/yp_prot.h
  33. +4 −4 openbsd/include/rpcsvc/ypclnt.h
  34. +17 −10 openbsd/include/sha1.h
  35. +3 −1 openbsd/include/stdlib.h
  36. +4 −1 openbsd/include/unistd.h
  37. +122 −7 openbsd/sbin/ifconfig/ifconfig.8
  38. +388 −41 openbsd/sbin/ifconfig/ifconfig.c
  39. +4,909 −0 openbsd/sbin/route/parse.y
  40. +45 −15 openbsd/sbin/route/route.c
  41. +5 −3 openbsd/sbin/sysctl/pathconf.c
  42. +51 −16 openbsd/sbin/sysctl/sysctl.8
  43. +91 −51 openbsd/sbin/sysctl/sysctl.c
  44. +3 −2 openbsd/usr.bin/fstat/fstat.1
  45. +16 −18 openbsd/usr.bin/fstat/fstat.c
  46. +3 −3 openbsd/usr.bin/netstat/atalk.c
  47. +5 −5 openbsd/usr.bin/netstat/if.c
  48. +122 −8 openbsd/usr.bin/netstat/inet.c
  49. +4 −3 openbsd/usr.bin/netstat/inet6.c
  50. +3 −3 openbsd/usr.bin/netstat/ipx.c
  51. +4 −4 openbsd/usr.bin/netstat/iso.c
  52. +18 −6 openbsd/usr.bin/netstat/main.c
  53. +37 −15 openbsd/usr.bin/netstat/netstat.1
  54. +3 −1 openbsd/usr.bin/netstat/netstat.h
  55. +46 −11 openbsd/usr.bin/netstat/route.c
  56. +6 −7 openbsd/usr.bin/netstat/unix.c
  57. +50 −14 openbsd/usr.bin/systat/iostat.c
  58. +3 −5 openbsd/usr.bin/systat/main.c
  59. +15 −18 openbsd/usr.bin/systat/pigs.c
  60. +15 −5 openbsd/usr.bin/systat/systat.1
  61. +11 −5 openbsd/usr.bin/systat/vmstat.c
  62. +77 −40 openbsd/usr.bin/vmstat/dkstats.c
  63. +5 −3 openbsd/usr.bin/vmstat/dkstats.h
  64. +4 −3 openbsd/usr.bin/vmstat/vmstat.8
  65. +6 −5 openbsd/usr.bin/vmstat/vmstat.c
View
9 openbsd/bin/ls/ls.1
@@ -1,4 +1,4 @@
-.\" $OpenBSD: ls.1,v 1.39 2003/09/02 18:09:43 jmc Exp $
+.\" $OpenBSD: ls.1,v 1.40 2003/12/08 11:33:01 jmc Exp $
.\" $NetBSD: ls.1,v 1.14 1995/12/05 02:44:01 jtc Exp $
.\"
.\" Copyright (c) 1980, 1990, 1991, 1993, 1994
@@ -93,8 +93,11 @@ and a vertical bar
.Pq Sq \&|
after each that is a FIFO.
.It Fl L
-If argument is a symbolic link, list the file or directory the link references
-rather than the link itself.
+If argument is a symbolic link, evaluate the file information and file type
+to be those of the file referenced by the link, and not the link itself;
+however,
+.Nm
+writes the name of the link itself and not the file referenced by the link.
.It Fl R
Recursively list subdirectories encountered.
.It Fl S
View
16 openbsd/bin/ls/print.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: print.c,v 1.20 2003/08/06 19:09:09 tedu Exp $ */
+/* $OpenBSD: print.c,v 1.22 2003/09/26 00:48:44 deraadt Exp $ */
/* $NetBSD: print.c,v 1.15 1996/12/11 03:25:39 thorpej Exp $ */
/*
@@ -37,7 +37,7 @@
#if 0
static char sccsid[] = "@(#)print.c 8.5 (Berkeley) 7/28/94";
#else
-static char rcsid[] = "$OpenBSD: print.c,v 1.20 2003/08/06 19:09:09 tedu Exp $";
+static char rcsid[] = "$OpenBSD: print.c,v 1.22 2003/09/26 00:48:44 deraadt Exp $";
#endif
#endif /* not lint */
@@ -168,7 +168,7 @@ printcol(DISPLAY *dp)
int base, chcnt, col, colwidth, num;
int numcols, numrows, row;
- if ( (colwidth = compute_columns(dp, &numcols)) == 0)
+ if ((colwidth = compute_columns(dp, &numcols)) == 0)
return;
/*
* Have to do random access in the linked list -- build a table
@@ -177,11 +177,15 @@ printcol(DISPLAY *dp)
if (dp->entries > lastentries) {
FTSENT **a;
- if ((a =
- realloc(array, dp->entries * sizeof(FTSENT *))) == NULL) {
+ if ((a = realloc(array, dp->entries * sizeof(FTSENT *))) ==
+ NULL) {
+ free(array);
+ array = NULL;
+ dp->entries = 0;
+ lastentries = -1;
warn(NULL);
printscol(dp);
- return;
+ return;
}
lastentries = dp->entries;
array = a;
View
34 openbsd/include/Makefile
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile,v 1.121 2003/07/21 21:13:18 millert Exp $
+# $OpenBSD: Makefile,v 1.125 2004/03/08 23:31:51 drahn Exp $
# $NetBSD: Makefile,v 1.59 1996/05/15 21:36:43 jtc Exp $
# @(#)Makefile 5.45.1.1 (Berkeley) 5/6/91
@@ -6,8 +6,11 @@
# The ``rm -rf''s used below are safe because rm doesn't follow symbolic
# links.
-# Missing: mp.h
+.include <bsd.own.mk>
+USE_GCC3?=No
+
+# Missing: mp.h
FILES= a.out.h ar.h assert.h bitstring.h blf.h bm.h bsd_auth.h cast.h \
cpio.h ctype.h curses.h db.h dbm.h des.h dirent.h disktab.h \
dlfcn.h elf_abi.h err.h fnmatch.h fstab.h fts.h ftw.h getopt.h \
@@ -26,8 +29,8 @@ FILES+= link.h link_aout.h link_elf.h
FILES+= ieeefp.h
.endif
-MFILES= float.h frame.h stdarg.h varargs.h
-LFILES= errno.h fcntl.h syslog.h termios.h
+MFILES= float.h frame.h
+LFILES= errno.h fcntl.h syslog.h termios.h stdarg.h varargs.h
DIRS= arpa protocols rpc rpcsvc
LDIRS= crypto ddb dev isofs miscfs net netatalk netccitt netinet altq \
@@ -47,18 +50,31 @@ RDIRS= ../lib/libpthread ../lib/libcompat ../lib/libcurses \
PRDIRS=
# Directories with an includes target that use Makefile.bsd-wrapper
-WDIRS= ../usr.sbin/httpd ../gnu/egcs/libio ../gnu/egcs/libstdc++ \
- ../gnu/egcs/libf2c ../gnu/egcs/libobjc ../gnu/egcs/gcc \
- ../gnu/usr.bin/binutils
+WDIRS= ../usr.sbin/httpd
+.if ${MACHINE_ARCH} != "arm"
+WDIRS+= ../gnu/usr.bin/binutils
+.endif
# Places using Makefile.bsd-wrapper that needs a prerequisite target met
# before includes
-PWDIRS= ../usr.sbin/httpd ../gnu/egcs/libf2c ../gnu/usr.bin/binutils
+PWDIRS= ../usr.sbin/httpd
+.if ${MACHINE_ARCH} != "arm"
+PWDIRS+= ../gnu/usr.bin/binutils
+.endif
+
+.if ${USE_GCC3:L} == "yes"
+WDIRS+= ../gnu/lib/libstdc++ ../gnu/usr.bin/gcc ../gnu/lib/libobjc \
+ ../gnu/lib/libf2c
+PWDIRS+= ../gnu/lib/libstdc++ ../gnu/lib/libf2c
+.else
+WDIRS+= ../gnu/egcs/libio ../gnu/egcs/libstdc++ \
+ ../gnu/egcs/libf2c ../gnu/egcs/libobjc ../gnu/egcs/gcc
+PWDIRS+= ../gnu/egcs/libf2c
+.endif
NOOBJ= noobj
# Change SYS_INCLUDE in bsd.own.mk to "symlinks" if you don't want copies
-.include <bsd.own.mk>
SYS_INCLUDE?= copies
.if ${KERBEROS5:L} == "yes"
RDIRS+= ../lib/libkrb5 ../lib/libgssapi ../lib/libkadm5srv
View
6 openbsd/include/arpa/inet.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: inet.h,v 1.9 2003/08/01 17:38:33 avsm Exp $ */
+/* $OpenBSD: inet.h,v 1.10 2004/01/22 21:48:02 espie Exp $ */
/*
* ++Copyright++ 1983, 1993
@@ -86,8 +86,8 @@ char *inet_ntoa(struct in_addr);
int inet_pton(int, const char *, void *);
const char *inet_ntop(int, const void *, char *, size_t)
__attribute__ ((__bounded__(__string__,3,4)));
-u_int inet_nsap_addr(const char *, u_char *, int);
-char *inet_nsap_ntoa(int, const u_char *, char *);
+unsigned int inet_nsap_addr(const char *, unsigned char *, int);
+char *inet_nsap_ntoa(int, const unsigned char *, char *);
__END_DECLS
#endif /* !_INET_H_ */
View
31 openbsd/include/arpa/nameser.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: nameser.h,v 1.8 2003/06/02 19:34:12 millert Exp $ */
+/* $OpenBSD: nameser.h,v 1.10 2004/01/22 21:48:02 espie Exp $ */
/*
* ++Copyright++ 1983, 1989, 1993
@@ -179,13 +179,26 @@
#define T_SRV 33 /* Server selection */
#define T_ATMA 34 /* ATM Address */
#define T_NAPTR 35 /* Naming Authority PoinTeR */
+#define T_KX 36 /* Key Exchanger */
+#define T_CERT 37 /* CERT */
+#define T_A6 38 /* A6 */
+#define T_DNAME 39 /* DNAME */
+#define T_SINK 40 /* SINK */
#define T_OPT 41 /* OPT pseudo-RR, RFC2671 */
+#define T_APL 42 /* APL */
+#define T_DS 43 /* Delegation Signer */
+#define T_SSHFP 44 /* SSH Key Fingerprint */
+#define T_RRSIG 46 /* RRSIG */
+#define T_NSEC 47 /* NSEC */
+#define T_DNSKEY 48 /* DNSKEY */
/* non standard */
#define T_UINFO 100 /* user (finger) information */
#define T_UID 101 /* user ID */
#define T_GID 102 /* group ID */
#define T_UNSPEC 103 /* Unspecified format (binary data) */
/* Query type values which do not appear in resource records */
+#define T_TKEY 249 /* Transaction Key */
+#define T_TSIG 250 /* Transaction Signature */
#define T_IXFR 251 /* incremental zone transfer */
#define T_AXFR 252 /* transfer zone of authority */
#define T_MAILB 253 /* transfer mailbox records */
@@ -348,8 +361,8 @@ typedef struct {
*/
#define INDIR_MASK 0xc0
-extern u_int16_t _getshort(const u_char *);
-extern u_int32_t _getlong(const u_char *);
+extern u_int16_t _getshort(const unsigned char *);
+extern u_int32_t _getlong(const unsigned char *);
/*
* Inline versions of get/put short/long. Pointer is advanced.
@@ -358,7 +371,7 @@ extern u_int32_t _getlong(const u_char *);
* portable or it can be elegant but rarely both.
*/
#define GETSHORT(s, cp) { \
- register u_char *t_cp = (u_char *)(cp); \
+ unsigned char *t_cp = (unsigned char *)(cp); \
(s) = ((u_int16_t)t_cp[0] << 8) \
| ((u_int16_t)t_cp[1]) \
; \
@@ -366,7 +379,7 @@ extern u_int32_t _getlong(const u_char *);
}
#define GETLONG(l, cp) { \
- register u_char *t_cp = (u_char *)(cp); \
+ unsigned char *t_cp = (unsigned char *)(cp); \
(l) = ((u_int32_t)t_cp[0] << 24) \
| ((u_int32_t)t_cp[1] << 16) \
| ((u_int32_t)t_cp[2] << 8) \
@@ -376,16 +389,16 @@ extern u_int32_t _getlong(const u_char *);
}
#define PUTSHORT(s, cp) { \
- register u_int16_t t_s = (u_int16_t)(s); \
- register u_char *t_cp = (u_char *)(cp); \
+ u_int16_t t_s = (u_int16_t)(s); \
+ unsigned char *t_cp = (unsigned char *)(cp); \
*t_cp++ = t_s >> 8; \
*t_cp = t_s; \
(cp) += INT16SZ; \
}
#define PUTLONG(l, cp) { \
- register u_int32_t t_l = (u_int32_t)(l); \
- register u_char *t_cp = (u_char *)(cp); \
+ u_int32_t t_l = (u_int32_t)(l); \
+ unsigned char *t_cp = (unsigned char *)(cp); \
*t_cp++ = t_l >> 24; \
*t_cp++ = t_l >> 16; \
*t_cp++ = t_l >> 8; \
View
4 openbsd/include/arpa/tftp.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: tftp.h,v 1.4 2003/06/02 19:34:12 millert Exp $ */
+/* $OpenBSD: tftp.h,v 1.5 2004/01/27 02:25:30 deraadt Exp $ */
/* $NetBSD: tftp.h,v 1.3 1994/10/26 00:56:48 cgd Exp $ */
/*
@@ -48,6 +48,7 @@
#define DATA 03 /* data packet */
#define ACK 04 /* acknowledgement */
#define ERROR 05 /* error code */
+#define OACK 06 /* option acknowledgement */
struct tftphdr {
u_int16_t th_opcode; /* packet type */
@@ -75,5 +76,6 @@ struct tftphdr {
#define EBADID 5 /* unknown transfer ID */
#define EEXISTS 6 /* file already exists */
#define ENOUSER 7 /* no such user */
+#define EOPTNEG 8 /* option negotiation failed */
#endif /* !_TFTP_H_ */
View
22 openbsd/include/bm.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: bm.h,v 1.7 2003/08/01 17:38:33 avsm Exp $ */
+/* $OpenBSD: bm.h,v 1.8 2004/01/22 21:48:02 espie Exp $ */
/* $NetBSD: bm.h,v 1.3 1994/10/26 00:55:46 cgd Exp $ */
/*-
@@ -39,21 +39,21 @@
#define _BM_H_
typedef struct {
- u_char *pat; /* pattern */
- size_t patlen; /* pattern length */
- size_t *delta; /* skip delta */
- int rarec; /* rare character */
- size_t rareoff; /* rare offset */
- size_t md2; /* mini delta */
+ unsigned char *pat; /* pattern */
+ size_t patlen; /* pattern length */
+ size_t *delta; /* skip delta */
+ int rarec; /* rare character */
+ size_t rareoff; /* rare offset */
+ size_t md2; /* mini delta */
} bm_pat;
#include <sys/cdefs.h>
__BEGIN_DECLS
-bm_pat *bm_comp(u_char const *, size_t, u_char const *);
-u_char *bm_exec(bm_pat *, u_char *, size_t)
- __attribute__ ((__bounded__(__string__,2,3)));
-void bm_free(bm_pat *);
+bm_pat *bm_comp(unsigned char const *, size_t, unsigned char const *);
+unsigned char *bm_exec(bm_pat *, unsigned char *, size_t)
+ __attribute__ ((__bounded__(__string__,2,3)));
+void bm_free(bm_pat *);
__END_DECLS
#endif /* !_BM_H_ */
View
54 openbsd/include/ctype.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: ctype.h,v 1.14 2003/06/10 22:00:31 millert Exp $ */
+/* $OpenBSD: ctype.h,v 1.16 2004/01/15 20:01:27 millert Exp $ */
/* $NetBSD: ctype.h,v 1.14 1994/10/26 00:55:47 cgd Exp $ */
/*
@@ -56,6 +56,14 @@ extern const char *_ctype_;
extern const short *_tolower_tab_;
extern const short *_toupper_tab_;
+/* extern __inline is a GNU C extension */
+#ifdef __GNUC__
+#define __CTYPE_INLINE extern __inline
+#else
+#define __CTYPE_INLINE static inline
+#endif
+
+#if defined(__GNUC__) || defined(_ANSI_LIBRARY) || defined(lint)
int isalnum(int);
int isalpha(int);
int iscntrl(int);
@@ -78,71 +86,73 @@ int _tolower(int);
int _toupper(int);
#endif /* !_ANSI_SOURCE && !_POSIX_SOURCE */
-#ifndef _ANSI_LIBRARY
+#endif /* __GNUC__ || _ANSI_LIBRARY || lint */
+
+#if !defined(_ANSI_LIBRARY) && !defined(lint)
-extern __inline int isalnum(int c)
+__CTYPE_INLINE int isalnum(int c)
{
return (c == -1 ? 0 : ((_ctype_ + 1)[(unsigned char)c] & (_U|_L|_N)));
}
-extern __inline int isalpha(int c)
+__CTYPE_INLINE int isalpha(int c)
{
return (c == -1 ? 0 : ((_ctype_ + 1)[(unsigned char)c] & (_U|_L)));
}
-extern __inline int iscntrl(int c)
+__CTYPE_INLINE int iscntrl(int c)
{
return (c == -1 ? 0 : ((_ctype_ + 1)[(unsigned char)c] & _C));
}
-extern __inline int isdigit(int c)
+__CTYPE_INLINE int isdigit(int c)
{
return (c == -1 ? 0 : ((_ctype_ + 1)[(unsigned char)c] & _N));
}
-extern __inline int isgraph(int c)
+__CTYPE_INLINE int isgraph(int c)
{
return (c == -1 ? 0 : ((_ctype_ + 1)[(unsigned char)c] & (_P|_U|_L|_N)));
}
-extern __inline int islower(int c)
+__CTYPE_INLINE int islower(int c)
{
return (c == -1 ? 0 : ((_ctype_ + 1)[(unsigned char)c] & _L));
}
-extern __inline int isprint(int c)
+__CTYPE_INLINE int isprint(int c)
{
return (c == -1 ? 0 : ((_ctype_ + 1)[(unsigned char)c] & (_P|_U|_L|_N|_B)));
}
-extern __inline int ispunct(int c)
+__CTYPE_INLINE int ispunct(int c)
{
return (c == -1 ? 0 : ((_ctype_ + 1)[(unsigned char)c] & _P));
}
-extern __inline int isspace(int c)
+__CTYPE_INLINE int isspace(int c)
{
return (c == -1 ? 0 : ((_ctype_ + 1)[(unsigned char)c] & _S));
}
-extern __inline int isupper(int c)
+__CTYPE_INLINE int isupper(int c)
{
return (c == -1 ? 0 : ((_ctype_ + 1)[(unsigned char)c] & _U));
}
-extern __inline int isxdigit(int c)
+__CTYPE_INLINE int isxdigit(int c)
{
return (c == -1 ? 0 : ((_ctype_ + 1)[(unsigned char)c] & (_N|_X)));
}
-extern __inline int tolower(int c)
+__CTYPE_INLINE int tolower(int c)
{
if ((unsigned int)c > 0177)
return (c);
return ((_tolower_tab_ + 1)[c]);
}
-extern __inline int toupper(int c)
+__CTYPE_INLINE int toupper(int c)
{
if ((unsigned int)c > 0177)
return (c);
@@ -150,34 +160,36 @@ extern __inline int toupper(int c)
}
#if !defined(_ANSI_SOURCE) && !defined(_POSIX_SOURCE)
-extern __inline int isblank(int c)
+__CTYPE_INLINE int isblank(int c)
{
return (c == ' ' || c == '\t');
}
-extern __inline int isascii(int c)
+__CTYPE_INLINE int isascii(int c)
{
return ((unsigned int)c <= 0177);
}
-extern __inline int toascii(int c)
+__CTYPE_INLINE int toascii(int c)
{
return (c & 0177);
}
-extern __inline int _tolower(int c)
+__CTYPE_INLINE int _tolower(int c)
{
return (c - 'A' + 'a');
}
-extern __inline int _toupper(int c)
+__CTYPE_INLINE int _toupper(int c)
{
return (c - 'a' + 'A');
}
#endif /* !_ANSI_SOURCE && !_POSIX_SOURCE */
-#endif /* !_ANSI_LIBRARY */
+#endif /* !_ANSI_LIBRARY && !lint */
__END_DECLS
+#undef __CTYPE_INLINE
+
#endif /* !_CTYPE_H_ */
View
68 openbsd/include/db.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: db.h,v 1.7 2003/06/02 19:34:12 millert Exp $ */
+/* $OpenBSD: db.h,v 1.8 2004/01/22 21:48:02 espie Exp $ */
/* $NetBSD: db.h,v 1.13 1994/10/26 00:55:48 cgd Exp $ */
/*-
@@ -99,11 +99,11 @@ typedef enum { DB_BTREE, DB_HASH, DB_RECNO } DBTYPE;
typedef struct __db {
DBTYPE type; /* Underlying db type. */
int (*close)(struct __db *);
- int (*del)(const struct __db *, const DBT *, u_int);
- int (*get)(const struct __db *, const DBT *, DBT *, u_int);
- int (*put)(const struct __db *, DBT *, const DBT *, u_int);
- int (*seq)(const struct __db *, DBT *, DBT *, u_int);
- int (*sync)(const struct __db *, u_int);
+ int (*del)(const struct __db *, const DBT *, unsigned int);
+ int (*get)(const struct __db *, const DBT *, DBT *, unsigned int);
+ int (*put)(const struct __db *, DBT *, const DBT *, unsigned int);
+ int (*seq)(const struct __db *, DBT *, DBT *, unsigned int);
+ int (*sync)(const struct __db *, unsigned int);
void *internal; /* Access method private. */
int (*fd)(const struct __db *);
} DB;
@@ -114,16 +114,16 @@ typedef struct __db {
/* Structure used to pass parameters to the btree routines. */
typedef struct {
#define R_DUP 0x01 /* duplicate keys */
- u_long flags;
- u_int cachesize; /* bytes to cache */
- int maxkeypage; /* maximum keys per page */
- int minkeypage; /* minimum keys per page */
- u_int psize; /* page size */
- int (*compare) /* comparison function */
-(const DBT *, const DBT *);
- size_t (*prefix) /* prefix function */
-(const DBT *, const DBT *);
- int lorder; /* byte order */
+ unsigned long flags;
+ unsigned int cachesize; /* bytes to cache */
+ int maxkeypage; /* maximum keys per page */
+ int minkeypage; /* minimum keys per page */
+ unsigned int psize; /* page size */
+ int (*compare) /* comparison function */
+ (const DBT *, const DBT *);
+ size_t (*prefix) /* prefix function */
+ (const DBT *, const DBT *);
+ int lorder; /* byte order */
} BTREEINFO;
#define HASHMAGIC 0x061561
@@ -131,27 +131,29 @@ typedef struct {
/* Structure used to pass parameters to the hashing routines. */
typedef struct {
- u_int bsize; /* bucket size */
- u_int ffactor; /* fill factor */
- u_int nelem; /* number of elements */
- u_int cachesize; /* bytes to cache */
- u_int32_t /* hash function */
- (*hash)(const void *, size_t);
- int lorder; /* byte order */
+ unsigned int bsize; /* bucket size */
+ unsigned int ffactor; /* fill factor */
+ unsigned int nelem; /* number of elements */
+ unsigned int cachesize; /* bytes to cache */
+ u_int32_t /* hash function */
+ (*hash)(const void *, size_t);
+ int lorder; /* byte order */
} HASHINFO;
/* Structure used to pass parameters to the record routines. */
typedef struct {
-#define R_FIXEDLEN 0x01 /* fixed-length records */
-#define R_NOKEY 0x02 /* key not required */
-#define R_SNAPSHOT 0x04 /* snapshot the input */
- u_long flags;
- u_int cachesize; /* bytes to cache */
- u_int psize; /* page size */
- int lorder; /* byte order */
- size_t reclen; /* record length (fixed-length records) */
- u_char bval; /* delimiting byte (variable-length records) */
- char *bfname; /* btree file name */
+#define R_FIXEDLEN 0x01 /* fixed-length records */
+#define R_NOKEY 0x02 /* key not required */
+#define R_SNAPSHOT 0x04 /* snapshot the input */
+ unsigned long flags;
+ unsigned int cachesize; /* bytes to cache */
+ unsigned int psize; /* page size */
+ int lorder; /* byte order */
+ size_t reclen; /* record length
+ (fixed-length records) */
+ unsigned char bval; /* delimiting byte
+ (variable-length records) */
+ char *bfname; /* btree file name */
} RECNOINFO;
#ifdef __DBINTERFACE_PRIVATE
View
8 openbsd/include/fts.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: fts.h,v 1.9 2003/06/02 19:34:12 millert Exp $ */
+/* $OpenBSD: fts.h,v 1.10 2004/01/22 21:48:02 espie Exp $ */
/* $NetBSD: fts.h,v 1.5 1994/12/28 01:41:50 mycroft Exp $ */
/*
@@ -96,18 +96,18 @@ typedef struct _ftsent {
#define FTS_SL 12 /* symbolic link */
#define FTS_SLNONE 13 /* symbolic link without target */
#define FTS_W 14 /* whiteout object */
- u_short fts_info; /* user flags for FTSENT structure */
+ unsigned short fts_info; /* user flags for FTSENT structure */
#define FTS_DONTCHDIR 0x01 /* don't chdir .. to the parent */
#define FTS_SYMFOLLOW 0x02 /* followed a symlink to get here */
#define FTS_ISW 0x04 /* this is a whiteout object */
- u_short fts_flags; /* private flags for FTSENT structure */
+ unsigned short fts_flags; /* private flags for FTSENT structure */
#define FTS_AGAIN 1 /* read node again */
#define FTS_FOLLOW 2 /* follow symbolic link */
#define FTS_NOINSTR 3 /* no instructions */
#define FTS_SKIP 4 /* discard node */
- u_short fts_instr; /* fts_set() instructions */
+ unsigned short fts_instr; /* fts_set() instructions */
struct stat *fts_statp; /* stat(2) information */
char fts_name[1]; /* file name */
View
4 openbsd/include/ifaddrs.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: ifaddrs.h,v 1.3 2002/02/16 21:27:17 millert Exp $ */
+/* $OpenBSD: ifaddrs.h,v 1.4 2004/01/22 21:48:02 espie Exp $ */
/*
* Copyright (c) 1995, 1999
@@ -31,7 +31,7 @@
struct ifaddrs {
struct ifaddrs *ifa_next;
char *ifa_name;
- u_int ifa_flags;
+ unsigned int ifa_flags;
struct sockaddr *ifa_addr;
struct sockaddr *ifa_netmask;
struct sockaddr *ifa_dstaddr;
View
11 openbsd/include/kvm.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: kvm.h,v 1.9 2003/08/01 17:38:33 avsm Exp $ */
+/* $OpenBSD: kvm.h,v 1.11 2004/01/22 21:48:02 espie Exp $ */
/* $NetBSD: kvm.h,v 1.7 1996/04/19 12:02:50 leo Exp $ */
/*-
@@ -54,25 +54,30 @@ __BEGIN_DECLS
typedef struct __kvm kvm_t;
struct kinfo_proc;
+struct kinfo_proc2;
int kvm_close(kvm_t *);
int kvm_dump_inval(kvm_t *);
int kvm_dump_mkheader(kvm_t *, off_t);
int kvm_dump_wrtheader(kvm_t *, FILE *, int);
char **kvm_getargv(kvm_t *, const struct kinfo_proc *, int);
+char **kvm_getargv2(kvm_t *, const struct kinfo_proc2 *, int);
char **kvm_getenvv(kvm_t *, const struct kinfo_proc *, int);
+char **kvm_getenvv2(kvm_t *, const struct kinfo_proc2 *, int);
char *kvm_geterr(kvm_t *);
int kvm_getloadavg(kvm_t *, double [], int);
char *kvm_getfiles(kvm_t *, int, int, int *);
struct kinfo_proc *
kvm_getprocs(kvm_t *, int, int, int *);
+struct kinfo_proc2 *
+ kvm_getproc2(kvm_t *, int, int, size_t, int *);
int kvm_nlist(kvm_t *, struct nlist *);
kvm_t *kvm_open
(const char *, const char *, const char *, int, const char *);
kvm_t *kvm_openfiles
(const char *, const char *, const char *, int, char *);
-ssize_t kvm_read(kvm_t *, u_long, void *, size_t)
+ssize_t kvm_read(kvm_t *, unsigned long, void *, size_t)
__attribute__((__bounded__(__buffer__,3,4)));
-ssize_t kvm_write(kvm_t *, u_long, const void *, size_t)
+ssize_t kvm_write(kvm_t *, unsigned long, const void *, size_t)
__attribute__((__bounded__(__buffer__,3,4)));
__END_DECLS
View
16 openbsd/include/link.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: link.h,v 1.13 2002/09/07 20:35:03 deraadt Exp $ */
+/* $OpenBSD: link.h,v 1.14 2004/01/22 21:48:02 espie Exp $ */
/* $NetBSD: link.h,v 1.10 1996/01/09 00:00:11 pk Exp $ */
/*
@@ -49,12 +49,12 @@
*/
struct sod { /* Shared Object Descriptor */
- long sod_name; /* name (relative to load address) */
- u_int sod_library : 1, /* Searched for by library rules */
- sod_reserved : 31;
- short sod_major; /* major version number */
- short sod_minor; /* minor version number */
- long sod_next; /* next sod */
+ long sod_name; /* name (relative to load address) */
+ unsigned int sod_library : 1,/* Searched for by library rules */
+ sod_reserved : 31;
+ short sod_major; /* major version number */
+ short sod_minor; /* minor version number */
+ long sod_next; /* next sod */
};
/*
@@ -69,7 +69,7 @@ struct so_map { /* Shared Object Map */
struct so_map *som_next; /* Next map in chain */
struct sod *som_sod; /* Sod responsible for this map */
caddr_t som_sodbase; /* Base address of this sod */
- u_int som_write : 1; /* Text is currently writable */
+ unsigned int som_write : 1; /* Text is currently writable */
struct _dynamic *som_dynamic; /* _dynamic structure */
caddr_t som_spd; /* Private data */
};
View
4 openbsd/include/link_aout.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: link_aout.h,v 1.1 2002/06/07 03:00:01 art Exp $ */
+/* $OpenBSD: link_aout.h,v 1.2 2004/01/22 21:48:02 espie Exp $ */
/*
* Copyright (c) 1993 Paul Kranenburg
@@ -47,7 +47,7 @@
*/
struct nzlist {
struct nlist nlist;
- u_long nz_size;
+ unsigned long nz_size;
#define nz_un nlist.n_un
#define nz_strx nlist.n_un.n_strx
#define nz_name nlist.n_un.n_name
View
8 openbsd/include/login_cap.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: login_cap.h,v 1.9 2002/08/02 23:56:44 millert Exp $ */
+/* $OpenBSD: login_cap.h,v 1.10 2004/01/22 21:48:02 espie Exp $ */
/*-
* Copyright (c) 1995,1997 Berkeley Software Design, Inc. All rights reserved.
@@ -91,7 +91,7 @@ struct passwd;
login_cap_t *login_getclass(char *);
void login_close(login_cap_t *);
-int login_getcapbool(login_cap_t *, char *, u_int);
+int login_getcapbool(login_cap_t *, char *, unsigned int);
quad_t login_getcapnum(login_cap_t *, char *, quad_t, quad_t);
quad_t login_getcapsize(login_cap_t *, char *, quad_t, quad_t);
char *login_getcapstr(login_cap_t *, char *, char *, char *);
@@ -99,8 +99,8 @@ quad_t login_getcaptime(login_cap_t *, char *, quad_t, quad_t);
char *login_getstyle(login_cap_t *, char *, char *);
int secure_path(char *);
-int setclasscontext(char *, u_int);
-int setusercontext(login_cap_t *, struct passwd *, uid_t, u_int);
+int setclasscontext(char *, unsigned int);
+int setusercontext(login_cap_t *, struct passwd *, uid_t, unsigned int);
__END_DECLS
View
21 openbsd/include/md4.h
@@ -1,5 +1,5 @@
/* MD4.H - header file for MD4C.C
- * $OpenBSD: md4.h,v 1.10 2003/08/01 17:38:33 avsm Exp $
+ * $OpenBSD: md4.h,v 1.11 2003/10/07 22:17:27 avsm Exp $
*/
/* Copyright (C) 1991-2, RSA Data Security, Inc. Created 1991. All
@@ -37,13 +37,20 @@ typedef struct MD4Context {
__BEGIN_DECLS
void MD4Init(MD4_CTX *);
-void MD4Update(MD4_CTX *, const unsigned char *, size_t);
-void MD4Final(unsigned char [16], MD4_CTX *);
-void MD4Transform(u_int32_t [4], const unsigned char [64]);
-char * MD4End(MD4_CTX *, char *);
-char * MD4File(char *, char *);
+void MD4Update(MD4_CTX *, const unsigned char *, size_t)
+ __attribute__((__bounded__(__string__,2,3)));
+void MD4Final(unsigned char [16], MD4_CTX *)
+ __attribute__((__bounded__(__minbytes__,1,16)));
+void MD4Transform(u_int32_t [4], const unsigned char [64])
+ __attribute__((__bounded__(__minbytes__,1,4)))
+ __attribute__((__bounded__(__minbytes__,2,64)));
+char * MD4End(MD4_CTX *, char *)
+ __attribute__((__bounded__(__minbytes__,2,33)));
+char * MD4File(char *, char *)
+ __attribute__((__bounded__(__minbytes__,2,33)));
char * MD4Data(const unsigned char *, size_t, char *)
- __attribute__((__bounded__(__string__,3,2)));
+ __attribute__((__bounded__(__string__,1,2)))
+ __attribute__((__bounded__(__minbytes__,3,33)));
__END_DECLS
#endif /* _MD4_H_ */
View
21 openbsd/include/md5.h
@@ -1,5 +1,5 @@
/* MD5.H - header file for MD5C.C
- * $OpenBSD: md5.h,v 1.10 2003/08/01 17:38:33 avsm Exp $
+ * $OpenBSD: md5.h,v 1.11 2003/10/07 22:17:27 avsm Exp $
*/
/* Copyright (C) 1991-2, RSA Data Security, Inc. Created 1991. All
@@ -38,13 +38,20 @@ typedef struct MD5Context {
__BEGIN_DECLS
void MD5Init(MD5_CTX *);
-void MD5Update(MD5_CTX *, const unsigned char *, size_t);
-void MD5Final(unsigned char [16], MD5_CTX *);
-void MD5Transform(u_int32_t [4], const unsigned char [64]);
-char * MD5End(MD5_CTX *, char *);
-char * MD5File(char *, char *);
+void MD5Update(MD5_CTX *, const unsigned char *, size_t)
+ __attribute__((__bounded__(__string__,2,3)));
+void MD5Final(unsigned char [16], MD5_CTX *)
+ __attribute__((__bounded__(__minbytes__,1,16)));
+void MD5Transform(u_int32_t [4], const unsigned char [64])
+ __attribute__((__bounded__(__minbytes__,1,4)))
+ __attribute__((__bounded__(__minbytes__,2,64)));
+char * MD5End(MD5_CTX *, char *)
+ __attribute__((__bounded__(__minbytes__,2,33)));
+char * MD5File(char *, char *)
+ __attribute__((__bounded__(__minbytes__,2,33)));
char * MD5Data(const unsigned char *, size_t, char *)
- __attribute__ ((__bounded__(__string__,3,2)));
+ __attribute__((__bounded__(__string__,1,2)))
+ __attribute__((__bounded__(__minbytes__,3,33)));
__END_DECLS
#endif /* _MD5_H_ */
View
28 openbsd/include/mpool.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: mpool.h,v 1.9 2003/06/02 19:34:12 millert Exp $ */
+/* $OpenBSD: mpool.h,v 1.10 2004/01/22 21:48:02 espie Exp $ */
/* $NetBSD: mpool.h,v 1.7 1996/05/03 21:13:41 cgd Exp $ */
/*-
@@ -67,7 +67,7 @@ typedef struct MPOOL {
pgno_t curcache; /* current number of cached pages */
pgno_t maxcache; /* max number of cached pages */
pgno_t npages; /* number of pages in the file */
- u_long pagesize; /* file page size */
+ unsigned long pagesize; /* file page size */
int fd; /* file descriptor */
/* page in conversion routine */
void (*pgin)(void *, pgno_t, void *);
@@ -75,15 +75,15 @@ typedef struct MPOOL {
void (*pgout)(void *, pgno_t, void *);
void *pgcookie; /* cookie for page in/out routines */
#ifdef STATISTICS
- u_long cachehit;
- u_long cachemiss;
- u_long pagealloc;
- u_long pageflush;
- u_long pageget;
- u_long pagenew;
- u_long pageput;
- u_long pageread;
- u_long pagewrite;
+ unsigned long cachehit;
+ unsigned long cachemiss;
+ unsigned long pagealloc;
+ unsigned long pageflush;
+ unsigned long pageget;
+ unsigned long pagenew;
+ unsigned long pageput;
+ unsigned long pageread;
+ unsigned long pagewrite;
#endif
} MPOOL;
@@ -97,10 +97,10 @@ __BEGIN_DECLS
MPOOL *mpool_open(void *, int, pgno_t, pgno_t);
void mpool_filter(MPOOL *, void (*)(void *, pgno_t, void *),
void (*)(void *, pgno_t, void *), void *);
-void *mpool_new(MPOOL *, pgno_t *, u_int);
-void *mpool_get(MPOOL *, pgno_t, u_int);
+void *mpool_new(MPOOL *, pgno_t *, unsigned int);
+void *mpool_get(MPOOL *, pgno_t, unsigned int);
int mpool_delete(MPOOL *, void *);
-int mpool_put(MPOOL *, void *, u_int);
+int mpool_put(MPOOL *, void *, unsigned int);
int mpool_sync(MPOOL *);
int mpool_close(MPOOL *);
#ifdef STATISTICS
View
4 openbsd/include/poll.h
@@ -1,6 +1,8 @@
-/* $OpenBSD: poll.h,v 1.2 2000/03/15 03:56:48 todd Exp $ */
+/* $OpenBSD: poll.h,v 1.3 2003/10/29 16:41:13 deraadt Exp $ */
/*
+ * Written by Theo de Raadt, Public Domain
+ *
* Typical poll() implementations expect poll.h to be in /usr/include.
* However this is not a convenient place for the real definitions.
*/
View
38 openbsd/include/protocols/talkd.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: talkd.h,v 1.3 2003/06/02 19:34:12 millert Exp $ */
+/* $OpenBSD: talkd.h,v 1.4 2004/01/22 21:48:02 espie Exp $ */
/* $NetBSD: talkd.h,v 1.5 1995/03/04 07:59:30 cgd Exp $ */
/*
@@ -57,31 +57,33 @@
* Client->server request message format.
*/
typedef struct {
- u_char vers; /* protocol version */
- u_char type; /* request type, see below */
- u_char answer; /* not used */
- u_char pad;
- u_int32_t id_num; /* message id */
- struct osockaddr addr; /* old (4.3) style */
- struct osockaddr ctl_addr; /* old (4.3) style */
- int32_t pid; /* caller's process id */
+ unsigned char vers; /* protocol version */
+ unsigned char type; /* request type, see below */
+ unsigned char answer; /* not used */
+ unsigned char pad;
+ u_int32_t id_num; /* message id */
+ struct osockaddr addr; /* old (4.3) style */
+ struct osockaddr ctl_addr; /* old (4.3) style */
+ int32_t pid; /* caller's process id */
#define NAME_SIZE 12
- char l_name[NAME_SIZE]; /* caller's name */
- char r_name[NAME_SIZE]; /* callee's name */
+ char l_name[NAME_SIZE]; /* caller's name */
+ char r_name[NAME_SIZE]; /* callee's name */
#define TTY_SIZE 16
- char r_tty[TTY_SIZE]; /* callee's tty name */
+ char r_tty[TTY_SIZE]; /* callee's tty name */
} CTL_MSG;
/*
* Server->client response message format.
*/
typedef struct {
- u_char vers; /* protocol version */
- u_char type; /* type of request message, see below */
- u_char answer; /* respose to request message, see below */
- u_char pad;
- u_int32_t id_num; /* message id */
- struct osockaddr addr; /* address for establishing conversation */
+ unsigned char vers; /* protocol version */
+ unsigned char type; /* type of request message, see below */
+ unsigned char answer; /* response to request message,
+ see below */
+ unsigned char pad;
+ u_int32_t id_num; /* message id */
+ struct osockaddr addr; /* address for establishing
+ conversation */
} CTL_RESPONSE;
#define TALK_VERSION 1 /* protocol version */
View
126 openbsd/include/resolv.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: resolv.h,v 1.14 2003/08/01 17:38:33 avsm Exp $ */
+/* $OpenBSD: resolv.h,v 1.15 2004/01/22 21:48:02 espie Exp $ */
/*
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -134,15 +134,15 @@
struct __res_state {
int retrans; /* retransmission time interval */
int retry; /* number of times to retransmit */
- u_long options; /* option flags - see below. */
+ unsigned long options; /* option flags - see below. */
int nscount; /* number of name servers */
struct sockaddr_in
nsaddr_list[MAXNS]; /* address of name server */
#define nsaddr nsaddr_list[0] /* for backward compatibility */
- u_short id; /* current message id */
+ unsigned short id; /* current message id */
char *dnsrch[MAXDNSRCH+1]; /* components of domain to search */
char defdname[256]; /* default domain (deprecated) */
- u_long pfcode; /* RES_PRF_ flags - see below. */
+ unsigned long pfcode; /* RES_PRF_ flags - see below. */
unsigned ndots:4; /* threshold for initial abs. query */
unsigned nsort:4; /* number of elements in sort_list[] */
char unused[3];
@@ -220,16 +220,16 @@ typedef enum { res_goahead, res_nextns, res_modified, res_done, res_error }
res_sendhookact;
typedef res_sendhookact (*res_send_qhook)(struct sockaddr_in * const *ns,
- const u_char **query,
+ const unsigned char **query,
int *querylen,
- u_char *ans,
+ unsigned char *ans,
int anssiz,
int *resplen);
typedef res_sendhookact (*res_send_rhook)(const struct sockaddr_in *ns,
- const u_char *query,
+ const unsigned char *query,
int querylen,
- u_char *ans,
+ unsigned char *ans,
int anssiz,
int *resplen);
@@ -296,62 +296,70 @@ extern const struct res_sym __p_type_syms[];
#endif
__BEGIN_DECLS
-int res_hnok(const char *);
-int res_ownok(const char *);
-int res_mailok(const char *);
-int res_dnok(const char *);
-int sym_ston(const struct res_sym *, char *, int *);
-const char * sym_ntos(const struct res_sym *, int, int *);
-const char * sym_ntop(const struct res_sym *, int, int *);
-int b64_ntop(u_char const *, size_t, char *, size_t);
-int b64_pton(char const *, u_char *, size_t);
-int loc_aton(const char *, u_char *);
-const char * loc_ntoa(const u_char *, char *);
-int dn_skipname(const u_char *, const u_char *);
-void fp_resstat(struct __res_state *, FILE *);
-void fp_query(const u_char *, FILE *);
-void fp_nquery(const u_char *, int, FILE *);
-const char * hostalias(const char *);
-void putlong(u_int32_t, u_char *);
-void putshort(u_int16_t, u_char *);
-const char * p_class(int);
-const char * p_time(u_int32_t);
-const char * p_type(int);
-void p_query(const u_char *);
-const u_char * p_cdnname(const u_char *, const u_char *, int, FILE *);
-const u_char * p_cdname(const u_char *, const u_char *, FILE *);
-const u_char * p_fqnname(const u_char *cp, const u_char *msg,
- int, char *, int);
-const u_char * p_fqname(const u_char *, const u_char *, FILE *);
-const u_char * p_rr(const u_char *, const u_char *, FILE *);
-const char * p_option(u_long option);
-char * p_secstodate(u_long);
-int dn_count_labels(char *);
-int dn_comp(const char *, u_char *, int,
- u_char **, u_char **);
-int dn_expand(const u_char *, const u_char *, const u_char *,
- char *, int);
-int res_init(void);
-u_int res_randomid(void);
-int res_query(const char *, int, int, u_char *, int)
+int res_hnok(const char *);
+int res_ownok(const char *);
+int res_mailok(const char *);
+int res_dnok(const char *);
+int sym_ston(const struct res_sym *, char *, int *);
+const char * sym_ntos(const struct res_sym *, int, int *);
+const char * sym_ntop(const struct res_sym *, int, int *);
+int b64_ntop(unsigned char const *, size_t, char *, size_t);
+int b64_pton(char const *, unsigned char *, size_t);
+int loc_aton(const char *, unsigned char *);
+const char * loc_ntoa(const unsigned char *, char *);
+int dn_skipname(const unsigned char *,
+ const unsigned char *);
+void fp_resstat(struct __res_state *, FILE *);
+void fp_query(const unsigned char *, FILE *);
+void fp_nquery(const unsigned char *, int, FILE *);
+const char * hostalias(const char *);
+void putlong(u_int32_t, unsigned char *);
+void putshort(u_int16_t, unsigned char *);
+const char * p_class(int);
+const char * p_time(u_int32_t);
+const char * p_type(int);
+void p_query(const unsigned char *);
+const unsigned char * p_cdnname(const unsigned char *, const unsigned char *,
+ int, FILE *);
+const unsigned char * p_cdname(const unsigned char *, const unsigned char *,
+ FILE *);
+const unsigned char * p_fqnname(const unsigned char *, const unsigned char *,
+ int, char *, int);
+const unsigned char * p_fqname(const unsigned char *, const unsigned char *,
+ FILE *);
+const unsigned char * p_rr(const unsigned char *, const unsigned char *,
+ FILE *);
+const char * p_option(unsigned long);
+char * p_secstodate(unsigned long);
+int dn_count_labels(char *);
+int dn_comp(const char *, unsigned char *, int,
+ unsigned char **, unsigned char **);
+int dn_expand(const unsigned char *, const unsigned char *,
+ const unsigned char *, char *, int);
+int res_init(void);
+unsigned int res_randomid(void);
+int res_query(const char *, int, int, unsigned char *, int)
__attribute__((__bounded__(__string__,4,5)));
-int res_search(const char *, int, int, u_char *, int)
- __attribute__((__bounded__(__string__,4,5)));
-int res_querydomain(const char *, const char *, int, int,
- u_char *, int)
+int res_search(const char *, int, int, unsigned char *, int)
+ __attribute__((__bounded__(__string__,4,5)));
+int res_querydomain(const char *, const char *, int, int,
+ unsigned char *, int)
__attribute__((__bounded__(__string__,5,6)));
-int res_mkquery(int, const char *, int, int, const u_char *, int,
- const u_char *, u_char *, int)
+int res_mkquery(int, const char *, int, int,
+ const unsigned char *, int, const unsigned char *,
+ unsigned char *, int)
__attribute__((__bounded__(__string__,5,6)))
__attribute__((__bounded__(__string__,8,9)));
-int res_send(const u_char *, int, u_char *, int)
+int res_send(const unsigned char *, int, unsigned char *,
+ int)
__attribute__((__bounded__(__string__,3,4)));
-int res_isourserver(const struct sockaddr_in *);
-int res_nameinquery(const char *, int, int,
- const u_char *, const u_char *);
-int res_queriesmatch(const u_char *, const u_char *,
- const u_char *, const u_char *);
-void res_close(void);
+int res_isourserver(const struct sockaddr_in *);
+int res_nameinquery(const char *, int, int,
+ const unsigned char *, const unsigned char *);
+int res_queriesmatch(const unsigned char *,
+ const unsigned char *, const unsigned char *,
+ const unsigned char *);
+void res_close(void);
__END_DECLS
#endif /* !_RESOLV_H_ */
View
29 openbsd/include/rmd160.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: rmd160.h,v 1.10 2003/08/01 17:38:33 avsm Exp $ */
+/* $OpenBSD: rmd160.h,v 1.12 2004/01/22 21:48:02 espie Exp $ */
/*
* Copyright (c) 2001 Markus Friedl. All rights reserved.
*
@@ -27,22 +27,29 @@
/* RMD160 context. */
typedef struct RMD160Context {
- u_int32_t state[5]; /* state */
- u_int64_t count; /* number of bits, modulo 2^64 */
- u_char buffer[64]; /* input buffer */
+ u_int32_t state[5]; /* state */
+ u_int64_t count; /* number of bits, modulo 2^64 */
+ unsigned char buffer[64]; /* input buffer */
} RMD160_CTX;
#include <sys/cdefs.h>
__BEGIN_DECLS
void RMD160Init(RMD160_CTX *);
-void RMD160Transform(u_int32_t [5], const u_char [64]);
-void RMD160Update(RMD160_CTX *, const u_char *, u_int32_t);
-void RMD160Final(u_char [20], RMD160_CTX *);
-char *RMD160End(RMD160_CTX *, char *);
-char *RMD160File(char *, char *);
-char *RMD160Data(const u_char *, size_t, char *)
- __attribute__((__bounded__(__string__,3,2)));
+void RMD160Transform(u_int32_t [5], const unsigned char [64])
+ __attribute__((__bounded__(__minbytes__,1,5)))
+ __attribute__((__bounded__(__minbytes__,2,64)));
+void RMD160Update(RMD160_CTX *, const unsigned char *, u_int32_t)
+ __attribute__((__bounded__(__string__,2,3)));
+void RMD160Final(unsigned char [20], RMD160_CTX *)
+ __attribute__((__bounded__(__minbytes__,1,20)));
+char *RMD160End(RMD160_CTX *, char *)
+ __attribute__((__bounded__(__minbytes__,2,41)));
+char *RMD160File(char *, char *)
+ __attribute__((__bounded__(__minbytes__,2,41)));
+char *RMD160Data(const unsigned char *, size_t, char *)
+ __attribute__((__bounded__(__string__,1,2)))
+ __attribute__((__bounded__(__minbytes__,3,41)));
__END_DECLS
#endif /* _RMD160_H */
View
11 openbsd/include/rpc/auth.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: auth.h,v 1.4 2002/02/17 19:42:21 millert Exp $ */
+/* $OpenBSD: auth.h,v 1.5 2004/01/22 21:48:02 espie Exp $ */
/* $NetBSD: auth.h,v 1.7 1995/04/29 05:27:55 cgd Exp $ */
/*
@@ -88,9 +88,9 @@ __END_DECLS
* Authentication info. Opaque to client.
*/
struct opaque_auth {
- enum_t oa_flavor; /* flavor of auth */
- caddr_t oa_base; /* address of more auth stuff */
- u_int oa_length; /* not to exceed MAX_AUTH_BYTES */
+ enum_t oa_flavor; /* flavor of auth */
+ caddr_t oa_base; /* address of more auth stuff */
+ unsigned int oa_length; /* not to exceed MAX_AUTH_BYTES */
};
@@ -172,7 +172,8 @@ struct sockaddr_in;
extern AUTH *authunix_create(char *, int, int, int, int *);
extern AUTH *authunix_create_default(void);
extern AUTH *authnone_create(void);
-extern AUTH *authdes_create(char *, u_int, struct sockaddr_in *, des_block *);
+extern AUTH *authdes_create(char *, unsigned int, struct sockaddr_in *,
+ des_block *);
__END_DECLS
#define AUTH_NONE 0 /* no authentication */
View
14 openbsd/include/rpc/auth_unix.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: auth_unix.h,v 1.3 2002/02/16 21:27:18 millert Exp $ */
+/* $OpenBSD: auth_unix.h,v 1.4 2004/01/22 21:48:02 espie Exp $ */
/* $NetBSD: auth_unix.h,v 1.4 1994/10/26 00:56:56 cgd Exp $ */
/*
@@ -60,12 +60,12 @@
* Unix style credentials.
*/
struct authunix_parms {
- u_long aup_time;
- char *aup_machname;
- int aup_uid;
- int aup_gid;
- u_int aup_len;
- int *aup_gids;
+ unsigned long aup_time;
+ char *aup_machname;
+ int aup_uid;
+ int aup_gid;
+ unsigned int aup_len;
+ int *aup_gids;
};
__BEGIN_DECLS
View
72 openbsd/include/rpc/clnt.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: clnt.h,v 1.9 2003/03/16 00:34:01 margarida Exp $ */
+/* $OpenBSD: clnt.h,v 1.10 2004/01/22 21:48:02 espie Exp $ */
/* $NetBSD: clnt.h,v 1.6 1995/04/29 05:27:58 cgd Exp $ */
/*
@@ -121,8 +121,8 @@ typedef struct __rpc_client {
struct clnt_ops {
/* call remote procedure */
enum clnt_stat (*cl_call)(struct __rpc_client *,
- u_long, xdrproc_t, caddr_t, xdrproc_t,
- caddr_t, struct timeval);
+ unsigned long, xdrproc_t, caddr_t,
+ xdrproc_t, caddr_t, struct timeval);
/* abort a call */
void (*cl_abort)(struct __rpc_client *);
/* get specific error code */
@@ -134,8 +134,8 @@ typedef struct __rpc_client {
/* destroy this structure */
void (*cl_destroy)(struct __rpc_client *);
/* the ioctl() of rpc */
- bool_t (*cl_control)(struct __rpc_client *, u_int,
- void *);
+ bool_t (*cl_control)(struct __rpc_client *,
+ unsigned int, void *);
} *cl_ops;
caddr_t cl_private; /* private stuff */
} CLIENT;
@@ -152,7 +152,7 @@ typedef struct __rpc_client {
* enum clnt_stat
* CLNT_CALL(rh, proc, xargs, argsp, xres, resp, timeout)
* CLIENT *rh;
- * u_long proc;
+ * unsigned long proc;
* xdrproc_t xargs;
* caddr_t argsp;
* xdrproc_t xres;
@@ -197,7 +197,7 @@ typedef struct __rpc_client {
* bool_t
* CLNT_CONTROL(cl, request, info)
* CLIENT *cl;
- * u_int request;
+ * unsigned int request;
* char *info;
*/
#define CLNT_CONTROL(cl,rq,in) ((*(cl)->cl_ops->cl_control)(cl,rq,in))
@@ -230,16 +230,16 @@ typedef struct __rpc_client {
* and network administration.
*/
-#define RPCTEST_PROGRAM ((u_long)1)
-#define RPCTEST_VERSION ((u_long)1)
-#define RPCTEST_NULL_PROC ((u_long)2)
-#define RPCTEST_NULL_BATCH_PROC ((u_long)3)
+#define RPCTEST_PROGRAM ((unsigned long)1)
+#define RPCTEST_VERSION ((unsigned long)1)
+#define RPCTEST_NULL_PROC ((unsigned long)2)
+#define RPCTEST_NULL_BATCH_PROC ((unsigned long)3)
/*
* By convention, procedure 0 takes null arguments and returns them
*/
-#define NULLPROC ((u_int)0)
+#define NULLPROC ((unsigned int)0)
/*
* Below are the client handle creation routines for the various
@@ -251,11 +251,11 @@ typedef struct __rpc_client {
* Memory based rpc (for speed check and testing)
* CLIENT *
* clntraw_create(prog, vers)
- * u_long prog;
- * u_long vers;
+ * unsigned long prog;
+ * unsigned long vers;
*/
__BEGIN_DECLS
-extern CLIENT *clntraw_create(u_long, u_long);
+extern CLIENT *clntraw_create(unsigned long, unsigned long);
__END_DECLS
@@ -263,13 +263,13 @@ __END_DECLS
* Generic client creation routine. Supported protocols are "udp" and "tcp"
* CLIENT *
* clnt_create(host, prog, vers, prot);
- * char *host; -- hostname
- * u_long prog; -- program number
- * u_long vers; -- version number
- * char *prot; -- protocol
+ * char *host; -- hostname
+ * unsigned long prog; -- program number
+ * unsigned long vers; -- version number
+ * char *prot; -- protocol
*/
__BEGIN_DECLS
-extern CLIENT *clnt_create(char *, u_long, u_long, char *);
+extern CLIENT *clnt_create(char *, unsigned long, unsigned long, char *);
__END_DECLS
@@ -278,15 +278,15 @@ __END_DECLS
* CLIENT *
* clnttcp_create(raddr, prog, vers, sockp, sendsz, recvsz)
* struct sockaddr_in *raddr;
- * u_long prog;
- * u_long version;
+ * unsigned long prog;
+ * unsigned long version;
* int *sockp;
- * u_int sendsz;
- * u_int recvsz;
+ * unsigned int sendsz;
+ * unsigned int recvsz;
*/
__BEGIN_DECLS
-extern CLIENT *clnttcp_create(struct sockaddr_in *, u_long, u_long, int *,
- u_int, u_int);
+extern CLIENT *clnttcp_create(struct sockaddr_in *, unsigned long,
+ unsigned long, int *, unsigned int, unsigned int);
__END_DECLS
@@ -295,8 +295,8 @@ __END_DECLS
* CLIENT *
* clntudp_create(raddr, program, version, wait, sockp)
* struct sockaddr_in *raddr;
- * u_long program;
- * u_long version;
+ * unsigned long program;
+ * unsigned long version;
* struct timeval wait;
* int *sockp;
*
@@ -304,18 +304,18 @@ __END_DECLS
* CLIENT *
* clntudp_bufcreate(raddr, program, version, wait, sockp, sendsz, recvsz)
* struct sockaddr_in *raddr;
- * u_long program;
- * u_long version;
+ * unsigned long program;
+ * unsigned long version;
* struct timeval wait;
* int *sockp;
- * u_int sendsz;
- * u_int recvsz;
+ * unsigned int sendsz;
+ * unsigned int recvsz;
*/
__BEGIN_DECLS
-extern CLIENT *clntudp_create(struct sockaddr_in *, u_long, u_long,
- struct timeval, int *);
-extern CLIENT *clntudp_bufcreate(struct sockaddr_in *, u_long, u_long,
- struct timeval, int *, u_int, u_int);
+extern CLIENT *clntudp_create(struct sockaddr_in *, unsigned long,
+ unsigned long, struct timeval, int *);
+extern CLIENT *clntudp_bufcreate(struct sockaddr_in *, unsigned long,
+ unsigned long, struct timeval, int *, unsigned int, unsigned int);
__END_DECLS
View
22 openbsd/include/rpc/pmap_clnt.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: pmap_clnt.h,v 1.5 2002/02/17 19:42:21 millert Exp $ */
+/* $OpenBSD: pmap_clnt.h,v 1.6 2004/01/22 21:48:02 espie Exp $ */
/* $NetBSD: pmap_clnt.h,v 1.5 1994/12/04 01:12:42 cgd Exp $ */
/*
@@ -67,17 +67,19 @@
#include <sys/cdefs.h>
__BEGIN_DECLS
-extern bool_t pmap_set(u_long, u_long, u_int, int);
-extern bool_t pmap_unset(u_long, u_long);
+extern bool_t pmap_set(unsigned long, unsigned long, unsigned int,
+ int);
+extern bool_t pmap_unset(unsigned long, unsigned long);
extern struct pmaplist *pmap_getmaps(struct sockaddr_in *);
-extern enum clnt_stat pmap_rmtcall(struct sockaddr_in *, u_long, u_long,
- u_long, xdrproc_t, caddr_t, xdrproc_t, caddr_t,
- struct timeval, u_long *);
-extern enum clnt_stat clnt_broadcast(u_long, u_long, u_long, xdrproc_t,
- char *, xdrproc_t, char *,
+extern enum clnt_stat pmap_rmtcall(struct sockaddr_in *, unsigned long,
+ unsigned long, unsigned long, xdrproc_t, caddr_t,
+ xdrproc_t, caddr_t, struct timeval,
+ unsigned long *);
+extern enum clnt_stat clnt_broadcast(unsigned long, unsigned long,
+ unsigned long, xdrproc_t, char *, xdrproc_t, char *,
bool_t (*)(caddr_t, struct sockaddr_in *));
-extern u_short pmap_getport(struct sockaddr_in *, u_long, u_long,
- u_int);
+extern unsigned short pmap_getport(struct sockaddr_in *, unsigned long,
+ unsigned long, unsigned int);
__END_DECLS
#endif /* !_RPC_PMAPCLNT_H */
View
24 openbsd/include/rpc/pmap_prot.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: pmap_prot.h,v 1.4 2002/02/16 21:27:18 millert Exp $ */
+/* $OpenBSD: pmap_prot.h,v 1.5 2004/01/22 21:48:02 espie Exp $ */
/* $NetBSD: pmap_prot.h,v 1.4 1994/10/26 00:57:00 cgd Exp $ */
/*
@@ -74,17 +74,17 @@
#define _RPC_PMAPPROT_H
#include <sys/cdefs.h>
-#define PMAPPORT ((u_short)111)
-#define PMAPPROG ((u_long)100000)
-#define PMAPVERS ((u_long)2)
-#define PMAPVERS_PROTO ((u_long)2)
-#define PMAPVERS_ORIG ((u_long)1)
-#define PMAPPROC_NULL ((u_long)0)
-#define PMAPPROC_SET ((u_long)1)
-#define PMAPPROC_UNSET ((u_long)2)
-#define PMAPPROC_GETPORT ((u_long)3)
-#define PMAPPROC_DUMP ((u_long)4)
-#define PMAPPROC_CALLIT ((u_long)5)
+#define PMAPPORT ((unsigned short)111)
+#define PMAPPROG ((unsigned long)100000)
+#define PMAPVERS ((unsigned long)2)
+#define PMAPVERS_PROTO ((unsigned long)2)
+#define PMAPVERS_ORIG ((unsigned long)1)
+#define PMAPPROC_NULL ((unsigned long)0)
+#define PMAPPROC_SET ((unsigned long)1)
+#define PMAPPROC_UNSET ((unsigned long)2)
+#define PMAPPROC_GETPORT ((unsigned long)3)
+#define PMAPPROC_DUMP ((unsigned long)4)
+#define PMAPPROC_CALLIT ((unsigned long)5)
struct pmap {
unsigned long pm_prog;
View
8 openbsd/include/rpc/pmap_rmt.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: pmap_rmt.h,v 1.3 2002/02/16 21:27:18 millert Exp $ */
+/* $OpenBSD: pmap_rmt.h,v 1.4 2004/01/22 21:48:02 espie Exp $ */
/* $NetBSD: pmap_rmt.h,v 1.4 1994/10/26 00:57:01 cgd Exp $ */
/*
@@ -45,14 +45,14 @@
#include <sys/cdefs.h>
struct rmtcallargs {
- u_long prog, vers, proc, arglen;
+ unsigned long prog, vers, proc, arglen;
caddr_t args_ptr;
xdrproc_t xdr_args;
};
struct rmtcallres {
- u_long *port_ptr;
- u_long resultslen;
+ unsigned long *port_ptr;
+ unsigned long resultslen;
caddr_t results_ptr;
xdrproc_t xdr_results;
};
View
6 openbsd/include/rpc/rpc_msg.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: rpc_msg.h,v 1.3 2002/02/16 21:27:18 millert Exp $ */
+/* $OpenBSD: rpc_msg.h,v 1.4 2004/01/22 21:48:02 espie Exp $ */
/* $NetBSD: rpc_msg.h,v 1.5 1995/04/29 05:28:00 cgd Exp $ */
/*
@@ -43,8 +43,8 @@
#ifndef _RPC_RPCMSG_H
#define _RPC_RPCMSG_H
-#define RPC_MSG_VERSION ((u_long) 2)
-#define RPC_SERVICE_PORT ((u_short) 2048)
+#define RPC_MSG_VERSION ((unsigned long) 2)
+#define RPC_SERVICE_PORT ((unsigned short) 2048)
/*
* Bottom up definition of an rpc message.
View
35 openbsd/include/rpc/svc.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: svc.h,v 1.7 2002/02/17 19:42:21 millert Exp $ */
+/* $OpenBSD: svc.h,v 1.9 2004/01/22 21:48:02 espie Exp $ */
/* $NetBSD: svc.h,v 1.9 1995/04/29 05:28:01 cgd Exp $ */
/*
@@ -42,6 +42,7 @@
#ifndef _RPC_SVC_H
#define _RPC_SVC_H
#include <sys/cdefs.h>
+#include <sys/poll.h>
/*
* This interface must manage two items concerning remote procedure calling:
@@ -76,7 +77,7 @@ enum xprt_stat {
*/
typedef struct __rpc_svcxprt {
int xp_sock;
- u_short xp_port; /* associated port number */
+ unsigned short xp_port; /* associated port number */
struct xp_ops {
/* receive incomming requests */
bool_t (*xp_recv)(struct __rpc_svcxprt *,
@@ -163,13 +164,13 @@ struct svc_req {
*
* svc_register(xprt, prog, vers, dispatch, protocol)
* SVCXPRT *xprt;
- * u_long prog;
- * u_long vers;
+ * unsigned long prog;
+ * unsigned long vers;
* void (*dispatch)();
* int protocol; like TCP or UDP, zero means do not register
*/
__BEGIN_DECLS
-extern bool_t svc_register(SVCXPRT *, u_long, u_long,
+extern bool_t svc_register(SVCXPRT *, unsigned long, unsigned long,
void (*)(struct svc_req *, SVCXPRT *), int);
__END_DECLS
@@ -177,11 +178,11 @@ __END_DECLS
* Service un-registration
*
* svc_unregister(prog, vers)
- * u_long prog;
- * u_long vers;
+ * unsigned long prog;
+ * unsigned long vers;
*/
__BEGIN_DECLS
-extern void svc_unregister(u_long, u_long);
+extern void svc_unregister(unsigned long, unsigned long);
__END_DECLS
/*
@@ -239,7 +240,7 @@ extern bool_t svc_sendreply(SVCXPRT *, xdrproc_t, char *);
extern void svcerr_decode(SVCXPRT *);
extern void svcerr_weakauth(SVCXPRT *);
extern void svcerr_noproc(SVCXPRT *);
-extern void svcerr_progvers(SVCXPRT *, u_long, u_long);
+extern void svcerr_progvers(SVCXPRT *, unsigned long, unsigned long);
extern void svcerr_auth(SVCXPRT *, enum auth_stat);
extern void svcerr_noprog(SVCXPRT *);
extern void svcerr_systemerr(SVCXPRT *);
@@ -260,13 +261,11 @@ __END_DECLS
* Global keeper of rpc service descriptors in use
* dynamic; must be inspected before each call to select
*/
-extern int svc_maxfd;
-#ifdef FD_SETSIZE
extern fd_set svc_fdset;
#define svc_fds svc_fdset.fds_bits[0] /* compatibility */
-#else
-extern int svc_fds;
-#endif /* def FD_SETSIZE */
+extern struct pollfd *svc_pollfd;
+extern int svc_max_pollfd;
+extern int svc_maxfd; /* non-standard */
/*
* a small program implemented by the svc_rpc implementation itself;
@@ -276,6 +275,8 @@ extern void rpctest_service(); /* XXX relic? */
__BEGIN_DECLS
extern void svc_getreq(int);
+extern void svc_getreq_common(int);
+extern void svc_getreq_poll(struct pollfd *, const int);
extern void svc_getreqset(fd_set *);
extern void svc_getreqset2(fd_set *, int);
extern void svc_run(void);
@@ -303,7 +304,7 @@ __END_DECLS
*/
__BEGIN_DECLS
extern SVCXPRT *svcudp_create(int);
-extern SVCXPRT *svcudp_bufcreate(int, u_int, u_int);
+extern SVCXPRT *svcudp_bufcreate(int, unsigned int, unsigned int);
__END_DECLS
@@ -311,14 +312,14 @@ __END_DECLS
* Tcp based rpc.
*/
__BEGIN_DECLS
-extern SVCXPRT *svctcp_create(int, u_int, u_int);
+extern SVCXPRT *svctcp_create(int, unsigned int, unsigned int);
__END_DECLS
/*
* Fd based rpc.
*/
__BEGIN_DECLS
-extern SVCXPRT *svcfd_create(int, u_int, u_int);
+extern SVCXPRT *svcfd_create(int, unsigned int, unsigned int);
__END_DECLS
#endif /* !_RPC_SVC_H */
View
65 openbsd/include/rpc/xdr.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: xdr.h,v 1.6 2003/03/10 03:45:20 david Exp $ */
+/* $OpenBSD: xdr.h,v 1.7 2004/01/22 21:48:02 espie Exp $ */
/* $NetBSD: xdr.h,v 1.7 1995/04/29 05:28:06 cgd Exp $ */
/*
@@ -105,22 +105,24 @@ typedef struct __rpc_xdr {
/* put a long to " */
bool_t (*x_putlong)(struct __rpc_xdr *, long *);
/* get some bytes from " */
- bool_t (*x_getbytes)(struct __rpc_xdr *, caddr_t, u_int);
+ bool_t (*x_getbytes)(struct __rpc_xdr *, caddr_t,
+ unsigned int);
/* put some bytes to " */
- bool_t (*x_putbytes)(struct __rpc_xdr *, caddr_t, u_int);
+ bool_t (*x_putbytes)(struct __rpc_xdr *, caddr_t,
+ unsigned int);
/* returns bytes off from beginning */
- u_int (*x_getpostn)(struct __rpc_xdr *);
+ unsigned int (*x_getpostn)(struct __rpc_xdr *);
/* lets you reposition the stream */
- bool_t (*x_setpostn)(struct __rpc_xdr *, u_int);
+ bool_t (*x_setpostn)(struct __rpc_xdr *, unsigned int);
/* buf quick ptr to buffered data */
- int32_t *(*x_inline)(struct __rpc_xdr *, u_int);
+ int32_t *(*x_inline)(struct __rpc_xdr *, unsigned int);
/* free privates of this xdr_stream */
void (*x_destroy)(struct __rpc_xdr *);
} *x_ops;
caddr_t x_public; /* users' data */
caddr_t x_private; /* pointer to private data */
caddr_t x_base; /* private used for position info */
- u_int x_handy; /* extra private word */
+ unsigned int x_handy; /* extra private word */
} XDR;
/*
@@ -133,7 +135,7 @@ typedef struct __rpc_xdr {
*
* XXX can't actually prototype it, because some take three args!!!
*/
-typedef bool_t (*xdrproc_t)(/* XDR *, void *, u_int */);
+typedef bool_t (*xdrproc_t)(/* XDR *, void *, unsigned int */);
/*
* Operations defined on a XDR handle
@@ -141,8 +143,8 @@ typedef bool_t (*xdrproc_t)(/* XDR *, void *, u_int */);
* XDR *xdrs;
* long *longp;
* caddr_t addr;
- * u_int len;
- * u_int pos;
+ * unsigned int len;
+ * unsigned int pos;
*/
#define XDR_GETLONG(xdrs, longp) \
(*(xdrs)->x_ops->x_getlong)(xdrs, longp)
@@ -217,14 +219,14 @@ struct xdr_discrim {
* N.B. and frozen for all time: each data type here uses 4 bytes
* of external representation.
*/
-#define IXDR_GET_LONG(buf) ((long)ntohl((u_long)*(buf)++))
-#define IXDR_PUT_LONG(buf, v) (*(buf)++ = (long)htonl((u_long)v))
+#define IXDR_GET_LONG(buf) ((long)ntohl((unsigned long)*(buf)++))
+#define IXDR_PUT_LONG(buf, v) (*(buf)++ = (long)htonl((unsigned long)v))
#define IXDR_GET_BOOL(buf) ((bool_t)IXDR_GET_LONG(buf))
#define IXDR_GET_ENUM(buf, t) ((t)IXDR_GET_LONG(buf))
-#define IXDR_GET_U_LONG(buf) ((u_long)IXDR_GET_LONG(buf))
+#define IXDR_GET_U_LONG(buf) ((unsigned long)IXDR_GET_LONG(buf))
#define IXDR_GET_SHORT(buf) ((short)IXDR_GET_LONG(buf))
-#define IXDR_GET_U_SHORT(buf) ((u_short)IXDR_GET_LONG(buf))
+#define IXDR_GET_U_SHORT(buf) ((unsigned short)IXDR_GET_LONG(buf))
#define IXDR_PUT_BOOL(buf, v) IXDR_PUT_LONG((buf), ((long)(v)))
#define IXDR_PUT_ENUM(buf, v) IXDR_PUT_LONG((buf), ((long)(v)))
@@ -238,29 +240,32 @@ struct xdr_discrim {
__BEGIN_DECLS
extern bool_t xdr_void(void);
extern bool_t xdr_int(XDR *, int *);
-extern bool_t xdr_u_int(XDR *, u_int *);
+extern bool_t xdr_u_int(XDR *, unsigned int *);
extern bool_t xdr_long(XDR *, long *);
-extern bool_t xdr_u_long(XDR *, u_long *);
+extern bool_t xdr_u_long(XDR *, unsigned long *);
extern bool_t xdr_short(XDR *, short *);
-extern bool_t xdr_u_short(XDR *, u_short *);
+extern bool_t xdr_u_short(XDR *, unsigned short *);
extern bool_t xdr_int16_t(XDR *, int16_t *);
extern bool_t xdr_u_int16_t(XDR *, u_int16_t *);
extern bool_t xdr_int32_t(XDR *, int32_t *);
extern bool_t xdr_u_int32_t(XDR *, u_int32_t *);
extern bool_t xdr_bool(XDR *, bool_t *);
extern bool_t xdr_enum(XDR *, enum_t *);
-extern bool_t xdr_array(XDR *, char **, u_int *, u_int, u_int, xdrproc_t);
-extern bool_t xdr_bytes(XDR *, char **, u_int *, u_int);
-extern bool_t xdr_opaque(XDR *, caddr_t, u_int);
-extern bool_t xdr_string(XDR *, char **, u_int);
-extern bool_t xdr_union(XDR *, enum_t *, char *, struct xdr_discrim *, xdrproc_t);
+extern bool_t xdr_array(XDR *, char **, unsigned int *, unsigned int,
+ unsigned int, xdrproc_t);
+extern bool_t xdr_bytes(XDR *, char **, unsigned int *, unsigned int);
+extern bool_t xdr_opaque(XDR *, caddr_t, unsigned int);
+extern bool_t xdr_string(XDR *, char **, unsigned int);
+extern bool_t xdr_union(XDR *, enum_t *, char *, struct xdr_discrim *,
+ xdrproc_t);
extern bool_t xdr_char(XDR *, char *);
-extern bool_t xdr_u_char(XDR *, u_char *);
-extern bool_t xdr_vector(XDR *, char *, u_int, u_int, xdrproc_t);
+extern bool_t xdr_u_char(XDR *, unsigned char *);
+extern bool_t xdr_vector(XDR *, char *, unsigned int, unsigned int,
+ xdrproc_t);
extern bool_t xdr_float(XDR *, float *);
extern bool_t xdr_double(XDR *, double *);
-extern bool_t xdr_reference(XDR *, caddr_t *, u_int, xdrproc_t);
-extern bool_t xdr_pointer(XDR *, caddr_t *, u_int, xdrproc_t);
+extern bool_t xdr_reference(XDR *, caddr_t *, unsigned int, xdrproc_t);
+extern bool_t xdr_pointer(XDR *, caddr_t *, unsigned int, xdrproc_t);
extern bool_t xdr_wrapstring(XDR *, char **);
extern void xdr_free(xdrproc_t, char *);
__END_DECLS
@@ -271,8 +276,8 @@ __END_DECLS
*/
#define MAX_NETOBJ_SZ 1024
struct netobj {
- u_int n_len;
- char *n_bytes;
+ unsigned int n_len;
+ char *n_bytes;
};
typedef struct netobj netobj;
extern bool_t xdr_netobj(XDR *, struct netobj *);
@@ -283,7 +288,7 @@ extern bool_t xdr_netobj(XDR *, struct netobj *);
*/
__BEGIN_DECLS
/* XDR using memory buffers */
-extern void xdrmem_create(XDR *, char *, u_int, enum xdr_op);
+extern void xdrmem_create(XDR *, char *, unsigned int, enum xdr_op);
#ifdef _STDIO_H_
/* XDR using stdio library */
@@ -291,7 +296,7 @@ extern void xdrstdio_create(XDR *, FILE *, enum xdr_op);
#endif
/* XDR pseudo records for tcp */
-extern void xdrrec_create(XDR *, u_int, u_int, char *,
+extern void xdrrec_create(XDR *, unsigned int, unsigned int, char *,
int (*)(caddr_t, caddr_t, int),
int (*)(caddr_t, caddr_t, int));
View
164 openbsd/include/rpcsvc/yp_prot.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: yp_prot.h,v 1.6 2003/06/02 04:00:17 deraadt Exp $ */
+/* $OpenBSD: yp_prot.h,v 1.8 2004/01/22 21:48:02 espie Exp $ */
/* $NetBSD: yp_prot.h,v 1.6 1995/07/14 21:10:58 christos Exp $ */
/*
@@ -32,33 +32,33 @@
/*
* YPSERV PROTOCOL:
- *
+ *
* ypserv supports the following procedures:
- *
+ *
* YPPROC_NULL takes (void), returns (void).
- * called to check if server is alive.
+ * called to check if server is alive.
* YPPROC_DOMAIN takes (char *), returns (bool_t).
- * true if ypserv serves the named domain.
+ * true if ypserv serves the named domain.
* YPPROC_DOMAIN_NOACK takes (char *), returns (bool_t).
- * true if ypserv serves the named domain.
+ * true if ypserv serves the named domain.
* used for broadcasts, does not ack if ypserv
* doesn't handle named domain.
* YPPROC_MATCH takes (struct ypreq_key), returns (struct ypresp_val)
- * does a lookup.
+ * does a lookup.
* YPPROC_FIRST takes (struct ypreq_nokey) returns (ypresp_key_val).
- * gets the first key/datum from the map.
+ * gets the first key/datum from the map.
* YPPROC_NEXT takes (struct ypreq_key) returns (ypresp_key_val).
- * gets the next key/datum from the map.
+ * gets the next key/datum from the map.
* YPPROC_XFR takes (struct ypreq_xfr), returns (void).
- * tells ypserv to check if there is a new version of
+ * tells ypserv to check if there is a new version of
* the map.
* YPPROC_CLEAR takes (void), returns (void).
- * tells ypserv to flush it's file cache, so that
+ * tells ypserv to flush it's file cache, so that
* newly transferred files will get read.
* YPPROC_ALL takes (struct ypreq_nokey), returns (bool_t and
* struct ypresp_key_val).
- * returns an array of data, with the bool_t being
- * false on the last datum. read the source, it's
+ * returns an array of data, with the bool_t being
+ * false on the last datum. read the source, it's
* convoluted.
* YPPROC_MASTER takes (struct ypreq_nokey), returns (ypresp_master).
* YPPROC_ORDER takes (struct ypreq_nokey), returns (ypresp_order).
@@ -66,19 +66,19 @@
*/
#ifndef BOOL_DEFINED
-typedef u_int bool;
+typedef unsigned int bool;
#define BOOL_DEFINED
#endif
/* Program and version symbols, magic numbers */
-#define YPPROG ((u_long)100004)
-#define YPVERS ((u_long)2)
-#define YPVERS_ORIG ((u_long)1)
-#define YPMAXRECORD ((u_long)1024)
-#define YPMAXDOMAIN ((u_long)64)
-#define YPMAXMAP ((u_long)64)
-#define YPMAXPEER ((u_long)256)
+#define YPPROG ((unsigned long)100004)
+#define YPVERS ((unsigned long)2)
+#define YPVERS_ORIG ((unsigned long)1)
+#define YPMAXRECORD ((unsigned long)1024)
+#define YPMAXDOMAIN ((unsigned long)64)
+#define YPMAXMAP ((unsigned long)64)
+#define YPMAXPEER ((unsigned long)256)
/*
* I don't know if anything of sun's depends on this, or if they
@@ -98,7 +98,7 @@ typedef struct {
struct ypmap_parms {
const char *domain;
const char *map;
- u_long ordernum;
+ unsigned long ordernum;
char *owner;
};
@@ -115,9 +115,9 @@ struct ypreq_nokey {
struct ypreq_xfr {
struct ypmap_parms map_parms;
- u_long transid;
- u_long proto;
- u_short port;
+ unsigned long transid;
+ unsigned long proto;
+ unsigned short port;
};
#define ypxfr_domain map_parms.domain
#define ypxfr_map map_parms.map
@@ -125,24 +125,24 @@ struct ypreq_xfr {
#define ypxfr_owner map_parms.owner
struct ypresp_val {
- u_long status;
+ unsigned long status;
datum valdat;
};
struct ypresp_key_val {
- u_long status;
+ unsigned long status;
datum keydat;
datum valdat;
};
struct ypresp_master {
- u_long status;
+ unsigned long status;
char *master;
};
struct ypresp_order {
- u_long status;
- u_long ordernum;
+ unsigned long status;
+ unsigned long ordernum;
};
struct ypresp_all {
@@ -158,35 +158,35 @@ struct ypmaplist {
};
struct ypresp_maplist {
- u_long status;
+ unsigned long status;
struct ypmaplist *list;
};
/* ypserv procedure numbers */
-#define YPPROC_NULL ((u_long)0)
-#define YPPROC_DOMAIN ((u_long)1)
-#define YPPROC_DOMAIN_NONACK ((u_long)2)
-#define YPPROC_MATCH ((u_long)3)
-#define YPPROC_FIRST ((u_long)4)
-#define YPPROC_NEXT ((u_long)5)
-#define YPPROC_XFR ((u_long)6)
-#define YPPROC_CLEAR ((u_long)7)
-#define YPPROC_ALL ((u_long)8)
-#define YPPROC_MASTER ((u_long)9)
-#define YPPROC_ORDER ((u_long)10)
-#define YPPROC_MAPLIST ((u_long)11)
+#define YPPROC_NULL ((unsigned long)0)
+#define YPPROC_DOMAIN ((unsigned long)1)
+#define YPPROC_DOMAIN_NONACK ((unsigned long)2)
+#define YPPROC_MATCH ((unsigned long)3)
+#define YPPROC_FIRST ((unsigned long)4)
+#define YPPROC_NEXT ((unsigned long)5)
+#define YPPROC_XFR ((unsigned long)6)
+#define YPPROC_CLEAR ((unsigned long)7)
+#define YPPROC_ALL ((unsigned long)8)
+#define YPPROC_MASTER ((unsigned long)9)
+#define YPPROC_ORDER ((unsigned long)10)
+#define YPPROC_MAPLIST ((unsigned long)11)
/* ypserv procedure return status values */
-#define YP_TRUE ((unsigned long)1) /* general purpose success code */
-#define YP_NOMORE ((unsigned long)2) /* no more entries in map */
-#define YP_FALSE ((unsigned long)0) /* general purpose failure code */
-#define YP_NOMAP ((unsigned long)-1) /* no such map in domain */
-#define YP_NODOM ((unsigned long)-2) /* domain not supported */
-#define YP_NOKEY ((unsigned long)-3) /* no such key in map */
-#define YP_BADOP ((unsigned long)-4) /* invalid operation */
-#define YP_BADDB ((unsigned long)-5) /* server data base is bad */
-#define YP_YPERR ((unsigned long)-6) /* YP server error */
-#define YP_BADARGS ((unsigned long)-7) /* request arguments bad */
+#define YP_TRUE ((unsigned long)1) /* general purpose success code */
+#define YP_NOMORE ((unsigned long)2) /* no more entries in map */
+#define YP_FALSE ((unsigned long)0) /* general purpose failure code */
+#define YP_NOMAP ((unsigned long)-1) /* no such map in domain */