亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? tcs.c

?? bluetooth 驅動
?? C
?? 第 1 頁 / 共 2 頁
字號:
/* * tcs.c -- Implementation of Bluetooth Telephony Control Protocol  *          Specification, TCS Binary * * Copyright (C) 2000, 2001  Axis Communications AB * * Author: Mattias Agren <mattias.agren@axis.com> * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA. * * Exceptionally, Axis Communications AB grants discretionary and * conditional permissions for additional use of the text contained * in the company's release of the AXIS OpenBT Stack under the * provisions set forth hereunder. * * Provided that, if you use the AXIS OpenBT Stack with other files, * that do not implement functionality as specified in the Bluetooth * System specification, to produce an executable, this does not by * itself cause the resulting executable to be covered by the GNU * General Public License. Your use of that executable is in no way * restricted on account of using the AXIS OpenBT Stack code with it. * * This exception does not however invalidate any other reasons why * the executable file might be covered by the provisions of the GNU * General Public License. * * $Id: tcs.c,v 1.15 2001/03/30 12:08:45 mattiasagren Exp $ * *//****************** INCLUDE FILES SECTION ***********************************/#define __NO_VERSION__ /* don't define kernel_version in module.h */#ifdef __KERNEL__#include <linux/malloc.h>#include <linux/bluetooth/btdebug.h>#include <linux/bluetooth/btcommon.h>#include <linux/bluetooth/btmem.h>#include <linux/bluetooth/tcs.h>#include <linux/bluetooth/l2cap.h>#include <linux/bluetooth/hci.h>#else /* user mode */#include <string.h>#include "include/btdebug.h"#include "include/btcommon.h"#include "include/btmem.h"#include "include/tcs.h"#include "include/l2cap.h"#include "include/hci.h"#endif/****************** DEBUG CONSTANT AND MACRO SECTION ************************/#define TCS_DBG_STR "           TCS "#if TCS_DEBUG_XMIT#define D_XMIT(fmt, args...) printk(TCS_DBG_STR fmt, ## args)#else#define D_XMIT(fmt, args...)#endif#if TCS_DEBUG_REC#define D_REC(fmt, args...) printk(TCS_DBG_STR fmt, ## args)#else#define D_REC(fmt, args...)#endif#if TCS_DEBUG_MISC#define D_MISC(fmt, args...) printk(TCS_DBG_STR fmt, ## args)#else#define D_MISC(fmt, args...)#endif#if TCS_PRINT_DATA#define PRINTPKT(str, data, len) print_data(str, data, len)#else#define PRINTPKT(str, data, len)#endif/****************** CONSTANT AND MACRO SECTION ******************************/#define TCS_NBR_OF_LINES 1/* Values used for the L2CAP configuration process */#define TCS_MTU 672/* Default, why should we be different */#define TCS_QOS 0x01 /* Best effort */#define TCS_FLUSH_TIMEOUT 0xffff /* Reliable channel, infinite amout of retransmissions *//* Call Control messages *//* Call Establishment */#define CALL_CONTROL 0x0#define ALERTING 0x0#define CALL_PROCEEDING 0x1#define CONNECT 0x2#define CONNECT_ACKNOWLEDGE 0x3#define PROGRESS 0x4#define SETUP 0x5#define SETUP_ACKNOWLEDGE 0x6/* Call clearing */#define DISCONNECT 0x7#define RELEASE 0x8#define RELEASE_COMPLETE 0x9/* Miscellaneous */#define INFORMATION 0xa#define START_DTMF 0x10#define START_DTMF_ACKNOWLEDGE 0x11#define START_DTMF_REJECT 0x12#define STOP_DTMF 0x13#define STOP_DTMF_ACKNOWLEDGE 0x14/* Group management messages */#define GROUP_MANAGEMENT 0x1#define INFO_SUGGEST 0x0#define INFO_ACCEPT 0x1#define LISTEN_REQUEST 0x2#define LISTEN_ACCEPT 0x3#define LISTEN_SUGGEST 0x4#define LISTEN_REJECT 0x5#define ACCESS_RIGHTS_REQUEST 0x6#define ACCESS_RIGHTS_ACCEPT 0x7#define ACCESS_RIGHTS_REJECT 0x8/* Connectionless messages */#define CONNECTIONLESS 0x2#define CL_INFO 0x0/* Single octet information elements */#define SENDING_COMPLETE 0xa1/* Double octet information elements */#define CALL_CLASS 0xc0#define CAUSE 0xc1#define PROGRESS_INDICATOR 0xc2 #define SIGNAL 0xc3#define KEYPAD_FACILITY 0xc4 #define SCO_HANDLE 0xc5/* Variable length information elements */#define CLOCK_OFFSET 0x0#define CONFIGURATION_DATA 0x1 #define BEARER_CAPABILITY 0x2#define DESTINATION_CID 0x3#define CALLING_PARTY_NUMBER 0x4 #define CALLED_PARTY_NUMBER 0x5#define AUDIO_CONTROL 0x6#define COMPANY_SPECIFIC 0x7/* Other information parameters *//* Bearer capability parameters */#define SCO_LINK 0x0#define ACL_LINK 0x1#define HV1_PACKET 0x5#define HV2_PACKET 0x6#define HV3_PACKET 0x7#define DV_PACKET 0x8#define CVSD 0x1#define PCM_A 0x2#define PCM_U 0x3/* Call class parameters */#define EXTERNAL_CALL 0x0#define INTERCOM_CALL 0x1#define SERVICE_CALL 0x2#define EMERGENCY_CALL 0x3/* Cause parameters */#define NORMAL_CALL_CLEARING 0x10/* Signal parameters */#define EXTERNAL_CALL_SIGNAL 0x40#define INTERNAL_CALL_SIGNAL 0x41#define CALL_BACK_SIGNAL 0x42/****************** TYPE DEFINITION SECTION *********************************/typedef struct tcs_message {	s32 type:5;	s32 prot_disc:3;	u8 info[0];} tcs_message;/****************** LOCAL FUNCTION DECLARATION SECTION **********************/static void process_cc_msg(l2cap_con *l2cap, u8* data, u32 len);static void process_gw_msg(l2cap_con *l2cap, u8* data, u32 len);static void process_cl_msg(l2cap_con *l2cap, u8* data, u32 len);static s32 send_single_octet_msg(l2cap_con *l2cap, u8 type, u8 prot_disc);static s32 send_tcs_msg(l2cap_con *l2cap, u8 type, u8 prot_disc, u8 *nfo, u32 nfo_len);/****************** GLOBAL VARIABLE DECLARATION SECTION *********************//****************** LOCAL VARIABLE DECLARATION SECTION **********************/tcs_con tcs[TCS_NBR_OF_LINES];/****************** FUNCTION DEFINITION SECTION *****************************/void tcs_init(void){	s32 i;	protocol_layer this_layer;	DSYS("Initialising TCS\n");	for (i = 0; i < TCS_NBR_OF_LINES; i++) {		tcs[i].tcs_cur_state = STATE_NULL;	}		/* Set the confirm and indication functions for the L2CAP-layer */	this_layer.con_ind = tcs_connect_ind;	this_layer.conf_ind = tcs_config_ind;	this_layer.disc_ind = tcs_disconnect_ind;	this_layer.con_cfm = tcs_connect_cfm;	this_layer.conf_cfm = tcs_config_cfm;	this_layer.disc_cfm = tcs_disconnect_cfm;	this_layer.receive_data = tcs_receive_data;	/* Register TCS in the L2CAP layer*/	l2cap_register_upper(TCS_LAYER, &this_layer);}void tcs_shutdown(void){	DSYS("Shutting down TCS\n");	tcs[0].tcs_cur_state = STATE_NULL;	}s32tcs_connect_req(u8 *bd){	if (l2ca_connect_req(bd, TCS_LAYER)) {		D_ERR(" tcs_connect_req: l2ca_connect_req failed\n");		return -1; 	}	return 0;}void tcs_connect_ind(l2cap_con *l2cap) {	D_MISC("tcs_connect_ind : remote cid : %d\n", l2cap->remote_cid);	tcs[0].l2cap = l2cap;		if(l2ca_connect_rsp(l2cap, RES_SUCCESS, STAT_NOINFO)){		D_ERR("tcs_connect_ind: l2ca_connect_rsp failed\n"); 	}}void tcs_connect_cfm(l2cap_con *l2cap, s32 status){	D_MISC("tcs_connect_cfm : remote cid : %d\n", l2cap->remote_cid);		if ( !l2ca_local_conf_done(l2cap) )	{		/* still haven't sent config request yet */		if(l2ca_config_req(l2cap, 0, NULL, 0, 0)){			D_ERR("tcs_connect_cfm : Conf req failed\n");		}		/* store connection */		tcs[0].l2cap = l2cap;	} else 	       		D_REC("tcs_config_cfm : already have sent config request\n");}void tcs_config_ind(l2cap_con* l2cap){	D_MISC("tcs_config_ind : remote cid : %d\n", l2cap->remote_cid);	/* check if we have sent a pos response yet */	if (!l2ca_remote_conf_done(l2cap)){		/* still haven't sent a pos configure response*/				if (l2ca_config_rsp(l2cap, l2cap->remote_mtu, 				    NULL, CONF_SUCCESS)){			D_ERR("tcs_config_ind : Conf rsp failed\n");		}    			} else 		printk("tcs_config_ind : already sent back a pos response\n");		/* check if we received a pos response on a previous config req */	if (!l2ca_local_conf_done(l2cap))	{		if (!l2cap->initiator) {			l2cap->local_mtu=l2cap->remote_mtu;			DSYS("tcs_config_ind : local l2cap mtu set to %d\n", 			     l2cap->local_mtu);						/* up3 -- fixme, use real options not static values */			if(l2ca_config_req(l2cap, 0, NULL, 0, 0)){				D_ERR("tcs_config_ind : Conf request failed\n");			}		}	} else 		DSYS("tcs_config_ind : already ready with config req\n");}void tcs_config_cfm(l2cap_con *l2cap, s32 status){	D_MISC("tcs_config_cfm :  remote cid : %d\n", l2cap->remote_cid);	DSYS("Now we have an open l2cap channel for TCS\n");	/* tcs negotiation */	if (!l2cap->initiator){		/* Server case */		tcs[0].acl_hdl = l2cap->hci_hdl;	} else {		tcs[0].acl_hdl = l2cap->hci_hdl;		/* Client case */	}}void tcs_disconnect_req(u32 tcs_hdl){	D_ERR("tcs_disconnect_req : NOT DONE\n");}  void tcs_disconnect_ind(l2cap_con *l2cap) {	D_MISC("tcs_disconnect_ind : remote cid : %d\n", l2cap->remote_cid);	l2ca_disconnect_rsp(l2cap);}void tcs_disconnect_cfm(l2cap_con *l2cap){	D_MISC("tcs_disconnect_cfm : remote cid : %d\n",l2cap->remote_cid);}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
床上的激情91.| 91精品黄色片免费大全| 91同城在线观看| 欧美中文字幕亚洲一区二区va在线| 99精品国产99久久久久久白柏| 色吧成人激情小说| 在线综合+亚洲+欧美中文字幕| 精品粉嫩aⅴ一区二区三区四区| 国产精品免费人成网站| 午夜电影网亚洲视频| 韩日欧美一区二区三区| 91浏览器在线视频| 日韩一级完整毛片| 亚洲靠逼com| 国产在线精品一区二区不卡了| 91色视频在线| 久久久精品综合| 亚洲丰满少妇videoshd| 国产乱妇无码大片在线观看| 日本韩国一区二区三区视频| 久久综合久久久久88| 亚洲一级二级在线| 成人综合婷婷国产精品久久免费| 在线综合+亚洲+欧美中文字幕| 中文字幕+乱码+中文字幕一区| 日本亚洲最大的色成网站www| aaa国产一区| 日韩一区二区三区高清免费看看| 亚洲免费视频成人| 丰满岳乱妇一区二区三区| 欧美精品1区2区| 亚洲欧美一区二区不卡| 国产一区二区精品久久| 91精品婷婷国产综合久久竹菊| 国产精品久久三区| 高清不卡在线观看| 精品久久国产老人久久综合| 亚洲成人资源在线| 91丨国产丨九色丨pron| 国产精品免费久久久久| 国产一区二区在线看| 日韩一级黄色大片| 日韩国产精品久久久| 欧美中文字幕一区| 自拍偷拍国产亚洲| av电影在线不卡| 国产精品久久久久久亚洲毛片| 国产一区在线观看麻豆| 中文字幕免费在线观看视频一区| 国产成人鲁色资源国产91色综 | 亚洲成av人综合在线观看| 色激情天天射综合网| 亚洲一区二区在线播放相泽 | 亚洲乱码中文字幕| 欧美图区在线视频| 美腿丝袜在线亚洲一区| 久久精品男人天堂av| 99精品国产99久久久久久白柏| 亚洲综合清纯丝袜自拍| 91精品国产综合久久精品麻豆| 精品亚洲成av人在线观看| 中文字幕第一区综合| 91成人在线观看喷潮| 日韩精品一二三| 国产网站一区二区| 欧美日韩第一区日日骚| 国产一级精品在线| 亚洲综合视频网| 26uuu国产日韩综合| 色久综合一二码| 韩国欧美一区二区| 夜夜嗨av一区二区三区四季av| 日韩一区二区三区三四区视频在线观看| 高清不卡一区二区| 秋霞电影一区二区| 亚洲日本中文字幕区| 日韩欧美一级特黄在线播放| 成人美女视频在线看| 日韩av高清在线观看| 1024国产精品| 精品久久五月天| 欧美三级三级三级爽爽爽| 成人性生交大片免费看中文网站| 亚洲午夜精品久久久久久久久| 国产情人综合久久777777| 欧美精品一卡两卡| 一本久久综合亚洲鲁鲁五月天| 精品中文字幕一区二区小辣椒| 亚洲人成网站影音先锋播放| 久久毛片高清国产| 日韩视频永久免费| 欧美人体做爰大胆视频| 91理论电影在线观看| 国产成人丝袜美腿| 麻豆免费精品视频| 亚洲a一区二区| 亚洲九九爱视频| 中文字幕佐山爱一区二区免费| 精品国产免费久久| 日韩天堂在线观看| 欧美精品 国产精品| 在线观看成人免费视频| www..com久久爱| 成人一区在线观看| 国产精品一区二区久激情瑜伽| 久久精品国产亚洲aⅴ| 日韩黄色片在线观看| 亚洲成人在线网站| 图片区小说区国产精品视频| 亚洲精品国产一区二区三区四区在线| 中文字幕av资源一区| 久久精品欧美日韩| 中文字幕av一区二区三区高 | 日韩码欧中文字| 国产精品久久影院| 亚洲视频综合在线| 亚洲三级在线免费| 一区二区三区久久| 亚洲国产精品视频| 日韩国产欧美三级| 美女网站色91| 国产伦精品一区二区三区免费迷| 国产一区二区三区免费在线观看| 黄色资源网久久资源365| 国产裸体歌舞团一区二区| 国产麻豆成人精品| www.欧美色图| 欧美日韩在线免费视频| 88在线观看91蜜桃国自产| 日韩视频免费观看高清完整版在线观看 | 亚洲影院在线观看| 亚洲sss视频在线视频| 日本欧美大码aⅴ在线播放| 免费av成人在线| 国产精品资源网| 99久久久无码国产精品| 欧美三片在线视频观看 | 91麻豆6部合集magnet| 欧美午夜精品免费| 欧美tickling网站挠脚心| 国产视频一区二区在线| 亚洲精品欧美二区三区中文字幕| 亚洲午夜久久久| 久久99精品国产麻豆婷婷| 国产·精品毛片| 欧美无人高清视频在线观看| 日韩一区二区免费在线观看| 久久久国际精品| 亚洲已满18点击进入久久| 韩国在线一区二区| 99国产一区二区三精品乱码| 欧美视频日韩视频在线观看| 久久美女艺术照精彩视频福利播放| 综合中文字幕亚洲| 蜜桃精品在线观看| 91天堂素人约啪| 日韩精品一区二区在线| 亚洲同性同志一二三专区| 另类小说欧美激情| 91在线免费看| 2024国产精品| 亚洲午夜激情av| av日韩在线网站| 久久女同精品一区二区| 亚洲福利视频三区| 不卡欧美aaaaa| 久久人人爽人人爽| 天堂va蜜桃一区二区三区漫画版| 菠萝蜜视频在线观看一区| 欧美草草影院在线视频| 一卡二卡欧美日韩| 丁香亚洲综合激情啪啪综合| 欧美一区二区大片| 亚洲国产欧美在线| 日本韩国欧美三级| 中国色在线观看另类| 国内精品久久久久影院薰衣草| 欧美日韩精品三区| 一区二区三区四区在线播放| 国产成人精品免费| 日韩免费看的电影| 日韩电影在线一区| 欧美日韩一级黄| 亚洲精品日韩综合观看成人91| 丁香婷婷综合网| 久久久精品中文字幕麻豆发布| 久久精品国产精品青草| 91精品国产综合久久久久久漫画| 亚洲一区二区免费视频| 色综合天天综合色综合av| 中文字幕av免费专区久久| 国产美女av一区二区三区| 精品免费日韩av| 麻豆精品久久精品色综合| 欧美精品亚洲二区| 亚洲妇熟xx妇色黄| 欧美人狂配大交3d怪物一区| 亚洲国产视频在线| 欧美区视频在线观看| 五月婷婷欧美视频|