net/icmpv4: Normalize input function signature with ipv6 counter-part
Length parameter was always useless, only used in debugging, so that can be removed. Change-Id: If597f424840f37955202fa5fe827dd992e4cf776 Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
This commit is contained in:
parent
e98f2e0b6a
commit
850efc270c
3 changed files with 5 additions and 8 deletions
|
@ -278,13 +278,11 @@ void net_icmpv4_unregister_handler(struct net_icmpv4_handler *handler)
|
|||
sys_slist_find_and_remove(&handlers, &handler->node);
|
||||
}
|
||||
|
||||
enum net_verdict net_icmpv4_input(struct net_buf *buf, uint16_t len,
|
||||
enum net_verdict net_icmpv4_input(struct net_buf *buf,
|
||||
uint8_t type, uint8_t code)
|
||||
{
|
||||
struct net_icmpv4_handler *cb;
|
||||
|
||||
ARG_UNUSED(len);
|
||||
|
||||
net_stats_update_icmp_recv();
|
||||
|
||||
SYS_SLIST_FOR_EACH_CONTAINER(&handlers, cb, node) {
|
||||
|
|
|
@ -73,7 +73,7 @@ void net_icmpv4_register_handler(struct net_icmpv4_handler *handler);
|
|||
|
||||
void net_icmpv4_unregister_handler(struct net_icmpv4_handler *handler);
|
||||
|
||||
enum net_verdict net_icmpv4_input(struct net_buf *buf, uint16_t len,
|
||||
enum net_verdict net_icmpv4_input(struct net_buf *buf,
|
||||
uint8_t type, uint8_t code);
|
||||
|
||||
#if defined(CONFIG_NET_IPV4)
|
||||
|
|
|
@ -412,12 +412,11 @@ static inline enum net_verdict process_icmpv4_pkt(struct net_buf *buf,
|
|||
struct net_ipv4_hdr *ipv4)
|
||||
{
|
||||
struct net_icmp_hdr *hdr = NET_ICMP_BUF(buf);
|
||||
uint16_t len = (ipv4->len[0] << 8) + ipv4->len[1];
|
||||
|
||||
NET_DBG("ICMPv4 packet received length %d type %d code %d",
|
||||
len, hdr->type, hdr->code);
|
||||
NET_DBG("ICMPv4 packet received type %d code %d",
|
||||
hdr->type, hdr->code);
|
||||
|
||||
return net_icmpv4_input(buf, len, hdr->type, hdr->code);
|
||||
return net_icmpv4_input(buf, hdr->type, hdr->code);
|
||||
}
|
||||
#endif /* CONFIG_NET_IPV4 */
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue