summaryrefslogtreecommitdiffstats
path: root/net/bootp.h
Commit message (Collapse)AuthorAgeFilesLines
* net: Convert protocol structures to use explicit sizesSergey Temerkhanov2015-04-181-7/+7
| | | | | | | | | Convert uchar/ushort to u8/u16 respectively. Signed-off-by: Radha Mohan Chintakuntla <rchintakuntla@cavium.com> Signed-off-by: Sergey Temerkhanov <s.temerkhanov@gmail.com> Signed-off-by: Joe Hershberger <joe.hershberger@ni.com> Acked-by: Simon Glass <sjg@chromium.org>
* net: Fix incorrect DHCP/BOOTP packets on 64-bit systemsSergey Temerkhanov2015-04-181-2/+2
| | | | | | | | | | | | This commit fixes incorrect DHCP/BOOTP packet layout caused by 'ulong' type size difference on 64 and 32-bit architectures. It also renames NetReadLong()/NetCopyLong() to net_read_u32/net_copy_u32() accordingly. Signed-off-by: Radha Mohan Chintakuntla <rchintakuntla@cavium.com> Signed-off-by: Sergey Temerkhanov <s.temerkhanov@gmail.com> Signed-off-by: Joe Hershberger <joe.hershberger@ni.com> Acked-by: Simon Glass <sjg@chromium.org>
* net: cosmetic: Clean up DHCP variables and functionsJoe Hershberger2015-04-181-7/+7
| | | | | | | | Make a thorough pass through all variables and function names contained within bootp.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: Fixup var names related to boot fileJoe Hershberger2015-04-181-1/+0
| | | | | | | | The variables around the bootfile were inconsistent and used CamelCase. Update them to make the code more readable. 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-4/+4
| | | | | | | | | 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: BOOTP retry timeout improvementsStephen Warren2014-08-091-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, the BOOTP code sends out its initial request as soon as the Ethernet driver indicates "link up". If this packet is lost or not replied to for some reason, the code waits for a 1s timeout before retrying. For some reason, such early packets are often lost on my system, so this causes an annoying delay. To optimize this, modify the BOOTP code to have very short timeouts for the first packet transmitted, but gradually increase the timeout each time a timeout occurs. This way, if the first packet is lost, the second packet is transmitted quite quickly and hence the overall delay is low. However, if there's still no response, we don't keep spewing out packets at an insane speed. It's arguably more correct to try and find out why the first packet is lost. However, it seems to disappear inside my Ethenet chip; the TX chip indicates no error during TX (not that it has much in the way of reporting...), yet wireshark on the RX side doesn't see any packet. FWIW, I'm using an ASIX USB Ethernet adapter. Perhaps "link up" is reported too early or based on the wrong condition in HW, and we should add some fixed extra delay into the driver. However, this would slow down every link up event even if it ends up not being needed in some cases. Having BOOTP retry quickly applies the fix/WAR to every possible Ethernet device, and is quite simple to implement, so seems a better solution. Signed-off-by: Stephen Warren <swarren@nvidia.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
* net: cosmetic: Rename OPT_SIZE to OPT_FIELD_SIZEJoe Hershberger2012-05-231-4/+3
| | | | | | | | Clearer constant name. Also remove related BOOTP_SIZE which was unused and doesn't take into account VLAN packets. 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: Move MAC-seeded rand out of bootp.cJoe Hershberger2012-05-231-3/+0
| | | | | | | | | Make the MAC-seeded random number generator available to /net in general. MAC-seeded rand will be needed by link-local as well, so give it an interface. Signed-off-by: Joe Hershberger <joe.hershberger@ni.com> Acked-by: Simon Glass <sjg@chromium.org>
* net: cosmetic: bootp.* checkpatch complianceJoe Hershberger2012-05-151-26/+30
| | | | | Signed-off-by: Joe Hershberger <joe.hershberger@ni.com> Acked-by: Simon Glass <sjg@chromium.org>
* net: express the first argument to NetSetTimeout() in millisecondsBartlomiej Sieka2008-10-181-1/+1
| | | | | | | | | | | | | | | | | | 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 compile error when CONFIG_BOOTP_RANDOM_DELAY is set.Remy Bohmer2008-08-261-1/+1
| | | | | | | | The option CONFIG_BOOTP_RANDOM_DELAY does not compile, because of a missing extern inside the net/bootp.h header Signed-off-by: Remy Bohmer <linux@bohmer.net> Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
* Fix warning differ in signedness in net/net.c and net/nfs.cJean-Christophe PLAGNIOL-VILLARD2007-11-181-1/+1
|
* net/: Remove obsolete references to CONFIG_COMMANDSJon Loeliger2007-07-091-1/+1
| | | | Signed-off-by: Jon Loeliger <jdl@freescale.com>
* net/: Augment CONFIG_COMMANDS tests with defined(CONFIG_CMD_*).Jon Loeliger2007-07-041-1/+1
| | | | | | | | | | | | | | 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>
* Initial revisionwdenk2002-07-201-0/+95
OpenPOWER on IntegriCloud