summaryrefslogtreecommitdiffstats
path: root/sys/netatm/uni
diff options
context:
space:
mode:
authorarr <arr@FreeBSD.org>2002-04-19 17:45:22 +0000
committerarr <arr@FreeBSD.org>2002-04-19 17:45:22 +0000
commit122c24db48374dee47cf7a553f344ff0a6aee1e9 (patch)
treec3e1adf80f94ef52147a4d2fc164dab32797d93d /sys/netatm/uni
parent1482903ceafd6c259928760686a1a308932b4d7c (diff)
downloadFreeBSD-src-122c24db48374dee47cf7a553f344ff0a6aee1e9.zip
FreeBSD-src-122c24db48374dee47cf7a553f344ff0a6aee1e9.tar.gz
- Change KM_ macro calls to the appropriate function call.
- Nuke KM_ macros from port.h This is a leadin step towards cleaning up this code as I wait for some ATM cards and a ATM switch to arrive.
Diffstat (limited to 'sys/netatm/uni')
-rw-r--r--sys/netatm/uni/sscop_pdu.c2
-rw-r--r--sys/netatm/uni/sscop_subr.c6
-rw-r--r--sys/netatm/uni/sscop_upper.c6
-rw-r--r--sys/netatm/uni/uniarp.c8
-rw-r--r--sys/netatm/uni/uniarp_output.c56
-rw-r--r--sys/netatm/uni/uniip.c4
-rw-r--r--sys/netatm/uni/unisig_decode.c34
-rw-r--r--sys/netatm/uni/unisig_if.c17
-rw-r--r--sys/netatm/uni/unisig_sigmgr_state.c2
-rw-r--r--sys/netatm/uni/unisig_subr.c62
-rw-r--r--sys/netatm/uni/unisig_util.c2
-rw-r--r--sys/netatm/uni/unisig_vc_state.c4
12 files changed, 98 insertions, 105 deletions
diff --git a/sys/netatm/uni/sscop_pdu.c b/sys/netatm/uni/sscop_pdu.c
index f59f500..2431768 100644
--- a/sys/netatm/uni/sscop_pdu.c
+++ b/sys/netatm/uni/sscop_pdu.c
@@ -1208,7 +1208,7 @@ sscop_send_ud(sop, m)
KB_DATAEND(ml, cp, u_char *);
cp += pad;
*cp++ = (pad << PT_PAD_SHIFT) | PT_UD;
- KM_ZERO(cp, 3);
+ bzero(cp, 3);
KB_LEN(ml) += trlen;
/*
diff --git a/sys/netatm/uni/sscop_subr.c b/sys/netatm/uni/sscop_subr.c
index 915837f..086b7c4 100644
--- a/sys/netatm/uni/sscop_subr.c
+++ b/sys/netatm/uni/sscop_subr.c
@@ -104,7 +104,7 @@ sscop_stat_getelem(m, pelem)
* Get element from this buffer
*/
if ((int)cp & (sizeof(sscop_seq) - 1))
- KM_COPY(cp, (caddr_t)pelem, sizeof(sscop_seq));
+ bcopy(cp, (caddr_t)pelem, sizeof(sscop_seq));
else
*pelem = *(sscop_seq *)cp;
@@ -122,7 +122,7 @@ sscop_stat_getelem(m, pelem)
* Copy what's in this buffer
*/
i = KB_LEN(m);
- KM_COPY(cp, (caddr_t)pelem, i);
+ bcopy(cp, (caddr_t)pelem, i);
KB_LEN(m) = 0;
/*
@@ -136,7 +136,7 @@ sscop_stat_getelem(m, pelem)
*/
j = sizeof(sscop_seq) - i;
KB_DATASTART(m, cp, caddr_t);
- KM_COPY(cp, (caddr_t)pelem + i, j);
+ bcopy(cp, (caddr_t)pelem + i, j);
/*
* Update buffer controls
diff --git a/sys/netatm/uni/sscop_upper.c b/sys/netatm/uni/sscop_upper.c
index 8d68903..d0d1d03 100644
--- a/sys/netatm/uni/sscop_upper.c
+++ b/sys/netatm/uni/sscop_upper.c
@@ -351,7 +351,7 @@ sscop_pdu_receive(m, sop, typep)
/*
* Trailer not aligned in buffer, use local memory
*/
- KM_COPY(cp, (caddr_t)&sscop_trailer, tlen);
+ bcopy(cp, (caddr_t)&sscop_trailer, tlen);
cp = (caddr_t)&sscop_trailer;
}
} else {
@@ -370,11 +370,11 @@ sscop_pdu_receive(m, sop, typep)
goto badpdu;
KB_DATASTART(ml, cp1, caddr_t);
- KM_COPY(cp1, cp + off, KB_LEN(ml));
+ bcopy(cp1, cp + off, KB_LEN(ml));
KB_LEN(ml) = 0;
KB_TAILADJ(mn, -off);
KB_DATAEND(mn, cp1, caddr_t);
- KM_COPY(cp1, cp, off);
+ bcopy(cp1, cp, off);
}
/*
diff --git a/sys/netatm/uni/uniarp.c b/sys/netatm/uni/uniarp.c
index 6654299..4590aa5 100644
--- a/sys/netatm/uni/uniarp.c
+++ b/sys/netatm/uni/uniarp.c
@@ -965,14 +965,14 @@ uniarp_ioctl(code, data, arg1)
break;
}
buf_len = i * sizeof(struct uniarp_prf);
- buf_addr = KM_ALLOC(buf_len, M_DEVBUF, M_NOWAIT);
+ buf_addr = malloc(buf_len, M_DEVBUF, M_NOWAIT);
if (buf_addr == NULL) {
err = ENOMEM;
break;
}
err = copyin(asp->asr_arp_pbuf, buf_addr, buf_len);
if (err) {
- KM_FREE(buf_addr, buf_len, M_DEVBUF);
+ free(buf_addr, M_DEVBUF);
break;
}
} else {
@@ -985,9 +985,7 @@ uniarp_ioctl(code, data, arg1)
* Free any existing prefix address list
*/
if (uip->uip_prefix != NULL) {
- KM_FREE(uip->uip_prefix,
- uip->uip_nprefix * sizeof(struct uniarp_prf),
- M_DEVBUF);
+ free(uip->uip_prefix, M_DEVBUF);
uip->uip_prefix = NULL;
uip->uip_nprefix = 0;
}
diff --git a/sys/netatm/uni/uniarp_output.c b/sys/netatm/uni/uniarp_output.c
index c83a78f..e3cfeac 100644
--- a/sys/netatm/uni/uniarp_output.c
+++ b/sys/netatm/uni/uniarp_output.c
@@ -141,7 +141,7 @@ uniarp_arp_req(uip, tip)
ahp->ah_shtl = ARP_TL_NSAPA | (len & ARP_TL_LMASK);
/* ah_sha */
- KM_COPY(sip->si_addr.address, cp, len - 1);
+ bcopy(sip->si_addr.address, cp, len - 1);
((struct atm_addr_nsap *)cp)->aan_sel = nip->nif_sel;
cp += len;
@@ -152,7 +152,7 @@ uniarp_arp_req(uip, tip)
ahp->ah_shtl = ARP_TL_E164 | (len & ARP_TL_LMASK);
/* ah_sha */
- KM_COPY(sip->si_addr.address, cp, len);
+ bcopy(sip->si_addr.address, cp, len);
cp += len;
if (sip->si_subaddr.address_format == T_ATM_ENDSYS_ADDR) {
@@ -160,7 +160,7 @@ uniarp_arp_req(uip, tip)
ahp->ah_sstl = ARP_TL_NSAPA | (len & ARP_TL_LMASK);
/* ah_ssa */
- KM_COPY(sip->si_subaddr.address, cp, len - 1);
+ bcopy(sip->si_subaddr.address, cp, len - 1);
((struct atm_addr_nsap *)cp)->aan_sel = nip->nif_sel;
cp += len;
} else
@@ -176,7 +176,7 @@ uniarp_arp_req(uip, tip)
ahp->ah_spln = sizeof(struct in_addr);
/* ah_spa */
- KM_COPY((caddr_t)&(IA_SIN(inp->inf_addr)->sin_addr), cp,
+ bcopy((caddr_t)&(IA_SIN(inp->inf_addr)->sin_addr), cp,
sizeof(struct in_addr));
cp += sizeof(struct in_addr);
@@ -186,7 +186,7 @@ uniarp_arp_req(uip, tip)
ahp->ah_tpln = sizeof(struct in_addr);
/* ah_tpa */
- KM_COPY((caddr_t)tip, cp, sizeof(struct in_addr));
+ bcopy((caddr_t)tip, cp, sizeof(struct in_addr));
/*
* Finally, send the pdu to the ATMARP server
@@ -294,7 +294,7 @@ uniarp_arp_rsp(uip, amp, tip, tatm, tsub, ivp)
ahp->ah_shtl = ARP_TL_NSAPA | (len & ARP_TL_LMASK);
/* ah_sha */
- KM_COPY(amp->am_dstatm.address, cp, len);
+ bcopy(amp->am_dstatm.address, cp, len);
cp += len;
ahp->ah_sstl = 0;
@@ -304,7 +304,7 @@ uniarp_arp_rsp(uip, amp, tip, tatm, tsub, ivp)
ahp->ah_shtl = ARP_TL_E164 | (len & ARP_TL_LMASK);
/* ah_sha */
- KM_COPY(amp->am_dstatm.address, cp, len);
+ bcopy(amp->am_dstatm.address, cp, len);
cp += len;
if (amp->am_dstatmsub.address_format == T_ATM_ENDSYS_ADDR) {
@@ -312,7 +312,7 @@ uniarp_arp_rsp(uip, amp, tip, tatm, tsub, ivp)
ahp->ah_sstl = ARP_TL_NSAPA | (len & ARP_TL_LMASK);
/* ah_ssa */
- KM_COPY(amp->am_dstatmsub.address, cp, len);
+ bcopy(amp->am_dstatmsub.address, cp, len);
cp += len;
} else
ahp->ah_sstl = 0;
@@ -327,7 +327,7 @@ uniarp_arp_rsp(uip, amp, tip, tatm, tsub, ivp)
ahp->ah_spln = sizeof(struct in_addr);
/* ah_spa */
- KM_COPY((caddr_t)&amp->am_dstip, cp, sizeof(struct in_addr));
+ bcopy((caddr_t)&amp->am_dstip, cp, sizeof(struct in_addr));
cp += sizeof(struct in_addr);
len = tatm->address_length;
@@ -336,7 +336,7 @@ uniarp_arp_rsp(uip, amp, tip, tatm, tsub, ivp)
ahp->ah_thtl = ARP_TL_NSAPA | (len & ARP_TL_LMASK);
/* ah_tha */
- KM_COPY(tatm->address, cp, len);
+ bcopy(tatm->address, cp, len);
cp += len;
ahp->ah_tstl = 0;
@@ -346,7 +346,7 @@ uniarp_arp_rsp(uip, amp, tip, tatm, tsub, ivp)
ahp->ah_thtl = ARP_TL_E164 | (len & ARP_TL_LMASK);
/* ah_tha */
- KM_COPY(tatm->address, cp, len);
+ bcopy(tatm->address, cp, len);
cp += len;
if (tsub->address_format == T_ATM_ENDSYS_ADDR) {
@@ -354,7 +354,7 @@ uniarp_arp_rsp(uip, amp, tip, tatm, tsub, ivp)
ahp->ah_tstl = ARP_TL_NSAPA | (len & ARP_TL_LMASK);
/* ah_tsa */
- KM_COPY(tsub->address, cp, len);
+ bcopy(tsub->address, cp, len);
cp += len;
} else
ahp->ah_tstl = 0;
@@ -368,7 +368,7 @@ uniarp_arp_rsp(uip, amp, tip, tatm, tsub, ivp)
ahp->ah_tpln = sizeof(struct in_addr);
/* ah_tpa */
- KM_COPY((caddr_t)tip, cp, sizeof(struct in_addr));
+ bcopy((caddr_t)tip, cp, sizeof(struct in_addr));
/*
* Finally, send the pdu to the vcc peer
@@ -533,7 +533,7 @@ uniarp_inarp_req(uip, tatm, tsub, ivp)
ahp->ah_shtl = ARP_TL_NSAPA | (len & ARP_TL_LMASK);
/* ah_sha */
- KM_COPY(sip->si_addr.address, cp, len - 1);
+ bcopy(sip->si_addr.address, cp, len - 1);
((struct atm_addr_nsap *)cp)->aan_sel = nip->nif_sel;
cp += len;
@@ -544,7 +544,7 @@ uniarp_inarp_req(uip, tatm, tsub, ivp)
ahp->ah_shtl = ARP_TL_E164 | (len & ARP_TL_LMASK);
/* ah_sha */
- KM_COPY(sip->si_addr.address, cp, len);
+ bcopy(sip->si_addr.address, cp, len);
cp += len;
if (sip->si_subaddr.address_format == T_ATM_ENDSYS_ADDR) {
@@ -552,7 +552,7 @@ uniarp_inarp_req(uip, tatm, tsub, ivp)
ahp->ah_sstl = ARP_TL_NSAPA | (len & ARP_TL_LMASK);
/* ah_ssa */
- KM_COPY(sip->si_subaddr.address, cp, len - 1);
+ bcopy(sip->si_subaddr.address, cp, len - 1);
((struct atm_addr_nsap *)cp)->aan_sel = nip->nif_sel;
cp += len;
} else
@@ -568,7 +568,7 @@ uniarp_inarp_req(uip, tatm, tsub, ivp)
ahp->ah_spln = sizeof(struct in_addr);
/* ah_spa */
- KM_COPY((caddr_t)&(IA_SIN(inp->inf_addr)->sin_addr), cp,
+ bcopy((caddr_t)&(IA_SIN(inp->inf_addr)->sin_addr), cp,
sizeof(struct in_addr));
cp += sizeof(struct in_addr);
@@ -578,7 +578,7 @@ uniarp_inarp_req(uip, tatm, tsub, ivp)
ahp->ah_thtl = ARP_TL_NSAPA | (len & ARP_TL_LMASK);
/* ah_tha */
- KM_COPY(tatm->address, cp, len);
+ bcopy(tatm->address, cp, len);
cp += len;
ahp->ah_tstl = 0;
@@ -588,7 +588,7 @@ uniarp_inarp_req(uip, tatm, tsub, ivp)
ahp->ah_thtl = ARP_TL_E164 | (len & ARP_TL_LMASK);
/* ah_tha */
- KM_COPY(tatm->address, cp, len);
+ bcopy(tatm->address, cp, len);
cp += len;
if (tsub->address_format == T_ATM_ENDSYS_ADDR) {
@@ -596,7 +596,7 @@ uniarp_inarp_req(uip, tatm, tsub, ivp)
ahp->ah_tstl = ARP_TL_NSAPA | (len & ARP_TL_LMASK);
/* ah_tsa */
- KM_COPY(tsub->address, cp, len);
+ bcopy(tsub->address, cp, len);
cp += len;
} else
ahp->ah_tstl = 0;
@@ -719,7 +719,7 @@ uniarp_inarp_rsp(uip, tip, tatm, tsub, ivp)
ahp->ah_shtl = ARP_TL_NSAPA | (len & ARP_TL_LMASK);
/* ah_sha */
- KM_COPY(sip->si_addr.address, cp, len - 1);
+ bcopy(sip->si_addr.address, cp, len - 1);
((struct atm_addr_nsap *)cp)->aan_sel = nip->nif_sel;
cp += len;
@@ -730,7 +730,7 @@ uniarp_inarp_rsp(uip, tip, tatm, tsub, ivp)
ahp->ah_shtl = ARP_TL_E164 | (len & ARP_TL_LMASK);
/* ah_sha */
- KM_COPY(sip->si_addr.address, cp, len);
+ bcopy(sip->si_addr.address, cp, len);
cp += len;
if (sip->si_subaddr.address_format == T_ATM_ENDSYS_ADDR) {
@@ -738,7 +738,7 @@ uniarp_inarp_rsp(uip, tip, tatm, tsub, ivp)
ahp->ah_sstl = ARP_TL_NSAPA | (len & ARP_TL_LMASK);
/* ah_ssa */
- KM_COPY(sip->si_subaddr.address, cp, len - 1);
+ bcopy(sip->si_subaddr.address, cp, len - 1);
((struct atm_addr_nsap *)cp)->aan_sel = nip->nif_sel;
cp += len;
} else
@@ -754,7 +754,7 @@ uniarp_inarp_rsp(uip, tip, tatm, tsub, ivp)
ahp->ah_spln = sizeof(struct in_addr);
/* ah_spa */
- KM_COPY((caddr_t)&(IA_SIN(inp->inf_addr)->sin_addr), cp,
+ bcopy((caddr_t)&(IA_SIN(inp->inf_addr)->sin_addr), cp,
sizeof(struct in_addr));
cp += sizeof(struct in_addr);
@@ -764,7 +764,7 @@ uniarp_inarp_rsp(uip, tip, tatm, tsub, ivp)
ahp->ah_thtl = ARP_TL_NSAPA | (len & ARP_TL_LMASK);
/* ah_tha */
- KM_COPY(tatm->address, cp, len);
+ bcopy(tatm->address, cp, len);
cp += len;
ahp->ah_tstl = 0;
@@ -774,7 +774,7 @@ uniarp_inarp_rsp(uip, tip, tatm, tsub, ivp)
ahp->ah_thtl = ARP_TL_E164 | (len & ARP_TL_LMASK);
/* ah_tha */
- KM_COPY(tatm->address, cp, len);
+ bcopy(tatm->address, cp, len);
cp += len;
if (tsub->address_format == T_ATM_ENDSYS_ADDR) {
@@ -782,7 +782,7 @@ uniarp_inarp_rsp(uip, tip, tatm, tsub, ivp)
ahp->ah_tstl = ARP_TL_NSAPA | (len & ARP_TL_LMASK);
/* ah_tsa */
- KM_COPY(tsub->address, cp, len);
+ bcopy(tsub->address, cp, len);
cp += len;
} else
ahp->ah_tstl = 0;
@@ -796,7 +796,7 @@ uniarp_inarp_rsp(uip, tip, tatm, tsub, ivp)
ahp->ah_tpln = sizeof(struct in_addr);
/* ah_tpa */
- KM_COPY((caddr_t)tip, cp, sizeof(struct in_addr));
+ bcopy((caddr_t)tip, cp, sizeof(struct in_addr));
/*
* Finally, send the pdu to the vcc peer
diff --git a/sys/netatm/uni/uniip.c b/sys/netatm/uni/uniip.c
index e9d11c6..6054166 100644
--- a/sys/netatm/uni/uniip.c
+++ b/sys/netatm/uni/uniip.c
@@ -261,10 +261,8 @@ uniip_ipdact(inp)
*/
UNLINK(uip, struct uniip, uniip_head, uip_next);
if (uip->uip_prefix != NULL)
- KM_FREE(uip->uip_prefix,
- uip->uip_nprefix * sizeof(struct uniarp_prf), M_DEVBUF);
+ free(uip->uip_prefix, M_DEVBUF);
atm_free((caddr_t)uip);
-
return (0);
}
diff --git a/sys/netatm/uni/unisig_decode.c b/sys/netatm/uni/unisig_decode.c
index 1c4a55e..ad484f5 100644
--- a/sys/netatm/uni/unisig_decode.c
+++ b/sys/netatm/uni/unisig_decode.c
@@ -1089,7 +1089,7 @@ usf_dec_ie_aalp(usf, ie)
/*
* Clear the IE
*/
- KM_COPY(&ie_aalp_absent, &ie->ie_u.ie_aalp,
+ bcopy(&ie_aalp_absent, &ie->ie_u.ie_aalp,
sizeof(ie_aalp_absent));
/*
@@ -1237,7 +1237,7 @@ usf_dec_ie_clrt(usf, ie)
/*
* Clear the IE
*/
- KM_COPY(&ie_clrt_absent, &ie->ie_u.ie_clrt,
+ bcopy(&ie_clrt_absent, &ie->ie_u.ie_clrt,
sizeof(ie_clrt_absent));
/*
@@ -1271,7 +1271,7 @@ usf_dec_ie_bbcp(usf, ie)
/*
* Clear the IE
*/
- KM_COPY(&ie_bbcp_absent, &ie->ie_u.ie_bbcp,
+ bcopy(&ie_bbcp_absent, &ie->ie_u.ie_bbcp,
sizeof(ie_bbcp_absent));
/*
@@ -1335,7 +1335,7 @@ usf_dec_ie_bhli(usf, ie)
/*
* Clear the IE
*/
- KM_COPY(&ie_bhli_absent, &ie->ie_u.ie_bhli,
+ bcopy(&ie_bhli_absent, &ie->ie_u.ie_bhli,
sizeof(ie_bhli_absent));
/*
@@ -1429,7 +1429,7 @@ usf_dec_ie_blli(usf, ie)
/*
* Clear the IE
*/
- KM_COPY(&ie_blli_absent, &ie->ie_u.ie_blli,
+ bcopy(&ie_blli_absent, &ie->ie_u.ie_blli,
sizeof(ie_blli_absent));
/*
@@ -1616,7 +1616,7 @@ usf_dec_ie_clst(usf, ie)
/*
* Clear the IE
*/
- KM_COPY(&ie_clst_absent, &ie->ie_u.ie_clst,
+ bcopy(&ie_clst_absent, &ie->ie_u.ie_clst,
sizeof(ie_clst_absent));
rc = usf_byte(usf, &c);
@@ -1651,7 +1651,7 @@ usf_dec_ie_cdad(usf, ie)
/*
* Clear the IE
*/
- KM_COPY(&ie_cdad_absent, &ie->ie_u.ie_cdad,
+ bcopy(&ie_cdad_absent, &ie->ie_u.ie_cdad,
sizeof(ie_cdad_absent));
/*
@@ -1720,7 +1720,7 @@ usf_dec_ie_cdsa(usf, ie)
/*
* Clear the IE
*/
- KM_COPY(&ie_cdsa_absent, &ie->ie_u.ie_cdsa,
+ bcopy(&ie_cdsa_absent, &ie->ie_u.ie_cdsa,
sizeof(ie_cdsa_absent));
/*
@@ -1783,7 +1783,7 @@ usf_dec_ie_cgad(usf, ie)
/*
* Clear the IE
*/
- KM_COPY(&ie_cgad_absent, &ie->ie_u.ie_cgad,
+ bcopy(&ie_cgad_absent, &ie->ie_u.ie_cgad,
sizeof(ie_cgad_absent));
/*
@@ -1868,7 +1868,7 @@ usf_dec_ie_cgsa(usf, ie)
/*
* Clear the IE
*/
- KM_COPY(&ie_cgsa_absent, &ie->ie_u.ie_cgsa,
+ bcopy(&ie_cgsa_absent, &ie->ie_u.ie_cgsa,
sizeof(ie_cgsa_absent));
/*
@@ -1931,7 +1931,7 @@ usf_dec_ie_caus(usf, ie)
/*
* Clear the IE
*/
- KM_COPY(&ie_caus_absent, &ie->ie_u.ie_caus,
+ bcopy(&ie_caus_absent, &ie->ie_u.ie_caus,
sizeof(ie_caus_absent));
/*
@@ -1988,7 +1988,7 @@ usf_dec_ie_cnid(usf, ie)
/*
* Clear the IE
*/
- KM_COPY(&ie_cnid_absent, &ie->ie_u.ie_cnid,
+ bcopy(&ie_cnid_absent, &ie->ie_u.ie_cnid,
sizeof(ie_cnid_absent));
rc = usf_ext(usf, &i);
@@ -2028,7 +2028,7 @@ usf_dec_ie_qosp(usf, ie)
/*
* Clear the IE
*/
- KM_COPY(&ie_qosp_absent, &ie->ie_u.ie_qosp,
+ bcopy(&ie_qosp_absent, &ie->ie_u.ie_qosp,
sizeof(ie_qosp_absent));
/*
@@ -2070,7 +2070,7 @@ usf_dec_ie_brpi(usf, ie)
/*
* Clear the IE
*/
- KM_COPY(&ie_brpi_absent, &ie->ie_u.ie_brpi,
+ bcopy(&ie_brpi_absent, &ie->ie_u.ie_brpi,
sizeof(ie_brpi_absent));
/*
@@ -2109,7 +2109,7 @@ usf_dec_ie_rsti(usf, ie)
/*
* Clear the IE
*/
- KM_COPY(&ie_rsti_absent, &ie->ie_u.ie_rsti,
+ bcopy(&ie_rsti_absent, &ie->ie_u.ie_rsti,
sizeof(ie_rsti_absent));
/*
@@ -2148,7 +2148,7 @@ usf_dec_ie_bsdc(usf, ie)
/*
* Clear the IE
*/
- KM_COPY(&ie_bsdc_absent, &ie->ie_u.ie_bsdc,
+ bcopy(&ie_bsdc_absent, &ie->ie_u.ie_bsdc,
sizeof(ie_bsdc_absent));
/*
@@ -2193,7 +2193,7 @@ usf_dec_ie_trnt(usf, ie)
/*
* Clear the IE
*/
- KM_COPY(&ie_trnt_absent, &ie->ie_u.ie_trnt,
+ bcopy(&ie_trnt_absent, &ie->ie_u.ie_trnt,
sizeof(ie_trnt_absent));
/*
diff --git a/sys/netatm/uni/unisig_if.c b/sys/netatm/uni/unisig_if.c
index 3bb0698..bacd10e 100644
--- a/sys/netatm/uni/unisig_if.c
+++ b/sys/netatm/uni/unisig_if.c
@@ -275,14 +275,11 @@ unisig_attach(smp, pip)
/*
* Allocate UNISIG protocol instance control block
*/
- usp = (struct unisig *)
- KM_ALLOC(sizeof(struct unisig), M_DEVBUF, M_NOWAIT);
+ usp = malloc(sizeof(struct unisig), M_DEVBUF, M_NOWAIT | M_ZERO);
if (usp == NULL) {
err = ENOMEM;
goto done;
}
- KM_ZERO(usp, sizeof(struct unisig));
-
/*
* Set state in UNISIG protocol instance control block
*/
@@ -343,7 +340,7 @@ done:
UNISIG_CANCEL(usp);
UNLINK((struct siginst *)usp, struct siginst,
smp->sm_prinst, si_next);
- KM_FREE(usp, sizeof(struct unisig), M_DEVBUF);
+ free(usp, M_DEVBUF);
}
s = splimp();
pip->pif_sigmgr = NULL;
@@ -795,7 +792,7 @@ unisig_free(vcp)
UNLINK((struct siginst *)usp, struct siginst,
smp->sm_prinst, si_next);
- KM_FREE(usp, sizeof(struct unisig), M_DEVBUF);
+ free(usp, M_DEVBUF);
}
return (0);
@@ -945,7 +942,7 @@ unisig_ioctl(code, data, arg1)
rsp.avp_ierrors = uvp->uv_ierrors;
rsp.avp_oerrors = uvp->uv_oerrors;
rsp.avp_tstamp = uvp->uv_tstamp;
- KM_ZERO(rsp.avp_owners,
+ bzero(rsp.avp_owners,
sizeof(rsp.avp_owners));
for (i = 0; cop && i < sizeof(rsp.avp_owners);
cop = cop->co_next,
@@ -989,17 +986,17 @@ unisig_ioctl(code, data, arg1)
usp = (struct unisig *)arg1;
pip = usp->us_pif;
if (usp->us_addr.address_format != T_ATM_ABSENT) {
- if (KM_CMP(asp->asr_prf_pref, usp->us_addr.address,
+ if (bcmp(asp->asr_prf_pref, usp->us_addr.address,
sizeof(asp->asr_prf_pref)) != 0)
err = EALREADY;
break;
}
usp->us_addr.address_format = T_ATM_ENDSYS_ADDR;
usp->us_addr.address_length = sizeof(Atm_addr_nsap);
- KM_COPY(&pip->pif_macaddr,
+ bcopy(&pip->pif_macaddr,
((Atm_addr_nsap *)usp->us_addr.address)->aan_esi,
sizeof(pip->pif_macaddr));
- KM_COPY((caddr_t) asp->asr_prf_pref,
+ bcopy((caddr_t) asp->asr_prf_pref,
&((Atm_addr_nsap *)usp->us_addr.address)->aan_afi,
sizeof(asp->asr_prf_pref));
log(LOG_INFO, "uni: set address %s on interface %s\n",
diff --git a/sys/netatm/uni/unisig_sigmgr_state.c b/sys/netatm/uni/unisig_sigmgr_state.c
index e5f331d..1d73cb5 100644
--- a/sys/netatm/uni/unisig_sigmgr_state.c
+++ b/sys/netatm/uni/unisig_sigmgr_state.c
@@ -858,7 +858,7 @@ unisig_sigmgr_act14(usp, m)
UNLINK((struct siginst *)usp, struct siginst,
smp->sm_prinst, si_next);
- KM_FREE(usp, sizeof(struct unisig), M_DEVBUF);
+ free(usp, M_DEVBUF);
} else {
/*
* Otherwise, set new signalling manager state and
diff --git a/sys/netatm/uni/unisig_subr.c b/sys/netatm/uni/unisig_subr.c
index a57bee1..f371cc3 100644
--- a/sys/netatm/uni/unisig_subr.c
+++ b/sys/netatm/uni/unisig_subr.c
@@ -116,7 +116,7 @@ unisig_cause_attr_from_user(aap, cause)
aap->cause.v.coding_standard = T_ATM_ITU_CODING;
aap->cause.v.location = T_ATM_LOC_USER;
aap->cause.v.cause_value = cause;
- KM_ZERO(aap->cause.v.diagnostics,
+ bzero(aap->cause.v.diagnostics,
sizeof(aap->cause.v.diagnostics));
}
@@ -144,8 +144,8 @@ unisig_cause_attr_from_ie(aap, iep)
aap->cause.v.coding_standard = iep->ie_coding;
aap->cause.v.location = iep->ie_caus_loc;
aap->cause.v.cause_value = iep->ie_caus_cause;
- KM_ZERO(aap->cause.v.diagnostics, sizeof(aap->cause.v.diagnostics));
- KM_COPY(iep->ie_caus_diagnostic, aap->cause.v.diagnostics,
+ bzero(aap->cause.v.diagnostics, sizeof(aap->cause.v.diagnostics));
+ bcopy(iep->ie_caus_diagnostic, aap->cause.v.diagnostics,
MIN(sizeof(aap->cause.v.diagnostics), iep->ie_caus_diag_len));
}
@@ -668,20 +668,20 @@ unisig_save_attrs(usp, msg, ap)
ap->bhli.v.ID_type = msg->msg_ie_bhli->ie_bhli_type;
switch(ap->bhli.v.ID_type) {
case T_ATM_ISO_APP_ID:
- KM_COPY(msg->msg_ie_bhli->ie_bhli_info,
+ bcopy(msg->msg_ie_bhli->ie_bhli_info,
ap->bhli.v.ID.ISO_ID,
sizeof(ap->bhli.v.ID.ISO_ID));
break;
case T_ATM_USER_APP_ID:
- KM_COPY(msg->msg_ie_bhli->ie_bhli_info,
+ bcopy(msg->msg_ie_bhli->ie_bhli_info,
ap->bhli.v.ID.user_defined_ID,
sizeof(ap->bhli.v.ID.user_defined_ID));
break;
case T_ATM_VENDOR_APP_ID:
- KM_COPY(msg->msg_ie_bhli->ie_bhli_info,
+ bcopy(msg->msg_ie_bhli->ie_bhli_info,
ap->bhli.v.ID.vendor_ID.OUI,
sizeof(ap->bhli.v.ID.vendor_ID.OUI));
- KM_COPY(&msg->msg_ie_bhli->ie_bhli_info[sizeof(ap->bhli.v.ID.vendor_ID.OUI)-1],
+ bcopy(&msg->msg_ie_bhli->ie_bhli_info[sizeof(ap->bhli.v.ID.vendor_ID.OUI)-1],
ap->bhli.v.ID.vendor_ID.app_ID,
sizeof(ap->bhli.v.ID.vendor_ID.app_ID));
break;
@@ -754,10 +754,10 @@ unisig_save_attrs(usp, msg, ap)
msg->msg_ie_blli->ie_blli_l3_id;
if (msg->msg_ie_blli->ie_blli_l3_ipi ==
UNI_IE_BLLI_L3IPI_SNAP) {
- KM_COPY(msg->msg_ie_blli->ie_blli_l3_oui,
+ bcopy(msg->msg_ie_blli->ie_blli_l3_oui,
ap->blli.v.layer_3_protocol.ID.SNAP_ID.OUI,
sizeof(ap->blli.v.layer_3_protocol.ID.SNAP_ID.OUI));
- KM_COPY(msg->msg_ie_blli->ie_blli_l3_pid,
+ bcopy(msg->msg_ie_blli->ie_blli_l3_pid,
ap->blli.v.layer_3_protocol.ID.SNAP_ID.PID,
sizeof(ap->blli.v.layer_3_protocol.ID.SNAP_ID.PID));
} else {
@@ -835,7 +835,7 @@ unisig_save_attrs(usp, msg, ap)
ap->transit.v.length =
MIN(msg->msg_ie_trnt->ie_trnt_id_len,
sizeof(ap->transit.v.network_id));
- KM_COPY(msg->msg_ie_trnt->ie_trnt_id,
+ bcopy(msg->msg_ie_trnt->ie_trnt_id,
ap->transit.v.network_id,
ap->transit.v.length);
}
@@ -851,10 +851,10 @@ unisig_save_attrs(usp, msg, ap)
msg->msg_ie_caus->ie_caus_loc;
ap->cause.v.cause_value =
msg->msg_ie_caus->ie_caus_cause;
- KM_ZERO(ap->cause.v.diagnostics,
+ bzero(ap->cause.v.diagnostics,
sizeof(ap->cause.v.diagnostics));
#ifdef NOTDEF
- KM_COPY(msg->msg_ie_caus->ie_caus_diagnostic,
+ bcopy(msg->msg_ie_caus->ie_caus_diagnostic,
ap->transit.v.diagnostics,
MIN(sizeof(ap->transit.v.diagnostics),
msg->msg_ie_caus->ie_caus_diag_len));
@@ -903,7 +903,7 @@ unisig_set_attrs(usp, msg, ap)
goto done;
}
}
- KM_COPY(&ie_aalp_absent,
+ bcopy(&ie_aalp_absent,
&msg->msg_ie_aalp->ie_u.ie_aalp,
sizeof(ie_aalp_absent));
msg->msg_ie_aalp->ie_ident = UNI_IE_AALP;
@@ -961,7 +961,7 @@ unisig_set_attrs(usp, msg, ap)
goto done;
}
}
- KM_COPY(&ie_clrt_absent,
+ bcopy(&ie_clrt_absent,
&msg->msg_ie_clrt->ie_u.ie_clrt,
sizeof(ie_clrt_absent));
msg->msg_ie_clrt->ie_ident = UNI_IE_CLRT;
@@ -1018,7 +1018,7 @@ unisig_set_attrs(usp, msg, ap)
goto done;
}
}
- KM_COPY(&ie_bbcp_absent,
+ bcopy(&ie_bbcp_absent,
&msg->msg_ie_bbcp->ie_u.ie_bbcp,
sizeof(ie_bbcp_absent));
msg->msg_ie_bbcp->ie_ident = UNI_IE_BBCP;
@@ -1046,27 +1046,27 @@ unisig_set_attrs(usp, msg, ap)
goto done;
}
}
- KM_COPY(&ie_bhli_absent,
+ bcopy(&ie_bhli_absent,
&msg->msg_ie_bhli->ie_u.ie_bhli,
sizeof(ie_bhli_absent));
msg->msg_ie_bhli->ie_ident = UNI_IE_BHLI;
msg->msg_ie_bhli->ie_bhli_type = ap->bhli.v.ID_type;
switch (ap->bhli.v.ID_type) {
case T_ATM_ISO_APP_ID:
- KM_COPY(ap->bhli.v.ID.ISO_ID,
+ bcopy(ap->bhli.v.ID.ISO_ID,
msg->msg_ie_bhli->ie_bhli_info,
sizeof(ap->bhli.v.ID.ISO_ID));
break;
case T_ATM_USER_APP_ID:
- KM_COPY(ap->bhli.v.ID.user_defined_ID,
+ bcopy(ap->bhli.v.ID.user_defined_ID,
msg->msg_ie_bhli->ie_bhli_info,
sizeof(ap->bhli.v.ID.user_defined_ID));
break;
case T_ATM_VENDOR_APP_ID:
- KM_COPY(ap->bhli.v.ID.vendor_ID.OUI,
+ bcopy(ap->bhli.v.ID.vendor_ID.OUI,
msg->msg_ie_bhli->ie_bhli_info,
sizeof(ap->bhli.v.ID.vendor_ID.OUI));
- KM_COPY(ap->bhli.v.ID.vendor_ID.app_ID,
+ bcopy(ap->bhli.v.ID.vendor_ID.app_ID,
&msg->msg_ie_bhli->ie_bhli_info[sizeof(ap->bhli.v.ID.vendor_ID.OUI)-1],
sizeof(ap->bhli.v.ID.vendor_ID.app_ID));
break;
@@ -1086,7 +1086,7 @@ unisig_set_attrs(usp, msg, ap)
goto done;
}
}
- KM_COPY(&ie_blli_absent,
+ bcopy(&ie_blli_absent,
&msg->msg_ie_blli->ie_u.ie_blli,
sizeof(ie_blli_absent));
msg->msg_ie_blli->ie_ident = UNI_IE_BLLI;
@@ -1132,10 +1132,10 @@ unisig_set_attrs(usp, msg, ap)
UNI_IE_BLLI_L3P_ISO9577;
msg->msg_ie_blli->ie_blli_l3_ipi =
UNI_IE_BLLI_L3IPI_SNAP;
- KM_COPY(ap->blli.v.layer_3_protocol.ID.SNAP_ID.OUI,
+ bcopy(ap->blli.v.layer_3_protocol.ID.SNAP_ID.OUI,
msg->msg_ie_blli->ie_blli_l3_oui,
sizeof(msg->msg_ie_blli->ie_blli_l3_oui));
- KM_COPY(ap->blli.v.layer_3_protocol.ID.SNAP_ID.PID,
+ bcopy(ap->blli.v.layer_3_protocol.ID.SNAP_ID.PID,
msg->msg_ie_blli->ie_blli_l3_pid,
sizeof(msg->msg_ie_blli->ie_blli_l3_pid));
break;
@@ -1171,7 +1171,7 @@ unisig_set_attrs(usp, msg, ap)
goto done;
}
}
- KM_COPY(&ie_cdad_absent,
+ bcopy(&ie_cdad_absent,
&msg->msg_ie_cdad->ie_u.ie_cdad,
sizeof(ie_cdad_absent));
msg->msg_ie_cdad->ie_ident = UNI_IE_CDAD;
@@ -1187,7 +1187,7 @@ unisig_set_attrs(usp, msg, ap)
goto done;
}
}
- KM_COPY(&ie_cdsa_absent,
+ bcopy(&ie_cdsa_absent,
&msg->msg_ie_cdsa->ie_u.ie_cdsa,
sizeof(ie_cdsa_absent));
msg->msg_ie_cdsa->ie_ident = UNI_IE_CDSA;
@@ -1209,7 +1209,7 @@ unisig_set_attrs(usp, msg, ap)
goto done;
}
}
- KM_COPY(&ie_cgad_absent,
+ bcopy(&ie_cgad_absent,
&msg->msg_ie_cgad->ie_u.ie_cgad,
sizeof(ie_cgad_absent));
msg->msg_ie_cgsa->ie_ident = UNI_IE_CGSA;
@@ -1226,7 +1226,7 @@ unisig_set_attrs(usp, msg, ap)
goto done;
}
}
- KM_COPY(&ie_cgsa_absent,
+ bcopy(&ie_cgsa_absent,
&msg->msg_ie_cgsa->ie_u.ie_cgsa,
sizeof(ie_cgsa_absent));
msg->msg_ie_cgsa->ie_ident = UNI_IE_CGSA;
@@ -1247,7 +1247,7 @@ unisig_set_attrs(usp, msg, ap)
goto done;
}
}
- KM_COPY(&ie_qosp_absent,
+ bcopy(&ie_qosp_absent,
&msg->msg_ie_qosp->ie_u.ie_qosp,
sizeof(ie_qosp_absent));
msg->msg_ie_qosp->ie_ident = UNI_IE_QOSP;
@@ -1279,7 +1279,7 @@ unisig_set_attrs(usp, msg, ap)
goto done;
}
}
- KM_COPY(&ie_trnt_absent,
+ bcopy(&ie_trnt_absent,
&msg->msg_ie_trnt->ie_u.ie_trnt,
sizeof(ie_trnt_absent));
msg->msg_ie_trnt->ie_ident = UNI_IE_TRNT;
@@ -1287,7 +1287,7 @@ unisig_set_attrs(usp, msg, ap)
UNI_IE_TRNT_IDT_NATL;
msg->msg_ie_trnt->ie_trnt_id_plan =
UNI_IE_TRNT_IDP_CIC;
- KM_COPY(ap->transit.v.network_id,
+ bcopy(ap->transit.v.network_id,
msg->msg_ie_trnt->ie_trnt_id,
ap->transit.v.length);
}
@@ -1304,7 +1304,7 @@ unisig_set_attrs(usp, msg, ap)
goto done;
}
}
- KM_COPY(&ie_caus_absent,
+ bcopy(&ie_caus_absent,
&msg->msg_ie_caus->ie_u.ie_caus,
sizeof(ie_caus_absent));
msg->msg_ie_caus->ie_ident = UNI_IE_CAUS;
diff --git a/sys/netatm/uni/unisig_util.c b/sys/netatm/uni/unisig_util.c
index f25ddd3..f1858bd 100644
--- a/sys/netatm/uni/unisig_util.c
+++ b/sys/netatm/uni/unisig_util.c
@@ -285,7 +285,7 @@ unisig_addr_print(p)
/*
* Clear the print buffer
*/
- KM_ZERO(strbuff, sizeof(strbuff));
+ bzero(strbuff, sizeof(strbuff));
/*
* Select appropriate printing format
diff --git a/sys/netatm/uni/unisig_vc_state.c b/sys/netatm/uni/unisig_vc_state.c
index b35eb47..fa9c3dd 100644
--- a/sys/netatm/uni/unisig_vc_state.c
+++ b/sys/netatm/uni/unisig_vc_state.c
@@ -571,7 +571,7 @@ unisig_vc_act05(usp, uvp, msg)
*/
cause_ie->ie_caus_loc = UNI_IE_CAUS_LOC_USER;
cause_ie->ie_caus_cause = UNI_IE_CAUS_TIMER;
- KM_COPY("310", cause_ie->ie_caus_diagnostic, 3);
+ bcopy("310", cause_ie->ie_caus_diagnostic, 3);
/*
* Send the RELEASE message.
@@ -981,7 +981,7 @@ unisig_vc_act08(usp, uvp, msg)
* Copy the connection attributes from the SETUP message
* to an attribute block
*/
- KM_ZERO(&attr, sizeof(attr));
+ bzero(&attr, sizeof(attr));
attr.nif = nip;
attr.aal.tag = T_ATM_ABSENT;
attr.traffic.tag = T_ATM_ABSENT;
OpenPOWER on IntegriCloud