net: Remove link layer reserve param from IP packet creator
The ll_reserve parameter is useless in net_ipv{4|6}_create_raw() function as the reserve information is already stored in buf. Change-Id: I7815a78c001e3da532478c04b3dac9b37bbc723c Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
This commit is contained in:
parent
5197266768
commit
189ec2b6ad
|
@ -299,8 +299,7 @@ int net_icmpv6_send_echo_request(struct net_if *iface,
|
|||
reserve = net_if_get_ll_reserve(iface, dst);
|
||||
net_nbuf_set_ll_reserve(buf, reserve);
|
||||
|
||||
buf = net_ipv6_create_raw(buf, reserve, src, dst, iface,
|
||||
IPPROTO_ICMPV6);
|
||||
buf = net_ipv6_create_raw(buf, src, dst, iface, IPPROTO_ICMPV6);
|
||||
|
||||
net_nbuf_set_family(buf, AF_INET6);
|
||||
net_nbuf_set_iface(buf, iface);
|
||||
|
|
|
@ -22,7 +22,6 @@
|
|||
#include "ipv4.h"
|
||||
|
||||
struct net_buf *net_ipv4_create_raw(struct net_buf *buf,
|
||||
uint16_t reserve,
|
||||
const struct in_addr *src,
|
||||
const struct in_addr *dst,
|
||||
struct net_if *iface,
|
||||
|
@ -72,7 +71,6 @@ struct net_buf *net_ipv4_create(struct net_context *context,
|
|||
}
|
||||
|
||||
return net_ipv4_create_raw(buf,
|
||||
net_nbuf_ll_reserve(buf),
|
||||
src,
|
||||
dst,
|
||||
net_context_get_iface(context),
|
||||
|
|
|
@ -26,7 +26,6 @@
|
|||
* @brief Create IPv4 packet in provided net_buf.
|
||||
*
|
||||
* @param buf Network buffer
|
||||
* @param reserve Link layer reserve
|
||||
* @param src Source IPv4 address
|
||||
* @param dst Destination IPv4 address
|
||||
* @param iface Network interface
|
||||
|
@ -35,7 +34,6 @@
|
|||
* @return Return network buffer that contains the IPv4 packet.
|
||||
*/
|
||||
struct net_buf *net_ipv4_create_raw(struct net_buf *buf,
|
||||
uint16_t reserve,
|
||||
const struct in_addr *src,
|
||||
const struct in_addr *dst,
|
||||
struct net_if *iface,
|
||||
|
|
|
@ -314,7 +314,6 @@ const struct in6_addr *net_ipv6_unspecified_address(void)
|
|||
}
|
||||
|
||||
struct net_buf *net_ipv6_create_raw(struct net_buf *buf,
|
||||
uint16_t reserve,
|
||||
const struct in6_addr *src,
|
||||
const struct in6_addr *dst,
|
||||
struct net_if *iface,
|
||||
|
@ -364,7 +363,6 @@ struct net_buf *net_ipv6_create(struct net_context *context,
|
|||
}
|
||||
|
||||
return net_ipv6_create_raw(buf,
|
||||
net_nbuf_ll_reserve(buf),
|
||||
src,
|
||||
dst,
|
||||
net_context_get_iface(context),
|
||||
|
|
|
@ -124,7 +124,6 @@ int net_ipv6_send_na(struct net_if *iface, struct in6_addr *src,
|
|||
* @brief Create IPv6 packet in provided net_buf.
|
||||
*
|
||||
* @param buf Network buffer
|
||||
* @param reserve Link layer reserve
|
||||
* @param src Source IPv6 address
|
||||
* @param dst Destination IPv6 address
|
||||
* @param iface Network interface
|
||||
|
@ -133,7 +132,6 @@ int net_ipv6_send_na(struct net_if *iface, struct in6_addr *src,
|
|||
* @return Return network buffer that contains the IPv6 packet.
|
||||
*/
|
||||
struct net_buf *net_ipv6_create_raw(struct net_buf *buf,
|
||||
uint16_t reserve,
|
||||
const struct in6_addr *src,
|
||||
const struct in6_addr *dst,
|
||||
struct net_if *iface,
|
||||
|
|
|
@ -459,8 +459,7 @@ int net_rpl_dio_send(struct net_if *iface,
|
|||
|
||||
net_nbuf_set_ll_reserve(buf, net_if_get_ll_reserve(iface, dst));
|
||||
|
||||
buf = net_ipv6_create_raw(buf, net_nbuf_ll_reserve(buf),
|
||||
src, dst_addr, iface, IPPROTO_ICMPV6);
|
||||
buf = net_ipv6_create_raw(buf, src, dst_addr, iface, IPPROTO_ICMPV6);
|
||||
|
||||
net_nbuf_set_iface(buf, iface);
|
||||
|
||||
|
@ -738,8 +737,7 @@ int net_rpl_dis_send(struct in6_addr *dst, struct net_if *iface)
|
|||
|
||||
net_nbuf_set_ll_reserve(buf, net_if_get_ll_reserve(iface, dst_addr));
|
||||
|
||||
buf = net_ipv6_create_raw(buf, net_nbuf_ll_reserve(buf),
|
||||
src, dst_addr, iface, IPPROTO_ICMPV6);
|
||||
buf = net_ipv6_create_raw(buf, src, dst_addr, iface, IPPROTO_ICMPV6);
|
||||
|
||||
net_nbuf_set_iface(buf, iface);
|
||||
|
||||
|
@ -2975,8 +2973,7 @@ int net_rpl_dao_send(struct net_if *iface,
|
|||
|
||||
net_nbuf_set_ll_reserve(buf, net_if_get_ll_reserve(iface, dst));
|
||||
|
||||
buf = net_ipv6_create_raw(buf, net_nbuf_ll_reserve(buf),
|
||||
src, dst, iface, IPPROTO_ICMPV6);
|
||||
buf = net_ipv6_create_raw(buf, src, dst, iface, IPPROTO_ICMPV6);
|
||||
|
||||
net_nbuf_set_iface(buf, iface);
|
||||
|
||||
|
@ -3102,8 +3099,7 @@ static int dao_ack_send(struct net_buf *orig,
|
|||
|
||||
net_nbuf_set_ll_reserve(buf, net_if_get_ll_reserve(iface, dst));
|
||||
|
||||
buf = net_ipv6_create_raw(buf, net_nbuf_ll_reserve(buf),
|
||||
src, dst, iface, IPPROTO_ICMPV6);
|
||||
buf = net_ipv6_create_raw(buf, src, dst, iface, IPPROTO_ICMPV6);
|
||||
|
||||
net_nbuf_set_iface(buf, iface);
|
||||
|
||||
|
|
|
@ -364,8 +364,7 @@ static bool net_test_send_na(struct net_if *iface,
|
|||
|
||||
net_nbuf_set_ll_reserve(buf, net_if_get_ll_reserve(iface, dst));
|
||||
|
||||
buf = net_ipv6_create_raw(buf, net_nbuf_ll_reserve(buf),
|
||||
addr, dst, iface, IPPROTO_ICMPV6);
|
||||
buf = net_ipv6_create_raw(buf, addr, dst, iface, IPPROTO_ICMPV6);
|
||||
|
||||
frag = net_nbuf_get_frag(buf, K_FOREVER);
|
||||
|
||||
|
|
Loading…
Reference in a new issue