• Home
  • Raw
  • Download

Lines Matching refs:sll

419 	struct sockaddr_ll sll;  in serve_it()  local
420 socklen_t sll_len = sizeof(sll); in serve_it()
426 n = recvfrom(fd, buf, sizeof(buf), MSG_DONTWAIT, (struct sockaddr*)&sll, &sll_len); in serve_it()
434 if (sll.sll_pkttype != PACKET_BROADCAST && in serve_it()
435 sll.sll_pkttype != PACKET_MULTICAST && in serve_it()
436 sll.sll_pkttype != PACKET_HOST) in serve_it()
439 if (ifidx && sll.sll_ifindex != ifidx) in serve_it()
455 for (i=0; i<sll.sll_halen; i++) { in serve_it()
457 sprintf(ptr, ":%02x", sll.sll_addr[i]); in serve_it()
460 sprintf(ptr, "%02x", sll.sll_addr[i]); in serve_it()
463 syslog(LOG_INFO, "RARP request from %s on if%d", tmpbuf, sll.sll_ifindex); in serve_it()
479 if (htons(sll.sll_hatype) != a->ar_hrd) { in serve_it()
480 switch (sll.sll_hatype) { in serve_it()
491 if (a->ar_hln != sll.sll_halen) { in serve_it()
503 if (memcmp(sll.sll_addr, a+1, sll.sll_halen)) { in serve_it()
510 rmap = rarp_lookup(sll.sll_ifindex, sll.sll_hatype, in serve_it()
511 sll.sll_halen, (unsigned char*)(a+1) + sll.sll_halen + 4); in serve_it()
522 if (put_mylladdr(&ptr, sll.sll_ifindex, rmap->lladdr_len)) in serve_it()
524 if (put_myipaddr(&ptr, sll.sll_ifindex, rmap->ipaddr)) in serve_it()
534 arp_advise(sll.sll_ifindex, rmap->lladdr, rmap->lladdr_len, rmap->ipaddr); in serve_it()
538 sendto(fd, buf, ptr - buf, 0, (struct sockaddr*)&sll, sizeof(sll)); in serve_it()
635 struct sockaddr_ll sll; in main() local
636 memset(&sll, 0, sizeof(sll)); in main()
637 sll.sll_family = AF_PACKET; in main()
638 sll.sll_protocol = htons(ETH_P_ARP); in main()
639 sll.sll_ifindex = all_ifaces ? 0 : ifidx; in main()
640 if (bind(pset[1].fd, (struct sockaddr*)&sll, sizeof(sll)) < 0) { in main()
647 struct sockaddr_ll sll; in main() local
648 memset(&sll, 0, sizeof(sll)); in main()
649 sll.sll_family = AF_PACKET; in main()
650 sll.sll_protocol = htons(ETH_P_RARP); in main()
651 sll.sll_ifindex = all_ifaces ? 0 : ifidx; in main()
652 if (bind(pset[0].fd, (struct sockaddr*)&sll, sizeof(sll)) < 0) { in main()