M. Koehrer wrote:
> Hi all,
> 
> I have an issue that came up when I switched from a fairly old version of 
> rtnet to the 
> latest version.
> With the old version, the TOS byte at the IP header was always hard coded to 
> zero.
> With the new version this value is no longer zero, it seems to be a random 
> (non initialized) value.
> I noticed, that I can set the value using rt_ip_setsockopt(), however I 
> expected to have
> this value cleanly initialized to zero - as this is a very good default value 
> for TOS.
> I have an embedded device on the other side of rtnet that does not like any 
> non-zero TOS value...
> 

Does this help?

--- stack/ipv4/udp.c    (revision 1093)
+++ stack/ipv4/udp.c    (working copy)
@@ -257,6 +257,7 @@ int rt_udp_socket(struct rtdm_dev_contex
     sock->protocol        = IPPROTO_UDP;
     sock->prot.inet.saddr = INADDR_ANY;
     sock->prot.inet.state = TCP_CLOSE;
+    sock->prot.inet.tos   = 0;
 #ifdef CONFIG_RTNET_RTDM_SELECT
     sock->wakeup_select   = NULL;
 #endif /* CONFIG_RTNET_RTDM_SELECT */

Jan

Attachment: signature.asc
Description: OpenPGP digital signature

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
RTnet-users mailing list
RTnet-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rtnet-users

Reply via email to