67 |
err_t (* init)(struct netif *netif), |
err_t (* init)(struct netif *netif), |
68 |
err_t (* input)(struct pbuf *p, struct netif *netif)) |
err_t (* input)(struct pbuf *p, struct netif *netif)) |
69 |
{ |
{ |
70 |
static int netifnum = 0; |
static s16_t netifnum = 0; |
71 |
|
|
72 |
#if LWIP_DHCP |
#if LWIP_DHCP |
73 |
/* netif not under DHCP control by default */ |
/* netif not under DHCP control by default */ |
205 |
*/ |
*/ |
206 |
etharp_query(netif, ipaddr, NULL); |
etharp_query(netif, ipaddr, NULL); |
207 |
#endif |
#endif |
208 |
LWIP_DEBUGF(NETIF_DEBUG | DBG_TRACE | DBG_STATE | 3, ("netif: IP address of interface %c%c set to %u.%u.%u.%u\n", |
LWIP_DEBUGF(NETIF_DEBUG | DBG_TRACE | DBG_STATE | 3, ("netif: IP address of interface %c%c set to %"U16_F".%"U16_F".%"U16_F".%"U16_F"\n", |
209 |
netif->name[0], netif->name[1], |
netif->name[0], netif->name[1], |
210 |
ip4_addr1(&netif->ip_addr), |
ip4_addr1(&netif->ip_addr), |
211 |
ip4_addr2(&netif->ip_addr), |
ip4_addr2(&netif->ip_addr), |
217 |
netif_set_gw(struct netif *netif, struct ip_addr *gw) |
netif_set_gw(struct netif *netif, struct ip_addr *gw) |
218 |
{ |
{ |
219 |
ip_addr_set(&(netif->gw), gw); |
ip_addr_set(&(netif->gw), gw); |
220 |
LWIP_DEBUGF(NETIF_DEBUG | DBG_TRACE | DBG_STATE | 3, ("netif: GW address of interface %c%c set to %u.%u.%u.%u\n", |
LWIP_DEBUGF(NETIF_DEBUG | DBG_TRACE | DBG_STATE | 3, ("netif: GW address of interface %c%c set to %"U16_F".%"U16_F".%"U16_F".%"U16_F"\n", |
221 |
netif->name[0], netif->name[1], |
netif->name[0], netif->name[1], |
222 |
ip4_addr1(&netif->gw), |
ip4_addr1(&netif->gw), |
223 |
ip4_addr2(&netif->gw), |
ip4_addr2(&netif->gw), |
229 |
netif_set_netmask(struct netif *netif, struct ip_addr *netmask) |
netif_set_netmask(struct netif *netif, struct ip_addr *netmask) |
230 |
{ |
{ |
231 |
ip_addr_set(&(netif->netmask), netmask); |
ip_addr_set(&(netif->netmask), netmask); |
232 |
LWIP_DEBUGF(NETIF_DEBUG | DBG_TRACE | DBG_STATE | 3, ("netif: netmask of interface %c%c set to %u.%u.%u.%u\n", |
LWIP_DEBUGF(NETIF_DEBUG | DBG_TRACE | DBG_STATE | 3, ("netif: netmask of interface %c%c set to %"U16_F".%"U16_F".%"U16_F".%"U16_F"\n", |
233 |
netif->name[0], netif->name[1], |
netif->name[0], netif->name[1], |
234 |
ip4_addr1(&netif->netmask), |
ip4_addr1(&netif->netmask), |
235 |
ip4_addr2(&netif->netmask), |
ip4_addr2(&netif->netmask), |