FreeBSD/usr.sbin/bluetooth/btpand/sdp.c
/*
 * _sdp_match_uuid16(ptr, limit, uuid)
 *
 *	examine SDP data stream at ptr for a UUID, and return
 *	true if it matches the supplied short alias bluetooth UUID.
 *	limit is the first address past the end of valid data.
 */
_sdp_match_uuid16(ptr, limit, uuid)
examine SDP data stream at ptr for a UUID, and return
true if it matches the supplied short alias bluetooth UUID.
limit is the first address past the end of valid data.
_sdp_match_uuid16 ( ptr limit uuid ) examine SDP data stream at ptr for a UUID and return true if it matches the supplied short alias bluetooth UUID . limit is the first address past the end of valid data .
bool
_sdp_match_uuid16(uint8_t **ptr, uint8_t *limit, uint16_t uuid)
{
	uint8_t *p = *ptr;
	uuid_t u1, u2;
	memcpy(&u1, &BASE_UUID, sizeof(uuid_t));
	u1.time_low = uuid;
	if (!_sdp_get_uuid(&p, limit, &u2)
	    || !uuid_equal(&u1, &u2, NULL))
		return false;
	*ptr = p;
	return true;
}
bool _sdp_match_uuid16 ( uint8_t * * ptr , uint8_t * limit , uint16_t uuid ) { uint8_t * p = * ptr ; uuid_t u1 , u2 ; memcpy ( & u1 , & BASE_UUID , sizeof ( uuid_t ) ) ; u1 . time_low = uuid ; if ( ! _sdp_get_uuid ( & p , limit , & u2 ) || ! uuid_equal ( & u1 , & u2 , NULL ) ) return false ; * ptr = p ; return true ; }
_sdp_match_uuid16(ptr, limit, uuid)
      examine SDP data stream at ptr for a UUID, and return
      true if it matches the supplied short alias bluetooth UUID.
_sdp_match_uuid16 ( ptr limit uuid ) examine SDP data stream at ptr for a UUID and return true if it matches the supplied short alias bluetooth UUID .