multiple instances of tcp/ip stack

as a developer exactly how we can create tcp/ip stack means through which function call. if you people have any document or source code is present please reply me.
already i gone through … ipleStacks here they given how we can use(create) the another instance of stack but i need exactly how it create another instance of tcp/ip stacklike what is the function call that can i use for programing.

please reply me or send to my personal mail id:


Why do you want to create the stack within the code? As a script on bootup, the time your NICs are mounted is when to start the 2nd stack. The most easy version would be to just set up a call to the os ^^
(system(), spawn*(),…)

i am simply tell why i required, i want to read the data from one stack and to write into other stack.
situation is like, there is 2 NIC Cards are there i want to measure exactly how much traffic coming to one NIC Card. For exact amount of results i want to read data coming from one Card(stack) and then i want to pass the data to other NIC Card.

if it is confusing just tell me. any one having the idea how to pass the data form one TCP\IP Stack to other stack.


That has nothing to do with stacks. There isn’t a stack per NIC.

If all you want to do is measure the traffic check out what nicinfo does.

can you give me how the TCP/IP stack is usefull.

  1. exactly what it does?
  2. when it is created?
  3. what is the use to create multiple instances of stack?


It handles all IP related stuff.

I assume you mean started. It’s started by the sysinit script

In most cases it for testing purpose, if somebody is debugging the stack you might want to have another stack to work from.

I have seen a different usage of multiple stacks. One stack is started as usual, the other with higher priority, something like
on -p39 io-net -i1 -ptcpip timer_pulse_prio=39,rx_pulse_prio=39,prefix=/sock1 -dpcnet pci=1 priority=39
The idea is that urgent operations are performed with the “high priorityâ€

how can i know which program(process) is using which stack?

Please check: …

Path to prepend to the traditional /dev/socket. This option is useful when running multiple stacks. Clients can use the SOCK environment variable to target a particular stack. For example:
io-net -i1 -ptcpip prefix=/alt
SOCK=/alt ifconfig –a