eth_linux.c
changeset 88 a7f546938313
parent 87 be4ee314545c
equal deleted inserted replaced
87:be4ee314545c 88:a7f546938313
   149         return -1;
   149         return -1;
   150     sa.sll_ifindex = i;
   150     sa.sll_ifindex = i;
   151     sa.sll_halen = 6;
   151     sa.sll_halen = 6;
   152     memcpy(sa.sll_addr, mac, 6);
   152     memcpy(sa.sll_addr, mac, 6);
   153     if (debug) {
   153     if (debug) {
   154         printf("sending %d bytes to port %hi\r\n", len, sa.sll_protocol);
   154         printf("sending %d bytes to eth_protocol %hi\r\n", len, sa.sll_protocol);
   155         dump(p, len);
   155         dump(p, len);
   156     }
   156     }
   157     if (len > 1500)
   157     if (len > 1500)
   158         len = 1500;
   158         len = 1500;
   159     return sendto(fd, p, len, 0, (struct sockaddr*) &sa, sizeof(sa));
   159     return sendto(fd, p, len, 0, (struct sockaddr*) &sa, sizeof(sa));