Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SEND_LOCK;
- t = libnet_build_arp(
- ARPHRD_ETHER, /* hardware addr */
- ETHERTYPE_IP, /* protocol addr */
- MEDIA_ADDR_LEN, /* hardware addr size */
- IP_ADDR_LEN, /* protocol addr size */
- type, /* operation type */
- smac, /* sender hardware addr */
- (u_char *)&(sip->addr), /* sender protocol addr */
- tmac, /* target hardware addr */
- (u_char *)&(tip->addr), /* target protocol addr */
- NULL, /* payload */
- 0, /* payload size */
- GBL_IFACE->lnet, /* libnet handle */
- 0); /* pblock id */
- //check return value, no problems here
- c = libnet_write(l);
- if (c == -1)
- //BADLY EXIT
- /* clear the pblock */
- libnet_clear_packet(GBL_IFACE->lnet);
- SEND_UNLOCK;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement