Lines Matching refs:sdl
468 struct sockaddr_dl *sdl; in set() local
477 sdl = (struct sockaddr_dl *)(ALIGN(sin->sin6_len) + (char *)sin); in set()
479 if (sdl->sdl_family == AF_LINK && in set()
481 if (valid_type(sdl->sdl_type)) in set()
489 if (sdl->sdl_family != AF_LINK) { in set()
493 sdl_m.sdl_type = sdl->sdl_type; in set()
494 sdl_m.sdl_index = sdl->sdl_index; in set()
550 struct sockaddr_dl *sdl; in delete_rtsock() local
567 sdl = (struct sockaddr_dl *)(ALIGN(sin->sin6_len) + (char *)sin); in delete_rtsock()
569 if (sdl->sdl_family == AF_LINK && in delete_rtsock()
578 if (sdl->sdl_family != AF_LINK) { in delete_rtsock()
595 char *ifname = if_indextoname(sdl->sdl_index, ifix_buf); in delete_rtsock()
622 struct sockaddr_dl *sdl; in dump_rtsock() local
674 sdl = (struct sockaddr_dl *)((char *)sin + in dump_rtsock()
690 if (sdl->sdl_family != AF_LINK) in dump_rtsock()
708 sin->sin6_scope_id = sdl->sdl_index; in dump_rtsock()
733 llwidth = strlen(ether_str(sdl)); in dump_rtsock()
736 ifname = if_indextoname(sdl->sdl_index, ifix_buf); in dump_rtsock()
751 xo_emit(xobuf, host_buf, ether_str(sdl), ifname); in dump_rtsock()
807 (sdl->sdl_len + (char *)sdl); in dump_rtsock()
888 ether_str(struct sockaddr_dl *sdl) in ether_str() argument
892 if (sdl->sdl_alen == ETHER_ADDR_LEN) { in ether_str()
893 strlcpy(hbuf, ether_ntoa((struct ether_addr *)LLADDR(sdl)), in ether_str()
895 } else if (sdl->sdl_alen) { in ether_str()
896 int n = sdl->sdl_nlen > 0 ? sdl->sdl_nlen + 1 : 0; in ether_str()
897 snprintf(hbuf, sizeof(hbuf), "%s", link_ntoa(sdl) + n); in ether_str()