-/* $OpenBSD: radix.c,v 1.32 2013/12/12 14:43:38 millert Exp $ */
+/* $OpenBSD: radix.c,v 1.33 2014/01/09 21:57:51 tedu Exp $ */
/* $NetBSD: radix.c,v 1.20 2003/08/07 16:32:56 agc Exp $ */
/*
if (mlen <= skip)
return (mask_rnhead->rnh_nodes);
if (skip > 1)
- Bcopy(rn_ones + 1, addmask_key + 1, skip - 1);
+ memmove(addmask_key + 1, rn_ones + 1, skip - 1);
if ((m0 = mlen) > skip)
- Bcopy(netmask + skip, addmask_key + skip, mlen - skip);
+ memmove(addmask_key + skip, netmask + skip, mlen - skip);
/*
* Trim trailing zeroes.
*/
return (0);
Bzero(x, max_keylen + 2 * sizeof (*x));
netmask = cp = (caddr_t)(x + 2);
- Bcopy(addmask_key, cp, mlen);
+ memmove(cp, addmask_key, mlen);
x = rn_insert(cp, mask_rnhead, &maskduplicated, x);
if (maskduplicated) {
log(LOG_ERR, "rn_addmask: mask impossibly already in tree\n");
-/* $OpenBSD: radix.h,v 1.20 2013/10/24 18:50:16 deraadt Exp $ */
+/* $OpenBSD: radix.h,v 1.21 2014/01/09 21:57:51 tedu Exp $ */
/* $NetBSD: radix.h,v 1.8 1996/02/13 22:00:37 christos Exp $ */
/*
#ifdef _KERNEL
#define Bcmp(a, b, n) bcmp(((caddr_t)(a)), ((caddr_t)(b)), (unsigned)(n))
-#define Bcopy(a, b, n) bcopy(((caddr_t)(a)), ((caddr_t)(b)), (unsigned)(n))
#define Bzero(p, n) bzero((caddr_t)(p), (unsigned)(n));
#define R_Malloc(p, t, n) (p = (t) malloc((unsigned long)(n), M_RTABLE, M_NOWAIT))
#define Free(p) free((caddr_t)p, M_RTABLE);
-/* $OpenBSD: route.c,v 1.147 2013/10/20 13:21:57 claudio Exp $ */
+/* $OpenBSD: route.c,v 1.148 2014/01/09 21:57:52 tedu Exp $ */
/* $NetBSD: route.c,v 1.14 1996/02/13 22:00:46 christos Exp $ */
/*
rt_maskedcopy(info->rti_info[RTAX_DST], ndst,
info->rti_info[RTAX_NETMASK]);
} else
- Bcopy(info->rti_info[RTAX_DST], ndst,
+ memcpy(ndst, info->rti_info[RTAX_DST],
info->rti_info[RTAX_DST]->sa_len);
#ifndef SMALL_KERNEL
if (rn_mpath_capable(rnh)) {
new = rt->rt_nodes->rn_key;
old = NULL;
}
- Bcopy(gate, (rt->rt_gateway = (struct sockaddr *)(new + dlen)), glen);
+ rt->rt_gateway = (struct sockaddr *)(new + dlen);
+ memmove(rt->rt_gateway, gate, glen);
if (old) {
- Bcopy(dst, new, dlen);
+ memmove(new, dst, dlen);
Free(old);
}
if (rt->rt_gwroute != NULL) {
-/* $OpenBSD: rtsock.c,v 1.131 2013/11/01 20:09:14 bluhm Exp $ */
+/* $OpenBSD: rtsock.c,v 1.132 2014/01/09 21:57:52 tedu Exp $ */
/* $NetBSD: rtsock.c,v 1.18 1996/03/29 00:32:10 cgd Exp $ */
/*
error = ENOBUFS;
goto flush;
}
- Bcopy(rtm, new_rtm, rtm->rtm_msglen);
+ memcpy(new_rtm, rtm, rtm->rtm_msglen);
Free(rtm); rtm = new_rtm;
}
rt_msg2(rtm->rtm_type, RTM_VERSION, &info, (caddr_t)rtm,
-/* $OpenBSD: if_ether.c,v 1.115 2014/01/09 06:29:05 tedu Exp $ */
+/* $OpenBSD: if_ether.c,v 1.116 2014/01/09 21:57:52 tedu Exp $ */
/* $NetBSD: if_ether.c,v 1.31 1996/05/11 12:59:58 mycroft Exp $ */
/*
* interface.
*/
rt->rt_expire = 0;
- Bcopy(((struct arpcom *)rt->rt_ifp)->ac_enaddr,
- LLADDR(SDL(gate)),
- SDL(gate)->sdl_alen = ETHER_ADDR_LEN);
+ SDL(gate)->sdl_alen = ETHER_ADDR_LEN;
+ memcpy(LLADDR(SDL(gate)),
+ ((struct arpcom *)rt->rt_ifp)->ac_enaddr,
+ ETHER_ADDR_LEN);
if (useloopback)
rt->rt_ifp = lo0ifp;
/*
-/* $OpenBSD: nd6.c,v 1.106 2014/01/07 17:07:46 mikeb Exp $ */
+/* $OpenBSD: nd6.c,v 1.107 2014/01/09 21:57:52 tedu Exp $ */
/* $KAME: nd6.c,v 1.280 2002/06/08 19:52:07 itojun Exp $ */
/*
ln->ln_state = ND6_LLINFO_REACHABLE;
ln->ln_byhint = 0;
if (macp) {
- Bcopy(macp, LLADDR(SDL(gate)), ifp->if_addrlen);
+ memcpy(LLADDR(SDL(gate)), macp, ifp->if_addrlen);
SDL(gate)->sdl_alen = ifp->if_addrlen;
}
if (nd6_useloopback) {