Searched refs:bindaddr (Results 1 – 1 of 1) sorted by relevance
46 struct sockaddr_ll bindaddr; in open_raw_socket() local52 memset(&bindaddr, 0, sizeof(bindaddr)); in open_raw_socket()53 bindaddr.sll_family = AF_PACKET; in open_raw_socket()54 bindaddr.sll_protocol = htons(ETH_P_IP); in open_raw_socket()55 bindaddr.sll_halen = ETH_ALEN; in open_raw_socket()56 memcpy(bindaddr.sll_addr, hwaddr, ETH_ALEN); in open_raw_socket()57 bindaddr.sll_ifindex = if_index; in open_raw_socket()59 if (bind(s, (struct sockaddr *)&bindaddr, sizeof(bindaddr)) < 0) { in open_raw_socket()