FreeBSD/usr.sbin/bluetooth/hccontrol/node.c
/* Send Read_Node_Buffer_Size command to the node */
Send Read_Node_Buffer_Size command to the node
Send Read_Node_Buffer_Size command to the node
static int
hci_read_node_buffer_size(int s, int argc, char **argv)
{
	struct ng_btsocket_hci_raw_node_buffer	r;
	memset(&r, 0, sizeof(r));
	if (ioctl(s, SIOC_HCI_RAW_NODE_GET_BUFFER, &r, sizeof(r)) < 0)
		return (ERROR);
	fprintf(stdout, "Number of free command buffers: %d\n",
		r.buffer.cmd_free);
	fprintf(stdout, "Max. ACL packet size: %d\n",
		r.buffer.acl_size);
	fprintf(stdout, "Numbef of free ACL buffers: %d\n",
		r.buffer.acl_free);
	fprintf(stdout, "Total number of ACL buffers: %d\n",
		r.buffer.acl_pkts);
	fprintf(stdout, "Max. SCO packet size: %d\n",
		r.buffer.sco_size);
	fprintf(stdout, "Numbef of free SCO buffers: %d\n",
		r.buffer.sco_free);
	fprintf(stdout, "Total number of SCO buffers: %d\n",
		r.buffer.sco_pkts);
	return (OK);
}
static int hci_read_node_buffer_size ( int s , int argc , char * * argv ) { struct ng_btsocket_hci_raw_node_buffer r ; memset ( & r , 0 , sizeof ( r ) ) ; if ( ioctl ( s , SIOC_HCI_RAW_NODE_GET_BUFFER , & r , sizeof ( r ) ) < 0 ) return ( ERROR ) ; fprintf ( stdout , " \n " , r . buffer . cmd_free ) ; fprintf ( stdout , " \n " , r . buffer . acl_size ) ; fprintf ( stdout , " \n " , r . buffer . acl_free ) ; fprintf ( stdout , " \n " , r . buffer . acl_pkts ) ; fprintf ( stdout , " \n " , r . buffer . sco_size ) ; fprintf ( stdout , " \n " , r . buffer . sco_free ) ; fprintf ( stdout , " \n " , r . buffer . sco_pkts ) ; return ( OK ) ; }
Send Read_Node_Buffer_Size command to the node
Send Read_Node_Buffer_Size command to the node