|
From: <xb...@us...> - 2012-10-31 11:11:36
|
Revision: 1497
http://scstudio.svn.sourceforge.net/scstudio/?rev=1497&view=rev
Author: xborza
Date: 2012-10-31 11:11:24 +0000 (Wed, 31 Oct 2012)
Log Message:
-----------
updated pcap --> not check if works on both platforms
Modified Paths:
--------------
trunk/CMakeLists.txt
trunk/src/data/pcap/CMakeLists.txt
trunk/src/data/pcap/application_layer.h
trunk/src/data/pcap/flow_stats.h
trunk/src/data/pcap/pcap_load.cpp
trunk/src/data/pcap/pcap_load.h
trunk/src/data/pcap/pcap_struct.cpp
trunk/src/data/pcap/pcap_struct.h
trunk/src/data/pcap/transport_layer.h
trunk/tests/pcap/pcap_test.cpp
trunk/third-party-sw/http_parser/CMakeLists.txt
trunk/third-party-sw/http_parser/Makefile
trunk/third-party-sw/libosip2-3.6.0/CMakeLists.txt
trunk/third-party-sw/libosip2-3.6.0/src/osipparser2/osip_port.c
Modified: trunk/CMakeLists.txt
===================================================================
--- trunk/CMakeLists.txt 2012-10-30 11:11:11 UTC (rev 1496)
+++ trunk/CMakeLists.txt 2012-10-31 11:11:24 UTC (rev 1497)
@@ -84,11 +84,11 @@
#pcap setup
OPTION(BUILD_PCAP "Enable to build the PCAP import module" OFF)
+#SET(BUILD_PCAP ON)
IF(BUILD_PCAP)
- SET(OSIP_ROOT "${CMAKE_SOURCE_DIR}/third-party-sw/libosip2-3.6.0" CACHE PATH
- "The SIP parser root." )
+ MESSAGE("BUILD PCAP")
+ SET(OSIP_ROOT "${CMAKE_SOURCE_DIR}/third-party-sw/libosip2-3.6.0" CACHE PATH "The SIP parser root." )
ADD_SUBDIRECTORY(${OSIP_ROOT})
-
SET(HTTP_ROOT "${CMAKE_SOURCE_DIR}/third-party-sw/http_parser" CACHE PATH
"The HTTP parser root.")
ADD_SUBDIRECTORY(${HTTP_ROOT})
Modified: trunk/src/data/pcap/CMakeLists.txt
===================================================================
--- trunk/src/data/pcap/CMakeLists.txt 2012-10-30 11:11:11 UTC (rev 1496)
+++ trunk/src/data/pcap/CMakeLists.txt 2012-10-31 11:11:24 UTC (rev 1497)
@@ -23,18 +23,14 @@
pcap_struct.cpp
pcap_load.h
pcap_load.cpp
-# arp.cpp
-# ethernet.cpp
-# icmp.cpp
-# ip.cpp
-# tcp.cpp
-# udp.cpp
)
+SET(LINKED_LIBRARIES scmsc ${PCAP_LIBRARY} http_parser osipparser2)
+
+IF(WIN32)
+ LIST(APPEND LINKED_LIBRARIES ws2_32)
+ENDIF(WIN32)
+
TARGET_LINK_LIBRARIES(scpcap
- scmsc
- ws2_32
- ${PCAP_LIBRARY}
- http_parser
- osipparser2
+ ${LINKED_LIBRARIES}
)
Modified: trunk/src/data/pcap/application_layer.h
===================================================================
--- trunk/src/data/pcap/application_layer.h 2012-10-30 11:11:11 UTC (rev 1496)
+++ trunk/src/data/pcap/application_layer.h 2012-10-31 11:11:24 UTC (rev 1497)
@@ -135,7 +135,7 @@
stringify( HEADERS_COMPLETE ),
stringify( DATA_PART ),
stringify( DATA_COMPLETE ),
- stringify( ALL_DATA )
+ stringify( ALL_DATA )
};
struct HttpHeader {
@@ -167,16 +167,16 @@
bool message_complete;
inline bool operator<(const HttpMessage &other) const
- {
- return (abs(tcp_id) < abs(other.tcp_id));
- }
+ {
+ return tcp_id < other.tcp_id;
+ }
inline bool operator==(const HttpMessage &other) const
{
- return (abs(tcp_id) == abs(other.tcp_id));
+ return tcp_id == other.tcp_id;
}
inline bool operator!=(const HttpMessage &other) const
{
- return (abs(tcp_id) != abs(other.tcp_id));
+ return tcp_id != other.tcp_id;
}
};
Modified: trunk/src/data/pcap/flow_stats.h
===================================================================
--- trunk/src/data/pcap/flow_stats.h 2012-10-30 11:11:11 UTC (rev 1496)
+++ trunk/src/data/pcap/flow_stats.h 2012-10-31 11:11:24 UTC (rev 1497)
@@ -16,7 +16,7 @@
#undef max
#endif
-typedef std::pair<u_short,InstancePtr> num_inst_pair;
+typedef std::pair<short,InstancePtr> num_inst_pair;
typedef std::pair<u_long,u_long> time_pair;
typedef enum {
@@ -256,4 +256,4 @@
std::string get_smart_label();
};
-#endif
\ No newline at end of file
+#endif
Modified: trunk/src/data/pcap/pcap_load.cpp
===================================================================
--- trunk/src/data/pcap/pcap_load.cpp 2012-10-30 11:11:11 UTC (rev 1496)
+++ trunk/src/data/pcap/pcap_load.cpp 2012-10-31 11:11:24 UTC (rev 1497)
@@ -49,126 +49,28 @@
struct bpf_program fcode;
- /* Retrieve the device list */
- if (pcap_findalldevs_ex(PCAP_SRC_IF_STRING, NULL, &alldevs, errbuf) == -1)
- {
- fprintf(stderr,"Error in pcap_findalldevs: %s\n", errbuf);
- exit(1);
- }
-
- /* Print the list */
- for(d=alldevs; d; d=d->next)
- {
- printf("%d. %s", ++i, d->name);
- if (d->description)
- printf(" (%s)\n", d->description);
- else
- printf(" (No description available)\n");
- }
- if(i==0)
+ // OPEN OFFLINE MODE
+ if((adhandle = pcap_open_offline(filename.c_str(),errbuf)) == NULL)
{
- printf("\nNo interfaces found! Make sure WinPcap is installed.\n");
+ std::cout << "ERROR: Cannot open pcap file >" << filename << " < , wrong name!\n";
return result;
}
- printf("Enter the interface number (1-%d) or press 0 choose offline mode:",i);
- scanf_s("%d", &inum);
-
- if(inum < 0 || inum > i)
+ /* Check the link layer. We support only Ethernet for simplicity. */
+ if(pcap_datalink(adhandle) != DLT_EN10MB)
{
- printf("\nInterface number out of range.\n");
- /* Free the device list */
- pcap_freealldevs(alldevs);
- return result;
+ printf("This program works only on Ethernet networks.\n");
+ return result;
}
-
- if(inum != 0){ // online mode
- //show info about device :
- //--------------------------------------------------------------------------------------------
- pcap_addr_t *a;
- char ip6str[128];
-
- for(a=d->addresses;a;a=a->next) {
- printf("\tAddress Family: #%d\n",a->addr->sa_family);
-
- switch(a->addr->sa_family)
- {
- case AF_INET:
- printf("\tAddress Family Name: AF_INET\n");
- if (a->addr)
- printf("\tAddress: %s\n",iptos(((struct sockaddr_in *)a->addr)->sin_addr.s_addr));
- if (a->netmask)
- printf("\tNetmask: %s\n",iptos(((struct sockaddr_in *)a->netmask)->sin_addr.s_addr));
- if (a->broadaddr)
- printf("\tBroadcast Address: %s\n",iptos(((struct sockaddr_in *)a->broadaddr)->sin_addr.s_addr));
- if (a->dstaddr)
- printf("\tDestination Address: %s\n",iptos(((struct sockaddr_in *)a->dstaddr)->sin_addr.s_addr));
- break;
-
- case AF_INET6:
- printf("\tAddress Family Name: AF_INET6\n");
- if (a->addr)
- printf("\tAddress: %s\n", ip6tos(a->addr, ip6str, sizeof(ip6str)));
- break;
-
- default:
- printf("\tAddress Family Name: Unknown\n");
- break;
- }
- }
- //--------------------------------------------------------------------------------------------
+ /* If the interface is without addresses we suppose to be in a C class network */
+ netmask=0xffffff;
- /* Jump to the selected adapter */
- for(d=alldevs, i=0; i< inum-1 ;d=d->next, i++);
-
- /* Open the adapter */
- if ( (adhandle= pcap_open(d->name, // name of the device
- 65536, // portion of the packet to capture.
- // 65536 grants that the whole packet will be captured on all the MACs.
- PCAP_OPENFLAG_PROMISCUOUS, // promiscuous mode
- 1000, // read timeout
- NULL, // remote authentication
- errbuf // error buffer
- ) ) == NULL)
- {
- fprintf(stderr,"\nUnable to open the adapter. %s is not supported by WinPcap\n");
- /* Free the device list */
- pcap_freealldevs(alldevs);
- return result;
- }
- }
- else{ // OPEN OFFLINE MODE
- if((adhandle = pcap_open_offline(filename.c_str(),errbuf)) == NULL){
- std::cout << "ERROR: Cannot open pcap file >" << filename << " < , wrong name!\n";
- return result;
- }
- }
-
- /* Check the link layer. We support only Ethernet for simplicity. */
- if(pcap_datalink(adhandle) != DLT_EN10MB)
- {
- fprintf(stderr,"\nThis program works only on Ethernet networks.\n");
- /* Free the device list */
- pcap_freealldevs(alldevs);
- return result;
- }
-
-
- if(inum != 0 && d->addresses != NULL)
- /* Retrieve the mask of the first address of the interface */
- netmask=((struct sockaddr_in *)(d->addresses->netmask))->sin_addr.S_un.S_addr;
- else
- /* If the interface is without addresses we suppose to be in a C class network */
- netmask=0xffffff;
-
//compile the filter
if (pcap_compile(adhandle, &fcode, packet_filter, 1, netmask) <0 )
{
fprintf(stderr,"\nUnable to compile the packet filter. Check the syntax.\n");
- /* Free the device list */
- pcap_freealldevs(alldevs);
return result;
}
@@ -176,20 +78,14 @@
if (pcap_setfilter(adhandle, &fcode)<0)
{
fprintf(stderr,"\nError setting the filter.\n");
- /* Free the device list */
- pcap_freealldevs(alldevs);
return result;
}
- printf("\nlistening on %s...\n", (inum == 0) ? "OFFLINE" : d->description);
- /* At this point, we don't need any more the device list. Free it */
- pcap_freealldevs(alldevs);
-
/* start the capture */
//-------------------------------------------------------------------------------------
ParseSettings* settings = new ParseSettings();
- settings->parse_layer = APP_LAYER;
+ settings->parse_layer = IP_LAYER;
settings->show_timestamps = false;
FlowSettings* f_settings = new FlowSettings();
@@ -199,7 +95,7 @@
f_settings->show_packet_count = true;
//---------------------------------------------------------------------------------------------
- PcapContext* pcapCon = new PcapContext(settings,new FlowControl(f_settings));
+ PcapContext* pcapCon = new PcapContext(settings/*,new FlowControl(f_settings)*/);
//---------------------------------------------------------------------------------------------
handStruct hands;
hands.pcap = pcapCon;
@@ -221,41 +117,4 @@
return result;
}
-char *iptos(u_long in)
-{
- static char output[IPTOSBUFFERS][3*4+3+1];
- static short which;
- u_char *p;
-
- p = (u_char *)∈
- which = (which + 1 == IPTOSBUFFERS ? 0 : which + 1);
- _snprintf_s(output[which], sizeof(output[which]), sizeof(output[which]),"%d.%d.%d.%d", p[0], p[1], p[2], p[3]);
- return output[which];
-}
-
-char* ip6tos(struct sockaddr *sockaddr, char *address, int addrlen)
-{
- socklen_t sockaddrlen;
-
- #ifdef WIN32
- sockaddrlen = sizeof(struct sockaddr_in6);
- #else
- sockaddrlen = sizeof(struct sockaddr_storage);
- #endif
-
- if(getnameinfo(sockaddr,
- sockaddrlen,
- address,
- addrlen,
- NULL,
- 0,
- NI_NUMERICHOST) != 0) address = NULL;
-
- return address;
-}
-
-
-
-
-
// $Id$
Modified: trunk/src/data/pcap/pcap_load.h
===================================================================
--- trunk/src/data/pcap/pcap_load.h 2012-10-30 11:11:11 UTC (rev 1496)
+++ trunk/src/data/pcap/pcap_load.h 2012-10-31 11:11:24 UTC (rev 1497)
@@ -23,9 +23,13 @@
#define uint16_t UINT16
#define uint32_t UINT32
-//#include <WinSock2.h>
-//#define NOMINMAX // for using MIN and MAX from algorithm
-//#include <Windows.h>
+#include <WinSock2.h> // edited in Linux
+#define NOMINMAX // for using MIN and MAX from algorithm
+#include <Windows.h> // edited in Linux
+
+#else
+#include <arpa/inet.h>
+
#endif
//#include "pcap_struct.h"
@@ -72,9 +76,6 @@
int inspect_udp(const PacketDataUnit& packet);
};
+#endif
-char *iptos(u_long in);
-char* ip6tos(struct sockaddr *sockaddr, char *address, int addrlen);
-#endif _SCPCAP_PCAP_IMPORT_H_
-
// $Id$
Modified: trunk/src/data/pcap/pcap_struct.cpp
===================================================================
--- trunk/src/data/pcap/pcap_struct.cpp 2012-10-30 11:11:11 UTC (rev 1496)
+++ trunk/src/data/pcap/pcap_struct.cpp 2012-10-31 11:11:24 UTC (rev 1497)
@@ -30,26 +30,28 @@
void PcapContext::diagram_update(int pckt_id,std::string src,std::string dst,std::string label,u_long timestamp,spec_data f_data){
- num_inst_pair* src_pair;
- num_inst_pair* dst_pair;
+ num_inst_pair src_pair;
+ num_inst_pair dst_pair;
+ src_pair = get_num_inst(src);
+ dst_pair = get_num_inst(dst);
- if((src_pair = get_num_inst(src)) == NULL)
- src_pair = &create_instance(src);
+ if(src_pair.first == -1)
+ src_pair = create_instance(src);
- if((dst_pair = get_num_inst(dst)) == NULL)
- dst_pair = &create_instance(dst);
+ if(dst_pair.first == -1)
+ dst_pair = create_instance(dst);
if(flow_control == NULL) // classic_diagram_update
{
- EventPtr e1 = src_pair->second->get_last()->add_event();
- EventPtr e2 = dst_pair->second->get_last()->add_event();
+ EventPtr e1 = src_pair.second->get_last()->add_event();
+ EventPtr e2 = dst_pair.second->get_last()->add_event();
add_new_message(e1,e2,label,timestamp,true);
}
else // flow diagram update
{
std::vector<flow_output> messages;
- messages = flow_control->update_flow(pckt_id,*src_pair,*dst_pair,f_data,timestamp,label);
+ messages = flow_control->update_flow(pckt_id,src_pair,dst_pair,f_data,timestamp,label);
// add messages to diagram --> TODO map and function
for(u_short i=0; i < messages.size();i++)
@@ -177,22 +179,26 @@
instance->add_area(new StrictOrderArea());
msc->add_instance(instance);
- add_pair = std::make_pair(inst_count,instance);
+ add_pair.first = inst_count;
+ add_pair.second = instance;
- instance_map.insert(std::pair<std::string,num_inst_pair>(address, add_pair));
+ instance_map.insert(std::pair<std::string,num_inst_pair>(address, add_pair));
inst_count++;
return add_pair;
}
-num_inst_pair* PcapContext::get_num_inst(std::string address){
+num_inst_pair PcapContext::get_num_inst(std::string address){
std::map<std::string,num_inst_pair>::iterator instance_iter;
instance_iter = instance_map.find(address);
if(instance_iter == instance_map.end())
- return NULL;
+ {
+ InstancePtr inst = NULL;
+ return std::make_pair(-1,inst);
+ }
else
- return &instance_iter->second;
+ return instance_iter->second;
}
void packet_handler(u_char *param, const struct pcap_pkthdr *header, const u_char *pkt_data){
@@ -232,7 +238,7 @@
/* convert the timestamp to readable format */
local_tv_sec = header->ts.tv_sec;
- localtime_s(<ime, &local_tv_sec);
+ localtime_r(&local_tv_sec, <ime);
strftime( timestr, sizeof timestr, "%H:%M:%S", <ime);
Modified: trunk/src/data/pcap/pcap_struct.h
===================================================================
--- trunk/src/data/pcap/pcap_struct.h 2012-10-30 11:11:11 UTC (rev 1496)
+++ trunk/src/data/pcap/pcap_struct.h 2012-10-31 11:11:24 UTC (rev 1497)
@@ -85,9 +85,9 @@
void add_new_message(EventPtr src_e,EventPtr dst_e,std::string label,u_long timestamp = 0,bool set_all_times = true);
- num_inst_pair create_instance(std::string address);
+ num_inst_pair create_instance(std::string address);
- num_inst_pair* get_num_inst(std::string address);
+ num_inst_pair get_num_inst(std::string address);
};
typedef struct handStruct{
Modified: trunk/src/data/pcap/transport_layer.h
===================================================================
--- trunk/src/data/pcap/transport_layer.h 2012-10-30 11:11:11 UTC (rev 1496)
+++ trunk/src/data/pcap/transport_layer.h 2012-10-31 11:11:24 UTC (rev 1497)
@@ -101,7 +101,7 @@
#define stringify( name ) # name
-char* const flagsNames[] =
+static const char* flagsNames[] =
{
stringify( FIN ),
stringify( FIN_ACK ),
@@ -314,4 +314,4 @@
std::string message();
};
-#endif
\ No newline at end of file
+#endif
Modified: trunk/tests/pcap/pcap_test.cpp
===================================================================
--- trunk/tests/pcap/pcap_test.cpp 2012-10-30 11:11:11 UTC (rev 1496)
+++ trunk/tests/pcap/pcap_test.cpp 2012-10-31 11:11:24 UTC (rev 1497)
@@ -70,14 +70,14 @@
std::vector<MscPtr> msc = pcap.load_msc(argv[1]);
- char *path = _strdup(argv[1]);
+ char *path = strdup(argv[1]);
char *filename = extract_filename(path);
- char *path2 = _strdup(argv[2]);
+ char *path2 = strdup(argv[2]);
std::string outmsc;
outmsc.append(argv[2]);
outmsc.append(".mpr");
- outFile.open(outmsc);
+ outFile.open(outmsc.c_str());
if(!msc.empty())
Modified: trunk/third-party-sw/http_parser/CMakeLists.txt
===================================================================
--- trunk/third-party-sw/http_parser/CMakeLists.txt 2012-10-30 11:11:11 UTC (rev 1496)
+++ trunk/third-party-sw/http_parser/CMakeLists.txt 2012-10-31 11:11:24 UTC (rev 1497)
@@ -1,10 +1,10 @@
-ADD_LIBRARY(http_parser STATIC
+ADD_LIBRARY(http_parser SHARED
http_parser.h
http_parser.c
)
-set_target_properties(http_parser PROPERTIES
- LIBRARY_OUTPUT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/lib)
+#set_target_properties(http_parser PROPERTIES
+ #LIBRARY_OUTPUT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/lib)
Modified: trunk/third-party-sw/http_parser/Makefile
===================================================================
--- trunk/third-party-sw/http_parser/Makefile 2012-10-30 11:11:11 UTC (rev 1496)
+++ trunk/third-party-sw/http_parser/Makefile 2012-10-31 11:11:24 UTC (rev 1497)
@@ -1,64 +1,217 @@
-CC?=gcc
-AR?=ar
+# CMAKE generated file: DO NOT EDIT!
+# Generated by "Unix Makefiles" Generator, CMake Version 2.8
-CPPFLAGS += -I.
-CPPFLAGS_DEBUG = $(CPPFLAGS) -DHTTP_PARSER_STRICT=1 -DHTTP_PARSER_DEBUG=1
-CPPFLAGS_DEBUG += $(CPPFLAGS_DEBUG_EXTRA)
-CPPFLAGS_FAST = $(CPPFLAGS) -DHTTP_PARSER_STRICT=0 -DHTTP_PARSER_DEBUG=0
-CPPFLAGS_FAST += $(CPPFLAGS_FAST_EXTRA)
+# Default target executed when no arguments are given to make.
+default_target: all
+.PHONY : default_target
-CFLAGS += -Wall -Wextra -Werror
-CFLAGS_DEBUG = $(CFLAGS) -O0 -g $(CFLAGS_DEBUG_EXTRA)
-CFLAGS_FAST = $(CFLAGS) -O3 $(CFLAGS_FAST_EXTRA)
-CFLAGS_LIB = $(CFLAGS_FAST) -fPIC
+#=============================================================================
+# Special targets provided by cmake.
-test: test_g test_fast
- ./test_g
- ./test_fast
+# Disable implicit rules so canonical targets will work.
+.SUFFIXES:
-test_g: http_parser_g.o test_g.o
- $(CC) $(CFLAGS_DEBUG) $(LDFLAGS) http_parser_g.o test_g.o -o $@
+# Remove some rules from gmake that .SUFFIXES does not remove.
+SUFFIXES =
-test_g.o: test.c http_parser.h Makefile
- $(CC) $(CPPFLAGS_DEBUG) $(CFLAGS_DEBUG) -c test.c -o $@
+.SUFFIXES: .hpux_make_needs_suffix_list
-http_parser_g.o: http_parser.c http_parser.h Makefile
- $(CC) $(CPPFLAGS_DEBUG) $(CFLAGS_DEBUG) -c http_parser.c -o $@
+# Suppress display of executed commands.
+$(VERBOSE).SILENT:
-test_fast: http_parser.o test.o http_parser.h
- $(CC) $(CFLAGS_FAST) $(LDFLAGS) http_parser.o test.o -o $@
+# A target that is always out of date.
+cmake_force:
+.PHONY : cmake_force
-test.o: test.c http_parser.h Makefile
- $(CC) $(CPPFLAGS_FAST) $(CFLAGS_FAST) -c test.c -o $@
+#=============================================================================
+# Set environment variables for the build.
-url_parser: http_parser_g.o url_parser.o
- $(CC) $(CFLAGS_DEBUG) $(LDFLAGS) http_parser_g.o url_parser.o -o $@
+# The shell in which to execute make rules.
+SHELL = /bin/sh
-url_parser.o: url_parser.c http_parser.h Makefile
- $(CC) $(CPPFLAGS_DEBUG) $(CFLAGS_DEBUG) -c url_parser.c -o $@
+# The CMake executable.
+CMAKE_COMMAND = /usr/bin/cmake
-http_parser.o: http_parser.c http_parser.h Makefile
- $(CC) $(CPPFLAGS_FAST) $(CFLAGS_FAST) -c http_parser.c
+# The command to remove a file.
+RM = /usr/bin/cmake -E remove -f
-test-run-timed: test_fast
- while(true) do time ./test_fast > /dev/null; done
+# The top-level source directory on which CMake was run.
+CMAKE_SOURCE_DIR = /home/viktor/scstudio/trunk
-test-valgrind: test_g
- valgrind ./test_g
+# The top-level build directory on which CMake was run.
+CMAKE_BINARY_DIR = /home/viktor/scstudio/trunk
-libhttp_parser.o: http_parser.c http_parser.h Makefile
- $(CC) $(CPPFLAGS_FAST) $(CFLAGS_LIB) -c http_parser.c -o libhttp_parser.o
+#=============================================================================
+# Targets provided globally by CMake.
-library: libhttp_parser.o
- $(CC) -shared -o libhttp_parser.so libhttp_parser.o
+# Special rule for the target edit_cache
+edit_cache:
+ @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running interactive CMake command-line interface..."
+ /usr/bin/cmake -i .
+.PHONY : edit_cache
-package: http_parser.o
- $(AR) rcs libhttp_parser.a http_parser.o
+# Special rule for the target edit_cache
+edit_cache/fast: edit_cache
+.PHONY : edit_cache/fast
-tags: http_parser.c http_parser.h test.c
- ctags $^
+# Special rule for the target install
+install: preinstall
+ @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Install the project..."
+ /usr/bin/cmake -P cmake_install.cmake
+.PHONY : install
+# Special rule for the target install
+install/fast: preinstall/fast
+ @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Install the project..."
+ /usr/bin/cmake -P cmake_install.cmake
+.PHONY : install/fast
+
+# Special rule for the target install/local
+install/local: preinstall
+ @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Installing only the local directory..."
+ /usr/bin/cmake -DCMAKE_INSTALL_LOCAL_ONLY=1 -P cmake_install.cmake
+.PHONY : install/local
+
+# Special rule for the target install/local
+install/local/fast: install/local
+.PHONY : install/local/fast
+
+# Special rule for the target install/strip
+install/strip: preinstall
+ @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Installing the project stripped..."
+ /usr/bin/cmake -DCMAKE_INSTALL_DO_STRIP=1 -P cmake_install.cmake
+.PHONY : install/strip
+
+# Special rule for the target install/strip
+install/strip/fast: install/strip
+.PHONY : install/strip/fast
+
+# Special rule for the target list_install_components
+list_install_components:
+ @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Available install components are: \"Unspecified\""
+.PHONY : list_install_components
+
+# Special rule for the target list_install_components
+list_install_components/fast: list_install_components
+.PHONY : list_install_components/fast
+
+# Special rule for the target rebuild_cache
+rebuild_cache:
+ @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running CMake to regenerate build system..."
+ /usr/bin/cmake -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR)
+.PHONY : rebuild_cache
+
+# Special rule for the target rebuild_cache
+rebuild_cache/fast: rebuild_cache
+.PHONY : rebuild_cache/fast
+
+# Special rule for the target test
+test:
+ @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running tests..."
+ /usr/bin/ctest --force-new-ctest-process $(ARGS)
+.PHONY : test
+
+# Special rule for the target test
+test/fast: test
+.PHONY : test/fast
+
+# The main all target
+all: cmake_check_build_system
+ cd /home/viktor/scstudio/trunk && $(CMAKE_COMMAND) -E cmake_progress_start /home/viktor/scstudio/trunk/CMakeFiles /home/viktor/scstudio/trunk/third-party-sw/http_parser/CMakeFiles/progress.marks
+ cd /home/viktor/scstudio/trunk && $(MAKE) -f CMakeFiles/Makefile2 third-party-sw/http_parser/all
+ $(CMAKE_COMMAND) -E cmake_progress_start /home/viktor/scstudio/trunk/CMakeFiles 0
+.PHONY : all
+
+# The main clean target
clean:
- rm -f *.o *.a test test_fast test_g url_parser http_parser.tar tags libhttp_parser.so libhttp_parser.o
+ cd /home/viktor/scstudio/trunk && $(MAKE) -f CMakeFiles/Makefile2 third-party-sw/http_parser/clean
+.PHONY : clean
-.PHONY: clean package test-run test-run-timed test-valgrind
+# The main clean target
+clean/fast: clean
+.PHONY : clean/fast
+
+# Prepare targets for installation.
+preinstall: all
+ cd /home/viktor/scstudio/trunk && $(MAKE) -f CMakeFiles/Makefile2 third-party-sw/http_parser/preinstall
+.PHONY : preinstall
+
+# Prepare targets for installation.
+preinstall/fast:
+ cd /home/viktor/scstudio/trunk && $(MAKE) -f CMakeFiles/Makefile2 third-party-sw/http_parser/preinstall
+.PHONY : preinstall/fast
+
+# clear depends
+depend:
+ cd /home/viktor/scstudio/trunk && $(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 1
+.PHONY : depend
+
+# Convenience name for target.
+third-party-sw/http_parser/CMakeFiles/http_parser.dir/rule:
+ cd /home/viktor/scstudio/trunk && $(MAKE) -f CMakeFiles/Makefile2 third-party-sw/http_parser/CMakeFiles/http_parser.dir/rule
+.PHONY : third-party-sw/http_parser/CMakeFiles/http_parser.dir/rule
+
+# Convenience name for target.
+http_parser: third-party-sw/http_parser/CMakeFiles/http_parser.dir/rule
+.PHONY : http_parser
+
+# fast build rule for target.
+http_parser/fast:
+ cd /home/viktor/scstudio/trunk && $(MAKE) -f third-party-sw/http_parser/CMakeFiles/http_parser.dir/build.make third-party-sw/http_parser/CMakeFiles/http_parser.dir/build
+.PHONY : http_parser/fast
+
+http_parser.o: http_parser.c.o
+.PHONY : http_parser.o
+
+# target to build an object file
+http_parser.c.o:
+ cd /home/viktor/scstudio/trunk && $(MAKE) -f third-party-sw/http_parser/CMakeFiles/http_parser.dir/build.make third-party-sw/http_parser/CMakeFiles/http_parser.dir/http_parser.c.o
+.PHONY : http_parser.c.o
+
+http_parser.i: http_parser.c.i
+.PHONY : http_parser.i
+
+# target to preprocess a source file
+http_parser.c.i:
+ cd /home/viktor/scstudio/trunk && $(MAKE) -f third-party-sw/http_parser/CMakeFiles/http_parser.dir/build.make third-party-sw/http_parser/CMakeFiles/http_parser.dir/http_parser.c.i
+.PHONY : http_parser.c.i
+
+http_parser.s: http_parser.c.s
+.PHONY : http_parser.s
+
+# target to generate assembly for a file
+http_parser.c.s:
+ cd /home/viktor/scstudio/trunk && $(MAKE) -f third-party-sw/http_parser/CMakeFiles/http_parser.dir/build.make third-party-sw/http_parser/CMakeFiles/http_parser.dir/http_parser.c.s
+.PHONY : http_parser.c.s
+
+# Help Target
+help:
+ @echo "The following are some of the valid targets for this Makefile:"
+ @echo "... all (the default if no target is provided)"
+ @echo "... clean"
+ @echo "... depend"
+ @echo "... edit_cache"
+ @echo "... http_parser"
+ @echo "... install"
+ @echo "... install/local"
+ @echo "... install/strip"
+ @echo "... list_install_components"
+ @echo "... rebuild_cache"
+ @echo "... test"
+ @echo "... http_parser.o"
+ @echo "... http_parser.i"
+ @echo "... http_parser.s"
+.PHONY : help
+
+
+
+#=============================================================================
+# Special targets to cleanup operation of make.
+
+# Special rule to run CMake to check the build system integrity.
+# No rule that depends on this can have commands that come from listfiles
+# because they might be regenerated.
+cmake_check_build_system:
+ cd /home/viktor/scstudio/trunk && $(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 0
+.PHONY : cmake_check_build_system
+
Modified: trunk/third-party-sw/libosip2-3.6.0/CMakeLists.txt
===================================================================
--- trunk/third-party-sw/libosip2-3.6.0/CMakeLists.txt 2012-10-30 11:11:11 UTC (rev 1496)
+++ trunk/third-party-sw/libosip2-3.6.0/CMakeLists.txt 2012-10-31 11:11:24 UTC (rev 1497)
@@ -2,8 +2,7 @@
INCLUDE_DIRECTORIES(include)
-ADD_LIBRARY(osipparser2 STATIC
- ${HEADERS}
+ADD_LIBRARY(osipparser2 SHARED
${SOURCES}
)
Modified: trunk/third-party-sw/libosip2-3.6.0/src/osipparser2/osip_port.c
===================================================================
--- trunk/third-party-sw/libosip2-3.6.0/src/osipparser2/osip_port.c 2012-10-30 11:11:11 UTC (rev 1496)
+++ trunk/third-party-sw/libosip2-3.6.0/src/osipparser2/osip_port.c 2012-10-31 11:11:24 UTC (rev 1497)
@@ -35,9 +35,9 @@
#ifdef HAVE_SYS_STAT_H
#include <sys/stat.h>
#endif
-#ifdef HAVE_FCNTL_H
+//#ifdef HAVE_FCNTL_H // MY chabnge - O_RDNOLY
#include <fcntl.h>
-#endif
+//#endif
#ifdef HAVE_CTYPE_H
#include <ctype.h>
@@ -230,6 +230,7 @@
gettimeofday(&tv, NULL);
ticks = tv.tv_sec + tv.tv_usec;
+
fd = open("/dev/urandom", O_RDONLY);
if (fd > 0) {
unsigned int r;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|