|
|
| virtual | ~INetStack () |
| |
| virtual void | add_default_gateway (const char *addr)=0 |
| | Add a default gateway to the interface. More...
|
| |
| virtual void | buffer_size (int size)=0 |
| | Set the buffer size. More...
|
| |
| virtual int | cmd (const char *) |
| | Simple interface to support sending any textual command to a stack. More...
|
| |
| virtual int | get_hz ()=0 |
| | Get the timer_interrupt frequency. More...
|
| |
| virtual int | get_id ()=0 |
| | Returns the internal id of the stack instance. More...
|
| |
| virtual const char * | get_name ()=0 |
| | Return a short one-word name of the stack. More...
|
| |
| virtual bool | get_var (const char *var, char *result, int result_len) |
| | Optional function to get variables for this stack. More...
|
| |
| virtual void | if_attach (const char *addr, const char *mask, int mtu)=0 |
| | Attach an interface to the stack. More...
|
| |
| virtual void | if_receive_packet (int if_id, const void *data, int datalen)=0 |
| | Deliver complete packet to the NSC network stack. More...
|
| |
| virtual void | if_send_finish (int if_id)=0 |
| | Signal the completion of send procedure to the NSC network stack. More...
|
| |
| virtual void | if_send_packet (const void *data, int datalen)=0 |
| | Send complete packet to the NSC network stack. More...
|
| |
| virtual void | increment_ticks ()=0 |
| | Increment the time ticks. More...
|
| |
| virtual void | init (int hz)=0 |
| | Initialize the stack. More...
|
| |
| virtual struct INetStreamSocket * | new_sctp_socket () |
| | Create a new SCTP socket. More...
|
| |
| virtual struct INetStreamSocket * | new_tcp_socket () |
| | Create a new TCP socket. More...
|
| |
| virtual struct INetDatagramSocket * | new_udp_socket () |
| | Create a new UDP socket. More...
|
| |
| virtual void | set_diagnostic (int level) |
| | Set the level of debugging or diagnostic information to print out. More...
|
| |
| virtual bool | set_var (const char *var, const char *val) |
| | Optional function to set variables for this stack. More...
|
| |
| virtual void | show_config () |
| | Show the NSC configuration. More...
|
| |
| virtual int | sysctl (const char *sysctl_name, void *oldval, size_t *oldlenp, void *newval, size_t newlen) |
| | use sysctl to modify system parameters More...
|
| |
| virtual int | sysctl_get (const char *name, char *value, size_t len) |
| | Get system parameters using sysctl. More...
|
| |
| virtual int | sysctl_getnum (size_t idx, char *name, size_t len) |
| | Tell the cradle code to put the name of sysctl number 'idx' into name[]. More...
|
| |
| virtual int | sysctl_set (const char *name, const char *value) |
| | Set system parameters using sysctl. More...
|
| |
| virtual void | timer_interrupt ()=0 |
| | The stack timer_interrupt function. More...
|
| |
Struct interface to NSC stack.
Definition at line 31 of file sim_interface.h.
| virtual int INetStack::get_hz |
( |
| ) |
|
|
pure virtual |
Get the timer_interrupt frequency.
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.)
- Returns
- frequency
Referenced by ns3::NscTcpL4Protocol::SetNode().
| virtual int INetStack::sysctl_getnum |
( |
size_t |
idx, |
|
|
char * |
name, |
|
|
size_t |
len |
|
) |
| |
|
inlinevirtual |
Tell the cradle code to put the name of sysctl number 'idx' into name[].
The idea is that this can be used to get a list of all available sysctls:
char buf[256]
for (i=0; sysctl_getnum(i, buf, sizeof(buf)) > 0 ;i++)
puts(buf);
- Parameters
-
| idx | index |
| name | sysctl name |
| len | sysctl length |
- Returns
- -1 if idx is out of range and the length of the sysctl name otherwise.
Definition at line 198 of file sim_interface.h.
Referenced by ns3::Ns3NscStack::GetInstanceTypeId().