[U-Boot] [PATCH v4 0/3] net: helper functions
Mike Frysinger
vapier at gentoo.org
Mon May 14 07:42:49 CEST 2012
On Friday 11 May 2012 17:22:23 Michael Walle wrote:
> Am Freitag 11 Mai 2012, 23:14:25 schrieb Wolfgang Denk:
> > Michael Walle wrote:
> > > What about the rand function? I guess that should be two
> > > compile time options
> > >
> > > - CONFIG_RAND
> > > - CONFIG_RANDOM_HWADDR
> > >
> > > Any better names?
> >
> > Please make this a single option, CONFIG_RANDOM_MACADDR. It appears
> > nobody else ever needed a random number before, and we can still
> > factor this out if another user pops up after another 12 years.
>
> from net/net.c:
> unsigned int random_port(void)
> {
> return 1024 + (get_timer(0) % 0x4000);
> }
>
> CONFIG_BOOTP_RANDOM_DELAY, in net/bootp.c
note that if you do change this code, the 0x4000 clamp is important. read the
git history of this file/func fore more details.
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20120514/ef9e58c9/attachment.pgp>
More information about the U-Boot
mailing list