sbappendaddr(sb, asa, m0, control) register struct sockbuf *sb; struct sockaddr *asa; struct mbuf *m0, *control;
sbappendaddr(struct sockbuf *sb, struct sockaddr *asa, struct mbuf *m0, struct mbuf *control)
sbappendaddr(sb, asa, m0, control)	register struct sockbuf *sb;	struct sockaddr *asa;	struct mbuf *m0, *control;{	register struct mbuf *m, *n;	int space = asa->sa_len;	if (m0 && (m0->m_flags & M_PKTHDR) == 0)		panic("sbappendaddr");	if (m0)		space += m0->m_pkthdr.len;	for (n = control; n; n = n->m_next) {		space += n->m_len;		if (n->m_next == 0)	/* keep pointer to last control buf */			break;	}	if (space > sbspace(sb))		return (0);	if (asa->sa_len > MLEN)		return (0);	MGET(m, M_DONTWAIT, MT_SONAME);	if (m == 0)		return (0);	m->m_len = asa->sa_len;	bcopy((caddr_t)asa, mtod(m, caddr_t), asa->sa_len);	if (n)		n->m_next = m0;		/* concatenate data to control */	else		control = m0;	m->m_next = control;	for (n = m; n; n = n->m_next)		sballoc(sb, n);	if ((n = sb->sb_mb) != NULL) {		while (n->m_nextpkt)			n = n->m_nextpkt;		n->m_nextpkt = m;	} else		sb->sb_mb = m;	return (1);}