Software control of the TCP/IP stack

bridged with qdn.public.ddk.network
Post Reply
Jeff

Software control of the TCP/IP stack

Post by Jeff » Thu Jan 16, 2003 1:55 pm

Hi,

I have to write some code that could control the TCP/IP stack, like
adding/deleting routes, setting the IP address and the netmask (in fact,
some code that does the job of ifconfig and route utilities), activate
DHCP, ...

Does anyone have clues for me (links to documentation, sample code, ...) ?

I noticed in a recent message someone is using ioctl on a socket
structure, in combination with an ortentry structure, to add routes, but I
can't find any documentation on this !!

Thanks for your help.

Jeff

Sean Boudreau

Re: Software control of the TCP/IP stack

Post by Sean Boudreau » Tue Jan 21, 2003 2:50 pm

Jeff <fleuryj@thmulti.com> wrote:
Hi,

I have to write some code that could control the TCP/IP stack, like
adding/deleting routes, setting the IP address and the netmask (in fact,
some code that does the job of ifconfig and route utilities), activate
DHCP, ...

Does anyone have clues for me (links to documentation, sample code, ...) ?
You can set ip addresses via either the SIOCSIFADDR or SIOCAIFADDR ioctls.
There is an example using SIOCSIFADDR in the thread entitled "more ioctl"
in this group.
I noticed in a recent message someone is using ioctl on a socket
structure, in combination with an ortentry structure, to add routes, but I
can't find any documentation on this !!
SIOCADDRT is specific to the tiny stack. The full stack uses routing sockets
(AF_ROUTE). There is an example in the thread entitled "Big Stack Routing"
in this group.

-seanb
Thanks for your help.

Jeff

Jeff

Re: Software control of the TCP/IP stack

Post by Jeff » Wed Jan 22, 2003 12:12 pm

Thanks Sean.
I found all the information I need in these threads.

Jeff

Post Reply

Return to “qdn.public.ddk.network”