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

Public Member Functions

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.

Member Function Documentation

virtual int INetStack::cmd ( const char *  )

Simple interface to support sending any textual command to a stack

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.)

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().

virtual void INetStack::set_diagnostic ( int  level)

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.

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