Skip to content

Commit 29f425f

Browse files
IVandeVeirenashif
authored andcommitted
net: ip: igmp: Add igmp.h for definitions
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 <[email protected]> (cherry picked from commit ba9eca3)
1 parent a126a08 commit 29f425f

File tree

2 files changed

+24
-7
lines changed

2 files changed

+24
-7
lines changed

subsys/net/ip/igmp.c

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,19 +22,13 @@ LOG_MODULE_DECLARE(net_ipv4, CONFIG_NET_IPV4_LOG_LEVEL);
2222
#include "connection.h"
2323
#include "ipv4.h"
2424
#include "net_stats.h"
25+
#include "igmp.h"
2526

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

2930
#define IPV4_OPT_HDR_ROUTER_ALERT_LEN 4
3031

31-
#define IGMPV3_MODE_IS_INCLUDE 0x01
32-
#define IGMPV3_MODE_IS_EXCLUDE 0x02
33-
#define IGMPV3_CHANGE_TO_INCLUDE_MODE 0x03
34-
#define IGMPV3_CHANGE_TO_EXCLUDE_MODE 0x04
35-
#define IGMPV3_ALLOW_NEW_SOURCES 0x05
36-
#define IGMPV3_BLOCK_OLD_SOURCES 0x06
37-
3832
#define IGMPV2_PAYLOAD_MIN_LEN 8
3933
#define IGMPV3_PAYLOAD_MIN_LEN 12
4034

subsys/net/ip/igmp.h

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
/**
2+
* @file
3+
* @brief IGMP definitions
4+
* This is not to be included by the application.
5+
*/
6+
7+
/*
8+
* Copyright (c) 2024 Basalte bv
9+
*
10+
* SPDX-License-Identifier: Apache-2.0
11+
*/
12+
13+
#ifndef __IGMP_H
14+
#define __IGMP_H
15+
16+
#define IGMPV3_MODE_IS_INCLUDE 0x01
17+
#define IGMPV3_MODE_IS_EXCLUDE 0x02
18+
#define IGMPV3_CHANGE_TO_INCLUDE_MODE 0x03
19+
#define IGMPV3_CHANGE_TO_EXCLUDE_MODE 0x04
20+
#define IGMPV3_ALLOW_NEW_SOURCES 0x05
21+
#define IGMPV3_BLOCK_OLD_SOURCES 0x06
22+
23+
#endif /* __IGMP_H */

0 commit comments

Comments
 (0)