With this patch, non-real-time UDP packets a routed to the Linux network stack as well. It is the users responsibility, to ensure that UDP port numbers are used unambiguously in RTnet and Linux.
Signed-off-by: Wolfang Grandegger <[EMAIL PROTECTED]> Index: rtnet/stack/ipv4/ip_input.c =================================================================== --- rtnet.orig/stack/ipv4/ip_input.c +++ rtnet/stack/ipv4/ip_input.c @@ -70,6 +70,13 @@ static inline void rt_ip_local_deliver(s } else { /* Get the destination socket */ if ((sock = ipprot->dest_socket(skb)) == NULL) { +#ifdef CONFIG_RTNET_ADDON_PROXY + if (rt_ip_fallback_handler) { + __rtskb_push(skb, iph->ihl*4); + rt_ip_fallback_handler(skb); + return; + } +#endif kfree_rtskb(skb); return; } Index: rtnet/stack/ipv4/ip_fragment.c =================================================================== --- rtnet.orig/stack/ipv4/ip_fragment.c +++ rtnet/stack/ipv4/ip_fragment.c @@ -33,6 +33,9 @@ #include <ipv4/ip_fragment.h> +#ifdef CONFIG_RTNET_ADDON_PROXY +#include <ipv4/ip_input.h> +#endif /* CONFIG_RTNET_ADDON_PROXY */ /* * This defined sets the number of incoming fragmented IP messages that @@ -185,6 +188,14 @@ static struct rtskb *add_to_collector(st rtdm_lock_put_irqrestore(&p_coll->frags.lock, context); } +#ifdef CONFIG_RTNET_ADDON_PROXY + if (rt_ip_fallback_handler) { + __rtskb_push(skb, iph->ihl*4); + rt_ip_fallback_handler(skb); + return NULL; + } +#endif + #ifdef FRAG_DBG rtdm_printk("RTnet: Unordered IP fragment (saddr:%x, daddr:%x)" " - dropped\n", iph->saddr, iph->daddr); @@ -276,6 +287,13 @@ struct rtskb *rt_ip_defrag(struct rtskb { /* Get the destination socket */ if ((sock = ipprot->dest_socket(skb)) == NULL) { +#ifdef CONFIG_RTNET_ADDON_PROXY + if (rt_ip_fallback_handler) { + __rtskb_push(skb, iph->ihl*4); + rt_ip_fallback_handler(skb); + return NULL; + } +#endif /* Drop the rtskb */ kfree_rtskb(skb); return NULL; -- ------------------------------------------------------------------------- This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone _______________________________________________ RTnet-users mailing list RTnet-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rtnet-users