diff options
Diffstat (limited to 'sys/netatm/spans')
-rw-r--r-- | sys/netatm/spans/spans_arp.c | 14 | ||||
-rw-r--r-- | sys/netatm/spans/spans_if.c | 18 | ||||
-rw-r--r-- | sys/netatm/spans/spans_kxdr.c | 4 | ||||
-rw-r--r-- | sys/netatm/spans/spans_msg.c | 12 | ||||
-rw-r--r-- | sys/netatm/spans/spans_proto.c | 4 | ||||
-rw-r--r-- | sys/netatm/spans/spans_util.c | 2 | ||||
-rw-r--r-- | sys/netatm/spans/spans_var.h | 2 |
7 files changed, 26 insertions, 30 deletions
diff --git a/sys/netatm/spans/spans_arp.c b/sys/netatm/spans/spans_arp.c index 21d91bd85f7e..53fcb194f08a 100644 --- a/sys/netatm/spans/spans_arp.c +++ b/sys/netatm/spans/spans_arp.c @@ -572,9 +572,9 @@ spansarp_request(sap) ahp->ah_pln = sizeof(struct in_addr); ahp->ah_op = htons(ARP_REQUEST); spans_addr_copy(spp->sp_addr.address, &ahp->ah_sha); - KM_COPY(&(IA_SIN(inp->inf_addr)->sin_addr), ahp->ah_spa, + bcopy(&(IA_SIN(inp->inf_addr)->sin_addr), ahp->ah_spa, sizeof(struct in_addr)); - KM_COPY(&sap->sa_dstip, ahp->ah_tpa, sizeof(struct in_addr)); + bcopy(&sap->sa_dstip, ahp->ah_tpa, sizeof(struct in_addr)); /* * Now, send the pdu via the CLS service @@ -630,9 +630,9 @@ spansarp_input(clp, m) KB_DATASTART(m, chp, struct spanscls_hdr *); ahp = (struct spansarp_hdr *)(chp + 1); - KM_COPY(ahp->ah_spa, &in_src, sizeof(struct in_addr)); - KM_COPY(ahp->ah_tpa, &in_targ, sizeof(struct in_addr)); - KM_COPY(&(IA_SIN(inp->inf_addr)->sin_addr), &in_me, + bcopy(ahp->ah_spa, &in_src, sizeof(struct in_addr)); + bcopy(ahp->ah_tpa, &in_targ, sizeof(struct in_addr)); + bcopy(&(IA_SIN(inp->inf_addr)->sin_addr), &in_me, sizeof(struct in_addr)); /* @@ -746,8 +746,8 @@ chkop: ahp->ah_op = htons(ARP_REPLY); spans_addr_copy(&ahp->ah_sha, &ahp->ah_tha); spans_addr_copy(spp->sp_addr.address, &ahp->ah_sha); - KM_COPY(ahp->ah_spa, ahp->ah_tpa, sizeof(struct in_addr)); - KM_COPY(&in_me, ahp->ah_spa, sizeof(struct in_addr)); + bcopy(ahp->ah_spa, ahp->ah_tpa, sizeof(struct in_addr)); + bcopy(&in_me, ahp->ah_spa, sizeof(struct in_addr)); err = atm_cm_cpcs_data(clp->cls_conn, m); if (err) diff --git a/sys/netatm/spans/spans_if.c b/sys/netatm/spans/spans_if.c index 95aaa11d112a..c9c85317c8b3 100644 --- a/sys/netatm/spans/spans_if.c +++ b/sys/netatm/spans/spans_if.c @@ -144,13 +144,11 @@ spans_start() /* * Allocate protocol definition structure */ - spans_mgr = (struct sigmgr *)KM_ALLOC(sizeof(struct sigmgr), - M_DEVBUF, M_NOWAIT); + spans_mgr = malloc(sizeof(struct sigmgr), M_DEVBUF, M_NOWAIT|M_ZERO); if (spans_mgr == NULL) { err = ENOMEM; goto done; } - KM_ZERO(spans_mgr, sizeof(struct sigmgr)); /* * Initialize protocol invariant values @@ -233,7 +231,7 @@ spans_stop() /* * Free up protocol block */ - KM_FREE(spans_mgr, sizeof(struct sigmgr), M_DEVBUF); + free(spans_mgr, M_DEVBUF); spans_mgr = NULL; /* @@ -299,13 +297,11 @@ spans_attach(smp, pip) /* * Allocate SPANS protocol instance control block */ - spp = (struct spans *)KM_ALLOC(sizeof(struct spans), - M_DEVBUF, M_NOWAIT); + spp = malloc(sizeof(struct spans), M_DEVBUF, M_NOWAIT|M_ZERO); if (spp == NULL) { err = ENOMEM; goto done; } - KM_ZERO(spp, sizeof(struct spans)); /* * Set variables in SPANS protocol instance control block @@ -362,7 +358,7 @@ done: SPANS_CANCEL(spp); UNLINK((struct siginst *)spp, struct siginst, smp->sm_prinst, si_next); - KM_FREE(spp, sizeof(struct spans), M_DEVBUF); + free(spp, M_DEVBUF); } s = splimp(); pip->pif_sigmgr = NULL; @@ -471,7 +467,7 @@ spans_detach(pip) pip->pif_siginst = NULL; UNLINK((struct siginst *)spp, struct siginst, smp->sm_prinst, si_next); - KM_FREE(spp, sizeof(struct spans), M_DEVBUF); + free(spp, M_DEVBUF); } else { /* * Otherwise, wait for protocol instance to be freed @@ -878,7 +874,7 @@ spans_free(vcp) pip->pif_siginst = NULL; UNLINK((struct siginst *)spp, struct siginst, smp->sm_prinst, si_next); - KM_FREE(spp, sizeof(struct spans), M_DEVBUF); + free(spp, M_DEVBUF); } return (0); @@ -1011,7 +1007,7 @@ spans_ioctl(code, data, arg1) else rsp.avp_encaps = 0; rsp.avp_state = svp->sv_sstate; - KM_ZERO(rsp.avp_owners, sizeof(rsp.avp_owners)); + bzero(rsp.avp_owners, sizeof(rsp.avp_owners)); for (i = 0; cop && i < sizeof(rsp.avp_owners); cop = cop->co_next, i += T_ATM_APP_NAME_LEN+1) { diff --git a/sys/netatm/spans/spans_kxdr.c b/sys/netatm/spans/spans_kxdr.c index 6a214f0a255d..7fd4b663d075 100644 --- a/sys/netatm/spans/spans_kxdr.c +++ b/sys/netatm/spans/spans_kxdr.c @@ -612,7 +612,7 @@ xdrmbuf_getbytes(xdrs, addr, len) * Copy from buffer to user's space */ copy = MIN(len, xdrs->x_handy); - KM_COPY(xdrs->x_private, addr, copy); + bcopy(xdrs->x_private, addr, copy); /* * Update data stream controls @@ -663,7 +663,7 @@ xdrmbuf_putbytes(xdrs, addr, len) * Copy from user's space into buffer */ copy = MIN(len, xdrs->x_handy); - KM_COPY(addr, xdrs->x_private, copy); + bcopy(addr, xdrs->x_private, copy); /* * Update data stream controls diff --git a/sys/netatm/spans/spans_msg.c b/sys/netatm/spans/spans_msg.c index 187b24540dd9..cc821d8db0c4 100644 --- a/sys/netatm/spans/spans_msg.c +++ b/sys/netatm/spans/spans_msg.c @@ -121,7 +121,7 @@ spans_host_link(spp, host_epoch) spans_switch_reset(spp, SPANS_UNI_UP); spp->sp_addr.address_format = T_ATM_SPANS_ADDR; spp->sp_addr.address_length = sizeof(spans_addr); - KM_COPY(&pip->pif_macaddr.ma_data[2], + bcopy(&pip->pif_macaddr.ma_data[2], &spp->sp_addr.address[4], 4); log(LOG_INFO, @@ -698,7 +698,7 @@ spans_open_req(spp, msg) /* * Set up the ATM attributes block */ - KM_ZERO(&call_attrs, sizeof(call_attrs)); + bzero(&call_attrs, sizeof(call_attrs)); call_attrs.nif = svp->sv_nif; call_attrs.api = CMAPI_CPCS; @@ -917,7 +917,7 @@ spans_open_rsp(spp, msg) T_ATM_LOC_USER; svp->sv_connvc->cvc_attr.cause.v.cause_value = T_ATM_CAUSE_CALL_REJECTED; - KM_ZERO(svp->sv_connvc->cvc_attr.cause.v.diagnostics, + bzero(svp->sv_connvc->cvc_attr.cause.v.diagnostics, sizeof(svp->sv_connvc->cvc_attr.cause.v.diagnostics)); atm_cm_cleared(svp->sv_connvc); break; @@ -1025,7 +1025,7 @@ spans_close_req(spp, msg) cvp->cvc_attr.cause.v.location = T_ATM_LOC_USER; cvp->cvc_attr.cause.v.cause_value = T_ATM_CAUSE_NORMAL_CALL_CLEARING; - KM_ZERO(cvp->cvc_attr.cause.v.diagnostics, + bzero(cvp->cvc_attr.cause.v.diagnostics, sizeof(cvp->cvc_attr.cause.v.diagnostics)); atm_cm_cleared(svp->sv_connvc); break; @@ -1115,7 +1115,7 @@ spans_close_rsp(spp, msg) T_ATM_LOC_USER; svp->sv_connvc->cvc_attr.cause.v.cause_value = T_ATM_CAUSE_NORMAL_CALL_CLEARING; - KM_ZERO(svp->sv_connvc->cvc_attr.cause.v.diagnostics, + bzero(svp->sv_connvc->cvc_attr.cause.v.diagnostics, sizeof(svp->sv_connvc->cvc_attr.cause.v.diagnostics)); atm_cm_cleared(svp->sv_connvc); break; @@ -1135,7 +1135,7 @@ spans_close_rsp(spp, msg) T_ATM_LOC_USER; svp->sv_connvc->cvc_attr.cause.v.cause_value = T_ATM_CAUSE_UNSPECIFIED_NORMAL; - KM_ZERO(svp->sv_connvc->cvc_attr.cause.v.diagnostics, + bzero(svp->sv_connvc->cvc_attr.cause.v.diagnostics, sizeof(svp->sv_connvc->cvc_attr.cause.v.diagnostics)); atm_cm_cleared(svp->sv_connvc); break; diff --git a/sys/netatm/spans/spans_proto.c b/sys/netatm/spans/spans_proto.c index b4f2d97093a9..c2877360c8bd 100644 --- a/sys/netatm/spans/spans_proto.c +++ b/sys/netatm/spans/spans_proto.c @@ -419,7 +419,7 @@ spans_vctimer(tip) T_ATM_LOC_USER; svp->sv_connvc->cvc_attr.cause.v.cause_value = T_ATM_CAUSE_NO_USER_RESPONDING; - KM_ZERO(svp->sv_connvc->cvc_attr.cause.v.diagnostics, + bzero(svp->sv_connvc->cvc_attr.cause.v.diagnostics, sizeof(svp->sv_connvc->cvc_attr.cause.v.diagnostics)); atm_cm_cleared(svp->sv_connvc); } @@ -448,7 +448,7 @@ spans_vctimer(tip) T_ATM_LOC_USER; svp->sv_connvc->cvc_attr.cause.v.cause_value = T_ATM_CAUSE_NO_USER_RESPONDING; - KM_ZERO(svp->sv_connvc->cvc_attr.cause.v.diagnostics, + bzero(svp->sv_connvc->cvc_attr.cause.v.diagnostics, sizeof(svp->sv_connvc->cvc_attr.cause.v.diagnostics)); atm_cm_cleared(svp->sv_connvc); } diff --git a/sys/netatm/spans/spans_util.c b/sys/netatm/spans/spans_util.c index 2367e305fa8e..19d4ff6de2ac 100644 --- a/sys/netatm/spans/spans_util.c +++ b/sys/netatm/spans/spans_util.c @@ -438,7 +438,7 @@ spans_addr_print(p) /* * Clear the returned string */ - KM_ZERO(strbuff, sizeof(strbuff)); + bzero(strbuff, sizeof(strbuff)); /* * Get address into integers diff --git a/sys/netatm/spans/spans_var.h b/sys/netatm/spans/spans_var.h index a8a9ebe0616c..113249bf15a0 100644 --- a/sys/netatm/spans/spans_var.h +++ b/sys/netatm/spans/spans_var.h @@ -160,7 +160,7 @@ struct spans_vccb { * Macro to copy a SPANS address from a to b. */ #define spans_addr_copy(a, b) \ - (KM_COPY((caddr_t)a, (caddr_t)b, sizeof(struct spans_addr))) + (bcopy((caddr_t)a, (caddr_t)b, sizeof(struct spans_addr))) /* |