mirror of
https://github.com/nmap/nmap.git
synced 2026-08-04 14:49:29 +00:00
Remove unused send_ip_raw function.
This commit is contained in:
parent
e04f9d24ec
commit
650ede916a
2 changed files with 0 additions and 28 deletions
22
tcpip.cc
22
tcpip.cc
|
|
@ -1041,28 +1041,6 @@ u8 *build_ip_raw(const struct in_addr *source,
|
|||
return packet;
|
||||
}
|
||||
|
||||
/* You need to call sethdrinclude(sd) on the sending sd before calling this */
|
||||
int send_ip_raw(int sd, struct eth_nfo *eth,
|
||||
struct in_addr *source, const struct in_addr *victim,
|
||||
u8 proto, int ttl,
|
||||
u8 *ipopt, int ipoptlen, char *data, u16 datalen) {
|
||||
unsigned int packetlen;
|
||||
int res = -1;
|
||||
|
||||
u8 *packet = build_ip_raw(source, victim,
|
||||
proto,
|
||||
ttl, get_random_u16(), IP_TOS_DEFAULT, false,
|
||||
ipopt, ipoptlen,
|
||||
data, datalen, &packetlen);
|
||||
if (!packet)
|
||||
return -1;
|
||||
|
||||
res = send_ip_packet(sd, eth, packet, packetlen);
|
||||
|
||||
free(packet);
|
||||
return res;
|
||||
}
|
||||
|
||||
|
||||
/* Used by validatepkt() to validate the TCP header (including option lengths).
|
||||
The options checked are MSS, WScale, SackOK, Sack, and Timestamp. */
|
||||
|
|
|
|||
6
tcpip.h
6
tcpip.h
|
|
@ -435,12 +435,6 @@ int send_udp_raw( int sd, struct eth_nfo *eth,
|
|||
u16 sport, u16 dport,
|
||||
char *data, u16 datalen);
|
||||
|
||||
int send_ip_raw( int sd, struct eth_nfo *eth,
|
||||
struct in_addr *source, const struct in_addr *victim,
|
||||
u8 proto, int ttl,
|
||||
u8* ipopt, int ipoptlen,
|
||||
char *data, u16 datalen);
|
||||
|
||||
/* Builds a TCP packet (including an IP header) by packing the fields
|
||||
with the given information. It allocates a new buffer to store the
|
||||
packet contents, and then returns that buffer. The packet is not
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue