Lines Matching refs:su
76 } su; in open_socket() local
86 memset(&su, 0, sizeof(su)); in open_socket()
87 su.sll.sll_family = PF_PACKET; in open_socket()
88 su.sll.sll_protocol = htons(protocol); in open_socket()
89 if (!(su.sll.sll_ifindex = if_nametoindex(iface->name))) { in open_socket()
115 if (bind(s, &su.sa, sizeof(su)) == -1) in open_socket()
139 } su; in send_raw_packet() local
142 memset(&su, 0, sizeof(su)); in send_raw_packet()
143 su.sll.sll_family = AF_PACKET; in send_raw_packet()
144 su.sll.sll_protocol = htons(protocol); in send_raw_packet()
145 if (!(su.sll.sll_ifindex = if_nametoindex(iface->name))) { in send_raw_packet()
149 su.sll.sll_hatype = htons(iface->family); in send_raw_packet()
150 su.sll.sll_halen = iface->hwlen; in send_raw_packet()
152 memcpy(&su.sll.sll_addr, in send_raw_packet()
155 memset(&su.sll.sll_addr, 0xff, iface->hwlen); in send_raw_packet()
161 return sendto(fd, data, len, 0, &su.sa, sizeof(su)); in send_raw_packet()