mirror of
https://github.com/nmap/nmap.git
synced 2025-12-06 20:51:30 +00:00
removed BSDFIX/BSDUFIX macros
This commit is contained in:
10
nmap.h
10
nmap.h
@@ -395,16 +395,6 @@ void *realloc();
|
||||
#define MAXHOSTNAMELEN 64
|
||||
#endif
|
||||
|
||||
#ifndef BSDFIX
|
||||
#if FREEBSD || BSDI || NETBSD
|
||||
#define BSDFIX(x) x
|
||||
#define BSDUFIX(x) x
|
||||
#else
|
||||
#define BSDFIX(x) htons(x)
|
||||
#define BSDUFIX(x) ntohs(x)
|
||||
#endif
|
||||
#endif /* BSDFIX */
|
||||
|
||||
#ifndef recvfrom6_t
|
||||
# define recvfrom6_t int
|
||||
#endif
|
||||
|
||||
10
tcpip.cc
10
tcpip.cc
@@ -968,8 +968,11 @@ int send_ip_packet(int sd, struct eth_nfo *eth, u8 *packet, unsigned int packetl
|
||||
must deal with it here rather than when building the packet,
|
||||
because they should be in NBO when I'm sending over raw
|
||||
ethernet */
|
||||
ip->ip_len = BSDFIX(ip->ip_len);
|
||||
ip->ip_off = BSDFIX(ip->ip_off);
|
||||
#if FREEBSD || BSDI || NETBSD || DEC
|
||||
ip->ip_len = ntohs(ip->ip_len);
|
||||
ip->ip_off = ntohs(ip->ip_off);
|
||||
#endif
|
||||
|
||||
res = Sendto("send_ip_packet", sd, packet, packetlen, 0,
|
||||
(struct sockaddr *)&sock, (int)sizeof(struct sockaddr_in));
|
||||
return res;
|
||||
@@ -2707,7 +2710,8 @@ do {
|
||||
error("sendto in %s: sendto(%d, packet, %d, 0, %s, %d) => %s",
|
||||
functionname, sd, len, inet_ntoa(sin->sin_addr), tolen,
|
||||
strerror(err));
|
||||
if (retries > 2 || err == EPERM || err == EACCES || err == EADDRNOTAVAIL)
|
||||
if (retries > 2 || err == EPERM || err == EACCES || err == EADDRNOTAVAIL
|
||||
|| err == EINVAL)
|
||||
return -1;
|
||||
sleeptime = 15 * (1 << (2 * retries));
|
||||
error("Sleeping %d seconds then retrying", sleeptime);
|
||||
|
||||
10
tcpip.h
10
tcpip.h
@@ -248,16 +248,6 @@ typedef enum { devt_ethernet, devt_loopback, devt_p2p, devt_other } devtype;
|
||||
#define TCPIP_DEBUGGING 0
|
||||
#endif
|
||||
|
||||
#ifndef BSDFIX
|
||||
#if FREEBSD || BSDI || NETBSD || DEC
|
||||
#define BSDFIX(x) x
|
||||
#define BSDUFIX(x) x
|
||||
#else
|
||||
#define BSDFIX(x) htons(x)
|
||||
#define BSDUFIX(x) ntohs(x)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* Explicit Congestion Notification (rfc 2481/3168) */
|
||||
#ifndef TH_ECE
|
||||
#define TH_ECE 0x40
|
||||
|
||||
Reference in New Issue
Block a user