diff --git a/CHANGELOG b/CHANGELOG index f7cd7fa9..485f1d0a 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -19,7 +19,12 @@ HISTORY ++ New features: - 2007-05-18 Simon Goldschmidt + 2007-06-09 Simon Goldschmidt + * etharp.h, etharp.c, ethernetif.c: Modified order of parameters for + etharp_output() to match netif->output so etharp_output() can be used + directly as netif->output to save one function call. + + 2007-06-08 Simon Goldschmidt * netif.h, ethernetif.c, slipif.c, loopif.c: Added define NETIF_INIT_SNMP(netif, type, speed) to initialize per-netif snmp variables, added initialization of those to ethernetif, slipif and loopif. diff --git a/src/include/netif/etharp.h b/src/include/netif/etharp.h index 84d8199a..314715a2 100644 --- a/src/include/netif/etharp.h +++ b/src/include/netif/etharp.h @@ -135,8 +135,7 @@ s8_t etharp_find_addr(struct netif *netif, struct ip_addr *ipaddr, void etharp_ip_input(struct netif *netif, struct pbuf *p); void etharp_arp_input(struct netif *netif, struct eth_addr *ethaddr, struct pbuf *p); -err_t etharp_output(struct netif *netif, struct ip_addr *ipaddr, - struct pbuf *q); +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); diff --git a/src/netif/etharp.c b/src/netif/etharp.c index c87e86c0..69c22bfe 100644 --- a/src/netif/etharp.c +++ b/src/netif/etharp.c @@ -679,7 +679,7 @@ etharp_arp_input(struct netif *netif, struct eth_addr *ethaddr, struct pbuf *p) * or the return type of either etharp_query() or netif->linkoutput(). */ err_t -etharp_output(struct netif *netif, struct ip_addr *ipaddr, struct pbuf *q) +etharp_output(struct netif *netif, struct pbuf *q, struct ip_addr *ipaddr) { struct eth_addr *dest, *srcaddr, mcastaddr; struct eth_hdr *ethhdr; diff --git a/src/netif/ethernetif.c b/src/netif/ethernetif.c index 4ba84e1e..b91aa91a 100644 --- a/src/netif/ethernetif.c +++ b/src/netif/ethernetif.c @@ -222,7 +222,7 @@ ethernetif_output(struct netif *netif, struct pbuf *p, struct ip_addr *ipaddr) { /* resolve hardware address, then send (or queue) packet */ - return etharp_output(netif, ipaddr, p); + return etharp_output(netif, p, ipaddr); } /**