[Javanetsim-cvs] IceScan/icesockets iceregex.h, 1.11, 1.12 sock_eth.h, 1.6, 1.7 sock_pcap.h, 1.9, 1
Status: Beta
Brought to you by:
darkkey
From: Alexander B. <da...@us...> - 2006-12-21 13:11:51
|
Update of /cvsroot/javanetsim/IceScan/icesockets In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv20283/icesockets Modified Files: iceregex.h sock_eth.h sock_pcap.h sock_time.h sock_types.h Log Message: Index: sock_types.h =================================================================== RCS file: /cvsroot/javanetsim/IceScan/icesockets/sock_types.h,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -d -r1.25 -r1.26 *** sock_types.h 21 Dec 2006 10:13:53 -0000 1.25 --- sock_types.h 21 Dec 2006 13:11:46 -0000 1.26 *************** *** 4,10 **** #include "sock_win.h" ! #ifndef __CYGWIN__ ! #include <dnet.h> ! #define __WITH_DNET__ 1 #endif --- 4,15 ---- #include "sock_win.h" ! #ifdef WIN32 ! #include "../defwin.h" ! #elif HAVE_CONFIG_H ! #include "../config.h" ! #endif ! ! #ifdef HAVE_LIBDNET ! #include <dnet.h> #endif *************** *** 66,71 **** #include <fcntl.h> - #ifndef WIN32 --- 71,81 ---- #include <fcntl.h> + + #ifdef HAVE_BZERO + #define Bzero(a,b) bzero(a, b) + #else + #define Bzero(a,b) memset(a,0,b); + #endif #ifndef WIN32 *************** *** 73,101 **** #define SOCKET_ERROR -1 typedef int SOCKET; - //#define SOCKET int ! typedef uint16_t my_uint16_t; ! typedef uint32_t my_uint32_t; ! typedef uint8_t my_uint8_t; - #define Bzero(a,b) bzero(a, b) #else - #define Bzero(a,b) memset(a,0,b); - - typedef UINT16 uint16_t; - typedef UINT32 uint32_t; - typedef UINT8 uint8_t; ! typedef UINT16 my_uint16_t; ! typedef UINT32 my_uint32_t; ! typedef UINT8 my_uint8_t; ! typedef UINT16 u_int16_t; //UGLY ! typedef UINT8 u_int8_t; ! typedef UINT16 n_short; ! typedef UINT32 n_long; ! typedef long n_time; //UGLY, need to check... #endif --- 83,108 ---- #define SOCKET_ERROR -1 typedef int SOCKET; ! typedef uint16_t my_uint16_t; ! typedef uint32_t my_uint32_t; ! typedef uint8_t my_uint8_t; #else ! typedef UINT16 uint16_t; ! typedef UINT32 uint32_t; ! typedef UINT8 uint8_t; ! typedef UINT16 my_uint16_t; ! typedef UINT32 my_uint32_t; ! typedef UINT8 my_uint8_t; ! typedef UINT16 u_int16_t; ! typedef UINT8 u_int8_t; ! typedef UINT16 n_short; ! typedef UINT32 n_long; ! ! typedef long n_time; //UGLY, need to check... #endif *************** *** 104,108 **** struct pseudo_header { ! uint32_t src_addr; uint32_t dst_addr; uint8_t zero; --- 111,115 ---- struct pseudo_header { ! uint32_t src_addr; uint32_t dst_addr; uint8_t zero; Index: sock_pcap.h =================================================================== RCS file: /cvsroot/javanetsim/IceScan/icesockets/sock_pcap.h,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** sock_pcap.h 21 Dec 2006 10:13:53 -0000 1.9 --- sock_pcap.h 21 Dec 2006 13:11:46 -0000 1.10 *************** *** 11,15 **** #include "sock_types.h" ! #ifdef __CYGWIN__ //There's no pcap in Cygwin :( typedef int pcap_t; --- 11,15 ---- #include "sock_types.h" ! #ifndef HAVE_LIBPCAP typedef int pcap_t; *************** *** 42,46 **** void close_pcap(pcap_t *p){ } ! #else /* __CYGWIN__ */ pcap_t* init_pcap(int index = 0){ --- 42,47 ---- void close_pcap(pcap_t *p){ } ! ! #else pcap_t* init_pcap(int index = 0){ Index: sock_eth.h =================================================================== RCS file: /cvsroot/javanetsim/IceScan/icesockets/sock_eth.h,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** sock_eth.h 21 Dec 2006 10:13:53 -0000 1.6 --- sock_eth.h 21 Dec 2006 13:11:46 -0000 1.7 *************** *** 2,6 **** #define _iceeth_H ! #ifdef __CYGWIN__ int send_ip_packet(const void *buf, size_t len){ --- 2,6 ---- #define _iceeth_H ! #ifndef HAVE_LIBDNET int send_ip_packet(const void *buf, size_t len){ *************** *** 10,16 **** #else ! #include "queue.h" ! //#include <dnet.h> struct ip_intf { eth_t *eth; --- 10,46 ---- #else ! /* Portions of code below are from libdnet package: ! * Copyright (c) 2000-2004 Dug Song <du...@mo...> ! * All rights reserved, all wrongs reversed. ! * ! * Redistribution and use in source and binary forms, with or without ! * modification, are permitted provided that the following conditions ! * are met: ! * ! * 1. Redistributions of source code must retain the above copyright ! * notice, this list of conditions and the following disclaimer. ! * 2. Redistributions in binary form must reproduce the above copyright ! * notice, this list of conditions and the following disclaimer in the ! * documentation and/or other materials provided with the distribution. ! * 3. The names of the authors and copyright holders may not be used to ! * endorse or promote products derived from this software without ! * specific prior written permission. ! * ! * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, ! * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY ! * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ! * THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, ! * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, ! * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; ! * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, ! * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR ! * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ! * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ! */ ! ! /* start of modified code from libdnet */ + #include "queue.h" + struct ip_intf { eth_t *eth; *************** *** 245,248 **** --- 275,280 ---- } + /* end of modified code from libdnet */ + int send_ip_packet(const void *buf, size_t len){ ip_t *i = i_ip_open(); Index: sock_time.h =================================================================== RCS file: /cvsroot/javanetsim/IceScan/icesockets/sock_time.h,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** sock_time.h 16 Dec 2006 20:44:19 -0000 1.9 --- sock_time.h 21 Dec 2006 13:11:46 -0000 1.10 *************** *** 48,52 **** void icesleep(int secs, int nsecs = 0){ #ifndef WIN32 ! struct timespec ts; ts.tv_sec = secs; --- 48,52 ---- void icesleep(int secs, int nsecs = 0){ #ifndef WIN32 ! struct timespec ts; ts.tv_sec = secs; *************** *** 54,58 **** nanosleep (&ts, NULL); #else ! usleep(secs + nsecs * 1000); #endif } --- 54,58 ---- nanosleep (&ts, NULL); #else ! usleep(secs + nsecs * 1000); #endif } Index: iceregex.h =================================================================== RCS file: /cvsroot/javanetsim/IceScan/icesockets/iceregex.h,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** iceregex.h 17 Dec 2006 21:03:17 -0000 1.11 --- iceregex.h 21 Dec 2006 13:11:46 -0000 1.12 *************** *** 11,15 **** #include "sock_types.h" ! #ifdef __NO_LIBPCRE__ class IceRegex { --- 11,15 ---- #include "sock_types.h" ! #ifdef HAVE_LIBPCRE class IceRegex { |