FreeBSD/usr.sbin/bluetooth/hccontrol/node.c
/* Send Read_Node_Stat command to the node */
Send Read_Node_Stat command to the node
Send Read_Node_Stat command to the node
static int
hci_read_node_stat(int s, int argc, char **argv)
{
	struct ng_btsocket_hci_raw_node_stat	r;
	memset(&r, 0, sizeof(r));
	if (ioctl(s, SIOC_HCI_RAW_NODE_GET_STAT, &r, sizeof(r)) < 0)
		return (ERROR);
	fprintf(stdout, "Commands sent: %d\n", r.stat.cmd_sent);
	fprintf(stdout, "Events received: %d\n", r.stat.evnt_recv);
	fprintf(stdout, "ACL packets received: %d\n", r.stat.acl_recv);
	fprintf(stdout, "ACL packets sent: %d\n", r.stat.acl_sent);
	fprintf(stdout, "SCO packets received: %d\n", r.stat.sco_recv);
	fprintf(stdout, "SCO packets sent: %d\n", r.stat.sco_sent);
	fprintf(stdout, "Bytes received: %d\n", r.stat.bytes_recv);
	fprintf(stdout, "Bytes sent: %d\n", r.stat.bytes_sent);
	return (OK);
}
static int hci_read_node_stat ( int s , int argc , char * * argv ) { struct ng_btsocket_hci_raw_node_stat r ; memset ( & r , 0 , sizeof ( r ) ) ; if ( ioctl ( s , SIOC_HCI_RAW_NODE_GET_STAT , & r , sizeof ( r ) ) < 0 ) return ( ERROR ) ; fprintf ( stdout , " \n " , r . stat . cmd_sent ) ; fprintf ( stdout , " \n " , r . stat . evnt_recv ) ; fprintf ( stdout , " \n " , r . stat . acl_recv ) ; fprintf ( stdout , " \n " , r . stat . acl_sent ) ; fprintf ( stdout , " \n " , r . stat . sco_recv ) ; fprintf ( stdout , " \n " , r . stat . sco_sent ) ; fprintf ( stdout , " \n " , r . stat . bytes_recv ) ; fprintf ( stdout , " \n " , r . stat . bytes_sent ) ; return ( OK ) ; }
Send Read_Node_Stat command to the node
Send Read_Node_Stat command to the node