This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Inject messages into the RL-TCPnet stack

Hi there,

Is is possible to inject messages into the TCPnet buffers so that they would be processed as received via the PPP or Ethernet ports?

I have seen that the TCPnet stack can use both the Ethernet and PPP ports to transfer data but in out application we need a 3'rd port (we do not use the Ethernet, we use a PPP connection over a USB-CDC device) to transfer TCP data.

Our goal is to allow access to the web server from the
PPP link and from a serial port link.

I am thinking about opening two sockets on two different ports 'aaaa' as client and 'bbbb' as server and then to establish a connection between the two sockets so that I can send data from one to another.
Would such an approach work with the RL-TCPnet? Are there other alternatives?

Thanks and best regards,
Doru

Parents
  • I am thinking about opening two sockets on two different ports 'aaaa' as client and 'bbbb' as server and then to establish a connection between the two sockets so that I can send data from one to another.
    Would such an approach work with the RL-TCPnet? Are there other alternatives?

    this sounds like a conventional approach. I guess "injecting" messages boils down to using TCPNet to communicate...

Reply
  • I am thinking about opening two sockets on two different ports 'aaaa' as client and 'bbbb' as server and then to establish a connection between the two sockets so that I can send data from one to another.
    Would such an approach work with the RL-TCPnet? Are there other alternatives?

    this sounds like a conventional approach. I guess "injecting" messages boils down to using TCPNet to communicate...

Children
  • Maybe I was not explicit enough; I meant opening the sockets within two different tasks running within one device, I can do that in Linux with PF_LOCAL sockets.

    This is one way I was thinking of achieving communication over a 3'rd port ( TCPnet supports two network interfaces PPP and Ethernet) and we need a 3'rd one (we're not using the Ethernet interface.

    I am also thinking about using the “dispatch_frame (OS_FRAME *frame, U8 netif) “function to send messages to the 3'rd network interface and to manually call the “process_hl_tcp (OS_FRAME *frame)†after receiving a frame from the 3'rd network interface. Is this feasible?

    Another way I'm thinking would be to make the 3'rd network interface pretend that is the Ethernet interface and to change the Ethernet driver to redirect traffic through our interface, I would change the Ethernet driver and use it to communicate with our own interface.

    Which one of these 3 ways would work and which one is easier?

    Thanks,
    Doru