[Top][All Lists]

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

Re: [lwip-users] Can I add some members to struct pbuf?

From: Noam weissman
Subject: Re: [lwip-users] Can I add some members to struct pbuf?
Date: Sun, 14 Apr 2013 11:43:04 +0300



You should not add any members to anything inside the LwIP. Treat it as a close black box with interface.


If you need any parameters this should be defined inside your own code. The simplest will be defining your

own structure and when you get a new connection you assigne it to the new PCB.




    // Allocate memory for the structure that holds the local variables related

    // to the new connection

    ts = (__tcp_term_ts*)mem_malloc(sizeof(__tcp_term_ts));


    // Tell TCP that this is the structure we wish to be passed for our callbacks.

    tcp_arg(pcb, ts);   



In the above example  __tcp_term_ts is your own definition. Every call back function gives you a pointer to

This param.


Hope this helped,



From: address@hidden [mailto:address@hidden On Behalf Of Richard Wood
Sent: ו 12 אפריל 2013 11:00
To: address@hidden
Subject: [lwip-users] Can I add some members to struct pbuf?


I want to add some members to struct pbuf. Then, it caused assertions

like this:

pbuf_free: p->ref > 0 mem_free: mem->usedpbuf_free:p->ref > 0



why does this happen?

This footnote confirms that this email message has been scanned by
PineApp Mail-SeCure for the presence of malicious code, vandals & computer viruses.

reply via email to

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