Re: How to tell an application to use a custom tcp/ip stack instead of tcp/ip stack from linux?
From: Nix (nix-razor-pit_at_esperi.org.uk)
Date: Tue, 05 Jul 2005 22:53:13 +0100
On 5 Jul 2005, CDP stated:
> The makers of alternate tcp/ip stack (lwip) did not mention
> anything to happen after the replacement.So do you think that the
> alternate stack is working fine with my tftp application? I can not
> even see a single difference b/w the linux tcp/ip stack and lwip , may
> be I might have done wrong with my LD_PRELOAD environment variable . I
> cross checked the LD_PRELOAD environment variable , its set to the path
> of shared library gen erated by means of compiling the stack. Do you
> know any other means of cross checking ? whether what I have done is
Well, you could stick some debugging fprintf()s into the library and
see if they are printed.
> One more thing is do you have any idea about kernel modification and
> recompilation for this problem.., I mean stack replacement problem
> under linux ..?
Unless the lwip stack was written to fit into the Linux kernel
networking layer, you'll pretty much have to rewrite it --- and the
TCP/IP stack isn't exactly easily replaceable, except with something
that satisfies the same internal interface contracts and locking
rules (many of which aren't documented).
It's *possible*, of course, but extremely difficult, and definitely not
worth it for a test run!
(But if you *did* replace the kernel's TCP/IP stack, it's likely that
nothing would need to be recompiled. At least, if you did it properly.)
-- `But of course, GR is the very best relativity for the masses.' --- Wayne Throop