1menu "Example Configuration"
2
3    choice EXAMPLE_IP_MODE
4        prompt "Multicast IP type"
5        help
6            Example can multicast IPV4, IPV6, or both.
7
8        config EXAMPLE_IPV4_V6
9            bool "IPV4 & IPV6"
10            select EXAMPLE_IPV4
11            select EXAMPLE_IPV6
12
13        config EXAMPLE_IPV4_ONLY
14            bool "IPV4"
15            select EXAMPLE_IPV4
16
17        config EXAMPLE_IPV6_ONLY
18            bool "IPV6"
19            select EXAMPLE_IPV6
20
21    endchoice
22
23    config EXAMPLE_IPV4
24        bool
25    config EXAMPLE_IPV6
26        bool
27        select EXAMPLE_CONNECT_IPV6 if IDF_TARGET_ESP32
28
29    config EXAMPLE_MULTICAST_IPV4_ADDR
30        string "Multicast IPV4 Address (send & receive)"
31        default "232.10.11.12"
32        depends on EXAMPLE_IPV4
33        help
34            IPV4 multicast address. Example will both send to and listen to this address.
35
36    config EXAMPLE_MULTICAST_IPV6_ADDR
37        string "Multicast IPV6 Address (send & receive)"
38        default "FF02::FC"
39        depends on EXAMPLE_IPV6
40        help
41            IPV6 multicast address. Example will both send to and listen to this address.
42
43            The default FF02::FC address is a link-local multicast address.
44            Consult IPV6 specifications or documentation for information about
45            meaning of different IPV6 multicast ranges.
46
47    config EXAMPLE_PORT
48        int "Multicast port (send & receive)"
49        range 0 65535
50        default 3333
51        help
52            Multicast port the example will both send & receive UDP packets on.
53
54    config EXAMPLE_LOOPBACK
55        bool "Multicast loopback"
56        help
57            Enables IP_MULTICAST_LOOP/IPV6_MULTICAST_LOOP options, meaning
58            that packets transmitted from the device are also received by the
59            device itself.
60
61    config EXAMPLE_MULTICAST_TTL
62        int  "Multicast packet TTL"
63        range 1 255
64        help
65            Sets TTL field of multicast packets. Separate from uni- & broadcast TTL.
66
67    choice EXAMPLE_MULTICAST_IF
68        prompt "Multicast Interface"
69        default EXAMPLE_MULTICAST_LISTEN_DEFAULT_IF
70        help
71            Multicast socket can bind to default interface, or all interfaces.
72
73        config EXAMPLE_MULTICAST_LISTEN_ALL_IF
74            bool "All interfaces (IPV4 only)"
75            depends on !EXAMPLE_IPV6_ONLY
76
77        config EXAMPLE_MULTICAST_LISTEN_DEFAULT_IF
78            bool "Default interface"
79
80    endchoice
81
82endmenu
83