Lines Matching refs:su
76 } su; in open_socket() local
83 memset(&su, 0, sizeof(su)); in open_socket()
84 su.sll.sll_family = PF_PACKET; in open_socket()
85 su.sll.sll_protocol = htons(protocol); in open_socket()
86 if (!(su.sll.sll_ifindex = if_nametoindex(iface->name))) { in open_socket()
105 if (bind(s, &su.sa, sizeof(su)) == -1) in open_socket()
129 } su; in send_raw_packet() local
132 memset(&su, 0, sizeof(su)); in send_raw_packet()
133 su.sll.sll_family = AF_PACKET; in send_raw_packet()
134 su.sll.sll_protocol = htons(protocol); in send_raw_packet()
135 if (!(su.sll.sll_ifindex = if_nametoindex(iface->name))) { in send_raw_packet()
139 su.sll.sll_hatype = htons(iface->family); in send_raw_packet()
140 su.sll.sll_halen = iface->hwlen; in send_raw_packet()
142 memcpy(&su.sll.sll_addr, in send_raw_packet()
145 memset(&su.sll.sll_addr, 0xff, iface->hwlen); in send_raw_packet()
151 return sendto(fd, data, len, 0, &su.sa, sizeof(su)); in send_raw_packet()