summaryrefslogtreecommitdiffstats
path: root/sdpd
diff options
context:
space:
mode:
Diffstat (limited to 'sdpd')
-rw-r--r--sdpd/sdpd.h1
-rw-r--r--sdpd/service.c17
2 files changed, 18 insertions, 0 deletions
diff --git a/sdpd/sdpd.h b/sdpd/sdpd.h
index ad7a2d4f..0a2bccf4 100644
--- a/sdpd/sdpd.h
+++ b/sdpd/sdpd.h
@@ -91,3 +91,4 @@ typedef void (*service_classes_callback_t) (const bdaddr_t *bdaddr, uint8_t valu
uint8_t get_service_classes(const bdaddr_t *bdaddr);
void set_service_classes_callback(service_classes_callback_t callback);
+void create_ext_inquiry_response(const char *name, uint8_t *data);
diff --git a/sdpd/service.c b/sdpd/service.c
index 7f8296f4..bbc7fcc8 100644
--- a/sdpd/service.c
+++ b/sdpd/service.c
@@ -139,6 +139,23 @@ void set_service_classes_callback(service_classes_callback_t callback)
service_classes_callback = callback;
}
+void create_ext_inquiry_response(const char *name, uint8_t *data)
+{
+ if (name) {
+ int len = strlen(name);
+
+ if (len > 48) {
+ len = 48;
+ data[1] = 0x08;
+ } else
+ data[1] = 0x09;
+
+ data[0] = len + 1;
+
+ memcpy(data + 2, name, len);
+ }
+}
+
void register_public_browse_group(void)
{
sdp_list_t *browselist;