Contrib module by Dominik Spies: autoip.h, autoip.c, dhcp.h, dhcp.c, netif.h, netif.c, etharp.h, etharp.c, opt.h: AutoIP implementation available for IPv4, with new options LWIP_AUTOIP and LWIP_DHCP_AUTOIP_COOP if you want to cooperate with DHCP. Some tips to adapt (see TODO mark in the source code).

This commit is contained in:
fbernon
2007-06-09 16:57:04 +00:00
parent 792f5b3f22
commit e01f342048
10 changed files with 639 additions and 12 deletions

View File

@@ -118,6 +118,10 @@ PACK_STRUCT_END
#define ETHTYPE_ARP 0x0806
#define ETHTYPE_IP 0x0800
/** ARP message types */
#define ARP_REQUEST 1
#define ARP_REPLY 2
#if ARP_QUEUEING
/** struct for queueing outgoing packets for unknown address
* defined here to be accessed by memp.h
@@ -139,6 +143,12 @@ err_t etharp_output(struct netif *netif, struct pbuf *q, struct ip_addr *ipaddr)
err_t etharp_query(struct netif *netif, struct ip_addr *ipaddr, struct pbuf *q);
err_t etharp_request(struct netif *netif, struct ip_addr *ipaddr);
#if LWIP_AUTOIP
err_t etharp_raw(struct netif *netif, struct eth_addr *ethsrc_addr, struct eth_addr *ethdst_addr, struct eth_addr *hwsrc_addr, struct ip_addr *ipsrc_addr, struct eth_addr *hwdst_addr, struct ip_addr *ipdst_addr, unsigned short int OpCode);
#endif /* LWIP_AUTOIP */
#define eth_addr_cmp(addr1, addr2) (memcmp((addr1)->addr, (addr2)->addr, 6) == 0)
#ifdef __cplusplus
}
#endif