summaryrefslogtreecommitdiffstats
path: root/net/sntp.c
Commit message (Collapse)AuthorAgeFilesLines
* dm: net: rtc: Support using driver model for rtc in sntpSimon Glass2015-05-051-0/+12
| | | | | | | When setting the date, support driver model RTC also. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
* dm: rtc: Rename to_tm() to rtc_to_tm() and add error codeSimon Glass2015-05-051-1/+1
| | | | | | | | | | Rename this function so that it is clear that it is provided by the RTC. Also return an error when it cannot function as expected. This is unlikely to occur since it works for dates since 1752 and many RTCs do not support such old dates. Still it is better to be accurate. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Heiko Schocher <hs@denx.de>
* net: Fix compile errors when SNTP enabled and not DATEJoe Hershberger2015-04-181-1/+5
| | | | | | | | When SNTP is enabled and DATE is not, to_tm() is not built in. It could be defined when TIMESTAMP is defined, so check for that. Signed-off-by: Joe Hershberger <joe.hershberger@ni.com> Acked-by: Simon Glass <sjg@chromium.org>
* net: cosmetic: Fix checkpatch.pl failures in net.cJoe Hershberger2015-04-181-2/+2
| | | | | | | Finish eliminating CamelCase from net.c and other failures Signed-off-by: Joe Hershberger <joe.hershberger@ni.com> Acked-by: Simon Glass <sjg@chromium.org>
* net: cosmetic: Clean up SNTP variables and functionsJoe Hershberger2015-04-181-14/+11
| | | | | | | | Make a thorough pass through all variables and function names contained within sntp.c and remove CamelCase and improve naming. Signed-off-by: Joe Hershberger <joe.hershberger@ni.com> Acked-by: Simon Glass <sjg@chromium.org>
* net: cosmetic: Cleanup internal packet buffer namesJoe Hershberger2015-04-181-4/+4
| | | | | | | This patch cleans up the names of internal packet buffer names that are used within the network stack and the functions that use them. Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
* net: cosmetic: Name ethaddr variables consistentlyJoe Hershberger2015-04-181-2/+2
| | | | | | | | Use "_ethaddr" at the end of variables and drop CamelCase. Make constant values actually 'const'. Signed-off-by: Joe Hershberger <joe.hershberger@ni.com> Acked-by: Simon Glass <sjg@chromium.org>
* net: cosmetic: Change IPaddr_t to struct in_addrJoe Hershberger2015-04-181-6/+5
| | | | | | | | | This patch is simply clean-up to make the IPv4 type that is used match what Linux uses. It also attempts to move all variables that are IP addresses use good naming instead of CamelCase. No functional change. Signed-off-by: Joe Hershberger <joe.hershberger@ni.com> Acked-by: Simon Glass <sjg@chromium.org>
* net: Refactor to separate the UDP handler from the ARP handlerJoe Hershberger2012-05-231-1/+1
| | | | | | | | | | | Call a built-in dummy if none is registered... don't require protocols to register a handler (eliminating dummies) NetConsole now uses the ARP handler when waiting on arp (instead of needing a #define hack in arp.c) Clear handlers at the end of net loop Signed-off-by: Joe Hershberger <joe.hershberger@ni.com> Acked-by: Simon Glass <sjg@chromium.org>
* net: Refactor to protect access to the NetState variableJoe Hershberger2012-05-231-2/+2
| | | | | | | Changes to NetState now go through an accessor function called net_set_state() Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
* net: cosmetic: Un-typedef IP_tJoe Hershberger2012-05-231-1/+1
| | | | | | | | Rename IP header related things to IP_UDP. The existing definition of IP_t includes UDP header, so name it to accurately describe the structure. Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
* net: cosmetic: sntp.* checkpatch complianceJoe Hershberger2012-05-151-14/+17
| | | | | Signed-off-by: Joe Hershberger <joe.hershberger@ni.com> Acked-by: Simon Glass <sjg@chromium.org>
* NET: pass source IP address to packet handlersLuca Ceresoli2011-05-121-1/+2
| | | | | | | | | | This is needed for the upcoming TFTP server implementation. This also simplifies PingHandler() and fixes rxhand_f documentation. Signed-off-by: Luca Ceresoli <luca.ceresoli@comelit.it> Cc: Wolfgang Denk <wd@denx.de> Acked-by: Detlev Zundel <dzu@denx.de>
* minor debug cleanups in ./netRobin Getz2009-08-071-3/+3
| | | | | | | | | | | | | | | Minor ./net cleanups - no functional changes - change #ifdef DEBUG printf(); #endif to just debug() - changed __FUNCTION__ to __func__ - got rid of extra whitespace between function and opening brace - removed unnecessary braces on if statements gcc dead code elimination should make this functionally/size equivalent when DEBUG is not defined. (confirmed on Blackfin, with gcc 4.3.3). Signed-off-by: Robin Getz <rgetz@blackfin.uclinux.org> Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
* net/sntp.c: move ifdef into Makefile COBJS-$(...)Mike Frysinger2009-02-091-4/+0
| | | | | Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
* net: express the first argument to NetSetTimeout() in millisecondsBartlomiej Sieka2008-10-181-2/+2
| | | | | | | | | | | | | | | | | | Enforce millisecond semantics of the first argument to NetSetTimeout() -- the change is transparent for well-behaving boards (CFG_HZ == 1000 and get_timer() countiing in milliseconds). Rationale for this patch is to enable millisecond granularity for network-related timeouts, which is needed for the upcoming automatic software update feature. Summary of changes: - do not scale the first argument to NetSetTimeout() by CFG_HZ - change timeout values used in the networking code to milliseconds Signed-off-by: Rafal Czubak <rcz@semihalf.com> Signed-off-by: Bartlomiej Sieka <tur@semihalf.com> Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
* Fix some compile problems introduced by the latest CFG_CMD_xxx cleanupStefan Roese2007-07-111-2/+1
| | | | Signed-off-by: Stefan Roese <sr@denx.de>
* net/: Remove obsolete references to CONFIG_COMMANDSJon Loeliger2007-07-091-4/+4
| | | | Signed-off-by: Jon Loeliger <jdl@freescale.com>
* net/: Augment CONFIG_COMMANDS tests with defined(CONFIG_CMD_*).Jon Loeliger2007-07-041-2/+3
| | | | | | | | | | | | | | This is a compatibility step that allows both the older form and the new form to co-exist for a while until the older can be removed entirely. All transformations are of the form: Before: #if (CONFIG_COMMANDS & CFG_CMD_AUTOSCRIPT) After: #if (CONFIG_COMMANDS & CFG_CMD_AUTOSCRIPT) || defined(CONFIG_CMD_AUTOSCRIPT) Signed-off-by: Jon Loeliger <jdl@freescale.com>
* Fix problems with SNTP support;wdenk2005-04-021-9/+8
| | | | enable SNTP support in some boards.
* * Patch by Masami Komiya, 30 Mar 2005:wdenk2005-04-011-0/+93
add SNTP support and expand time server and time offset fields of DHCP support. See doc/README.SNTP * Patch by Steven Scholz, 13 Dec 2004: Fix bug in at91rm920 ethernet driver
OpenPOWER on IntegriCloud