INetStack Struct Reference
List of all members.
Public Member Functions |
virtual void | init (int hz)=0 |
virtual void | if_receive_packet (int if_id, const void *data, int datalen)=0 |
virtual void | if_send_packet (const void *data, int datalen)=0 |
virtual void | if_send_finish (int if_id)=0 |
virtual void | if_attach (const char *addr, const char *mask, int mtu)=0 |
virtual void | add_default_gateway (const char *addr)=0 |
virtual int | get_id ()=0 |
virtual const char * | get_name ()=0 |
virtual int | get_hz ()=0 |
virtual void | timer_interrupt ()=0 |
virtual void | increment_ticks ()=0 |
virtual void | buffer_size (int size)=0 |
virtual struct INetDatagramSocket * | new_udp_socket () |
virtual struct INetStreamSocket * | new_tcp_socket () |
virtual struct INetStreamSocket * | new_sctp_socket () |
virtual int | sysctl (const char *sysctl_name, void *oldval, size_t *oldlenp, void *newval, size_t newlen) |
virtual int | sysctl_set (const char *name, const char *value) |
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 void | show_config () |
virtual bool | get_var (const char *var, char *result, int result_len) |
virtual bool | set_var (const char *var, const char *val) |
virtual void | set_diagnostic (int level) |
virtual int | cmd (const char *) |
Member Function Documentation
virtual int INetStack::cmd |
( |
const char * |
|
) |
[inline, virtual] |
Simple interface to support sending any textual command to a stack
- Returns:
- 0 on success
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.
virtual void INetStack::set_diagnostic |
( |
int |
level |
) |
[inline, virtual] |
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.
The documentation for this struct was generated from the following file:
- src/internet-stack/sim_interface.h