• Send Packet to 1G application

    From tariq siddiqui@21:1/5 to All on Wed Jul 11 12:43:35 2018
    Hi,

    I am working on a Kernel module which requires sending IP data to 1G application.
    I can successfully send Ethernet data/mblk to 1G driver whenusing muxsend(which then routes out of SBC). But when using receiveRtn as below, it doesn't forwards data to Application.
    *1G is not an NPT driver.

    Below is code snippet I am using to send data to 1G Application:

    Mux Bind code:

    port_ctx.pCookie = muxBind (
    papif_obj->port_ctx.name, papif_obj->port_ctx.ethUnit,
    NULL, NULL, NULL, NULL,
    MUX_PROTO_SNARF, "IP4 TCP/IP", (void *)&papif_obj->port_ctx);


    PROTOCOL_BINDING* pBinding = (PROTOCOL_BINDING*)pportctx->pCookie;
    status = pBinding->pEnd->receiveRtn((void *) pportctx->pCookie, mblk,NULL,NULL,NULL,NULL); // I see return code -1

    QUESTION: should above mblk be ethernet or IP packet.
    QUESTION: Is there any API to directly send data to 1G TCP/IP (without having to send data to Mux) ?


    Thanks

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From kuhlenough@gmail.com@21:1/5 to All on Thu Sep 5 10:50:16 2019
    1G support is very driver and version specific, so maybe.

    You might skip a few layers with a raw socket, and have more success. But the IP stack will still only take a complete 1M message and put it in Mbuf that is big enough if the stack has 1G clusters to work with.... and the driver code needs to register
    with the MUX that it likes frames that are 1G, otherwise the stack will break the message up before it hands off.

    The mBuf should big enough to hold the whole frame, you just leave a little bit blank space at the beginning for ether header, with the pointer fixed up to point to the start of the IP packet, the driver adds the Ethernet.

    unless the device has scatter/gather in which case it might be able to use a separate buffer for the ether header instead of doing a copy into another mBuff to get more room at the front.


    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)