Setting NET


You can set a repeat count and an interval for sending Gratuitous ARP packet by using set command of pid_ioctl function. PHPoC sends 4 Gratuitous arp packets with an interval of 2 seconds when it boots. If you want to manually send the packet, you can use this command.

pid_ioctl($pid, "set garp RC INTV");

RC means a repeat count and INTV means an interval.

example of setting Gratuitous ARP

This example shows how to set Gratuitous arp.

<?php
$pid = pid_open("/mmap/net0");      // open NET 0 (Ethernet)
pid_ioctl($pid, "set garp 5 10");   // set GARP (5 times at an interval of 10 secs)
?>