valerio.click
Joined: Thu May 23, 2013 9:28 pm Posts: 1
|
 Compiling xplico-1.0.1 from source - minor issues
Hi all, I recently discover xplico and I would like to express my gratitude to all developers for maintaining such an excellent open-source project!! Going back to my post, I found some minor issues in compililing xplico-1.0.1 from source, in what follows I report the issues together with workarounds: ISSUE 1when I type "make" to compile xplico the process fails because it cannot find the variable NDPI_PROTOCOL_LONG_STRING. Apparently, this variable is defined in xt_ndpi.h located in nDPI/ndpi-netfilter but not included in the xplico compilation process. As a workaround I included into nDPI/src/include/ndpi_api.h what follows: Code: #ifndef NDPI_PROTOCOL_LONG_STRING #define NDPI_PROTOCOL_LONG_STRING "Unknown","FTP","POP","SMTP","IMAP","DNS","IPP","HTTP","MDNS","NTP","NETBIOS",\ "NFS","SSDP","BGP","SNMP","XDMCP","SMB","SYSLOG","DHCP","PostgreSQL","MySQL",\ "TDS","DirectDownloadLink","I23V5","AppleJuice","DirectConnect","Socrates","WinMX","MANOLITO","PANDO","Filetopia",\ "iMESH","Kontiki","OpenFT","Kazaa","Gnutella","eDonkey","Bittorrent","OFF","AVI","Flash",\ "OGG","MPEG","QuickTime","RealMedia","Windowsmedia","MMS","XBOX","QQ","MOVE","RTSP",\ "Feidian","Icecast","PPLive","PPStream","Zattoo","SHOUTCast","SopCast","TVAnts","TVUplayer","VeohTV",\ "QQLive","Thunder","Soulseek","GaduGadu","IRC","Popo","Jabber","MSN","Oscar","Yahoo",\ "Battlefield","Quake","Second_Life","Steam","Halflife2","World_of_Warcraft","Telnet","STUN","IPSEC","GRE",\ "ICMP","IGMP","EGP","SCTP","OSPF","IP_in_IP","RTP","RDP","VNC","PCAnywhere",\ "SSL","SSH","USENET","MGCP","IAX","TFTP","AFP","StealthNet","Aimini","SIP",\ "Truphone","ICMPv6","DHCPv6","Armagetron","CrossFire","Dofus","Fiesta","Florensia","Guildwars","HTTP_Application_Activesync",\ "Kerberos","LDAP","MapleStory","msSQL","PPTP","WARCRAFT3","World_of_Kung_Fu","MEEBO","FaceBook","Twitter",\ "DropBox","Gmail","Google_Maps","YouTube","Skype","Google","DCE_RPC","NetFlow_IPFIX","sFlow","HTTP_Connect_SSL_over_HTTP",\ "HTTP_Proxy","Citrix","Netflix","LastFM","Grooveshark","SkyFile_Prepaid","SkyFile_Rudics","SkyFile_Postpaid","CitrixOnline","Apple_iMessage_FaceTime",\ "Webex","WhatsApp","Apple_iCloud","Viber","Apple_iTunes","Radius","Windows_Update","TeamViewer","Tuenti","Lotus_Notes",\ "SAP","GTP","uPnP","LLMNR","Remote_Scan" #endif ISSUE 2the workaround reported in ISSUE 1 is not sufficient to compile xplico-1.0.1. In fact the make outputs the following error Code: tcp_garbage.c:645:5: warning: passing argument 3 of ‘ndpi_init_detection_module’ from incompatible pointer type [enabled by default] The problem can be solved by adding a fourth argument set to NULL to ndpi_init_detection_module in tcp_garbage.c, such that: Code: ndpi = ndpi_init_detection_module(NDPI_TICK_RES, nDPImalloc, nDPIPrintf); BECOMES Code: ndpi = ndpi_init_detection_module(NDPI_TICK_RES, nDPImalloc, nDPIPrintf, NULL); (the prototype of ndpi_init_detection_module is in nDPI/src/include/ndpi_public_functions.h) NOTE: the same workaround should be applied to call to ndpi_init_detection_module into udp_garbage.c ISSUE 3when compiling videosnarf (I used version 0.63) with ./configure make I got the following error Code: g++ -g -O2 -o videosnarf -lpcap main.o stream.o videosnarf.o h264rtp.o g722_decode.o videosnarf.o: In function `mediasnarfStart': /root/xbuild/videosnarf-0.63/src/videosnarf.c:75: undefined reference to `pcap_open_offline' /root/xbuild/videosnarf-0.63/src/videosnarf.c:103: undefined reference to `pcap_compile' /root/xbuild/videosnarf-0.63/src/videosnarf.c:107: undefined reference to `pcap_setfilter' /root/xbuild/videosnarf-0.63/src/videosnarf.c:113: undefined reference to `pcap_datalink' /root/xbuild/videosnarf-0.63/src/videosnarf.c:117: undefined reference to `pcap_datalink' /root/xbuild/videosnarf-0.63/src/videosnarf.c:123: undefined reference to `pcap_loop' /root/xbuild/videosnarf-0.63/src/videosnarf.c:115: undefined reference to `pcap_loop' /root/xbuild/videosnarf-0.63/src/videosnarf.c:119: undefined reference to `pcap_loop' /root/xbuild/videosnarf-0.63/src/videosnarf.c:80: undefined reference to `pcap_open_live' /root/xbuild/videosnarf-0.63/src/videosnarf.c:108: undefined reference to `pcap_geterr' /root/xbuild/videosnarf-0.63/src/videosnarf.c:104: undefined reference to `pcap_geterr the problem can be solved by typing what follows into videosnarf-0.64/src/ (notice the -lpcap at the end of the string) Code: g++ -g -O2 -o videosnarf main.o stream.o videosnarf.o h264rtp.o g722_decode.o -lpcap Alle the above issues are minor but i hope this helps non professionals to compile xplico from source. Thanks again for this great tool!! Best regards, Valerio
|