Skip to content

Commit

Permalink
Remove libuuid dependency and NIO Multicast implementation that depen…
Browse files Browse the repository at this point in the history
…ds on it.

NIO Multicast is never used and maybe not even functional.
This will simplify the compilation requirements, especially on Windows with Cygwin.
  • Loading branch information
grossmj committed Mar 13, 2016
1 parent 4ba6b21 commit 560999b
Show file tree
Hide file tree
Showing 23 changed files with 1 addition and 592 deletions.
1 change: 0 additions & 1 deletion .travis.yml
Expand Up @@ -9,7 +9,6 @@ env:
before_install: sudo apt-get update -qq
install:
- sudo apt-get install -q libelf-dev$ARCH
- sudo apt-get --no-install-recommends install -q uuid-dev$ARCH
- sudo apt-get --no-install-recommends install -q libpcap0.8-dev$ARCH
- sudo apt-get install -q libc6-dev-i386
before_script:
Expand Down
9 changes: 0 additions & 9 deletions README.hypervisor
Expand Up @@ -69,8 +69,6 @@ Hypervisor management module ("hypervisor")
* "hypervisor parser_test [<a1> [... <a10>]]" : Display up to 10 arguments.
(since version 0.2.6-RC1)

* "hypervisor uuid" : Display the local uuid. (since version 0.2.8-RC3)

* "hypervisor tsg_stats" : Dump statistics about JIT code sharing to
the console. (since version 0.2.8-RC3, unstable)

Expand Down Expand Up @@ -530,13 +528,6 @@ Network Input/Output (NIO) module ("nio")
Connect an UDP Auto NIO to a remote host/port.
(since version 0.2.8-RC3-community)

* "nio create_mcast <nio_name> <mcast_group> <mcast_port>" :
Create a Multicast NIO.
(since version 0.2.8-RC3-community)

* "nio set_mcast_ttl <nio_name> <ttl>" : Set TTL for a Multicast NIO.
(since version 0.2.8-RC3-community)

* "nio create_unix <nio_name> <local_file> <remote_file>" :
Create an UNIX NIO with the specified parameters.

Expand Down
2 changes: 0 additions & 2 deletions README.md
Expand Up @@ -40,13 +40,11 @@ CMake and a working GCC or Clang compiler, as well as the build dependencies.
On Debian based systems the following build dependencies are required and can be
installed using apt-get:
- libelf-dev
- uuid-dev
- libpcap0.8-dev

On Redhat based systems (CentOS, Fedora etc) the following build dependencies are
required and can be installed using yum:
- elfutils-libelf-devel
- libuuid-devel
- libpcap-devel

MacPort & Homebrew:
Expand Down
23 changes: 0 additions & 23 deletions cmake/FindUUID.cmake

This file was deleted.

16 changes: 0 additions & 16 deletions cmake/dependencies.cmake
Expand Up @@ -3,7 +3,6 @@
# - librt : maybe required
# - libsocket : maybe required
# - libelf : required
# - libuuid : required
# - pthreads : required
# - libpcap/winpcap : optional
# accumulators:
Expand Down Expand Up @@ -160,20 +159,6 @@ set_cmake_required ()
check_c_source_compiles ( "${_code}" LIBELF_LARGEFILE )
print_variables ( LIBELF_LARGEFILE )

# libuuid
set_cmake_required ()
find_package ( UUID REQUIRED )
print_variables ( UUID_FOUND UUID_INCLUDE_DIR UUID_LIBRARY )
# make sure it can be used
set_cmake_required ()
list ( APPEND CMAKE_REQUIRED_INCLUDES ${UUID_INCLUDE_DIR} )
check_arch_library ( UUID_VALID uuid_generate "uuid/uuid.h" UUID_LIBRARY uuid )
if ( NOT UUID_VALID )
bad_arch_library ( FATAL_ERROR "uuid" "UUID_INCLUDE_DIR and UUID_LIBRARY" )
endif ()
list ( APPEND DYNAMIPS_INCLUDES ${UUID_INCLUDE_DIR} )
list ( APPEND DYNAMIPS_LIBRARIES ${UUID_LIBRARY} )

# pthreads
set ( CMAKE_THREAD_PREFER_PTHREAD 1 )
set_cmake_required ()
Expand Down Expand Up @@ -259,7 +244,6 @@ foreach ( _header #standalone
"termios.h"
"time.h"
"unistd.h"
#"uuid/uuid.h" #find_package
)
standard_variable_name ( _var "HAVE_${_header}" )
set_cmake_required ()
Expand Down
10 changes: 0 additions & 10 deletions common/atm.c
Expand Up @@ -573,16 +573,6 @@ int atmsw_cfg_create_if(atmsw_table_t *t,char **tokens,int count)
tokens[4],atoi(tokens[5]));
break;

case NETIO_TYPE_MCAST:
if (count != 5) {
fprintf(stderr,"ATMSW: invalid number of arguments "
"for Multicast NIO '%s'\n",tokens[1]);
break;
}

nio = netio_desc_create_mcast(tokens[1],tokens[3],atoi(tokens[4]));
break;

case NETIO_TYPE_TCP_CLI:
if (count != 5) {
fprintf(stderr,"ATMSW: invalid number of arguments "
Expand Down
10 changes: 0 additions & 10 deletions common/atm_bridge.c
Expand Up @@ -249,16 +249,6 @@ int atm_bridge_cfg_create_if(atm_bridge_t *t,char **tokens,int count)
tokens[4],atoi(tokens[5]));
break;

case NETIO_TYPE_MCAST:
if (count != 5) {
fprintf(stderr,"ATMSW: invalid number of arguments "
"for Multicast NIO '%s'\n",tokens[1]);
break;
}

nio = netio_desc_create_mcast(tokens[1],tokens[3],atoi(tokens[4]));
break;

case NETIO_TYPE_TCP_CLI:
if (count != 5) {
fprintf(stderr,"ATMSW: invalid number of arguments "
Expand Down
10 changes: 0 additions & 10 deletions common/cisco_card.c
Expand Up @@ -932,16 +932,6 @@ int vm_slot_cmd_add_nio(vm_instance_t *vm,char *str)
tokens[4],atoi(tokens[5]));
break;

case NETIO_TYPE_MCAST:
if (count != 5) {
vm_error(vm,"invalid number of arguments for Multicast NIO '%s'\n",
str);
goto done;
}

nio = netio_desc_create_mcast(nio_name,tokens[3],atoi(tokens[4]));
break;

case NETIO_TYPE_TCP_CLI:
if (count != 5) {
vm_error(vm,"invalid number of arguments for TCP CLI NIO '%s'\n",
Expand Down
3 changes: 0 additions & 3 deletions common/dynamips.c
Expand Up @@ -21,7 +21,6 @@
#include <getopt.h>

#include "dynamips.h"
#include "gen_uuid.h"
#include "cpu.h"
#include "vm.h"

Expand Down Expand Up @@ -907,8 +906,6 @@ int main(int argc,char *argv[])
printf("Copyright (c) 2005-2011 Christophe Fillot.\n");
printf("Build date: %s %s\n\n",__DATE__,__TIME__);

gen_uuid_init();

/* Register platforms */
register_default_platforms();

Expand Down
10 changes: 0 additions & 10 deletions common/eth_switch.c
Expand Up @@ -734,16 +734,6 @@ static int ethsw_cfg_create_if(ethsw_table_t *t,char **tokens,int count)
tokens[4],atoi(tokens[5]));
break;

case NETIO_TYPE_MCAST:
if (count != 5) {
fprintf(stderr,"ETHSW: invalid number of arguments "
"for Multicast NIO\n");
break;
}

nio = netio_desc_create_mcast(tokens[1],tokens[3],atoi(tokens[4]));
break;

case NETIO_TYPE_TCP_CLI:
if (count != 5) {
fprintf(stderr,"ETHSW: invalid number of arguments "
Expand Down
10 changes: 0 additions & 10 deletions common/frame_relay.c
Expand Up @@ -516,16 +516,6 @@ int frsw_cfg_create_if(frsw_table_t *t,char **tokens,int count)
tokens[4],atoi(tokens[5]));
break;

case NETIO_TYPE_MCAST:
if (count != 5) {
fprintf(stderr,"FRSW: invalid number of arguments "
"for UDP NIO '%s'\n",tokens[1]);
break;
}

nio = netio_desc_create_mcast(tokens[1],tokens[3],atoi(tokens[4]));
break;

case NETIO_TYPE_TCP_CLI:
if (count != 5) {
fprintf(stderr,"FRSW: invalid number of arguments "
Expand Down
39 changes: 0 additions & 39 deletions common/gen_uuid.c

This file was deleted.

22 changes: 0 additions & 22 deletions common/gen_uuid.h

This file was deleted.

42 changes: 1 addition & 41 deletions common/hv_nio.c
Expand Up @@ -87,7 +87,7 @@ static int cmd_create_udp_auto(hypervisor_conn_t *conn,int argc,char *argv[])
* Connect an UDP Auto NIO to a remote host/port.
*
* Parameters: <nio_name> <remote_host> <remote_port>
*/
*/
static int cmd_connect_udp_auto(hypervisor_conn_t *conn,int argc,char *argv[])
{
netio_desc_t *nio;
Expand All @@ -108,44 +108,6 @@ static int cmd_connect_udp_auto(hypervisor_conn_t *conn,int argc,char *argv[])
}
}


/*
* Create a Multicast NIO
*
* Parameters: <nio_name> <mcast_group> <mcast_port>
*/
static int cmd_create_mcast(hypervisor_conn_t *conn,int argc,char *argv[])
{
netio_desc_t *nio;

nio = netio_desc_create_mcast(argv[0],argv[1],atoi(argv[2]));

if (!nio) {
hypervisor_send_reply(conn,HSC_ERR_CREATE,1,
"unable to create Multicast NIO");
return(-1);
}

netio_release(argv[0]);
hypervisor_send_reply(conn,HSC_INFO_OK,1,"NIO '%s' created",argv[0]);
return(0);
}

/* Set TTL for a Multicast NIO */
static int cmd_set_mcast_ttl(hypervisor_conn_t *conn,int argc,char *argv[])
{
netio_desc_t *nio;

if (!(nio = hypervisor_find_object(conn,argv[0],OBJ_TYPE_NIO)))
return(-1);

netio_mcast_set_ttl(nio,atoi(argv[1]));

netio_release(argv[0]);
hypervisor_send_reply(conn,HSC_INFO_OK,1,"NIO '%s' TTL changed",argv[0]);
return(0);
}

/*
* Create a UNIX NIO
*
Expand Down Expand Up @@ -540,8 +502,6 @@ static hypervisor_cmd_t nio_cmd_array[] = {
{ "create_udp", 4, 4, cmd_create_udp, NULL },
{ "create_udp_auto", 4, 4, cmd_create_udp_auto, NULL },
{ "connect_udp_auto", 3, 3, cmd_connect_udp_auto, NULL },
{ "create_mcast", 3, 3, cmd_create_mcast, NULL },
{ "set_mcast_ttl", 2, 2, cmd_set_mcast_ttl, NULL },
{ "create_unix", 3, 3, cmd_create_unix, NULL },
{ "create_vde", 3, 3, cmd_create_vde, NULL },
{ "create_tap", 2, 2, cmd_create_tap, NULL },
Expand Down

0 comments on commit 560999b

Please sign in to comment.