TCP/IP Stack in VxWorks - VxWorks

This is a discussion on TCP/IP Stack in VxWorks - VxWorks ; Hello everybody , I'm a newbie in VxWorks networking stack. I want to use "ipFilterHookAdd" function in my own source , and as it has been said in Tornado Online manual help , I include the "IpFilter" component to my ...

+ Reply to Thread
Results 1 to 3 of 3

Thread: TCP/IP Stack in VxWorks

  1. TCP/IP Stack in VxWorks

    Hello everybody ,

    I'm a newbie in VxWorks networking stack. I want to use
    "ipFilterHookAdd" function in my own source , and as it has been said
    in Tornado Online manual help , I include the "IpFilter" component to
    my VxWorks to do some initialization before calling the
    "ipFilterHookAdd" . But in this way , it seems that all the network
    relation are cut ! ( I'm not able to ping or telnet my Tearget from
    the Host) . On the other hand , when I remove the "IpFilter" component
    and try to initialize manualy ( by calling "ipFilterLibInit" directly
    from my source ) , I give the < Invalid Opcode> error! what's wrong?
    How can I link the "ipFilterHookAdd" in my source ?

    Thanks in advance


  2. Re: TCP/IP Stack in VxWorks

    On Aug 14, 4:56 pm, Neda.Ragh...@gmail.com wrote:
    > Hello everybody ,
    >
    > I'm a newbie in VxWorks networking stack. I want to use
    > "ipFilterHookAdd" function in my own source , and as it has been said
    > in Tornado Online manual help , I include the "IpFilter" component to
    > my VxWorks to do some initialization before calling the
    > "ipFilterHookAdd" . But in this way , it seems that all the network
    > relation are cut ! ( I'm not able to ping or telnet my Tearget from
    > the Host) .

    What is the value that the hook function returns? The hook function is
    supposed to return FALSE if the normal processing of the packet has to
    proceed.

    > On the other hand , when I remove the "IpFilter" component
    > and try to initialize manualy ( by calling "ipFilterLibInit" directly
    > from my source ) , I give the < Invalid Opcode> error! what's wrong?
    > How can I link the "ipFilterHookAdd" in my source ?
    >
    > Thanks in advance




  3. Re: TCP/IP Stack in VxWorks

    On Aug 14, 6:06 pm, Sriram wrote:
    > On Aug 14, 4:56 pm, Neda.Ragh...@gmail.com wrote:> Hello everybody ,
    >
    > > I'm a newbie in VxWorks networking stack. I want to use
    > > "ipFilterHookAdd" function in my own source , and as it has been said
    > > in Tornado Online manual help , I include the "IpFilter" component to
    > > my VxWorks to do some initialization before calling the
    > > "ipFilterHookAdd" . But in this way , it seems that all the network
    > > relation are cut ! ( I'm not able to ping or telnet my Tearget from
    > > the Host) .

    >
    > What is the value that the hook function returns? The hook function is
    > supposed to return FALSE if the normal processing of the packet has to
    > proceed.
    >
    >
    >
    > > On the other hand , when I remove the "IpFilter" component
    > > and try to initialize manualy ( by calling "ipFilterLibInit" directly
    > > from my source ) , I give the < Invalid Opcode> error! what's wrong?
    > > How can I link the "ipFilterHookAdd" in my source ?

    >
    > > Thanks in advance- Hide quoted text -

    >
    > - Show quoted text -


    Here is code :


    BOOL Igbf_ipFilterHook(struct ifnet *pIf, /* interface that
    received the packet */
    struct mbuf **pPtrMbuf, /* pointer to pointer
    to an mbuf chain */
    struct ip **pPtrIpHdr, /* pointer to pointer
    to IP header */
    int ipHdrLen /* IP packet header
    length */
    )
    {

    printf("(IGBF): Igbf_ipFilterHook!\n");
    return FALSE ;

    }

    int demo (void)
    {

    int Dummy ;

    ipFilterLibInit() ;

    if(ipFilterHookAdd( (FUNCPTR) Igbf_ipFilterHook) != OK ){
    printf("ERRROR ... IGBF failed to hook !
    \n");
    printf("Press any key to exit...");
    scanf("%d", &Dummy);
    return -1 ;
    }

    scanf("%d", &Dummy);
    printf("(IGBF):Terminated!\n");

    return 0 ;
    }

    but when I run it from Debugger , after "ipFilterLibInit" , I see the
    following msg on my target system :
    Invalid Opcode

    What's wrong?



+ Reply to Thread