Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
0efbdfa90ef389dc5683349c3066b540d3e083d3
[simgrid.git] / src / surf / ns3 / ns3_interface.h
1 /* Copyright (c) 2007, 2008, 2009, 2010. The SimGrid Team.
2  * All rights reserved.                                                     */
3
4 /* This program is free software; you can redistribute it and/or modify it
5  * under the terms of the license (GNU LGPL) which comes with this package. */
6
7 #ifndef _NS3_INTERFACE_H
8 #define _NS3_INTERFACE_H
9
10 #include "xbt/log.h"
11 #include "xbt/dynar.h"
12 #include "xbt/misc.h"
13 #include "xbt/sysdep.h"
14
15 typedef enum {
16         NS3_NETWORK_ELEMENT_NULL = 0,    /* NULL */
17         NS3_NETWORK_ELEMENT_HOST,       /* host type */
18         NS3_NETWORK_ELEMENT_ROUTER,     /* router type */
19         NS3_NETWORK_ELEMENT_AS,         /* AS type */
20 } e_ns3_network_element_type_t;
21
22 typedef struct ns3_nodes{
23         int node_num;
24         e_ns3_network_element_type_t type;
25         void * data;
26 }s_ns3_nodes_t, *ns3_nodes_t;
27
28 #ifdef __cplusplus
29 extern "C" {
30 #endif
31
32 XBT_PUBLIC(int)    ns3_finalize(void);
33 XBT_PUBLIC(int)    ns3_initialize(void);
34 XBT_PUBLIC(int)    ns3_create_flow(const char* a,const char *b,double start,u_int32_t TotalBytes,void * action);
35 XBT_PUBLIC(void)   ns3_simulator(double min);
36 XBT_PUBLIC(double) ns3_time(void);
37 XBT_PUBLIC(void*)  ns3_get_socket_action(void *socket);
38 XBT_PUBLIC(double) ns3_get_socket_remains(void *socket);
39 XBT_PUBLIC(double) ns3_get_socket_sent(void *socket);
40 XBT_PUBLIC(char)   ns3_get_socket_is_finished(void *socket);
41 XBT_PUBLIC(void *) ns3_add_host(char * id);
42 XBT_PUBLIC(void *) ns3_add_host_cluster(char * id);
43 XBT_PUBLIC(void *) ns3_add_router(char * id);
44 XBT_PUBLIC(void *) ns3_add_AS(char * id);
45 XBT_PUBLIC(void *) ns3_add_link(int src,int dst,char * bw,char * lat);
46 XBT_PUBLIC(void *) ns3_end_platform(void);
47 XBT_PUBLIC(void *) ns3_add_cluster(char * bw,char * lat,char *id);
48 #ifdef __cplusplus
49 }
50 #endif
51
52 #endif