*** ./nbase/nbase_misc.c.ORIG Wed Dec 14 22:55:27 2011 --- ./nbase/nbase_misc.c Wed Dec 14 22:56:34 2011 *************** *** 117,122 **** --- 117,126 ---- #define INET6_ADDRSTRLEN 46 #endif + #if (defined(_AIX51) || defined(_AIX52) || defined(_AIX53)) && !(defined(_AIX61)) + #define ss_family __ss_family + #endif + /* Returns the UNIX/Windows errno-equivalent. Note that the Windows call is socket/networking specific. The windows error number returned is like WSAMSGSIZE, but nbase.h includes #defines to *** ./nse_nsock.cc.ORIG Wed Dec 14 23:19:53 2011 --- ./nse_nsock.cc Wed Dec 14 23:20:32 2011 *************** *** 24,29 **** --- 24,33 ---- #include #include + #if (defined(_AIX51) || defined(_AIX52) || defined(_AIX53)) && !(defined(_AIX61)) + #define ss_family __ss_family + #endif + #define NMAP_NSOCK_SOCKET "NMAP_NSOCK_SOCKET" #define NMAP_NSOCK_PCAP_SOCKET "NMAP_NSOCK_PCAP_SOCKET" *** ./traceroute.cc.ORIG Wed Dec 14 23:20:48 2011 --- ./traceroute.cc Wed Dec 14 23:21:00 2011 *************** *** 145,150 **** --- 145,154 ---- #include #include + #if (defined(_AIX51) || defined(_AIX52) || defined(_AIX53)) && !(defined(_AIX61)) + #define ss_family __ss_family + #endif + extern NmapOps o; /* The highest TTL we go up to if the target itself doesn't respond. */ *** ./nmap_rpc.cc.ORIG Wed Dec 14 23:21:21 2011 --- ./nmap_rpc.cc Wed Dec 14 23:21:33 2011 *************** *** 102,107 **** --- 102,111 ---- #include "utils.h" #include "nbase.h" + #if (defined(_AIX51) || defined(_AIX52) || defined(_AIX53)) && !(defined(_AIX61)) + #define ss_family __ss_family + #endif + extern NmapOps o; static struct rpc_info ri; static int udp_rpc_socket = -1; *** ./TargetGroup.cc.ORIG Wed Dec 14 23:22:17 2011 --- ./TargetGroup.cc Wed Dec 14 23:22:48 2011 *************** *** 92,97 **** --- 92,98 ---- /* $Id: TargetGroup.cc 21904 2011-01-21 00:04:16Z fyodor $ */ + #include "dnet.h" #include "tcpip.h" #include "TargetGroup.h" #include "NmapOps.h" *** ./ncat/ncat_main.c.ORIG Thu Dec 15 22:56:31 2011 --- ./ncat/ncat_main.c Thu Dec 15 22:57:24 2011 *************** *** 112,117 **** --- 112,121 ---- #include #endif + #if (defined(_AIX51) || defined(_AIX52) || defined(_AIX53)) && !(defined(_AIX61)) + #define ss_family __ss_family + #endif + static int ncat_connect_mode(void); static int ncat_listen_mode(void); *** ./ncat/ncat_connect.c.ORIG Thu Dec 15 22:57:58 2011 --- ./ncat/ncat_connect.c Thu Dec 15 22:58:11 2011 *************** *** 110,115 **** --- 110,119 ---- #include #endif + #if (defined(_AIX51) || defined(_AIX52) || defined(_AIX53)) && !(defined(_AIX61)) + #define ss_family __ss_family + #endif + struct conn_state { nsock_iod sock_nsi; nsock_iod stdin_nsi; *** ./ncat/ncat_listen.c.ORIG Thu Dec 15 22:58:21 2011 --- ./ncat/ncat_listen.c Thu Dec 15 22:58:32 2011 *************** *** 111,116 **** --- 111,120 ---- #include #endif + #if (defined(_AIX51) || defined(_AIX52) || defined(_AIX53)) && !(defined(_AIX61)) + #define ss_family __ss_family + #endif + /* read_fds is the clients we are accepting data from. broadcast_fds is the clients were are sending data to. broadcast_fds doesn't include the listening socket and stdin. Network clients are not added to read_fds when --send-only *** ./ncat/ncat_proxy.c.ORIG Thu Dec 15 22:58:47 2011 --- ./ncat/ncat_proxy.c Thu Dec 15 22:59:01 2011 *************** *** 97,102 **** --- 97,106 ---- #include #endif + #if (defined(_AIX51) || defined(_AIX52) || defined(_AIX53)) && !(defined(_AIX61)) + #define ss_family __ss_family + #endif + #ifndef WIN32 /* SIG_CHLD handler */ static void proxyreaper(int signo) *** ./ncat/util.c.ORIG Thu Dec 15 22:59:09 2011 --- ./ncat/util.c Thu Dec 15 22:59:19 2011 *************** *** 110,115 **** --- 110,119 ---- #include #endif + #if (defined(_AIX51) || defined(_AIX52) || defined(_AIX53)) && !(defined(_AIX61)) + #define ss_family __ss_family + #endif + /* safely add 2 size_t */ size_t sadd(size_t l, size_t r) { *** ./nping/nping.cc.ORIG Thu Dec 15 23:24:44 2011 --- ./nping/nping.cc Thu Dec 15 23:25:19 2011 *************** *** 88,93 **** --- 88,94 ---- * * ***************************************************************************/ + #include "dnet.h" #include "nping.h" #include "output.h" #include "NpingOps.h" *************** *** 102,108 **** #include "EchoServer.h" #include "ProbeMode.h" #include "common.h" - #include "dnet.h" #include "pcap.h" #include #include --- 103,108 ---- *** ./nping/EchoServer.cc.ORIG Thu Dec 15 23:43:42 2011 --- ./nping/EchoServer.cc Thu Dec 15 23:44:08 2011 *************** *** 98,103 **** --- 98,107 ---- #include "ProbeMode.h" #include + #if (defined(_AIX51) || defined(_AIX52) || defined(_AIX53)) && !(defined(_AIX61)) + #define ss_family __ss_family + #endif + extern NpingOps o; extern EchoServer es; *** ./nping/ProbeMode.cc.ORIG Thu Dec 15 23:45:15 2011 --- ./nping/ProbeMode.cc Thu Dec 15 23:45:30 2011 *************** *** 95,100 **** --- 95,104 ---- #include "NpingOps.h" #include "IPv4Header.h" + #if (defined(_AIX51) || defined(_AIX52) || defined(_AIX53)) && !(defined(_AIX61)) + #define ss_family __ss_family + #endif + extern NpingOps o; *** ./nsock/src/nsock_connect.c.ORIG Tue May 29 23:33:48 2012 --- ./nsock/src/nsock_connect.c Tue May 29 23:34:29 2012 *************** *** 62,67 **** --- 62,71 ---- #include #include + #if (defined(_AIX51) || defined(_AIX52) || defined(_AIX53)) && !(defined(_AIX61)) + #define ss_family __ss_family + #endif + /* Create the actual socket (nse->iod->sd) underlying the iod. This unblocks the * socket, binds to the localaddr address, sets IP options, and sets the * broadcast flag. Trying to change these functions after making this call will *** ./nsock/src/nsock_core.c.ORIG Tue May 29 23:34:52 2012 --- ./nsock/src/nsock_core.c Tue May 29 23:35:24 2012 *************** *** 85,90 **** --- 85,93 ---- #include "nsock_pcap.h" #endif + #if (defined(_AIX51) || defined(_AIX52) || defined(_AIX53)) && !(defined(_AIX61)) + #define ss_family __ss_family + #endif /* Nsock time of day -- we update this at least once per nsock_loop round (and * after most calls that are likely to block). Other nsock files should grab *** ./nsock/src/nsock_write.c.ORIG Tue May 29 23:35:50 2012 --- ./nsock/src/nsock_write.c Tue May 29 23:36:18 2012 *************** *** 62,67 **** --- 62,71 ---- #include #include + #if (defined(_AIX51) || defined(_AIX52) || defined(_AIX53)) && !(defined(_AIX61)) + #define ss_family __ss_family + #endif + nsock_event_id nsock_sendto(nsock_pool ms_pool, nsock_iod ms_iod, nsock_ev_handler handler, int timeout_msecs, void *userdata, struct sockaddr *saddr, size_t sslen, unsigned short port, const char *data, int datalen) { mspool *nsp = (mspool *)ms_pool; *** ./nping/utils_net.cc.ORIG Wed May 30 00:15:05 2012 --- ./nping/utils_net.cc Wed May 30 00:15:19 2012 *************** *** 101,106 **** --- 101,110 ---- #include "dnet.h" #include + #if (defined(_AIX51) || defined(_AIX52) || defined(_AIX53)) && !(defined(_AIX61)) + #define ss_family __ss_family + #endif + extern NpingOps o; int atoIP(const char *hostname, struct in_addr *dst){ *** ./libnetutil/netutil.cc.ORIG Tue May 29 23:37:32 2012 --- ./libnetutil/netutil.cc Wed May 30 00:01:48 2012 *************** *** 119,125 **** /* Define CMSG_* symbols for Solaris 9 and earlier. See http://wiki.opencsw.org/porting-faq#toc10. */ ! #if defined(__sun) || defined(__sun__) # ifndef CMSG_ALIGN # ifdef __sun__ # define CMSG_ALIGN(len) _CMSG_DATA_ALIGN (len) --- 119,125 ---- /* Define CMSG_* symbols for Solaris 9 and earlier. See http://wiki.opencsw.org/porting-faq#toc10. */ ! #if defined(__sun) || defined(__sun__) || (defined(_AIX51) && !defined(_AIX53)) # ifndef CMSG_ALIGN # ifdef __sun__ # define CMSG_ALIGN(len) _CMSG_DATA_ALIGN (len) *************** *** 1183,1189 **** --- 1183,1193 ---- } + #if (defined(_AIX51) || defined(_AIX52) || defined(_AIX53)) && !(defined(_AIX61)) + #define ss_family __ss_family + #endif + /* A trivial function used with qsort to sort the routes by netmask */ static int nmaskcmp(const void *a, const void *b) { struct sys_route *r1 = (struct sys_route *) a; *************** *** 3648,3653 **** --- 3652,3665 ---- return 0; } + + #if defined(_AIX) && !defined(_AIX61) + #define IPV6_HOPLIMIT 40 /* ancillary-only option */ + #define IPV6_RTHDR 50 /* routing header option */ + #define IPV6_HOPOPTS 52 /* Hop-by-Hop Header */ + #define IPV6_DSTOPTS 54 /* Destination Opts Header after Rthdr + or when there is no Rthdr */ + #endif static int exthdr_type_to_cmsg_type(uint8_t type) { switch (type) { *** ./tcpip.cc.ORIG Wed May 30 00:02:18 2012 --- ./tcpip.cc Wed May 30 00:03:40 2012 *************** *** 132,138 **** static PacketCounter PktCt; ! --- 132,140 ---- static PacketCounter PktCt; ! #if (defined(_AIX51) || defined(_AIX52) || defined(_AIX53)) && !(defined(_AIX61)) ! #define ss_family __ss_family ! #endif *** ./osscan2.cc.ORIG Wed May 30 00:04:17 2012 --- ./osscan2.cc Wed May 30 00:04:41 2012 *************** *** 105,110 **** --- 105,114 ---- #include "struct_ip.h" + #if (defined(_AIX51) || defined(_AIX52) || defined(_AIX53)) && !(defined(_AIX61)) + #define ss_family __ss_family + #endif + #include using namespace std; *** ./FPEngine.cc.ORIG Wed May 30 00:05:00 2012 --- ./FPEngine.cc Wed May 30 00:05:16 2012 *************** *** 103,108 **** --- 103,111 ---- #include "linear.h" extern NmapOps o; + #if (defined(_AIX51) || defined(_AIX52) || defined(_AIX53)) && !(defined(_AIX61)) + #define ss_family __ss_family + #endif /****************************************************************************** * Globals. * *** ./output.cc.ORIG Wed May 30 00:05:41 2012 --- ./output.cc Wed May 30 00:05:55 2012 *************** *** 119,124 **** --- 119,128 ---- #include #include + #if (defined(_AIX51) || defined(_AIX52) || defined(_AIX53)) && !(defined(_AIX61)) + #define ss_family __ss_family + #endif + /* Workaround for lack of namespace std on HP-UX 11.00 */ namespace std {}; using namespace std; *** ./scan_engine.cc.ORIG Wed May 30 00:06:24 2012 --- ./scan_engine.cc Wed May 30 00:06:43 2012 *************** *** 115,120 **** --- 115,124 ---- #include #include + #if (defined(_AIX51) || defined(_AIX52) || defined(_AIX53)) && !(defined(_AIX61)) + #define ss_family __ss_family + #endif + using namespace std; extern NmapOps o; class UltraScanInfo; *** ./portlist.cc.ORIG Wed May 30 00:08:51 2012 --- ./portlist.cc Wed May 30 00:09:10 2012 *************** *** 103,108 **** --- 103,112 ---- #include "tcpip.h" #include "libnetutil/netutil.h" + #if (defined(_AIX51) || defined(_AIX52) || defined(_AIX53)) && !(defined(_AIX61)) + #define ss_family __ss_family + #endif + using namespace std; #if HAVE_STRINGS_H *** ./NmapOps.cc.ORIG Wed May 30 00:09:24 2012 --- ./NmapOps.cc Wed May 30 00:09:40 2012 *************** *** 101,106 **** --- 101,110 ---- #include "winfix.h" #endif + #if (defined(_AIX51) || defined(_AIX52) || defined(_AIX53)) && !(defined(_AIX61)) + #define ss_family __ss_family + #endif + NmapOps o; NmapOps::NmapOps() { *** ./Target.cc.ORIG Wed May 30 00:09:53 2012 --- ./Target.cc Wed May 30 00:10:04 2012 *************** *** 105,110 **** --- 105,114 ---- #include "utils.h" #include "nmap_error.h" + #if (defined(_AIX51) || defined(_AIX52) || defined(_AIX53)) && !(defined(_AIX61)) + #define ss_family __ss_family + #endif + extern NmapOps o; Target::Target() { *** ./portreasons.cc.ORIG Wed May 30 00:10:21 2012 --- ./portreasons.cc Wed May 30 00:10:33 2012 *************** *** 105,110 **** --- 105,114 ---- #endif #include + #if (defined(_AIX51) || defined(_AIX52) || defined(_AIX53)) && !(defined(_AIX61)) + #define ss_family __ss_family + #endif + extern NmapOps o; class PortList; *** ./nse_dnet.cc.ORIG Wed May 30 00:11:18 2012 --- ./nse_dnet.cc Wed May 30 00:11:37 2012 *************** *** 17,22 **** --- 17,26 ---- #include "lualib.h" } + #if (defined(_AIX51) || defined(_AIX52) || defined(_AIX53)) && !(defined(_AIX61)) + #define ss_family __ss_family + #endif + #include extern NmapOps o; *** ./nse_nmaplib.cc.ORIG Wed May 30 00:11:49 2012 --- ./nse_nmaplib.cc Wed May 30 00:12:02 2012 *************** *** 25,30 **** --- 25,34 ---- #include "nse_nsock.h" #include "nse_dnet.h" + #if (defined(_AIX51) || defined(_AIX52) || defined(_AIX53)) && !(defined(_AIX61)) + #define ss_family __ss_family + #endif + extern NmapOps o; static const char *NSE_PROTOCOL_OP[] = {"tcp", "udp", "sctp", NULL};