Processing IPv4 and ethernet - VxWorks

This is a discussion on Processing IPv4 and ethernet - VxWorks ; Hello Everyone, This is Raghavendra. Currently I am working on VxWorks. My task is to capture a data from the port and to find what type of data it is. That is wheather it is a IPV4 or a Ethernet ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: Processing IPv4 and ethernet

  1. Processing IPv4 and ethernet

    Hello Everyone,



    This is Raghavendra. Currently I am working on
    VxWorks. My task is to capture a data from the port and to find what
    type of data it is. That is wheather it is a IPV4 or a Ethernet frame.
    Can anyone of you know how to find this. Is their any built in
    functions in VxWorks.
    And I am using C language. Please help me out. It's very urgent.



    Thanks in Advance

    with smile
    raghu


  2. Re: Processing IPv4 and ethernet

    raghu wrote:
    > Hello Everyone,
    >
    >
    >
    > This is Raghavendra. Currently I am working on
    > VxWorks. My task is to capture a data from the port and to find what
    > type of data it is. That is wheather it is a IPV4 or a Ethernet frame.
    > Can anyone of you know how to find this. Is their any built in
    > functions in VxWorks.
    > And I am using C language. Please help me out. It's very urgent.
    >
    >
    >
    > Thanks in Advance
    >
    > with smile
    > raghu
    >

    Hi

    start by reading the network programmer's guide and other manuals.
    Basically, The network driver when it receives packets destined to it,
    it will deliver it to the MUX Layer (which sits between the driver and
    registed protocols in vxWorks). The mux layer (muxReceive) will loop
    through all registered protocols to decide which protocol needs this
    packet. One of these protocols is called a SNARF protocol. You have to
    register a SNARF protocol with the mux (muxBind(..) ) (call back
    function really). Then when the mux receive a packet from the driver, it
    will examine the protocols and if there is a SNARF protocol registered
    then it will give the packet to this protocol before any other protocol.
    here you will have the opportunity to examine the packet contents and
    then decide whether to return the packet to the mux (for delivery to
    other protocols) or not (the packet will not be delivered to other
    protocols).

    Hope this helps.


+ Reply to Thread