lwip-users
[Top][All Lists]
Advanced

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

[lwip-users] lwIP 1.4.0 with SNTP Client


From: Adams, David
Subject: [lwip-users] lwIP 1.4.0 with SNTP Client
Date: Fri, 11 Nov 2011 18:10:19 +0100

I’ve recently started using lwIP with the STR912 processor.  This is my first experience with lwIP and I’ve managed to port this for my processor relatively easily with the Sockets API.  I’m wanting to use the SNTP client app, but modify it slightly to use the time the packet was received by Ethernet driver to calculate the time offset.  The current SNTP client just uses the transmit time in the SNTP message from the server to update the system time.

 

I’m thinking the best way would be to take a timestamp of the time when each ethernet packet is received and somehow pass this along with the packet to the SNTP application.

 

As I’ve not used lwIP before I’m struggling to find a way to pass this timestamp to the SNTP routine and keep it reference to the SNTP packet.  I have considered storing this in the pbuf but I’m not keen on modifying the pbuf without a better understanding the implications of this.  I have also looked at adding this time to the end of the Rx buffer, then storing this in the pbuf but as this is passed through the ip_input routine the additional data is stripped from the buffer as its not part of the original packet.

 

Does anyone have any experience of implementing anything similar, or any ideas or tips of achieving this.

 

Regards

 

Dave Adams

RTK Instruments Ltd
Tel:  +44(0)1423 580500
Fax: +44(0)1423 580501

E-mail:  address@hidden
Website: http://www.rtkinstruments.com


_____________________________________________________

Registered in England No. 6250603, VAT Reg. No. GB 171671070,
RTK Instruments Ltd, St James Business Park, Knaresborough, HG5 8PJ

A member of the MTL Instruments Group


reply via email to

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