X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/9223880adde1ff3d7b8941ca474eab9acfa862c5..a92d7b716f51a53dea7f59db8524d4add713b910:/src/surf/ns3/ns3_interface.h diff --git a/src/surf/ns3/ns3_interface.h b/src/surf/ns3/ns3_interface.h index fa1a630fc3..b35d8680e7 100644 --- a/src/surf/ns3/ns3_interface.h +++ b/src/surf/ns3/ns3_interface.h @@ -1,44 +1,38 @@ -/* Copyright (c) 2007, 2008, 2009, 2010. The SimGrid Team. - * All rights reserved. */ +/* Copyright (c) 2007-2017. The SimGrid Team. All rights reserved. */ /* This program is free software; you can redistribute it and/or modify it * under the terms of the license (GNU LGPL) which comes with this package. */ -#ifndef _NS3_INTERFACE_H -#define _NS3_INTERFACE_H +#ifndef NS3_INTERFACE_H +#define NS3_INTERFACE_H -#include "xbt/log.h" -#include "xbt/misc.h" -#include "xbt/sysdep.h" +#include "simgrid/s4u/Host.hpp" -typedef enum { - NS3_NETWORK_ELEMENT_NULL = 0, /* NULL */ - NS3_NETWORK_ELEMENT_HOST, /* host type */ - NS3_NETWORK_ELEMENT_ROUTER, /* router type */ - NS3_NETWORK_ELEMENT_AS, /* AS type */ -} e_ns3_network_element_type_t; +namespace simgrid { +namespace surf { +class NetworkNS3Action; +} +} -typedef struct ns3_nodes{ - int node_num; - e_ns3_network_element_type_t type; - void * data; -}s_ns3_nodes_t, *ns3_nodes_t; +class NetPointNs3 { +public: + static simgrid::xbt::Extension EXTENSION_ID; -#ifdef __cplusplus -extern "C" { -#endif + explicit NetPointNs3(); + int node_num; +}; -XBT_PUBLIC(void *) ns3_add_host(char * id); -XBT_PUBLIC(void *) ns3_add_router(char * id); -XBT_PUBLIC(void *) ns3_add_link(char * id); -XBT_PUBLIC(void *) ns3_add_AS(char * id); -XBT_PUBLIC(void) ns3_add_cluster(char * id); -XBT_PUBLIC(void) ns3_add_route(char * src,char * dst); -XBT_PUBLIC(void) ns3_add_ASroute(char * src,char * dst); -XBT_PUBLIC(void) free_ns3_elmts(void *); +SG_BEGIN_DECL() -#ifdef __cplusplus -} -#endif +XBT_PUBLIC(void) ns3_initialize(const char* TcpProtocol); +XBT_PUBLIC(void) +ns3_create_flow(sg_host_t src, sg_host_t dst, double start, u_int32_t TotalBytes, + simgrid::surf::NetworkNS3Action* action); +XBT_PUBLIC(void) ns3_simulator(double maxSeconds); +XBT_PUBLIC(void*) ns3_add_router(const char* id); +XBT_PUBLIC(void) ns3_add_link(NetPointNs3* src, NetPointNs3* dst, char* bw, char* lat); +XBT_PUBLIC(void) ns3_add_cluster(const char* id, char* bw, char* lat); + +SG_END_DECL() #endif