FreeBSD/usr.sbin/bluetooth/hccontrol/node.c
/* Send Write_Node_Packet_Mask command to the node */
Send Write_Node_Packet_Mask command to the node
Send Write_Node_Packet_Mask command to the node
int
hci_write_node_packet_mask(int s, int argc, char **argv)
{
	struct ng_btsocket_hci_raw_node_packet_mask	r;
	int						m;
	memset(&r, 0, sizeof(r));
	switch (argc) {
	case 1:
		if (sscanf(argv[0], "%x", &m) != 1)
			return (USAGE);
		r.packet_mask = (m & 0xffff);
		break;
	default:
		return (USAGE);
	}
	if (ioctl(s, SIOC_HCI_RAW_NODE_SET_PACKET_MASK, &r, sizeof(r)) < 0)
		return (ERROR);
	return (OK);
}
int hci_write_node_packet_mask ( int s , int argc , char * * argv ) { struct ng_btsocket_hci_raw_node_packet_mask r ; int m ; memset ( & r , 0 , sizeof ( r ) ) ; switch ( argc ) { case 1 : if ( sscanf ( argv [ 0 ] , " " , & m ) != 1 ) return ( USAGE ) ; r . packet_mask = ( m & 0xffff ) ; break ; default : return ( USAGE ) ; } if ( ioctl ( s , SIOC_HCI_RAW_NODE_SET_PACKET_MASK , & r , sizeof ( r ) ) < 0 ) return ( ERROR ) ; return ( OK ) ; }
Send Write_Node_Packet_Mask command to the node
Send Write_Node_Packet_Mask command to the node