]> git.proxmox.com Git - mirror_frr.git/commitdiff
pimd: Modifying struct igmp_sock to gm_sock for IPv6
authorSai Gomathi <nsaigomathi@vmware.com>
Fri, 3 Dec 2021 18:23:23 +0000 (10:23 -0800)
committerSai Gomathi <nsaigomathi@vmware.com>
Fri, 3 Dec 2021 18:27:12 +0000 (10:27 -0800)
Modifying name of struct igmp_sock to struct gm_sock, which is to be used
by both IPv4 and IPv6(for both MLD and IGMP).

Co-authored-by: Mobashshera Rasool <mrasool@vmware.com>
Co-authored-by: Sarita Patra <saritap@vmware.com>
Signed-off-by: Sai Gomathi <nsaigomathi@vmware.com>
12 files changed:
pimd/pim_cmd.c
pimd/pim_iface.c
pimd/pim_igmp.c
pimd/pim_igmp.h
pimd/pim_igmp_mtrace.c
pimd/pim_igmp_mtrace.h
pimd/pim_igmpv2.c
pimd/pim_igmpv2.h
pimd/pim_igmpv3.c
pimd/pim_igmpv3.h
pimd/pim_mroute.c
pimd/pim_nb_config.c

index afbe7c453520ed2dd9789b52ed02379725867c55..09eb9219d60f3c353ca3ef70aa4ff8ece566dd5a 100644 (file)
@@ -501,7 +501,7 @@ static void igmp_show_interfaces(struct pim_instance *pim, struct vty *vty,
        FOR_ALL_INTERFACES (pim->vrf, ifp) {
                struct pim_interface *pim_ifp;
                struct listnode *sock_node;
-               struct igmp_sock *igmp;
+               struct gm_sock *igmp;
 
                pim_ifp = ifp->info;
 
@@ -575,7 +575,7 @@ static void igmp_show_interfaces_single(struct pim_instance *pim,
                                        struct vty *vty, const char *ifname,
                                        bool uj)
 {
-       struct igmp_sock *igmp;
+       struct gm_sock *igmp;
        struct interface *ifp;
        struct listnode *sock_node;
        struct pim_interface *pim_ifp;
@@ -1327,7 +1327,7 @@ static void igmp_show_statistics(struct pim_instance *pim, struct vty *vty,
        FOR_ALL_INTERFACES (pim->vrf, ifp) {
                struct pim_interface *pim_ifp;
                struct listnode *sock_node;
-               struct igmp_sock *igmp;
+               struct gm_sock *igmp;
 
                pim_ifp = ifp->info;
 
index effc6fbb8d932d1c5bc08de36fecaad9e9a87335..6e901c9f764773d9a1def5cbcc2820b6a9807d9c 100644 (file)
@@ -158,7 +158,7 @@ struct pim_interface *pim_if_new(struct interface *ifp, bool igmp, bool pim,
        pim_ifp->upstream_switch_list = NULL;
        pim_ifp->pim_generation_id = 0;
 
-       /* list of struct igmp_sock */
+       /* list of struct gm_sock */
        pim_igmp_if_init(pim_ifp, ifp);
 
        /* list of struct pim_neighbor */
@@ -530,7 +530,7 @@ void pim_if_addr_add(struct connected *ifc)
        //  return;
 
        if (PIM_IF_TEST_IGMP(pim_ifp->options)) {
-               struct igmp_sock *igmp;
+               struct gm_sock *igmp;
 
                /* lookup IGMP socket */
                igmp = pim_igmp_sock_lookup_ifaddr(pim_ifp->socket_list,
@@ -581,7 +581,7 @@ void pim_if_addr_add(struct connected *ifc)
                }
        } /* igmp */
        else {
-               struct igmp_sock *igmp;
+               struct gm_sock *igmp;
 
                /* lookup IGMP socket */
                igmp = pim_igmp_sock_lookup_ifaddr(pim_ifp->socket_list,
@@ -646,7 +646,7 @@ void pim_if_addr_add(struct connected *ifc)
 static void pim_if_addr_del_igmp(struct connected *ifc)
 {
        struct pim_interface *pim_ifp = ifc->ifp->info;
-       struct igmp_sock *igmp;
+       struct gm_sock *igmp;
        struct in_addr ifaddr;
 
        if (ifc->address->family != AF_INET) {
index 81b85f1f58df4aa5c8f9bf3fa1cef6b9ac5ffb3c..5b201c8586f39e926bcf48999a8f1f2ef4ab391f 100644 (file)
@@ -115,7 +115,7 @@ static void igmp_sock_dump(array_t *igmp_sock_array)
        int size = array_size(igmp_sock_array);
        for (int i = 0; i < size; ++i) {
 
-               struct igmp_sock *igmp = array_get(igmp_sock_array, i);
+               struct gm_sock *igmp = array_get(igmp_sock_array, i);
 
                zlog_debug("%s %s: [%d/%d] igmp_addr=%pI4 fd=%d", __FILE__,
                           __func__, i, size, &igmp->ifaddr,
@@ -124,11 +124,11 @@ static void igmp_sock_dump(array_t *igmp_sock_array)
 }
 #endif
 
-struct igmp_sock *pim_igmp_sock_lookup_ifaddr(struct list *igmp_sock_list,
-                                             struct in_addr ifaddr)
+struct gm_sock *pim_igmp_sock_lookup_ifaddr(struct list *igmp_sock_list,
+                                           struct in_addr ifaddr)
 {
        struct listnode *sock_node;
-       struct igmp_sock *igmp;
+       struct gm_sock *igmp;
 
 #ifdef IGMP_SOCK_DUMP
        igmp_sock_dump(igmp_sock_list);
@@ -143,7 +143,7 @@ struct igmp_sock *pim_igmp_sock_lookup_ifaddr(struct list *igmp_sock_list,
 
 static int pim_igmp_other_querier_expire(struct thread *t)
 {
-       struct igmp_sock *igmp;
+       struct gm_sock *igmp;
 
        igmp = THREAD_ARG(t);
 
@@ -170,7 +170,7 @@ static int pim_igmp_other_querier_expire(struct thread *t)
        return 0;
 }
 
-void pim_igmp_other_querier_timer_on(struct igmp_sock *igmp)
+void pim_igmp_other_querier_timer_on(struct gm_sock *igmp)
 {
        long other_querier_present_interval_msec;
        struct pim_interface *pim_ifp;
@@ -243,7 +243,7 @@ void pim_igmp_other_querier_timer_on(struct igmp_sock *igmp)
                              &igmp->t_other_querier_timer);
 }
 
-void pim_igmp_other_querier_timer_off(struct igmp_sock *igmp)
+void pim_igmp_other_querier_timer_off(struct gm_sock *igmp)
 {
        assert(igmp);
 
@@ -281,7 +281,7 @@ int igmp_validate_checksum(char *igmp_msg, int igmp_msg_len)
        return 0;
 }
 
-static int igmp_recv_query(struct igmp_sock *igmp, int query_version,
+static int igmp_recv_query(struct gm_sock *igmp, int query_version,
                           int max_resp_code, struct in_addr from,
                           const char *from_str, char *igmp_msg,
                           int igmp_msg_len)
@@ -410,7 +410,7 @@ static void on_trace(const char *label, struct interface *ifp,
        }
 }
 
-static int igmp_v1_recv_report(struct igmp_sock *igmp, struct in_addr from,
+static int igmp_v1_recv_report(struct gm_sock *igmp, struct in_addr from,
                               const char *from_str, char *igmp_msg,
                               int igmp_msg_len)
 {
@@ -517,7 +517,7 @@ bool pim_igmp_verify_header(struct ip *ip_hdr, size_t len, size_t *hlen)
        return true;
 }
 
-int pim_igmp_packet(struct igmp_sock *igmp, char *buf, size_t len)
+int pim_igmp_packet(struct gm_sock *igmp, char *buf, size_t len)
 {
        struct ip *ip_hdr = (struct ip *)buf;
        size_t ip_hlen; /* ip header length in bytes */
@@ -606,7 +606,7 @@ int pim_igmp_packet(struct igmp_sock *igmp, char *buf, size_t len)
        return -1;
 }
 
-void pim_igmp_general_query_on(struct igmp_sock *igmp)
+void pim_igmp_general_query_on(struct gm_sock *igmp)
 {
        struct pim_interface *pim_ifp;
        int startup_mode;
@@ -662,7 +662,7 @@ void pim_igmp_general_query_on(struct igmp_sock *igmp)
                         query_interval, &igmp->t_igmp_query_timer);
 }
 
-void pim_igmp_general_query_off(struct igmp_sock *igmp)
+void pim_igmp_general_query_off(struct gm_sock *igmp)
 {
        assert(igmp);
 
@@ -682,7 +682,7 @@ void pim_igmp_general_query_off(struct igmp_sock *igmp)
 /* Issue IGMP general query */
 static int pim_igmp_general_query(struct thread *t)
 {
-       struct igmp_sock *igmp;
+       struct gm_sock *igmp;
        struct in_addr dst_addr;
        struct in_addr group_addr;
        struct pim_interface *pim_ifp;
@@ -738,7 +738,7 @@ static int pim_igmp_general_query(struct thread *t)
        return 0;
 }
 
-static void sock_close(struct igmp_sock *igmp)
+static void sock_close(struct gm_sock *igmp)
 {
        pim_igmp_other_querier_timer_off(igmp);
        pim_igmp_general_query_off(igmp);
@@ -768,7 +768,7 @@ static void sock_close(struct igmp_sock *igmp)
        }
 }
 
-void igmp_startup_mode_on(struct igmp_sock *igmp)
+void igmp_startup_mode_on(struct gm_sock *igmp)
 {
        struct pim_interface *pim_ifp;
 
@@ -857,7 +857,7 @@ void igmp_group_delete_empty_include(struct gm_group *group)
        igmp_group_delete(group);
 }
 
-void igmp_sock_free(struct igmp_sock *igmp)
+void igmp_sock_free(struct gm_sock *igmp)
 {
        assert(!igmp->t_igmp_read);
        assert(!igmp->t_igmp_query_timer);
@@ -866,7 +866,7 @@ void igmp_sock_free(struct igmp_sock *igmp)
        XFREE(MTYPE_PIM_IGMP_SOCKET, igmp);
 }
 
-void igmp_sock_delete(struct igmp_sock *igmp)
+void igmp_sock_delete(struct gm_sock *igmp)
 {
        struct pim_interface *pim_ifp;
 
@@ -886,7 +886,7 @@ void igmp_sock_delete_all(struct interface *ifp)
 {
        struct pim_interface *pim_ifp;
        struct listnode *igmp_node, *igmp_nextnode;
-       struct igmp_sock *igmp;
+       struct gm_sock *igmp;
 
        pim_ifp = ifp->info;
 
@@ -953,11 +953,11 @@ void pim_igmp_if_fini(struct pim_interface *pim_ifp)
        list_delete(&pim_ifp->socket_list);
 }
 
-static struct igmp_sock *igmp_sock_new(int fd, struct in_addr ifaddr,
-                                      struct interface *ifp, int mtrace_only)
+static struct gm_sock *igmp_sock_new(int fd, struct in_addr ifaddr,
+                                    struct interface *ifp, int mtrace_only)
 {
        struct pim_interface *pim_ifp;
-       struct igmp_sock *igmp;
+       struct gm_sock *igmp;
 
        pim_ifp = ifp->info;
 
@@ -1000,12 +1000,12 @@ static struct igmp_sock *igmp_sock_new(int fd, struct in_addr ifaddr,
        return igmp;
 }
 
-static void igmp_read_on(struct igmp_sock *igmp);
+static void igmp_read_on(struct gm_sock *igmp);
 
 static int pim_igmp_read(struct thread *t)
 {
        uint8_t buf[10000];
-       struct igmp_sock *igmp = (struct igmp_sock *)THREAD_ARG(t);
+       struct gm_sock *igmp = (struct gm_sock *)THREAD_ARG(t);
        struct sockaddr_in from;
        struct sockaddr_in to;
        socklen_t fromlen = sizeof(from);
@@ -1031,7 +1031,7 @@ done:
        return 0;
 }
 
-static void igmp_read_on(struct igmp_sock *igmp)
+static void igmp_read_on(struct gm_sock *igmp)
 {
 
        if (PIM_DEBUG_IGMP_TRACE_DETAIL) {
@@ -1042,13 +1042,12 @@ static void igmp_read_on(struct igmp_sock *igmp)
                        &igmp->t_igmp_read);
 }
 
-struct igmp_sock *pim_igmp_sock_add(struct list *igmp_sock_list,
-                                   struct in_addr ifaddr,
-                                   struct interface *ifp,
-                                   bool mtrace_only)
+struct gm_sock *pim_igmp_sock_add(struct list *igmp_sock_list,
+                                 struct in_addr ifaddr, struct interface *ifp,
+                                 bool mtrace_only)
 {
        struct pim_interface *pim_ifp;
-       struct igmp_sock *igmp;
+       struct gm_sock *igmp;
        struct sockaddr_in sin;
        int fd;
 
@@ -1180,7 +1179,7 @@ void igmp_group_timer_on(struct gm_group *group, long interval_msec,
                              interval_msec, &group->t_group_timer);
 }
 
-struct gm_group *find_group_by_addr(struct igmp_sock *igmp,
+struct gm_group *find_group_by_addr(struct gm_sock *igmp,
                                    struct in_addr group_addr)
 {
        struct gm_group lookup;
@@ -1191,7 +1190,7 @@ struct gm_group *find_group_by_addr(struct igmp_sock *igmp,
        return hash_lookup(pim_ifp->group_hash, &lookup);
 }
 
-struct gm_group *igmp_add_group_by_addr(struct igmp_sock *igmp,
+struct gm_group *igmp_add_group_by_addr(struct gm_sock *igmp,
                                        struct in_addr group_addr)
 {
        struct gm_group *group;
@@ -1300,7 +1299,7 @@ void igmp_send_query_on_intf(struct interface *ifp, int igmp_ver)
 {
        struct pim_interface *pim_ifp = ifp->info;
        struct listnode *sock_node = NULL;
-       struct igmp_sock *igmp = NULL;
+       struct gm_sock *igmp = NULL;
        struct in_addr dst_addr;
        struct in_addr group_addr;
        int query_buf_size;
index ace9c1be329bec21ff2b6a0bdc38fb187f2b173b..08a7a70e68699d6d65e317f4ac891340f7c896a7 100644 (file)
@@ -82,7 +82,7 @@ struct igmp_join {
        time_t sock_creation;
 };
 
-struct igmp_sock {
+struct gm_sock {
        int fd;
        struct interface *interface;
        struct in_addr ifaddr;
@@ -108,21 +108,20 @@ void pim_igmp_if_init(struct pim_interface *pim_ifp, struct interface *ifp);
 void pim_igmp_if_reset(struct pim_interface *pim_ifp);
 void pim_igmp_if_fini(struct pim_interface *pim_ifp);
 
-struct igmp_sock *pim_igmp_sock_lookup_ifaddr(struct list *igmp_sock_list,
-                                             struct in_addr ifaddr);
-struct igmp_sock *pim_igmp_sock_add(struct list *igmp_sock_list,
-                                   struct in_addr ifaddr,
-                                   struct interface *ifp,
-                                   bool mtrace_only);
-void igmp_sock_delete(struct igmp_sock *igmp);
-void igmp_sock_free(struct igmp_sock *igmp);
+struct gm_sock *pim_igmp_sock_lookup_ifaddr(struct list *igmp_sock_list,
+                                           struct in_addr ifaddr);
+struct gm_sock *pim_igmp_sock_add(struct list *igmp_sock_list,
+                                 struct in_addr ifaddr, struct interface *ifp,
+                                 bool mtrace_only);
+void igmp_sock_delete(struct gm_sock *igmp);
+void igmp_sock_free(struct gm_sock *igmp);
 void igmp_sock_delete_all(struct interface *ifp);
-int pim_igmp_packet(struct igmp_sock *igmp, char *buf, size_t len);
+int pim_igmp_packet(struct gm_sock *igmp, char *buf, size_t len);
 bool pim_igmp_verify_header(struct ip *ip_hdr, size_t len, size_t *ip_hlen);
-void pim_igmp_general_query_on(struct igmp_sock *igmp);
-void pim_igmp_general_query_off(struct igmp_sock *igmp);
-void pim_igmp_other_querier_timer_on(struct igmp_sock *igmp);
-void pim_igmp_other_querier_timer_off(struct igmp_sock *igmp);
+void pim_igmp_general_query_on(struct gm_sock *igmp);
+void pim_igmp_general_query_off(struct gm_sock *igmp);
+void pim_igmp_other_querier_timer_on(struct gm_sock *igmp);
+void pim_igmp_other_querier_timer_off(struct gm_sock *igmp);
 
 int igmp_validate_checksum(char *igmp_msg, int igmp_msg_len);
 
@@ -185,9 +184,9 @@ struct gm_group {
        int64_t last_igmp_v2_report_dsec;
 };
 
-struct gm_group *find_group_by_addr(struct igmp_sock *igmp,
+struct gm_group *find_group_by_addr(struct gm_sock *igmp,
                                    struct in_addr group_addr);
-struct gm_group *igmp_add_group_by_addr(struct igmp_sock *igmp,
+struct gm_group *igmp_add_group_by_addr(struct gm_sock *igmp,
                                        struct in_addr group_addr);
 
 struct gm_source *igmp_get_source_by_addr(struct gm_group *group,
@@ -196,7 +195,7 @@ struct gm_source *igmp_get_source_by_addr(struct gm_group *group,
 
 void igmp_group_delete_empty_include(struct gm_group *group);
 
-void igmp_startup_mode_on(struct igmp_sock *igmp);
+void igmp_startup_mode_on(struct gm_sock *igmp);
 
 void igmp_group_timer_on(struct gm_group *group, long interval_msec,
                         const char *ifname);
index 42101bc48e7c1933473c747b05ea96ef019ec9d4..65a8ca4e4072ad132a97323e9a62462261eb40a6 100644 (file)
@@ -564,7 +564,7 @@ static int mtrace_send_response(struct pim_instance *pim,
                                  mtracep->rsp_addr, mtracep->grp_addr);
 }
 
-int igmp_mtrace_recv_qry_req(struct igmp_sock *igmp, struct ip *ip_hdr,
+int igmp_mtrace_recv_qry_req(struct gm_sock *igmp, struct ip *ip_hdr,
                             struct in_addr from, const char *from_str,
                             char *igmp_msg, int igmp_msg_len)
 {
@@ -799,7 +799,7 @@ int igmp_mtrace_recv_qry_req(struct igmp_sock *igmp, struct ip *ip_hdr,
 }
 
 /* 6.3. Traceroute responses */
-int igmp_mtrace_recv_response(struct igmp_sock *igmp, struct ip *ip_hdr,
+int igmp_mtrace_recv_response(struct gm_sock *igmp, struct ip *ip_hdr,
                              struct in_addr from, const char *from_str,
                              char *igmp_msg, int igmp_msg_len)
 {
index 4ab562ed9799ac04a0a81efa5d792ef4ad6c0640..760b2e417b961d7d80b5920e23fd09e3d31a2d48 100644 (file)
@@ -94,11 +94,11 @@ struct igmp_mtrace {
 #define MTRACE_HDR_SIZE (sizeof(struct igmp_mtrace))
 #define MTRACE_RSP_SIZE (sizeof(struct igmp_mtrace_rsp))
 
-int igmp_mtrace_recv_qry_req(struct igmp_sock *igmp, struct ip *ip_hdr,
+int igmp_mtrace_recv_qry_req(struct gm_sock *igmp, struct ip *ip_hdr,
                             struct in_addr from, const char *from_str,
                             char *igmp_msg, int igmp_msg_len);
 
-int igmp_mtrace_recv_response(struct igmp_sock *igmp, struct ip *ip_hdr,
+int igmp_mtrace_recv_response(struct gm_sock *igmp, struct ip *ip_hdr,
                              struct in_addr from, const char *from_str,
                              char *igmp_msg, int igmp_msg_len);
 
index c3599ee948075ca0fba9b82105f167025e056d5f..2616afca69bb95d61d9024023896766b88f2694a 100644 (file)
@@ -102,7 +102,7 @@ void igmp_v2_send_query(struct gm_group *group, int fd, const char *ifname,
        }
 }
 
-int igmp_v2_recv_report(struct igmp_sock *igmp, struct in_addr from,
+int igmp_v2_recv_report(struct gm_sock *igmp, struct in_addr from,
                        const char *from_str, char *igmp_msg, int igmp_msg_len)
 {
        struct interface *ifp = igmp->interface;
@@ -158,7 +158,7 @@ int igmp_v2_recv_report(struct igmp_sock *igmp, struct in_addr from,
        return 0;
 }
 
-int igmp_v2_recv_leave(struct igmp_sock *igmp, struct ip *ip_hdr,
+int igmp_v2_recv_leave(struct gm_sock *igmp, struct ip *ip_hdr,
                       const char *from_str, char *igmp_msg, int igmp_msg_len)
 {
        struct interface *ifp = igmp->interface;
index 84c14d47f6e11a2f4ccdb959c2f2b0ef72840c93..4e6dc6995cd84e1ba21cab7aff9e75d7a94dc602 100644 (file)
@@ -26,10 +26,10 @@ void igmp_v2_send_query(struct gm_group *group, int fd, const char *ifname,
                        struct in_addr group_addr,
                        int query_max_response_time_dsec);
 
-int igmp_v2_recv_report(struct igmp_sock *igmp, struct in_addr from,
+int igmp_v2_recv_report(struct gm_sock *igmp, struct in_addr from,
                        const char *from_str, char *igmp_msg, int igmp_msg_len);
 
-int igmp_v2_recv_leave(struct igmp_sock *igmp, struct ip *ip_hdr,
+int igmp_v2_recv_leave(struct gm_sock *igmp, struct ip *ip_hdr,
                       const char *from_str, char *igmp_msg, int igmp_msg_len);
 
 #endif /* PIM_IGMPV2_H */
index e91b48c937f1111d9786bc24f55e976c2342c1e3..0dd6d0a351d918a9c146c58aaa76f64a9cbf3a4b 100644 (file)
@@ -60,7 +60,7 @@ static void on_trace(const char *label, struct interface *ifp,
 static inline long igmp_gmi_msec(struct gm_group *group)
 {
        struct pim_interface *pim_ifp = group->interface->info;
-       struct igmp_sock *igmp;
+       struct gm_sock *igmp;
        struct listnode *sock_node;
 
        long qrv = 0, qqi = 0;
@@ -481,7 +481,7 @@ struct gm_source *igmp_get_source_by_addr(struct gm_group *group,
        return src;
 }
 
-static void allow(struct igmp_sock *igmp, struct in_addr from,
+static void allow(struct gm_sock *igmp, struct in_addr from,
                  struct in_addr group_addr, int num_sources,
                  struct in_addr *sources)
 {
@@ -548,7 +548,7 @@ static void allow(struct igmp_sock *igmp, struct in_addr from,
        } /* scan received sources */
 }
 
-void igmpv3_report_isin(struct igmp_sock *igmp, struct in_addr from,
+void igmpv3_report_isin(struct gm_sock *igmp, struct in_addr from,
                        struct in_addr group_addr, int num_sources,
                        struct in_addr *sources)
 {
@@ -658,7 +658,7 @@ static void isex_incl(struct gm_group *group, int num_sources,
        group_exclude_fwd_anysrc_ifempty(group);
 }
 
-void igmpv3_report_isex(struct igmp_sock *igmp, struct in_addr from,
+void igmpv3_report_isex(struct gm_sock *igmp, struct in_addr from,
                        struct in_addr group_addr, int num_sources,
                        struct in_addr *sources, int from_igmp_v2_report)
 {
@@ -775,7 +775,7 @@ static void toin_excl(struct gm_group *group, int num_sources,
        group_query_send(group);
 }
 
-void igmpv3_report_toin(struct igmp_sock *igmp, struct in_addr from,
+void igmpv3_report_toin(struct gm_sock *igmp, struct in_addr from,
                        struct in_addr group_addr, int num_sources,
                        struct in_addr *sources)
 {
@@ -936,7 +936,7 @@ static void toex_excl(struct gm_group *group, int num_sources,
        }
 }
 
-void igmpv3_report_toex(struct igmp_sock *igmp, struct in_addr from,
+void igmpv3_report_toex(struct gm_sock *igmp, struct in_addr from,
                        struct in_addr group_addr, int num_sources,
                        struct in_addr *sources)
 {
@@ -965,7 +965,7 @@ void igmpv3_report_toex(struct igmp_sock *igmp, struct in_addr from,
        igmp_group_reset_gmi(group);
 }
 
-void igmpv3_report_allow(struct igmp_sock *igmp, struct in_addr from,
+void igmpv3_report_allow(struct gm_sock *igmp, struct in_addr from,
                         struct in_addr group_addr, int num_sources,
                         struct in_addr *sources)
 {
@@ -981,7 +981,7 @@ static void igmp_send_query_group(struct gm_group *group, char *query_buf,
 {
        struct interface *ifp = group->interface;
        struct pim_interface *pim_ifp = ifp->info;
-       struct igmp_sock *igmp;
+       struct gm_sock *igmp;
        struct listnode *sock_node;
 
        for (ALL_LIST_ELEMENTS_RO(pim_ifp->socket_list, sock_node, igmp)) {
@@ -1460,7 +1460,7 @@ static void block_incl(struct gm_group *group, int num_sources,
        }
 }
 
-void igmpv3_report_block(struct igmp_sock *igmp, struct in_addr from,
+void igmpv3_report_block(struct gm_sock *igmp, struct in_addr from,
                         struct in_addr group_addr, int num_sources,
                         struct in_addr *sources)
 {
@@ -1689,7 +1689,7 @@ void igmp_v3_send_query(struct gm_group *group, int fd, const char *ifname,
        }
 }
 
-void igmp_v3_recv_query(struct igmp_sock *igmp, const char *from_str,
+void igmp_v3_recv_query(struct gm_sock *igmp, const char *from_str,
                        char *igmp_msg)
 {
        struct interface *ifp;
@@ -1825,7 +1825,7 @@ void igmp_v3_recv_query(struct igmp_sock *igmp, const char *from_str,
        } /* s_flag is clear: timer updates */
 }
 
-int igmp_v3_recv_report(struct igmp_sock *igmp, struct in_addr from,
+int igmp_v3_recv_report(struct gm_sock *igmp, struct in_addr from,
                        const char *from_str, char *igmp_msg, int igmp_msg_len)
 {
        int num_groups;
index 8bcfdd70328457235f55e29bcb760a89c59312aa..7449e420e42154c1b36de1c57f33d6f8934f69ec 100644 (file)
@@ -60,22 +60,22 @@ void igmp_source_free(struct gm_source *source);
 void igmp_source_delete(struct gm_source *source);
 void igmp_source_delete_expired(struct list *source_list);
 
-void igmpv3_report_isin(struct igmp_sock *igmp, struct in_addr from,
+void igmpv3_report_isin(struct gm_sock *igmp, struct in_addr from,
                        struct in_addr group_addr, int num_sources,
                        struct in_addr *sources);
-void igmpv3_report_isex(struct igmp_sock *igmp, struct in_addr from,
+void igmpv3_report_isex(struct gm_sock *igmp, struct in_addr from,
                        struct in_addr group_addr, int num_sources,
                        struct in_addr *sources, int from_igmp_v2_report);
-void igmpv3_report_toin(struct igmp_sock *igmp, struct in_addr from,
+void igmpv3_report_toin(struct gm_sock *igmp, struct in_addr from,
                        struct in_addr group_addr, int num_sources,
                        struct in_addr *sources);
-void igmpv3_report_toex(struct igmp_sock *igmp, struct in_addr from,
+void igmpv3_report_toex(struct gm_sock *igmp, struct in_addr from,
                        struct in_addr group_addr, int num_sources,
                        struct in_addr *sources);
-void igmpv3_report_allow(struct igmp_sock *igmp, struct in_addr from,
+void igmpv3_report_allow(struct gm_sock *igmp, struct in_addr from,
                         struct in_addr group_addr, int num_sources,
                         struct in_addr *sources);
-void igmpv3_report_block(struct igmp_sock *igmp, struct in_addr from,
+void igmpv3_report_block(struct gm_sock *igmp, struct in_addr from,
                         struct in_addr group_addr, int num_sources,
                         struct in_addr *sources);
 
@@ -92,10 +92,10 @@ void igmp_v3_send_query(struct gm_group *group, int fd, const char *ifname,
                        uint8_t querier_robustness_variable,
                        uint16_t querier_query_interval);
 
-void igmp_v3_recv_query(struct igmp_sock *igmp, const char *from_str,
+void igmp_v3_recv_query(struct gm_sock *igmp, const char *from_str,
                        char *igmp_msg);
 
-int igmp_v3_recv_report(struct igmp_sock *igmp, struct in_addr from,
+int igmp_v3_recv_report(struct gm_sock *igmp, struct in_addr from,
                        const char *from_str, char *igmp_msg, int igmp_msg_len);
 
 #endif /* PIM_IGMPV3_H */
index aa1df44f540915e7e6c761ebab6fec31ff4e90d7..4d648fcc592bec76e2f686d6ba500ca8f6fcbd02 100644 (file)
@@ -593,7 +593,7 @@ static int pim_mroute_msg(struct pim_instance *pim, const char *buf,
        const struct ip *ip_hdr;
        const struct igmpmsg *msg;
        struct in_addr ifaddr;
-       struct igmp_sock *igmp;
+       struct gm_sock *igmp;
        const struct prefix *connected_src;
 
        if (buf_size < (int)sizeof(struct ip))
index 7b935dd7b65c85bcc722d17a03fa7353598776f6..796a15398910c0810c26e9d6a01598193d028975 100644 (file)
@@ -365,7 +365,7 @@ static int pim_cmd_igmp_start(struct interface *ifp)
  * This function propagates the reconfiguration to every active socket
  * for that interface.
  */
-static void igmp_sock_query_interval_reconfig(struct igmp_sock *igmp)
+static void igmp_sock_query_interval_reconfig(struct gm_sock *igmp)
 {
        struct interface *ifp;
        struct pim_interface *pim_ifp;
@@ -395,7 +395,7 @@ static void igmp_sock_query_interval_reconfig(struct igmp_sock *igmp)
        igmp_startup_mode_on(igmp);
 }
 
-static void igmp_sock_query_reschedule(struct igmp_sock *igmp)
+static void igmp_sock_query_reschedule(struct gm_sock *igmp)
 {
        if (igmp->mtrace_only)
                return;
@@ -428,7 +428,7 @@ static void change_query_interval(struct pim_interface *pim_ifp,
                int query_interval)
 {
        struct listnode *sock_node;
-       struct igmp_sock *igmp;
+       struct gm_sock *igmp;
 
        pim_ifp->default_query_interval = query_interval;
 
@@ -442,7 +442,7 @@ static void change_query_max_response_time(struct pim_interface *pim_ifp,
                int query_max_response_time_dsec)
 {
        struct listnode *sock_node;
-       struct igmp_sock *igmp;
+       struct gm_sock *igmp;
        struct listnode *grp_node;
        struct gm_group *grp;