/*
-****************************************************************************
-* Copyright IBM Corporation 1988, 1989 - All Rights Reserved *
-* Copyright Transarc Corporation 1989 - All Rights Reserved *
-* *
-* Permission to use, copy, modify, and distribute this software and its *
-* documentation for any purpose and without fee is hereby granted, *
-* provided that the above copyright notice appear in all copies and *
-* that both that copyright notice and this permission notice appear in *
-* supporting documentation, and that the name of IBM not be used in *
-* advertising or publicity pertaining to distribution of the software *
-* without specific, written prior permission. *
-* *
-* IBM DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL *
-* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL IBM *
-* BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY *
-* DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER *
-* IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING *
-* OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. *
-****************************************************************************
-*/
+ * Copyright 2000, International Business Machines Corporation and others.
+ * All Rights Reserved.
+ *
+ * This software has been released under the terms of the IBM Public
+ * License. For details, see the LICENSE file in the top-level source
+ * directory or online at http://www.openafs.org/dl/license10.html
+ */
+#include <afsconfig.h>
#include "../afs/param.h"
+
+RCSID("$Header$");
+
#include "../rx/rx_kcommon.h"
#include "../h/tcp-param.h"
/* This must be loaded after proc.h to avoid macro collision with a variable*/
if (iovcnt > RX_MAXWVECS+2) {
osi_Panic("Too many (%d) iovecs passed to osi_NetReceive\n", iovcnt);
}
- bcopy((char*)iov, tmpvec, (RX_MAXWVECS+1) * sizeof(struct iovec));
+ memcpy(tmpvec, (char*)iov, (RX_MAXWVECS+1) * sizeof(struct iovec));
#ifdef AFS_SGI65_ENV
code = soreceive(&bhv, &maddr, &tuio, NULL, NULL);
#else
else {
*lengthp = *lengthp - tuio.uio_resid;
if (maddr) {
- bcopy((char*)mtod(maddr, struct sockaddr_in *), (char*)from,
+ memcpy((char*)from, (char*)mtod(maddr, struct sockaddr_in *),
sizeof(struct sockaddr_in));
m_freem(maddr);
}
last = inetdomain.dom_protoswNPROTOSW;
for (tpro = inetdomain.dom_protosw; tpro < last; tpro++) {
if (tpro->pr_protocol == IPPROTO_UDP) {
- bcopy(tpro, &parent_proto, sizeof(parent_proto));
+ memcpy(&parent_proto, tpro, sizeof(parent_proto));
tpro->pr_input = rxk_input;
tpro->pr_fasttimo = rxk_fasttimo;
rxk_initDone = 1;
{
afs_uint32 ppaddr;
int match_value = 0;
- struct hashbucket *slop;
if (numMyNetAddrs == 0)
(void) rxi_GetIFInfo();
ppaddr = ntohl(addr);
*pifad = (struct in_ifaddr*)&hashinfo_inaddr;
- slop = hash_enum(&hashinfo_inaddr, rxi_MatchIfnet, HTF_INET,
+ (void) hash_enum(&hashinfo_inaddr, rxi_MatchIfnet, HTF_INET,
(caddr_t)&ppaddr, (caddr_t)&match_value, (caddr_t)pifad);
-
- if (slop)
- return ((struct in_ifaddr*)slop)->ia_ifp;
+
+ if (match_value)
+ return (*pifad)->ia_ifp;
else
return NULL;
-
-
}
static int rxi_EnumGetIfInfo(struct hashbucket *h, caddr_t key, caddr_t arg1,
if (nvec > RX_MAXWVECS+1) {
osi_Panic("osi_NetSend: %d: Too many iovecs.\n", nvec);
}
- bcopy((char*)dvec, (char*)tvecs, nvec * sizeof(struct iovec));
+ memcpy((char*)tvecs, (char*)dvec, nvec * sizeof(struct iovec));
tuio.uio_iov = tvecs;
tuio.uio_iovcnt = nvec;
to = m_get(M_WAIT, MT_SONAME);
to->m_len = sizeof(struct sockaddr_in);
- bcopy((char*)addr, mtod(to, caddr_t), to->m_len);
+ memcpy(mtod(to, caddr_t), (char*)addr, to->m_len);
BHV_PDATA(&bhv) = (void*)asocket;
code = sosend(&bhv, to, &tuio, 0, NULL);
tpa = mtod(m, caddr_t);
while (len) {
rlen = MIN(len, tl);
- bcopy(tdata, tpa, rlen);
+ memcpy(tpa, tdata, rlen);
asize -= rlen;
len -= rlen;
tpa += rlen;
AFS_SBUNLOCK(&asocket->so_snd, NETEVENT_SODOWN, asocket, s1);
return 1;
}
- bcopy(addr, mtod(um, caddr_t), sizeof(*addr));
+ memcpy(mtod(um, caddr_t), addr, sizeof(*addr));
um->m_len = sizeof(*addr);
/* note that udp_usrreq frees funny mbuf. We hold onto data, but mbuf
* around it is gone. we free address ourselves. */