FreeBSD/usr.sbin/bluetooth/hccontrol/node.c
/* Send Read_Node_Features command to the node */
Send Read_Node_Features command to the node
Send Read_Node_Features command to the node
static int
hci_read_node_features(int s, int argc, char **argv)
{
	struct ng_btsocket_hci_raw_node_features	r;
	int						n;
	char						buffer[1024];
	memset(&r, 0, sizeof(r));
	if (ioctl(s, SIOC_HCI_RAW_NODE_GET_FEATURES, &r, sizeof(r)) < 0)
		return (ERROR);
	fprintf(stdout, "Features: ");
	for (n = 0; n < sizeof(r.features)/sizeof(r.features[0]); n++)
		fprintf(stdout, "%#02x ", r.features[n]);
	fprintf(stdout, "\n%s\n", hci_features2str(r.features, 
		buffer, sizeof(buffer)));
	return (OK);
}
static int hci_read_node_features ( int s , int argc , char * * argv ) { struct ng_btsocket_hci_raw_node_features r ; int n ; char buffer [ 1024 ] ; memset ( & r , 0 , sizeof ( r ) ) ; if ( ioctl ( s , SIOC_HCI_RAW_NODE_GET_FEATURES , & r , sizeof ( r ) ) < 0 ) return ( ERROR ) ; fprintf ( stdout , " " ) ; for ( n = 0 ; n < sizeof ( r . features ) / sizeof ( r . features [ 0 ] ) ; n ++ ) fprintf ( stdout , " " , r . features [ n ] ) ; fprintf ( stdout , " \n \n " , hci_features2str ( r . features , buffer , sizeof ( buffer ) ) ) ; return ( OK ) ; }
Send Read_Node_Features command to the node
Send Read_Node_Features command to the node