mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-12 09:58:36 +00:00
- 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.
This commit is contained in:
parent
cfaf7ad37a
commit
2575dfa6d9
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=95063
@ -877,7 +877,7 @@ atm_cm_addllc(epp, token, llc, ecop, copp)
|
||||
while (cop2) {
|
||||
int i = MIN(llc->v.llc_len, cop2->co_llc.v.llc_len);
|
||||
|
||||
if (KM_CMP(llc->v.llc_info, cop2->co_llc.v.llc_info, i) == 0) {
|
||||
if (bcmp(llc->v.llc_info, cop2->co_llc.v.llc_info, i) == 0) {
|
||||
err = EINVAL;
|
||||
goto done;
|
||||
}
|
||||
@ -2007,7 +2007,7 @@ atm_cm_match(ap, pcop)
|
||||
if (ap->bhli.tag == T_ATM_ABSENT)
|
||||
continue;
|
||||
if (ap->bhli.tag == T_ATM_PRESENT)
|
||||
if (KM_CMP(&lap->bhli.v, &ap->bhli.v,
|
||||
if (bcmp(&lap->bhli.v, &ap->bhli.v,
|
||||
sizeof(struct t_atm_bhli)))
|
||||
continue;
|
||||
}
|
||||
@ -2022,7 +2022,7 @@ atm_cm_match(ap, pcop)
|
||||
if (ap->blli.tag_l2 == T_ATM_ABSENT)
|
||||
continue;
|
||||
if (ap->blli.tag_l2 == T_ATM_PRESENT) {
|
||||
if (KM_CMP(&lap->blli.v.layer_2_protocol.ID,
|
||||
if (bcmp(&lap->blli.v.layer_2_protocol.ID,
|
||||
&ap->blli.v.layer_2_protocol.ID,
|
||||
sizeof(
|
||||
ap->blli.v.layer_2_protocol.ID)))
|
||||
@ -2040,7 +2040,7 @@ atm_cm_match(ap, pcop)
|
||||
if (ap->blli.tag_l3 == T_ATM_ABSENT)
|
||||
continue;
|
||||
if (ap->blli.tag_l3 == T_ATM_PRESENT) {
|
||||
if (KM_CMP(&lap->blli.v.layer_3_protocol.ID,
|
||||
if (bcmp(&lap->blli.v.layer_3_protocol.ID,
|
||||
&ap->blli.v.layer_3_protocol.ID,
|
||||
sizeof(
|
||||
ap->blli.v.layer_3_protocol.ID)))
|
||||
@ -2061,7 +2061,7 @@ atm_cm_match(ap, pcop)
|
||||
int i = MIN(lap->llc.v.llc_len,
|
||||
ap->llc.v.llc_len);
|
||||
|
||||
if (KM_CMP(lap->llc.v.llc_info,
|
||||
if (bcmp(lap->llc.v.llc_info,
|
||||
ap->llc.v.llc_info, i))
|
||||
continue;
|
||||
}
|
||||
@ -2288,7 +2288,7 @@ atm_cm_share_llc(ap)
|
||||
int i = MIN(ap->llc.v.llc_len,
|
||||
cop->co_llc.v.llc_len);
|
||||
|
||||
if (KM_CMP(ap->llc.v.llc_info,
|
||||
if (bcmp(ap->llc.v.llc_info,
|
||||
cop->co_llc.v.llc_info, i) == 0)
|
||||
break;
|
||||
}
|
||||
@ -2804,7 +2804,7 @@ atm_cm_cpcs_data(cop, m)
|
||||
* Add the LLC header
|
||||
*/
|
||||
KB_DATASTART(m, bp, void *);
|
||||
KM_COPY(llcp->v.llc_info, bp, llcp->v.llc_len);
|
||||
bcopy(llcp->v.llc_info, bp, llcp->v.llc_len);
|
||||
KB_PLENADJ(m, llcp->v.llc_len);
|
||||
break;
|
||||
|
||||
@ -2920,7 +2920,7 @@ atm_cm_cpcs_upper(cmd, tok, arg1, arg2)
|
||||
s = splnet();
|
||||
|
||||
while (cop) {
|
||||
if (KM_CMP(bp, cop->co_llc.v.llc_info,
|
||||
if (bcmp(bp, cop->co_llc.v.llc_info,
|
||||
cop->co_llc.v.llc_len) == 0)
|
||||
break;
|
||||
cop = cop->co_next;
|
||||
|
@ -452,14 +452,12 @@ atm_dev_alloc(size, align, flags)
|
||||
* and link it into the chain
|
||||
*/
|
||||
if (mep == NULL) {
|
||||
mbp = (Mem_blk *) KM_ALLOC(sizeof(Mem_blk), M_DEVBUF, M_NOWAIT);
|
||||
mbp = malloc(sizeof(Mem_blk), M_DEVBUF, M_NOWAIT|M_ZERO);
|
||||
if (mbp == NULL) {
|
||||
log(LOG_ERR, "atm_dev_alloc: Mem_blk failure\n");
|
||||
(void) splx(s);
|
||||
return (NULL);
|
||||
}
|
||||
KM_ZERO(mbp, sizeof(Mem_blk));
|
||||
|
||||
mbp->mb_next = atm_mem_head;
|
||||
atm_mem_head = mbp;
|
||||
mep = mbp->mb_mement;
|
||||
@ -485,9 +483,9 @@ atm_dev_alloc(size, align, flags)
|
||||
* Finally, go get the memory
|
||||
*/
|
||||
if (flags & ATM_DEV_NONCACHE) {
|
||||
mep->me_kaddr = KM_ALLOC(ksize, M_DEVBUF, M_NOWAIT);
|
||||
mep->me_kaddr = malloc(ksize, M_DEVBUF, M_NOWAIT);
|
||||
} else {
|
||||
mep->me_kaddr = KM_ALLOC(ksize, M_DEVBUF, M_NOWAIT);
|
||||
mep->me_kaddr = malloc(ksize, M_DEVBUF, M_NOWAIT);
|
||||
}
|
||||
|
||||
if (mep->me_kaddr == NULL) {
|
||||
@ -507,7 +505,7 @@ atm_dev_alloc(size, align, flags)
|
||||
/*
|
||||
* Clear memory for user
|
||||
*/
|
||||
KM_ZERO(mep->me_uaddr, size);
|
||||
bzero(mep->me_uaddr, size);
|
||||
|
||||
ATM_DEBUG4("atm_dev_alloc: size=%d, align=%d, flags=%d, uaddr=%p\n",
|
||||
size, align, flags, mep->me_uaddr);
|
||||
@ -575,9 +573,9 @@ atm_dev_free(uaddr)
|
||||
* Give the memory space back to the kernel
|
||||
*/
|
||||
if (mep->me_flags & ATM_DEV_NONCACHE) {
|
||||
KM_FREE(mep->me_kaddr, mep->me_ksize, M_DEVBUF);
|
||||
free(mep->me_kaddr, M_DEVBUF);
|
||||
} else {
|
||||
KM_FREE(mep->me_kaddr, mep->me_ksize, M_DEVBUF);
|
||||
free(mep->me_kaddr, M_DEVBUF);
|
||||
}
|
||||
|
||||
/*
|
||||
@ -726,7 +724,7 @@ atm_dev_compress(m)
|
||||
*/
|
||||
len = MIN(space, KB_LEN(m));
|
||||
KB_DATASTART(m, src, caddr_t);
|
||||
KM_COPY(src, dst, len);
|
||||
bcopy(src, dst, len);
|
||||
|
||||
/*
|
||||
* Adjust for copied data
|
||||
@ -839,7 +837,7 @@ atm_unload()
|
||||
/*
|
||||
* Hand this block back to the kernel
|
||||
*/
|
||||
KM_FREE((caddr_t) mbp, sizeof(Mem_blk), M_DEVBUF);
|
||||
free((caddr_t)mbp, M_DEVBUF);
|
||||
}
|
||||
|
||||
(void) splx(s);
|
||||
|
@ -346,7 +346,7 @@ atm_physif_ioctl(code, data, arg)
|
||||
/*
|
||||
* Fill in info to be returned
|
||||
*/
|
||||
KM_ZERO((caddr_t)&apr, sizeof(apr));
|
||||
bzero((caddr_t)&apr, sizeof(apr));
|
||||
smp = pip->pif_sigmgr;
|
||||
sip = pip->pif_siginst;
|
||||
(void) snprintf(apr.anp_intf, sizeof(apr.anp_intf),
|
||||
@ -402,7 +402,7 @@ atm_physif_ioctl(code, data, arg)
|
||||
/*
|
||||
* Fill in info to be returned
|
||||
*/
|
||||
KM_ZERO((caddr_t)&anr, sizeof(anr));
|
||||
bzero((caddr_t)&anr, sizeof(anr));
|
||||
(void) snprintf(anr.anp_intf, sizeof(anr.anp_intf),
|
||||
"%s%d", ifp->if_name, ifp->if_unit);
|
||||
IFP_TO_IA(ifp, ia);
|
||||
@ -597,10 +597,10 @@ atm_physif_ioctl(code, data, arg)
|
||||
/*
|
||||
* Fill in info to be returned
|
||||
*/
|
||||
KM_ZERO((caddr_t)&acr, sizeof(acr));
|
||||
bzero((caddr_t)&acr, sizeof(acr));
|
||||
(void) snprintf(acr.acp_intf, sizeof(acr.acp_intf),
|
||||
"%s%d", pip->pif_name, pip->pif_unit);
|
||||
KM_COPY((caddr_t)acp, (caddr_t)&acr.acp_cfg,
|
||||
bcopy((caddr_t)acp, (caddr_t)&acr.acp_cfg,
|
||||
sizeof(Atm_config));
|
||||
|
||||
/*
|
||||
@ -1066,7 +1066,7 @@ atm_if_ioctl(ifp, cmd, data)
|
||||
switch ( cmd )
|
||||
{
|
||||
case SIOCGIFADDR:
|
||||
KM_COPY ( (caddr_t)&(nip->nif_pif->pif_macaddr),
|
||||
bcopy ( (caddr_t)&(nip->nif_pif->pif_macaddr),
|
||||
(caddr_t)ifr->ifr_addr.sa_data,
|
||||
sizeof(struct mac_addr) );
|
||||
break;
|
||||
|
@ -503,7 +503,7 @@ atm_create_stack(cvp, tlp, upf)
|
||||
/*
|
||||
* Setup owner service definition
|
||||
*/
|
||||
KM_ZERO((caddr_t)&usd, sizeof(struct stack_defn));
|
||||
bzero((caddr_t)&usd, sizeof(struct stack_defn));
|
||||
usd.sd_upper = upf;
|
||||
usd.sd_toku = cvp;
|
||||
svs.si_srvc[0] = &usd;
|
||||
|
@ -282,26 +282,26 @@ atm_sock_bind(so, addr)
|
||||
*/
|
||||
attr = atp->atp_attr;
|
||||
attr.called.tag = sapadr->SVE_tag_addr;
|
||||
KM_COPY(&sapadr->address_format, &attr.called.addr, sizeof(Atm_addr));
|
||||
bcopy(&sapadr->address_format, &attr.called.addr, sizeof(Atm_addr));
|
||||
|
||||
attr.blli.tag_l2 = sapl2->SVE_tag;
|
||||
if (sapl2->SVE_tag == T_ATM_PRESENT) {
|
||||
attr.blli.v.layer_2_protocol.ID_type = sapl2->ID_type;
|
||||
KM_COPY(&sapl2->ID, &attr.blli.v.layer_2_protocol.ID,
|
||||
bcopy(&sapl2->ID, &attr.blli.v.layer_2_protocol.ID,
|
||||
sizeof(attr.blli.v.layer_2_protocol.ID));
|
||||
}
|
||||
|
||||
attr.blli.tag_l3 = sapl3->SVE_tag;
|
||||
if (sapl3->SVE_tag == T_ATM_PRESENT) {
|
||||
attr.blli.v.layer_3_protocol.ID_type = sapl3->ID_type;
|
||||
KM_COPY(&sapl3->ID, &attr.blli.v.layer_3_protocol.ID,
|
||||
bcopy(&sapl3->ID, &attr.blli.v.layer_3_protocol.ID,
|
||||
sizeof(attr.blli.v.layer_3_protocol.ID));
|
||||
}
|
||||
|
||||
attr.bhli.tag = sapapl->SVE_tag;
|
||||
if (sapapl->SVE_tag == T_ATM_PRESENT) {
|
||||
attr.bhli.v.ID_type = sapapl->ID_type;
|
||||
KM_COPY(&sapapl->ID, &attr.bhli.v.ID,
|
||||
bcopy(&sapapl->ID, &attr.bhli.v.ID,
|
||||
sizeof(attr.bhli.v.ID));
|
||||
}
|
||||
|
||||
@ -461,27 +461,27 @@ atm_sock_connect(so, addr, epp)
|
||||
* Set supplied connection attributes
|
||||
*/
|
||||
atp->atp_attr.called.tag = T_ATM_PRESENT;
|
||||
KM_COPY(&sapadr->address_format, &atp->atp_attr.called.addr,
|
||||
bcopy(&sapadr->address_format, &atp->atp_attr.called.addr,
|
||||
sizeof(Atm_addr));
|
||||
|
||||
atp->atp_attr.blli.tag_l2 = sapl2->SVE_tag;
|
||||
if (sapl2->SVE_tag == T_ATM_PRESENT) {
|
||||
atp->atp_attr.blli.v.layer_2_protocol.ID_type = sapl2->ID_type;
|
||||
KM_COPY(&sapl2->ID, &atp->atp_attr.blli.v.layer_2_protocol.ID,
|
||||
bcopy(&sapl2->ID, &atp->atp_attr.blli.v.layer_2_protocol.ID,
|
||||
sizeof(atp->atp_attr.blli.v.layer_2_protocol.ID));
|
||||
}
|
||||
|
||||
atp->atp_attr.blli.tag_l3 = sapl3->SVE_tag;
|
||||
if (sapl3->SVE_tag == T_ATM_PRESENT) {
|
||||
atp->atp_attr.blli.v.layer_3_protocol.ID_type = sapl3->ID_type;
|
||||
KM_COPY(&sapl3->ID, &atp->atp_attr.blli.v.layer_3_protocol.ID,
|
||||
bcopy(&sapl3->ID, &atp->atp_attr.blli.v.layer_3_protocol.ID,
|
||||
sizeof(atp->atp_attr.blli.v.layer_3_protocol.ID));
|
||||
}
|
||||
|
||||
atp->atp_attr.bhli.tag = sapapl->SVE_tag;
|
||||
if (sapapl->SVE_tag == T_ATM_PRESENT) {
|
||||
atp->atp_attr.bhli.v.ID_type = sapapl->ID_type;
|
||||
KM_COPY(&sapapl->ID, &atp->atp_attr.bhli.v.ID,
|
||||
bcopy(&sapapl->ID, &atp->atp_attr.bhli.v.ID,
|
||||
sizeof(atp->atp_attr.bhli.v.ID));
|
||||
}
|
||||
|
||||
@ -591,15 +591,12 @@ atm_sock_sockaddr(so, addr)
|
||||
/*
|
||||
* Return local interface address, if known
|
||||
*/
|
||||
satm = KM_ALLOC(sizeof *satm, M_SONAME, M_WAITOK);
|
||||
satm = malloc(sizeof(*satm), M_SONAME, M_WAITOK | M_ZERO);
|
||||
if (satm == NULL)
|
||||
return (ENOMEM);
|
||||
|
||||
KM_ZERO(satm, sizeof(*satm));
|
||||
satm->satm_family = AF_ATM;
|
||||
#if (defined(BSD) && (BSD >= 199103))
|
||||
satm->satm_len = sizeof(*satm);
|
||||
#endif
|
||||
|
||||
saddr = &satm->satm_addr.t_atm_sap_addr;
|
||||
if (atp->atp_attr.nif && atp->atp_attr.nif->nif_pif->pif_siginst) {
|
||||
@ -652,16 +649,12 @@ atm_sock_peeraddr(so, addr)
|
||||
/*
|
||||
* Return remote address, if known
|
||||
*/
|
||||
satm = KM_ALLOC(sizeof *satm, M_SONAME, M_WAITOK);
|
||||
satm = malloc(sizeof(*satm), M_SONAME, M_WAITOK | M_ZERO);
|
||||
if (satm == NULL)
|
||||
return (ENOMEM);
|
||||
|
||||
KM_ZERO(satm, sizeof(*satm));
|
||||
satm->satm_family = AF_ATM;
|
||||
#if (defined(BSD) && (BSD >= 199103))
|
||||
satm->satm_len = sizeof(*satm);
|
||||
#endif
|
||||
|
||||
saddr = &satm->satm_addr.t_atm_sap_addr;
|
||||
if (so->so_state & SS_ISCONNECTED) {
|
||||
cvp = atp->atp_conn->co_connvc;
|
||||
|
@ -236,17 +236,14 @@ atm_allocate(sip)
|
||||
return (NULL);
|
||||
}
|
||||
|
||||
scp = (struct sp_chunk *)
|
||||
KM_ALLOC(sip->si_chunksiz, M_DEVBUF, M_NOWAIT);
|
||||
scp = malloc(sip->si_chunksiz, M_DEVBUF, M_NOWAIT | M_ZERO);
|
||||
if (scp == NULL) {
|
||||
sip->si_fails++;
|
||||
(void) splx(s);
|
||||
return (NULL);
|
||||
}
|
||||
scp->sc_next = NULL;
|
||||
scp->sc_info = sip;
|
||||
scp->sc_magic = SPOOL_MAGIC;
|
||||
scp->sc_used = 0;
|
||||
|
||||
/*
|
||||
* Divy up chunk into free blocks
|
||||
@ -296,7 +293,7 @@ atm_allocate(sip)
|
||||
/*
|
||||
* Clear out block
|
||||
*/
|
||||
KM_ZERO(bp, sip->si_blksiz);
|
||||
bzero(bp, sip->si_blksiz);
|
||||
|
||||
(void) splx(s);
|
||||
return (bp);
|
||||
@ -415,8 +412,7 @@ atm_compact(tip)
|
||||
} else
|
||||
sip->si_poolh = scp->sc_next;
|
||||
|
||||
KM_FREE((caddr_t)scp, sip->si_chunksiz,
|
||||
M_DEVBUF);
|
||||
free((caddr_t)scp, M_DEVBUF);
|
||||
|
||||
/*
|
||||
* Update pool controls
|
||||
@ -477,8 +473,7 @@ atm_release_pool(sip)
|
||||
panic("atm_release_pool: unfreed blocks");
|
||||
|
||||
scp_next = scp->sc_next;
|
||||
|
||||
KM_FREE((caddr_t)scp, sip->si_chunksiz, M_DEVBUF);
|
||||
free((caddr_t)scp, M_DEVBUF);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -79,7 +79,7 @@
|
||||
{ \
|
||||
(a2)->address_format = (a1)->address_format; \
|
||||
(a2)->address_length = (a1)->address_length; \
|
||||
XM_COPY((caddr_t)(a1)->address, (caddr_t)(a2)->address, \
|
||||
bcopy((caddr_t)(a1)->address, (caddr_t)(a2)->address, \
|
||||
(a1)->address_length); \
|
||||
}
|
||||
|
||||
@ -89,11 +89,11 @@
|
||||
(a2)->address_length = (a1)->address_length; \
|
||||
if (((a1)->address_format == T_ATM_ENDSYS_ADDR) || \
|
||||
((a1)->address_format == T_ATM_NSAP_ADDR)) { \
|
||||
XM_COPY((caddr_t)(a1)->address, (caddr_t)(a2)->address, \
|
||||
bcopy((caddr_t)(a1)->address, (caddr_t)(a2)->address, \
|
||||
(a1)->address_length - 1); \
|
||||
((struct atm_addr_nsap *)(a2)->address)->aan_sel = (s1);\
|
||||
} else { \
|
||||
XM_COPY((caddr_t)(a1)->address, (caddr_t)(a2)->address, \
|
||||
bcopy((caddr_t)(a1)->address, (caddr_t)(a2)->address, \
|
||||
(a1)->address_length); \
|
||||
} \
|
||||
}
|
||||
|
@ -374,7 +374,7 @@ atm_dgram_control(so, cmd, data, ifp, td)
|
||||
/*
|
||||
* Just plunk the address into the pif
|
||||
*/
|
||||
KM_COPY((caddr_t)&asp->asr_mac_addr,
|
||||
bcopy((caddr_t)&asp->asr_mac_addr,
|
||||
(caddr_t)&pip->pif_macaddr,
|
||||
sizeof(struct mac_addr));
|
||||
break;
|
||||
|
@ -347,7 +347,7 @@ ipatm_ioctl(code, data, arg1)
|
||||
/*
|
||||
* Fill in info to be returned
|
||||
*/
|
||||
KM_ZERO((caddr_t)&aivr, sizeof(aivr));
|
||||
bzero((caddr_t)&aivr, sizeof(aivr));
|
||||
SATOSIN(&aivr.aip_dst_addr)->sin_family =
|
||||
AF_INET;
|
||||
SATOSIN(&aivr.aip_dst_addr)->sin_addr.s_addr =
|
||||
|
@ -57,43 +57,6 @@
|
||||
#endif
|
||||
|
||||
|
||||
/*
|
||||
* Kernel memory management
|
||||
*
|
||||
* KM_ALLOC(size, type, flags)
|
||||
* Returns an allocated kernel memory chunk of size bytes.
|
||||
* KM_FREE(addr, size, type)
|
||||
* Free a kernel memory chunk of size bytes.
|
||||
* KM_CMP(b1, b2, len)
|
||||
* Compares len bytes of data from b1 against b2.
|
||||
* KM_COPY(from, to, len)
|
||||
* Copies len bytes of data from from to to.
|
||||
* KM_ZERO(addr, len)
|
||||
* Zeros len bytes of data from addr.
|
||||
*
|
||||
*/
|
||||
#ifdef _KERNEL
|
||||
#if (defined(BSD) && (BSD >= 199103))
|
||||
#include <sys/malloc.h>
|
||||
#define KM_ALLOC(size, type, flags) malloc((size), (type), (flags))
|
||||
#define KM_FREE(addr, size, type) free((addr), (type))
|
||||
#elif defined(sun)
|
||||
#include <sys/kmem_alloc.h>
|
||||
#define KM_ALLOC(size, type, flags) kmem_alloc(size)
|
||||
#define KM_FREE(addr, size, type) kmem_free((addr), (size))
|
||||
#endif
|
||||
|
||||
#if defined(BSD)
|
||||
#define KM_CMP(b1, b2, len) bcmp((void *)(b1), (void *)(b2),\
|
||||
(len))
|
||||
#define KM_COPY(from, to, len) bcopy((const void *)(from), (void *)(to),\
|
||||
(len))
|
||||
#define KM_ZERO(addr, len) bzero((void *)(addr), (len))
|
||||
#endif
|
||||
#define XM_COPY(f, t, l) KM_COPY((f), (t), (l))
|
||||
|
||||
#else
|
||||
|
||||
/*
|
||||
* User-space memory management
|
||||
*
|
||||
@ -115,11 +78,7 @@
|
||||
#define UM_FREE(addr) free((char *)(addr))
|
||||
#define UM_COPY(from, to, len) bcopy((char *)(from), (char *)(to), (len))
|
||||
#define UM_ZERO(addr, len) bzero((char *)(addr), (len))
|
||||
|
||||
#endif
|
||||
#define XM_COPY(f, t, l) UM_COPY((f), (t), (l))
|
||||
|
||||
#endif /* _KERNEL */
|
||||
|
||||
|
||||
#ifdef _KERNEL
|
||||
|
@ -250,13 +250,11 @@ sigpvc_attach(smp, pip)
|
||||
/*
|
||||
* Allocate sigpvc protocol instance control block
|
||||
*/
|
||||
pvp = (struct sigpvc *)
|
||||
KM_ALLOC(sizeof(struct sigpvc), M_DEVBUF, M_NOWAIT);
|
||||
pvp = malloc(sizeof(struct sigpvc), M_DEVBUF, M_NOWAIT | M_ZERO);
|
||||
if (pvp == NULL) {
|
||||
err = ENOMEM;
|
||||
goto done;
|
||||
}
|
||||
KM_ZERO(pvp, sizeof(struct sigpvc));
|
||||
|
||||
/*
|
||||
* Link instance into manager's chain
|
||||
@ -282,7 +280,7 @@ sigpvc_attach(smp, pip)
|
||||
if (pvp) {
|
||||
UNLINK((struct siginst *)pvp, struct siginst,
|
||||
smp->sm_prinst, si_next);
|
||||
KM_FREE(pvp, sizeof(struct sigpvc), M_DEVBUF);
|
||||
free(pvp, M_DEVBUF);
|
||||
}
|
||||
}
|
||||
|
||||
@ -350,7 +348,7 @@ sigpvc_detach(pip)
|
||||
pip->pif_siginst = NULL;
|
||||
UNLINK((struct siginst *)pvp, struct siginst, smp->sm_prinst,
|
||||
si_next);
|
||||
KM_FREE(pvp, sizeof(struct sigpvc), M_DEVBUF);
|
||||
free(pvp, M_DEVBUF);
|
||||
} else {
|
||||
|
||||
/*
|
||||
@ -526,7 +524,7 @@ sigpvc_free(vcp)
|
||||
pip->pif_siginst = NULL;
|
||||
UNLINK((struct siginst *)pvp, struct siginst, smp->sm_prinst,
|
||||
si_next);
|
||||
KM_FREE(pvp, sizeof(struct sigpvc), M_DEVBUF);
|
||||
free(pvp, M_DEVBUF);
|
||||
}
|
||||
|
||||
return (0);
|
||||
@ -639,7 +637,7 @@ sigpvc_ioctl(code, data, arg1)
|
||||
avr.avp_encaps = cop->co_mpx;
|
||||
else
|
||||
avr.avp_encaps = 0;
|
||||
KM_ZERO(avr.avp_owners, sizeof(avr.avp_owners));
|
||||
bzero(avr.avp_owners, sizeof(avr.avp_owners));
|
||||
for (i = 0; cop && i < sizeof(avr.avp_owners);
|
||||
cop = cop->co_next,
|
||||
i += T_ATM_APP_NAME_LEN+1) {
|
||||
|
@ -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 @@ spansarp_input(clp, m)
|
||||
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)
|
||||
|
@ -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 @@ spans_attach(smp, pip)
|
||||
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) {
|
||||
|
@ -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
|
||||
|
@ -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;
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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
|
||||
|
@ -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)))
|
||||
|
||||
|
||||
/*
|
||||
|
@ -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;
|
||||
|
||||
/*
|
||||
|
@ -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
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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)&->am_dstip, cp, sizeof(struct in_addr));
|
||||
bcopy((caddr_t)&->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
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
@ -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));
|
||||
|
||||
/*
|
||||
|
@ -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 @@ unisig_attach(smp, pip)
|
||||
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",
|
||||
|
@ -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
|
||||
|
@ -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;
|
||||
|
@ -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
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user