igmp_router.c File Reference

IGMP router. More...

#include "core/net.h"
#include "ipv4/ipv4.h"
#include "igmp/igmp_router.h"
#include "igmp/igmp_router_misc.h"
#include "debug.h"

Go to the source code of this file.

Macros

#define TRACE_LEVEL   IGMP_TRACE_LEVEL
 

Functions

void igmpRouterGetDefaultSettings (IgmpRouterSettings *settings)
 Initialize settings with default values. More...
 
error_t igmpRouterInit (IgmpRouterContext *context, const IgmpRouterSettings *settings)
 IGMP router initialization. More...
 
error_t igmpRouterStart (IgmpRouterContext *context)
 Start IGMP router. More...
 
error_t igmpRouterStop (IgmpRouterContext *context)
 Stop IGMP router. More...
 
void igmpRouterTick (IgmpRouterContext *context)
 IGMP router timer handler. More...
 
void igmpRouterFsm (IgmpRouterContext *context)
 IGMP router state machine. More...
 
void igmpRouterGroupFsm (IgmpRouterContext *context, IgmpRouterGroup *group)
 IGMP group state machine. More...
 

Detailed Description

IGMP router.

License

SPDX-License-Identifier: GPL-2.0-or-later

Copyright (C) 2010-2024 Oryx Embedded SARL. All rights reserved.

This file is part of CycloneTCP Open.

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.

Description

IGMP is used by IP hosts to report their multicast group memberships to routers. Refer to the following RFCs for complete details:

  • RFC 1112: Host Extensions for IP Multicasting
  • RFC 2236: Internet Group Management Protocol, Version 2
  • RFC 3376: Internet Group Management Protocol, Version 3
Author
Oryx Embedded SARL (www.oryx-embedded.com)
Version
2.4.4

Definition in file igmp_router.c.

Macro Definition Documentation

◆ TRACE_LEVEL

#define TRACE_LEVEL   IGMP_TRACE_LEVEL

Definition at line 40 of file igmp_router.c.

Function Documentation

◆ igmpRouterFsm()

void igmpRouterFsm ( IgmpRouterContext context)

IGMP router state machine.

Parameters
[in]contextPointer to the IGMP router context

Definition at line 245 of file igmp_router.c.

◆ igmpRouterGetDefaultSettings()

void igmpRouterGetDefaultSettings ( IgmpRouterSettings settings)

Initialize settings with default values.

Parameters
[out]settingsStructure that contains IGMP router settings

Definition at line 58 of file igmp_router.c.

◆ igmpRouterGroupFsm()

void igmpRouterGroupFsm ( IgmpRouterContext context,
IgmpRouterGroup group 
)

IGMP group state machine.

Parameters
[in]contextPointer to the IGMP router context
[in]groupMulticast group

Definition at line 316 of file igmp_router.c.

◆ igmpRouterInit()

error_t igmpRouterInit ( IgmpRouterContext context,
const IgmpRouterSettings settings 
)

IGMP router initialization.

Parameters
[in]contextPointer to the IGMP router context
[in]settingsIGMP router specific settings
Returns
Error code

Definition at line 87 of file igmp_router.c.

◆ igmpRouterStart()

error_t igmpRouterStart ( IgmpRouterContext context)

Start IGMP router.

Parameters
[in]contextPointer to the IGMP router context
Returns
Error code

Definition at line 149 of file igmp_router.c.

◆ igmpRouterStop()

error_t igmpRouterStop ( IgmpRouterContext context)

Stop IGMP router.

Parameters
[in]contextPointer to the IGMP router context
Returns
Error code

Definition at line 183 of file igmp_router.c.

◆ igmpRouterTick()

void igmpRouterTick ( IgmpRouterContext context)

IGMP router timer handler.

This routine must be periodically called by the TCP/IP stack to update IGMP router state machines

Parameters
[in]contextPointer to the IGMP router context

Definition at line 220 of file igmp_router.c.