Searched refs:sdl (Results 1 - 25 of 75) sorted by relevance

123

/freebsd-head/lib/libc/net/
H A Dlinkaddr.c56 link_addr(const char *addr, struct sockaddr_dl *sdl) argument
58 char *cp = sdl->sdl_data;
59 char *cplim = sdl->sdl_len + (char *)sdl;
62 bzero((char *)&sdl->sdl_family, sdl->sdl_len - 1);
63 sdl->sdl_family = AF_LINK;
88 sdl->sdl_nlen = cp - sdl->sdl_data;
115 sdl
125 link_ntoa(const struct sockaddr_dl *sdl) argument
[all...]
H A Dgetnameinfo.c428 const struct sockaddr_dl *sdl = local
436 if (sdl->sdl_nlen == 0 && sdl->sdl_alen == 0 && sdl->sdl_slen == 0) {
437 n = snprintf(host, hostlen, "link#%d", sdl->sdl_index);
445 if (sdl->sdl_nlen > 0 && sdl->sdl_alen == 0) {
446 n = sdl->sdl_nlen;
451 memcpy(host, sdl->sdl_data, sdl
[all...]
/freebsd-head/sbin/ifconfig/
H A Daf_link.c63 struct sockaddr_dl *sdl; local
69 sdl = (struct sockaddr_dl *) ifa->ifa_addr;
70 if (sdl == NULL || sdl->sdl_alen == 0)
73 if ((sdl->sdl_type == IFT_ETHER || sdl->sdl_type == IFT_L2VLAN ||
74 sdl->sdl_type == IFT_BRIDGE) && sdl->sdl_alen == ETHER_ADDR_LEN) {
75 ether_format = ether_ntoa((struct ether_addr *)LLADDR(sdl));
84 n = sdl
141 struct sockaddr_dl sdl; local
[all...]
/freebsd-head/sys/compat/linuxkpi/common/include/linux/
H A Dnetdevice.h105 struct sockaddr_dl sdl; local
107 if (alen > sizeof(sdl.sdl_data))
109 memset(&sdl, 0, sizeof(sdl));
110 sdl.sdl_len = sizeof(sdl);
111 sdl.sdl_family = AF_LINK;
112 sdl.sdl_alen = alen;
113 memcpy(&sdl.sdl_data, addr, alen);
115 return -if_delmulti(dev, (struct sockaddr *)&sdl);
127 struct sockaddr_dl sdl; local
[all...]
/freebsd-head/lib/libnetbsd/
H A Dsockaddr_snprintf.c96 debug_dl(char *str, size_t len, const struct sockaddr_dl *sdl) argument
98 const uint8_t *s = (const void *)sdl->sdl_data;
103 SALEN(sdl), sdl->sdl_family, sdl->sdl_index,
104 sdl->sdl_type, sdl->sdl_nlen, sdl->sdl_alen, sdl->sdl_slen,
125 const struct sockaddr_dl *sdl local
[all...]
/freebsd-head/contrib/netbsd-tests/lib/libutil/
H A Dt_sockaddr_snprintf.c39 #include <net/if_dl.h> /* sdl */
156 struct sockaddr_dl sdl; local
159 memset(&sdl, 0, sizeof(sdl));
160 sdl.sdl_len = sizeof(sdl);
161 sdl.sdl_family = AF_LINK;
162 sdl.sdl_index = 0;
163 sdl.sdl_type = 0;
164 sdl
[all...]
/freebsd-head/contrib/netbsd-tests/sys/net/
H A Dt_print.c143 struct sockaddr_dl sdl; local
145 memset(&sdl, 0, sizeof(sdl));
147 memcpy(&sdl.sdl_addr, &tst[i].ia, sizeof(sdl.sdl_addr));
148 sdl.sdl_index = (uint16_t)i;
149 r = sdl_print(buf, l, &sdl);
160 memcpy(&sdl.sdl_addr, &tst[i].ia, sizeof(sdl.sdl_addr));
161 sdl
[all...]
/freebsd-head/usr.sbin/wpa/wpa_supplicant/
H A DPacket32.c243 struct sockaddr_dl *sdl; local
282 sdl = (struct sockaddr_dl *)(ifm + 1);
283 if (strnstr(sdl->sdl_data, "wlan", sdl->sdl_nlen)) {
284 if ((spc + sdl->sdl_nlen) > *len) {
288 strncpy(plist, sdl->sdl_data, sdl->sdl_nlen);
289 plist += (sdl->sdl_nlen + 1);
290 spc += (sdl->sdl_nlen + 1);
315 sdl
[all...]
/freebsd-head/usr.sbin/arp/
H A Darp.c84 typedef void (action_fn)(struct sockaddr_dl *sdl, struct sockaddr_in *s_in,
97 struct sockaddr_in *dst, struct sockaddr_dl *sdl);
321 struct sockaddr_dl *sdl; local
413 sdl = (struct sockaddr_dl *)(SA_SIZE(addr) + (char *)addr);
415 if ((sdl->sdl_family != AF_LINK) ||
417 !valid_type(sdl->sdl_type)) {
421 sdl_m.sdl_type = sdl->sdl_type;
422 sdl_m.sdl_index = sdl->sdl_index;
468 struct sockaddr_dl *sdl; local
486 sdl
534 struct sockaddr_dl *sdl; local
588 print_entry(struct sockaddr_dl *sdl, struct sockaddr_in *addr, struct rt_msghdr *rtm) argument
716 rtmsg(int cmd, struct sockaddr_in *dst, struct sockaddr_dl *sdl) argument
[all...]
/freebsd-head/contrib/blacklist/port/
H A Dsockaddr_snprintf.c148 debug_dl(char *str, size_t len, const struct sockaddr_dl *sdl) argument
150 const uint8_t *s = (const void *)sdl->sdl_data;
155 SLEN(sdl), sdl->sdl_family, sdl->sdl_index,
156 sdl->sdl_type, sdl->sdl_nlen, sdl->sdl_alen, sdl->sdl_slen,
180 const struct sockaddr_dl *sdl local
[all...]
/freebsd-head/usr.sbin/rtsold/
H A Dif.c261 lladdropt_length(struct sockaddr_dl *sdl) argument
263 switch (sdl->sdl_type) {
272 lladdropt_fill(struct sockaddr_dl *sdl, struct nd_opt_hdr *ndopt) argument
278 switch (sdl->sdl_type) {
282 memcpy(addr, LLADDR(sdl), ETHER_ADDR_LEN);
286 "unsupported link type(%d)", sdl->sdl_type);
299 struct sockaddr_dl *sdl = NULL, *ret_sdl; local
318 sdl = (struct sockaddr_dl *)(void *)sa;
319 if (strlen(name) != sdl->sdl_nlen)
321 if (strncmp(&sdl
[all...]
/freebsd-head/tools/regression/netinet/ipbroadcast/
H A Dipbroadcast.c115 struct sockaddr_dl *sdl; local
334 sdl = (struct sockaddr_dl *)CMSG_DATA(cmsgp);
335 memset(sdl, 0, sizeof(struct sockaddr_dl));
336 sdl->sdl_family = AF_LINK;
337 sdl->sdl_len = sizeof(struct sockaddr_dl);
338 sdl->sdl_index = if_nametoindex(ifname);
341 fprintf(stderr, "DEBUG: sdl->sdl_family is %d\n",
342 sdl->sdl_family);
343 fprintf(stderr, "DEBUG: sdl->sdl_len is %d\n",
344 sdl
[all...]
/freebsd-head/contrib/ipfilter/ipsend/
H A D44arp.c68 struct sockaddr_dl *sdl; local
109 sdl = (struct sockaddr_dl *)(sin + 1);
113 bcopy(LLADDR(sdl), eaddr, sdl->sdl_alen);
/freebsd-head/usr.bin/netstat/
H A Dif.c257 struct sockaddr_dl *sdl; local
259 sdl = (struct sockaddr_dl *)ifma->ifma_name;
261 strcmp(sdl->sdl_data, name) == 0)
397 struct sockaddr_dl *sdl; local
400 sdl = (struct sockaddr_dl *)ifa->ifa_addr;
401 snprintf(linknum, sizeof(linknum), "<Link#%d>", sdl->sdl_index);
404 if (sdl->sdl_nlen == 0 &&
405 sdl->sdl_alen == 0 &&
406 sdl->sdl_slen == 0)
459 struct sockaddr_dl *sdl; local
[all...]
/freebsd-head/libexec/bootpd/
H A Drtmsg.c124 struct sockaddr_dl *sdl; local
150 sdl = (struct sockaddr_dl *)(sin->sin_len + (char *)sin);
152 if (sdl->sdl_family == AF_LINK &&
153 !(rtm->rtm_flags & RTF_GATEWAY)) switch (sdl->sdl_type) {
167 if (sdl->sdl_family != AF_LINK) {
173 sdl_m.sdl_type = sdl->sdl_type;
174 sdl_m.sdl_index = sdl->sdl_index;
/freebsd-head/share/examples/libifconfig/
H A Dstatus.c192 struct sockaddr_dl *sdl; local
195 sdl = (struct sockaddr_dl *)ifa->ifa_addr;
196 if ((sdl != NULL) && (sdl->sdl_alen > 0)) {
197 if (((sdl->sdl_type == IFT_ETHER) ||
198 (sdl->sdl_type == IFT_L2VLAN) ||
199 (sdl->sdl_type == IFT_BRIDGE)) &&
200 (sdl->sdl_alen == ETHER_ADDR_LEN)) {
201 ether_ntoa_r((struct ether_addr *)LLADDR(sdl),
205 n = sdl
[all...]
/freebsd-head/usr.sbin/ndp/
H A Dndp.c388 register struct sockaddr_dl *sdl; local
431 sdl = (struct sockaddr_dl *)(ALIGN(sin->sin6_len) + (char *)sin);
433 if (sdl->sdl_family == AF_LINK &&
435 switch (sdl->sdl_type) {
447 if (sdl->sdl_family != AF_LINK) {
451 sdl_m.sdl_type = sdl->sdl_type;
452 sdl_m.sdl_index = sdl->sdl_index;
497 struct sockaddr_dl *sdl; local
520 sdl = (struct sockaddr_dl *)(ALIGN(sin->sin6_len) + (char *)sin);
522 if (sdl
567 struct sockaddr_dl *sdl; local
788 ether_str(struct sockaddr_dl *sdl) argument
[all...]
/freebsd-head/contrib/wpa/src/l2_packet/
H A Dl2_packet_freebsd.c191 struct sockaddr_dl *sdl;
206 sdl = (struct sockaddr_dl *)(ifm + 1);
210 if (sdl->sdl_family != AF_LINK || sdl->sdl_nlen == 0 ||
211 os_memcmp(sdl->sdl_data, device, sdl->sdl_nlen) != 0)
213 os_memcpy(ea, LLADDR(sdl), sdl->sdl_alen);
/freebsd-head/usr.sbin/wpa/ndis_events/
H A Dndis_events.c120 struct sockaddr_dl *sdl; local
149 sdl = (struct sockaddr_dl *)(ifm + 1);
151 strncpy(name, sdl->sdl_data, sdl->sdl_nlen);
152 name[sdl->sdl_nlen] = '\0';
/freebsd-head/tools/regression/ethernet/ethermulti/
H A Dethermulti.c112 struct sockaddr_dl sdl; member in union:sockunion
169 psa->sdl.sdl_alen != ETHER_ADDR_LEN)
172 if (bcmp(LLADDR(&psa->sdl), LLADDR(dlp),
/freebsd-head/usr.sbin/wake/
H A Dwake.c112 struct sockaddr_dl *sdl = NULL; local
125 sdl = (struct sockaddr_dl *)ifa->ifa_addr;
126 if (sdl->sdl_type == IFT_ETHER) {
/freebsd-head/sys/compat/linux/
H A Dlinux.c310 struct sockaddr_dl *sdl; local
322 sdl = (struct sockaddr_dl*)ifa->ifa_addr;
323 if (sdl != NULL && (sdl->sdl_family == AF_LINK) &&
324 (sdl->sdl_type == IFT_ETHER)) {
327 bcopy(LLADDR(sdl), lsa->sa_data, LINUX_IFHWADDRLEN);
/freebsd-head/contrib/bsnmp/snmp_mibII/
H A DmibII.c679 get_physaddr(struct mibif *ifp, struct sockaddr_dl *sdl, u_char *ptr) argument
684 if (sdl->sdl_alen == 0) {
697 if (ifp->physaddrlen != sdl->sdl_alen) {
705 if ((np = realloc(ifp->physaddr, sdl->sdl_alen)) == NULL) {
712 ifp->physaddrlen = sdl->sdl_alen;
1006 process_arp(const struct rt_msghdr *rtm, const struct sockaddr_dl *sdl, argument
1013 if (sdl->sdl_alen == 0)
1015 if ((ifp = mib_find_if_sys(sdl->sdl_index)) == NULL)
1020 sdl->sdl_data + sdl
1044 struct sockaddr_dl *sdl; local
[all...]
/freebsd-head/usr.sbin/ifmcstat/
H A Difmcstat.c103 struct sockaddr_dl sdl; member in union:sockunion
388 struct sockaddr_dl sdl; local
402 KREAD(ifa.ifa_addr, &sdl, struct sockaddr_dl);
403 if (sdl.sdl_alen == 0)
406 getnameinfo((struct sockaddr *)&sdl, sdl.sdl_len,
427 KREAD(ifm.ifma_addr, &sdl, struct sockaddr_dl);
429 getnameinfo((struct sockaddr *)&sdl,
430 sdl.sdl_len, addrbuf, sizeof(addrbuf),
485 struct sockaddr_dl sdl; local
568 struct sockaddr_dl sdl; local
[all...]
/freebsd-head/contrib/ntp/lib/isc/unix/
H A Difiter_sysctl.c168 struct sockaddr_dl *sdl = (struct sockaddr_dl *) (ifm + 1); local
173 iter->current.ifindex = sdl->sdl_index;
174 namelen = sdl->sdl_nlen;
179 memcpy(iter->current.name, sdl->sdl_data, namelen);

Completed in 471 milliseconds

123