summaryrefslogtreecommitdiffstats
path: root/src/interface
diff options
context:
space:
mode:
authorMichael Brown2006-08-04 01:10:14 +0200
committerMichael Brown2006-08-04 01:10:14 +0200
commitffe0e24249d1dbec59f7b2454974a5855043ba95 (patch)
tree891adef4bdc493cc66e2430b600aa8edf1ef1deb /src/interface
parentUpdated PXE UDP implementation to use the new Etherboot UDP API. (diff)
downloadipxe-ffe0e24249d1dbec59f7b2454974a5855043ba95.tar.gz
ipxe-ffe0e24249d1dbec59f7b2454974a5855043ba95.tar.xz
ipxe-ffe0e24249d1dbec59f7b2454974a5855043ba95.zip
Make the UDP senddata() methods return a status code.
udp_connect() now follows the standard BSD sockets semantics and simply sets the default address for outgoing packets; it doesn't filter incoming packets.
Diffstat (limited to 'src/interface')
-rw-r--r--src/interface/pxe/pxe_udp.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/interface/pxe/pxe_udp.c b/src/interface/pxe/pxe_udp.c
index 34a24883..8dced9e8 100644
--- a/src/interface/pxe/pxe_udp.c
+++ b/src/interface/pxe/pxe_udp.c
@@ -52,12 +52,13 @@ udp_to_pxe ( struct udp_connection *conn ) {
* @v conn UDP connection
* @v data Temporary data buffer
* @v len Size of temporary data buffer
+ * @ret rc Return status code
*
* Sends the packet belonging to the current pxenv_udp_write()
* operation.
*/
-static void pxe_udp_senddata ( struct udp_connection *conn, void *data,
- size_t len ) {
+static int pxe_udp_senddata ( struct udp_connection *conn, void *data,
+ size_t len ) {
struct pxe_udp_connection *pxe_udp = udp_to_pxe ( conn );
struct s_PXENV_UDP_WRITE *pxenv_udp_write = pxe_udp->pxenv_udp_write;
userptr_t buffer;
@@ -68,7 +69,7 @@ static void pxe_udp_senddata ( struct udp_connection *conn, void *data,
if ( len > pxenv_udp_write->buffer_size )
len = pxenv_udp_write->buffer_size;
copy_from_user ( data, buffer, 0, len );
- udp_send ( conn, data, len );
+ return udp_send ( conn, data, len );
}
/**