work on -Wconversion...

This commit is contained in:
goldsimon
2017-07-06 11:22:38 +02:00
parent 9d61e36466
commit 694fc7e472
4 changed files with 46 additions and 35 deletions

View File

@@ -116,7 +116,7 @@ struct ip_globals
#endif /* LWIP_IPV4 */
#if LWIP_IPV6
/** Header of the input IPv6 packet currently being processed. */
struct ip6_hdr *current_ip6_header;
const struct ip6_hdr *current_ip6_header;
#endif /* LWIP_IPV6 */
/** Total header length of current_ip4/6_header (i.e. after this, the UDP/TCP header starts) */
u16_t current_ip_header_tot_len;
@@ -152,7 +152,7 @@ extern struct ip_globals ip_data;
/** Get the IPv6 header of the current packet.
* This function must only be called from a receive callback (udp_recv,
* raw_recv, tcp_accept). It will return NULL otherwise. */
#define ip6_current_header() ((const struct ip6_hdr*)(ip_data.current_ip6_header))
#define ip6_current_header() ip_data.current_ip6_header
/** Returns TRUE if the current IP input packet is IPv6, FALSE if it is IPv4 */
#define ip_current_is_v6() (ip6_current_header() != NULL)
/** Source IPv6 address of current_header */
@@ -194,7 +194,7 @@ extern struct ip_globals ip_data;
/** Get the IPv6 header of the current packet.
* This function must only be called from a receive callback (udp_recv,
* raw_recv, tcp_accept). It will return NULL otherwise. */
#define ip6_current_header() ((const struct ip6_hdr*)(ip_data.current_ip6_header))
#define ip6_current_header() ip_data.current_ip6_header
/** Always returns TRUE when only supporting IPv6 only */
#define ip_current_is_v6() 1
/** Get the transport layer protocol */

View File

@@ -90,7 +90,7 @@ extern "C" {
struct ip6_reassdata {
struct ip6_reassdata *next;
struct pbuf *p;
struct ip6_hdr *iphdr; /* pointer to the first (original) IPv6 header */
const struct ip6_hdr *iphdr; /* pointer to the first (original) IPv6 header */
#if IPV6_FRAG_COPYHEADER
ip6_addr_p_t src; /* copy of the source address in the IP header */
ip6_addr_p_t dest; /* copy of the destination address in the IP header */