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

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

?? smsc_at.h

?? 主要包括sms網(wǎng)關(guān)和wap網(wǎng)關(guān)實現(xiàn)說明和源碼
?? H
字號:
/* ====================================================================  * The Kannel Software License, Version 1.0  *  * Copyright (c) 2001-2005 Kannel Group   * Copyright (c) 1998-2001 WapIT Ltd.    * All rights reserved.  *  * Redistribution and use in source and binary forms, with or without  * modification, are permitted provided that the following conditions  * are met:  *  * 1. Redistributions of source code must retain the above copyright  *    notice, this list of conditions and the following disclaimer.  *  * 2. Redistributions in binary form must reproduce the above copyright  *    notice, this list of conditions and the following disclaimer in  *    the documentation and/or other materials provided with the  *    distribution.  *  * 3. The end-user documentation included with the redistribution,  *    if any, must include the following acknowledgment:  *       "This product includes software developed by the  *        Kannel Group (http://www.kannel.org/)."  *    Alternately, this acknowledgment may appear in the software itself,  *    if and wherever such third-party acknowledgments normally appear.  *  * 4. The names "Kannel" and "Kannel Group" must not be used to  *    endorse or promote products derived from this software without  *    prior written permission. For written permission, please   *    contact org@kannel.org.  *  * 5. Products derived from this software may not be called "Kannel",  *    nor may "Kannel" appear in their name, without prior written  *    permission of the Kannel Group.  *  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED  * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE  * DISCLAIMED.  IN NO EVENT SHALL THE KANNEL GROUP OR ITS CONTRIBUTORS  * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,   * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT   * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR   * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,   * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE   * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,   * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  * ====================================================================  *  * This software consists of voluntary contributions made by many  * individuals on behalf of the Kannel Group.  For more information on   * the Kannel Group, please see <http://www.kannel.org/>.  *  * Portions of this software are based upon software originally written at   * WapIT Ltd., Helsinki, Finland for the Kannel project.   */ /* * gw/smsc_at2.h * * New driver for serial connected AT based * devices. * 4.9.2001 * Andreas Fink <afink@smsrelay.com> *  */#ifndef SMSC_AT2_H#define SMSC_AT2_H#include "gwlib/gwlib.h"/* maximum data to attempt to read in one go */#define	MAX_READ        1023/* Message types defines */#define AT_DELIVER_SM   0#define AT_SUBMIT_SM    1#define AT_STATUS_REPORT_SM 2/* type of phone number defines */#define PNT_UNKNOWN     0#define PNT_INTER       1#define PNT_NATIONAL    2/* The number of times to attempt to send a message should sending fail */#define RETRY_SEND 3/*  * defines for use with the so-called "SIM buffering techinique": * once in how many seconds to poll the memory locations,  * if keepalive is _not_ set (will use keepalive time if set)  */#define AT2_DEFAULT_SMS_POLL_INTERVAL	60/* * Structures used in at2 */typedef struct ModemDef {    Octstr *id;    Octstr *name;    Octstr *detect_string;    Octstr *detect_string2;    Octstr *init_string;    Octstr *reset_string;    long speed;    Octstr *enable_hwhs;    int	need_sleep;    int	no_pin;    int	no_smsc;    long sendline_sleep;    Octstr *keepalive_cmd;    int	broken;    Octstr *message_storage;    int	enable_mms;} ModemDef;typedef struct PrivAT2data {    gw_prioqueue_t *outgoing_queue;    ModemDef *modem;    long device_thread;    int	shutdown; /* Internal signal to shut down */    Octstr *device;    long speed;    long keepalive;    int	fd;	/* file descriptor */    Octstr *ilb; /* input line buffer */    Octstr *lines; /* the last few lines before OK was seen */    Octstr *pin; /* PIN code */    int	pin_ready;    SMSCConn *conn;    int phase2plus;    Octstr *validityperiod;    int retry;    Octstr *my_number;    Octstr *sms_center;    Octstr *name;    Octstr *configfile;    int	sms_memory_poll_interval;    int	sms_memory_capacity;    int	sms_memory_usage;    List *pending_incoming_messages;    int max_error_count;    Octstr *rawtcp_host;    int rawtcp_port;    int is_serial; /* false if device is rawtcp */  } PrivAT2data;/* * Macro that is used inside smsc_at2.c in order to handle * octstr destruction more carefully. */#define	O_DESTROY(a) { if(a) octstr_destroy(a); a = NULL; }/* #define	at2_write_ctrlz(a) at2_write(a,"\032") *//* * open the specified device using the serial line */static int at2_open_device(PrivAT2data *privdata);/* * close the specified device and hence disconnect from the serial line  */static void at2_close_device(PrivAT2data *privdata);/* * checks if there are any incoming bytes and adds them to the line buffer */static void at2_read_buffer(PrivAT2data *privdata);/*  * Looks for a full line to be read from the buffer.  * Returns the line and removes it from the buffer or if no full line  * is yet received waits until the line is there or a timeout occurs. * If gt_flag is set, it is also looking for a line containing '>' even  * there is no CR yet. */static Octstr *at2_wait_line(PrivAT2data *privdata, time_t timeout, int gt_flag);/* * Looks for a full line to be read from the buffer. * Returns the line and removes it from the buffer or if no full line  * is yet received returns NULL. If gt_flag is set, it is also looking for * a line containing > even there is no CR yet. */static Octstr *at2_read_line(PrivAT2data *privdata, int gt_flag);/* * Writes a line out to the device and adds a carriage return/linefeed to it.  * Returns number of characters sent. */static int at2_write_line(PrivAT2data *privdata, char *line);static int at2_write_ctrlz(PrivAT2data *privdata);static int at2_write(PrivAT2data *privdata, char *line);/* * Clears incoming buffer */static void at2_flush_buffer(PrivAT2data *privdata); /* * Initializes the device after being opened, detects the modem type,  * sets speed settings etc. * On failure returns -1. */static int at2_init_device(PrivAT2data *privdata);/* * Sends an AT command to the modem and waits for a reply * Return values are: *   0 = OK *   1 = ERROR *   2 = SIM PIN *   3 = > *   4 = READY *   5 = CMGS *  -1 = timeout occurred */static int at2_send_modem_command(PrivAT2data *privdata, char *cmd, time_t timeout,                            int greaterflag);/* * Waits for the modem to send us something. */static int at2_wait_modem_command(PrivAT2data *privdata, time_t timeout,                            int greaterflag, int *output);/* * Sets the serial port speed on the device */static void at2_set_speed(PrivAT2data *privdata, int bps);/* * This is the main tread "sitting" on the device. * Its task is to initialize the modem then wait for messages  * to arrive or to be sent */static void at2_device_thread(void *arg);static int at2_shutdown_cb(SMSCConn *conn, int finish_sending);static long at2_queued_cb(SMSCConn *conn);static void at2_start_cb(SMSCConn *conn);static int at2_add_msg_cb(SMSCConn *conn, Msg *sms);/* * Starts the whole thing up */int smsc_at2_create(SMSCConn *conn, CfgGroup *cfg);/* * Extracts the first PDU in the string */static int at2_pdu_extract(PrivAT2data *privdata, Octstr **pdu, Octstr *line, Octstr *smsc_number);/* * Get the numeric value of the text hex */static int at2_hexchar(int hexc);/* * Decode a raw PDU into a Msg */static Msg *at2_pdu_decode(Octstr *data, PrivAT2data *privdata);/* * Decode a DELIVER PDU */static Msg *at2_pdu_decode_deliver_sm(Octstr *data, PrivAT2data *privdata);/* * Decode a SUBMIT-REPORT PDU */static Msg *at2_pdu_decode_report_sm(Octstr *data, PrivAT2data *privdata);/* * Converts the text representation of hexa to binary */static Octstr *at2_convertpdu(Octstr *pdutext);/* * Decode 7bit uncompressed user data */static void at2_decode7bituncompressed(Octstr *input, int len, Octstr *decoded,                                 int offset);/* * Sends messages from the queue */static void at2_send_messages(PrivAT2data *privdata);/* * Sends a single message.  * After having it sent, the msg is no longe belonging to us */static void at2_send_one_message(PrivAT2data *privdata, Msg *msg);/* * Encode a Msg into a PDU */static Octstr *at2_pdu_encode(Msg *msg, PrivAT2data *privdata);/* * Encode 7bit uncompressed user data into an Octstr, prefixing with <offset> 0 bits */static Octstr *at2_encode7bituncompressed(Octstr *input, int offset);/* * Encode 8bit uncompressed user data into an Octstr */static Octstr *at2_encode8bituncompressed(Octstr *input);/* * Code a half-byte to its text hexa representation */static int at2_numtext(int num);/* * Try to detect modem speeds */static int at2_detect_speed(PrivAT2data *privdata);/* * Test modem speed */static int at2_test_speed(PrivAT2data *privdata, long speed);/* * Try to detect modem type */static int at2_detect_modem_type(PrivAT2data *privdata);/* * Read all defined modems from the included modem definition file */static ModemDef *at2_read_modems(PrivAT2data *privdata, Octstr *file, Octstr *id, int idnumber);/* * Destroy the ModemDef structure components */static void at2_destroy_modem(ModemDef *modem);/* * Checks whether any messages are buffered in message storage and extract them. */static int at2_read_sms_memory(PrivAT2data *privdata);/* * Memory capacity and usage check */static int at2_check_sms_memory(PrivAT2data *privdata);/* * This silly thing here will just translate a "swapped nibble"  * pseodo Hex encoding (from PDU) into something that people can  * actually understand. * Implementation completly ripped off Dennis Malmstrom timestamp  * patches against 1.0.3. Thanks Dennis!  */static int swap_nibbles(unsigned char byte);/* * creates a buffer with a valid PDU address field as per [GSM 03.40] * from an MSISDN number */static Octstr *at2_format_address_field(Octstr *msisdn);/* * Check the pending_incoming_messages queue for CMTI notifications. * Every notification is parsed and the messages are read (and deleted) * accordingly. */static void at2_read_pending_incoming_messages(PrivAT2data *privdata);/* * Set the memory storage location of the modem by sending a +CPMS command */static int at2_set_message_storage(PrivAT2data *privdata, Octstr *memory_name);/* * Reads a message from selected memory location and deletes it afterwards. * returns 0 on failure and 1 on success */static int at2_read_delete_message(PrivAT2data *privdata, int message_number);/* * Return appropriate error string for the given error code. */static const char *at2_error_string(int code);#endif /* SMSC_AT2_H */

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
91色视频在线| www.亚洲人| 欧美天天综合网| jlzzjlzz亚洲女人18| 99久久国产综合精品色伊| 国产99精品在线观看| 精品一区二区三区在线观看国产| 国产精品亚洲一区二区三区在线| 成人小视频免费观看| 99视频在线精品| 国产精品成人午夜| 在线一区二区三区做爰视频网站| 一个色综合网站| 欧美一区二区三区成人| 精品一区二区日韩| 综合在线观看色| 欧美久久一二三四区| 国产在线播放一区| 中文字幕日韩欧美一区二区三区| 在线观看成人免费视频| 日韩高清不卡一区| 久久久久99精品一区| 不卡一区二区在线| 亚洲.国产.中文慕字在线| 日韩精品一区二区在线| av中文字幕在线不卡| 午夜私人影院久久久久| 久久久久久久久久久黄色| 91在线精品一区二区| 一区二区三区.www| 成人激情电影免费在线观看| 亚洲人精品午夜| 555www色欧美视频| 韩国成人精品a∨在线观看| 中文字幕亚洲视频| 欧美日韩亚洲综合一区| 久久超级碰视频| 一色桃子久久精品亚洲| 成人免费看视频| 亚洲日本免费电影| 精品日产卡一卡二卡麻豆| 激情久久五月天| 国产精品另类一区| 精品视频一区三区九区| 国产精品影视天天线| 亚洲精品国产a| 精品av久久707| 91激情五月电影| 国产麻豆精品在线观看| 一区二区三区91| 日韩美女在线视频| 在线观看免费一区| 美女视频黄 久久| 国产日产精品1区| 日韩一区二区不卡| 97国产一区二区| 老司机精品视频导航| 亚洲欧美日韩国产一区二区三区| 6080午夜不卡| 色88888久久久久久影院野外| 国内精品在线播放| 亚洲成人免费观看| 国产精品美女久久久久av爽李琼| 欧美日韩国产中文| 成人三级在线视频| 蜜桃久久精品一区二区| 亚洲制服丝袜av| 国产亲近乱来精品视频| 日韩一二三四区| 成人av资源在线| 国内精品在线播放| 日韩—二三区免费观看av| 亚洲免费观看在线视频| 国产欧美日韩另类一区| 日韩免费视频一区二区| 欧美日韩中文字幕一区二区| 9l国产精品久久久久麻豆| 国产精品亚洲а∨天堂免在线| 日韩不卡一区二区三区| 亚洲一区免费在线观看| 一区二区三区四区五区视频在线观看 | 精品三级av在线| 7777精品伊人久久久大香线蕉完整版| 成人av先锋影音| 国产综合色视频| 久久99久久99| 日韩av一二三| 免费人成在线不卡| 性做久久久久久免费观看| 国产精品剧情在线亚洲| 国产欧美一区在线| 国产无一区二区| 日韩天堂在线观看| 欧美不卡123| 精品日韩在线观看| 精品成人一区二区| 久久久精品黄色| 国产人伦精品一区二区| 国产网红主播福利一区二区| 久久久久97国产精华液好用吗| 26uuu另类欧美亚洲曰本| 日韩欧美亚洲国产另类| 精品少妇一区二区三区视频免付费| 色婷婷综合久色| 色香蕉成人二区免费| 色婷婷综合久久| 在线观看亚洲精品| 制服丝袜国产精品| 欧美精品一区二区蜜臀亚洲| 久久影视一区二区| 国产精品色哟哟| 亚洲伦理在线免费看| 一区二区激情视频| 亚洲成年人影院| 欧美aⅴ一区二区三区视频| 久久精品国内一区二区三区| 国产精品一区二区免费不卡 | 午夜国产不卡在线观看视频| 日产国产高清一区二区三区| 麻豆成人综合网| 国产a久久麻豆| 欧美在线免费视屏| 91精品国产91久久综合桃花| 国产日本欧美一区二区| 一区二区三区在线影院| 青青草91视频| 99re8在线精品视频免费播放| 在线观看区一区二| 精品乱码亚洲一区二区不卡| 国产精品日韩精品欧美在线| 亚洲一区日韩精品中文字幕| 韩日欧美一区二区三区| 99精品视频在线播放观看| 欧美日韩一区二区三区免费看| 日韩视频一区二区三区在线播放| 国产欧美日韩精品a在线观看| 亚洲狠狠丁香婷婷综合久久久| 日韩精品午夜视频| 麻豆91精品视频| 国产v综合v亚洲欧| 精品视频在线免费看| 国产欧美精品一区二区三区四区| 亚洲最新视频在线播放| 国产精品一品二品| 欧美日韩视频一区二区| 国产欧美日韩在线观看| 青青草91视频| 一本久久精品一区二区| 精品久久五月天| 中文字幕视频一区二区三区久| 天天综合网天天综合色| 成人网页在线观看| 欧美精品 日韩| 亚洲欧美另类综合偷拍| 亚洲中国最大av网站| 国产一区二区三区在线观看精品 | 精品一区二区三区香蕉蜜桃| 91麻豆自制传媒国产之光| 久久久欧美精品sm网站| 日日摸夜夜添夜夜添精品视频 | 国产99精品视频| 91麻豆精品国产91久久久资源速度 | 国产精品电影院| 国产精品影视网| 69av一区二区三区| 自拍偷拍亚洲欧美日韩| 看片网站欧美日韩| 色综合欧美在线视频区| 中文字幕av一区二区三区| 老汉av免费一区二区三区| 欧美福利一区二区| 亚洲乱码国产乱码精品精98午夜| 成人免费av在线| 国产日韩欧美一区二区三区综合| 另类中文字幕网| 日韩一区二区免费高清| 视频一区二区中文字幕| 欧美午夜精品久久久| 一区二区三区四区乱视频| 国产在线不卡一区| 精品国产成人系列| 蜜桃传媒麻豆第一区在线观看| 91麻豆精品国产91久久久久| 亚洲午夜电影在线| 欧美体内she精高潮| 国产精品久久久久三级| 日产精品久久久久久久性色| 欧美日韩精品系列| 首页亚洲欧美制服丝腿| 欧美日韩电影一区| 亚洲电影你懂得| 欧美日韩一区二区三区在线| 婷婷开心激情综合| 欧美一区二区在线免费播放| 奇米影视7777精品一区二区| 欧美精品久久久久久久久老牛影院| 一区二区高清视频在线观看| 欧洲在线/亚洲| 午夜精品福利一区二区三区蜜桃| 制服丝袜中文字幕一区|