lwip-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lwip-users] initialization code example


From: K.J. Mansley
Subject: Re: [lwip-users] initialization code example
Date: 08 Aug 2004 15:13:14 +0100

On Sun, 2004-08-08 at 01:45, alex katebi wrote:
> Hi Everyone,
> 
>   I am trying to port lwip stack to my ip router application that runs on 
> Linux.
> I am having some trouble with my initializtion of the lwip. Can someone give 
> me a code example or
> tell me what to put in the sys_init()? Also where do the rest of the 
> xxx_init() functions are
> supposed to be called?
> 
>   I am using the latest lwip-0.7.2 release. After I do 
> "netconn_new(NETCONN_TCP)" it crashes it
> tries to use a semaphore that is not initialized. What should initialize the 
> sem?

Checkout contrib/ports/unix/proj/lib/unixlib.c - it has a fairly
succinct and easy to understand initialisation.

The _init() function is one that is called by the OS when the unixlib
library is initialised - you don't have to call your initialisation
function that, as you'll just be able to call it from the start of your
program.  The semaphore around tcpip_init() is to ensure that the
library doesn't continue until a new thread (created by tcpip_init()) is
up and running.

Hope that helps,

Kieran





reply via email to

[Prev in Thread] Current Thread [Next in Thread]