From: Mike Frysinger <vapier@gentoo.org>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] - add dns
Date: Sat, 18 Jul 2009 18:11:50 -0400 [thread overview]
Message-ID: <200907181811.52487.vapier@gentoo.org> (raw)
In-Reply-To: <200907180114.25295.rgetz@blackfin.uclinux.org>
On Saturday 18 July 2009 01:14:25 Robin Getz wrote:
> + DnsOurPort = 10000 + (get_timer(0) % 4096);
4096 port range seems kind of small. i dont think the requests really need to
be greater than 10000. not sure if services would get pissed about being
below the 1024 limit though, so this is probably better:
1024 + (get_timer() % 0x8000);
keep the modulus something with only 1 bit set so gcc will optimize into a
simple and operation. probably add a comment about it too:
/* make src port a little random, but use something trivial to compute */
> +void
> +DnsStart(void)
> +{
> + NetSetTimeout(DNS_TIMEOUT, DnsTimeout);
> + NetSetHandler(DnsHandler);
> + memset(NetServerEther, 0, 6);
is clearing the ether address really necessary ? if so, why should the dns
code care about it ?
> +/* http://en.wikipedia.org/wiki/List_of_DNS_record_types */
> +enum dns_query_type {
> + DNS_A_RECORD = 0x01,
> + DNS_CNAME_RECORD = 0x05,
> + DNS_MX_RECORD = 0x0f };
that last }; should be on a line by itself, and the last entry should still
have a comma at the end
-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/20090718/ceb9e8c5/attachment.pgp
next prev parent reply other threads:[~2009-07-18 22:11 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-17 19:53 [U-Boot] [PATCH] - add dns Robin Getz
2009-07-17 20:55 ` Wolfgang Denk
2009-07-17 21:45 ` Robin Getz
2009-07-17 22:01 ` Wolfgang Denk
2009-07-17 23:19 ` Robin Getz
2009-07-18 5:14 ` Robin Getz
2009-07-18 22:11 ` Mike Frysinger [this message]
2009-07-19 0:27 ` Robin Getz
2009-07-19 1:15 ` Mike Frysinger
2009-07-19 23:30 ` Robin Getz
2009-07-20 2:36 ` Mike Frysinger
2009-07-18 1:20 ` Robin Getz
2009-07-19 7:48 ` Wolfgang Denk
2009-07-19 16:17 ` Robin Getz
2009-07-20 18:53 ` [U-Boot] [PATCH] v3 " Robin Getz
2009-07-21 4:48 ` Ben Warren
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200907181811.52487.vapier@gentoo.org \
--to=vapier@gentoo.org \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox