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

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

?? api_lib.c

?? uCOSII2.84在at91sam9263的移植
?? C
?? 第 1 頁 / 共 2 頁
字號:
/** * @file * Sequential API External module * */ /* * Copyright (c) 2001-2004 Swedish Institute of Computer Science. * 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 name of the author may not be used to endorse or promote products *    derived from this software without specific prior written permission.  * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS 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 AUTHOR 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 file is part of the lwIP TCP/IP stack. *  * Author: Adam Dunkels <adam@sics.se> * *//* This is the part of the API that is linked with   the application */#include "lwip/opt.h"#if LWIP_NETCONN /* don't build if not configured for use in lwipopts.h */#include "lwip/api.h"#include "lwip/tcpip.h"#include "lwip/memp.h"#include "lwip/ip.h"#include "lwip/raw.h"#include "lwip/udp.h"#include "lwip/tcp.h"#include <string.h>/** * Create a new netconn (of a specific type) that has a callback function. * The corresponding pcb is also created. * * @param t the type of 'connection' to create (@see enum netconn_type) * @param proto the IP protocol for RAW IP pcbs * @param callback a function to call on status changes (RX available, TX'ed) * @return a newly allocated struct netconn or *         NULL on memory error */struct netconn*netconn_new_with_proto_and_callback(enum netconn_type t, u8_t proto, netconn_callback callback){  struct netconn *conn;  struct api_msg msg;  conn = netconn_alloc(t, callback);  if (conn != NULL ) {    msg.function = do_newconn;    msg.msg.msg.n.proto = proto;    msg.msg.conn = conn;    TCPIP_APIMSG(&msg);    if (conn->err != ERR_OK) {      LWIP_ASSERT("freeing conn without freeing pcb", conn->pcb.tcp == NULL);      LWIP_ASSERT("conn has no op_completed", conn->op_completed != SYS_SEM_NULL);      LWIP_ASSERT("conn has no recvmbox", conn->recvmbox != SYS_MBOX_NULL);      LWIP_ASSERT("conn->acceptmbox shouldn't exist", conn->acceptmbox == SYS_MBOX_NULL);      sys_sem_free(conn->op_completed);      sys_mbox_free(conn->recvmbox);      memp_free(MEMP_NETCONN, conn);      return NULL;    }  }  return conn;}/** * Close a netconn 'connection' and free its resources. * UDP and RAW connection are completely closed, TCP pcbs might still be in a waitstate * after this returns. * * @param conn the netconn to delete * @return ERR_OK if the connection was deleted */err_tnetconn_delete(struct netconn *conn){  struct api_msg msg;  /* No ASSERT here because possible to get a (conn == NULL) if we got an accept error */  if (conn == NULL) {    return ERR_OK;  }  msg.function = do_delconn;  msg.msg.conn = conn;  tcpip_apimsg(&msg);  conn->pcb.tcp = NULL;  netconn_free(conn);  return ERR_OK;}/** * Get the type of a netconn (as enum netconn_type). * * @param conn the netconn of which to get the type * @return the netconn_type of conn */enum netconn_typenetconn_type(struct netconn *conn){  LWIP_ERROR("netconn_type: invalid conn", (conn != NULL), return NETCONN_INVALID;);  return conn->type;}/** * Get the local or remote IP address and port of a netconn. * For RAW netconns, this returns the protocol instead of a port! * * @param conn the netconn to query * @param addr a pointer to which to save the IP address * @param port a pointer to which to save the port (or protocol for RAW) * @param local 1 to get the local IP address, 0 to get the remote one * @return ERR_CONN for invalid connections *         ERR_OK if the information was retrieved */err_tnetconn_getaddr(struct netconn *conn, struct ip_addr *addr, u16_t *port, u8_t local){  struct api_msg msg;  LWIP_ERROR("netconn_getaddr: invalid conn", (conn != NULL), return ERR_ARG;);  LWIP_ERROR("netconn_getaddr: invalid addr", (addr != NULL), return ERR_ARG;);  LWIP_ERROR("netconn_getaddr: invalid port", (port != NULL), return ERR_ARG;);  msg.function = do_getaddr;  msg.msg.conn = conn;  msg.msg.msg.ad.ipaddr = addr;  msg.msg.msg.ad.port = port;  msg.msg.msg.ad.local = local;  TCPIP_APIMSG(&msg);  return conn->err;}/** * Bind a netconn to a specific local IP address and port. * Binding one netconn twice might not always be checked correctly! * * @param conn the netconn to bind * @param addr the local IP address to bind the netconn to (use IP_ADDR_ANY *             to bind to all addresses) * @param port the local port to bind the netconn to (not used for RAW) * @return ERR_OK if bound, any other err_t on failure */err_tnetconn_bind(struct netconn *conn, struct ip_addr *addr, u16_t port){  struct api_msg msg;  LWIP_ERROR("netconn_bind: invalid conn", (conn != NULL), return ERR_ARG;);  msg.function = do_bind;  msg.msg.conn = conn;  msg.msg.msg.bc.ipaddr = addr;  msg.msg.msg.bc.port = port;  TCPIP_APIMSG(&msg);  return conn->err;}/** * Connect a netconn to a specific remote IP address and port. * * @param conn the netconn to connect * @param addr the remote IP address to connect to * @param port the remote port to connect to (no used for RAW) * @return ERR_OK if connected, return value of tcp_/udp_/raw_connect otherwise */err_tnetconn_connect(struct netconn *conn, struct ip_addr *addr, u16_t port){  struct api_msg msg;  LWIP_ERROR("netconn_connect: invalid conn", (conn != NULL), return ERR_ARG;);  msg.function = do_connect;  msg.msg.conn = conn;  msg.msg.msg.bc.ipaddr = addr;  msg.msg.msg.bc.port = port;  /* This is the only function which need to not block tcpip_thread */  tcpip_apimsg(&msg);  return conn->err;}/** * Disconnect a netconn from its current peer (only valid for UDP netconns). * * @param conn the netconn to disconnect * @return TODO: return value is not set here... */err_tnetconn_disconnect(struct netconn *conn){  struct api_msg msg;  LWIP_ERROR("netconn_disconnect: invalid conn", (conn != NULL), return ERR_ARG;);  msg.function = do_disconnect;  msg.msg.conn = conn;  TCPIP_APIMSG(&msg);  return conn->err;}/** * Set a TCP netconn into listen mode * * @param conn the tcp netconn to set to listen mode * @param backlog the listen backlog, only used if TCP_LISTEN_BACKLOG==1 * @return ERR_OK if the netconn was set to listen (UDP and RAW netconns *         don't return any error (yet?)) */err_tnetconn_listen_with_backlog(struct netconn *conn, u8_t backlog){  struct api_msg msg;  /* This does no harm. If TCP_LISTEN_BACKLOG is off, backlog is unused. */  LWIP_UNUSED_ARG(backlog);  LWIP_ERROR("netconn_listen: invalid conn", (conn != NULL), return ERR_ARG;);  msg.function = do_listen;  msg.msg.conn = conn;#if TCP_LISTEN_BACKLOG  msg.msg.msg.lb.backlog = backlog;#endif /* TCP_LISTEN_BACKLOG */  TCPIP_APIMSG(&msg);  return conn->err;}/** * Accept a new connection on a TCP listening netconn. * * @param conn the TCP listen netconn * @return the newly accepted netconn or NULL on timeout */struct netconn *netconn_accept(struct netconn *conn){  struct netconn *newconn;  LWIP_ERROR("netconn_accept: invalid conn",       (conn != NULL),                      return NULL;);  LWIP_ERROR("netconn_accept: invalid acceptmbox", (conn->acceptmbox != SYS_MBOX_NULL), return NULL;);#if LWIP_SO_RCVTIMEO  if (sys_arch_mbox_fetch(conn->acceptmbox, (void *)&newconn, conn->recv_timeout) == SYS_ARCH_TIMEOUT) {    newconn = NULL;  } else#else  sys_arch_mbox_fetch(conn->acceptmbox, (void *)&newconn, 0);#endif /* LWIP_SO_RCVTIMEO*/  {    /* Register event with callback */    API_EVENT(conn, NETCONN_EVT_RCVMINUS, 0);#if TCP_LISTEN_BACKLOG    if (newconn != NULL) {

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲激情男女视频| 日本韩国一区二区三区视频| 中文在线资源观看网站视频免费不卡| 国产精品高潮久久久久无| 久久精品99国产精品日本| 91影院在线免费观看| 久久婷婷国产综合精品青草| 亚洲成人一区二区| 色综合欧美在线| 国产精品麻豆久久久| 狠狠久久亚洲欧美| 国产在线视视频有精品| 最新日韩av在线| 精品综合免费视频观看| 91久久国产最好的精华液| 国产精品国产三级国产普通话蜜臀| 秋霞国产午夜精品免费视频 | 国产女人aaa级久久久级| 秋霞午夜av一区二区三区| 欧美日韩一级二级| 亚洲老司机在线| 91在线一区二区| 国产精品免费视频一区| 粉嫩欧美一区二区三区高清影视| 欧美videofree性高清杂交| 日本伊人色综合网| 69堂成人精品免费视频| 日韩av不卡一区二区| 欧美另类变人与禽xxxxx| 亚洲最大成人网4388xx| 99re视频精品| 亚洲欧美视频一区| 精品国产区一区| 亚洲欧洲av色图| 国产福利91精品一区| 日韩一级视频免费观看在线| 美日韩黄色大片| 日韩免费性生活视频播放| 久久av中文字幕片| 精品国产99国产精品| 国产麻豆91精品| 国产精品私人自拍| 91免费观看视频| 波多野结衣欧美| 丝袜亚洲精品中文字幕一区| 欧美伊人久久久久久久久影院| 亚洲美女偷拍久久| 欧美午夜片在线看| 婷婷综合另类小说色区| 日韩精品一区二| 国产成人99久久亚洲综合精品| 国产精品传媒视频| 欧美性感一类影片在线播放| 日韩精品91亚洲二区在线观看| 日韩欧美国产一区二区三区| 国产精品夜夜嗨| 亚洲乱码精品一二三四区日韩在线| 欧美亚洲愉拍一区二区| 另类欧美日韩国产在线| 国产精品天天看| 欧美伊人精品成人久久综合97 | 欧美一区二区在线免费观看| 九色综合国产一区二区三区| 国产精品二区一区二区aⅴ污介绍| 色噜噜狠狠色综合中国| 美国欧美日韩国产在线播放| 国产亚洲精品超碰| 日本国产一区二区| 国产麻豆精品在线观看| 一区二区三区免费在线观看| 精品精品欲导航| 色综合天天在线| 精品一区二区av| 亚洲精品一卡二卡| 日韩精品中午字幕| 色丁香久综合在线久综合在线观看| 日本在线不卡视频| 亚洲欧美视频在线观看| 日韩精品一区二区三区蜜臀| 欧美在线综合视频| 懂色av一区二区三区蜜臀| 午夜精品福利在线| 专区另类欧美日韩| 久久久久久一二三区| 制服丝袜亚洲网站| 欧美亚洲高清一区二区三区不卡| 国产成人免费视频网站| 日本视频一区二区三区| 伊人开心综合网| 国产精品美女视频| 久久亚洲综合av| 日韩欧美高清一区| 欧美日韩视频在线第一区 | 一区二区三区色| 欧美韩国日本一区| 2020国产精品久久精品美国| 欧美老女人在线| 欧美综合天天夜夜久久| 99久久综合国产精品| 国产69精品久久777的优势| 麻豆极品一区二区三区| 午夜精品久久久久久不卡8050| 亚洲免费在线电影| 国产精品视频一区二区三区不卡| 欧美成人aa大片| 日韩一区二区三区视频在线 | 欧美日产在线观看| 91久久精品国产91性色tv| av在线不卡免费看| 成人激情黄色小说| 成人免费视频一区二区| 国产a视频精品免费观看| 国产成人啪免费观看软件| 激情六月婷婷综合| 国产精品中文欧美| 九九久久精品视频 | 亚洲国产sm捆绑调教视频 | 另类小说色综合网站| 蜜桃传媒麻豆第一区在线观看| 日韩不卡手机在线v区| 欧美96一区二区免费视频| 久久不见久久见中文字幕免费| 久久精品国产一区二区三 | 免费成人av在线播放| 视频一区二区三区在线| 日韩成人伦理电影在线观看| 丝袜诱惑制服诱惑色一区在线观看 | 欧美亚日韩国产aⅴ精品中极品| 精品视频1区2区3区| 欧美日韩电影在线| www国产精品av| 国产精品女上位| 亚洲成a天堂v人片| 蜜桃av一区二区| 国产精品888| 欧美在线不卡一区| 欧美精品久久99| 久久―日本道色综合久久| 国产精品成人一区二区艾草| 亚洲成人免费在线| 精品一区中文字幕| 91小视频免费观看| 欧美一区二区三区免费观看视频| 国产三级欧美三级| 亚洲制服欧美中文字幕中文字幕| 日韩成人精品在线| 不卡高清视频专区| 3atv在线一区二区三区| 国产精品色哟哟| 日韩国产精品久久久久久亚洲| 国产激情一区二区三区桃花岛亚洲| 色国产精品一区在线观看| 精品人伦一区二区色婷婷| 亚洲欧洲精品成人久久奇米网| 日本中文字幕一区二区视频| a亚洲天堂av| 日韩精品一区二区三区四区视频| 亚洲欧洲一区二区在线播放| 青青草一区二区三区| 99久久久久久99| 欧美va日韩va| 午夜欧美在线一二页| av在线综合网| 久久精品一区二区三区av| 亚洲高清免费视频| 成人aa视频在线观看| 精品黑人一区二区三区久久| 一个色综合av| 成人黄色av电影| 久久久影视传媒| 日本va欧美va精品| 欧美日韩色综合| 亚洲精品老司机| 不卡视频在线观看| 国产亚洲欧洲一区高清在线观看| 丝袜亚洲另类欧美| 欧美性淫爽ww久久久久无| 综合久久久久久| 波多野结衣欧美| 国产欧美日韩在线视频| 国产一区二区精品久久| 欧美一二三四在线| 日韩电影在线一区二区三区| 欧美性淫爽ww久久久久无| 一区二区三区视频在线看| 色系网站成人免费| 国产精品久久久久一区二区三区共 | 欧美精品一区二区精品网| 麻豆一区二区三| 日韩午夜三级在线| 奇米影视一区二区三区| 欧美一卡二卡三卡| 日本免费新一区视频| 欧美精品一二三区| 日本免费在线视频不卡一不卡二| 欧美日韩一区高清| 婷婷六月综合亚洲| 日韩欧美一级二级三级久久久| 日本不卡视频一二三区| 欧美一级片免费看|