Skip to content

Injection Architecture

palesius edited this page Nov 12, 2013 · 4 revisions

###Overview The manager allows packets to be injected to each endpoint. Each packet is added to a thread safe queue specific to the endpoint, and will be read on the next pass through the endpoint relaying loop.

Packet structure

  • short length: size of packet
  • byte endpoint: the endpoint it is being sent to
  • bool filter: whether packet should be filtered
  • bool transmit: whether the packet should be transmitted to the host/device
  • byte data[]: the actual data payload

functions

  • int send_packet(packet): filters can choose to apply host and/or device side filters or neither
  • int send_setup(byte[8] request,byte[] data, byte filters): it's worth mentioning here that the data should be coming back to the injection function, not to the host. As long as the DeviceProxy has a synchronous control_request function that should not be a problem.

examples (this interface could be use to listen for packets to inject via)

  • TCP/IP
  • serial
  • named pipes
  • message queues
  • log playback