168 |
LWIP_DEBUGF(NETIF_DEBUG, ("netif_find: didn't find %c%c\n", name[0], name[1])); |
LWIP_DEBUGF(NETIF_DEBUG, ("netif_find: didn't find %c%c\n", name[0], name[1])); |
169 |
return NULL; |
return NULL; |
170 |
} |
} |
171 |
/*-----------------------------------------------------------------------------------*/ |
|
172 |
void |
void |
173 |
netif_set_ipaddr(struct netif *netif, struct ip_addr *ipaddr) |
netif_set_ipaddr(struct netif *netif, struct ip_addr *ipaddr) |
174 |
{ |
{ |
214 |
(unsigned int)(ntohl(netif->ip_addr.addr) >> 8 & 0xff), |
(unsigned int)(ntohl(netif->ip_addr.addr) >> 8 & 0xff), |
215 |
(unsigned int)(ntohl(netif->ip_addr.addr) & 0xff))); |
(unsigned int)(ntohl(netif->ip_addr.addr) & 0xff))); |
216 |
} |
} |
217 |
/*-----------------------------------------------------------------------------------*/ |
|
218 |
void |
void |
219 |
netif_set_gw(struct netif *netif, struct ip_addr *gw) |
netif_set_gw(struct netif *netif, struct ip_addr *gw) |
220 |
{ |
{ |
226 |
(unsigned int)(ntohl(netif->gw.addr) >> 8 & 0xff), |
(unsigned int)(ntohl(netif->gw.addr) >> 8 & 0xff), |
227 |
(unsigned int)(ntohl(netif->gw.addr) & 0xff))); |
(unsigned int)(ntohl(netif->gw.addr) & 0xff))); |
228 |
} |
} |
229 |
/*-----------------------------------------------------------------------------------*/ |
|
230 |
void |
void |
231 |
netif_set_netmask(struct netif *netif, struct ip_addr *netmask) |
netif_set_netmask(struct netif *netif, struct ip_addr *netmask) |
232 |
{ |
{ |
238 |
(unsigned int)(ntohl(netif->netmask.addr) >> 8 & 0xff), |
(unsigned int)(ntohl(netif->netmask.addr) >> 8 & 0xff), |
239 |
(unsigned int)(ntohl(netif->netmask.addr) & 0xff))); |
(unsigned int)(ntohl(netif->netmask.addr) & 0xff))); |
240 |
} |
} |
241 |
/*-----------------------------------------------------------------------------------*/ |
|
242 |
void |
void |
243 |
netif_set_default(struct netif *netif) |
netif_set_default(struct netif *netif) |
244 |
{ |
{ |
246 |
LWIP_DEBUGF(NETIF_DEBUG, ("netif: setting default interface %c%c\n", |
LWIP_DEBUGF(NETIF_DEBUG, ("netif: setting default interface %c%c\n", |
247 |
netif ? netif->name[0] : '\'', netif ? netif->name[1] : '\'')); |
netif ? netif->name[0] : '\'', netif ? netif->name[1] : '\'')); |
248 |
} |
} |
249 |
/*-----------------------------------------------------------------------------------*/ |
|
250 |
void |
void |
251 |
netif_init(void) |
netif_init(void) |
252 |
{ |
{ |
253 |
netif_list = netif_default = NULL; |
netif_list = netif_default = NULL; |
254 |
} |
} |
255 |
/*-----------------------------------------------------------------------------------*/ |
|