Re: Re: Developping a forwarding application

Home Forums Discussions Support Developing a forwarding application Re: Re: Developping a forwarding application

#6873
Eldred
Participant

    I installed the VirtNet interface and it should be easier to do the forwarding : if I’m able to check the packets’ source and destination, I’ll “just” have to call SendPacketsToAdapter() where ETH_M_REQUEST.hAdapterHandle is set to the handle of the virtnet interface.

    I’m trying to build an example in order to learn how to use the API. I want to use the C++ class to integrate it into an existing program. But I use MinGW and the build fails :

    C:UsersEldredDocumentssrc_testip_forward>g++ -o ip_forward main.cc -lndisapi
    C:UsersEldredAppDataLocalTemp/ccO5lqAd.o:main.cc:(.text+0x19e): undefined r
    eference to `_imp___ZN8CNdisApiC1EPKc’
    C:UsersEldredAppDataLocalTemp/ccO5lqAd.o:main.cc:(.text+0x1bb): undefined r
    eference to `CNdisApi::~CNdisApi()’

    The link seems to be correct however, because if I don’t do this I have one more error. Any idea to fix this error ?

    I also have another question : I ran listadapters.exe and it shew me a list of interfaces. Then, I plugged a 3G key and ran again the program : it shew me the same list as before. Is this normal ?