1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-25 08:59:01 +00:00

o Fixed a bunch of code to avoid compilation warning messages (at

least on some Linux machines) [Andrew J. Bennieston]
This commit is contained in:
fyodor
2008-04-09 02:11:20 +00:00
parent fa9bd6be6e
commit 5551c5a311
21 changed files with 144 additions and 140 deletions

View File

@@ -450,7 +450,7 @@ static const char *ippackethdrinfo(const u8 *packet, u32 len) {
Snprintf(ipinfo, sizeof(ipinfo), "ttl=%d id=%d iplen=%d%s %s%s%s",
ip->ip_ttl, ntohs(ip->ip_id), ntohs(ip->ip_len), fragnfo,
ip->ip_hl==5?"":"ipopts={",
ip->ip_hl==5?"":print_ip_options((u8*)ip + sizeof(struct ip), MIN((ip->ip_hl-5)*4,len-sizeof(struct ip))),
ip->ip_hl==5?"":print_ip_options((u8*)ip + sizeof(struct ip), MIN((unsigned)(ip->ip_hl-5)*4,len-sizeof(struct ip))),
ip->ip_hl==5?"":"}");
if (ip->ip_p == IPPROTO_TCP) {
@@ -1312,7 +1312,7 @@ int send_frag_ip_packet(int sd, struct eth_nfo *eth, u8 *packet,
return res;
}
static int Sendto(char *functionname, int sd, const unsigned char *packet,
static int Sendto(const char *functionname, int sd, const unsigned char *packet,
int len, unsigned int flags, struct sockaddr *to, int tolen) {
struct sockaddr_in *sin = (struct sockaddr_in *) to;
@@ -2473,7 +2473,7 @@ bool setTargetNextHopMAC(Target *target) {
/* Set a pcap filter */
void set_pcap_filter(const char *device,
pcap_t *pd, char *bpf, ...)
pcap_t *pd, const char *bpf, ...)
{
va_list ap;
char buf[3072];