lwip-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lwip-users] question about (* input)()


From: jack W
Subject: [lwip-users] question about (* input)()
Date: Thu, 18 Nov 2004 21:30:23 +0800

hi everyone 
    
     i have some question about the function 
struct netif *netif_add(struct ip_addr *ipaddr, struct ip_addr *netmask,
          struct ip_addr *gw,
          void (* init)(struct netif *netif),
          err_t (* input)(struct pbuf *p, struct netif *netif))

the last parameter err_t..... is the input function of the netif . i call the 
function in the following :


  netif_set_default(netif_add(&ipaddr, &netmask, &gw, ne2k_init,
                              ip_input));
i use the function err_t ip_input(...) in the file ip.c . pinging the board is 
OK. but i can't use the api function such as netconn_new etc to establish the 
tcp/ip program . i want to write some codes about tftp in my test files.  
So i use the fuction err_t tcpip_input(struct pbuf *p, struct netif *inp) as 
its input interface to replace the function ip_input(), 
   netif_set_default(netif_add(&ipaddr, &netmask, &gw, ne2k_init,
                              tcpip_input));
 then i can use the api in the file of apilib.c to establish tcp/ip program.but 
when i ping the board ,it failed.






reply via email to

[Prev in Thread] Current Thread [Next in Thread]