blob: e270554183a17937f8ff6f180a33bf5b67df7386 [file] [log] [blame]
Naveen Sampath04696f72022-06-13 15:19:14 +05301/*
2* Copyright 2022-present Open Networking Foundation
3* Licensed under the Apache License, Version 2.0 (the "License");
4* you may not use this file except in compliance with the License.
5* You may obtain a copy of the License at
6*
7* http://www.apache.org/licenses/LICENSE-2.0
8*
9* Unless required by applicable law or agreed to in writing, software
10* distributed under the License is distributed on an "AS IS" BASIS,
11* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12* See the License for the specific language governing permissions and
13* limitations under the License.
14 */
15
16package common
17
18// IGMPConfig identifies the IGMP Configuration parameters.
19type IGMPConfig struct {
vinokuma926cb3e2023-03-29 11:41:06 +053020 FastLeave *bool `json:"FastLeave"`
21 // PeriodicQuery represents IGMP period query interval.
22 PeriodicQuery *bool `json:"PeriodicQuery"`
23 // WithRAUpLink represents IGMP RA uplink.
24 WithRAUpLink *bool `json:"withRAUpLink"`
25 // WithRADownLink represents IGMP RA downlink.
26 WithRADownLink *bool `json:"withRADownLink"`
Naveen Sampath04696f72022-06-13 15:19:14 +053027 // ProfileID represents IGMP profile ID
28 ProfileID string `json:"ProfileID"`
29 // ProfileName represents IGMP profile Name
30 ProfileName string `json:"ProfileName"`
vinokuma926cb3e2023-03-29 11:41:06 +053031 // IgmpVerToServer represents IGMP version.
32 IgmpVerToServer string `json:"igmpVerToServer"`
33 // IgmpSourceIP represents IGMP src ip.
34 IgmpSourceIP string `json:"igmpSourceIp"`
35 // FastLeave represents IGMP fast leave enabled or not.
Naveen Sampath04696f72022-06-13 15:19:14 +053036 // UnsolicitedTimeOut represents unsolicited timeout.
37 UnsolicitedTimeOut int `json:"UnsolicitedTimeOut"`
38 // MaxResp represents IGMP max response time.
39 MaxResp int `json:"MaxResp"`
40 // KeepAliveInterval represents IGMP keep alive interval.
41 KeepAliveInterval int `json:"KeepAliveInterval"`
42 // KeepAliveCount represents IGMP keep alive count.
43 KeepAliveCount int `json:"KeepAliveCount"`
44 // LastQueryInterval represents IGMP last query interval.
45 LastQueryInterval int `json:"LastQueryInterval"`
46 // LastQueryCount represents IGMP last query count.
47 LastQueryCount int `json:"LastQueryCount"`
Naveen Sampath04696f72022-06-13 15:19:14 +053048 // IgmpCos represents IGMP COS value(0-7).
49 IgmpCos int `json:"IgmpCos"`
Naveen Sampath04696f72022-06-13 15:19:14 +053050}
51
vinokuma926cb3e2023-03-29 11:41:06 +053052// MulticastSrcListMode represents mode of source list
Naveen Sampath04696f72022-06-13 15:19:14 +053053type MulticastSrcListMode string
54
55const (
56 //Include refers to MulticastSrcListMode as include
57 Include MulticastSrcListMode = "include"
58 //Exclude refers to MulticastSrcListMode as exclude
59 Exclude MulticastSrcListMode = "exclude"
60 // StaticGroup refes to the static group name
61 StaticGroup string = "static"
62 // IsStaticYes refes to the static flag value yes
63 IsStaticYes string = "yes"
64 // IsStaticNo refes to the static flag value no
65 IsStaticNo string = "no"
66)
67
68// MulticastGroupProxy identifies source specific multicast(SSM) config.
69type MulticastGroupProxy struct {
70 // Mode represents source list include/exclude
71 Mode MulticastSrcListMode `json:"Mode"`
Naveen Sampath04696f72022-06-13 15:19:14 +053072 // IsStatic flag indicating if the group is a "static" group
73 IsStatic string `json:"IsStatic,omitempty"`
vinokuma926cb3e2023-03-29 11:41:06 +053074 // SourceList represents list of multicast server IP addresses.
75 SourceList []string `json:"SourceList"`
Naveen Sampath04696f72022-06-13 15:19:14 +053076}
77
78// MVLANProfile identifies the MVLAN profile.
79type MVLANProfile struct {
Naveen Sampath04696f72022-06-13 15:19:14 +053080 // Groups represents the MVLAN group information. Key will be group name and value as array of multicast channel IPs.
81 Groups map[string][]string `json:"Groups"`
82 // Proxy represents multicast group proxy info. Key will be group name and value as proxy info
83 Proxy map[string]MulticastGroupProxy `json:"Proxy"`
vinokuma926cb3e2023-03-29 11:41:06 +053084 // ProfileID represents Multicast profile ID
85 ProfileID string `json:"ProfileID"`
86 // ProfileName represents Multicast profile Name
87 ProfileName string `json:"ProfileName"`
Naveen Sampath04696f72022-06-13 15:19:14 +053088 // ActiveIgmpChannelsPerSubscriber represents maximum igmp channels per subscriber can use
89 // Default : 3
90 ActiveIgmpChannelsPerSubscriber int `json:"ActiveIgmpChannelsPerSubscriber"`
vinokuma926cb3e2023-03-29 11:41:06 +053091 // VLANID represents the Multicast VLAN ID.
92 VLANID int `json:"VLANID"`
93 // PonVLAN represents the vlan, where mcast traffic will be translated at OLT
94 PonVLAN int `json:"PonVLAN"`
95 //IsChannelBasedGroup represents if the group is channel based
96 IsChannelBasedGroup bool `json:"IsChannelBasedGroup"`
Naveen Sampath04696f72022-06-13 15:19:14 +053097}
98
99// McastConfig the structure for multicast config
100type McastConfig struct {
101 MVLANProfileID string
102 IGMPProfileID string
103 IGMPSrcIP string
104}