Advertisement
LocutusOfBorg

Untitled

Jul 18th, 2013
165
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.95 KB | None | 0 0
  1. SEND_LOCK;
  2.    t = libnet_build_arp(
  3.            ARPHRD_ETHER,            /* hardware addr */
  4.            ETHERTYPE_IP,            /* protocol addr */
  5.            MEDIA_ADDR_LEN,          /* hardware addr size */
  6.            IP_ADDR_LEN,             /* protocol addr size */
  7.            type,                    /* operation type */
  8.            smac,                    /* sender hardware addr */
  9.            (u_char *)&(sip->addr),  /* sender protocol addr */
  10.            tmac,                    /* target hardware addr */
  11.            (u_char *)&(tip->addr),  /* target protocol addr */
  12.            NULL,                    /* payload */
  13.            0,                       /* payload size */
  14.            GBL_IFACE->lnet,          /* libnet handle */
  15.            0);                      /* pblock id */
  16. //check return value, no problems here
  17. c = libnet_write(l);
  18. if (c == -1)
  19. //BADLY EXIT
  20. /* clear the pblock */
  21. libnet_clear_packet(GBL_IFACE->lnet);
  22. SEND_UNLOCK;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement