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
signature.asc
Description: This is a digitally signed message part.
_______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot