mirror of
https://github.com/nmap/nmap.git
synced 2025-12-19 14:09:02 +00:00
Avoid using parameter names that are #defined on AIX.
AIX defines various things like ip_id as some implementation-dependent submember of struct ip.
This commit is contained in:
@@ -2612,7 +2612,7 @@ const char *ippackethdrinfo(const u8 *packet, u32 len, int detail) {
|
||||
u32 recv;
|
||||
u32 trans;
|
||||
} *icmptstamp = NULL;
|
||||
struct icmp_mask{
|
||||
struct icmp_amask{
|
||||
u8 type;
|
||||
u8 code;
|
||||
u16 checksum;
|
||||
@@ -2857,7 +2857,7 @@ const char *ippackethdrinfo(const u8 *packet, u32 len, int detail) {
|
||||
case 17:
|
||||
case 18:
|
||||
Snprintf(icmptype, sizeof(icmptype), "Address mask %s", (icmppkt->type == 17)? "request" : "reply");
|
||||
icmpmask = (struct icmp_mask *) icmppkt;
|
||||
icmpmask = (struct icmp_amask *) icmppkt;
|
||||
inet_ntop(AF_INET, &icmpmask->mask, auxbuff, sizeof(auxbuff));
|
||||
Snprintf(icmpfields, sizeof(icmpfields), "id=%u seq=%u mask=%s",
|
||||
ntohs(ping->id), ntohs(ping->seq), auxbuff);
|
||||
|
||||
14
tcpip.cc
14
tcpip.cc
@@ -553,18 +553,18 @@ static u16 ipv6_cksum(const struct in6_addr *src, const struct in6_addr *dst,
|
||||
// fill ip header. no error check.
|
||||
// This function is also changing what's needed from host to network order.
|
||||
static inline int fill_ip_raw(struct ip *ip, int packetlen, const u8 *ipopt,
|
||||
int ipoptlen, int ip_tos, int ip_id,
|
||||
int ip_off, int ip_ttl, int ip_p,
|
||||
int ipoptlen, int tos, int id,
|
||||
int off, int ttl, int p,
|
||||
const struct in_addr *ip_src,
|
||||
const struct in_addr *ip_dst) {
|
||||
ip->ip_v = 4;
|
||||
ip->ip_hl = 5 + (ipoptlen / 4);
|
||||
ip->ip_tos = ip_tos;
|
||||
ip->ip_tos = tos;
|
||||
ip->ip_len = htons(packetlen);
|
||||
ip->ip_id = htons(ip_id);
|
||||
ip->ip_off = htons(ip_off);
|
||||
ip->ip_ttl = ip_ttl;
|
||||
ip->ip_p = ip_p;
|
||||
ip->ip_id = htons(id);
|
||||
ip->ip_off = htons(off);
|
||||
ip->ip_ttl = ttl;
|
||||
ip->ip_p = p;
|
||||
ip->ip_src.s_addr = ip_src->s_addr;
|
||||
ip->ip_dst.s_addr = ip_dst->s_addr;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user