Skip to content

Commit

Permalink
net: ip: igmp: Add igmp.h for definitions
Browse files Browse the repository at this point in the history
Add igmp.h file to declare definitions for IGMP that are not meant te be
included by the application but can be used in e.g. tests.

Signed-off-by: Ibe Van de Veire <ibe.vandeveire@basalte.be>
(cherry picked from commit ba9eca3)
  • Loading branch information
IVandeVeire authored and nashif committed Oct 18, 2024
1 parent a126a08 commit 29f425f
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 7 deletions.
8 changes: 1 addition & 7 deletions subsys/net/ip/igmp.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,19 +22,13 @@ LOG_MODULE_DECLARE(net_ipv4, CONFIG_NET_IPV4_LOG_LEVEL);
#include "connection.h"
#include "ipv4.h"
#include "net_stats.h"
#include "igmp.h"

/* Timeout for various buffer allocations in this file. */
#define PKT_WAIT_TIME K_MSEC(50)

#define IPV4_OPT_HDR_ROUTER_ALERT_LEN 4

#define IGMPV3_MODE_IS_INCLUDE 0x01
#define IGMPV3_MODE_IS_EXCLUDE 0x02
#define IGMPV3_CHANGE_TO_INCLUDE_MODE 0x03
#define IGMPV3_CHANGE_TO_EXCLUDE_MODE 0x04
#define IGMPV3_ALLOW_NEW_SOURCES 0x05
#define IGMPV3_BLOCK_OLD_SOURCES 0x06

#define IGMPV2_PAYLOAD_MIN_LEN 8
#define IGMPV3_PAYLOAD_MIN_LEN 12

Expand Down
23 changes: 23 additions & 0 deletions subsys/net/ip/igmp.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
/**
* @file
* @brief IGMP definitions
* This is not to be included by the application.
*/

/*
* Copyright (c) 2024 Basalte bv
*
* SPDX-License-Identifier: Apache-2.0
*/

#ifndef __IGMP_H
#define __IGMP_H

#define IGMPV3_MODE_IS_INCLUDE 0x01
#define IGMPV3_MODE_IS_EXCLUDE 0x02
#define IGMPV3_CHANGE_TO_INCLUDE_MODE 0x03
#define IGMPV3_CHANGE_TO_EXCLUDE_MODE 0x04
#define IGMPV3_ALLOW_NEW_SOURCES 0x05
#define IGMPV3_BLOCK_OLD_SOURCES 0x06

#endif /* __IGMP_H */

0 comments on commit 29f425f

Please sign in to comment.