From 4c5fe173fa34d25f553d12caec2b1969f205b35a Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Sun, 6 Jan 2013 20:36:02 -0800 Subject: [PATCH] unit: Add SDP Service Search Attribute Requests success responses --- unit/test-sdp.c | 92 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 92 insertions(+) diff --git a/unit/test-sdp.c b/unit/test-sdp.c index 52ec314c8..284d01c82 100644 --- a/unit/test-sdp.c +++ b/unit/test-sdp.c @@ -1458,6 +1458,98 @@ int main(int argc, char *argv[]) raw_pdu(0x07, 0x00, 0x01, 0x00, 0x05, 0x00, 0x02, 0x35, 0x00, 0x00)); + /* + * Service Search Attribute Request + * + * Verify the correct behaviour of the IUT when searching + * for existing Service(s) and Attribute(s) using + * ServiceSearchAttributeRequest. + */ + define_ssa("BV-04-C/UUID-16", + raw_pdu(0x06, 0x00, 0x01, 0x00, 0x0d, 0x35, 0x03, 0x19, + 0x11, 0x05, 0x00, 0x11, 0x35, 0x03, 0x09, 0x00, + 0x01, 0x00), + raw_pdu(0x07, 0x00, 0x01, 0x00, 0x0f, 0x00, 0x0c, 0x35, + 0x0a, 0x35, 0x08, 0x09, 0x00, 0x01, 0x35, 0x03, + 0x19, 0x11, 0x05, 0x00)); + define_ssa("BV-04-C/UUID-32", + raw_pdu(0x06, 0x00, 0x01, 0x00, 0x0f, 0x35, 0x05, 0x1a, + 0x00, 0x00, 0x11, 0x05, 0x00, 0x11, 0x35, 0x03, + 0x09, 0x00, 0x01, 0x00), + raw_pdu(0x07, 0x00, 0x01, 0x00, 0x0f, 0x00, 0x0c, 0x35, + 0x0a, 0x35, 0x08, 0x09, 0x00, 0x01, 0x35, 0x03, + 0x19, 0x11, 0x05, 0x00)); + define_ssa("BV-04-C/UUID-128", + raw_pdu(0x06, 0x00, 0x01, 0x00, 0x1b, 0x35, 0x11, 0x1c, + 0x00, 0x00, 0x11, 0x05, 0x00, 0x00, 0x10, 0x00, + 0x80, 0x00, 0x00, 0x80, 0x5f, 0x9b, 0x34, 0xfb, + 0x00, 0x11, 0x35, 0x03, 0x09, 0x00, 0x01, 0x00), + raw_pdu(0x07, 0x00, 0x01, 0x00, 0x0f, 0x00, 0x0c, 0x35, + 0x0a, 0x35, 0x08, 0x09, 0x00, 0x01, 0x35, 0x03, + 0x19, 0x11, 0x05, 0x00)); + + /* + * Service Search Attribute Request + * + * Verify the correct behaviour of the IUT when searching + * for existing Attributes, using Continuation State and + * ServiceSearchAttributeRequest. + */ + define_ssa("BV-06-C/UUID-16", + raw_pdu(0x06, 0x00, 0x01, 0x00, 0x10, 0x35, 0x03, 0x19, + 0x11, 0x05, 0x00, 0x07, 0x35, 0x06, 0x09, 0x00, + 0x00, 0x09, 0x00, 0x01, 0x00), + raw_pdu_cont(8, 0x07, 0x00, 0x01, 0x00, 0x12, 0x00, 0x07, 0x35, + 0x12, 0x35, 0x10, 0x09, 0x00, 0x00, 0x08), + raw_pdu_cont(8, 0x06, 0x00, 0x02, 0x00, 0x18, 0x35, 0x03, 0x19, + 0x11, 0x05, 0x00, 0x07, 0x35, 0x06, 0x09, 0x00, + 0x00, 0x09, 0x00, 0x01, 0x08), + raw_pdu_cont(8, 0x07, 0x00, 0x02, 0x00, 0x12, 0x00, 0x07, 0x0a, + 0x00, 0x01, 0x00, 0x01, 0x09, 0x00, 0x08), + raw_pdu_cont(8, 0x06, 0x00, 0x03, 0x00, 0x18, 0x35, 0x03, 0x19, + 0x11, 0x05, 0x00, 0x07, 0x35, 0x06, 0x09, 0x00, + 0x00, 0x09, 0x00, 0x01, 0x08), + raw_pdu(0x07, 0x00, 0x03, 0x00, 0x09, 0x00, 0x06, 0x01, + 0x35, 0x03, 0x19, 0x11, 0x05, 0x00)); + define_ssa("BV-06-C/UUID-32", + raw_pdu(0x06, 0x00, 0x01, 0x00, 0x12, 0x35, 0x05, 0x1a, + 0x00, 0x00, 0x11, 0x05, 0x00, 0x07, 0x35, 0x06, + 0x09, 0x00, 0x00, 0x09, 0x00, 0x01, 0x00), + raw_pdu_cont(8, 0x07, 0x00, 0x01, 0x00, 0x12, 0x00, 0x07, 0x35, + 0x12, 0x35, 0x10, 0x09, 0x00, 0x00, 0x08), + raw_pdu_cont(8, 0x06, 0x00, 0x02, 0x00, 0x1a, 0x35, 0x05, 0x1a, + 0x00, 0x00, 0x11, 0x05, 0x00, 0x07, 0x35, 0x06, + 0x09, 0x00, 0x00, 0x09, 0x00, 0x01, 0x08), + raw_pdu_cont(8, 0x07, 0x00, 0x02, 0x00, 0x12, 0x00, 0x07, 0x0a, + 0x00, 0x01, 0x00, 0x01, 0x09, 0x00, 0x08), + raw_pdu_cont(8, 0x06, 0x00, 0x03, 0x00, 0x1a, 0x35, 0x05, 0x1a, + 0x00, 0x00, 0x11, 0x05, 0x00, 0x07, 0x35, 0x06, + 0x09, 0x00, 0x00, 0x09, 0x00, 0x01, 0x08), + raw_pdu(0x07, 0x00, 0x03, 0x00, 0x09, 0x00, 0x06, 0x01, + 0x35, 0x03, 0x19, 0x11, 0x05, 0x00)); + define_ssa("BV-06-C/UUID-128", + raw_pdu(0x06, 0x00, 0x01, 0x00, 0x1e, 0x35, 0x11, 0x1c, + 0x00, 0x00, 0x11, 0x05, 0x00, 0x00, 0x10, 0x00, + 0x80, 0x00, 0x00, 0x80, 0x5f, 0x9b, 0x34, 0xfb, + 0x00, 0x07, 0x35, 0x06, 0x09, 0x00, 0x00, 0x09, + 0x00, 0x01, 0x00), + raw_pdu_cont(8, 0x07, 0x00, 0x01, 0x00, 0x12, 0x00, 0x07, 0x35, + 0x12, 0x35, 0x10, 0x09, 0x00, 0x00, 0x08), + raw_pdu_cont(8, 0x06, 0x00, 0x02, 0x00, 0x26, 0x35, 0x11, 0x1c, + 0x00, 0x00, 0x11, 0x05, 0x00, 0x00, 0x10, 0x00, + 0x80, 0x00, 0x00, 0x80, 0x5f, 0x9b, 0x34, 0xfb, + 0x00, 0x07, 0x35, 0x06, 0x09, 0x00, 0x00, 0x09, + 0x00, 0x01, 0x08), + raw_pdu_cont(8, 0x07, 0x00, 0x02, 0x00, 0x12, 0x00, 0x07, 0x0a, + 0x00, 0x01, 0x00, 0x01, 0x09, 0x00, 0x08), + raw_pdu_cont(8, 0x06, 0x00, 0x03, 0x00, 0x26, 0x35, 0x11, 0x1c, + 0x00, 0x00, 0x11, 0x05, 0x00, 0x00, 0x10, 0x00, + 0x80, 0x00, 0x00, 0x80, 0x5f, 0x9b, 0x34, 0xfb, + 0x00, 0x07, 0x35, 0x06, 0x09, 0x00, 0x00, 0x09, + 0x00, 0x01, 0x08), + raw_pdu(0x07, 0x00, 0x03, 0x00, 0x09, 0x00, 0x06, 0x01, + 0x35, 0x03, 0x19, 0x11, 0x05, 0x00)); + /* * Service Search Attribute Request * -- 2.47.3