LM3S9B92 在ucos-ii操作系统下的LwIP API 接口的UDP客户端能ping通,但在PC上却接收不到数据?



如题所示,代码如下:

void TCP_Test(void *arg)
{
 struct netconn *conn; 
struct netbuf *UDPNetbuf; 
struct ip_addr destip; //目标机IP //static
unsigned short destport; //目标机端口号 //static
unsigned char Text[]="hello i am udp";
destip.addr = htonl(0xC0A80164); //192.168.1.100
destport=1026;
conn = netconn_new(NETCONN_UDP); //创建UDP连接
netconn_bind(conn,&IP_ADDR_ANY,80); //绑定端口号
while(1)
{
netconn_connect(conn,&destip,destport); // 连接远程主机 //
UDPNetbuf= netbuf_new(); // 建立一个新的netbuf //
netbuf_ref(UDPNetbuf,Text,sizeof(Text)); // 引用这个文本给netbuf //
netconn_send(conn,UDPNetbuf); // 发送文本 //
netconn_delete(conn); // 删除conn和buf //
netbuf_delete(UDPNetbuf); //释放缓冲区//
}