mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-11-06 20:29:04 +00:00
Minor Fix (remove unused USE_ROUTER_ALERT and some coding style)
This commit is contained in:
parent
ac2932bac3
commit
d057e95ce3
@ -220,7 +220,7 @@ void
|
||||
igmp_input(struct pbuf *p, struct netif *inp, struct ip_addr *dest)
|
||||
{
|
||||
struct ip_hdr * iphdr;
|
||||
struct igmpmsg* igmp;
|
||||
struct igmp_msg* igmp;
|
||||
struct igmp_group* group;
|
||||
struct igmp_group* groupref;
|
||||
|
||||
@ -236,7 +236,7 @@ igmp_input(struct pbuf *p, struct netif *inp, struct ip_addr *dest)
|
||||
LWIP_DEBUGF(IGMP_DEBUG, ("igmp_input: message to address %l \n", (long)dest->addr));
|
||||
|
||||
/* Now calculate and check the checksum */
|
||||
igmp = (struct igmpmsg *)p->payload;
|
||||
igmp = (struct igmp_msg *)p->payload;
|
||||
if (inet_chksum(igmp, p->len)) {
|
||||
pbuf_free(p);
|
||||
IGMP_STATS_INC(igmp.chkerr);
|
||||
@ -583,18 +583,18 @@ igmp_ip_output_if(struct pbuf *p, struct ip_addr *src, struct ip_addr *dest,
|
||||
void
|
||||
igmp_send(struct igmp_group *group, u8_t type)
|
||||
{
|
||||
struct pbuf* p = NULL;
|
||||
struct igmpmsg* igmp = NULL;
|
||||
struct ip_addr src = {0};
|
||||
struct ip_addr* dest = NULL;
|
||||
struct pbuf* p = NULL;
|
||||
struct igmp_msg* igmp = NULL;
|
||||
struct ip_addr src = {0};
|
||||
struct ip_addr* dest = NULL;
|
||||
|
||||
/* IP header + IGMP header */
|
||||
p = pbuf_alloc(PBUF_TRANSPORT, IGMP_MINLEN, PBUF_RAM);
|
||||
|
||||
if (p) {
|
||||
igmp = p->payload;
|
||||
LWIP_ASSERT("igmp_send: check that first pbuf can hold struct igmpmsg",
|
||||
(p->len >= sizeof(struct igmpmsg)));
|
||||
LWIP_ASSERT("igmp_send: check that first pbuf can hold struct igmp_msg",
|
||||
(p->len >= sizeof(struct igmp_msg)));
|
||||
ip_addr_set(&src, &((group->interface)->ip_addr));
|
||||
|
||||
if (type == IGMP_V2_MEMB_REPORT) {
|
||||
|
@ -44,11 +44,6 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* Some routers are not happy with ROUTER ALERT make it defineable, 1 to enable */
|
||||
#ifndef USE_ROUTER_ALERT
|
||||
#define USE_ROUTER_ALERT 0
|
||||
#endif
|
||||
|
||||
/*
|
||||
* IGMP constants
|
||||
*/
|
||||
@ -58,14 +53,14 @@ extern "C" {
|
||||
#define ROUTER_ALERTLEN 4
|
||||
|
||||
/*
|
||||
* Message types, including version number.
|
||||
* IGMP message types, including version number.
|
||||
*/
|
||||
#define IGMP_MEMB_QUERY 0x11 /* Membership query */
|
||||
#define IGMP_V1_MEMB_REPORT 0x12 /* Ver. 1 membership report */
|
||||
#define IGMP_V2_MEMB_REPORT 0x16 /* Ver. 2 membership report */
|
||||
#define IGMP_LEAVE_GROUP 0x17 /* Leave-group message */
|
||||
|
||||
/* Timer */
|
||||
/* IGMP timer */
|
||||
#define IGMP_TMR_INTERVAL 100 /* Milliseconds */
|
||||
|
||||
/* MAC Filter Actions */
|
||||
@ -80,7 +75,7 @@ extern "C" {
|
||||
/*
|
||||
* IGMP packet format.
|
||||
*/
|
||||
struct igmpmsg {
|
||||
struct igmp_msg {
|
||||
u8_t igmp_msgtype;
|
||||
u8_t igmp_maxresp;
|
||||
u16_t igmp_checksum;
|
||||
|
Loading…
Reference in New Issue
Block a user