Messages in this thread | | | Date | Fri, 22 Aug 2003 12:55:43 -0400 (EDT) | From | "Richard B. Johnson" <> | Subject | Re: Reinjecting IP Packets |
| |
On Fri, 22 Aug 2003, Patrick Sodre Carlos wrote:
> > My mistake... I forgot to mention that the packet will be coming from > user-space. > > Patrick
Then just use raw packets. Find the source of 'ping' and send packets just like it does...
ld->icp.net.icmp_id = ld->ident; ld->icp.net.icmp_cksum = 0; ld->icp.net.icmp_cksum = chksum(&ld->icp, len); if(sendto(ld->s, &ld->icp, len, 0, &ld->where, sizeof(ld->where)) != len) perror("ping: sendto"); }
Cheers, Dick Johnson Penguin : Linux version 2.4.20 on an i686 machine (797.90 BogoMips). Note 96.31% of all statistics are fiction.
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |