[syslinux] [PATCH 0/1] UEFI UDP/TFTP

Geert Stappers stappers at stappers.nl
Sun Feb 28 14:14:19 PST 2016


On Sun, Feb 28, 2016 at 04:26:07PM +0000, Patrick Masotta via Syslinux wrote:
> 
> 
> I have re-implemented /efi/udp.c 


> Signed-off-by: Patrick Masotta <masottaus at yahoo.com>
> 
> diff -uprN a/core/fs/pxe/pxe.h b/core/fs/pxe/pxe.h
> --- a/core/fs/pxe/pxe.h	2014-10-06 10:27:44.000000000 -0600
> +++ b/core/fs/pxe/pxe.h	2016-02-28 08:44:47.127996962 -0700
> @@ -130,6 +130,7 @@ union net_private {
> struct net_private_efi {
> struct efi_binding *binding; /* EFI binding for protocol */
> uint16_t localport;          /* Local port number (0=not in use) */
> +	void*	 context;            /* Holds the UDP_IO Instance (used in the new efi UDP codebase)  */
> } efi;
> };
> 
> diff -uprN a/efi/udp.c b/efi/udp.c
> --- a/efi/udp.c	2014-10-06 10:27:44.000000000 -0600
> +++ b/efi/udp.c	2016-02-28 08:41:29.867226806 -0700
> @@ -1,5 +1,6 @@
> /*
> - * Copyright 2013-2014 Intel Corporation - All Rights Reserved
> + *   Serva (c) 2010-2016 Patrick Masotta - All Rights Reserved
> + * 
> */
> 
> #include <string.h>
> @@ -8,50 +9,189 @@
> #include "net.h"
> #include "fs/pxe/pxe.h"
> 
> +
> +#define TICKS_PER_SECOND        10000000
> +#define TICKS_PER_MS            10000
> +
> +#define UDP_TIME_TO_GETMAP		5 * TICKS_PER_SECOND 
> +#define UDP_TIME_TX_TIMEOUT		1 * TICKS_PER_SECOND + 500 * TICKS_PER_MS
> +#define UDP_TIME_RX_TIMEOUT		1 * TICKS_PER_SECOND + 500 * TICKS_PER_MS
  <snip/>
> 
> /** 
> - * Try to configure this UDP socket
> + * Try to configure this UDP_IO
> *
> - * @param:udp, the EFI_UDP4 socket to configure
> - * @param:udata, the EFI_UDP4_CONFIG_DATA to use
> - * @param:f, the name of the function as a wide string.
> + * @param:udp_io, 	The UDP_IO containing the EFI_UDP4 socket to configure
> + * 					and the EFI_UDP4_CONFIG_DATA to use.
> + * @param:f, 		The name of the invoking function as a wide string.
> *
> * @out: status as EFI_STATUS
> */
> -
> -EFI_STATUS core_udp_configure(EFI_UDP4 *udp, EFI_UDP4_CONFIG_DATA *udata,
> -	short unsigned int *f)
> +EFI_STATUS efi_udp_configure(UDP_IO *udp_io, short unsigned int *f)
> {
> }
> 
> /**
> * Establish a connection on an open socket
> *
> - * @param:socket, the open socket
> - * @param:ip, the ip address
> - * @param:port, the port number, host-byte order
> + * @param:socket, 	the open socket

White space change


> + * @param:ip, 		the source ip address

White space change, plus 'source '

> + * @param:port, 	the source port number, host-byte order

White space change, plus 'source '

> */
> -void core_udp_connect(struct pxe_pvt_inode *socket, uint32_t ip,
> -		      uint16_t port)
> +void core_udp_connect(struct pxe_pvt_inode *socket, uint32_t src_ip,
> +		      uint16_t src_port)

Changed 'ip' and 'port' in 'src_ip' and 'src_port'.

However: 'src_ip' and 'src_port' are not in
} + * @param:ip, 		the source ip address
} + * @param:port, 	the source port number, host-byte order


  <snip/>

> -static EFIAPI void udp4_cb(EFI_EVENT event, void *context)
> +VOID
> +EFIAPI
> +UdpIoOnDgramSent (
> +  IN EFI_EVENT	event,
> +  IN VOID*		context
> +  )

Such coding style change
did me really stop removing this unified patch.


Groeten
Geert Stappers
-- 
Leven en laten leven
------------- volgend deel ------------
Een niet-tekst bijlage is gescrubt...
Naam: signature.asc
Type: application/pgp-signature
Grootte: 836 bytes
Omschrijving: Digital signature
URL : <http://www.zytor.com/pipermail/syslinux/attachments/20160228/0593b013/attachment.sig>


More information about the Syslinux mailing list