summaryrefslogtreecommitdiff
path: root/net/bootp.h
AgeCommit message (Collapse)Author
2015-04-18net: Convert protocol structures to use explicit sizesSergey Temerkhanov
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>
2015-04-18net: Fix incorrect DHCP/BOOTP packets on 64-bit systemsSergey Temerkhanov
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>
2015-04-18net: cosmetic: Clean up DHCP variables and functionsJoe Hershberger
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>
2015-04-18net: cosmetic: Fixup var names related to boot fileJoe Hershberger
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>
2015-04-18net: cosmetic: Change IPaddr_t to struct in_addrJoe Hershberger
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>
2014-08-09net: BOOTP retry timeout improvementsStephen Warren
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>
2012-05-23net: cosmetic: Rename OPT_SIZE to OPT_FIELD_SIZEJoe Hershberger
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>
2012-05-23net: cosmetic: Un-typedef IP_tJoe Hershberger
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>
2012-05-23net: Move MAC-seeded rand out of bootp.cJoe Hershberger
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>
2012-05-15net: cosmetic: bootp.* checkpatch complianceJoe Hershberger
Signed-off-by: Joe Hershberger <joe.hershberger@ni.com> Acked-by: Simon Glass <sjg@chromium.org>
2008-10-18net: express the first argument to NetSetTimeout() in millisecondsBartlomiej Sieka
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>
2008-08-26Fix compile error when CONFIG_BOOTP_RANDOM_DELAY is set.Remy Bohmer
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>
2007-11-18Fix warning differ in signedness in net/net.c and net/nfs.cJean-Christophe PLAGNIOL-VILLARD
2007-07-09net/: Remove obsolete references to CONFIG_COMMANDSJon Loeliger
Signed-off-by: Jon Loeliger <jdl@freescale.com>
2007-07-04net/: Augment CONFIG_COMMANDS tests with defined(CONFIG_CMD_*).Jon Loeliger
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>
2002-07-20Initial revisionwdenk