summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortegge <tegge@FreeBSD.org>1997-06-12 14:03:16 +0000
committertegge <tegge@FreeBSD.org>1997-06-12 14:03:16 +0000
commitadc55c1f8b546487381d05170174c11cc7583f8a (patch)
treec2f6e25b41530411d99fbaac02aa5c6861d43e13
parent88464dd9dcb625ec445f1186065f9fc8c898fe67 (diff)
downloadFreeBSD-src-adc55c1f8b546487381d05170174c11cc7583f8a.zip
FreeBSD-src-adc55c1f8b546487381d05170174c11cc7583f8a.tar.gz
Remove unused routines.
-rw-r--r--sys/nfs/krpc.h6
-rw-r--r--sys/nfs/krpc_subr.c96
-rw-r--r--sys/nfsclient/krpc.h6
-rw-r--r--sys/nfsclient/krpc_subr.c96
4 files changed, 4 insertions, 200 deletions
diff --git a/sys/nfs/krpc.h b/sys/nfs/krpc.h
index 1da22f1..88687ae 100644
--- a/sys/nfs/krpc.h
+++ b/sys/nfs/krpc.h
@@ -1,5 +1,5 @@
/* $NetBSD: krpc.h,v 1.4 1995/12/19 23:07:11 cgd Exp $ */
-/* $Id:$ */
+/* $Id: krpc.h,v 1.2 1997/05/11 18:05:39 tegge Exp $ */
#include <sys/cdefs.h>
@@ -11,10 +11,6 @@ int krpc_portmap __P((struct sockaddr_in *sin,
u_int prog, u_int vers, u_int16_t *portp,struct proc *procp));
struct mbuf *xdr_string_encode __P((char *str, int len));
-struct mbuf *xdr_string_decode __P((struct mbuf *m, char *str, int *len_p));
-struct mbuf *xdr_inaddr_encode __P((struct in_addr *ia));
-struct mbuf *xdr_inaddr_decode __P((struct mbuf *m, struct in_addr *ia));
-
/*
* RPC definitions for the portmapper
diff --git a/sys/nfs/krpc_subr.c b/sys/nfs/krpc_subr.c
index bb31e4b..e3eadb6 100644
--- a/sys/nfs/krpc_subr.c
+++ b/sys/nfs/krpc_subr.c
@@ -1,5 +1,5 @@
/* $NetBSD: krpc_subr.c,v 1.12.4.1 1996/06/07 00:52:26 cgd Exp $ */
-/* $Id:$ */
+/* $Id: krpc_subr.c,v 1.2 1997/05/11 18:05:39 tegge Exp $ */
/*
* Copyright (c) 1995 Gordon Ross, Adam Glass
@@ -496,97 +496,3 @@ xdr_string_encode(str, len)
bcopy(str, xs->data, len);
return (m);
}
-
-struct mbuf *
-xdr_string_decode(m, str, len_p)
- struct mbuf *m;
- char *str;
- int *len_p; /* bufsize - 1 */
-{
- struct xdr_string *xs;
- int mlen; /* message length */
- int slen; /* string length */
-
- if (m->m_len < 4) {
- m = m_pullup(m, 4);
- if (m == NULL)
- return (NULL);
- }
- xs = mtod(m, struct xdr_string *);
- slen = fxdr_unsigned(u_int32_t, xs->len);
- mlen = 4 + ((slen + 3) & ~3);
-
- if (slen > *len_p)
- slen = *len_p;
- m_copydata(m, 4, slen, str);
- m_adj(m, mlen);
-
- str[slen] = '\0';
- *len_p = slen;
-
- return (m);
-}
-
-
-/*
- * Inet address in RPC messages
- * (Note, really four ints, NOT chars. Blech.)
- */
-struct xdr_inaddr {
- u_int32_t atype;
- u_int32_t addr[4];
-};
-
-struct mbuf *
-xdr_inaddr_encode(ia)
- struct in_addr *ia; /* already in network order */
-{
- struct mbuf *m;
- struct xdr_inaddr *xi;
- u_int8_t *cp;
- u_int32_t *ip;
-
- m = m_get(M_WAIT, MT_DATA);
- xi = mtod(m, struct xdr_inaddr *);
- m->m_len = sizeof(*xi);
- xi->atype = txdr_unsigned(1);
- ip = xi->addr;
- cp = (u_int8_t *)&ia->s_addr;
- *ip++ = txdr_unsigned(*cp++);
- *ip++ = txdr_unsigned(*cp++);
- *ip++ = txdr_unsigned(*cp++);
- *ip++ = txdr_unsigned(*cp++);
-
- return (m);
-}
-
-struct mbuf *
-xdr_inaddr_decode(m, ia)
- struct mbuf *m;
- struct in_addr *ia; /* already in network order */
-{
- struct xdr_inaddr *xi;
- u_int8_t *cp;
- u_int32_t *ip;
-
- if (m->m_len < sizeof(*xi)) {
- m = m_pullup(m, sizeof(*xi));
- if (m == NULL)
- return (NULL);
- }
- xi = mtod(m, struct xdr_inaddr *);
- if (xi->atype != txdr_unsigned(1)) {
- ia->s_addr = INADDR_ANY;
- goto out;
- }
- ip = xi->addr;
- cp = (u_int8_t *)&ia->s_addr;
- *cp++ = fxdr_unsigned(u_int8_t, *ip++);
- *cp++ = fxdr_unsigned(u_int8_t, *ip++);
- *cp++ = fxdr_unsigned(u_int8_t, *ip++);
- *cp++ = fxdr_unsigned(u_int8_t, *ip++);
-
-out:
- m_adj(m, sizeof(*xi));
- return (m);
-}
diff --git a/sys/nfsclient/krpc.h b/sys/nfsclient/krpc.h
index 1da22f1..88687ae 100644
--- a/sys/nfsclient/krpc.h
+++ b/sys/nfsclient/krpc.h
@@ -1,5 +1,5 @@
/* $NetBSD: krpc.h,v 1.4 1995/12/19 23:07:11 cgd Exp $ */
-/* $Id:$ */
+/* $Id: krpc.h,v 1.2 1997/05/11 18:05:39 tegge Exp $ */
#include <sys/cdefs.h>
@@ -11,10 +11,6 @@ int krpc_portmap __P((struct sockaddr_in *sin,
u_int prog, u_int vers, u_int16_t *portp,struct proc *procp));
struct mbuf *xdr_string_encode __P((char *str, int len));
-struct mbuf *xdr_string_decode __P((struct mbuf *m, char *str, int *len_p));
-struct mbuf *xdr_inaddr_encode __P((struct in_addr *ia));
-struct mbuf *xdr_inaddr_decode __P((struct mbuf *m, struct in_addr *ia));
-
/*
* RPC definitions for the portmapper
diff --git a/sys/nfsclient/krpc_subr.c b/sys/nfsclient/krpc_subr.c
index bb31e4b..e3eadb6 100644
--- a/sys/nfsclient/krpc_subr.c
+++ b/sys/nfsclient/krpc_subr.c
@@ -1,5 +1,5 @@
/* $NetBSD: krpc_subr.c,v 1.12.4.1 1996/06/07 00:52:26 cgd Exp $ */
-/* $Id:$ */
+/* $Id: krpc_subr.c,v 1.2 1997/05/11 18:05:39 tegge Exp $ */
/*
* Copyright (c) 1995 Gordon Ross, Adam Glass
@@ -496,97 +496,3 @@ xdr_string_encode(str, len)
bcopy(str, xs->data, len);
return (m);
}
-
-struct mbuf *
-xdr_string_decode(m, str, len_p)
- struct mbuf *m;
- char *str;
- int *len_p; /* bufsize - 1 */
-{
- struct xdr_string *xs;
- int mlen; /* message length */
- int slen; /* string length */
-
- if (m->m_len < 4) {
- m = m_pullup(m, 4);
- if (m == NULL)
- return (NULL);
- }
- xs = mtod(m, struct xdr_string *);
- slen = fxdr_unsigned(u_int32_t, xs->len);
- mlen = 4 + ((slen + 3) & ~3);
-
- if (slen > *len_p)
- slen = *len_p;
- m_copydata(m, 4, slen, str);
- m_adj(m, mlen);
-
- str[slen] = '\0';
- *len_p = slen;
-
- return (m);
-}
-
-
-/*
- * Inet address in RPC messages
- * (Note, really four ints, NOT chars. Blech.)
- */
-struct xdr_inaddr {
- u_int32_t atype;
- u_int32_t addr[4];
-};
-
-struct mbuf *
-xdr_inaddr_encode(ia)
- struct in_addr *ia; /* already in network order */
-{
- struct mbuf *m;
- struct xdr_inaddr *xi;
- u_int8_t *cp;
- u_int32_t *ip;
-
- m = m_get(M_WAIT, MT_DATA);
- xi = mtod(m, struct xdr_inaddr *);
- m->m_len = sizeof(*xi);
- xi->atype = txdr_unsigned(1);
- ip = xi->addr;
- cp = (u_int8_t *)&ia->s_addr;
- *ip++ = txdr_unsigned(*cp++);
- *ip++ = txdr_unsigned(*cp++);
- *ip++ = txdr_unsigned(*cp++);
- *ip++ = txdr_unsigned(*cp++);
-
- return (m);
-}
-
-struct mbuf *
-xdr_inaddr_decode(m, ia)
- struct mbuf *m;
- struct in_addr *ia; /* already in network order */
-{
- struct xdr_inaddr *xi;
- u_int8_t *cp;
- u_int32_t *ip;
-
- if (m->m_len < sizeof(*xi)) {
- m = m_pullup(m, sizeof(*xi));
- if (m == NULL)
- return (NULL);
- }
- xi = mtod(m, struct xdr_inaddr *);
- if (xi->atype != txdr_unsigned(1)) {
- ia->s_addr = INADDR_ANY;
- goto out;
- }
- ip = xi->addr;
- cp = (u_int8_t *)&ia->s_addr;
- *cp++ = fxdr_unsigned(u_int8_t, *ip++);
- *cp++ = fxdr_unsigned(u_int8_t, *ip++);
- *cp++ = fxdr_unsigned(u_int8_t, *ip++);
- *cp++ = fxdr_unsigned(u_int8_t, *ip++);
-
-out:
- m_adj(m, sizeof(*xi));
- return (m);
-}
OpenPOWER on IntegriCloud