<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">There's way to tap into the packet stream, but I don't recall who did the work.<div><br><div>From net/if.c:</div><div><div><br></div><div>        /*</div><div>         * RTEMS additions for setting/getting `tap' function</div><div>         */</div><div>        case SIOCSIFTAP:</div><div>                ifp->if_tap = ifr->ifr_tap;</div><div>                return 0;</div><div><br></div><div>        case SIOCGIFTAP:</div><div>                ifr->ifr_tap = ifp->if_tap;</div><div>                return 0;</div><div>        }</div><div><br></div><div><br></div><div>And from net/if_ethersubr.c:</div><div><br></div><div><div>    /*</div><div>     * RTEMS addition -- allow application to `tap into'</div><div>     * the incoming packet stream.</div><div>     */</div><div>    if (ifp->if_tap && (*ifp->if_tap)(ifp, eh, m)) {</div><div>        m_freem(m);</div><div>        return;</div><div>    }</div><div><br></div><div><br></div><div><br></div><div><div>On Apr 14, 2011, at 2:21 PM, Daron Chabot wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><br><br><div class="gmail_quote">On Thu, Apr 14, 2011 at 5:16 PM, Brett Swimley <span dir="ltr"><<a href="mailto:brett.swimley@aedbozeman.com">brett.swimley@aedbozeman.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

Thanks Daron,<div><br></div><div>I had found this reference, and it appears that libpcap uses this API, so I will continue looking. I'm hoping that the RTEMS stack does support bpf.</div></blockquote><div><br>I had a brief grep through the source tree and noted that there were only 3 NIC drivers that had the bpf_mtap( ) interface (all ported from FreeBSD!):<br>

<br>dchabot@dev32new--> git grep -n bpf c/src/libchip/network <br>c/src/libchip/network/i82586.c:1280:  if (sc->arpcom.ac_if.if_bpf != 0)<br>c/src/libchip/network/i82586.c:1282:    bpf_mtap(sc->arpcom.ac_if.if_bpf, m);<br>

c/src/libchip/network/i82586.c:1378:    if (ifp->if_bpf)<br>c/src/libchip/network/i82586.c:1379:      bpf_mtap(ifp->if_bpf, m0);<br>c/src/libchip/network/if_dc.c:159:#include <net/bpf.h><br>c/src/libchip/network/if_dc.c:3372:             if (ifp->if_bpf)<br>

c/src/libchip/network/if_dc.c:3373:                     bpf_mtap(ifp, m_head);<br>c/src/libchip/network/if_fxp.c:87:#include <net/bpf.h><br>c/src/libchip/network/if_fxp.c:1262:             * Pass packet to bpf if there i<br>

c/src/libchip/network/if_fxp.c:1264:            if (ifp->if_bpf)<br>c/src/libchip/network/if_fxp.c:1265:                    bpf_mtap(ifp, mb_head);<br><br>But, on further inspection, the bpf_mtaps( ) were "#if 0"'d out of commission.<br>

<br>Then there's the issue of creating /dev/bpfX device nodes...<br><br>I would be surprised if someone out there doesn't have something already, perhaps created to support message passing between nodes of a distributed, multi-processing system?<br>

<br>I'm looking at you Till... ;-)<br><br><br>-- dc<br> </div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><div><br></div><font color="#888888"><div>

Brett</div></font><div><div></div><div class="h5">
<div><br><br><div class="gmail_quote">On Thu, Apr 14, 2011 at 2:30 PM, Daron Chabot <span dir="ltr"><<a href="mailto:daron.chabot@gmail.com" target="_blank">daron.chabot@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">


Hi Brett,<br><br>I have not looked into this in much detail, but since RTEMS' network stack is ported from FreeBSD, you may be able to use the Berkley Packet Filter (bpf) API for this.<br><br><br><br>-- dc<br><br><br>


<div class="gmail_quote"><div><div></div><div><br></div></div></div>
</blockquote></div><br></div>
</div></div></blockquote></div><br>
_______________________________________________<br>rtems-users mailing list<br><a href="mailto:rtems-users@rtems.org">rtems-users@rtems.org</a><br>http://www.rtems.org/mailman/listinfo/rtems-users<br></blockquote></div><br><div>
<div>-- <br>Eric Norum<br><a href="mailto:wenorum@lbl.gov">wenorum@lbl.gov</a></div>
</div>
<br></div></div></div></body></html>