47 lines
1.9 KiB
Plaintext
47 lines
1.9 KiB
Plaintext
--- udptcpwalk.c.orig Thu Dec 16 22:19:09 1999
|
|
+++ udptcpwalk.c Thu Dec 16 22:20:22 1999
|
|
@@ -111,7 +111,7 @@
|
|
* differentiate between probes. The TTL is bumped up so we
|
|
* can determine how many hops away the gateway is.
|
|
*/
|
|
- build_ip(t_size,
|
|
+ libnet_build_ip(t_size,
|
|
0, /* regular service */
|
|
++fp->id,
|
|
0, /* No fragmentation bits set */
|
|
@@ -125,13 +125,13 @@
|
|
|
|
if (fp->protocol == IPPROTO_UDP)
|
|
{
|
|
- build_udp(fp->sport, cport, NULL, 0, IP_H + pak_buf);
|
|
+ libnet_build_udp(fp->sport, cport, NULL, 0, IP_H + pak_buf);
|
|
}
|
|
else
|
|
{
|
|
- build_tcp(fp->sport,
|
|
+ libnet_build_tcp(fp->sport,
|
|
cport,
|
|
- get_prand(PRu32),
|
|
+ libnet_get_prand(PRu32),
|
|
0L, /* No ACK number */
|
|
TH_SYN,
|
|
1024,
|
|
@@ -140,7 +140,7 @@
|
|
0,
|
|
pak_buf + IP_H);
|
|
}
|
|
- do_checksum(pak_buf, fp->protocol, t_size);
|
|
+ libnet_do_checksum(pak_buf, fp->protocol, t_size);
|
|
|
|
for (j = 0, fp->red_flag = 0; j < fp->red_cnt; j++)
|
|
{
|
|
@@ -148,7 +148,7 @@
|
|
* Write the packet to the network.
|
|
*/
|
|
usleep(fp->write_pause);
|
|
- c = write_ip(fp->sock, pak_buf, IP_H + t_size);
|
|
+ c = libnet_write_ip(fp->sock, pak_buf, IP_H + t_size);
|
|
if (c < IP_H + t_size)
|
|
{
|
|
fprintf(stderr,
|