diff options
author | Michael Brown <mcb30@etherboot.org> | 2006-08-03 23:10:14 +0000 |
---|---|---|
committer | Michael Brown <mcb30@etherboot.org> | 2006-08-03 23:10:14 +0000 |
commit | ffe0e24249d1dbec59f7b2454974a5855043ba95 (patch) | |
tree | 891adef4bdc493cc66e2430b600aa8edf1ef1deb /src/interface | |
parent | a0a872f7f1a7e26d8c66b190a9a12ceb89ed37f7 (diff) | |
download | ipxe-ffe0e24249d1dbec59f7b2454974a5855043ba95.zip ipxe-ffe0e24249d1dbec59f7b2454974a5855043ba95.tar.gz ipxe-ffe0e24249d1dbec59f7b2454974a5855043ba95.tar.bz2 |
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.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/interface/pxe/pxe_udp.c b/src/interface/pxe/pxe_udp.c index 34a2488..8dced9e 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 ); } /** |