资源简介
原版官方稳定版本Lwip1.4.1 目前最稳定
代码片段和文件信息
/**
* @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
*
*/
/* 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
/**
* 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;
if (TCPIP_APIMSG(&msg) != ERR_OK) {
LWIP_ASSERT(“freeing conn without freeing pcb“ conn->pcb.tcp == NULL);
LWIP_ASSERT(“conn has no op_completed“ sys_sem_valid(&conn->op_completed));
LWIP_ASSERT(“conn has no recvmbox“ sys_mbox_valid(&conn->recv
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2012-12-17 20:10 lwip-1.4.1\
文件 137741 2012-12-17 20:22 lwip-1.4.1\CHANGELOG
文件 1611 2012-12-17 18:38 lwip-1.4.1\COPYING
目录 0 2012-12-17 20:10 lwip-1.4.1\doc\
文件 3372 2012-12-17 18:38 lwip-1.4.1\doc\contrib.txt
文件 407 2012-12-17 18:38 lwip-1.4.1\doc\FILES
文件 20505 2012-12-17 18:38 lwip-1.4.1\doc\rawapi.txt
文件 4701 2012-12-17 18:38 lwip-1.4.1\doc\savannah.txt
文件 6359 2012-12-17 18:38 lwip-1.4.1\doc\snmp_agent.txt
文件 11546 2012-12-17 18:38 lwip-1.4.1\doc\sys_arch.txt
文件 142 2012-12-17 18:38 lwip-1.4.1\FILES
文件 3312 2012-12-17 18:38 lwip-1.4.1\README
目录 0 2012-12-17 20:10 lwip-1.4.1\src\
目录 0 2012-12-17 20:10 lwip-1.4.1\src\api\
文件 23844 2012-12-17 19:00 lwip-1.4.1\src\api\api_lib.c
文件 46106 2012-12-17 19:00 lwip-1.4.1\src\api\api_msg.c
文件 2977 2012-12-17 18:38 lwip-1.4.1\src\api\err.c
文件 6960 2012-12-17 19:00 lwip-1.4.1\src\api\netbuf.c
文件 11342 2012-12-17 18:38 lwip-1.4.1\src\api\netdb.c
文件 4836 2012-12-17 19:00 lwip-1.4.1\src\api\netifapi.c
文件 69829 2012-12-17 19:00 lwip-1.4.1\src\api\sockets.c
文件 14423 2012-12-17 19:00 lwip-1.4.1\src\api\tcpip.c
目录 0 2012-12-17 20:10 lwip-1.4.1\src\core\
文件 3223 2012-12-17 18:38 lwip-1.4.1\src\core\def.c
文件 64922 2012-12-17 19:00 lwip-1.4.1\src\core\dhcp.c
文件 30898 2012-12-17 19:00 lwip-1.4.1\src\core\dns.c
文件 14063 2012-12-17 19:00 lwip-1.4.1\src\core\init.c
目录 0 2012-12-17 20:10 lwip-1.4.1\src\core\ipv4\
文件 18171 2012-12-17 18:38 lwip-1.4.1\src\core\ipv4\autoip.c
文件 11560 2012-12-17 19:00 lwip-1.4.1\src\core\ipv4\icmp.c
文件 27135 2012-12-17 19:00 lwip-1.4.1\src\core\ipv4\igmp.c
............此处省略144个文件信息
- 上一篇:i2c测试程序
- 下一篇:STM32F4 串口DMA发送接收方式代码例程
评论
共有 条评论