android/tester: Add generic hook to handle pdu exchange

System Internals / BlueZ - Jakub Tyszkowski [tieto.com] - 2 October 2014 06:20 UTC

This allows tester-main to register hooks for certain CID to automatically perform pdu exchange by registering array of pdu pairs (request_pdu, response_pdu). When end_pdu is used instead of request_pdu, response is sent immediately without incoming pdu
verification. A pair with end_pdus set as request and response is considered as the end of pdu pairs array.

This callback can also handle sdp request<->response while transaction ID for the response is swaped to match the one from SDP request.

'emu_l2cap_cid_data' is used to pass tha appropriate data to the hook mechanism. It is similar to 'emu_cid_data" used in other testers and eventually will replace those.

634101d android/tester: Add generic hook to handle pdu exchange
android/tester-main.c | 61 +++++++++++++++++++++++++++++++++++++++++++++++++
android/tester-main.h | 10 ++++++++
2 files changed, 71 insertions(+)

Upstream: git.kernel.org


  • Share