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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? tcs.c

?? blue tooth protocol stack source code
?? 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);}

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
精品国产一区二区三区久久影院 | 国产欧美精品在线观看| 91麻豆精品国产自产在线| 一本到不卡免费一区二区| 99在线精品免费| 99久久99精品久久久久久| www.日韩大片| 色八戒一区二区三区| 91麻豆国产福利精品| 91麻豆高清视频| 欧美日韩高清在线| 欧美一级免费大片| wwww国产精品欧美| 国产精品私人自拍| 一区二区三区免费在线观看| 亚洲一二三级电影| 久久狠狠亚洲综合| 成人免费av在线| 色伊人久久综合中文字幕| 欧美日韩一区二区三区在线看 | 国模一区二区三区白浆| 久久91精品国产91久久小草| 精品电影一区二区| 久久精品视频一区| 中文字幕一区二区在线播放| 亚洲啪啪综合av一区二区三区| 亚洲乱码中文字幕| 日本不卡一区二区| 国产91色综合久久免费分享| 色哟哟国产精品| 欧美一区国产二区| 国产精品系列在线| 日韩中文字幕区一区有砖一区 | 2019国产精品| 亚洲最新视频在线观看| 免费人成精品欧美精品| 成人午夜激情视频| 69久久夜色精品国产69蝌蚪网| 26uuu久久综合| 亚洲一区二区三区国产| 国产麻豆精品久久一二三| 色狠狠色噜噜噜综合网| 久久婷婷久久一区二区三区| 夜夜嗨av一区二区三区四季av| 精品在线一区二区| 91福利精品视频| 国产日韩精品视频一区| 天天色 色综合| 成人av电影在线网| 日韩午夜av一区| 亚洲激情图片qvod| 成人福利视频网站| 欧美va亚洲va香蕉在线| 一区二区三国产精华液| 丁香六月综合激情| 精品精品国产高清a毛片牛牛| 亚洲网友自拍偷拍| 99久久综合狠狠综合久久| 久久综合av免费| 日本va欧美va瓶| 欧美性视频一区二区三区| 欧美国产成人精品| 久久成人av少妇免费| 欧美日韩久久一区二区| 一区二区三区小说| 99riav一区二区三区| 国产欧美精品一区二区色综合朱莉 | 欧美国产日韩亚洲一区| 美女在线视频一区| 欧美精选在线播放| 亚洲狠狠爱一区二区三区| 99re成人在线| 国模大尺度一区二区三区| 日韩一区二区在线播放| 亚洲午夜精品在线| 欧美日韩在线不卡| 亚洲电影你懂得| 欧美伊人精品成人久久综合97| 亚洲精品成人天堂一二三| 91在线云播放| 亚洲日本一区二区三区| 色av成人天堂桃色av| 一区二区三区日韩在线观看| 在线观看日韩国产| 五月天国产精品| 欧美成人欧美edvon| 国内精品国产三级国产a久久| 久久综合久久鬼色中文字| 国产精品一二三四| 国产精品电影一区二区三区| 91视频在线看| 亚洲h在线观看| 久久综合久久综合久久综合| 国产91精品一区二区麻豆亚洲| 亚洲视频一二三| 欧美精品丝袜中出| 韩国av一区二区三区在线观看| 国产免费成人在线视频| 色婷婷av一区二区三区大白胸| 亚洲成人在线网站| 久久中文字幕电影| 91在线观看地址| 日本不卡高清视频| 久久久99精品免费观看不卡| 日本乱人伦aⅴ精品| 美女诱惑一区二区| 亚洲婷婷国产精品电影人久久| 久久久精品tv| 91老师片黄在线观看| 青青青爽久久午夜综合久久午夜 | 色香蕉成人二区免费| 日本一不卡视频| 国产喷白浆一区二区三区| 欧美亚洲一区三区| 国产自产2019最新不卡| 亚洲综合色区另类av| 精品久久久久久久人人人人传媒| 成人av片在线观看| 美女性感视频久久| 亚洲愉拍自拍另类高清精品| 亚洲精品在线电影| 在线观看一区二区视频| 国产成人aaa| 免费在线成人网| 亚洲黄色片在线观看| 国产人成一区二区三区影院| 欧美午夜理伦三级在线观看| 国产suv精品一区二区883| 五月婷婷综合在线| 亚洲欧美另类在线| 国产女同互慰高潮91漫画| 4hu四虎永久在线影院成人| 91色婷婷久久久久合中文| 激情六月婷婷久久| 天堂蜜桃91精品| 亚洲一区二区中文在线| 国产精品嫩草影院av蜜臀| 337p粉嫩大胆色噜噜噜噜亚洲| 欧美日韩三级一区二区| 91美女视频网站| 99麻豆久久久国产精品免费 | 欧美日韩在线三级| 色综合色狠狠综合色| 成人免费高清在线| 国产成人在线视频网址| 激情丁香综合五月| 国产一区二区三区黄视频| 奇米影视在线99精品| 日韩不卡免费视频| 日韩精品亚洲专区| 蜜桃av一区二区在线观看 | 26uuu欧美日本| 久久久亚洲精华液精华液精华液| 欧美一级在线观看| 欧美videos中文字幕| 日韩写真欧美这视频| 日韩精品一区二区三区在线| 欧美一区二区在线免费观看| 69堂亚洲精品首页| 欧美大片一区二区| 久久影院视频免费| 免费黄网站欧美| 美女一区二区在线观看| 黄色日韩网站视频| 粉嫩欧美一区二区三区高清影视| 国产成a人无v码亚洲福利| 成人久久视频在线观看| 91捆绑美女网站| 欧美日韩一级视频| 欧美大片一区二区三区| 国产免费成人在线视频| 国产精品麻豆久久久| 亚洲综合偷拍欧美一区色| 舔着乳尖日韩一区| 久久 天天综合| 成人国产精品免费| 精品视频1区2区3区| 精品国产亚洲在线| 国产精品网站一区| 日韩激情中文字幕| 国产成人精品www牛牛影视| 91猫先生在线| 精品国产乱码久久久久久蜜臀| 国产人久久人人人人爽| 亚洲一区二区三区四区在线| 蜜桃av噜噜一区二区三区小说| 国产69精品一区二区亚洲孕妇| 91丝袜高跟美女视频| 91精品欧美久久久久久动漫| 国产三级精品三级| 亚洲国产美国国产综合一区二区| 美女被吸乳得到大胸91| 99国产精品国产精品久久| 欧美一区二区视频在线观看2020| 国产亚洲一区二区三区在线观看| 亚洲免费观看高清完整版在线观看| 美女视频黄 久久| 欧洲日韩一区二区三区| 久久久久九九视频| 日韩精品欧美成人高清一区二区|