mirror of
https://git.savannah.nongnu.org/git/lwip.git
synced 2025-08-04 05:24:37 +08:00
Fixed const errors after changing netif_ip4_addr/netif_ip6_addr to return cont pointers
This commit is contained in:
parent
0fbdd5e56e
commit
ed4130bd2f
@ -83,7 +83,7 @@ icmp_input(struct pbuf *p, struct netif *inp)
|
|||||||
const struct ip_hdr *iphdr_in;
|
const struct ip_hdr *iphdr_in;
|
||||||
struct ip_hdr *iphdr;
|
struct ip_hdr *iphdr;
|
||||||
s16_t hlen;
|
s16_t hlen;
|
||||||
ip4_addr_t* src;
|
const ip4_addr_t* src;
|
||||||
|
|
||||||
ICMP_STATS_INC(icmp.recv);
|
ICMP_STATS_INC(icmp.recv);
|
||||||
MIB2_STATS_INC(mib2.icmpinmsgs);
|
MIB2_STATS_INC(mib2.icmpinmsgs);
|
||||||
@ -110,7 +110,7 @@ icmp_input(struct pbuf *p, struct netif *inp)
|
|||||||
if (ip_addr_ismulticast(ip_current_dest_addr())) {
|
if (ip_addr_ismulticast(ip_current_dest_addr())) {
|
||||||
#if LWIP_MULTICAST_PING
|
#if LWIP_MULTICAST_PING
|
||||||
/* For multicast, use address of receiving interface as source address */
|
/* For multicast, use address of receiving interface as source address */
|
||||||
src = &inp->ip_addr;
|
src = netif_ip4_addr(inp);
|
||||||
#else /* LWIP_MULTICAST_PING */
|
#else /* LWIP_MULTICAST_PING */
|
||||||
LWIP_DEBUGF(ICMP_DEBUG, ("icmp_input: Not echoing to multicast pings\n"));
|
LWIP_DEBUGF(ICMP_DEBUG, ("icmp_input: Not echoing to multicast pings\n"));
|
||||||
goto icmperr;
|
goto icmperr;
|
||||||
|
@ -81,7 +81,7 @@ icmp6_input(struct pbuf *p, struct netif *inp)
|
|||||||
{
|
{
|
||||||
struct icmp6_hdr *icmp6hdr;
|
struct icmp6_hdr *icmp6hdr;
|
||||||
struct pbuf * r;
|
struct pbuf * r;
|
||||||
ip6_addr_t * reply_src;
|
const ip6_addr_t * reply_src;
|
||||||
|
|
||||||
ICMP6_STATS_INC(icmp6.recv);
|
ICMP6_STATS_INC(icmp6.recv);
|
||||||
|
|
||||||
@ -272,7 +272,8 @@ icmp6_send_response(struct pbuf *p, u8_t code, u32_t data, u8_t type)
|
|||||||
{
|
{
|
||||||
struct pbuf *q;
|
struct pbuf *q;
|
||||||
struct icmp6_hdr *icmp6hdr;
|
struct icmp6_hdr *icmp6hdr;
|
||||||
ip6_addr_t *reply_src, *reply_dest;
|
const ip6_addr_t *reply_src;
|
||||||
|
ip6_addr_t *reply_dest;
|
||||||
ip6_addr_t reply_src_local, reply_dest_local;
|
ip6_addr_t reply_src_local, reply_dest_local;
|
||||||
struct ip6_hdr *ip6hdr;
|
struct ip6_hdr *ip6hdr;
|
||||||
struct netif *netif;
|
struct netif *netif;
|
||||||
|
@ -206,10 +206,10 @@ ip6_route(const ip6_addr_t *src, const ip6_addr_t *dest)
|
|||||||
* @return the most suitable source address to use, or NULL if no suitable
|
* @return the most suitable source address to use, or NULL if no suitable
|
||||||
* source address is found
|
* source address is found
|
||||||
*/
|
*/
|
||||||
ip6_addr_t *
|
const ip6_addr_t *
|
||||||
ip6_select_source_address(struct netif *netif, const ip6_addr_t * dest)
|
ip6_select_source_address(struct netif *netif, const ip6_addr_t * dest)
|
||||||
{
|
{
|
||||||
ip6_addr_t * src = NULL;
|
const ip6_addr_t *src = NULL;
|
||||||
u8_t i;
|
u8_t i;
|
||||||
|
|
||||||
/* If dest is link-local, choose a link-local source. */
|
/* If dest is link-local, choose a link-local source. */
|
||||||
|
@ -162,7 +162,7 @@ PACK_STRUCT_END
|
|||||||
|
|
||||||
|
|
||||||
struct netif *ip6_route(const ip6_addr_t *src, const ip6_addr_t *dest);
|
struct netif *ip6_route(const ip6_addr_t *src, const ip6_addr_t *dest);
|
||||||
ip6_addr_t *ip6_select_source_address(struct netif *netif, const ip6_addr_t * dest);
|
const ip6_addr_t *ip6_select_source_address(struct netif *netif, const ip6_addr_t * dest);
|
||||||
err_t ip6_input(struct pbuf *p, struct netif *inp);
|
err_t ip6_input(struct pbuf *p, struct netif *inp);
|
||||||
err_t ip6_output(struct pbuf *p, const ip6_addr_t *src, const ip6_addr_t *dest,
|
err_t ip6_output(struct pbuf *p, const ip6_addr_t *src, const ip6_addr_t *dest,
|
||||||
u8_t hl, u8_t tc, u8_t nexth);
|
u8_t hl, u8_t tc, u8_t nexth);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user