Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pimd: Modifying struct igmp_join to struct gm_join to accomodate IPv6 #10167

Merged
merged 1 commit into from
Dec 14, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pimd/pim_cmd.c
Original file line number Diff line number Diff line change
Expand Up @@ -822,7 +822,7 @@ static void igmp_show_interface_join(struct pim_instance *pim, struct vty *vty,
FOR_ALL_INTERFACES (pim->vrf, ifp) {
struct pim_interface *pim_ifp;
struct listnode *join_node;
struct igmp_join *ij;
struct gm_join *ij;
struct in_addr pri_addr;
char pri_addr_str[INET_ADDRSTRLEN];

Expand Down
26 changes: 13 additions & 13 deletions pimd/pim_iface.c
Original file line number Diff line number Diff line change
Expand Up @@ -550,7 +550,7 @@ void pim_if_addr_add(struct connected *ifc)
if (pim_ifp->join_list) {
struct listnode *node;
struct listnode *nextnode;
struct igmp_join *ij;
struct gm_join *ij;
int join_fd;

for (ALL_LIST_ELEMENTS(pim_ifp->join_list, node,
Expand Down Expand Up @@ -1157,17 +1157,17 @@ long pim_if_t_suppressed_msec(struct interface *ifp)
return t_suppressed_msec;
}

static void igmp_join_free(struct igmp_join *ij)
static void igmp_join_free(struct gm_join *ij)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When we move the datastruct name from igmp_join to gm_join, shall we change all the function names as well accordingly to accommodate both IGMP & MLD? It can be gm_join_free instead of igmp_join_free. We can update in other places as well.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks Rathna for reviewing it. We have not changed the function names yet because it is still doing igmp work. While we will implement MLD, we will change the function names if required. Few things are different between igmp and mld. We are planning to have separate file for MLD and IGMP. So whatever will be common will be renamed in terms of function when we raise the PR for MLD.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rathnasabapathyv I don't think it's necessary to rename the functions at the same time; it's more important to keep moving here.

{
XFREE(MTYPE_PIM_IGMP_JOIN, ij);
}

static struct igmp_join *igmp_join_find(struct list *join_list,
struct in_addr group_addr,
struct in_addr source_addr)
static struct gm_join *igmp_join_find(struct list *join_list,
struct in_addr group_addr,
struct in_addr source_addr)
{
struct listnode *node;
struct igmp_join *ij;
struct gm_join *ij;

assert(join_list);

Expand Down Expand Up @@ -1209,12 +1209,12 @@ static int igmp_join_sock(const char *ifname, ifindex_t ifindex,
return join_fd;
}

static struct igmp_join *igmp_join_new(struct interface *ifp,
struct in_addr group_addr,
struct in_addr source_addr)
static struct gm_join *igmp_join_new(struct interface *ifp,
struct in_addr group_addr,
struct in_addr source_addr)
{
struct pim_interface *pim_ifp;
struct igmp_join *ij;
struct gm_join *ij;
int join_fd;

pim_ifp = ifp->info;
Expand Down Expand Up @@ -1252,7 +1252,7 @@ ferr_r pim_if_igmp_join_add(struct interface *ifp, struct in_addr group_addr,
struct in_addr source_addr)
{
struct pim_interface *pim_ifp;
struct igmp_join *ij;
struct gm_join *ij;

pim_ifp = ifp->info;
if (!pim_ifp) {
Expand Down Expand Up @@ -1295,7 +1295,7 @@ int pim_if_igmp_join_del(struct interface *ifp, struct in_addr group_addr,
struct in_addr source_addr)
{
struct pim_interface *pim_ifp;
struct igmp_join *ij;
struct gm_join *ij;

pim_ifp = ifp->info;
if (!pim_ifp) {
Expand Down Expand Up @@ -1352,7 +1352,7 @@ static void pim_if_igmp_join_del_all(struct interface *ifp)
struct pim_interface *pim_ifp;
struct listnode *node;
struct listnode *nextnode;
struct igmp_join *ij;
struct gm_join *ij;

pim_ifp = ifp->info;
if (!pim_ifp) {
Expand Down
2 changes: 1 addition & 1 deletion pimd/pim_igmp.h
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
output |= *((ptr) + 1); \
} while (0)

struct igmp_join {
struct gm_join {
struct in_addr group_addr;
struct in_addr source_addr;
int sock_fd;
Expand Down
2 changes: 1 addition & 1 deletion pimd/pim_vty.c
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,7 @@ int pim_interface_config_write(struct vty *vty)
/* IF ip igmp join */
if (pim_ifp->join_list) {
struct listnode *node;
struct igmp_join *ij;
struct gm_join *ij;
for (ALL_LIST_ELEMENTS_RO(
pim_ifp->join_list, node,
ij)) {
Expand Down