A Discrete-Event Network Simulator
API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
INetStack Struct Reference

#include <sim_interface.h>

Public Member Functions

virtual ~INetStack ()
virtual void add_default_gateway (const char *addr)=0
virtual void buffer_size (int size)=0
virtual int cmd (const char *)
virtual int get_hz ()=0
virtual int get_id ()=0
virtual const char * get_name ()=0
virtual bool get_var (const char *var, char *result, int result_len)
virtual void if_attach (const char *addr, const char *mask, int mtu)=0
virtual void if_receive_packet (int if_id, const void *data, int datalen)=0
virtual void if_send_finish (int if_id)=0
virtual void if_send_packet (const void *data, int datalen)=0
virtual void increment_ticks ()=0
virtual void init (int hz)=0
virtual struct INetStreamSocketnew_sctp_socket ()
virtual struct INetStreamSocketnew_tcp_socket ()
virtual struct INetDatagramSocketnew_udp_socket ()
virtual void set_diagnostic (int level)
virtual bool set_var (const char *var, const char *val)
virtual void show_config ()
virtual int sysctl (const char *sysctl_name, void *oldval, size_t *oldlenp, void *newval, size_t newlen)
virtual int sysctl_get (const char *name, char *value, size_t len)
virtual int sysctl_getnum (size_t idx, char *name, size_t len)
virtual int sysctl_set (const char *name, const char *value)
virtual void timer_interrupt ()=0

Detailed Description

Definition at line 27 of file sim_interface.h.

Constructor & Destructor Documentation

virtual INetStack::~INetStack ( )
inlinevirtual

Definition at line 29 of file sim_interface.h.

Member Function Documentation

virtual void INetStack::add_default_gateway ( const char *  addr)
pure virtual

Referenced by ns3::NscTcpL4Protocol::AddInterface().

+ Here is the caller graph for this function:

virtual void INetStack::buffer_size ( int  size)
pure virtual
virtual int INetStack::cmd ( const char *  )
inlinevirtual

Simple interface to support sending any textual command to a stack

Returns
0 on success

Definition at line 130 of file sim_interface.h.

virtual int INetStack::get_hz ( )
pure virtual

This is used so the simulator can call the stack timer_interrupt function the correct amount of times per second. For example, lwip has a hz of 10, which it returns here to say that it's timer_interrupt should be called 10 times a second. FreeBSD uses 100, as does Linux 2.4, while Linux 2.6 uses 1000. (This is often configurable in the kernel in question, also.)

Referenced by ns3::NscTcpL4Protocol::SetNode().

+ Here is the caller graph for this function:

virtual int INetStack::get_id ( )
pure virtual

Purely for debugging/diagnostic purposes. This returns the internal id of the stack instance.

virtual const char* INetStack::get_name ( )
pure virtual

Should return a short one-word name of the stack. Eg. Linux 2.4.x -> linux24, FreeBSD 5.x -> freebsd5. This can be used to identify output from a stack, for example a packet trace file.

Referenced by ns3::Ns3NscStack::GetInstanceTypeId().

+ Here is the caller graph for this function:

virtual bool INetStack::get_var ( const char *  var,
char *  result,
int  result_len 
)
inlinevirtual

Definition at line 111 of file sim_interface.h.

virtual void INetStack::if_attach ( const char *  addr,
const char *  mask,
int  mtu 
)
pure virtual

Referenced by ns3::NscTcpL4Protocol::AddInterface().

+ Here is the caller graph for this function:

virtual void INetStack::if_receive_packet ( int  if_id,
const void *  data,
int  datalen 
)
pure virtual

Referenced by ns3::NscTcpL4Protocol::Receive().

+ Here is the caller graph for this function:

virtual void INetStack::if_send_finish ( int  if_id)
pure virtual

Referenced by ns3::NscTcpL4Protocol::send_callback().

+ Here is the caller graph for this function:

virtual void INetStack::if_send_packet ( const void *  data,
int  datalen 
)
pure virtual
virtual void INetStack::increment_ticks ( )
pure virtual

Referenced by ns3::NscTcpL4Protocol::SoftInterrupt().

+ Here is the caller graph for this function:

virtual void INetStack::init ( int  hz)
pure virtual

Referenced by ns3::NscTcpL4Protocol::SetNode().

+ Here is the caller graph for this function:

virtual struct INetStreamSocket* INetStack::new_sctp_socket ( )
inlinereadvirtual

Definition at line 66 of file sim_interface.h.

virtual struct INetStreamSocket* INetStack::new_tcp_socket ( )
inlinereadvirtual

Definition at line 65 of file sim_interface.h.

Referenced by ns3::NscTcpSocketImpl::SetTcp().

+ Here is the caller graph for this function:

virtual struct INetDatagramSocket* INetStack::new_udp_socket ( )
inlinereadvirtual

Definition at line 64 of file sim_interface.h.

virtual void INetStack::set_diagnostic ( int  level)
inlinevirtual

The level of debugging or diagnostic information to print out. This normally means kernel messages printed out during initialisation but may also include extra debugging messages that are part of NSC.

Definition at line 124 of file sim_interface.h.

virtual bool INetStack::set_var ( const char *  var,
const char *  val 
)
inlinevirtual

Definition at line 116 of file sim_interface.h.

virtual void INetStack::show_config ( )
inlinevirtual

Definition at line 105 of file sim_interface.h.

virtual int INetStack::sysctl ( const char *  sysctl_name,
void *  oldval,
size_t *  oldlenp,
void *  newval,
size_t  newlen 
)
inlinevirtual

Definition at line 70 of file sim_interface.h.

virtual int INetStack::sysctl_get ( const char *  name,
char *  value,
size_t  len 
)
inlinevirtual

Definition at line 88 of file sim_interface.h.

Referenced by ns3::Ns3NscStack::Get(), and ns3::Ns3NscStack::GetInstanceTypeId().

+ Here is the caller graph for this function:

virtual int INetStack::sysctl_getnum ( size_t  idx,
char *  name,
size_t  len 
)
inlinevirtual

Definition at line 100 of file sim_interface.h.

Referenced by ns3::Ns3NscStack::GetInstanceTypeId().

+ Here is the caller graph for this function:

virtual int INetStack::sysctl_set ( const char *  name,
const char *  value 
)
inlinevirtual

Definition at line 80 of file sim_interface.h.

Referenced by ns3::Ns3NscStack::Set().

+ Here is the caller graph for this function:

virtual void INetStack::timer_interrupt ( )
pure virtual

Referenced by ns3::NscTcpL4Protocol::SoftInterrupt().

+ Here is the caller graph for this function:


The documentation for this struct was generated from the following file: