sys/netccitt/llc_subr.c
/*
 * Get sapinfo for SAP address and interface 
 */
Get sapinfo for SAP address and interface
Get sapinfo for SAP address and interface
struct npaidbentry *
llc_getsapinfo(u_char sap, struct ifnet *ifp)
{
	struct sockaddr_dl *ifdl_addr; 
	struct sockaddr_dl si_addr; 
	struct rtentry *sirt; 
	u_char saploc;
	USES_AF_LINK_RTS;
	ifdl_addr = sdl_getaddrif(ifp); 
	sdl_copy(ifdl_addr, &si_addr); 
	saploc = LLSAPLOC(&si_addr, ifp); 
	si_addr.sdl_data[saploc] = sap;
	si_addr.sdl_alen++;
	if ((sirt = rtalloc1((struct sockaddr *)&si_addr, 0))) 	
		sirt->rt_refcnt--; 
	else return(0);
	return((struct npaidbentry *)sirt->rt_llinfo);
}
struct npaidbentry * llc_getsapinfo ( u_char sap , struct ifnet * ifp ) { struct sockaddr_dl * ifdl_addr ; struct sockaddr_dl si_addr ; struct rtentry * sirt ; u_char saploc ; USES_AF_LINK_RTS ; ifdl_addr = sdl_getaddrif ( ifp ) ; sdl_copy ( ifdl_addr , & si_addr ) ; saploc = LLSAPLOC ( & si_addr , ifp ) ; si_addr . sdl_data [ saploc ] = sap ; si_addr . sdl_alen ++ ; if ( ( sirt = rtalloc1 ( ( struct sockaddr * ) & si_addr , 0 ) ) ) sirt -> rt_refcnt -- ; else return ( 0 ) ; return ( ( struct npaidbentry * ) sirt -> rt_llinfo ) ; }
Get sapinfo for SAP address and interface
Get sapinfo for SAP address and interface