aboutsummaryrefslogtreecommitdiff
path: root/lib/libstand/net.c
Commit message (Collapse)AuthorAgeFilesLines
* Move lib/libstand to sys/boot/libsaWarner Losh2017-10-121-283/+0
| | | | | | | | | | Move the sources to sys/boot. Make adjustments related to the move. Kill LIBSTAND_SRC since it's no longer needed. Sponsored by: Netflix Notes: svn path=/head/; revision=324551
* loader: network read reworkToomas Soome2017-05-061-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The current read from network is working from up to down - we have some protocol needing the data from the network, so we build the buffer space for that protocol, add the extra space for headers and pass this buffer down to be filled by nif get call in hope, we have guessed the incoming packet size right. Amazingly enough this approach mostly does work, but not always... So, this update does work from down to up - we allocate buffer (based on MTU or frame size info), fill it up, and pass on for upper layers. The obvious problem is that when we should free the buffer - if at all. In the current implementation the upper layer will free the packet on error or when the packet is no longer needed. While working on the issue, the additional issue did pop up - the bios implementation does not have generic get/put interface but is using pxe udpsend/udpreceive instead. So the udp calls are gone and undi interface is implemented instead. Which in turn means slight other changes as we do not need to have duplicated pxe implementation and can just use dev_net. To align packet content, the actual read from nic is using shifted buffer by ETHER_ALIGN (2). Reviewed by: bapt Differential Revision: https://reviews.freebsd.org/D10232 Notes: svn path=/head/; revision=317887
* Renumber copyright clause 4Warner Losh2017-02-281-1/+1
| | | | | | | | | | | | Renumber cluase 4 to 3, per what everybody else did when BSD granted them permission to remove clause 3. My insistance on keeping the same numbering for legal reasons is too pedantic, so give up on that point. Submitted by: Jan Schaumann <jschauma@stevens.edu> Pull Request: https://github.com/freebsd/freebsd/pull/96 Notes: svn path=/head/; revision=314436
* In sendrecv function, change the receive timeout value between retriesCraig Rodrigues2011-06-151-1/+1
| | | | | | | | | | | to increase in steps of MINTMO, instead of doubling the timeout for every retry. Obtained from: Juniper Networks Fixed by: Santhanakrishnan Balraj <sbalraj at juniper dot net> Notes: svn path=/head/; revision=223121
* Add #include <netinet/in_pcb.h> for missing forward declation ofCraig Rodrigues2011-05-031-0/+1
| | | | | | | struct inpcb. Notes: svn path=/head/; revision=221364
* ANSIfy, whitespace and comment adjustments, to simplify comparing theseEd Maste2009-09-131-21/+14
| | | | | | | files with NetBSD / OpenBSD versions. Notes: svn path=/head/; revision=197178
* Remove California Regent's clause 3, per letterWarner Losh2007-01-091-4/+0
| | | | Notes: svn path=/head/; revision=165906
* Use %z to print size_t values.John Baldwin2005-05-311-1/+1
| | | | Notes: svn path=/head/; revision=146835
* Remove 'register' keyword.David E. O'Brien2002-03-211-17/+17
| | | | Notes: svn path=/head/; revision=92913
* o Move NTOHL() and associated macros into <sys/param.h>. These areMike Barcroft2002-02-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | deprecated in favor of the POSIX-defined lowercase variants. o Change all occurrences of NTOHL() and associated marcros in the source tree to use the lowercase function variants. o Add missing license bits to sparc64's <machine/endian.h>. Approved by: jake o Clean up <machine/endian.h> files. o Remove unused __uint16_swap_uint32() from i386's <machine/endian.h>. o Remove prototypes for non-existent bswapXX() functions. o Include <machine/endian.h> in <arpa/inet.h> to define the POSIX-required ntohl() family of functions. o Do similar things to expose the ntohl() family in libstand, <netinet/in.h>, and <sys/param.h>. o Prepend underscores to the ntohl() family to help deal with complexities associated with having MD (asm and inline) versions, and having to prevent exposure of these functions in other headers that happen to make use of endian-specific defines. o Create weak aliases to the canonical function name to help deal with third-party software forgetting to include an appropriate header. o Remove some now unneeded pollution from <sys/types.h>. o Add missing <arpa/inet.h> includes in userland. Tested on: alpha, i386 Reviewed by: bde, jake, tmm Notes: svn path=/head/; revision=90868
* Add __FBSDID()s to libstandMatthew Dillon2001-09-301-1/+3
| | | | Notes: svn path=/head/; revision=84221
* Break out sendudp and readudp from net.c. This is for PXE, so itPaul Saab2000-04-081-213/+1
| | | | | | | can use its own UDP interface. Notes: svn path=/head/; revision=59086
* This is libstand; a support library for standalone executables (eg. bootstrapMike Smith1998-08-201-0/+503
modules). Obtained from: NetBSD, with some architectural changes and many additions. Notes: svn path=/cvs2svn/branches/MSMITH/; revision=38451