Lines Matching defs:sa
26 struct sockaddr sa;
55 static void copy_addr(struct sockaddr** r, int af, union sockany* sa, void* addr, size_t addrlen,
62 dst = (uint8_t*)&sa->v4.sin_addr;
66 dst = (uint8_t*)&sa->v6.sin6_addr;
69 sa->v6.sin6_scope_id = ifindex;
76 sa->sa.sa_family = af;
78 *r = &sa->sa;
81 static void gen_netmask(struct sockaddr** r, int af, union sockany* sa, int prefixlen) {
91 copy_addr(r, af, sa, addr, sizeof(addr), 0);
94 static void copy_lladdr(struct sockaddr** r, union sockany* sa, void* addr, size_t addrlen,
96 if (addrlen > sizeof(sa->ll.sll_addr))
98 sa->ll.sll_family = AF_PACKET;
99 sa->ll.sll_ifindex = ifindex;
100 sa->ll.sll_hatype = hatype;
101 sa->ll.sll_halen = addrlen;
102 memcpy(sa->ll.sll_addr, addr, addrlen);
103 *r = &sa->sa;
188 ifs->ifa.ifa_dstaddr = &ifs->ifu.sa;